ramips: sync upstream code from official

This commit is contained in:
AmadeusGhost 2020-04-04 20:36:49 +08:00
parent 698a4af761
commit bea472f31b
201 changed files with 6308 additions and 9944 deletions

View File

@ -13,14 +13,12 @@ SUBTARGETS:=mt7620 mt7621 mt76x8 rt288x rt305x rt3883
FEATURES:=squashfs gpio
KERNEL_PATCHVER:=4.14
KERNEL_TESTING_PATCHVER:=4.19
define Target/Description
Build firmware images for Ralink RT288x/RT3xxx based boards.
endef
include $(INCLUDE_DIR)/target.mk
DEFAULT_PACKAGES += \
kmod-leds-gpio kmod-gpio-button-hotplug swconfig
DEFAULT_PACKAGES += kmod-leds-gpio kmod-gpio-button-hotplug
$(eval $(call BuildTarget))

View File

@ -1,59 +0,0 @@
#!/bin/sh
#
# Copyright (C) 2013 OpenWrt.org
#
. /lib/functions.sh
ramips_switchdev_from_soc() {
# The ethernet switch driver enables VLAN by default, but
# failsafe uses eth0, making the device unreachable:
# https://dev.openwrt.org/ticket/18768
local switchdev
local RT3X5X=$(grep -E "(RT3.5|RT5350|MT7628|MT7688|MT7620|MT7621)" /proc/cpuinfo)
[ -n "$RT3X5X" ] || return 1
case "$RT3X5X" in
*MT7620*)
switchdev=mt7620
;;
*MT7621*)
switchdev=mt7530
;;
*)
switchdev=rt305x
;;
esac
echo "$switchdev"
}
ramips_switchdev_from_board() {
# For these devices, external ethernet switch should be used
# instead of the SoC internal switch.
local switchdev
local board=$(board_name)
case "$board" in
esac
echo "$switchdev"
}
ramips_set_preinit_iface() {
local switchdev=$(ramips_switchdev_from_board)
[ -n "$switchdev" ] || switchdev=$(ramips_switchdev_from_soc)
if [ -n "$switchdev" ]; then
swconfig dev $switchdev set reset 1
swconfig dev $switchdev set enable_vlan 0
swconfig dev $switchdev set apply 1
fi
ifname=eth0
}
boot_hook_add preinit_main ramips_set_preinit_iface

View File

@ -1,5 +1,6 @@
#include <dt-bindings/interrupt-controller/mips-gic.h>
#include <dt-bindings/clock/mt7621-clk.h>
#include <dt-bindings/gpio/gpio.h>
/ {
#address-cells = <1>;
@ -67,36 +68,15 @@
reg = <0x100 0x100>;
};
gpio@600 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "mtk,mt7621-gpio";
gpio: gpio@600 {
#gpio-cells = <2>;
#interrupt-cells = <2>;
compatible = "mediatek,mt7621-gpio";
gpio-controller;
interrupt-controller;
reg = <0x600 0x100>;
interrupt-parent = <&gic>;
interrupts = <GIC_SHARED 12 IRQ_TYPE_LEVEL_HIGH>;
gpio0: bank@0 {
reg = <0>;
compatible = "mtk,mt7621-gpio-bank";
gpio-controller;
#gpio-cells = <2>;
};
gpio1: bank@1 {
reg = <1>;
compatible = "mtk,mt7621-gpio-bank";
gpio-controller;
#gpio-cells = <2>;
};
gpio2: bank@2 {
reg = <2>;
compatible = "mtk,mt7621-gpio-bank";
gpio-controller;
#gpio-cells = <2>;
};
};
i2c: i2c@900 {
@ -278,83 +258,83 @@
i2c_pins: i2c_pins {
i2c_pins {
ralink,group = "i2c";
ralink,function = "i2c";
groups = "i2c";
function = "i2c";
};
};
spi_pins: spi_pins {
spi_pins {
ralink,group = "spi";
ralink,function = "spi";
groups = "spi";
function = "spi";
};
};
uart1_pins: uart1 {
uart1 {
ralink,group = "uart1";
ralink,function = "uart1";
groups = "uart1";
function = "uart1";
};
};
uart2_pins: uart2 {
uart2 {
ralink,group = "uart2";
ralink,function = "uart2";
groups = "uart2";
function = "uart2";
};
};
uart3_pins: uart3 {
uart3 {
ralink,group = "uart3";
ralink,function = "uart3";
groups = "uart3";
function = "uart3";
};
};
rgmii1_pins: rgmii1 {
rgmii1 {
ralink,group = "rgmii1";
ralink,function = "rgmii1";
groups = "rgmii1";
function = "rgmii1";
};
};
rgmii2_pins: rgmii2 {
rgmii2 {
ralink,group = "rgmii2";
ralink,function = "rgmii2";
groups = "rgmii2";
function = "rgmii2";
};
};
mdio_pins: mdio {
mdio {
ralink,group = "mdio";
ralink,function = "mdio";
groups = "mdio";
function = "mdio";
};
};
pcie_pins: pcie {
pcie {
ralink,group = "pcie";
ralink,function = "pcie rst";
groups = "pcie";
function = "gpio";
};
};
nand_pins: nand {
spi-nand {
ralink,group = "spi";
ralink,function = "nand1";
groups = "spi";
function = "nand1";
};
sdhci-nand {
ralink,group = "sdhci";
ralink,function = "nand2";
groups = "sdhci";
function = "nand2";
};
};
sdhci_pins: sdhci {
sdhci {
ralink,group = "sdhci";
ralink,function = "sdhci";
groups = "sdhci";
function = "sdhci";
};
};
};
@ -434,21 +414,41 @@
};
};
nficlock: nficlock {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <125000000>;
};
nand: nand@1e003000 {
status = "disabled";
compatible = "mtk,mt7621-nand";
bank-width = <2>;
compatible = "mediatek,mt7621-nfc";
reg = <0x1e003000 0x800
0x1e003800 0x800>;
reg-names = "nfi", "ecc";
clocks = <&nficlock>;
clock-names = "nfi_clk";
};
ethsys: syscon@1e000000 {
compatible = "mediatek,mt7621-ethsys",
"syscon";
reg = <0x1e000000 0x1000>;
#clock-cells = <1>;
};
ethernet: ethernet@1e100000 {
compatible = "mediatek,mt7621-eth";
reg = <0x1e100000 0x10000>;
clocks = <&sysclock>;
clock-names = "ethif";
#address-cells = <1>;
#size-cells = <1>;
#size-cells = <0>;
resets = <&rstctrl 6 &rstctrl 23>;
reset-names = "fe", "eth";
@ -456,26 +456,88 @@
interrupt-parent = <&gic>;
interrupts = <GIC_SHARED 3 IRQ_TYPE_LEVEL_HIGH>;
mediatek,switch = <&gsw>;
mediatek,ethsys = <&ethsys>;
mdio-bus {
#address-cells = <1>;
#size-cells = <0>;
gmac0: mac@0 {
compatible = "mediatek,eth-mac";
reg = <0>;
phy-mode = "rgmii";
phy1f: ethernet-phy@1f {
reg = <0x1f>;
phy-mode = "rgmii";
fixed-link {
speed = <1000>;
full-duplex;
pause;
};
};
hnat: hnat@0 {
compatible = "mediatek,mt7623-hnat";
reg = <0 0x10000>;
mtketh-ppd = "eth0";
mtketh-lan = "eth0";
mtketh-wan = "eth0";
resets = <&rstctrl 0>;
reset-names = "mtketh";
gmac1: mac@1 {
compatible = "mediatek,eth-mac";
reg = <1>;
status = "disabled";
phy-mode = "rgmii-rxid";
};
mdio: mdio-bus {
#address-cells = <1>;
#size-cells = <0>;
switch0: switch@1f {
compatible = "mediatek,mt7621";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x1f>;
mediatek,mcm;
resets = <&rstctrl 2>;
reset-names = "mcm";
ports {
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
port@0 {
status = "disabled";
reg = <0>;
label = "lan0";
};
port@1 {
status = "disabled";
reg = <1>;
label = "lan1";
};
port@2 {
status = "disabled";
reg = <2>;
label = "lan2";
};
port@3 {
status = "disabled";
reg = <3>;
label = "lan3";
};
port@4 {
status = "disabled";
reg = <4>;
label = "lan4";
};
port@6 {
reg = <6>;
label = "cpu";
ethernet = <&gmac0>;
phy-mode = "rgmii";
fixed-link {
speed = <1000>;
full-duplex;
};
};
};
};
};
};
@ -488,9 +550,10 @@
pcie: pcie@1e140000 {
compatible = "mediatek,mt7621-pci";
reg = <0x1e140000 0x100
0x1e142000 0x100>;
reg = <0x1e140000 0x100 /* host-pci bridge registers */
0x1e142000 0x100 /* pcie port 0 RC control registers */
0x1e143000 0x100 /* pcie port 1 RC control registers */
0x1e144000 0x100>; /* pcie port 2 RC control registers */
#address-cells = <3>;
#size-cells = <2>;
@ -505,10 +568,11 @@
0x01000000 0 0x00000000 0x1e160000 0 0x00010000 /* io space */
>;
interrupt-parent = <&gic>;
interrupts = <GIC_SHARED 4 IRQ_TYPE_LEVEL_HIGH
GIC_SHARED 24 IRQ_TYPE_LEVEL_HIGH
GIC_SHARED 25 IRQ_TYPE_LEVEL_HIGH>;
#interrupt-cells = <1>;
interrupt-map-mask = <0xF0000 0 0 1>;
interrupt-map = <0x10000 0 0 1 &gic GIC_SHARED 4 IRQ_TYPE_LEVEL_HIGH>,
<0x20000 0 0 1 &gic GIC_SHARED 24 IRQ_TYPE_LEVEL_HIGH>,
<0x30000 0 0 1 &gic GIC_SHARED 25 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
@ -516,32 +580,45 @@
reset-names = "pcie0", "pcie1", "pcie2";
clocks = <&clkctrl 24 &clkctrl 25 &clkctrl 26>;
clock-names = "pcie0", "pcie1", "pcie2";
phys = <&pcie0_phy 1>, <&pcie2_phy 0>;
phy-names = "pcie-phy0", "pcie-phy2";
reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
pcie0: pcie@0,0 {
reg = <0x0000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
ranges;
bus-range = <0x00 0xff>;
};
pcie1: pcie@1,0 {
reg = <0x0800 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
ranges;
bus-range = <0x00 0xff>;
};
pcie2: pcie@2,0 {
reg = <0x1000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
ranges;
bus-range = <0x00 0xff>;
};
};
pcie0_phy: pcie-phy@1e149000 {
compatible = "mediatek,mt7621-pci-phy";
reg = <0x1e149000 0x0700>;
#phy-cells = <1>;
};
pcie2_phy: pcie-phy@1e14a000 {
compatible = "mediatek,mt7621-pci-phy";
reg = <0x1e14a000 0x0700>;
#phy-cells = <1>;
};
};

View File

@ -15,7 +15,7 @@
led-failsafe = &led_sys;
led-running = &led_sys;
led-upgrade = &led_sys;
label-mac-device = &ethernet;
label-mac-device = &gmac0;
};
chosen {
@ -27,7 +27,7 @@
led_sys: sys {
label = "g7:blue:sys";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
};
};
@ -36,7 +36,7 @@
reset {
label = "reset";
gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
linux,code = <KEY_RESTART>;
};
@ -105,13 +105,44 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe00c>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe00c>;
mtd-mac-address-increment = <1>;
};
};
};
&state_default {
gpio {
ralink,group = "i2c", "wdt";
ralink,function = "gpio";
groups = "i2c", "uart3", "wdt";
function = "gpio";
};
};

View File

@ -20,18 +20,12 @@
bootargs = "console=ttyS0,57600";
};
palmbus: palmbus@1E000000 {
i2c@900 {
status = "okay";
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -41,12 +35,12 @@
led_run: run {
label = "ew1200:green:run";
gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
};
usb {
label = "ew1200:green:usb";
gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
linux,default-trigger = "usbport";
};
@ -117,13 +111,44 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe000>;
mtd-mac-address-increment = <1>;
};
};
};
&state_default {
gpio {
ralink,group = "wdt", "rgmii2", "jtag", "mdio";
ralink,function = "gpio";
groups = "i2c", "uart3", "wdt";
function = "gpio";
};
};

View File

@ -11,7 +11,7 @@
model = "ALFA Network Quad-E4G";
aliases {
label-mac-device = &ethernet;
label-mac-device = &gmac0;
led-boot = &led_system;
led-failsafe = &led_system;
led-running = &led_system;
@ -29,61 +29,61 @@
m2-enable {
gpio-export,name = "m2-enable";
gpio-export,output = <1>;
gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 32 GPIO_ACTIVE_HIGH>;
};
minipcie0-enable {
gpio-export,name = "minipcie0-enable";
gpio-export,output = <1>;
gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 29 GPIO_ACTIVE_HIGH>;
};
minipcie0-reset {
gpio-export,name = "minipcie0-reset";
gpio-export,output = <0>;
gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
};
minipcie1-enable {
gpio-export,name = "minipcie1-enable";
gpio-export,output = <1>;
gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 30 GPIO_ACTIVE_HIGH>;
};
minipcie1-reset {
gpio-export,name = "minipcie1-reset";
gpio-export,output = <0>;
gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
};
minipcie2-enable {
gpio-export,name = "minipcie2-enable";
gpio-export,output = <1>;
gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 31 GPIO_ACTIVE_HIGH>;
};
minipcie2-reset {
gpio-export,name = "minipcie2-reset";
gpio-export,output = <0>;
gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
};
pcie-perst-disable {
gpio-export,name = "pcie-perst-enable";
gpio-export,output = <0>;
gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
};
sim-select {
gpio-export,name = "sim-select";
gpio-export,output = <1>;
gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
};
watchdog-enable {
gpio-export,name = "watchdog-enable";
gpio-export,output = <1>;
gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
};
};
@ -92,19 +92,19 @@
reset {
label = "reset";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
user1 {
label = "user1";
gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
};
user2 {
label = "user2";
gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
linux,code = <BTN_1>;
};
};
@ -114,44 +114,74 @@
led_system: system {
label = "quad-e4g:red:system";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
default-state = "keep";
};
m2 {
label = "quad-e4g:orange:m2";
gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
};
minipcie0 {
label = "quad-e4g:orange:minipcie0";
gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
};
minipcie1 {
label = "quad-e4g:orange:minipcie1";
gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
};
minipcie2 {
label = "quad-e4g:orange:minipcie2";
gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
};
};
watchdog {
compatible = "linux,wdt-gpio";
gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
hw_algo = "toggle";
hw_margin_ms = <25000>;
always-running;
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&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";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe006>;
};
};
};
&i2c {
status = "okay";
@ -167,8 +197,8 @@
&state_default {
gpio {
ralink,group = "jtag", "rgmii2", "wdt";
ralink,function = "gpio";
groups = "jtag", "rgmii2", "wdt";
function = "gpio";
};
};

View File

@ -7,3 +7,19 @@
compatible = "asiarf,ap7621-001", "mediatek,mt7621-soc";
model = "AsiaRF AP7621-001";
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe000>;
mtd-mac-address-increment = <1>;
};
};
};

View File

@ -7,3 +7,24 @@
compatible = "asiarf,ap7621-nv1", "mediatek,mt7621-soc";
model = "AsiaRF AP7621-NV1";
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe000>;
mtd-mac-address-increment = <1>;
};
port@2 {
status = "okay";
label = "lan1";
};
port@3 {
status = "okay";
label = "lan2";
};
};
};

View File

@ -15,7 +15,7 @@
reset {
label = "reset";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -25,12 +25,12 @@
wlan1 {
label = "ap7621-001:orange:wlan1";
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
};
wlan0 {
label = "ap7621-001:orange:wlan0";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
};
};
};
@ -103,14 +103,13 @@
status = "okay";
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
mediatek,portmap = "llllw";
};
&state_default {
gpio {
ralink,group = "wdt", "jtag";
ralink,function = "gpio";
groups = "wdt", "jtag";
function = "gpio";
};
};

View File

@ -26,12 +26,12 @@
led_power: power {
label = "rt-ac57u:blue:power";
gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
gpios = <&gpio 48 GPIO_ACTIVE_LOW>;
};
usb {
label = "rt-ac57u:blue:usb";
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
trigger-sources = <&ehci_port2>;
linux,default-trigger = "usbport";
};
@ -42,14 +42,14 @@
wps {
label = "wps";
gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 43 GPIO_ACTIVE_HIGH>;
linux,code = <KEY_WPS_BUTTON>;
debounce-interval = <60>;
};
reset {
label = "reset";
gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
debounce-interval = <60>;
};
@ -58,7 +58,7 @@
led-regulator {
compatible = "regulator-fixed";
regulator-name = "LED-Power";
gpio = <&gpio1 14 GPIO_ACTIVE_LOW>;
gpio = <&gpio 46 GPIO_ACTIVE_LOW>;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
@ -134,13 +134,43 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe006>;
};
port@1 {
status = "okay";
label = "lan1";
};
port@2 {
status = "okay";
label = "lan2";
};
port@3 {
status = "okay";
label = "lan3";
};
port@4 {
status = "okay";
label = "lan4";
};
};
};
&state_default {
gpio {
ralink,group = "sdhci";
ralink,function = "gpio";
groups = "sdhci";
function = "gpio";
};
};

View File

@ -28,13 +28,13 @@
reset {
label = "reset";
gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
@ -44,17 +44,17 @@
led_power: power {
label = "rt-ac85p:blue:power";
gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
};
wlan2g {
label = "rt-ac85p:blue:wlan2g";
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0radio";
};
wlan5g {
label = "rt-ac85p:blue:wlan5g";
gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1radio";
};
};
@ -135,21 +135,42 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
mediatek,portmap = "wllll";
port@5 {
status = "disabled";
};
};
&i2c {
status = "disabled";
&switch0 {
ports {
port@0 {
status = "okay";
label = "wan";
};
port@1 {
status = "okay";
label = "lan1";
};
port@2 {
status = "okay";
label = "lan2";
};
port@3 {
status = "okay";
label = "lan3";
};
port@4 {
status = "okay";
label = "lan4";
};
};
};
&state_default {
gpio {
ralink,group = "uart2", "uart3", "i2c";
ralink,function = "gpio";
groups = "uart2", "uart3", "i2c";
function = "gpio";
};
};

View File

@ -25,42 +25,42 @@
internet_g {
label = "wsr-1166:green:internet";
gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
};
router_g {
label = "wsr-1166:green:router";
gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
};
router_o {
label = "wsr-1166:orange:router";
gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
};
internet_o {
label = "wsr-1166:orange:internet";
gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
};
wifi_o {
label = "wsr-1166:orange:wifi";
gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
};
led_power: power {
label = "wsr-1166:green:power";
gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
};
diag {
label = "wsr-1166:orange:diag";
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
};
wifi_g {
label = "wsr-1166:green:wifi";
gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
gpios = <&gpio 48 GPIO_ACTIVE_LOW>;
};
};
@ -69,39 +69,39 @@
power {
label = "power";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>;
};
reset {
label = "reset";
gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
aoss {
label = "aoss";
gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
auto {
label = "mode";
gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
ap {
label = "ap";
gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
router {
label = "router";
gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
@ -109,7 +109,7 @@
gpio_poweroff {
compatible = "gpio-poweroff";
gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
};
};
@ -158,10 +158,39 @@
};
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
port@4 {
status = "okay";
label = "wan";
};
};
};
&state_default {
gpio {
ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
ralink,function = "gpio";
groups = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
function = "gpio";
};
};

View File

@ -25,42 +25,42 @@
led_power: power {
label = "wsr-600:green:power";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
};
wifi_o {
label = "wsr-600:orange:wifi";
gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
};
diag {
label = "wsr-600:orange:diag";
gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
};
wifi_g {
label = "wsr-600:green:wifi";
gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
};
router_o {
label = "wsr-600:orange:router";
gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
};
router_g {
label = "wsr-600:green:router";
gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
};
internet_o {
label = "wsr-600:orange:internet";
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
};
internet_g {
label = "wsr-600:green:internet";
gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
gpios = <&gpio 48 GPIO_ACTIVE_LOW>;
};
};
@ -69,39 +69,39 @@
power {
label = "power";
gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>;
};
reset {
label = "reset";
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
aoss {
label = "aoss";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
auto {
label = "mode";
gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
ap {
label = "ap";
gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
router {
label = "router";
gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
@ -109,7 +109,7 @@
gpio_poweroff {
compatible = "gpio-poweroff";
gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
};
};
@ -155,8 +155,8 @@
&state_default {
gpio {
ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
ralink,function = "gpio";
groups = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
function = "gpio";
};
};
@ -178,10 +178,39 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0x4>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
port@4 {
status = "okay";
label = "wan";
};
};
};
&xhci {
status = "disabled";
};

View File

@ -14,7 +14,7 @@
led-failsafe = &led_power_blue;
led-running = &led_power_blue;
led-upgrade = &led_power_blue;
label-mac-device = &ethernet;
label-mac-device = &gmac0;
};
chosen {
@ -26,37 +26,37 @@
power-amber {
label = "newifi-d2:amber:power";
gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
};
led_power_blue: power-blue {
label = "newifi-d2:blue:power";
gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
internet-amber {
label = "newifi-d2:amber:internet";
gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
};
internet-blue {
label = "newifi-d2:blue:internet";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
wlan2g {
label = "newifi-d2:blue:wlan2g";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
wlan5g {
label = "newifi-d2:blue:wlan5g";
gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
usb {
label = "newifi-d2:blue:usb";
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
linux,default-trigger = "usbport";
};
@ -67,13 +67,13 @@
reset {
label = "reset";
gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
@ -85,7 +85,7 @@
power_usb3 {
gpio-export,name = "power_usb3";
gpio-export,output = <1>;
gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
};
};
};
@ -149,13 +149,43 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&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";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe006>;
};
};
};
&state_default {
gpio {
ralink,group = "i2c", "jtag", "uart2", "uart3";
ralink,function = "gpio";
groups = "i2c", "jtag", "uart2", "uart3";
function = "gpio";
};
};

View File

@ -37,28 +37,28 @@
power {
label = "pbr-m1:blue:power";
gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led_sys: sys {
label = "pbr-m1:blue:sys";
gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
};
internet {
label = "pbr-m1:blue:internet";
gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
};
wlan2g {
label = "pbr-m1:blue:wlan2g";
gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
};
wlan5g {
label = "pbr-m1:blue:wlan5g";
gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
};
};
@ -67,7 +67,7 @@
reset {
label = "reset";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -79,25 +79,25 @@
power_usb2 {
gpio-export,name = "power_usb2";
gpio-export,output = <1>;
gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
};
power_usb3 {
gpio-export,name = "power_usb3";
gpio-export,output = <1>;
gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
};
power_sata {
gpio-export,name = "power_sata";
gpio-export,output = <1>;
gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
};
};
beeper: beeper {
compatible = "gpio-beeper";
gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
};
};
@ -164,13 +164,43 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe006>;
};
};
};
&state_default {
gpio {
ralink,group = "wdt", "rgmii2", "jtag", "mdio";
ralink,function = "gpio";
groups = "wdt", "rgmii2", "jtag";
function = "gpio";
};
};

View File

@ -14,7 +14,7 @@
led-failsafe = &led_power_green;
led-running = &led_power_green;
led-upgrade = &led_power_green;
label-mac-device = &wifi1;
label-mac-device = &gmac0;
};
chosen {
@ -26,22 +26,22 @@
power {
label = "dir-860l-b1:orange:power";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
led_power_green: power2 {
label = "dir-860l-b1:green:power";
gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
net {
label = "dir-860l-b1:orange:net";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
net2 {
label = "dir-860l-b1:green:net";
gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
};
@ -50,13 +50,13 @@
reset {
label = "reset";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
@ -114,6 +114,39 @@
};
};
&gmac0 {
mtd-mac-address = <&radio 0x4>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "wan";
};
port@1 {
status = "okay";
label = "lan4";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan2";
};
port@4 {
status = "okay";
label = "lan1";
};
};
};
&pcie {
status = "okay";
};
@ -136,7 +169,7 @@
&state_default {
gpio {
ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
ralink,function = "gpio";
groups = "uart3", "jtag", "wdt";
function = "gpio";
};
};

View File

@ -19,22 +19,22 @@
led_power: led_1 {
label = "ra21s:red:led1";
gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
};
led_2 {
label = "ra21s:red:led2";
gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
};
led_3 {
label = "ra21s:red:led3";
gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
};
led_4 {
label = "ra21s:red:led4";
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
};
};
};

View File

@ -19,22 +19,22 @@
led_power: led_1 {
label = "rg21s:red:led1";
gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
};
led_2 {
label = "rg21s:red:led2";
gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
};
led_3 {
label = "rg21s:red:led3";
gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
};
led_4 {
label = "rg21s:red:led4";
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
};
};
};

View File

@ -8,7 +8,7 @@
/ {
aliases {
label-mac-device = &ethernet;
label-mac-device = &gmac0;
};
chosen {
@ -20,13 +20,13 @@
reset {
label = "reset";
gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
@ -94,19 +94,43 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0x4>;
};
mediatek,portmap = "wllll";
port@5 {
status = "disabled";
&switch0 {
ports {
port@0 {
status = "okay";
label = "wan";
};
port@1 {
status = "okay";
label = "lan4";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan2";
};
port@4 {
status = "okay";
label = "lan1";
};
};
};
&state_default {
gpio {
ralink,group = "uart3", "uart2", "jtag", "wdt";
ralink,function = "gpio";
groups = "uart3", "uart2", "jtag", "wdt";
function = "gpio";
};
};

View File

@ -25,33 +25,33 @@
wlan2g {
label = "wrc-1167ghbk2-s:white:wlan2g";
gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0radio";
};
wlan5g {
label = "wrc-1167ghbk2-s:white:wlan5g";
gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
};
led_power_green: power_green {
label = "wrc-1167ghbk2-s:green:power";
gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
};
power_blue {
label = "wrc-1167ghbk2-s:blue:power";
gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
};
wps {
label = "wrc-1167ghbk2-s:red:wps";
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
};
power_red {
label = "wrc-1167ghbk2-s:red:power";
gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
};
};
@ -60,22 +60,52 @@
reset {
label = "reset";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe006>;
};
port@1 {
status = "okay";
label = "lan4";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan2";
};
port@4 {
status = "okay";
label = "lan1";
};
};
};
&spi0 {
status = "okay";
@ -130,8 +160,8 @@
&state_default {
gpio {
ralink,group = "i2c", "uart3", "jtag", "wdt";
ralink,function = "gpio";
groups = "i2c", "uart3", "jtag", "wdt";
function = "gpio";
};
};

View File

@ -22,22 +22,22 @@
led_power_green: power_green {
label = "wrc-gst:green:power";
gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
};
power_blue {
label = "wrc-gst:blue:power";
gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
};
wps {
label = "wrc-gst:red:wps";
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
};
power_red {
label = "wrc-gst:red:power";
gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
};
};
@ -46,50 +46,80 @@
reset {
label = "reset";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
client {
label = "client";
gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
ap {
label = "ap";
gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
extender {
label = "extender";
gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
router {
label = "router";
gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe006>;
};
port@1 {
status = "okay";
label = "lan4";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan2";
};
port@4 {
status = "okay";
label = "lan1";
};
};
};
&spi0 {
status = "okay";
@ -156,8 +186,8 @@
&state_default {
gpio {
ralink,group = "uart3", "jtag", "wdt", "sdhci";
ralink,function = "gpio";
groups = "uart3", "jtag", "wdt", "sdhci";
function = "gpio";
};
};

View File

@ -25,7 +25,7 @@
led_power: power {
label = "firewrt:green:power";
gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
};
};
@ -34,13 +34,13 @@
wps {
label = "wps";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
power {
label = "power";
gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>;
};
};
@ -110,13 +110,44 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe000>;
mtd-mac-address-increment = <1>;
};
};
};
&state_default {
gpio {
ralink,group = "wdt", "rgmii2";
ralink,function = "gpio";
groups = "wdt", "rgmii2";
function = "gpio";
};
};

View File

@ -19,12 +19,12 @@
internet {
label = "ghl-r-001:blue:internet";
gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
usb {
label = "ghl-r-001:blue:usb";
gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
linux,default-trigger = "usbport";
};
@ -35,7 +35,7 @@
reset {
label = "reset";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -52,6 +52,7 @@
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <25000000>;
m25p,fast-read;
partitions {
compatible = "fixed-partitions";
@ -109,13 +110,39 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe000>;
mtd-mac-address-increment = <1>;
};
};
};
&state_default {
gpio {
ralink,group = "jtag", "wdt";
ralink,function = "gpio";
groups = "jtag", "wdt";
function = "gpio";
};
};

View File

@ -25,7 +25,7 @@
reset {
label = "reset";
gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
linux,code = <KEY_RESTART>;
};
};
@ -35,22 +35,22 @@
system {
label = "gb-pc1:green:system";
gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
};
led_status: status {
label = "gb-pc1:green:status";
gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
};
lan1 {
label = "gb-pc1:green:lan1";
gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
};
lan2 {
label = "gb-pc1:green:lan2";
gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
};
};
};
@ -104,13 +104,27 @@
status = "okay";
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@4 {
status = "okay";
label = "lan2";
};
};
};
&state_default {
gpio {
ralink,group = "jtag", "rgmii2", "uart3", "wdt";
ralink,function = "gpio";
groups = "jtag", "rgmii2", "uart3", "wdt";
function = "gpio";
};
};

View File

@ -25,7 +25,7 @@
reset {
label = "reset";
gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
linux,code = <KEY_RESTART>;
};
};
@ -35,32 +35,32 @@
system {
label = "gb-pc2:green:system";
gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
};
led_status: status {
label = "gb-pc2:green:status";
gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
};
lan1 {
label = "gb-pc2:green:lan1";
gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
};
lan2 {
label = "gb-pc2:green:lan2";
gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
};
lan3-yellow {
label = "gb-pc2:yellow:lan3";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
lan3-green {
label = "gb-pc2:green:lan3";
gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
};
};
@ -114,13 +114,27 @@
status = "okay";
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@4 {
status = "okay";
label = "lan2";
};
};
};
&state_default {
gpio {
ralink,group = "jtag", "rgmii2", "uart3", "wdt";
ralink,function = "gpio";
groups = "jtag", "rgmii2", "uart3", "wdt";
function = "gpio";
};
};

View File

@ -25,12 +25,12 @@
led_status: status {
label = "hc5962:white:status";
gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
};
led_system: system {
label = "hc5962:red:system";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
panic-indicator;
};
};
@ -40,7 +40,7 @@
reset {
label = "reset";
gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
linux,code = <KEY_RESTART>;
};
};
@ -142,9 +142,33 @@
};
};
&state_default {
gpio {
ralink,group = "uart3", "jtag";
ralink,function = "gpio";
&switch0 {
ports {
port@1 {
status = "okay";
label = "lan1";
};
port@2 {
status = "okay";
label = "lan2";
};
port@3 {
status = "okay";
label = "lan3";
};
port@4 {
status = "okay";
label = "wan";
};
};
};
&state_default {
gpio {
groups = "uart3", "jtag";
function = "gpio";
};
};

View File

@ -25,12 +25,12 @@
led_power: power {
label = "wn-ax1167gr:green:power";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
};
wps {
label = "wn-ax1167gr:green:wps";
gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
};
};
@ -39,26 +39,26 @@
reset {
label = "reset";
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
auto {
label = "auto";
gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
custom {
label = "custom";
gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
@ -129,14 +129,45 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&iNIC_rf 0x4>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0x4>;
mtd-mac-address-increment = <1>;
};
port@1 {
status = "okay";
label = "lan4";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan2";
};
port@4 {
status = "okay";
label = "lan1";
};
};
};
&state_default {
gpio {
ralink,group = "uart2", "uart3", "jtag";
ralink,function = "gpio";
groups = "uart2", "uart3", "jtag";
function = "gpio";
};
};

View File

@ -25,12 +25,12 @@
led_power: power {
label = "wn-gx300gr:green:power";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
};
wps {
label = "wn-gx300gr:green:wps";
gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
};
};
@ -39,26 +39,26 @@
reset {
label = "reset";
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
auto {
label = "auto";
gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
custom {
label = "custom";
gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
@ -129,14 +129,45 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0x4>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0x4>;
mtd-mac-address-increment = <1>;
};
port@1 {
status = "okay";
label = "lan4";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan2";
};
port@4 {
status = "okay";
label = "lan1";
};
};
};
&state_default {
gpio {
ralink,group = "uart2", "uart3", "jtag";
ralink,function = "gpio";
groups = "uart2", "uart3", "jtag";
function = "gpio";
};
};

View File

@ -11,6 +11,7 @@
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
label-mac-device = &wan;
};
chosen {
@ -22,12 +23,12 @@
wps {
label = "iodata:green:wps";
gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
};
led_power: power {
label = "iodata:green:power";
gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
};
};
@ -36,20 +37,20 @@
reset {
label = "reset";
gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
repeater {
label = "repeater";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
wps {
label = "wps";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
@ -120,18 +121,48 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
wan: port@0 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe006>;
};
port@1 {
status = "okay";
label = "lan4";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan2";
};
port@4 {
status = "okay";
label = "lan1";
};
};
};
&pcie {
status = "okay";
};
&state_default {
gpio {
ralink,group = "uart2", "uart3", "wdt";
ralink,function = "gpio";
groups = "uart2", "uart3", "wdt";
function = "gpio";
};
};

View File

@ -26,24 +26,24 @@
led_power: power {
label = "wnpr2600g:green:power";
gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
notification {
label = "wnpr2600g:green:notification";
gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
};
wlan2g {
label = "wnpr2600g:green:wlan2g";
gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy0radio";
};
wlan5g {
label = "wnpr2600g:green:wlan5g";
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy1radio";
};
};
@ -53,20 +53,20 @@
auto {
label = "auto";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
reset {
label = "reset";
gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
@ -124,15 +124,43 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "wllll";
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "wan";
};
port@1 {
status = "okay";
label = "lan4";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan2";
};
port@4 {
status = "okay";
label = "lan1";
};
};
};
&state_default {
gpio {
ralink,group = "uart2", "uart3", "jtag", "wdt";
ralink,function = "gpio";
groups = "uart2", "uart3", "jtag", "wdt";
function = "gpio";
};
};

View File

@ -15,7 +15,7 @@
led-failsafe = &led_cpu;
led-running = &led_cpu;
led-upgrade = &led_cpu;
label-mac-device = &ethernet;
label-mac-device = &gmac0;
};
chosen {
@ -27,26 +27,26 @@
usb {
label = "a6ns-m:blue:usb";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>;
linux,default-trigger = "usbport";
};
wlan5g {
label = "a6ns-m:blue:wlan5g";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0radio";
};
wlan2g {
label = "a6ns-m:blue:wlan2g";
gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1radio";
};
led_cpu: cpu {
label = "a6ns-m:blue:cpu";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
};
};
@ -55,13 +55,13 @@
wps {
label = "wps";
gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
reset {
label = "reset";
gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -110,15 +110,45 @@
&state_default {
gpio {
ralink,group = "i2c", "uart3", "jtag", "wdt";
ralink,function = "gpio";
groups = "i2c", "uart3", "jtag", "wdt";
function = "gpio";
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&uboot 0x1fc20>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "wan";
mtd-mac-address = <&uboot 0x1fc40>;
};
port@1 {
status = "okay";
label = "lan1";
};
port@2 {
status = "okay";
label = "lan2";
};
port@3 {
status = "okay";
label = "lan3";
};
port@4 {
status = "okay";
label = "lan4";
};
};
};
&pcie {
status = "okay";
};

View File

@ -26,18 +26,18 @@
led_cpu: cpu {
label = "a8004t:orange:cpu";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
};
wlan2g {
label = "a8004t:orange:wlan2g";
gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0radio";
};
wlan5g {
label = "a8004t:orange:wlan5g";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1radio";
};
};
@ -47,13 +47,13 @@
reset {
label = "reset";
gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
@ -100,10 +100,40 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&uboot 0x1fc20>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "wan";
mtd-mac-address = <&uboot 0x1fc40>;
};
port@1 {
status = "okay";
label = "lan4";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan2";
};
port@4 {
status = "okay";
label = "lan1";
};
};
};
&pcie {
status = "okay";
};
@ -128,7 +158,7 @@
&state_default {
gpio {
ralink,group = "wdt", "jtag", "i2c";
ralink,function = "gpio";
groups = "wdt", "jtag", "i2c";
function = "gpio";
};
};

View File

@ -15,6 +15,7 @@
led-failsafe = &led_wps;
led-running = &led_wps;
led-upgrade = &led_wps;
label-mac-device = &wan;
};
chosen {
@ -26,21 +27,21 @@
usb3 {
label = "jhr-ac876m:blue:usb3";
gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>;
linux,default-trigger = "usbport";
};
usb2 {
label = "jhr-ac876m:blue:usb2";
gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
trigger-sources = <&ehci_port2>;
linux,default-trigger = "usbport";
};
led_wps: wps {
label = "jhr-ac876m:blue:wps";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
};
@ -49,13 +50,13 @@
reset {
label = "reset";
gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
@ -132,13 +133,42 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
wan: port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0x4>;
};
};
};
&state_default {
gpio {
ralink,group = "i2c", "uart3", "jtag", "wdt";
ralink,function = "gpio";
groups = "i2c", "uart3", "jtag", "wdt";
function = "gpio";
};
};

View File

@ -14,7 +14,7 @@
led-failsafe = &led_blue;
led-running = &led_blue;
led-upgrade = &led_blue;
label-mac-device = &ethernet;
label-mac-device = &gmac0;
};
chosen {
@ -26,17 +26,17 @@
status-red {
label = "newifi-d1:red:status";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
status-green {
label = "newifi-d1:green:status";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
led_blue: status-blue {
label = "newifi-d1:blue:status";
gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
default-state = "on";
};
};
@ -46,7 +46,7 @@
reset {
label = "reset";
gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -58,13 +58,13 @@
usb2power {
gpio-export,name = "usb2power";
gpio-export,output = <1>;
gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
};
usb3power {
gpio-export,name = "usb3power";
gpio-export,output = <1>;
gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
};
};
};
@ -77,7 +77,7 @@
status = "okay";
m25p80@0 {
compatible = "mx25l25635f", "jedec,spi-nor";
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <25000000>;
m25p,fast-read;
@ -133,13 +133,33 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan1";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe006>;
};
};
};
&state_default {
gpio {
ralink,group = "wdt", "rgmii2", "jtag", "uart2", "uart3", "i2c";
ralink,function = "gpio";
groups = "jtag", "uart2";
function = "gpio";
};
};

View File

@ -25,12 +25,12 @@
wifi {
label = "re6500:orange:wifi";
gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
};
led_power: power {
label = "re6500:white:power";
gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
};
};
@ -39,13 +39,13 @@
wps {
label = "wps";
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
reset {
label = "reset";
gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
linux,code = <KEY_RESTART>;
};
};
@ -93,8 +93,8 @@
&state_default {
gpio {
ralink,group = "i2c", "uart2", "uart3", "rgmii2";
ralink,function = "gpio";
groups = "i2c", "uart2";
function = "gpio";
};
};
@ -118,10 +118,34 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0x2e>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
};
};
&xhci {
status = "disabled";
};

View File

@ -38,16 +38,16 @@
&state_default {
gpio {
ralink,group = "uart2", "rgmii2";
ralink,function = "gpio";
groups = "uart2", "rgmii2";
function = "gpio";
};
};
&pinctrl {
i2s_pins: i2s {
i2s {
ralink,group = "uart3";
ralink,function = "i2s";
groups = "uart3";
function = "i2s";
};
};
};
@ -118,10 +118,41 @@
status = "okay";
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0x5>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0x5>;
mtd-mac-address-increment = <1>;
};
};
};
&pcie {
status = "okay";
};

View File

@ -45,9 +45,38 @@
status = "okay";
};
&state_default {
gpio {
ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
ralink,function = "gpio";
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
port@4 {
status = "okay";
label = "wan";
};
};
};
&state_default {
gpio {
groups = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
function = "gpio";
};
};

View File

@ -26,13 +26,13 @@
pwr {
label = "rb750gr3:blue:pwr";
gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
led_usr: usr {
label = "rb750gr3:green:usr";
gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
};
};
@ -41,20 +41,20 @@
mode {
label = "mode";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
};
reset {
label = "reset";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
beeper {
compatible = "gpio-beeper";
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
};
gpio_export {
@ -64,7 +64,7 @@
usb_power {
gpio-export,name = "usb_power";
gpio-export,output = <1>;
gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
};
};
};
@ -129,16 +129,47 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&hard_config 0x0010>;
mtd-mac-address-increment = <1>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "wan";
mtd-mac-address = <&hard_config 0x0010>;
mtd-mac-address-increment = <2>;
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
port@4 {
status = "okay";
label = "lan5";
};
};
};
&state_default {
gpio {
/* via gpio7 (uart3 group) the PoE status can be read */
ralink,group = "uart2", "uart3", "jtag", "wdt";
ralink,function = "gpio";
groups = "uart2", "uart3", "jtag", "wdt";
function = "gpio";
};
};

View File

@ -25,32 +25,32 @@
led_usr: usr {
label = "rbm11g:green:usr";
gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
};
rssi0 {
label = "rbm11g:green:rssi0";
gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
};
rssi1 {
label = "rbm11g:green:rssi1";
gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
};
rssi2 {
label = "rbm11g:green:rssi2";
gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
};
rssi3 {
label = "rbm11g:green:rssi3";
gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
};
rssi4 {
label = "rbm11g:green:rssi4";
gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
};
};
@ -59,7 +59,7 @@
res {
label = "reset";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -70,7 +70,7 @@
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
gpio = <&gpio 9 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-boot-on;
regulator-always-on;
@ -138,15 +138,25 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&hard_config 0x0010>;
mtd-mac-address-increment = <1>;
};
&switch0 {
ports {
/* FIXME: Is LAN port at switch port 0? */
port@0 {
status = "okay";
label = "lan";
};
};
};
&state_default {
gpio {
ralink,group = "uart2", "wdt", "rgmii2";
ralink,function = "gpio";
groups = "uart2", "wdt", "rgmii2";
function = "gpio";
};
};

View File

@ -25,7 +25,7 @@
led_usr: usr {
label = "rbm33g:green:usr";
gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
};
};
@ -34,7 +34,7 @@
res {
label = "res";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -45,7 +45,7 @@
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
gpio = <&gpio 9 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-boot-on;
regulator-always-on;
@ -57,7 +57,7 @@
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&gpio0 10 GPIO_ACTIVE_HIGH>;
gpio = <&gpio 10 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-boot-on;
regulator-always-on;
@ -69,7 +69,7 @@
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>;
gpio = <&gpio 11 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-boot-on;
regulator-always-on;
@ -81,7 +81,7 @@
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
gpio = <&gpio 12 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-always-on;
};
@ -162,15 +162,36 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&hard_config 0x0010>;
mtd-mac-address-increment = <1>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "wan";
mtd-mac-address = <&hard_config 0x0010>;
mtd-mac-address-increment = <2>;
};
port@1 {
status = "okay";
label = "lan1";
};
port@2 {
status = "okay";
label = "lan2";
};
};
};
&state_default {
gpio {
ralink,group = "uart2", "wdt";
ralink,function = "gpio";
groups = "uart2", "wdt";
function = "gpio";
};
};

View File

@ -30,7 +30,7 @@
reset {
label = "reset";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -101,13 +101,44 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe000>;
mtd-mac-address-increment = <1>;
};
};
};
&state_default {
gpio {
ralink,group = "wdt", "rgmii2", "jtag", "mdio";
ralink,function = "gpio";
groups = "wdt";
function = "gpio";
};
};

View File

@ -14,7 +14,7 @@
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
label-mac-device = &ethernet;
label-mac-device = &gmac0;
};
chosen {
@ -26,24 +26,24 @@
led_power: power {
label = "wr1201:green:power";
gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
};
usb {
label = "wr1201:green:usb";
gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
linux,default-trigger = "usbport";
};
eth_link {
label = "wr1201:green:eth_link";
gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
};
wps {
label = "wr1201:green:wps";
gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
};
};
@ -52,7 +52,7 @@
reset {
label = "reset";
gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -104,10 +104,41 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0x4>;
};
&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";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0x4>;
mtd-mac-address-increment = <1>;
};
};
};
&sdhci {
status = "okay";
};
@ -144,7 +175,7 @@
&state_default {
gpio {
ralink,group = "rgmii2";
ralink,function = "gpio";
groups = "rgmii2";
function = "gpio";
};
};

View File

@ -26,49 +26,49 @@
power_amber: power_amber {
label = "ex6150:amber:power";
gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
power_green: power_green {
label = "ex6150:green:power";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
wps {
label = "ex6150:green:wps";
gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
rightarrow {
label = "ex6150:blue:rightarrow";
gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
};
leftarrow {
label = "ex6150:blue:leftarrow";
gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
};
router_green {
label = "ex6150:green:router";
gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
router_red {
label = "ex6150:red:router";
gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
};
client_green {
label = "ex6150:green:client";
gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
client_red {
label = "ex6150:red:client";
gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
};
};
@ -77,19 +77,19 @@
wps {
label = "wps";
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
reset {
label = "reset";
gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
toggle {
label = "AP/Extender toggle";
gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
gpios = <&gpio 48 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
/* Active when switch is set to "Access Point" */
};
@ -228,13 +228,22 @@
};
};
&ethernet {
mtd-mac-address = <&factory 0x00000004>;
&gmac0 {
mtd-mac-address = <&factory 0x4>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan";
};
};
};
&state_default {
gpio {
ralink,group = "sdhci", "rgmii2", "jtag";
ralink,function = "gpio";
groups = "sdhci", "rgmii2", "jtag";
function = "gpio";
};
};

View File

@ -12,7 +12,6 @@
led-failsafe = &led_power_orange;
led-running = &led_power_white;
led-upgrade = &led_power_orange;
label-mac-device = &ethernet;
};
leds {
@ -103,12 +102,12 @@
};
wps {
gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
label = "r6700-v2:white:wps";
};
wlan {
gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
label = "r6700-v2:white:wlan";
};
};
@ -116,7 +115,7 @@
&state_default {
gpio {
ralink,group = "uart3", "uart2", "jtag", "wdt";
ralink,function = "gpio";
groups = "uart3", "uart2", "jtag", "wdt";
function = "gpio";
};
};

View File

@ -12,7 +12,6 @@
led-failsafe = &led_power_orange;
led-running = &led_power_white;
led-upgrade = &led_power_orange;
label-mac-device = &ethernet;
};
leds {
@ -105,12 +104,12 @@
};
wps {
gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
label = "r6800:white:wps";
};
wlan {
gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
label = "r6800:white:wlan";
};
};
@ -118,7 +117,7 @@
&state_default {
gpio {
ralink,group = "uart3", "uart2", "jtag", "wdt";
ralink,function = "gpio";
groups = "uart3", "uart2", "jtag", "wdt";
function = "gpio";
};
};

View File

@ -13,7 +13,7 @@
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
label-mac-device = &ethernet;
label-mac-device = &gmac0;
};
chosen {
@ -25,19 +25,19 @@
wps {
label = "wps";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
wifi {
label = "wifi";
gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RFKILL>;
};
reset {
label = "reset";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -46,26 +46,26 @@
compatible = "gpio-leds";
led_power: power {
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
};
led_usb: usb {
gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
linux,default-trigger = "usbport";
};
led_internet: internet {
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
led_wifi: wifi {
gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
led_wps: wps {
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
};
};
@ -74,7 +74,7 @@
regulator-name = "usb_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio0 10 GPIO_ACTIVE_HIGH>;
gpio = <&gpio 10 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
};
@ -105,13 +105,44 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0x4>;
};
&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";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0x4>;
mtd-mac-address-increment = <1>;
};
};
};
&state_default {
gpio {
ralink,group = "uart3", "uart2", "jtag", "wdt";
ralink,function = "gpio";
groups = "uart3", "uart2", "jtag", "wdt";
function = "gpio";
};
};

View File

@ -8,6 +8,10 @@
/ {
compatible = "mediatek,mt7621-soc";
aliases {
label-mac-device = &gmac0;
};
chosen {
bootargs = "console=ttyS0,57600";
};
@ -17,19 +21,19 @@
wps {
label = "wps";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
rfkill {
label = "rfkill";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RFKILL>;
};
reset {
label = "reset";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -57,10 +61,41 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0x4>;
};
&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";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0x4>;
mtd-mac-address-increment = <2>;
};
};
};
&i2c {
status = "okay";

View File

@ -13,7 +13,7 @@
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
label-mac-device = &ethernet;
label-mac-device = &gmac0;
};
chosen {
@ -24,21 +24,21 @@
compatible = "gpio-leds";
led_power: power {
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
};
led_usb: usb {
gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
linux,default-trigger = "usbport";
};
led_internet: internet {
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
led_wifi: wifi {
gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
};
@ -48,13 +48,13 @@
wps {
label = "wps";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
reset {
label = "reset";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -64,7 +64,7 @@
regulator-name = "usb_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio0 10 GPIO_ACTIVE_HIGH>;
gpio = <&gpio 10 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
};
@ -95,14 +95,45 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0x4>;
};
&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";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0x4>;
mtd-mac-address-increment = <2>;
};
};
};
&state_default {
gpio {
ralink,group = "uart3", "uart2", "jtag", "wdt";
ralink,function = "gpio";
groups = "uart3", "uart2", "jtag", "wdt";
function = "gpio";
};
};

View File

@ -14,7 +14,7 @@
led-failsafe = &led_wps;
led-running = &led_wps;
led-upgrade = &led_wps;
label-mac-device = &ethernet;
label-mac-device = &gmac0;
};
chosen {
@ -26,14 +26,14 @@
usb {
label = "wf2881:green:usb";
gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
linux,default-trigger = "usbport";
};
led_wps: wps {
label = "wf2881:green:wps";
gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
};
};
@ -42,7 +42,7 @@
reset {
label = "reset";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -127,13 +127,43 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&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";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe006>;
};
};
};
&state_default {
gpio {
ralink,group = "uart3", "uart2";
ralink,function = "gpio";
groups = "uart3", "uart2";
function = "gpio";
};
};

View File

@ -25,17 +25,17 @@
stat_r {
label = "k2p:red:status";
gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
};
stat_y {
label = "k2p:yellow:status";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
led_blue: stat_b {
label = "k2p:blue:status";
gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
};
@ -44,7 +44,7 @@
reset {
label = "reset";
gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -101,21 +101,49 @@
};
&pcie0 {
wifi@0,0 {
compatible = "mediatek,mt76";
mt76@0,0 {
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0000>;
mtd-mac-address = <&factory 0xe000>;
mediatek,mtd-eeprom = <&factory 0x0>;
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe006>;
};
};
};
&state_default {
gpio {
ralink,group = "i2c", "jtag";
ralink,function = "gpio";
groups = "i2c", "jtag";
function = "gpio";
};
};

View File

@ -25,7 +25,7 @@
led_power: power {
label = "vr500:green:power";
gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
};
};
@ -34,7 +34,7 @@
reset {
label = "reset";
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -80,13 +80,43 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe006>;
};
};
};
&state_default {
gpio {
ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
ralink,function = "gpio";
groups = "sdhci";
function = "gpio";
};
};

View File

@ -24,12 +24,12 @@
led_wps: wps {
label = "sk-wb8:green:wps";
gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
};
usb {
label = "sk-wb8:green:usb";
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
linux,default-trigger = "usbport";
};
@ -40,13 +40,13 @@
wps {
label = "wps";
gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
reset {
label = "reset";
gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -110,13 +110,43 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe006>;
};
};
};
&state_default {
gpio {
ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
ralink,function = "gpio";
groups = "sdhci";
function = "gpio";
};
};

View File

@ -18,7 +18,7 @@
usb {
label = "sap-g3200u3:green:usb";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
linux,default-trigger = "usbport";
};
@ -29,13 +29,13 @@
reset {
label = "reset";
gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
rfkill {
label = "rfkill";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RFKILL>;
};
};
@ -107,13 +107,44 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe006>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe006>;
mtd-mac-address-increment = <1>;
};
};
};
&state_default {
gpio {
ralink,group = "uart3", "jtag";
ralink,function = "gpio";
groups = "uart3", "jtag";
function = "gpio";
};
};

View File

@ -27,7 +27,7 @@
reset {
label = "reset";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -37,47 +37,47 @@
system_led: system {
label = "x1:green:system";
gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
};
modem_offline {
label = "x1:red:modem-offline";
gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
};
modem_4g {
label = "x1:blue:modem-4g";
gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
};
modem_3g {
label = "x1:green:modem-3g";
gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
};
modem_rssi_lowest {
label = "x1:green:modem-rssi-lowest";
gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
};
modem_rssi_low {
label = "x1:green:modem-rssi-low";
gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
};
modem_rssi_medium {
label = "x1:green:modem-rssi-medium";
gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
};
modem_rssi_high {
label = "x1:green:modem-rssi-high";
gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
};
modem_rssi_highest {
label = "x1:green:modem-rssi-highest";
gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
};
};
};
@ -122,19 +122,49 @@
};
};
&gpio0 {
&gpio {
status = "okay";
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe006>;
mediatek,portmap = "llllw";
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe006>;
mtd-mac-address-increment = <1>;
};
};
};
&state_default {
gpio {
ralink,group = "jtag", "uart2", "wdt", "rgmii2";
ralink,function = "gpio";
groups = "wdt", "rgmii2";
function = "gpio";
};
};

View File

@ -25,12 +25,12 @@
statw {
label = "timecloud:white:status";
gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
};
led_statuso: stato {
label = "timecloud:orange:status";
gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
};
};
@ -39,13 +39,13 @@
reset {
label = "reset";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
BTN_0 {
label = "BTN_0";
gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
};
};
@ -95,13 +95,22 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@4 {
status = "okay";
label = "lan";
};
};
};
&state_default {
gpio {
ralink,group = "i2c", "uart2", "jtag";
ralink,function = "gpio";
groups = "i2c", "uart2", "jtag";
function = "gpio";
};
};

View File

@ -26,7 +26,7 @@
led_sys: sys {
label = "a7000r:blue:sys";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
};
};
@ -35,7 +35,7 @@
reset {
label = "reset";
gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
linux,code = <KEY_RESTART>;
};
@ -104,13 +104,44 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe000>;
mtd-mac-address-increment = <1>;
};
};
};
&state_default {
gpio {
ralink,group = "i2c", "wdt";
ralink,function = "gpio";
groups = "i2c", "wdt";
function = "gpio";
};
};

View File

@ -25,37 +25,37 @@
led_power: power {
label = "re350-v1:blue:power";
gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
};
wifi2g {
label = "re350-v1:blue:wifi2G";
gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
};
wifi5g {
label = "re350-v1:blue:wifi5G";
gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
};
wps_r {
label = "re350-v1:red:wps";
gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
};
wps_b {
label = "re350-v1:blue:wps";
gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;
};
eth {
label = "re350-v1:green:eth_act";
gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
};
eth2 {
label = "re350-v1:green:eth_link";
gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
};
};
@ -64,25 +64,25 @@
led {
label = "led";
gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
};
reset {
label = "reset";
gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
power {
label = "power";
gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>;
};
wps {
label = "wps";
gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
@ -151,13 +151,22 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&config 0x10008>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan";
};
};
};
&state_default {
gpio {
ralink,group = "rgmii2", "wdt";
ralink,function = "gpio";
groups = "rgmii2", "wdt";
function = "gpio";
};
};

View File

@ -15,7 +15,7 @@
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
label-mac-device = &ethernet;
label-mac-device = &gmac0;
};
chosen {
@ -27,37 +27,37 @@
led_power: power {
label = "re650-v1:blue:power";
gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
};
wifi2g {
label = "re650-v1:blue:wifi2G";
gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
};
wifi5g {
label = "re650-v1:blue:wifi5G";
gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
};
wps_red {
label = "re650-v1:red:wps";
gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;
};
wps_blue {
label = "re650-v1:blue:wps";
gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
};
eth_act {
label = "re650-v1:green:eth_act";
gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
};
eth_link {
label = "re650-v1:green:eth_link";
gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
};
};
@ -66,28 +66,28 @@
wps {
label = "wps";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
linux,code = <KEY_WPS_BUTTON>;
};
power {
label = "power";
gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
linux,code = <KEY_POWER>;
};
led {
label = "led";
gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
linux,code = <KEY_LIGHTS_TOGGLE>;
};
reset {
label = "reset";
gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
linux,code = <KEY_RESTART>;
};
@ -164,13 +164,23 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&config 0x10008>;
};
&state_default {
gpio {
ralink,group = "rgmii2", "wdt";
ralink,function = "gpio";
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan";
};
};
};
&state_default {
gpio {
groups = "rgmii2", "wdt";
function = "gpio";
};
};

View File

@ -5,18 +5,13 @@
/ {
model = "UBNT-ERX-SFP";
compatible = "ubiquiti,edgerouterx-sfp", "mediatek,mt7621-soc";
};
i2c-gpio {
compatible = "i2c-gpio";
gpios = <&gpio0 3 GPIO_ACTIVE_HIGH /* sda */
&gpio0 4 GPIO_ACTIVE_HIGH /* scl */
>;
#address-cells = <1>;
#size-cells = <0>;
&i2c {
status = "okay";
pca9555@25 {
compatible = "pca9555";
reg = <0x25>;
};
pca9555@25 {
compatible = "nxp,pca9555";
reg = <0x25>;
};
};

View File

@ -5,7 +5,7 @@
/ {
aliases {
label-mac-device = &ethernet;
label-mac-device = &gmac0;
};
chosen {
@ -17,14 +17,52 @@
reset {
label = "reset";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0x22>;
label = "dsa";
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "eth0";
};
port@1 {
status = "okay";
label = "eth1";
mtd-mac-address = <&factory 0x22>;
mtd-mac-address-increment = <1>;
};
port@2 {
status = "okay";
label = "eth2";
mtd-mac-address = <&factory 0x22>;
mtd-mac-address-increment = <2>;
};
port@3 {
status = "okay";
label = "eth3";
mtd-mac-address = <&factory 0x22>;
mtd-mac-address-increment = <3>;
};
port@4 {
status = "okay";
label = "eth4";
mtd-mac-address = <&factory 0x22>;
mtd-mac-address-increment = <4>;
};
};
};
&nand {
@ -71,8 +109,8 @@
&state_default {
gpio {
ralink,group = "uart2", "uart3", "i2c", "pcie", "rgmii2", "jtag";
ralink,function = "gpio";
groups = "uart2", "uart3", "pcie", "rgmii2", "jtag";
function = "gpio";
};
};

View File

@ -15,8 +15,7 @@
led-failsafe = &led_white;
led-running = &led_blue;
led-upgrade = &led_blue;
label-mac-device = &ethernet;
label-mac-device = &gmac0;
};
chosen {
@ -28,12 +27,12 @@
led_blue: dome_blue {
label = "nanohd:blue:dome";
gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
};
led_white: dome_white {
label = "nanohd:white:dome";
gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
};
};
@ -42,7 +41,7 @@
reset {
label = "reset";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -129,13 +128,22 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&eeprom 0x0>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan";
};
};
};
&state_default {
gpio {
ralink,group = "i2c", "uart2";
ralink,function = "gpio";
groups = "i2c", "uart2";
function = "gpio";
};
};

View File

@ -58,7 +58,7 @@
modem_reset {
gpio-export,name = "modem_reset";
gpio-export,output = <1>;
gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
};
@ -67,7 +67,7 @@
reset {
label = "reset";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -77,22 +77,22 @@
led_status: status {
label = "u7621-06:green:status";
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
};
led4 {
label = "u7621-06:green:led4";
gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
};
led5 {
label = "u7621-06:green:led5";
gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
};
};
};
&gpio0 {
&gpio {
status = "okay";
};
@ -104,14 +104,44 @@
status = "okay";
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
mediatek,portmap = "llllw";
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe000>;
mtd-mac-address-increment = <1>;
};
};
};
&state_default {
gpio {
ralink,group = "jtag", "uart2", "wdt";
ralink,function = "gpio";
groups = "jtag", "uart2", "wdt";
function = "gpio";
};
};

View File

@ -11,7 +11,7 @@
usb {
label = "11acnas:green:usb";
gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
linux,default-trigger = "usbport";
};

View File

@ -11,7 +11,7 @@
usb {
label = "w2914nsv2:green:usb";
gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
linux,default-trigger = "usbport";
};

View File

@ -4,6 +4,10 @@
#include <dt-bindings/input/input.h>
/ {
aliases {
label-mac-device = &wan;
};
chosen {
bootargs = "console=ttyS0,57600";
};
@ -13,13 +17,13 @@
reset {
label = "reset";
gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
@ -97,13 +101,42 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&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";
mtd-mac-address = <&factory 0x2e>;
};
};
};
&state_default {
gpio {
ralink,group = "wdt", "rgmii2";
ralink,function = "gpio";
groups = "wdt", "rgmii2";
function = "gpio";
};
};

View File

@ -15,6 +15,7 @@
led-failsafe = &led_status_yellow;
led-running = &led_status_blue;
led-upgrade = &led_status_yellow;
label-mac-device = &wan;
};
chosen {
@ -26,12 +27,12 @@
led_status_blue: status_blue {
label = "mir3gv2:blue:status";
gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
};
led_status_yellow: status_yellow {
label = "mir3gv2:yellow:status";
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
};
};
@ -40,7 +41,7 @@
reset {
label = "reset";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -132,14 +133,32 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
mediatek,portmap = "llllw";
};
&switch0 {
ports {
port@2 {
status = "okay";
label = "lan2";
};
port@3 {
status = "okay";
label = "lan1";
};
wan: port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe006>;
};
};
};
&state_default {
gpio {
ralink,group = "jtag", "uart2", "uart3", "wdt";
ralink,function = "gpio";
groups = "jtag", "uart2", "uart3", "wdt";
function = "gpio";
};
};

View File

@ -14,6 +14,7 @@
led-failsafe = &led_status_red;
led-running = &led_status_blue;
led-upgrade = &led_status_yellow;
label-mac-device = &gmac0;
};
chosen {
@ -25,32 +26,35 @@
led_status_red: status_red {
label = "mir3g:red:status";
gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
};
led_status_blue: status_blue {
label = "mir3g:blue:status";
gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
};
led_status_yellow: status_yellow {
label = "mir3g:yellow:status";
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
};
wan_amber {
label = "mir3g:amber:wan";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
linux,default-trigger = "dsa-0.0:01:1Gbps";
};
lan1_amber {
label = "mir3g:amber:lan1";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
linux,default-trigger = "dsa-0.0:03:1Gbps";
};
lan2_amber {
label = "mir3g:amber:lan2";
gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
linux,default-trigger = "dsa-0.0:02:1Gbps";
};
};
@ -59,7 +63,7 @@
reset {
label = "reset";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -69,7 +73,7 @@
regulator-name = "usb_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
gpio = <&gpio 12 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
};
@ -186,14 +190,33 @@
};
};
&ethernet {
mtd-mac-address = <&factory 0xe000>;
mediatek,portmap = "lwlll";
&gmac0 {
mtd-mac-address = <&factory 0xe006>;
};
&switch0 {
ports {
port@1 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe000>;
};
port@2 {
status = "okay";
label = "lan2";
};
port@3 {
status = "okay";
label = "lan1";
};
};
};
&state_default {
gpio {
ralink,group = "jtag", "uart2", "uart3", "wdt";
ralink,function = "gpio";
groups = "jtag", "uart2", "uart3", "wdt";
function = "gpio";
};
};

View File

@ -15,6 +15,7 @@
led-failsafe = &led_status_red;
led-running = &led_status_blue;
led-upgrade = &led_status_yellow;
label-mac-device = &gmac0;
};
chosen {
@ -26,37 +27,41 @@
led_status_red: status_red {
label = "mir3p:red:status";
gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
};
led_status_blue: status_blue {
label = "mir3p:blue:status";
gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
};
led_status_yellow: status_yellow {
label = "mir3p:yellow:status";
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
};
wan_amber {
label = "mir3p:amber:wan";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
linux,default-trigger = "dsa-0.0:04:1Gbps";
};
lan3_amber {
label = "mir3p:amber:lan3";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
linux,default-trigger = "dsa-0.0:01:1Gbps";
};
lan2_amber {
label = "mir3p:amber:lan2";
gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
linux,default-trigger = "dsa-0.0:02:1Gbps";
};
lan1_amber {
label = "mir3p:amber:lan1";
gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
linux,default-trigger = "dsa-0.0:03:1Gbps";
};
};
@ -65,7 +70,7 @@
reset {
label = "reset";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -75,7 +80,7 @@
regulator-name = "usb_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
gpio = <&gpio 12 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
};
@ -171,14 +176,38 @@
};
};
&ethernet {
mtd-mac-address = <&factory 0xe000>;
mediatek,portmap = "llllw";
&gmac0 {
mtd-mac-address = <&factory 0xe006>;
};
&switch0 {
ports {
port@1 {
status = "okay";
label = "lan3";
};
port@2 {
status = "okay";
label = "lan2";
};
port@3 {
status = "okay";
label = "lan1";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe000>;
};
};
};
&state_default {
gpio {
ralink,group = "jtag", "uart2", "uart3", "wdt";
ralink,function = "gpio";
groups = "jtag", "uart2", "uart3", "wdt";
function = "gpio";
};
};

View File

@ -14,7 +14,7 @@
led-failsafe = &led_sys;
led-running = &led_sys;
led-upgrade = &led_sys;
label-mac-device = &ethernet;
label-mac-device = &gmac0;
};
chosen {
@ -26,12 +26,12 @@
work {
label = "xy-c5:green:work";
gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
};
led_sys: sys {
label = "xy-c5:green:sys";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
};
};
@ -40,7 +40,7 @@
reset {
label = "reset";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -90,13 +90,44 @@
status = "okay";
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0x4>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0x4>;
mtd-mac-address-increment = <1>;
};
};
};
&state_default {
gpio {
ralink,group = "uart3", "wdt";
ralink,function = "gpio";
groups = "uart3", "wdt";
function = "gpio";
};
};

View File

@ -26,29 +26,29 @@
power {
label = "creativebox-v1:blue:power";
gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led_sys: sys {
label = "creativebox-v1:blue:sys";
gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
};
internet {
label = "creativebox-v1:blue:internet";
gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
};
wlan2g {
label = "creativebox-v1:blue:wlan2g";
gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
wlan5g {
label = "creativebox-v1:blue:wlan5g";
gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
};
@ -58,7 +58,7 @@
reset {
label = "reset";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -70,19 +70,19 @@
power_usb2 {
gpio-export,name = "power_usb2";
gpio-export,output = <1>;
gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
};
power_usb3 {
gpio-export,name = "power_usb3";
gpio-export,output = <1>;
gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
};
power_sata {
gpio-export,name = "power_sata";
gpio-export,output = <1>;
gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
};
};
};
@ -152,13 +152,44 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe000>;
mtd-mac-address-increment = <1>;
};
};
};
&state_default {
gpio {
ralink,group = "wdt", "rgmii2";
ralink,function = "gpio";
groups = "wdt", "rgmii2";
function = "gpio";
};
};

View File

@ -23,17 +23,17 @@
internet {
label = "wr1200js:blue:internet";
gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
};
led_wps: wps {
label = "wr1200js:blue:wps";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
};
usb {
label = "wr1200js:blue:usb";
gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
linux,default-trigger = "usbport";
};
@ -44,19 +44,19 @@
reset {
label = "reset";
gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
wifi {
label = "wifi";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RFKILL>;
};
};
@ -126,13 +126,43 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe006>;
};
port@1 {
status = "okay";
label = "lan1";
};
port@2 {
status = "okay";
label = "lan2";
};
port@3 {
status = "okay";
label = "lan3";
};
port@4 {
status = "okay";
label = "lan4";
};
};
};
&state_default {
gpio {
ralink,group = "i2c", "uart2", "uart3", "wdt";
ralink,function = "gpio";
groups = "i2c", "uart2", "uart3", "wdt";
function = "gpio";
};
};

View File

@ -26,18 +26,18 @@
led_power: power {
label = "yk-l2:blue:power";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led_wps: wps {
label = "yk-l2:blue:wps";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
usb {
label = "yk-l2:blue:usb";
gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
linux,default-trigger = "usbport";
};
@ -48,13 +48,13 @@
reset {
label = "reset";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
@ -137,13 +137,43 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe006>;
};
};
};
&state_default {
gpio {
ralink,group = "jtag", "wdt";
ralink,function = "gpio";
groups = "jtag", "wdt";
function = "gpio";
};
};

View File

@ -22,7 +22,7 @@
reset {
label = "reset";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -30,8 +30,8 @@
&state_default {
gpio {
ralink,group = "wdt";
ralink,function = "gpio";
groups = "wdt";
function = "gpio";
};
};
@ -75,10 +75,40 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe006>;
};
};
};
&pcie {
status = "okay";
};

View File

@ -24,7 +24,7 @@
reset {
label = "reset";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -99,13 +99,43 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe006>;
};
};
};
&state_default {
gpio {
ralink,group = "wdt";
ralink,function = "gpio";
groups = "wdt";
function = "gpio";
};
};

View File

@ -31,7 +31,7 @@
reset {
label = "reset";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -41,7 +41,7 @@
led_status: status {
label = "zbt-wg2626:green:status";
gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
};
};
};
@ -110,13 +110,44 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe000>;
mtd-mac-address-increment = <1>;
};
};
};
&state_default {
gpio {
ralink,group = "wdt", "rgmii2", "jtag", "mdio";
ralink,function = "gpio";
groups = "wdt", "rgmii2";
function = "gpio";
};
};

View File

@ -29,7 +29,7 @@
reset {
label = "reset";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@ -39,7 +39,7 @@
led_status: status {
label = "zbt-wg3526:green:status";
gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
};
};
};
@ -112,13 +112,44 @@
};
};
&ethernet {
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan1";
};
port@1 {
status = "okay";
label = "lan2";
};
port@2 {
status = "okay";
label = "lan3";
};
port@3 {
status = "okay";
label = "lan4";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe000>;
mtd-mac-address-increment = <1>;
};
};
};
&state_default {
gpio {
ralink,group = "wdt", "rgmii2", "jtag", "mdio";
ralink,function = "gpio";
groups = "wdt", "rgmii2";
function = "gpio";
};
};

View File

@ -12,7 +12,7 @@
usb {
label = "freezio:green:usb";
gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
trigger-sources = <&xhci_ehci_port1>;
linux,default-trigger = "usbport";
};

View File

@ -98,15 +98,9 @@ static void mt7621_hw_init(struct mt7620_gsw *gsw, struct device_node *np)
mt7530_mdio_w32(gsw, 0x7000, 0x3);
usleep_range(10, 20);
if ((rt_sysc_r32(SYSC_REG_CHIP_REV_ID) & 0xFFFF) == 0x0101) {
/* (GE1, Force 1000M/FD, FC ON, MAX_RX_LENGTH 1536) */
mtk_switch_w32(gsw, 0x2305e30b, GSW_REG_MAC_P0_MCR);
mt7530_mdio_w32(gsw, 0x3600, 0x5e30b);
} else {
/* (GE1, Force 1000M/FD, FC ON, MAX_RX_LENGTH 1536) */
mtk_switch_w32(gsw, 0x2305e33b, GSW_REG_MAC_P0_MCR);
mt7530_mdio_w32(gsw, 0x3600, 0x5e33b);
}
/* (GE1, Force 1000M/FD, FC OFF, MAX_RX_LENGTH 1536) */
mtk_switch_w32(gsw, 0x2305e30b, GSW_REG_MAC_P0_MCR);
mt7530_mdio_w32(gsw, 0x3600, 0x5e30b);
/* (GE2, Link down) */
mtk_switch_w32(gsw, 0x8000, GSW_REG_MAC_P1_MCR);
@ -186,22 +180,6 @@ static void mt7621_hw_init(struct mt7620_gsw *gsw, struct device_node *np)
mt7530_mdio_w32(gsw, 0x7a74, 0x44);
mt7530_mdio_w32(gsw, 0x7a7c, 0x44);
/* Disable EEE */
for (i = 0; i <= 4; i++) {
_mt7620_mii_write(gsw, i, 13, 0x7);
_mt7620_mii_write(gsw, i, 14, 0x3C);
_mt7620_mii_write(gsw, i, 13, 0x4007);
_mt7620_mii_write(gsw, i, 14, 0x0);
}
/* Disable EEE 10Base-Te */
for (i = 0; i <= 4; i++) {
_mt7620_mii_write(gsw, i, 13, 0x1f);
_mt7620_mii_write(gsw, i, 14, 0x027b);
_mt7620_mii_write(gsw, i, 13, 0x401f);
_mt7620_mii_write(gsw, i, 14, 0x1177);
}
/* turn on all PHYs */
for (i = 0; i <= 4; i++) {
val = _mt7620_mii_read(gsw, i, 0);

View File

@ -781,65 +781,6 @@ mt7530_get_port_link(struct switch_dev *dev, int port,
return 0;
}
static int mt7530_set_port_link(struct switch_dev *sw_dev, int port,
struct switch_port_link *link)
{
if (port < 0 || port >= MT7530_NUM_PORTS)
return -EINVAL;
/* Setup autoneg advertise here */
if (link->aneg) {
u16 bmsr, adv, gctrl;
bool ercap;
sw_dev->ops->phy_read16(sw_dev, port, MII_BMSR, &bmsr);
/* ERCAP means we have MII_CTRL1000 register */
ercap = !!(bmsr | BMSR_ERCAP);
adv = ADVERTISE_CSMA | ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM;
gctrl = CTL1000_ENABLE_MASTER;
switch (link->speed) {
case SWITCH_PORT_SPEED_10:
if (link->duplex)
adv |= ADVERTISE_10FULL;
else
adv |= ADVERTISE_10HALF;
break;
case SWITCH_PORT_SPEED_100:
if (link->duplex)
adv |= ADVERTISE_100FULL;
else
adv |= ADVERTISE_100HALF;
break;
case SWITCH_PORT_SPEED_1000:
if (!ercap || !link->duplex)
return -ENOTSUPP;
/* PHY only supports 1000FULL */
gctrl |= ADVERTISE_1000FULL;
break;
default:
/* For unknown input speed just enable all speed grades */
if (link->duplex) {
adv |= ADVERTISE_FULL;
gctrl |= ADVERTISE_1000FULL;
} else {
adv |= ADVERTISE_10HALF | ADVERTISE_100HALF;
gctrl = 0x0;
}
break;
}
sw_dev->ops->phy_write16(sw_dev, port, MII_ADVERTISE, adv);
if (ercap)
sw_dev->ops->phy_write16(sw_dev, port, MII_CTRL1000, gctrl);
/* Autoneg restart will be triggered in switch_generic_set_link */
}
/* Let switch_generic_set_link handle not autoneg case */
return switch_generic_set_link(sw_dev, port, link);
}
static u64 get_mib_counter(struct mt7530_priv *priv, int i, int port)
{
unsigned int port_base;
@ -980,24 +921,6 @@ static int mt7621_get_port_stats(struct switch_dev *dev, int port,
return 0;
}
static int mt7530_phy_read16(struct switch_dev *dev, int addr,
u8 reg, u16 *value)
{
struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev);
*value = mdiobus_read(priv->bus, addr, reg);
return 0;
}
static int mt7530_phy_write16(struct switch_dev *dev, int addr,
u8 reg, u16 value)
{
struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev);
return mdiobus_write(priv->bus, addr, reg, value);
}
static const struct switch_attr mt7530_global[] = {
{
.type = SWITCH_TYPE_INT,
@ -1111,12 +1034,9 @@ static const struct switch_dev_ops mt7621_ops = {
.get_port_pvid = mt7530_get_port_pvid,
.set_port_pvid = mt7530_set_port_pvid,
.get_port_link = mt7530_get_port_link,
.set_port_link = mt7530_set_port_link,
.get_port_stats = mt7621_get_port_stats,
.apply_config = mt7530_apply_config,
.reset_switch = mt7530_reset_switch,
.phy_read16 = mt7530_phy_read16,
.phy_write16 = mt7530_phy_write16,
};
static const struct switch_dev_ops mt7530_ops = {
@ -1137,12 +1057,9 @@ static const struct switch_dev_ops mt7530_ops = {
.get_port_pvid = mt7530_get_port_pvid,
.set_port_pvid = mt7530_set_port_pvid,
.get_port_link = mt7530_get_port_link,
.set_port_link = mt7530_set_port_link,
.get_port_stats = mt7530_get_port_stats,
.apply_config = mt7530_apply_config,
.reset_switch = mt7530_reset_switch,
.phy_read16 = mt7530_phy_read16,
.phy_write16 = mt7530_phy_write16,
};
int

View File

@ -242,7 +242,7 @@ static void fe_clean_rx(struct fe_priv *priv)
}
if (ring->rx_dma) {
dma_free_coherent(priv->dev,
dma_free_coherent(&priv->netdev->dev,
ring->rx_ring_size * sizeof(*ring->rx_dma),
ring->rx_dma,
ring->rx_phys);
@ -259,6 +259,7 @@ static void fe_clean_rx(struct fe_priv *priv)
static int fe_alloc_rx(struct fe_priv *priv)
{
struct net_device *netdev = priv->netdev;
struct fe_rx_ring *ring = &priv->rx_ring;
int i, pad;
@ -275,7 +276,7 @@ static int fe_alloc_rx(struct fe_priv *priv)
goto no_rx_mem;
}
ring->rx_dma = dma_alloc_coherent(priv->dev,
ring->rx_dma = dma_alloc_coherent(&netdev->dev,
ring->rx_ring_size * sizeof(*ring->rx_dma),
&ring->rx_phys,
GFP_ATOMIC | __GFP_ZERO);
@ -287,11 +288,11 @@ static int fe_alloc_rx(struct fe_priv *priv)
else
pad = NET_IP_ALIGN;
for (i = 0; i < ring->rx_ring_size; i++) {
dma_addr_t dma_addr = dma_map_single(priv->dev,
dma_addr_t dma_addr = dma_map_single(&netdev->dev,
ring->rx_data[i] + NET_SKB_PAD + pad,
ring->rx_buf_size,
DMA_FROM_DEVICE);
if (unlikely(dma_mapping_error(priv->dev, dma_addr)))
if (unlikely(dma_mapping_error(&netdev->dev, dma_addr)))
goto no_rx_mem;
ring->rx_dma[i].rxd1 = (unsigned int)dma_addr;
@ -341,7 +342,7 @@ static void fe_txd_unmap(struct device *dev, struct fe_tx_buf *tx_buf)
static void fe_clean_tx(struct fe_priv *priv)
{
int i;
struct device *dev = priv->dev;
struct device *dev = &priv->netdev->dev;
struct fe_tx_ring *ring = &priv->tx_ring;
if (ring->tx_buf) {
@ -377,7 +378,7 @@ static int fe_alloc_tx(struct fe_priv *priv)
if (!ring->tx_buf)
goto no_tx_mem;
ring->tx_dma = dma_alloc_coherent(priv->dev,
ring->tx_dma = dma_alloc_coherent(&priv->netdev->dev,
ring->tx_ring_size * sizeof(*ring->tx_dma),
&ring->tx_phys,
GFP_ATOMIC | __GFP_ZERO);
@ -564,7 +565,7 @@ static inline u32 fe_empty_txd(struct fe_tx_ring *ring)
barrier();
return (u32)(ring->tx_ring_size -
((ring->tx_next_idx - ring->tx_free_idx) &
(ring->tx_ring_size - 1)) - 1);
(ring->tx_ring_size - 1)));
}
struct fe_map_state {
@ -663,7 +664,7 @@ static int fe_tx_map_dma(struct sk_buff *skb, struct net_device *dev,
{
struct fe_priv *priv = netdev_priv(dev);
struct fe_map_state st = {
.dev = priv->dev,
.dev = &dev->dev,
.ring_idx = ring->tx_next_idx,
};
struct sk_buff *head = skb;
@ -763,7 +764,7 @@ err_dma:
j = ring->tx_next_idx;
for (i = 0; i < tx_num; i++) {
/* unmap dma */
fe_txd_unmap(priv->dev, &ring->tx_buf[j]);
fe_txd_unmap(&dev->dev, &ring->tx_buf[j]);
ring->tx_dma[j].txd2 = TX_DMA_DESP2_DEF;
j = NEXT_TX_DESP_IDX(j);
@ -907,11 +908,11 @@ static int fe_poll_rx(struct napi_struct *napi, int budget,
stats->rx_dropped++;
goto release_desc;
}
dma_addr = dma_map_single(priv->dev,
dma_addr = dma_map_single(&netdev->dev,
new_data + NET_SKB_PAD + pad,
ring->rx_buf_size,
DMA_FROM_DEVICE);
if (unlikely(dma_mapping_error(priv->dev, dma_addr))) {
if (unlikely(dma_mapping_error(&netdev->dev, dma_addr))) {
skb_free_frag(new_data);
goto release_desc;
}
@ -924,7 +925,7 @@ static int fe_poll_rx(struct napi_struct *napi, int budget,
}
skb_reserve(skb, NET_SKB_PAD + NET_IP_ALIGN);
dma_unmap_single(priv->dev, trxd.rxd1,
dma_unmap_single(&netdev->dev, trxd.rxd1,
ring->rx_buf_size, DMA_FROM_DEVICE);
pktlen = RX_DMA_GET_PLEN0(trxd.rxd2);
skb->dev = netdev;
@ -980,6 +981,7 @@ static int fe_poll_tx(struct fe_priv *priv, int budget, u32 tx_intr,
int *tx_again)
{
struct net_device *netdev = priv->netdev;
struct device *dev = &netdev->dev;
unsigned int bytes_compl = 0;
struct sk_buff *skb;
struct fe_tx_buf *tx_buf;
@ -1002,7 +1004,7 @@ static int fe_poll_tx(struct fe_priv *priv, int budget, u32 tx_intr,
done++;
budget--;
}
fe_txd_unmap(priv->dev, tx_buf);
fe_txd_unmap(dev, tx_buf);
idx = NEXT_TX_DESP_IDX(idx);
}
ring->tx_free_idx = idx;

Some files were not shown because too many files have changed in this diff Show More