[RFC PATCH 0/7] realtek: MFD for switch core

Sander Vanheule sander at svanheule.net
Sat Jul 16 12:09:52 PDT 2022


This RFC series introduces a new MFD device for the switch core found
in the Realtek SoCs. Currently only an implementation is provided for
RTL8380, but it written with the register structure of other generations
in mind.

The MFD comes with a set of new drivers:
  - core MFD driver for global register management, sundry small
    peripherals that don't warrant a specific driver
  - pin control driver to manage different pin muxes, so we can replace
    all those pinctrl-single nodes
  - switch port LED driver with port status HW offloading

The port LED support will probably be what draws most attention, as this
is something many users have been requesting. There are two example
implementations:
  - ZyXEL GS1900-8, with one LED per port
  - Netgear GS110TPP, with two LEDs per port

If you have time, please test these patches and provide some feedback on
the structure and implementation of the different parts. My plan is for
this to be the starting point to (finally) start upstreaming the most
important part of the Realtek SoCs; the ethernet switch.

Best,
Sander

Sander Vanheule (7):
  kernel: backport devm_bitmap_{alloc,zalloc}
  realtek: add switch core MFD driver
  realtek: add pinctrl for Realtek maple
  realtek: add RTL8380 switch port LED driver
  realtek: rtl838x: replace pinctrl-single
  realtek: Zyxel GS1900-8: define port LEDs
  realtek: Netgear GS110TPPv1: define port LEDs

 ...de-devm_bitmap_alloc-and-devm_bitmap.patch |  88 +++
 .../dts-5.10/rtl8380_netgear_gs110tpp-v1.dts  |  30 +
 .../dts-5.10/rtl8380_zyxel_gs1900-8.dts       |  41 ++
 target/linux/realtek/dts-5.10/rtl838x.dtsi    |  38 +-
 .../drivers/leds/leds-rtl-switch-port.c       | 668 ++++++++++++++++++
 .../drivers/mfd/realtek-switchcore.c          | 244 +++++++
 .../drivers/pinctrl/pinctrl-rtl-switchcore.c  | 370 ++++++++++
 ...0-mfd-add-Realtek-switch-core-driver.patch |  50 ++
 ...inctrl-add-pinctrl-for-Realtek-maple.patch |  51 ++
 ...s-add-RTL8380-switch-port-LED-driver.patch |  64 ++
 target/linux/realtek/rtl838x/config-5.10      |   4 +
 11 files changed, 1627 insertions(+), 21 deletions(-)
 create mode 100644 target/linux/generic/backport-5.10/201-lib-bitmap-provide-devm_bitmap_alloc-and-devm_bitmap.patch
 create mode 100644 target/linux/realtek/files-5.10/drivers/leds/leds-rtl-switch-port.c
 create mode 100644 target/linux/realtek/files-5.10/drivers/mfd/realtek-switchcore.c
 create mode 100644 target/linux/realtek/files-5.10/drivers/pinctrl/pinctrl-rtl-switchcore.c
 create mode 100644 target/linux/realtek/patches-5.10/200-mfd-add-Realtek-switch-core-driver.patch
 create mode 100644 target/linux/realtek/patches-5.10/201-pinctrl-add-pinctrl-for-Realtek-maple.patch
 create mode 100644 target/linux/realtek/patches-5.10/202-leds-add-RTL8380-switch-port-LED-driver.patch

-- 
2.36.1




More information about the openwrt-devel mailing list