HACK: ARM64: dts: rockchip: Hack out PWM regulators on gru
authorDouglas Anderson <dianders@chromium.org>
Tue, 12 Apr 2016 21:07:11 +0000 (14:07 -0700)
committerCaesar Wang <wxt@rock-chips.com>
Thu, 14 Apr 2016 11:53:13 +0000 (19:53 +0800)
Until we get PWM regulator solid, let's hack it out and just keep
whatever the firmware set for us.

Note that when the kernel boots it appears that it does some reparenting
of clocks and the PWM frequency actually changes.  ...but the voltage
seems OK ish.

Change-Id: I3be6ea4460f685e4a75a0f7f31f767f09b908442
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-on: https://chrome-internal-review.googlesource.com/254650
Reviewed-by: Stephen Barber <smbarber@google.com>
Tested-by: Doug Anderson <dianders@google.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(Fixes the typo)

arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi

index f50bf9cb00bf05aa533861128d6f4bf142363950..4099fe9bf7f1dfa2d960fb0a512ad95f0e467649 100644 (file)
@@ -859,6 +859,59 @@ ap_i2c_audio: &i2c8 {
        status = "okay";
 };
 
+/* HACKS: Poorly formatted on purpose so you know they're hacks */
+
+/* HACK THE PWM REGULATOR OUT
+ *
+ * We'll hack them all to pretend they are fixed regulators
+ * and at exactly .9V, which is where cpufreq wants them.
+ *
+ * We'll also set all PWMs to disabled so we know that the PWM
+ * framework won't touch them.
+ *
+ * This relies on PWM clock being a critical clock.
+ */
+&ppvar_bigcpu {
+       compatible = "regulator-fixed";
+       regulator-min-microvolt = <900000>;
+       regulator-max-microvolt = <900000>;
+};
+
+&ppvar_centerlogic {
+       compatible = "regulator-fixed";
+       regulator-min-microvolt = <900000>;
+       regulator-max-microvolt = <900000>;
+};
+
+&ppvar_litcpu {
+       compatible = "regulator-fixed";
+       regulator-min-microvolt = <900000>;
+       regulator-max-microvolt = <900000>;
+};
+
+&ppvar_gpu {
+       compatible = "regulator-fixed";
+       regulator-min-microvolt = <900000>;
+       regulator-max-microvolt = <900000>;
+};
+
+&pwm0 {
+       status = "disabled";
+};
+
+&pwm1 {
+       status = "disabled";
+};
+
+&pwm2 {
+
+       status = "disabled";
+};
+
+&pwm3 {
+       status = "disabled";
+};
+
 /* PINCTRL: always below everything else */
 
 &pinctrl {