[PATCH v3 00/13] realtek: pinctrl and LED drivers

Sander Vanheule sander at svanheule.net
Sun Oct 30 11:30:53 PDT 2022


This series introduces an MFD driver for the switch core, and dependent
pinctrl and LED drivers. This should allow users to control the switch
port LEDs to their liking, and make it easier to configure pin muxes.
System LED support is also provided, although not enabled.

Support is provided for Maple (RTL838x, RTL833x) and Cypress (RTL839x,
RTL835x). Newer platforms are not yet supported, so the drivers are left
disabled for rtl930x and rtl931x.

As make-shift documentation to the devicetree interfaces, the
corresponding nodes changes are also implemented, including LED support
for the Netgear GS110TPP (20 LEDs), Zyxel GS1900-8 (8 LEDs), and Zyxel
GS1900-48 (50 LEDs) switches.

In addition to driver changes, this patch series also includes a
non-code patch introducing a target TODO file.

In this v3 respin, support was added to configure the default switch
port LED trigger from the device tree specification. It is still
possible to reconfigure the port LEDs from userspace. The DTS config
primarily serves as device documentation and is used as a default value
by the driver.

The patches updating the kernel symbol selection were also merged into
their respective driver patches. Otherwise non-interactive builds would
fail.

Sander Vanheule (13):
  realtek: add switch core MFD driver
  realtek: add switch core pinctrl driver
  realtek: add base register field LED support
  realtek: add system LED peripheral driver
  realtek: add switch port LED driver
  realtek: rtl838x: replace pinctrl nodes
  realtek: rtl838x: add sys-led node
  realtek: Zyxel GS1900-8: define port LEDs
  realtek: Netgear GS110TPPv1: define port LEDs
  realtek: rtl839x: replace pinctrl nodes
  realtek: rtl839x: add sys-led node
  realtek: Zyxel GS1900-48: define port LEDs
  realtek: add target TODO.md

 target/linux/realtek/TODO.md                  |  22 +
 .../dts-5.10/rtl8380_netgear_gs110tpp-v1.dts  | 192 ++++
 .../dts-5.10/rtl8380_zyxel_gs1900-8.dts       |  86 ++
 target/linux/realtek/dts-5.10/rtl838x.dtsi    |  38 +-
 .../dts-5.10/rtl8393_zyxel_gs1900-48.dts      | 463 +++++++++
 target/linux/realtek/dts-5.10/rtl839x.dtsi    |  45 +-
 .../files-5.10/drivers/leds/realtek/Kconfig   |  28 +
 .../files-5.10/drivers/leds/realtek/Makefile  |   4 +
 .../drivers/leds/realtek/led-regfield.c       |  99 ++
 .../drivers/leds/realtek/led-regfield.h       |  55 +
 .../leds/realtek/rtl-switch-port-leds.c       | 973 ++++++++++++++++++
 .../leds/realtek/rtl-switch-sys-leds.c        | 105 ++
 .../drivers/mfd/realtek-switchcore.c          | 217 ++++
 .../drivers/pinctrl/pinctrl-rtl-switchcore.c  | 447 ++++++++
 .../dt-bindings/leds/realtek-led-trigger.h    |  25 +
 ...0-mfd-add-Realtek-switch-core-driver.patch |  46 +
 ...inctrl-add-pinctrl-for-Realtek-maple.patch |  49 +
 ...s-add-Realtek-LED-hardware-directory.patch |  37 +
 target/linux/realtek/rtl838x/config-5.10      |   6 +
 target/linux/realtek/rtl839x/config-5.10      |   6 +
 target/linux/realtek/rtl930x/config-5.10      |   2 +
 target/linux/realtek/rtl931x/config-5.10      |   2 +
 22 files changed, 2900 insertions(+), 47 deletions(-)
 create mode 100644 target/linux/realtek/TODO.md
 create mode 100644 target/linux/realtek/files-5.10/drivers/leds/realtek/Kconfig
 create mode 100644 target/linux/realtek/files-5.10/drivers/leds/realtek/Makefile
 create mode 100644 target/linux/realtek/files-5.10/drivers/leds/realtek/led-regfield.c
 create mode 100644 target/linux/realtek/files-5.10/drivers/leds/realtek/led-regfield.h
 create mode 100644 target/linux/realtek/files-5.10/drivers/leds/realtek/rtl-switch-port-leds.c
 create mode 100644 target/linux/realtek/files-5.10/drivers/leds/realtek/rtl-switch-sys-leds.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/files-5.10/include/dt-bindings/leds/realtek-led-trigger.h
 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-Realtek-LED-hardware-directory.patch

-- 
2.38.1




More information about the openwrt-devel mailing list