mbox series

[0/3] pinctrl: rockchip: add rk3308b SoC support

Message ID 20240515121634.23945-1-dmt.yashin@gmail.com
Headers show
Series pinctrl: rockchip: add rk3308b SoC support | expand

Message

Dmitry Yashin May 15, 2024, 12:16 p.m. UTC
This patch series fixes iomux routes on rk3308 and adds support for
pin controller found on rk3308b. According to rk3308b TRM, this pinctrl
much the same as rk3308's, but with additional iomux routes and 3bit
iomuxes selected via gpio##_sel_src_ctrl registers.

Downstream kernel [1] managed this SoC's with rk3308b_soc_data_init,
wich picked configuration based on cpuid. Upstream pinctrl patches
droped soc init function.

The function rk3308b_soc_sel_src_init sets up gpio##_sel_src_ctrl
registers, making SoC to use 3bit iomuxes over some 2bit old ones.

These patches have been tested on Radxa's ROCK Pi S, one based on rk3308
and the other on rk3308b (from the latest batches). For the new boards
fixes broken spi1 clk.

Similar effort [2] was made several years ago, but without keeping base
rk3308 SoC pinctrl support.

[1] https://github.com/radxa/kernel/blob/stable-4.4-rockpis/drivers/pinctrl/pinctrl-rockchip.c#L4388
[2] https://lore.kernel.org/linux-rockchip/20220930102620.1568864-1-jay.xu@rock-chips.com/

Dmitry Yashin (3):
  pinctrl: rockchip: update rk3308 iomux routes
  dt-bindings: pinctrl: rockchip: add rk3308b
  pinctrl: rockchip: add rk3308b SoC support

 .../bindings/pinctrl/rockchip,pinctrl.yaml    |   1 +
 drivers/pinctrl/pinctrl-rockchip.c            | 187 ++++++++++++++++++
 drivers/pinctrl/pinctrl-rockchip.h            |   1 +
 3 files changed, 189 insertions(+)


base-commit: ed30a4a51bb196781c8058073ea720133a65596f

Comments

Heiko Stübner May 28, 2024, 1:23 p.m. UTC | #1
Am Dienstag, 28. Mai 2024, 14:18:35 CEST schrieb Dmitry Yashin:
> Hi Heiko,
> 
> On 5/28/24 4:52 PM, Heiko Stübner wrote:
> > Hi Linus,
> >
> > Am Dienstag, 28. Mai 2024, 13:29:12 CEST schrieb Linus Walleij:
> >> On Wed, May 15, 2024 at 2:17 PM Dmitry Yashin <dmt.yashin@gmail.com> wrote:
> >>
> >>> Some of the rk3308 iomux routes in rk3308_mux_route_data belong to
> >>> the rk3308b SoC. Remove them and correct i2c3 routes.
> >>>
> >>> Fixes: 7825aeb7b208 ("pinctrl: rockchip: add rk3308 SoC support")
> >>> Signed-off-by: Dmitry Yashin <dmt.yashin@gmail.com>
> >> While you guys are thinking about the RK3308B support, is this fix
> >> something I can just apply?
> > I'd think so. I've detailed stuff in my Review mail I just sent.
> > Both the soc itself and also the affected pin functions are niche
> > enough that this should not cause breakage.
> >
> >
> > Heiko
> >
> >
> >
> 
> Should i just drop 1/3 from V2 then?

I guess just check the state of affairs once your v2 is ready ;-) .

I.e. if LinusW grabs patch1 before you post v2, just drop it, otherwise
send it along.


> Thanks everyone for the feedback on this series. I'll prepare V2 based
> on runtime chip detection with use of GRF_CHIP_ID.