Linux GPIO subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/3] pinctrl: rockchip: add support for RK3308B SoC
@ 2026-07-17  7:59 Hugo VALTIER
  2026-07-17  7:59 ` [PATCH 1/3] pinctrl: rockchip: constify mux recalced and route data arrays Hugo VALTIER
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Hugo VALTIER @ 2026-07-17  7:59 UTC (permalink / raw)
  To: Linus Walleij, Heiko Stuebner
  Cc: Hugo VALTIER, linux-gpio, linux-rockchip, linux-arm-kernel,
	linux-kernel, Dmitry Yashin, Luca Ceresoli, Jonas Karlman

The RK3308B is a silicon revision of the RK3308 with a different iomux
register layout: several pins (GPIO2_A2, GPIO2_A3, GPIO2_C0, GPIO3_B2,
GPIO3_B3) gained 3-bit mux fields in new GRF registers that override
the original 2-bit fields. I believe the bootloader enables the new
registers via the sel_src_ctrl bits, after which the kernel's writes
to the old iomux registers are silently ignored. Whatever the exact
mechanism, on RK3308B boards (e.g. current Radxa ROCK Pi S revisions)
SPI1, I2C3 and other peripherals on the affected pins are
non-functional without this series.

This is a continuation of Dmitry Yashin's series from 2024 [1], which
was never resubmitted after review and got dropped. Following the
reviewers' feedback on that series:

- the separate "rockchip,rk3308b-pinctrl" DT compatible is gone;
  the variant is detected at runtime from the GRF chip_id register,
  as suggested by Luca Ceresoli and Heiko Stuebner and prototyped by
  Jonas Karlman [2], so the same DT works on both variants (boards
  ship with either chip)
- the mux_recalced/mux_route tables are constified (patch 1)

Patch 2 is a small refactor so the SoC-specific init can swap the mux
tables before the per-bank masks are computed.

Tested on ROCK Pi S boards with RK3308B silicon, where this fixes
previously dead SPI1. I don't have original-RK3308 hardware, so that
path is compile-tested only; the tables used for RK3308 are unchanged.

[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/

Hugo VALTIER (3):
  pinctrl: rockchip: constify mux recalced and route data arrays
  pinctrl: rockchip: extract iomux_recalced_routes_init()
  pinctrl: rockchip: add support for RK3308B SoC

 drivers/pinctrl/pinctrl-rockchip.c | 266 ++++++++++++++++++++++++++---
 drivers/pinctrl/pinctrl-rockchip.h |   5 +-
 2 files changed, 250 insertions(+), 21 deletions(-)


base-commit: a13c140cc289c0b7b3770bce5b3ad42ab35074aa
-- 
2.55.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-07-29 10:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-17  7:59 [PATCH 0/3] pinctrl: rockchip: add support for RK3308B SoC 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
2026-07-24 22:13 ` [PATCH 0/3] " Linus Walleij
2026-07-29 10:22   ` Heiko Stübner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox