From: Jonas Karlman <jonas@kwiboo.se>
To: Simon Glass <sjg@chromium.org>, Heiko Stuebner <heiko@sntech.de>
Cc: linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org,
Fabio Estevam <festevam@nabladev.com>,
linux-arm-kernel@lists.infradead.org,
Jeffy Chen <jeffy.chen@rock-chips.com>,
Linus Walleij <linusw@kernel.org>, huang lin <hl@rock-chips.com>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 04/12] pinctrl: rockchip: Add RV1106 pinctrl support
Date: Sun, 12 Jul 2026 19:55:01 +0200 [thread overview]
Message-ID: <e2ed95ee-8044-4a44-9775-9f36b10e727f@kwiboo.se> (raw)
In-Reply-To: <20260706195818.3906949-5-sjg@chromium.org>
Hi Simon,
On 7/6/2026 9:58 PM, Simon Glass wrote:
> Add pinctrl support for the Rockchip RV1106, taken from the vendor
> kernel in the Luckfox Pico SDK [1] at commit 824b817f8 (a Linux
> 5.10.160 kernel tree). The IOC registers are spread across several
> blocks, addressed through per-bank offsets, with the GPIO0 block in the
> PMU. The drive strength uses the RK3568-style exponential encoding.
>
> The RV1103 is a package variant of the RV1106 with fewer pins and uses
> the same pin controller.
>
> [1] https://github.com/LuckfoxTECH/luckfox-pico
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> drivers/pinctrl/pinctrl-rockchip.c | 208 +++++++++++++++++++++++++++++
> drivers/pinctrl/pinctrl-rockchip.h | 1 +
> 2 files changed, 209 insertions(+)
>
> diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
> index 7e0fcd45fd26..f9cbcb955853 100644
> --- a/drivers/pinctrl/pinctrl-rockchip.c
> +++ b/drivers/pinctrl/pinctrl-rockchip.c
> @@ -1725,6 +1725,166 @@ static int rv1103b_calc_schmitt_reg_and_bit(struct rockchip_pin_bank *bank,
> return 0;
> }
>
> +#define RV1106_DRV_BITS_PER_PIN 8
> +#define RV1106_DRV_PINS_PER_REG 2
> +#define RV1106_DRV_GPIO0_OFFSET 0x10
> +#define RV1106_DRV_GPIO1_OFFSET 0x80
> +#define RV1106_DRV_GPIO2_OFFSET 0x100C0
This, and remaining offsets, should likely be from the related GPIOx IOC
base and not from GPIO1 IOC base.
The regmap_base should likely only cover GPIO1 IOC, else it would cross
boundary into the GPIOx+1 controller regmap space.
See my review comment on pinctrl dt-bindings, we likely need to define
the IOC reg space for each GPIO controller for this SoC and adjust this
driver accordingly.
Possible something like following:
gpio2: gpio@ff540000 {
reg = <0xff540000 0x10c>, <0xff548000 0x8000>;
reg-names = "base", "ioc";
};
or
gpio2: gpio@ff540000 {
reg = <0xff540000 0x10c>;
rockchip,grf = <&gpio2_ioc>;
};
gpio2_ioc: syscon@ff548000 {
reg = <0xff548000 0x8000>;
};
Regards,
Jonas
> +#define RV1106_DRV_GPIO3_OFFSET 0x20100
> +#define RV1106_DRV_GPIO4_OFFSET 0x30020
[snip]
next prev parent reply other threads:[~2026-07-12 17:55 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 19:57 [PATCH 00/12] Add support for the Rockchip RV1106 and RV1103 Simon Glass
2026-07-06 19:57 ` [PATCH 01/12] dt-bindings: clock: rockchip: Add RV1106 CRU support Simon Glass
2026-07-10 19:36 ` Jonas Karlman
2026-07-06 19:57 ` [PATCH 02/12] clk: rockchip: Add clock controller for the RV1106 Simon Glass
2026-07-06 19:57 ` [PATCH 03/12] dt-bindings: pinctrl: rockchip: Add RV1106 compatible Simon Glass
2026-07-10 19:48 ` Jonas Karlman
2026-07-06 19:58 ` [PATCH 04/12] pinctrl: rockchip: Add RV1106 pinctrl support Simon Glass
2026-07-10 19:01 ` Linus Walleij
2026-07-12 17:00 ` Heiko Stübner
2026-07-12 17:55 ` Jonas Karlman [this message]
2026-07-06 19:58 ` [PATCH 05/12] dt-bindings: soc: rockchip: grf: Add RV1106 compatibles Simon Glass
2026-07-10 20:00 ` Jonas Karlman
2026-07-06 19:58 ` [PATCH 06/12] dt-bindings: serial: snps-dw-apb-uart: Add RV1106 compatible Simon Glass
2026-07-06 19:58 ` [PATCH 07/12] dt-bindings: mmc: rockchip-dw-mshc: " Simon Glass
2026-07-10 13:21 ` Ulf Hansson
2026-07-06 19:58 ` [PATCH 08/12] dt-bindings: watchdog: snps,dw-wdt: " Simon Glass
2026-07-12 15:26 ` Krzysztof Kozlowski
2026-07-06 19:58 ` [PATCH 09/12] dt-bindings: iio: adc: rockchip-saradc: " Simon Glass
2026-07-07 2:09 ` Jonathan Cameron
2026-07-08 10:45 ` Krzysztof Kozlowski
2026-07-06 19:58 ` [PATCH 10/12] ARM: dts: rockchip: Add support for RV1106 and RV1103 Simon Glass
2026-07-06 19:58 ` [PATCH 11/12] dt-bindings: arm: rockchip: Add Luckfox Pico Mini B Simon Glass
2026-07-06 19:58 ` [PATCH 12/12] ARM: dts: " Simon Glass
2026-07-06 22:54 ` [PATCH 00/12] Add support for the Rockchip RV1106 and RV1103 Fabio Estevam
2026-07-07 7:41 ` 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=e2ed95ee-8044-4a44-9775-9f36b10e727f@kwiboo.se \
--to=jonas@kwiboo.se \
--cc=devicetree@vger.kernel.org \
--cc=festevam@nabladev.com \
--cc=heiko@sntech.de \
--cc=hl@rock-chips.com \
--cc=jeffy.chen@rock-chips.com \
--cc=linusw@kernel.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=sjg@chromium.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
all inboxes | Powered by JetHome®