linux-rockchip.lists.infradead.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; 12+ 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] 12+ 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; 12+ 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] 12+ 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; 12+ 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] 12+ 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; 12+ 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] 12+ 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
  2016-01-14 13:20       ` Andy Yan
  0 siblings, 1 reply; 12+ 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] 12+ messages in thread

* Re: [PATCH 1/2] ARM: dts: rockchip: increase vdd_arm voltage for rk3066a-rayeager board
  2016-01-14 12:45     ` Heiko Stuebner
@ 2016-01-14 13:20       ` Andy Yan
       [not found]         ` <5697A081.4060903-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Andy Yan @ 2016-01-14 13:20 UTC (permalink / raw)
  To: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hi Heiko:

On 2016年01月14日 20:45, Heiko Stuebner wrote:
> 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@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 {
> 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
>
> ______

     I have checked the sdk kernel, the opp for the sdk board is like 
bellow:

  /**
  * dvfs_cpu_logic_table: table for arm and logic dvfs
  * @frequency   : arm frequency
  * @cpu_volt    : arm voltage depend on frequency
  * @logic_volt  : logic voltage arm requests depend on frequency
  * comments     : min arm/logic voltage
  */
static struct dvfs_arm_table dvfs_cpu_logic_table[] = {
         {.frequency = 252 * 1000,       .cpu_volt = 1075 * 1000,        
.logic_volt = 1125 * 1000},//0.975V/1.000V
         {.frequency = 504 * 1000,       .cpu_volt = 1100 * 1000,        
.logic_volt = 1125 * 1000},//0.975V/1.000V
         {.frequency = 816 * 1000,       .cpu_volt = 1125 * 1000,        
.logic_volt = 1150 * 1000},//1.000V/1.025V
         {.frequency = 1008 * 1000,      .cpu_volt = 1125 * 1000,        
.logic_volt = 1150 * 1000},//1.025V/1.050V
         {.frequency = 1200 * 1000,      .cpu_volt = 1175 * 1000,        
.logic_volt = 1200 * 1000},//1.100V/1.050V
         {.frequency = 1272 * 1000,      .cpu_volt = 1225 * 1000,        
.logic_volt = 1200 * 1000},//1.150V/1.100V
         {.frequency = 1416 * 1000,      .cpu_volt = 1300 * 1000,        
.logic_volt = 1200 * 1000},//1.225V/1.100V
         {.frequency = 1512 * 1000,      .cpu_volt = 1350 * 1000,        
.logic_volt = 1250 * 1000},//1.300V/1.150V
         {.frequency = 1608 * 1000,      .cpu_volt = 1425 * 1000,        
.logic_volt = 1300 * 1000},//1.325V/1.175V
         {.frequency = CPUFREQ_TABLE_END},
};

  This table is made base on mass stress test. So is a safe opp table 
for most rk3066a base boards. But it some
  board is not so well in power supply circuit design, the may also need 
to adjust it.

  From the table we see that the logic_voltage need to increase  as the 
cpufreq increase. But it seems that the current mainline kernel does not 
support adjust the logic voltage when cpufreq change. So we can only 
scale the cpufreq to 1.4GHZ by fixed the logic_volt at 1.2V.

  If you like, I can move it to rk3066a.dtsi with the max freq at 
1008MHZ, as I haven't  test to 1.4GHZ  with the mainline kernel. Or give 
me some time to test to see if the rayeager board can run to 1.4G stable 
with the mainline .
> _________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
>
>
>
>




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

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

* Re: [PATCH 1/2] ARM: dts: rockchip: increase vdd_arm voltage for rk3066a-rayeager board
       [not found]         ` <5697A081.4060903-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2016-01-14 13:50           ` Eddie Cai
       [not found]             ` <CANCyOWak0wMNRPxkJtE2DJ1UvCneWxuNXjwjxjM3+_Jjuaahvw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Eddie Cai @ 2016-01-14 13:50 UTC (permalink / raw)
  To: Andy Yan; +Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hi Heiko

I don't want open source version kernel support too high frequency.
Many people use RK3066/PX2 on their board. We don't know if their
layout is good enough to support higher frequency. ie. bad layout will
cause more voltage drop on the VDD_CPU power rail. So it may need
higher voltage. I think stable is more important here. People want
higher frequency can add more opp depend on their board's layout.

2016-01-14 21:20 GMT+08:00 Andy Yan <andy.yan@rock-chips.com>:
> Hi Heiko:
>
>
> On 2016年01月14日 20:45, Heiko Stuebner wrote:
>>
>> 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@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 {
>>
>> 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
>>
>> ______
>
>
>     I have checked the sdk kernel, the opp for the sdk board is like bellow:
>
>  /**
>  * dvfs_cpu_logic_table: table for arm and logic dvfs
>  * @frequency   : arm frequency
>  * @cpu_volt    : arm voltage depend on frequency
>  * @logic_volt  : logic voltage arm requests depend on frequency
>  * comments     : min arm/logic voltage
>  */
> static struct dvfs_arm_table dvfs_cpu_logic_table[] = {
>         {.frequency = 252 * 1000,       .cpu_volt = 1075 * 1000,
> .logic_volt = 1125 * 1000},//0.975V/1.000V
>         {.frequency = 504 * 1000,       .cpu_volt = 1100 * 1000,
> .logic_volt = 1125 * 1000},//0.975V/1.000V
>         {.frequency = 816 * 1000,       .cpu_volt = 1125 * 1000,
> .logic_volt = 1150 * 1000},//1.000V/1.025V
>         {.frequency = 1008 * 1000,      .cpu_volt = 1125 * 1000,
> .logic_volt = 1150 * 1000},//1.025V/1.050V
>         {.frequency = 1200 * 1000,      .cpu_volt = 1175 * 1000,
> .logic_volt = 1200 * 1000},//1.100V/1.050V
>         {.frequency = 1272 * 1000,      .cpu_volt = 1225 * 1000,
> .logic_volt = 1200 * 1000},//1.150V/1.100V
>         {.frequency = 1416 * 1000,      .cpu_volt = 1300 * 1000,
> .logic_volt = 1200 * 1000},//1.225V/1.100V
>         {.frequency = 1512 * 1000,      .cpu_volt = 1350 * 1000,
> .logic_volt = 1250 * 1000},//1.300V/1.150V
>         {.frequency = 1608 * 1000,      .cpu_volt = 1425 * 1000,
> .logic_volt = 1300 * 1000},//1.325V/1.175V
>         {.frequency = CPUFREQ_TABLE_END},
> };
>
>  This table is made base on mass stress test. So is a safe opp table for
> most rk3066a base boards. But it some
>  board is not so well in power supply circuit design, the may also need to
> adjust it.
>
>  From the table we see that the logic_voltage need to increase  as the
> cpufreq increase. But it seems that the current mainline kernel does not
> support adjust the logic voltage when cpufreq change. So we can only scale
> the cpufreq to 1.4GHZ by fixed the logic_volt at 1.2V.
>
>  If you like, I can move it to rk3066a.dtsi with the max freq at 1008MHZ, as
> I haven't  test to 1.4GHZ  with the mainline kernel. Or give me some time to
> test to see if the rayeager board can run to 1.4G stable with the mainline .
>
>> _________________________________________
>> Linux-rockchip mailing list
>> Linux-rockchip@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-rockchip
>>
>>
>>
>>
>
>
>
>
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

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

* Re: [PATCH 1/2] ARM: dts: rockchip: increase vdd_arm voltage for rk3066a-rayeager board
       [not found]             ` <CANCyOWak0wMNRPxkJtE2DJ1UvCneWxuNXjwjxjM3+_Jjuaahvw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-01-15  1:11               ` Andy Yan
       [not found]                 ` <56984734.6000806-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Andy Yan @ 2016-01-15  1:11 UTC (permalink / raw)
  To: Eddie Cai, heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org
  Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hi Heiko:

On 2016年01月14日 21:50, Eddie Cai wrote:
> Hi Heiko
>
> I don't want open source version kernel support too high frequency.
> Many people use RK3066/PX2 on their board. We don't know if their
> layout is good enough to support higher frequency. ie. bad layout will
> cause more voltage drop on the VDD_CPU power rail. So it may need
> higher voltage. I think stable is more important here. People want
> higher frequency can add more opp depend on their board's layout.
>
> 2016-01-14 21:20 GMT+08:00 Andy Yan <andy.yan@rock-chips.com>:
>> Hi Heiko:
>>
>>
>> On 2016年01月14日 20:45, Heiko Stuebner wrote:
>>> 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@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 {
>>> 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
>>>
>>> ______
>>
>>      I have checked the sdk kernel, the opp for the sdk board is like bellow:
>>
>>   /**
>>   * dvfs_cpu_logic_table: table for arm and logic dvfs
>>   * @frequency   : arm frequency
>>   * @cpu_volt    : arm voltage depend on frequency
>>   * @logic_volt  : logic voltage arm requests depend on frequency
>>   * comments     : min arm/logic voltage
>>   */
>> static struct dvfs_arm_table dvfs_cpu_logic_table[] = {
>>          {.frequency = 252 * 1000,       .cpu_volt = 1075 * 1000,
>> .logic_volt = 1125 * 1000},//0.975V/1.000V
>>          {.frequency = 504 * 1000,       .cpu_volt = 1100 * 1000,
>> .logic_volt = 1125 * 1000},//0.975V/1.000V
>>          {.frequency = 816 * 1000,       .cpu_volt = 1125 * 1000,
>> .logic_volt = 1150 * 1000},//1.000V/1.025V
>>          {.frequency = 1008 * 1000,      .cpu_volt = 1125 * 1000,
>> .logic_volt = 1150 * 1000},//1.025V/1.050V
>>          {.frequency = 1200 * 1000,      .cpu_volt = 1175 * 1000,
>> .logic_volt = 1200 * 1000},//1.100V/1.050V
>>          {.frequency = 1272 * 1000,      .cpu_volt = 1225 * 1000,
>> .logic_volt = 1200 * 1000},//1.150V/1.100V
>>          {.frequency = 1416 * 1000,      .cpu_volt = 1300 * 1000,
>> .logic_volt = 1200 * 1000},//1.225V/1.100V
>>          {.frequency = 1512 * 1000,      .cpu_volt = 1350 * 1000,
>> .logic_volt = 1250 * 1000},//1.300V/1.150V
>>          {.frequency = 1608 * 1000,      .cpu_volt = 1425 * 1000,
>> .logic_volt = 1300 * 1000},//1.325V/1.175V
>>          {.frequency = CPUFREQ_TABLE_END},
>> };
>>
>>   This table is made base on mass stress test. So is a safe opp table for
>> most rk3066a base boards. But it some
>>   board is not so well in power supply circuit design, the may also need to
>> adjust it.
>>
>>   From the table we see that the logic_voltage need to increase  as the
>> cpufreq increase. But it seems that the current mainline kernel does not
>> support adjust the logic voltage when cpufreq change. So we can only scale
>> the cpufreq to 1.4GHZ by fixed the logic_volt at 1.2V.
>>
>>   If you like, I can move it to rk3066a.dtsi with the max freq at 1008MHZ, as
>> I haven't  test to 1.4GHZ  with the mainline kernel. Or give me some time to
>> test to see if the rayeager board can run to 1.4G stable with the mainline .
>>
>>

   I have run Rayeager  board with cpufreq freely change from 
312MHZ~1416MHZ for 11 hours now, it's stable. Maybe we can set the 
default opp table for rk3066a/PX2 from 312MHZ~1416HZ in current mainline.



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

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

* Re: [PATCH 1/2] ARM: dts: rockchip: increase vdd_arm voltage for rk3066a-rayeager board
       [not found]                 ` <56984734.6000806-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2016-01-15  9:22                   ` Heiko Stuebner
  2016-01-15  9:34                     ` Andy Yan
  0 siblings, 1 reply; 12+ messages in thread
From: Heiko Stuebner @ 2016-01-15  9:22 UTC (permalink / raw)
  To: Andy Yan; +Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Eddie Cai

Hi Andy, Eddie,

Am Freitag, 15. Januar 2016, 09:11:16 schrieb Andy Yan:
> On 2016年01月14日 21:50, Eddie Cai wrote:
> > Hi Heiko
> > 
> > I don't want open source version kernel support too high frequency.
> > Many people use RK3066/PX2 on their board. We don't know if their
> > layout is good enough to support higher frequency. ie. bad layout will
> > cause more voltage drop on the VDD_CPU power rail. So it may need
> > higher voltage. I think stable is more important here. People want
> > higher frequency can add more opp depend on their board's layout.
> > 
> > 2016-01-14 21:20 GMT+08:00 Andy Yan <andy.yan@rock-chips.com>:
> >> Hi Heiko:
> >> 
> >> On 2016年01月14日 20:45, Heiko Stuebner wrote:
> >>> 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@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 {
> >>> 
> >>> 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
> >>> 
> >>> ______
> >>> 
> >>      I have checked the sdk kernel, the opp for the sdk board is like 
bellow:
> >>   /**
> >>   * dvfs_cpu_logic_table: table for arm and logic dvfs
> >>   * @frequency   : arm frequency
> >>   * @cpu_volt    : arm voltage depend on frequency
> >>   * @logic_volt  : logic voltage arm requests depend on frequency
> >>   * comments     : min arm/logic voltage
> >>   */
> >> 
> >> static struct dvfs_arm_table dvfs_cpu_logic_table[] = {
> >> 
> >>          {.frequency = 252 * 1000,       .cpu_volt = 1075 * 1000,
> >> 
> >> .logic_volt = 1125 * 1000},//0.975V/1.000V
> >> 
> >>          {.frequency = 504 * 1000,       .cpu_volt = 1100 * 1000,
> >> 
> >> .logic_volt = 1125 * 1000},//0.975V/1.000V
> >> 
> >>          {.frequency = 816 * 1000,       .cpu_volt = 1125 * 1000,
> >> 
> >> .logic_volt = 1150 * 1000},//1.000V/1.025V
> >> 
> >>          {.frequency = 1008 * 1000,      .cpu_volt = 1125 * 1000,
> >> 
> >> .logic_volt = 1150 * 1000},//1.025V/1.050V
> >> 
> >>          {.frequency = 1200 * 1000,      .cpu_volt = 1175 * 1000,
> >> 
> >> .logic_volt = 1200 * 1000},//1.100V/1.050V
> >> 
> >>          {.frequency = 1272 * 1000,      .cpu_volt = 1225 * 1000,
> >> 
> >> .logic_volt = 1200 * 1000},//1.150V/1.100V
> >> 
> >>          {.frequency = 1416 * 1000,      .cpu_volt = 1300 * 1000,
> >> 
> >> .logic_volt = 1200 * 1000},//1.225V/1.100V
> >> 
> >>          {.frequency = 1512 * 1000,      .cpu_volt = 1350 * 1000,
> >> 
> >> .logic_volt = 1250 * 1000},//1.300V/1.150V
> >> 
> >>          {.frequency = 1608 * 1000,      .cpu_volt = 1425 * 1000,
> >> 
> >> .logic_volt = 1300 * 1000},//1.325V/1.175V
> >> 
> >>          {.frequency = CPUFREQ_TABLE_END},
> >> 
> >> };
> >> 
> >>   This table is made base on mass stress test. So is a safe opp table
> >>   for
> >> 
> >> most rk3066a base boards. But it some
> >> 
> >>   board is not so well in power supply circuit design, the may also
> >>   need to
> >> 
> >> adjust it.
> >> 
> >>   From the table we see that the logic_voltage need to increase  as the
> >> 
> >> cpufreq increase. But it seems that the current mainline kernel does
> >> not
> >> support adjust the logic voltage when cpufreq change. So we can only
> >> scale the cpufreq to 1.4GHZ by fixed the logic_volt at 1.2V.
> >> 
> >>   If you like, I can move it to rk3066a.dtsi with the max freq at
> >>   1008MHZ, as>> 
> >> I haven't  test to 1.4GHZ  with the mainline kernel. Or give me some
> >> time to test to see if the rayeager board can run to 1.4G stable with
> >> the mainline .
>    I have run Rayeager  board with cpufreq freely change from
> 312MHZ~1416MHZ for 11 hours now, it's stable. Maybe we can set the
> default opp table for rk3066a/PX2 from 312MHZ~1416HZ in current mainline.

Thanks for doing that stress test and making that the default setting would 
be a nice way to go :-) .

I just checked, the other 2 rk3066a boards we currently support (Hayou 
Marsboard and BQ Curie2) use the exact same power-layout (tps65210 + pwm-
regulator for vdd_log), so should be quite save to do.


Heiko
Heiko

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

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

* Re: [PATCH 1/2] ARM: dts: rockchip: increase vdd_arm voltage for rk3066a-rayeager board
  2016-01-15  9:22                   ` Heiko Stuebner
@ 2016-01-15  9:34                     ` Andy Yan
       [not found]                       ` <5698BD27.3050700-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Andy Yan @ 2016-01-15  9:34 UTC (permalink / raw)
  To: Heiko Stuebner; +Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Eddie Cai

Hi Heiko:

On 2016年01月15日 17:22, Heiko Stuebner wrote:
> Hi Andy, Eddie,
>
> Am Freitag, 15. Januar 2016, 09:11:16 schrieb Andy Yan:
>> On 2016年01月14日 21:50, Eddie Cai wrote:
>>> Hi Heiko
>>>
>>> I don't want open source version kernel support too high frequency.
>>> Many people use RK3066/PX2 on their board. We don't know if their
>>> layout is good enough to support higher frequency. ie. bad layout will
>>> cause more voltage drop on the VDD_CPU power rail. So it may need
>>> higher voltage. I think stable is more important here. People want
>>> higher frequency can add more opp depend on their board's layout.
>>>
>>> 2016-01-14 21:20 GMT+08:00 Andy Yan <andy.yan@rock-chips.com>:
>>>> Hi Heiko:
>>>>
>>>> On 2016年01月14日 20:45, Heiko Stuebner wrote:
>>>>> 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@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 {
>>>>> 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
>>>>>
>>>>> ______
>>>>>
>>>>       I have checked the sdk kernel, the opp for the sdk board is like
> bellow:
>>>>    /**
>>>>    * dvfs_cpu_logic_table: table for arm and logic dvfs
>>>>    * @frequency   : arm frequency
>>>>    * @cpu_volt    : arm voltage depend on frequency
>>>>    * @logic_volt  : logic voltage arm requests depend on frequency
>>>>    * comments     : min arm/logic voltage
>>>>    */
>>>>
>>>> static struct dvfs_arm_table dvfs_cpu_logic_table[] = {
>>>>
>>>>           {.frequency = 252 * 1000,       .cpu_volt = 1075 * 1000,
>>>>
>>>> .logic_volt = 1125 * 1000},//0.975V/1.000V
>>>>
>>>>           {.frequency = 504 * 1000,       .cpu_volt = 1100 * 1000,
>>>>
>>>> .logic_volt = 1125 * 1000},//0.975V/1.000V
>>>>
>>>>           {.frequency = 816 * 1000,       .cpu_volt = 1125 * 1000,
>>>>
>>>> .logic_volt = 1150 * 1000},//1.000V/1.025V
>>>>
>>>>           {.frequency = 1008 * 1000,      .cpu_volt = 1125 * 1000,
>>>>
>>>> .logic_volt = 1150 * 1000},//1.025V/1.050V
>>>>
>>>>           {.frequency = 1200 * 1000,      .cpu_volt = 1175 * 1000,
>>>>
>>>> .logic_volt = 1200 * 1000},//1.100V/1.050V
>>>>
>>>>           {.frequency = 1272 * 1000,      .cpu_volt = 1225 * 1000,
>>>>
>>>> .logic_volt = 1200 * 1000},//1.150V/1.100V
>>>>
>>>>           {.frequency = 1416 * 1000,      .cpu_volt = 1300 * 1000,
>>>>
>>>> .logic_volt = 1200 * 1000},//1.225V/1.100V
>>>>
>>>>           {.frequency = 1512 * 1000,      .cpu_volt = 1350 * 1000,
>>>>
>>>> .logic_volt = 1250 * 1000},//1.300V/1.150V
>>>>
>>>>           {.frequency = 1608 * 1000,      .cpu_volt = 1425 * 1000,
>>>>
>>>> .logic_volt = 1300 * 1000},//1.325V/1.175V
>>>>
>>>>           {.frequency = CPUFREQ_TABLE_END},
>>>>
>>>> };
>>>>
>>>>    This table is made base on mass stress test. So is a safe opp table
>>>>    for
>>>>
>>>> most rk3066a base boards. But it some
>>>>
>>>>    board is not so well in power supply circuit design, the may also
>>>>    need to
>>>>
>>>> adjust it.
>>>>
>>>>    From the table we see that the logic_voltage need to increase  as the
>>>>
>>>> cpufreq increase. But it seems that the current mainline kernel does
>>>> not
>>>> support adjust the logic voltage when cpufreq change. So we can only
>>>> scale the cpufreq to 1.4GHZ by fixed the logic_volt at 1.2V.
>>>>
>>>>    If you like, I can move it to rk3066a.dtsi with the max freq at
>>>>    1008MHZ, as>>
>>>> I haven't  test to 1.4GHZ  with the mainline kernel. Or give me some
>>>> time to test to see if the rayeager board can run to 1.4G stable with
>>>> the mainline .
>>     I have run Rayeager  board with cpufreq freely change from
>> 312MHZ~1416MHZ for 11 hours now, it's stable. Maybe we can set the
>> default opp table for rk3066a/PX2 from 312MHZ~1416HZ in current mainline.
> Thanks for doing that stress test and making that the default setting would
> be a nice way to go :-) .
>
> I just checked, the other 2 rk3066a boards we currently support (Hayou
> Marsboard and BQ Curie2) use the exact same power-layout (tps65210 + pwm-
> regulator for vdd_log), so should be quite save to do.
>
>
> Heiko
> Heiko
>
>
>
>
   Actually, all the rockchip rk3066 base platform use the same power 
supply design( control vdd_logic voltage by pwm).
   So I can move the opp table with max freq 1416MHZ to rk3066a.dtsi and 
keep the pwm-regulator in board specific dts?



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

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

* Re: [PATCH 1/2] ARM: dts: rockchip: increase vdd_arm voltage for rk3066a-rayeager board
       [not found]                       ` <5698BD27.3050700-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2016-01-15  9:58                         ` Heiko Stuebner
  0 siblings, 0 replies; 12+ messages in thread
From: Heiko Stuebner @ 2016-01-15  9:58 UTC (permalink / raw)
  To: Andy Yan; +Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Eddie Cai

Am Freitag, 15. Januar 2016, 17:34:31 schrieb Andy Yan:
> Hi Heiko:
> 
> On 2016年01月15日 17:22, Heiko Stuebner wrote:
> > Hi Andy, Eddie,
> > 
> > Am Freitag, 15. Januar 2016, 09:11:16 schrieb Andy Yan:
> >> On 2016年01月14日 21:50, Eddie Cai wrote:
> >>> Hi Heiko
> >>> 
> >>> I don't want open source version kernel support too high frequency.
> >>> Many people use RK3066/PX2 on their board. We don't know if their
> >>> layout is good enough to support higher frequency. ie. bad layout will
> >>> cause more voltage drop on the VDD_CPU power rail. So it may need
> >>> higher voltage. I think stable is more important here. People want
> >>> higher frequency can add more opp depend on their board's layout.
> >>> 
> >>> 2016-01-14 21:20 GMT+08:00 Andy Yan <andy.yan@rock-chips.com>:
> >>>> Hi Heiko:
> >>>> 
> >>>> On 2016年01月14日 20:45, Heiko Stuebner wrote:
> >>>>> 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@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 {
> >>>>> 
> >>>>> 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
> >>>>> 
> >>>>> ______
> >>>>> 
> >>>>       I have checked the sdk kernel, the opp for the sdk board is
> >>>>       like
> > 
> > bellow:
> >>>>    /**
> >>>>    * dvfs_cpu_logic_table: table for arm and logic dvfs
> >>>>    * @frequency   : arm frequency
> >>>>    * @cpu_volt    : arm voltage depend on frequency
> >>>>    * @logic_volt  : logic voltage arm requests depend on frequency
> >>>>    * comments     : min arm/logic voltage
> >>>>    */
> >>>> 
> >>>> static struct dvfs_arm_table dvfs_cpu_logic_table[] = {
> >>>> 
> >>>>           {.frequency = 252 * 1000,       .cpu_volt = 1075 * 1000,
> >>>> 
> >>>> .logic_volt = 1125 * 1000},//0.975V/1.000V
> >>>> 
> >>>>           {.frequency = 504 * 1000,       .cpu_volt = 1100 * 1000,
> >>>> 
> >>>> .logic_volt = 1125 * 1000},//0.975V/1.000V
> >>>> 
> >>>>           {.frequency = 816 * 1000,       .cpu_volt = 1125 * 1000,
> >>>> 
> >>>> .logic_volt = 1150 * 1000},//1.000V/1.025V
> >>>> 
> >>>>           {.frequency = 1008 * 1000,      .cpu_volt = 1125 * 1000,
> >>>> 
> >>>> .logic_volt = 1150 * 1000},//1.025V/1.050V
> >>>> 
> >>>>           {.frequency = 1200 * 1000,      .cpu_volt = 1175 * 1000,
> >>>> 
> >>>> .logic_volt = 1200 * 1000},//1.100V/1.050V
> >>>> 
> >>>>           {.frequency = 1272 * 1000,      .cpu_volt = 1225 * 1000,
> >>>> 
> >>>> .logic_volt = 1200 * 1000},//1.150V/1.100V
> >>>> 
> >>>>           {.frequency = 1416 * 1000,      .cpu_volt = 1300 * 1000,
> >>>> 
> >>>> .logic_volt = 1200 * 1000},//1.225V/1.100V
> >>>> 
> >>>>           {.frequency = 1512 * 1000,      .cpu_volt = 1350 * 1000,
> >>>> 
> >>>> .logic_volt = 1250 * 1000},//1.300V/1.150V
> >>>> 
> >>>>           {.frequency = 1608 * 1000,      .cpu_volt = 1425 * 1000,
> >>>> 
> >>>> .logic_volt = 1300 * 1000},//1.325V/1.175V
> >>>> 
> >>>>           {.frequency = CPUFREQ_TABLE_END},
> >>>> 
> >>>> };
> >>>> 
> >>>>    This table is made base on mass stress test. So is a safe opp
> >>>>    table
> >>>>    for
> >>>> 
> >>>> most rk3066a base boards. But it some
> >>>> 
> >>>>    board is not so well in power supply circuit design, the may also
> >>>>    need to
> >>>> 
> >>>> adjust it.
> >>>> 
> >>>>    From the table we see that the logic_voltage need to increase  as
> >>>>    the
> >>>> 
> >>>> cpufreq increase. But it seems that the current mainline kernel does
> >>>> not
> >>>> support adjust the logic voltage when cpufreq change. So we can only
> >>>> scale the cpufreq to 1.4GHZ by fixed the logic_volt at 1.2V.
> >>>> 
> >>>>    If you like, I can move it to rk3066a.dtsi with the max freq at
> >>>>    1008MHZ, as>>
> >>>> 
> >>>> I haven't  test to 1.4GHZ  with the mainline kernel. Or give me some
> >>>> time to test to see if the rayeager board can run to 1.4G stable with
> >>>> the mainline .
> >>>> 
> >>     I have run Rayeager  board with cpufreq freely change from
> >> 
> >> 312MHZ~1416MHZ for 11 hours now, it's stable. Maybe we can set the
> >> default opp table for rk3066a/PX2 from 312MHZ~1416HZ in current
> >> mainline.
> > 
> > Thanks for doing that stress test and making that the default setting
> > would be a nice way to go :-) .
> > 
> > I just checked, the other 2 rk3066a boards we currently support (Hayou
> > Marsboard and BQ Curie2) use the exact same power-layout (tps65210 +
> > pwm-
> > regulator for vdd_log), so should be quite save to do.
> > 
> > 
> > Heiko
> > Heiko
> 
>    Actually, all the rockchip rk3066 base platform use the same power
> supply design( control vdd_logic voltage by pwm).
>    So I can move the opp table with max freq 1416MHZ to rk3066a.dtsi and
> keep the pwm-regulator in board specific dts?

Yep, opp in dtsi and pwm-regulator in board files is the correct split.

I.e. that the pwm3 is hooked up to vdd_log is still a board-specific setup as 
there is a tiny chance that some (or future) board might diverge from that.
For the same reason we're having the nearly same setup for the act8846 in 
most board files and not in the core dtsi.


Heiko

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

^ permalink raw reply	[flat|nested] 12+ 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; 12+ 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] 12+ messages in thread

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

Thread overview: 12+ 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 13:20       ` Andy Yan
     [not found]         ` <5697A081.4060903-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-01-14 13:50           ` Eddie Cai
     [not found]             ` <CANCyOWak0wMNRPxkJtE2DJ1UvCneWxuNXjwjxjM3+_Jjuaahvw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-15  1:11               ` Andy Yan
     [not found]                 ` <56984734.6000806-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-01-15  9:22                   ` Heiko Stuebner
2016-01-15  9:34                     ` Andy Yan
     [not found]                       ` <5698BD27.3050700-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-01-15  9:58                         ` 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).