openwrt/target/linux/realtek
Sven Eckelmann 3adb820779 realtek: rtl931x: Add SPI_CTRL0 as pinmux
The RTL931x has next to its SPI flash controller a SPI master interface. It
is connected to

* SPI_CS#[1,0]: AH22 , AK22 (aka: GPIO 12, 11)
* SPI_CLK:      AL23 (aka: GPIO 8)
* SPI_MISO:     AM23 (aka: GPIO 9)
* SPI_MOSI:     AL22 (aka: GPIO 10)

It is not the same as the SPI flash controller which uses pins:

* SPI_CS#[1,0]: B24, A24
* SPI_SCLK:     A23
* SPI_SDI/SIO0: B21
* SPO_SDO_SIO1: B21
* SPI_SIO2:     A22
* SPI_SIO3:     B22
* SPI_RSTN:     B23

As shown above, the SPI master controller shares its pin with GPIO 8, 9,
10, 11, 12. In some upcoming devices (like the Plasma Cloud PSX28/ESX28),
they will be used for SFP cage signaling. These pins must therefore be
switched manually to the GPIO mode.

The SPI_CTRL0 register provides all necessary configuration to enforce the
GPIO mode of the pins. And until more requirements (and a correct driver)
for the SPI master controller arise, it is therefore possible to use
pinctrl-single to configure it using the devicetree.

Previously the ethernet driver did configure the SPI master controller for
31.25 MHz. It is unknown for which kind of device this was originally made
and what was actually connected there. But this manual write to the
register conflicts potentially with the write of the pinctrl driver to the
same register. Luckily, we don't need this SPI speed configuration in the
ethernet driver. Still, to allow this device an easy migration, the
`spi0-31mhz` configuration was already prepared.

Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/20263
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-02 10:30:16 +02:00
..
base-files realtek: fix model for TP-Link TL-ST1008F v2.0 2025-09-03 00:51:49 +02:00
dts realtek: rtl931x: Add SPI_CTRL0 as pinmux 2025-10-02 10:30:16 +02:00
files/firmware/rtl838x_phy
files-6.12 realtek: rtl931x: Add SPI_CTRL0 as pinmux 2025-10-02 10:30:16 +02:00
image realtek: rtl930x: rename XGS1250-12 to A1 2025-09-24 13:41:04 +02:00
patches-6.12 realtek: backport ECC driver 2025-09-30 11:15:26 +02:00
profiles target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00
rtl838x realtek: backport ECC driver 2025-09-30 11:15:26 +02:00
rtl839x realtek: backport ECC driver 2025-09-30 11:15:26 +02:00
rtl930x realtek: backport ECC driver 2025-09-30 11:15:26 +02:00
rtl930x_nand realtek: backport ECC driver 2025-09-30 11:15:26 +02:00
rtl931x realtek: rtl931x: Enable REALTEK_PHY for RTL8224 support 2025-09-30 20:12:27 +02:00
rtl931x_nand realtek: backport ECC driver 2025-09-30 11:15:26 +02:00
Makefile realtek: add NAND targets for RTL93xx 2025-08-10 11:46:52 +02:00