From: sashiko-bot@kernel.org
To: "Jonas Karlman" <jonas@kwiboo.se>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 2/8] ARM: dts: rockchip: Add support for RK3506
Date: Fri, 20 Nov 2026 15:21:15 +0000 [thread overview]
Message-ID: <sashiko-outbox-225450@kernel.org> (raw)
In-Reply-To: <20261119152055.556266-3-jonas@kwiboo.se>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] ARM: dts: rockchip: rk3506 pinctrl syscon properties mismatch
driver
--
commit 0d85ace454fdd5b29f4d3efc2ed9fcf711e63afd
Author: Jonas Karlman <jonas@kwiboo.se>
ARM: dts: rockchip: Add support for RK3506
This commit adds the initial SoC and pinctrl devicetree files for the
Rockchip RK3506 SoC.
> diff --git a/arch/arm/boot/dts/rockchip/rk3506.dtsi b/arch/arm/boot/dts/rockchip/rk3506.dtsi
> new file mode 100644
> index 0000000000000..d8e942e6d0b1d
> --- /dev/null
> +++ b/arch/arm/boot/dts/rockchip/rk3506.dtsi
> @@ -0,0 +1,540 @@
[ ... ]
> + pinctrl: pinctrl {
> + compatible = "rockchip,rk3506-pinctrl";
> + rockchip,grf = <&gpio234_ioc>;
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
> +
> + gpio0: gpio@ff940000 {
> + compatible = "rockchip,gpio-bank";
> + reg = <0xff940000 0x200>;
> + clocks = <&cru PCLK_GPIO0>, <&cru DBCLK_GPIO0>;
> + gpio-controller;
> + #gpio-cells = <2>;
> + interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + rockchip,grf = <&gpio0_ioc>;
> + };
> +
> + gpio1: gpio@ff870000 {
> + compatible = "rockchip,gpio-bank";
> + reg = <0xff870000 0x200>;
> + clocks = <&cru PCLK_GPIO1>, <&cru DBCLK_GPIO1>;
> + gpio-controller;
> + #gpio-cells = <2>;
> + interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + rockchip,grf = <&gpio1_ioc>;
> + };
[Severity: High]
Does omitting rockchip,pmu and rockchip,ioc1 on the parent pinctrl node
leave info->regmap_pmu and info->regmap_ioc1 NULL in the pinctrl driver?
rockchip_pinctrl_probe() populates info->regmap_pmu and info->regmap_ioc1
from rockchip,pmu and rockchip,ioc1 on the parent pinctrl node, while the
per-bank rockchip,grf properties on gpio0 and gpio1 populate
bank->regmap_ioc. However, the RK3506 callbacks in the driver ignore
bank->regmap_ioc and use info->regmap_pmu and info->regmap_ioc1 directly:
drivers/pinctrl/pinctrl-rockchip.c:rockchip_set_mux() {
...
if (bank->regmap_ioc)
regmap = bank->regmap_ioc;
...
if (ctrl->type == RK3506) {
if (bank->bank_num == 1)
regmap = info->regmap_ioc1;
else if (bank->bank_num == 4)
return 0;
}
...
}
drivers/pinctrl/pinctrl-rockchip.c:rk3506_calc_pull_reg_and_bit() {
...
switch (bank->bank_num) {
case 0:
*regmap = info->regmap_pmu;
...
case 1:
*regmap = info->regmap_ioc1;
...
}
rk3506_calc_drv_reg_and_bit(), rk3506_calc_schmitt_reg_and_bit(), and
rockchip_get_mux() do the same. When a board enables pinconf on bank 0
(such as uart0 with uart0_xfer) or pinmux/pinconf on bank 1, the driver
passes a NULL regmap pointer to regmap_update_bits() or regmap_read(),
causing a NULL pointer dereference during boot.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261119152055.556266-1-jonas@kwiboo.se?part=2
next prev parent reply other threads:[~2026-11-20 15:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 15:20 [PATCH 0/8] ARM: dts: rockchip: Add Luckfox Lyra boards Jonas Karlman
2026-11-19 15:20 ` [PATCH 1/8] dt-bindings: soc: rockchip: grf: Add RK3506 compatibles Jonas Karlman
2026-11-19 15:20 ` [PATCH 2/8] ARM: dts: rockchip: Add support for RK3506 Jonas Karlman
2026-11-20 15:21 ` sashiko-bot [this message]
2026-11-19 15:20 ` [PATCH 3/8] dt-bindings: arm: rockchip: Add Luckfox Lyra and Lyra Plus Jonas Karlman
2026-11-19 15:20 ` [PATCH 4/8] ARM: dts: rockchip: Add Luckfox Lyra and Lyra Plus boards Jonas Karlman
2026-11-20 15:21 ` sashiko-bot
2026-11-19 15:20 ` [PATCH 5/8] dt-bindings: arm: rockchip: Add Luckfox Lyra Ultra Jonas Karlman
2026-11-19 15:20 ` [PATCH 6/8] ARM: dts: rockchip: Add Luckfox Lyra Ultra board Jonas Karlman
2026-11-19 15:20 ` [PATCH 7/8] dt-bindings: arm: rockchip: Add Luckfox Lyra Zero W Jonas Karlman
2026-11-19 15:20 ` [PATCH 8/8] ARM: dts: rockchip: Add Luckfox Lyra Zero W board Jonas Karlman
2026-11-20 15:21 ` sashiko-bot
2026-11-20 2:53 ` [PATCH 0/8] ARM: dts: rockchip: Add Luckfox Lyra boards Chaoyi Chen
2026-11-20 3:02 ` Chaoyi Chen
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=sashiko-outbox-225450@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jonas@kwiboo.se \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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