[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD6h2NSahYuqg1T2oW7tHmAeAfqircfeokYhvJYNRVi5TXEDAA@mail.gmail.com>
Date: Tue, 1 Nov 2022 14:20:27 +0800
From: Haojian Zhuang <haojian.zhuang@...aro.org>
To: "Marty E. Plummer" <hanetzer@...rtmail.com>
Cc: linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, tony@...mide.com,
linus.walleij@...aro.org
Subject: Re: pinconf-single: pinctrl-single,bias-pull{up,down} bits help/explanation
On Sun, 16 Oct 2022 at 20:14, Marty E. Plummer <hanetzer@...rtmail.com> wrote:
>
> Greetings.
>
> What I'm having issue with is the pinctrl-single,bias-pull values. From
> commit abe4e4675dfc62b7f2328e2c4bce8b5bdcdff7c0 I get a bit of it, and I
> think I have it mostly figured out:
>
> // <[input] [enabled] [disabled] [mask]>;
> pinctrl-single,bias-pullup = <? 1 0 0x100>;
> pinctrl-single,bias-pulldown = <? 1 0 0x200>;
>
> using mask 0x100 to single out bit 8 and mask 0x200 to single out bit 9,
> enable values being simple binary on/off. What I don't get is how the
> input value is determined/calculated.
>
> Aside from the above mentioned commit for the am335x-pocketbeagle.dts,
> which uses a differing pullup control scheme, the only users I can find
> in the tree are a handful of hisi socs which I don't have a datasheet
> for to map their usage to register definitions and puzzle this out.
>
Excuse me for just noticing the email.
#define PULL_DIS 0
#define PULL_UP 0x100
#define PULL_DOWN 0x200
// <[input] [enabled] [disabled] [mask]>
// If you want to pull-up, configure the pin as below.
pinctrl-single,bias-pullup = <PULL_UP PULL_UP 0 PULL_UP>
// If you want to disable pull-up, configure the pin as below.
pinctrl-single,bias-pullup = <0 PULL_UP 0 PULL_UP>
It seems that the pin configuration in am335x-pocketbeagle.dts is wrong.
But I don't have the board to verify it.
And you can check the logic in pcs_pinconf_set().
Best Regards
Haojian
Powered by blists - more mailing lists