[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <91640f9b-d219-553e-043a-c6151f2f68d7@ysoft.com>
Date: Thu, 22 Nov 2018 15:42:14 +0000
From: Vokáč Michal <Michal.Vokac@...ft.com>
To: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>,
Lothar Waßmann <LW@...O-electronics.de>,
Thierry Reding <thierry.reding@...il.com>
CC: Mark Rutland <mark.rutland@....com>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-pwm@...r.kernel.org" <linux-pwm@...r.kernel.org>,
Lukasz Majewski <l.majewski@...ess.pl>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Rob Herring <robh+dt@...nel.org>,
"kernel@...gutronix.de" <kernel@...gutronix.de>,
Fabio Estevam <fabio.estevam@....com>,
Linus Walleij <linus.walleij@...aro.org>,
viresh kumar <viresh.kumar@...aro.org>
Subject: Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled
state
On 16.11.2018 09:25, Uwe Kleine-König wrote:
> On Fri, Nov 16, 2018 at 08:34:30AM +0100, Lothar Waßmann wrote:
>> Uwe Kleine-König <u.kleine-koenig@...gutronix.de> wrote:
>>> On Thu, Nov 15, 2018 at 04:25:45PM +0100, Thierry Reding wrote:
>>>> On Wed, Nov 14, 2018 at 10:51:20PM +0100, Uwe Kleine-König wrote:
>>>>> On Wed, Nov 14, 2018 at 12:34:49PM +0100, Thierry Reding wrote:
>> [...]
>>>>> Also dts writes don't need to lookup the needed GPIO numbers and pinctrl.
>>>>
>>>> Just to clarify: I don't think that we need to get the GPIO number
>>>> involved in this case, because we don't have to reconfigure the pin as
>>>> GPIO to make this work. The only reason that Michal's proposal did that
>>>> is because that was believed to be necessary. But if the pin can just be
>>>> configured with a 100k pull-up, that's enough to pull the pin high when
>>>> we need it.
Thierry, I have to disagree here. I do not really know how to activate
the internal pull-up without requesting the GPIO and configuring the pin
as *input*. And to do it the GPIO number needs to be specified in DT.
>>> Unless the gpio happens to be configured as output at the wrong value.
>>> Further I'm not sure if the pwm in disabled state actively pulls to 0
>>> and if in this state the PU of the pin is good enough to ensure a one
>>> here. That would need verification first.
>>
>> No. You can disable the output driver via pinctrl, so that only the
>> selected pull-up/down is relevant. The pin function and GPIO register
>> settings don't matter at all in this case.
Lothar, please can you be more specific how would you do that? IFAIK the
pull-up/down internal resistors have effect only if the pin is configured
as GPIO *input* (on i.MX6 at least). See the TRM, 29.4.2.2 Output driver:
"Internal pull-up, pull-down resistors, and pad keeper are disabled in
output mode."
> Is this about DSE=HI-Z in the pad control register? I didn't know about
> this. I see this exists on i.MX6 but not on i.MX25. Also i.MX51 doesn't
> seem to have this feature.
Uwe, I also did not find the DSE option on other SoCs in their respective
manuals and source code. But even if it would be available on all SoCs
I still think it is not enough.
Best regards,
Michal
Powered by blists - more mailing lists