mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Yashin <dmt.yashin@gmail.com>
To: Hugo VALTIER <hugo@ahdrone.com>
Cc: linux-gpio@vger.kernel.org, linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Luca Ceresoli <luca.ceresoli@bootlin.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Linus Walleij <linus.walleij@linaro.org>,
	Heiko Stuebner <heiko@sntech.de>,
	Dmitry Yashin <dmt.yashin@gmail.com>
Subject: Re: [PATCH 3/3] pinctrl: rockchip: add support for RK3308B SoC
Date: Tue, 21 Jul 2026 19:48:04 +0500	[thread overview]
Message-ID: <816442c5-88fe-49b6-92a3-cf924c056ae8@gmail.com> (raw)
In-Reply-To: <20260717075918.1869879-4-hugo@ahdrone.com>


On 7/17/26 12:59, Hugo VALTIER wrote:
> The RK3308B is a revision of the RK3308 including different iomux
> register layout.
> Several pins (GPIO2_A2, GPIO2_A3, GPIO2_C0, GPIO3_B2, GPIO3_B3)
> have 3-bit mux fields in new GRF registers (SOC_CON13 at 0x608 and
> SOC_CON15 at 0x610) that override the standard 2-bit fields.
> I believe the bootloader sets the sel_src_ctrl bits to activate these
> new registers, which causes the kernel's writes to the old 2-bit iomux
> registers to be silently ignored.
> 
> Without this patch, SPI1, I2C3, and other peripherals that depend on
> these pins are completely non-functional on my RK3308B boards.
> 
> Detect the SoC variant at runtime by reading the chip_id register at GRF
> offset 0x800 (0xcea = RK3308, 0x3308/0x3308c = RK3308B), as requested
> by reviewers of the earlier series.
> When RK3308B is detected, swap in the correct mux_recalced and mux_route
> tables and write the sel_src_ctrl bits to ensure the 3-bit mux registers
> are active.
> 
> This is a rework of Dmitry Yashin's series [1] which used a separate
> device tree compatible string ("rockchip,rk3308b-pinctrl") to
> distinguish the variants.
> Reviewers Luca Ceresoli and Heiko Stuebner agreed that runtime detection
> was preferable since boards are manufactured with both RK3308 and RK3308B
> using the same device tree.
> 
> Jonas Karlman implemented runtime detection based on the GRF_CHIP_ID
> register [2]. Reviewers asked for more changes (constifying some
> arrays), but the series was never resubmitted and was dropped.
> 
> I run this patch on my Rock Pi S boards, the newer ones I've got in
> 2024 use the RK3308B. And thanks to runtime detection we should still
> be compatible with older devices (but I couldn't test on RK3308 as I
> don't have any).
> 
> [1] https://lore.kernel.org/all/20240515121634.23945-1-dmt.yashin@gmail.com/
> [2] https://lore.kernel.org/all/20240604141020.21725-1-dmt.yashin@gmail.com/
> 
> Signed-off-by: Hugo VALTIER <hugo@ahdrone.com>
> ---

Hi Hugo.

Thanks for re-sending the series!
Applied patches to multiple boards and it fixes pinmux
issues for rk3308b-s based boards too (since the approach 
kept the same as in v3 series)

Tested-by: Dmitry Yashin <dmt.yashin@gmail.com>

-- 
Dmt-Y


  reply	other threads:[~2026-07-21 14:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17  7:59 [PATCH 0/3] " Hugo VALTIER
2026-07-17  7:59 ` [PATCH 1/3] pinctrl: rockchip: constify mux recalced and route data arrays Hugo VALTIER
2026-07-17  7:59 ` [PATCH 2/3] pinctrl: rockchip: extract iomux_recalced_routes_init() Hugo VALTIER
2026-07-17  7:59 ` [PATCH 3/3] pinctrl: rockchip: add support for RK3308B SoC Hugo VALTIER
2026-07-21 14:48   ` Dmitry Yashin [this message]
2026-07-24 22:13 ` [PATCH 0/3] " Linus Walleij
2026-07-29 10:22   ` 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=816442c5-88fe-49b6-92a3-cf924c056ae8@gmail.com \
    --to=dmt.yashin@gmail.com \
    --cc=heiko@sntech.de \
    --cc=hugo@ahdrone.com \
    --cc=jonas@kwiboo.se \
    --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=luca.ceresoli@bootlin.com \
    /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®