devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] fix rk3066a-rayeager board hang when cpufreq changes
@ 2016-01-14 12:33 Andy Yan
  2016-01-14 12:34 ` [PATCH 1/2] ARM: dts: rockchip: increase vdd_arm voltage for rk3066a-rayeager board Andy Yan
  2016-01-14 12:35 ` [PATCH 2/2] ARM: dts: rockchip: enable pwm3 as pwm regulator " Andy Yan
  0 siblings, 2 replies; 6+ messages in thread
From: Andy Yan @ 2016-01-14 12:33 UTC (permalink / raw)
  To: heiko-4mtYJXux2i+zQB+pC5nmwQ, naobsd-Re5JQEeQqe8AvxtiuMwx3w
  Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, linux-lFZ/pmaqli7XmaaqVzeoHQ,
	devicetree-u79uwXL29TY76Z2rM5mHXA, galak-sgV2jX0FEOL9JmXXK+q4OQ,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	pawel.moll-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8,
	inux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Andy Yan


I found the rayeager board always hang in the system boot
process or when cpufreq change. When check the BSP code[0]
from ChipSpark, I found the current vdd_arm voltage is too
low and so is the vdd_logic voltage, which should be modulated
by PWM3.

So I increase the vdd_arm voltage and enabled pwm3 as a pwm
regulator here.

[0] https://github.com/RockchipOpensourceCommunity/px2-android-kernel-3.0/blob/master/arch/arm/mach-rkpx2/board-rkpx2-sdk.c


Andy Yan (2):
  ARM: dts: rockchip: increase vdd_arm voltage for rk3066a-rayeager
    board
  ARM: dts: rockchip: enable pwm3 as pwm regulator for rk3066a-rayeager
    board

 arch/arm/boot/dts/rk3066a-rayeager.dts | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

-- 
1.9.1


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] ARM: dts: rockchip: increase vdd_arm voltage for rk3066a-rayeager board
  2016-01-14 12:33 [PATCH 0/2] fix rk3066a-rayeager board hang when cpufreq changes Andy Yan
@ 2016-01-14 12:34 ` Andy Yan
       [not found]   ` <1452774860-16572-1-git-send-email-andy.yan-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
  2016-01-14 12:35 ` [PATCH 2/2] ARM: dts: rockchip: enable pwm3 as pwm regulator " Andy Yan
  1 sibling, 1 reply; 6+ messages in thread
From: Andy Yan @ 2016-01-14 12:34 UTC (permalink / raw)
  To: heiko, naobsd
  Cc: robh+dt, linux, devicetree, galak, linux-kernel, ijc+devicetree,
	linux-rockchip, pawel.moll, mark.rutland, inux-arm-kernel,
	Andy Yan

The current vdd_arm voltage is too low, increase it will make
the system more stable.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
---

 arch/arm/boot/dts/rk3066a-rayeager.dts | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/rk3066a-rayeager.dts b/arch/arm/boot/dts/rk3066a-rayeager.dts
index 0bf6876..3d4c104 100644
--- a/arch/arm/boot/dts/rk3066a-rayeager.dts
+++ b/arch/arm/boot/dts/rk3066a-rayeager.dts
@@ -159,6 +159,14 @@
 
 &cpu0 {
 	cpu0-supply = <&vdd_arm>;
+	operating-points = <
+		/* kHz    uV */
+		1008000 1125000
+		816000  1125000
+		600000  1100000
+		504000  1100000
+		312000  1075000
+	>;
 };
 
 &emac {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] ARM: dts: rockchip: enable pwm3 as pwm regulator for rk3066a-rayeager board
  2016-01-14 12:33 [PATCH 0/2] fix rk3066a-rayeager board hang when cpufreq changes Andy Yan
  2016-01-14 12:34 ` [PATCH 1/2] ARM: dts: rockchip: increase vdd_arm voltage for rk3066a-rayeager board Andy Yan
@ 2016-01-14 12:35 ` Andy Yan
  2016-01-14 12:41   ` Heiko Stuebner
  1 sibling, 1 reply; 6+ messages in thread
From: Andy Yan @ 2016-01-14 12:35 UTC (permalink / raw)
  To: heiko, naobsd
  Cc: robh+dt, linux, devicetree, galak, linux-kernel, ijc+devicetree,
	linux-rockchip, pawel.moll, mark.rutland, inux-arm-kernel,
	Andy Yan

Rayeager board use pwm3 modulate the vdd_logic voltage, so enable it.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
---

 arch/arm/boot/dts/rk3066a-rayeager.dts | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/arm/boot/dts/rk3066a-rayeager.dts b/arch/arm/boot/dts/rk3066a-rayeager.dts
index 3d4c104..d17a5b8 100644
--- a/arch/arm/boot/dts/rk3066a-rayeager.dts
+++ b/arch/arm/boot/dts/rk3066a-rayeager.dts
@@ -78,6 +78,18 @@
 		};
 	};
 
+	pwm_regulator: pwm-regulator {
+		compatible = "pwm-regulator";
+		pwms = <&pwm3 0 1000>;
+		regulator-name = "vdd_logic";
+		regulator-min-microvolt = <1200000>;
+		regulator-max-microvolt = <1200000>;
+		regulator-always-on;
+		voltage-table = <1000000 100>,
+				<1200000 42>;
+		status = "okay";
+	};
+
 	vsys: vsys-regulator {
 		compatible = "regulator-fixed";
 		regulator-name = "vsys";
@@ -443,6 +455,10 @@
 	status = "okay";
 };
 
+&pwm3 {
+	status = "okay";
+};
+
 &saradc {
 	vref-supply = <&vcc_25>;
 	status = "okay";
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] ARM: dts: rockchip: enable pwm3 as pwm regulator for rk3066a-rayeager board
  2016-01-14 12:35 ` [PATCH 2/2] ARM: dts: rockchip: enable pwm3 as pwm regulator " Andy Yan
@ 2016-01-14 12:41   ` Heiko Stuebner
  2016-01-15 10:41     ` Andy Yan
  0 siblings, 1 reply; 6+ messages in thread
From: Heiko Stuebner @ 2016-01-14 12:41 UTC (permalink / raw)
  To: Andy Yan
  Cc: naobsd, robh+dt, linux, devicetree, galak, linux-kernel,
	ijc+devicetree, linux-rockchip, pawel.moll, mark.rutland,
	inux-arm-kernel

Hi Andy,

Am Donnerstag, 14. Januar 2016, 20:35:56 schrieb Andy Yan:
> Rayeager board use pwm3 modulate the vdd_logic voltage, so enable it.
> 
> Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
> ---
> 
>  arch/arm/boot/dts/rk3066a-rayeager.dts | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/rk3066a-rayeager.dts
> b/arch/arm/boot/dts/rk3066a-rayeager.dts index 3d4c104..d17a5b8 100644
> --- a/arch/arm/boot/dts/rk3066a-rayeager.dts
> +++ b/arch/arm/boot/dts/rk3066a-rayeager.dts
> @@ -78,6 +78,18 @@
>  		};
>  	};
> 
> +	pwm_regulator: pwm-regulator {
> +		compatible = "pwm-regulator";
> +		pwms = <&pwm3 0 1000>;
> +		regulator-name = "vdd_logic";
> +		regulator-min-microvolt = <1200000>;
> +		regulator-max-microvolt = <1200000>;

I guess this is to make sure it stays at 1.2V at all times, or is the min-
microvolt settings supposed to be lower?


Thanks
Heiko

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] ARM: dts: rockchip: increase vdd_arm voltage for rk3066a-rayeager board
       [not found]   ` <1452774860-16572-1-git-send-email-andy.yan-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2016-01-14 12:45     ` Heiko Stuebner
  0 siblings, 0 replies; 6+ messages in thread
From: Heiko Stuebner @ 2016-01-14 12:45 UTC (permalink / raw)
  To: Andy Yan
  Cc: naobsd-Re5JQEeQqe8AvxtiuMwx3w, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, devicetree-u79uwXL29TY76Z2rM5mHXA,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	pawel.moll-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hi Andy,

Am Donnerstag, 14. Januar 2016, 20:34:20 schrieb Andy Yan:
> The current vdd_arm voltage is too low, increase it will make
> the system more stable.
> 
> Signed-off-by: Andy Yan <andy.yan-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
> ---
> 
>  arch/arm/boot/dts/rk3066a-rayeager.dts | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/rk3066a-rayeager.dts
> b/arch/arm/boot/dts/rk3066a-rayeager.dts index 0bf6876..3d4c104 100644
> --- a/arch/arm/boot/dts/rk3066a-rayeager.dts
> +++ b/arch/arm/boot/dts/rk3066a-rayeager.dts
> @@ -159,6 +159,14 @@
> 
>  &cpu0 {
>  	cpu0-supply = <&vdd_arm>;
> +	operating-points = <
> +		/* kHz    uV */
> +		1008000 1125000
> +		816000  1125000
> +		600000  1100000
> +		504000  1100000
> +		312000  1075000
> +	>;
>  };
> 
>  &emac {

Does this only apply to the rayeager-board / px2 soc or for all rk3066a/px2 
boards? I.e. the original values come from some sdk kernel and I might've 
transcribed that wrong at the time and I remember having problems trying to 
reach higher frequencies as well.

So could you check what the full operating points looks like for both and if 
this can move to the rk3066a.dtsi, as both should be able to reach at least 
1.4GHz / 1.6GHz.


Thanks
Heiko
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] ARM: dts: rockchip: enable pwm3 as pwm regulator for rk3066a-rayeager board
  2016-01-14 12:41   ` Heiko Stuebner
@ 2016-01-15 10:41     ` Andy Yan
  0 siblings, 0 replies; 6+ messages in thread
From: Andy Yan @ 2016-01-15 10:41 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, pawel.moll-5wv7dgnIgG8,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	naobsd-Re5JQEeQqe8AvxtiuMwx3w,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	inux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	galak-sgV2jX0FEOL9JmXXK+q4OQ

Hi Heiko:

On 2016年01月14日 20:41, Heiko Stuebner wrote:
> Hi Andy,
>
> Am Donnerstag, 14. Januar 2016, 20:35:56 schrieb Andy Yan:
>> Rayeager board use pwm3 modulate the vdd_logic voltage, so enable it.
>>
>> Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
>> ---
>>
>>   arch/arm/boot/dts/rk3066a-rayeager.dts | 16 ++++++++++++++++
>>   1 file changed, 16 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/rk3066a-rayeager.dts
>> b/arch/arm/boot/dts/rk3066a-rayeager.dts index 3d4c104..d17a5b8 100644
>> --- a/arch/arm/boot/dts/rk3066a-rayeager.dts
>> +++ b/arch/arm/boot/dts/rk3066a-rayeager.dts
>> @@ -78,6 +78,18 @@
>>   		};
>>   	};
>>
>> +	pwm_regulator: pwm-regulator {
>> +		compatible = "pwm-regulator";
>> +		pwms = <&pwm3 0 1000>;
>> +		regulator-name = "vdd_logic";
>> +		regulator-min-microvolt = <1200000>;
>> +		regulator-max-microvolt = <1200000>;
> I guess this is to make sure it stays at 1.2V at all times, or is the min-
> microvolt settings supposed to be lower?
>
>
> Thanks
> Heiko
>
>
>
    Yes, I want to fix it at 1.2V. When I read the regulator_register 
function,  I found it call regulator_do_set_voltate only when min=max. 
So I set it like what you see.
    regulator_register--->
                    set_machine_constrains--->
                                    machine_constrains_voltage-->




_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-01-15 10:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-14 12:33 [PATCH 0/2] fix rk3066a-rayeager board hang when cpufreq changes Andy Yan
2016-01-14 12:34 ` [PATCH 1/2] ARM: dts: rockchip: increase vdd_arm voltage for rk3066a-rayeager board Andy Yan
     [not found]   ` <1452774860-16572-1-git-send-email-andy.yan-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-01-14 12:45     ` Heiko Stuebner
2016-01-14 12:35 ` [PATCH 2/2] ARM: dts: rockchip: enable pwm3 as pwm regulator " Andy Yan
2016-01-14 12:41   ` Heiko Stuebner
2016-01-15 10:41     ` Andy Yan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).