diff mbox

[2/2] ARM: dts: rockchip: enable pwm3 as pwm regulator for rk3066a-rayeager board

Message ID 1452774956-16621-1-git-send-email-andy.yan@rock-chips.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andy Yan Jan. 14, 2016, 12:35 p.m. UTC
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(+)

Comments

Heiko Stuebner Jan. 14, 2016, 12:41 p.m. UTC | #1
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
Andy Yan Jan. 15, 2016, 10:41 a.m. UTC | #2
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-->
diff mbox

Patch

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";