1
1
openwrt/target/linux/realtek/dts/rtl9313_zyxel_xs1930.dtsi
Jonas Jelonek d349945f82 realtek: move XS1930 LED definitions to common DTSI
The power, cloud and locator LEDs exist on all three XS1930 variants
with the same colors and roles, only the GPIOs differ. Declare them
once in the common DTSI with the -10/-12HP pinout and let -12F
override the gpios properties via phandle references. This removes
three near-identical led-node blocks from the device DTS files.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23428
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:08:41 +02:00

165 lines
3.2 KiB
Plaintext

// SPDX-License-Identifier: GPL-2.0-or-later
/dts-v1/;
#include "rtl931x.dtsi"
#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/mux/mux.h>
/ {
aliases {
label-mac-device = &ethernet0;
led-boot = &led_sys_green;
led-failsafe = &led_sys_red;
led-running = &led_sys_green;
led-upgrade = &led_sys_green;
};
chosen {
bootargs = "console=ttyS0,115200 earlycon";
};
memory@0 {
device_type = "memory";
reg = <0x00000000 0x10000000>;
};
keys {
compatible = "gpio-keys";
key-restore {
label = "restore";
gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
leds: leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&pinmux_disable_sys_led>;
led_sys_green: led-0 {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_INDICATOR;
gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
};
led_sys_red: led-1 {
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_INDICATOR;
gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>;
};
led_pwr_green: led-2 {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_POWER;
gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
led_pwr_red: led-3 {
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_POWER;
gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
};
led_cloud_green: led-4 {
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
};
led_cloud_red: led-5 {
color = <LED_COLOR_ID_RED>;
gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
};
led_locator: led-6 {
color = <LED_COLOR_ID_BLUE>;
function = LED_FUNCTION_INDICATOR;
gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "BootBase";
reg = <0x0 0xa0000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
factory_macaddr: macaddr@9fff8 {
reg = <0x9fff8 0x6>;
};
};
};
/* DbgArea */
partition@a0000 {
label = "reserved";
reg = <0xa0000 0x20000>;
read-only;
};
partition@c0000 {
label = "RomDir2";
reg = <0xc0000 0x120000>;
read-only;
/* boot image index at offset 0x151 */
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
boot_selector: boot-selector@151 {
reg = <0x151 0x1>;
};
};
};
/* BootBase has dual-image support. Second partition starts at
* 0x1280000 and has same layout as first partition but smaller size
*/
partition@280000 {
reg = <0x280000 0x1d80000>;
label = "factory";
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "loader";
reg = <0x0 0x10000>;
};
partition@10000 {
label = "firmware";
reg = <0x10000 0x1d70000>;
compatible = "openwrt,uimage", "denx,uimage";
};
};
};
};
};
&ethernet0 {
nvmem-cells = <&factory_macaddr 0>;
nvmem-cell-names = "mac-address";
};