From: Chris Morgan <macromorgan@hotmail.com>
To: Kever Yang <kever.yang@rock-chips.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Chris Morgan <macroalpha82@gmail.com>,
u-boot@lists.denx.de, heiko@sntech.de, sjg@chromium.org,
philipp.tomsich@vrull.eu, chenjh@rock-chips.com,
pgwipeout@gmail.com, heiko.stuebner@theobroma-systems.com
Subject: Re: [PATCH V2 1/9] gpio: gpio-rockchip: parse gpio-ranges for bank id
Date: Thu, 2 Mar 2023 07:59:43 -0600 [thread overview]
Message-ID: <SN6PR06MB5342076390F8A68CBDCE34BFA5B29@SN6PR06MB5342.namprd06.prod.outlook.com> (raw)
In-Reply-To: <eb0912d6-8855-1266-124c-c330758ffcef@rock-chips.com>
On Thu, Mar 02, 2023 at 10:54:57AM +0800, Kever Yang wrote:
> Hi Linus,
>
> On 2023/2/23 16:59, Linus Walleij wrote:
> > On Mon, Feb 13, 2023 at 11:28 PM Chris Morgan <macroalpha82@gmail.com> wrote:
> >
> > > From: Chris Morgan <macromorgan@hotmail.com>
> > >
> > > Use the new devicetree property of gpio-ranges to determine the GPIO
> > > bank ID. Preserve the "old" way of doing things too, so that boards
> > > can be migrated and tested gradually (I only have a 3566 and 3326 to
> > > test).
> > >
> > > Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
> > gpio-ranges are not supposed to be used like this, because there is
> > no semantic restrictions on how gpio-ranges are set up. For example:
> >
> > gpio-ranges = <&pfc 0 0 32>;
> >
> > that looks nice for this usecase, and I guess this is something
> > like what you have but then look at this from arch/arm/boot/dts/hi3620.dtsi:
> >
> > gpio-ranges = < &pmx0 0 14 1 &pmx0 1 15 1 &pmx0 2 16 1
> > &pmx0 3 16 1 &pmx0 4 16 1 &pmx0 5 16 1
> > &pmx0 6 16 1 &pmx0 7 16 1>;
>
> I can understand the gpio-ranges and pinctrl framework are flexible enough
> for different hardware.
>
> Rockchip SoC do not have this kind of GPIO/PINMUX hardware, one bank GPIO is
> always
>
> in one pinctrl/ioc for now, so this driver do work for rockchip platform in
> U-Boot for now.
>
>
> Thanks,
>
> - Kever
I think I jumped the gun (sorry, just anxious to get my hardware supported)
and it looks like Linux is going in a different direction. I'm going to work
with this for now, but once Linux decides on a correct direction I'll update
the driver in U-Boot to match the Linux behavior.
Thank you.
>
> >
> > This is perfectly fine as well. Ranges can start anywhere in the hardware
> > offsets and go anywhere, and be set up in smaller chunks however
> > the author of the DTS file wants it.
> >
> > I am pretty sure the same discontiguous
> > ranges can be encoded into the rk_gpio relevant DTS files as well,
> > so this is not a good solution to your problem.
> >
> > What has been used in the past is just some unique hardware ID in the
> > device tree, so I would just add that.
> >
> > Yours,
> > Linus Walleij
next prev parent reply other threads:[~2023-03-02 18:20 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 22:27 [PATCH V2 0/9] Rockchip: Improve Support for RK3566 Devices Chris Morgan
2023-02-13 22:27 ` [PATCH V2 1/9] gpio: gpio-rockchip: parse gpio-ranges for bank id Chris Morgan
2023-02-22 7:44 ` Kever Yang
2023-02-22 10:59 ` Johan Jonker
2023-02-23 8:59 ` Linus Walleij
2023-03-02 2:54 ` Kever Yang
2023-03-02 13:59 ` Chris Morgan [this message]
2023-02-13 22:27 ` [PATCH V2 2/9] dts: rockchip: px30: add gpio-ranges property to gpio nodes Chris Morgan
2023-02-22 7:44 ` Kever Yang
2023-02-13 22:27 ` [PATCH V2 3/9] rockchip: vop2: Add vop2 dt-binding from Linux Chris Morgan
2023-02-13 22:27 ` [PATCH V2 4/9] arm64: dts: rockchip: Sync rk356x from Linux main Chris Morgan
2023-02-15 18:44 ` Jonas Karlman
2023-02-22 7:32 ` Kever Yang
2023-02-13 22:27 ` [PATCH V2 5/9] rockchip: rk3568: add boot device detection Chris Morgan
2023-02-15 18:28 ` Jonas Karlman
2023-02-22 7:45 ` Kever Yang
2023-02-13 22:27 ` [PATCH V2 6/9] rockchip: rk3568: enable automatic power savings Chris Morgan
2023-02-22 7:34 ` Kever Yang
2023-02-13 22:27 ` [PATCH V2 7/9] gpio/rockchip: rk_gpio support v2 gpio controller Chris Morgan
2023-02-16 11:19 ` FUKAUMI Naoki
2023-02-22 7:49 ` Kever Yang
2023-02-22 8:28 ` Kever Yang
2023-02-23 22:14 ` Vasily Khoruzhick
2023-03-01 8:25 ` Eugen Hristev
2023-03-01 15:02 ` Simon Glass
2023-02-13 22:27 ` [PATCH V2 8/9] arm64: dts: rockchip: add gpio-ranges property to gpio nodes Chris Morgan
2023-02-22 7:47 ` Kever Yang
2023-02-23 21:12 ` Vasily Khoruzhick
2023-02-28 11:26 ` Quentin Schulz
2023-03-02 2:49 ` Kever Yang
2023-03-07 19:14 ` Vasily Khoruzhick
2023-02-13 22:27 ` [PATCH V2 9/9] evb1-v10-rk3568: Update MAINTAINERS and documentation Chris Morgan
2023-02-22 7:48 ` Kever Yang
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=SN6PR06MB5342076390F8A68CBDCE34BFA5B29@SN6PR06MB5342.namprd06.prod.outlook.com \
--to=macromorgan@hotmail.com \
--cc=chenjh@rock-chips.com \
--cc=heiko.stuebner@theobroma-systems.com \
--cc=heiko@sntech.de \
--cc=kever.yang@rock-chips.com \
--cc=linus.walleij@linaro.org \
--cc=macroalpha82@gmail.com \
--cc=pgwipeout@gmail.com \
--cc=philipp.tomsich@vrull.eu \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/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;
as well as URLs for NNTP newsgroup(s).