mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 09:12:39 +00:00
5457996a9e
This commit enables wireless LEDs activity blinking for Sercomm S1500 devices (Beeline Smartbox PRO, WiFire s1500.nbn). Run-tested: WiFire s1500.nbn Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
262 lines
4.8 KiB
Plaintext
262 lines
4.8 KiB
Plaintext
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#include "mt7621.dtsi"
|
|
|
|
#include <dt-bindings/gpio/gpio.h>
|
|
#include <dt-bindings/input/input.h>
|
|
#include <dt-bindings/leds/common.h>
|
|
|
|
/ {
|
|
aliases {
|
|
led-boot = &led_status;
|
|
led-running = &led_status;
|
|
led-upgrade = &led_wps;
|
|
led-failsafe = &led_wps;
|
|
};
|
|
|
|
keys {
|
|
compatible = "gpio-keys";
|
|
|
|
button-0 {
|
|
label = "reset";
|
|
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
|
|
linux,code = <KEY_RESTART>;
|
|
};
|
|
|
|
button-1 {
|
|
label = "wps";
|
|
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
|
|
linux,code = <KEY_WPS_BUTTON>;
|
|
};
|
|
};
|
|
|
|
leds {
|
|
compatible = "gpio-leds";
|
|
|
|
led-0 {
|
|
color = <LED_COLOR_ID_AMBER>;
|
|
function = LED_FUNCTION_LAN;
|
|
function-enumerator = <4>;
|
|
linux,default-trigger = "mt7530-0:00:1Gbps";
|
|
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
led-1 {
|
|
color = <LED_COLOR_ID_GREEN>;
|
|
function = LED_FUNCTION_LAN;
|
|
function-enumerator = <4>;
|
|
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
led-2 {
|
|
color = <LED_COLOR_ID_AMBER>;
|
|
function = LED_FUNCTION_LAN;
|
|
function-enumerator = <3>;
|
|
linux,default-trigger = "mt7530-0:01:1Gbps";
|
|
gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
led-3 {
|
|
color = <LED_COLOR_ID_GREEN>;
|
|
function = LED_FUNCTION_LAN;
|
|
function-enumerator = <3>;
|
|
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
led-4 {
|
|
color = <LED_COLOR_ID_AMBER>;
|
|
function = LED_FUNCTION_LAN;
|
|
function-enumerator = <2>;
|
|
linux,default-trigger = "mt7530-0:02:1Gbps";
|
|
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
led-5 {
|
|
color = <LED_COLOR_ID_AMBER>;
|
|
function = LED_FUNCTION_LAN;
|
|
function-enumerator = <1>;
|
|
linux,default-trigger = "mt7530-0:03:1Gbps";
|
|
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
led-6 {
|
|
color = <LED_COLOR_ID_GREEN>;
|
|
function = LED_FUNCTION_LAN;
|
|
function-enumerator = <1>;
|
|
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
led-7 {
|
|
color = <LED_COLOR_ID_AMBER>;
|
|
function = LED_FUNCTION_WAN;
|
|
linux,default-trigger = "mt7530-0:04:1Gbps";
|
|
gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
led-8 {
|
|
color = <LED_COLOR_ID_GREEN>;
|
|
function = LED_FUNCTION_WAN;
|
|
gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
led-9 {
|
|
color = <LED_COLOR_ID_GREEN>;
|
|
function = LED_FUNCTION_LAN;
|
|
function-enumerator = <2>;
|
|
gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
led-10 {
|
|
color = <LED_COLOR_ID_WHITE>;
|
|
function = LED_FUNCTION_WLAN;
|
|
function-enumerator = <24>;
|
|
linux,default-trigger = "phy1tpt";
|
|
gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
led_wps: led-11 {
|
|
function = LED_FUNCTION_WPS;
|
|
gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
|
|
panic-indicator;
|
|
};
|
|
|
|
led_status: led-12 {
|
|
color = <LED_COLOR_ID_WHITE>;
|
|
function = LED_FUNCTION_STATUS;
|
|
gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
led-13 {
|
|
color = <LED_COLOR_ID_WHITE>;
|
|
function = LED_FUNCTION_WLAN;
|
|
function-enumerator = <50>;
|
|
linux,default-trigger = "phy0tpt";
|
|
gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
|
|
};
|
|
};
|
|
};
|
|
|
|
ðernet {
|
|
pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
|
|
};
|
|
|
|
&gmac0 {
|
|
nvmem-cells = <&macaddr_factory_1000 0>;
|
|
nvmem-cell-names = "mac-address";
|
|
};
|
|
|
|
&nand {
|
|
status = "okay";
|
|
|
|
partitions: partitions {
|
|
compatible = "fixed-partitions";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
partition@0 {
|
|
label = "u-boot";
|
|
reg = <0x0 0x100000>;
|
|
read-only;
|
|
};
|
|
|
|
factory: partition@100000 {
|
|
label = "Factory";
|
|
reg = <0x100000 0x100000>;
|
|
read-only;
|
|
|
|
nvmem-layout {
|
|
compatible = "fixed-layout";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
eeprom_factory_0: eeprom@0 {
|
|
reg = <0x0 0x200>;
|
|
};
|
|
|
|
eeprom_factory_8000: eeprom@8000 {
|
|
reg = <0x8000 0x200>;
|
|
};
|
|
|
|
macaddr_factory_1000: macaddr@1000 {
|
|
compatible = "mac-base";
|
|
reg = <0x1000 0x6>;
|
|
#nvmem-cell-cells = <1>;
|
|
};
|
|
};
|
|
};
|
|
|
|
partition@1600000 {
|
|
label = "boot_flag";
|
|
reg = <0x1600000 0x100000>;
|
|
};
|
|
|
|
partition@1700000 {
|
|
label = "kernel";
|
|
reg = <0x1700000 0x400000>;
|
|
};
|
|
|
|
partition@1b00000 {
|
|
label = "Kernel_2";
|
|
reg = <0x1b00000 0x400000>;
|
|
read-only;
|
|
};
|
|
};
|
|
};
|
|
|
|
&pcie {
|
|
status = "okay";
|
|
|
|
reset-gpios = <&gpio 8 GPIO_ACTIVE_LOW>,
|
|
<&gpio 19 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
&pcie0 {
|
|
wifi@0,0 {
|
|
compatible = "mediatek,mt76";
|
|
reg = <0x0000 0 0 0 0>;
|
|
ieee80211-freq-limit = <5000000 6000000>;
|
|
|
|
nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_1000 2>;
|
|
nvmem-cell-names = "eeprom", "mac-address";
|
|
};
|
|
};
|
|
|
|
&state_default {
|
|
gpio {
|
|
groups = "wdt", "uart3", "jtag", "uart2", "i2c", "rgmii2";
|
|
function = "gpio";
|
|
};
|
|
};
|
|
|
|
&switch0 {
|
|
ports {
|
|
port@0 {
|
|
status = "okay";
|
|
label = "lan4";
|
|
};
|
|
|
|
port@1 {
|
|
status = "okay";
|
|
label = "lan3";
|
|
};
|
|
|
|
port@2 {
|
|
status = "okay";
|
|
label = "lan2";
|
|
};
|
|
|
|
port@3 {
|
|
status = "okay";
|
|
label = "lan1";
|
|
};
|
|
|
|
wan: port@4 {
|
|
status = "okay";
|
|
label = "wan";
|
|
|
|
nvmem-cells = <&macaddr_factory_1000 1>;
|
|
nvmem-cell-names = "mac-address";
|
|
};
|
|
};
|
|
};
|