From: "Heiko Stübner" <heiko@sntech.de>
To: Yao Zi <ziyao@disroot.org>, Jonas Karlman <jonas@kwiboo.se>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org,
linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/7] arm64: dts: rockchip: Add pinctrl and gpio nodes for RK3528
Date: Sun, 02 Mar 2025 12:52:18 +0100 [thread overview]
Message-ID: <116104909.nniJfEyVGO@diego> (raw)
In-Reply-To: <3f0cd767-1fd8-4c65-b8b4-e948288cd02a@kwiboo.se>
Am Sonntag, 2. März 2025, 12:14:48 MEZ schrieb Jonas Karlman:
> Hi Yao Zi,
>
> On 2025-02-28 11:46, Yao Zi wrote:
> > On Fri, Feb 28, 2025 at 06:40:10AM +0000, Jonas Karlman wrote:
> >> Add pinctrl and gpio nodes for RK3528 and import rk3528-pinctrl.dtsi
> >> from vendor linux-6.1-stan-rkr5 kernel with the hdmi-pins-idle node
> >> removed due to missing label reference to pcfg_output_low_pull_down.
> >>
> >> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
> >> ---
> >> This was mostly imported from vendor kernel, however the main commit [1]
> >> list 28 signed-off-by tags, unclear who I should use as author and what
> >> signed-off-by tags to include.
> >>
> >> [1] https://github.com/rockchip-linux/kernel/commit/c17d6325959f0ec1af901e8a17919163454190a2
> >> ---
> >> .../boot/dts/rockchip/rk3528-pinctrl.dtsi | 1397 +++++++++++++++++
> >> arch/arm64/boot/dts/rockchip/rk3528.dtsi | 82 +
> >> 2 files changed, 1479 insertions(+)
> >> create mode 100644 arch/arm64/boot/dts/rockchip/rk3528-pinctrl.dtsi
> >>
> >
> >> diff --git a/arch/arm64/boot/dts/rockchip/rk3528.dtsi b/arch/arm64/boot/dts/rockchip/rk3528.dtsi
> >> index 0fb90f5c291c..d3e2a64ff2d5 100644
> >> --- a/arch/arm64/boot/dts/rockchip/rk3528.dtsi
> >> +++ b/arch/arm64/boot/dts/rockchip/rk3528.dtsi
> >> @@ -4,8 +4,10 @@
> >> * Copyright (c) 2024 Yao Zi <ziyao@disroot.org>
> >> */
> >>
> >> +#include <dt-bindings/gpio/gpio.h>
> >> #include <dt-bindings/interrupt-controller/arm-gic.h>
> >> #include <dt-bindings/interrupt-controller/irq.h>
> >> +#include <dt-bindings/pinctrl/rockchip.h>
> >> #include <dt-bindings/clock/rockchip,rk3528-cru.h>
> >> #include <dt-bindings/reset/rockchip,rk3528-cru.h>
> >>
> >> @@ -17,6 +19,11 @@ / {
> >> #size-cells = <2>;
> >>
> >> aliases {
> >> + gpio0 = &gpio0;
> >> + gpio1 = &gpio1;
> >> + gpio2 = &gpio2;
> >> + gpio3 = &gpio3;
> >> + gpio4 = &gpio4;
> >> serial0 = &uart0;
> >> serial1 = &uart1;
> >> serial2 = &uart2;
> >> @@ -166,6 +173,11 @@ cru: clock-controller@ff4a0000 {
> >> #reset-cells = <1>;
> >> };
> >>
> >> + ioc_grf: syscon@ff540000 {
> >> + compatible = "rockchip,rk3528-ioc-grf", "syscon";
> >> + reg = <0x0 0xff540000 0x0 0x40000>;
> >> + };
> >> +
> >> uart0: serial@ff9f0000 {
> >> compatible = "rockchip,rk3528-uart", "snps,dw-apb-uart";
> >> reg = <0x0 0xff9f0000 0x0 0x100>;
> >> @@ -264,5 +276,75 @@ saradc: adc@ffae0000 {
> >> #io-channel-cells = <1>;
> >> status = "disabled";
> >> };
> >> +
> >> + pinctrl: pinctrl {
> >> + compatible = "rockchip,rk3528-pinctrl";
> >> + rockchip,grf = <&ioc_grf>;
> >> + #address-cells = <2>;
> >> + #size-cells = <2>;
> >> + ranges;
> >
> > I doubt whether the pincontroller should be placed under simple-bus:
> > without a reg property, it doesn't look like a MMIO device.
> >
> > Actually it is, although all the registers stay in the ioc grf. Maybe
> > it should be considered as child of the grf.
>
> This follows how pinctrl was added for RK3576 and what is proposed for
> RK3562 [2]. I have too little knowledge to know if this needs to change
> or if this should follow similar SoCs.
>
> [2] https://lore.kernel.org/r/20250227111913.2344207-15-kever.yang@rock-chips.com
The reg address shouldn't matter here I think.
The "soc"-bus describes the elements contained in the soc (surrounding the
cpu cores) and the pinctrl controller definitly is part of the soc itself.
So when looking at the scope, it does belong there and also the
gpio-controller elements do have mmio addresses :-)
Heiko
next prev parent reply other threads:[~2025-03-02 11:52 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-28 6:40 [PATCH 0/7] rockchip: Add support for leds and user button on Radxa E20C Jonas Karlman
2025-02-28 6:40 ` [PATCH 1/7] dt-bindings: soc: rockchip: Add RK3528 ioc grf syscon Jonas Karlman
2025-02-28 18:39 ` Conor Dooley
2025-02-28 6:40 ` [PATCH 2/7] dt-bindings: pinctrl: Add pinctrl support for RK3528 Jonas Karlman
2025-02-28 7:53 ` Heiko Stübner
2025-02-28 18:39 ` Conor Dooley
2025-02-28 6:40 ` [PATCH 3/7] pinctrl: rockchip: Add " Jonas Karlman
2025-02-28 7:56 ` Heiko Stübner
2025-03-17 7:00 ` Chukun Pan
2025-03-17 8:01 ` Jonas Karlman
2025-02-28 6:40 ` [PATCH 4/7] arm64: dts: rockchip: Add pinctrl and gpio nodes " Jonas Karlman
2025-02-28 10:46 ` Yao Zi
2025-03-02 11:14 ` Jonas Karlman
2025-03-02 11:52 ` Heiko Stübner [this message]
2025-03-02 16:09 ` Yao Zi
2025-02-28 6:40 ` [PATCH 5/7] arm64: dts: rockchip: Add uart0 pinctrl to Radxa E20C Jonas Karlman
2025-02-28 6:40 ` [PATCH 6/7] arm64: dts: rockchip: Add user button " Jonas Karlman
2025-02-28 6:40 ` [PATCH 7/7] arm64: dts: rockchip: Add gpio-leds node " Jonas Karlman
2025-03-04 7:51 ` [PATCH 0/7] rockchip: Add support for leds and user button on " Linus Walleij
2025-03-04 12:02 ` (subset) " Heiko Stuebner
2025-03-04 18:13 ` Jonas Karlman
2025-03-04 18:27 ` Heiko Stübner
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=116104909.nniJfEyVGO@diego \
--to=heiko@sntech.de \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jonas@kwiboo.se \
--cc=krzk+dt@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=robh@kernel.org \
--cc=ziyao@disroot.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;
as well as URLs for NNTP newsgroup(s).