public inbox for linux-rockchip@lists.infradead.org
 help / color / mirror / Atom feed
From: Andy Yan <andy.yan-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
To: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH] arm: dts: fix rk3066a based boards vdd_log voltage initialization
Date: Mon, 19 Sep 2016 17:59:32 +0800	[thread overview]
Message-ID: <2e142e7a-1b53-b251-bc7d-56d27258ee53@rock-chips.com> (raw)
In-Reply-To: <20160919114438.0f702782@bbrezillon>

Hi Boris:


On 2016年09月19日 17:44, Boris Brezillon wrote:
> On Mon, 19 Sep 2016 17:38:10 +0800
> Andy Yan <andy.yan@rock-chips.com> wrote:
>
>> On 2016年09月19日 17:25, Boris Brezillon wrote:
>>> On Mon, 19 Sep 2016 16:44:56 +0800
>>> Andy Yan <andy.yan@rock-chips.com> wrote:
>>>   
>>>> The current rk3066a based boards(Rayeager, Bqcurie2, Marsboard) use
>>>> pwm modulate vdd_logic voltage, but the pwm is default disabled and
>>>> the pwm pin acts as a gpio before pwm regulator probed, so the pwm
>>>> regulator driver will get a zero dutycycle at probe time, so change
>>>> the initial dutycycle to zero to match pwm_regulator_init_state check.
>>>>
>>>> Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
>>>>
>>>> ---
>>>>
>>>>    arch/arm/boot/dts/rk3066a-bqcurie2.dts  | 2 +-
>>>>    arch/arm/boot/dts/rk3066a-marsboard.dts | 2 +-
>>>>    arch/arm/boot/dts/rk3066a-rayeager.dts  | 2 +-
>>>>    3 files changed, 3 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/arch/arm/boot/dts/rk3066a-bqcurie2.dts b/arch/arm/boot/dts/rk3066a-bqcurie2.dts
>>>> index bc674ee..618450d 100644
>>>> --- a/arch/arm/boot/dts/rk3066a-bqcurie2.dts
>>>> +++ b/arch/arm/boot/dts/rk3066a-bqcurie2.dts
>>>> @@ -61,7 +61,7 @@
>>>>    		regulator-min-microvolt = <1200000>;
>>>>    		regulator-max-microvolt = <1200000>;
>>>>    		regulator-always-on;
>>>> -		voltage-table = <1000000 100>,
>>>> +		voltage-table = <1000000 0>,
>>>>    				<1200000 42>;
>>> So, it seems you are reversing the PWM polarity here. Are you sure you
>>> shouldn't change the 2nd entry of this table (<1200000 58>)?
>>
>>       no, 42% duty cycle give a stable 1.2v vdd_logic voltage on my
>> board. As i explained in the commit, the pwm was default at a disabled
>> state before regulator_register success at pwm_regulator probe, so
>> pwm_regulator_init_state  function will get  a zero dutycycle from
>> pwm_get_relative_dutycycle. I have to change the dutycycle of  fist
>> table to zero to match the following check, other wise the function will
>> return defualt value(-EINVAL), then the pwm regulator register failed.
> Is 0% duty really producing a 1V output, or are you just changing it to
> make it work?

     no, I'm not sure 0% duty is really producing a 1v output, maybe the 
100% duty producing a 1v output, I just changing it to make it work on 
your Patch. Before the pwm regulator registered success, the pwm output 
pin act as a stable gpio at a hight or low level(depends on the soc 
power on state) to control a 1v output.
>
> BTW, I'm not sure we should fail when the current PWM state does not
> match one of the value in the voltage-table.

         Yes, the previous version don't have the state check, so the 
regulator can register success.
>
>>>   
>>>>    		status = "okay";
>>>>    	};
>>>> diff --git a/arch/arm/boot/dts/rk3066a-marsboard.dts b/arch/arm/boot/dts/rk3066a-marsboard.dts
>>>> index a2b763e..ddc680b 100644
>>>> --- a/arch/arm/boot/dts/rk3066a-marsboard.dts
>>>> +++ b/arch/arm/boot/dts/rk3066a-marsboard.dts
>>>> @@ -59,7 +59,7 @@
>>>>    		regulator-min-microvolt = <1200000>;
>>>>    		regulator-max-microvolt = <1200000>;
>>>>    		regulator-always-on;
>>>> -		voltage-table = <1000000 100>,
>>>> +		voltage-table = <1000000 0>,
>>>>    				<1200000 42>;
>>>>    		status = "okay";
>>>>    	};
>>>> diff --git a/arch/arm/boot/dts/rk3066a-rayeager.dts b/arch/arm/boot/dts/rk3066a-rayeager.dts
>>>> index 2536b3a..30aee99 100644
>>>> --- a/arch/arm/boot/dts/rk3066a-rayeager.dts
>>>> +++ b/arch/arm/boot/dts/rk3066a-rayeager.dts
>>>> @@ -84,7 +84,7 @@
>>>>    		regulator-min-microvolt = <1200000>;
>>>>    		regulator-max-microvolt = <1200000>;
>>>>    		regulator-always-on;
>>>> -		voltage-table = <1000000 100>,
>>>> +		voltage-table = <1000000 0>,
>>>>    				<1200000 42>;
>>>>    		status = "okay";
>>>>    	};
>>>
>>>   
>>
>
> _______________________________________________
> 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

  reply	other threads:[~2016-09-19  9:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-19  8:43 [PATCH 0/1] fix rk3066a based boards boot issue on linux-4.8 Andy Yan
2016-09-19  8:44 ` [PATCH] arm: dts: fix rk3066a based boards vdd_log voltage initialization Andy Yan
2016-09-19  9:25   ` Boris Brezillon
2016-09-19  9:38     ` Andy Yan
2016-09-19  9:44       ` Boris Brezillon
2016-09-19  9:59         ` Andy Yan [this message]
2016-09-19 15:15   ` Doug Anderson
2016-09-19 16:15     ` Heiko Stuebner
2016-09-19 16:38       ` Doug Anderson
2016-09-19 17:13         ` Boris Brezillon
2016-09-19 17:22           ` Doug Anderson
2016-09-19 17:48             ` Boris Brezillon
2016-09-19 17:52               ` Doug Anderson
2016-09-19 18:06                 ` Boris Brezillon
2016-09-19 18:12                   ` Doug Anderson
2016-09-19 18:31                     ` Boris Brezillon
2016-09-19 20:43                     ` Boris Brezillon
2016-09-19 21:15                       ` Doug Anderson
2016-09-22 15:12                         ` Boris Brezillon
2016-09-22 16:47                           ` Mark Brown
     [not found]                             ` <20160922164752.GP7994-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-09-22 18:13                               ` Boris Brezillon
2016-09-22 19:26                                 ` Mark Brown
2016-09-19 17:25           ` Heiko Stuebner
2016-09-19  9:21 ` [PATCH 0/1] fix rk3066a based boards boot issue on linux-4.8 Boris Brezillon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2e142e7a-1b53-b251-bc7d-56d27258ee53@rock-chips.com \
    --to=andy.yan-tnx95d0mmh7dzftrwevzcw@public.gmane.org \
    --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox