Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled

This commit is contained in:
domenico
2025-06-24 14:35:53 +02:00
commit c06fb25d1f
9263 changed files with 1750214 additions and 0 deletions

View File

@@ -0,0 +1,648 @@
/dts-v1/;
/ {
#address-cells = <1>;
#size-cells = <1>;
compatible = "ralink,mt7620a-soc";
aliases {
spi0 = &spi0;
spi1 = &spi1;
serial0 = &uartlite;
};
cpus {
#address-cells = <1>;
#size-cells = <0>;
cpu@0 {
compatible = "mips,mips24KEc";
reg = <0>;
};
};
chosen {
bootargs = "console=ttyS0,57600";
};
cpuintc: cpuintc {
#address-cells = <0>;
#interrupt-cells = <1>;
interrupt-controller;
compatible = "mti,cpu-interrupt-controller";
};
mmc_reg_1v8: regulator-1v8 {
compatible = "regulator-fixed";
enable-active-high;
regulator-always-on;
regulator-max-microvolt = <1800000>;
regulator-min-microvolt = <1800000>;
regulator-name = "mmc_io";
};
mmc_reg_3v3: regulator-3v3 {
compatible = "regulator-fixed";
enable-active-high;
regulator-always-on;
regulator-max-microvolt = <3300000>;
regulator-min-microvolt = <3300000>;
regulator-name = "mmc_power";
};
palmbus: palmbus@10000000 {
compatible = "palmbus";
reg = <0x10000000 0x200000>;
ranges = <0x0 0x10000000 0x1FFFFF>;
#address-cells = <1>;
#size-cells = <1>;
sysc: syscon@0 {
compatible = "ralink,mt7620-sysc", "syscon";
reg = <0x0 0x100>;
#clock-cells = <1>;
#reset-cells = <1>;
};
timer: timer@100 {
compatible = "ralink,rt2880-timer";
reg = <0x100 0x20>;
clocks = <&sysc 7>;
interrupt-parent = <&intc>;
interrupts = <1>;
};
watchdog: watchdog@120 {
compatible = "ralink,rt2880-wdt";
reg = <0x120 0x10>;
clocks = <&sysc 8>;
resets = <&sysc 8>;
reset-names = "wdt";
interrupt-parent = <&intc>;
interrupts = <1>;
};
intc: intc@200 {
compatible = "ralink,rt2880-intc";
reg = <0x200 0x100>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&cpuintc>;
interrupts = <2>;
};
memc: memc@300 {
compatible = "ralink,mt7620a-memc", "ralink,rt3050-memc";
reg = <0x300 0x100>;
interrupt-parent = <&intc>;
interrupts = <3>;
};
uart: uart@500 {
compatible = "ralink,mt7620a-uart", "ralink,rt2880-uart", "ns16550a";
reg = <0x500 0x100>;
clocks = <&sysc 9>;
resets = <&sysc 12>;
interrupt-parent = <&intc>;
interrupts = <5>;
reg-shift = <2>;
status = "disabled";
};
gpio0: gpio@600 {
compatible = "ralink,rt2880-gpio";
reg = <0x600 0x34>;
interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <24>;
ralink,register-map = [ 00 04 08 0c
20 24 28 2c
30 34 ];
};
gpio1: gpio@638 {
compatible = "ralink,rt2880-gpio";
reg = <0x638 0x24>;
interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <16>;
ralink,register-map = [ 00 04 08 0c
10 14 18 1c
20 24 ];
status = "disabled";
};
gpio2: gpio@660 {
compatible = "ralink,rt2880-gpio";
reg = <0x660 0x24>;
interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <32>;
ralink,register-map = [ 00 04 08 0c
10 14 18 1c
20 24 ];
status = "disabled";
};
gpio3: gpio@688 {
compatible = "ralink,rt2880-gpio";
reg = <0x688 0x24>;
interrupt-parent = <&intc>;
interrupts = <6>;
interrupt-controller;
#interrupt-cells = <2>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <1>;
ralink,register-map = [ 00 04 08 0c
10 14 18 1c
20 24 ];
status = "disabled";
};
i2c: i2c@900 {
compatible = "ralink,rt2880-i2c";
reg = <0x900 0x100>;
clocks = <&sysc 10>;
resets = <&sysc 16>;
reset-names = "i2c";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&i2c_pins>;
};
i2s: i2s@a00 {
compatible = "mediatek,mt7620-i2s";
reg = <0xa00 0x100>;
clocks = <&sysc 11>;
resets = <&sysc 17>;
reset-names = "i2s";
interrupt-parent = <&intc>;
interrupts = <10>;
txdma-req = <2>;
rxdma-req = <3>;
dmas = <&gdma 4>,
<&gdma 6>;
dma-names = "tx", "rx";
status = "disabled";
};
spi0: spi@b00 {
compatible = "ralink,rt2880-spi";
reg = <0xb00 0x40>;
clocks = <&sysc 12>;
resets = <&sysc 18>;
reset-names = "spi";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&spi_pins>;
};
spi1: spi@b40 {
compatible = "ralink,rt2880-spi";
reg = <0xb40 0x60>;
clocks = <&sysc 13>;
resets = <&sysc 18>;
reset-names = "spi";
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&spi_cs1>;
};
uartlite: uartlite@c00 {
compatible = "ralink,mt7620a-uart", "ralink,rt2880-uart", "ns16550a";
reg = <0xc00 0x100>;
clocks = <&sysc 14>;
resets = <&sysc 19>;
interrupt-parent = <&intc>;
interrupts = <12>;
reg-shift = <2>;
pinctrl-names = "default";
pinctrl-0 = <&uartlite_pins>;
};
systick: systick@d00 {
compatible = "ralink,mt7620a-systick", "ralink,cevt-systick";
reg = <0xd00 0x10>;
interrupt-parent = <&cpuintc>;
interrupts = <7>;
};
pcm: pcm@2000 {
compatible = "ralink,mt7620a-pcm";
reg = <0x2000 0x800>;
resets = <&sysc 11>;
reset-names = "pcm";
interrupt-parent = <&intc>;
interrupts = <4>;
status = "disabled";
};
gdma: gdma@2800 {
compatible = "ralink,rt3883-gdma";
reg = <0x2800 0x800>;
resets = <&sysc 14>;
reset-names = "dma";
interrupt-parent = <&intc>;
interrupts = <7>;
#dma-cells = <1>;
#dma-channels = <16>;
#dma-requests = <16>;
status = "disabled";
};
};
pinctrl: pinctrl {
compatible = "ralink,rt2880-pinmux";
pinctrl-names = "default";
pinctrl-0 = <&state_default>;
state_default: pinctrl0 {
};
pcm_i2s_pins: pcm_i2s {
pcm_i2s {
groups = "uartf";
function = "pcm i2s";
};
};
uartf_gpio_pins: uartf_gpio {
uartf_gpio {
groups = "uartf";
function = "gpio uartf";
};
};
gpio_i2s_pins: gpio_i2s {
gpio_i2s {
groups = "uartf";
function = "gpio i2s";
};
};
spi_pins: spi_pins {
spi_pins {
groups = "spi";
function = "spi";
};
};
spi_cs1: spi1 {
spi1 {
groups = "spi refclk";
function = "spi refclk";
};
};
i2c_pins: i2c_pins {
i2c_pins {
groups = "i2c";
function = "i2c";
};
};
uartlite_pins: uartlite {
uart {
groups = "uartlite";
function = "uartlite";
};
};
mdio_pins: mdio {
mdio {
groups = "mdio";
function = "mdio";
};
};
mdio_refclk_pins: mdio_refclk {
mdio_refclk {
groups = "mdio";
function = "refclk";
};
};
ephy_pins: ephy {
ephy {
groups = "ephy";
function = "ephy";
};
};
wled_pins: wled {
wled {
groups = "wled";
function = "wled";
};
};
rgmii1_pins: rgmii1 {
rgmii1 {
groups = "rgmii1";
function = "rgmii1";
};
};
rgmii2_pins: rgmii2 {
rgmii2 {
groups = "rgmii2";
function = "rgmii2";
};
};
pcie_pins: pcie {
pcie {
groups = "pcie";
function = "pcie rst";
};
};
pa_pins: pa {
pa {
groups = "pa";
function = "pa";
};
};
pa_gpio_pins: pa_gpio {
pa {
groups = "pa";
function = "gpio";
};
};
sdhci_pins: sdhci {
sdhci {
groups = "nd_sd";
function = "sd";
};
};
};
usbphy: usbphy {
compatible = "mediatek,mt7620-usbphy";
#phy-cells = <0>;
ralink,sysctl = <&sysc>;
/* usb phy reset is only controled by RSTCTRL bit 25 */
resets = <&sysc 25>, <&sysc 22>;
reset-names = "host", "device";
};
ethernet: ethernet@10100000 {
compatible = "mediatek,mt7620-eth";
reg = <0x10100000 0x10000>;
#address-cells = <1>;
#size-cells = <0>;
interrupt-parent = <&cpuintc>;
interrupts = <5>;
resets = <&sysc 21>, <&sysc 23>;
reset-names = "fe", "esw";
mediatek,switch = <&gsw>;
port@4 {
compatible = "mediatek,eth-port";
reg = <4>;
status = "disabled";
};
port@5 {
compatible = "mediatek,eth-port";
reg = <5>;
status = "disabled";
};
mdio-bus {
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
};
gsw: gsw@10110000 {
compatible = "mediatek,mt7620-gsw";
reg = <0x10110000 0x8000>;
resets = <&sysc 24>;
reset-names = "ephy";
interrupt-parent = <&intc>;
interrupts = <17>;
};
sdhci: mmc@10130000 {
compatible = "mediatek,mt7620-mmc", "ralink,mt7620-sdhci";
reg = <0x10130000 0x4000>;
bus-width = <4>;
cap-mmc-highspeed;
cap-sd-highspeed;
clocks = <&sysc 15>, <&sysc 15>;
clock-names = "source", "hclk";
disable-wp;
interrupt-parent = <&intc>;
interrupts = <14>;
max-frequency = <48000000>;
pinctrl-names = "default", "state_uhs";
pinctrl-0 = <&sdhci_pins>;
pinctrl-1 = <&sdhci_pins>;
resets = <&sysc 30>;
reset-names = "hrst";
vmmc-supply = <&mmc_reg_3v3>;
vqmmc-supply = <&mmc_reg_1v8>;
status = "disabled";
};
ehci: ehci@101c0000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "generic-ehci";
reg = <0x101c0000 0x1000>;
interrupt-parent = <&intc>;
interrupts = <18>;
phys = <&usbphy>;
phy-names = "usb";
status = "disabled";
ehci_port1: port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
};
ohci: ohci@101c1000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "generic-ohci";
reg = <0x101c1000 0x1000>;
interrupt-parent = <&intc>;
interrupts = <18>;
phys = <&usbphy>;
phy-names = "usb";
status = "disabled";
ohci_port1: port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
};
pcie: pcie@10140000 {
compatible = "mediatek,mt7620-pci";
reg = <0x10140000 0x100
0x10142000 0x100>;
#address-cells = <3>;
#size-cells = <2>;
resets = <&sysc 26>;
reset-names = "pcie0";
interrupt-parent = <&cpuintc>;
interrupts = <4>;
pinctrl-names = "default";
pinctrl-0 = <&pcie_pins>;
device_type = "pci";
bus-range = <0 255>;
ranges = <
0x02000000 0 0x00000000 0x20000000 0 0x10000000 /* pci memory */
0x01000000 0 0x00000000 0x10160000 0 0x00010000 /* io space */
>;
status = "disabled";
pcie0: pcie@0,0 {
reg = <0x0000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
device_type = "pci";
ranges;
};
};
wmac: wmac@10180000 {
compatible = "ralink,rt7620-wmac", "ralink,rt2880-wmac";
reg = <0x10180000 0x40000>;
clocks = <&sysc 16>;
interrupt-parent = <&cpuintc>;
interrupts = <6>;
ralink,eeprom = "soc_wmac.eeprom";
};
};

View File

@@ -0,0 +1,132 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "aigale,ai-br100", "ralink,mt7620a-soc";
model = "Aigale Ai-BR100";
aliases {
led-boot = &led_wlan;
led-failsafe = &led_wlan;
led-running = &led_wlan;
led-upgrade = &led_wlan;
};
leds {
compatible = "gpio-leds";
wan {
function = LED_FUNCTION_WAN;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
};
led_wlan: wlan {
function = LED_FUNCTION_WLAN;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
};
&gpio2 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x20000>;
read-only;
};
partition@20000 {
label = "u-boot-env";
reg = <0x20000 0x10000>;
read-only;
};
partition@30000 {
label = "factory";
reg = <0x30000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@40000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x40000 0x7c0000>;
};
};
};
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&state_default {
gpio {
groups = "i2c", "uartf", "rgmii1", "rgmii2", "ephy", "wled", "nd_sd";
function = "gpio";
};
};
&ethernet {
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "llllw";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};

View File

@@ -0,0 +1,173 @@
// SPDX-License-Identifier: BSD-3-Clause
/*
* Copyright (C) 2018 Piotr Dymacz <pepe2k@gmail.com>
* All rights reserved.
*/
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "alfa-network,ac1200rm", "ralink,mt7620a-soc";
model = "ALFA Network AC1200RM";
aliases {
led-boot = &led_wps;
led-failsafe = &led_wps;
};
chosen {
bootargs = "console=ttyS0,115200";
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
leds {
compatible = "gpio-leds";
wlan2g {
label = "green:wlan2g";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
};
led_wps: wps {
function = LED_FUNCTION_WPS;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
};
};
};
&ehci {
status = "okay";
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
nvmem-cells = <&macaddr_factory_28>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "llllw";
};
&gpio1 {
status = "okay";
};
&gpio2 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&ohci {
status = "okay";
};
&pcie {
status = "okay";
};
&pcie0 {
mt76@0,0 {
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
led {
led-sources = <2>;
led-active-low;
};
};
};
&state_default {
gpio {
groups = "nd_sd", "spi refclk", "wled";
function = "gpio";
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x1000>;
};
partition@31000 {
label = "config";
reg = <0x31000 0xf000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_28: macaddr@28 {
reg = <0x28 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xfb0000>;
};
};
};
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};

View File

@@ -0,0 +1,231 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "alfa-network,r36m-e4g", "ralink,mt7620a-soc";
model = "ALFA Network R36M-E4G";
aliases {
label-mac-device = &wmac;
led-boot = &led_system;
led-failsafe = &led_system;
led-running = &led_system;
led-upgrade = &led_system;
};
chosen {
bootargs = "console=ttyS1,115200";
};
gpio-export {
compatible = "gpio-export";
#size-cells = <0>;
modem-enable {
gpio-export,name = "modem-enable";
gpio-export,output = <1>;
gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
};
modem-rf-enable {
gpio-export,name = "modem-rf-enable";
gpio-export,output = <1>;
gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
};
rtc-enable {
gpio-export,name = "rtc-enable";
gpio-export,output = <1>;
gpio-export,direction_may_change = <1>;
gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
};
sim-select {
gpio-export,name = "sim-select";
gpio-export,output = <0>;
gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
};
sim1-detect {
gpio-export,name = "sim1-detect";
gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
};
sim2-detect {
gpio-export,name = "sim2-detect";
gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
rfkill {
label = "rfkill";
gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RFKILL>;
};
};
leds {
compatible = "gpio-leds";
4g {
label = "orange:4g";
gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
};
lan {
function = LED_FUNCTION_LAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
};
led_system: system {
label = "green:system";
gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
default-state = "keep";
};
sim1 {
label = "green:sim1";
gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
default-state = "keep";
};
sim2 {
label = "green:sim2";
gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
default-state = "keep";
};
wan {
function = LED_FUNCTION_WAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
};
wlan {
function = LED_FUNCTION_WLAN;
color = <LED_COLOR_ID_ORANGE>;
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0radio";
};
};
};
&ehci {
status = "okay";
};
&ethernet {
nvmem-cells = <&macaddr_factory_28>;
nvmem-cell-names = "mac-address";
};
&gpio1 {
status = "okay";
};
&gpio2 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&i2c {
status = "okay";
};
&ohci {
status = "okay";
};
&state_default {
gpio {
groups = "ephy", "pcie", "rgmii1", "wled";
function = "gpio";
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
m25p,fast-read;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x1000>;
};
partition@31000 {
label = "config";
reg = <0x31000 0xf000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
macaddr_factory_28: macaddr@28 {
reg = <0x28 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xfb0000>;
};
};
};
};
&uart {
status = "okay";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};

View File

@@ -0,0 +1,194 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "alfa-network,tube-e4g", "ralink,mt7620a-soc";
model = "ALFA Network Tube-E4G";
aliases {
label-mac-device = &ethernet;
led-boot = &power;
led-failsafe = &power;
led-running = &power;
led-upgrade = &power;
};
chosen {
bootargs = "console=ttyS0,115200";
};
gpio-export {
compatible = "gpio-export";
#size-cells = <0>;
modem-enable {
gpio-export,name = "modem-enable";
gpio-export,output = <1>;
gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
};
modem-rf-enable {
gpio-export,name = "modem-rf-enable";
gpio-export,output = <1>;
gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
};
sim-select {
gpio-export,name = "sim-select";
gpio-export,output = <0>;
gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
};
sim1-detect {
gpio-export,name = "sim1-detect";
gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
};
sim2-detect {
gpio-export,name = "sim2-detect";
gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
};
leds {
compatible = "gpio-leds";
4g {
label = "green:4g";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
};
lan {
function = LED_FUNCTION_LAN;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
};
power: power {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
default-state = "keep";
};
sim1 {
label = "green:sim1";
gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
default-state = "keep";
};
sim2 {
label = "green:sim2";
gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
default-state = "keep";
};
};
};
&ehci {
status = "okay";
};
&ethernet {
nvmem-cells = <&macaddr_factory_28>;
nvmem-cell-names = "mac-address";
};
&gpio1 {
status = "okay";
};
&gpio2 {
status = "okay";
};
&ohci {
status = "okay";
};
&pcie {
status = "disabled";
};
&state_default {
gpio {
groups = "ephy", "nd_sd", "pcie", "uartf";
function = "gpio";
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
m25p,fast-read;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x1000>;
};
partition@31000 {
label = "config";
reg = <0x31000 0xf000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
macaddr_factory_28: macaddr@28 {
reg = <0x28 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xfb0000>;
};
};
};
};
&wmac {
status = "disabled";
};

View File

@@ -0,0 +1,27 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a_edimax_ew-747x.dtsi"
/ {
compatible = "ampedwireless,b1200ex", "ralink,mt7620a-soc";
model = "Amped Wireless B1200EX";
leds {
wlan2g {
label = "green:wlan2g";
gpios = <&gpio2 30 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1radio";
};
wlan5g {
label = "green:wlan5g";
gpios = <&gpio2 31 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0radio";
};
signal_strength {
label = "green:signal_strength";
gpios = <&gpio2 29 GPIO_ACTIVE_LOW>;
};
};
};

View File

@@ -0,0 +1,188 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "asus,rp-n53", "ralink,mt7620a-soc";
model = "Asus RP-N53";
keys {
compatible = "gpio-keys";
touch {
label = "touch";
gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
};
wps {
label = "wps";
gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
};
reset {
label = "reset";
gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
};
audio {
label = "audio";
gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
linux,code = <BTN_1>;
};
};
leds {
compatible = "gpio-leds";
backlight {
label = "white:back";
gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
};
wifi0 {
label = "blue:5g3";
gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
};
wifi1 {
label = "blue:5g2";
gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
};
wifi2 {
label = "blue:5g1";
gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
};
wifi3 {
label = "blue:wifi";
gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
};
wifi4 {
label = "blue:2g1";
gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
};
wifi5 {
label = "blue:2g2";
gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
};
wifi6 {
label = "blue:2g3";
gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
};
};
};
&gpio1 {
status = "okay";
};
&i2c {
status = "okay";
};
&i2s {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pcm_i2s_pins>;
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x7b0000>;
};
};
};
};
&pcm {
status = "okay";
};
&gdma {
status = "okay";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&state_default {
gpio {
groups = "mdio", "rgmii1";
function = "gpio";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
compatible = "pci1814,5592";
reg = <0x0000 0 0 0 0>;
ralink,2ghz = <0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
};
};

View File

@@ -0,0 +1,14 @@
#include "mt7620a_asus_rt-ac5x.dtsi"
/ {
compatible = "asus,rt-ac51u", "ralink,mt7620a-soc";
model = "Asus RT-AC51U";
};
&pcie0 {
wifi@0,0 {
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
};
};

View File

@@ -0,0 +1,21 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a_asus_rt-ac5x.dtsi"
/ {
compatible = "asus,rt-ac54u", "ralink,mt7620a-soc";
model = "Asus RT-AC54U";
};
&pcie0 {
wifi@0,0 {
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
led {
led-sources = <2>;
};
};
};

View File

@@ -0,0 +1,159 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
aliases {
label-mac-device = &ethernet;
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
leds {
compatible = "gpio-leds";
led_power: power {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
};
usb {
function = LED_FUNCTION_USB;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
trigger-sources = <&ohci_port1>, <&ehci_port1>;
linux,default-trigger = "usbport";
};
wifi2g {
label = "blue:wifi2g";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
m25p,fast-read;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_28: macaddr@28 {
reg = <0x28 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xfb0000>;
};
};
};
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&gpio0 {
enable-leds {
gpio-hog;
line-name = "enable-leds";
output-low;
gpios = <10 GPIO_ACTIVE_HIGH>;
};
};
&gpio3 {
status = "okay";
};
&state_default {
gpio {
groups = "i2c", "wled", "uartf";
function = "gpio";
};
};
&ethernet {
nvmem-cells = <&macaddr_factory_28>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "wllll";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&pcie {
status = "okay";
};

View File

@@ -0,0 +1,170 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "bdcom,wap2100-sk", "ralink,mt7620a-soc";
model = "BDCOM WAP2100-SK";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
};
chosen {
bootargs = "console=ttyS0,115200";
};
leds {
compatible = "gpio-leds";
usb {
function = LED_FUNCTION_USB;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
trigger-sources = <&ohci_port1>, <&ehci_port1>;
linux,default-trigger = "usbport";
};
led_power: wps {
function = LED_FUNCTION_WPS;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
wlan2g {
label = "green:wlan2g";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
wps {
label = "wps";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
reset {
label = "reset";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xf70000>;
};
};
};
};
&gpio1 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&sdhci {
status = "okay";
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&ethernet {
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "wllll";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
};
};
&state_default {
default {
groups = "spi refclk", "uartf", "wled";
function = "gpio";
};
};

View File

@@ -0,0 +1,260 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/mtd/partitions/uimage.h>
/ {
compatible = "bolt,bl100", "ralink,mt7620a-soc";
model = "Bolt BL100";
aliases {
led-boot = &led_reset;
led-failsafe = &led_reset;
led-running = &led_power;
led-upgrade = &led_reset;
label-mac-device = &ethernet;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";
led_reset: reset {
function = LED_FUNCTION_BOOT;
color = <LED_COLOR_ID_RED>;
gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
};
led_power: power {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
};
led_lte1 {
label = "blue:lte1";
gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
};
led_lte2 {
label = "blue:lte2";
gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
};
led_lte3 {
label = "blue:lte3";
gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
};
led_lte4 {
label = "blue:lte4";
gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
};
led_lte5 {
label = "red:lte5";
gpios = <&gpio2 24 GPIO_ACTIVE_LOW>;
};
led_lte6 {
label = "red:lte6";
gpios = <&gpio2 25 GPIO_ACTIVE_LOW>;
};
led_wps {
function = LED_FUNCTION_WPS;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio2 22 GPIO_ACTIVE_LOW>;
};
led_voip {
label = "blue:voip";
gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
};
led_wlan2 {
function = LED_FUNCTION_WLAN_2GHZ;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
led_wlan5 {
function = LED_FUNCTION_WLAN_5GHZ;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
led_lan {
function = LED_FUNCTION_LAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
};
led_wan {
function = LED_FUNCTION_WAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
wps {
label = "WPS";
linux,code = <KEY_WPS_BUTTON>;
gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
};
reset {
label = "RST";
linux,code = <KEY_RESTART>;
gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
};
};
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&gpio2 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
};
partition@40000 {
compatible = "nvmem-cells";
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_28: macaddr@28 {
reg = <0x28 0x6>;
};
};
};
partition@50000 {
label = "firmware";
reg = <0x50000 0xf80000>;
compatible = "openwrt,uimage", "denx,uimage";
openwrt,ih-magic = <0x26112015>;
};
partition@fd0000 {
label = "crash";
reg = <0xfd0000 0x10000>;
};
partition@fe0000 {
label = "reserved";
reg = <0xfe0000 0x10000>;
read-only;
};
partition@ff0000 {
label = "Bdata";
reg = <0xff0000 0x10000>;
};
};
};
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&ethernet {
nvmem-cells = <&macaddr_factory_28>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "llllw";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
pinctrl-1 = <&pa_gpio_pins>;
};
&pcie {
status = "okay";
};
&pcie0 {
mt76@0,0 {
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
};
};
&state_default {
gpio {
groups = "i2c", "uartf", "rgmii1", "rgmii2", "ephy", "wled", "nd_sd";
function = "gpio";
};
};

View File

@@ -0,0 +1,199 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "buffalo,whr-1166d", "ralink,mt7620a-soc";
model = "Buffalo WHR-1166D";
aliases {
led-boot = &led_power_green;
led-failsafe = &led_power_green;
led-running = &led_power_green;
led-upgrade = &led_power_green;
};
leds {
compatible = "gpio-leds";
power {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_RED>;
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
};
wifi {
label = "green:wifi";
gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
};
led_power_green: power2 {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
};
wifi2 {
label = "orange:wifi";
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
};
internet {
label = "green:internet";
gpios = <&gpio2 17 GPIO_ACTIVE_LOW>;
};
router {
label = "orange:router";
gpios = <&gpio2 18 GPIO_ACTIVE_LOW>;
};
router2 {
label = "green:router";
gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
aoss {
label = "aoss";
gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
ap {
label = "ap";
gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
bridge {
label = "bridge";
gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
};
};
&gpio2 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xfb0000>;
};
};
};
};
&state_default {
gpio {
groups = "i2c", "uartf", "wled", "nd_sd";
function = "gpio";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &mdio_pins>;
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
port@5 {
status = "okay";
phy-handle = <&phy5>;
phy-mode = "rgmii";
};
mdio-bus {
status = "okay";
phy5: ethernet-phy@5 {
reg = <5>;
phy-mode = "rgmii-rxid";
};
};
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
compatible = "pci0,0";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
};
};

View File

@@ -0,0 +1,171 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "buffalo,whr-300hp2", "ralink,mt7620a-soc";
model = "Buffalo WHR-300HP2";
aliases {
led-boot = &led_power_green;
led-failsafe = &led_power_green;
led-running = &led_power_green;
led-upgrade = &led_power_green;
};
leds {
compatible = "gpio-leds";
power {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_RED>;
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
};
wifi {
label = "green:wifi";
gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
};
led_power_green: power2 {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
};
wifi2 {
label = "orange:wifi";
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
};
internet {
label = "green:internet";
gpios = <&gpio2 17 GPIO_ACTIVE_LOW>;
};
router {
label = "green:router";
gpios = <&gpio2 18 GPIO_ACTIVE_LOW>;
};
router2 {
label = "orange:router";
gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
aoss {
label = "aoss";
gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
ap {
label = "ap";
gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
bridge {
label = "bridge";
gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
};
};
&gpio2 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x7b0000>;
};
};
};
};
&state_default {
gpio {
groups = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd";
function = "gpio";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "llllw";
};
&wmac {
pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
pinctrl-1 = <&pa_gpio_pins>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};

View File

@@ -0,0 +1,185 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "buffalo,whr-600d", "ralink,mt7620a-soc";
model = "Buffalo WHR-600D";
aliases {
led-boot = &led_power_green;
led-failsafe = &led_power_green;
led-running = &led_power_green;
led-upgrade = &led_power_green;
};
leds {
compatible = "gpio-leds";
power {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_RED>;
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
};
wifi {
label = "green:wifi";
gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
};
led_power_green: power2 {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
};
wifi2 {
label = "orange:wifi";
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
};
internet {
label = "green:internet";
gpios = <&gpio2 17 GPIO_ACTIVE_LOW>;
};
router {
label = "green:router";
gpios = <&gpio2 18 GPIO_ACTIVE_LOW>;
};
router2 {
label = "orange:router";
gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
aoss {
label = "aoss";
gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
ap {
label = "ap";
gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
bridge {
label = "bridge";
gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
};
};
&gpio2 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x7b0000>;
};
};
};
};
&state_default {
gpio {
groups = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd";
function = "gpio";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "llllw";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
compatible = "pci1814,5592";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
};
};

View File

@@ -0,0 +1,184 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
aliases {
label-mac-device = &ethernet;
led-boot = &led_power_green;
led-failsafe = &led_power_green;
led-running = &led_power_green;
led-upgrade = &led_power_green;
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
leds {
compatible = "gpio-leds";
led_power_green: power_green {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
};
wan_orange {
function = LED_FUNCTION_WAN;
color = <LED_COLOR_ID_ORANGE>;
gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
};
wan_green {
function = LED_FUNCTION_WAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
};
power_orange {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_ORANGE>;
gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_28: macaddr@28 {
compatible = "mac-base";
reg = <0x28 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
partition@50000 {
label = "factory5g";
reg = <0x50000 0x10000>;
read-only;
};
partition@60000 {
label = "Wolf_Config";
reg = <0x60000 0x10000>;
read-only;
};
partition@70000 {
label = "MyDlink";
reg = <0x70000 0x80000>;
read-only;
};
partition@f0000 {
label = "Jffs2";
reg = <0xf0000 0x80000>;
read-only;
};
partition@170000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x170000 0x690000>;
};
};
};
};
&state_default {
gpio {
groups = "i2c", "uartf", "ephy";
function = "gpio";
};
};
&ethernet {
nvmem-cells = <&macaddr_factory_28 0>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "llllw";
};
&gpio2 {
status = "okay";
};
&wmac {
pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
pinctrl-1 = <&pa_gpio_pins>;
nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_28 0>;
nvmem-cell-names = "eeprom", "mac-address";
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
reg = <0x0000 0 0 0 0>;
ieee80211-freq-limit = <5000000 6000000>;
nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_28 2>;
nvmem-cell-names = "eeprom", "mac-address";
};
};

View File

@@ -0,0 +1,198 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "dlink,dch-m225", "ralink,mt7620a-soc";
model = "D-Link DCH-M225";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
keys {
compatible = "gpio-keys";
wps {
label = "wps";
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RFKILL>;
};
reset {
label = "reset";
gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
leds {
compatible = "gpio-leds";
led_power: power {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
default-state = "on";
};
status {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_RED>;
gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
};
};
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "Audio-I2S";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <&dailink0_master>;
simple-audio-card,frame-master = <&dailink0_master>;
simple-audio-card,widgets =
"Headphone", "Headphones";
simple-audio-card,routing =
"Headphones", "HP_L",
"Headphones", "HP_R";
simple-audio-card,mclk-fs = <256>;
simple-audio-card,hp-det-gpio = <&gpio0 14 GPIO_ACTIVE_LOW>;
simple-audio-card,cpu {
sound-dai = <&i2s>;
};
dailink0_master: simple-audio-card,codec {
sound-dai = <&codec>;
};
};
};
&gpio1 {
status = "okay";
};
&i2c {
status = "okay";
codec: wm8960@1a {
#sound-dai-cells = <0>;
compatible = "wlf,wm8960";
reg = <0x1a>;
wlf,shared-lrclk;
};
};
&i2s {
#sound-dai-cells = <0>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&mdio_refclk_pins>;
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
m25p,fast-read;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x4000>;
read-only;
};
partition@34000 {
label = "factory";
reg = <0x34000 0x4000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@38000 {
label = "nvram";
reg = <0x38000 0x8000>;
read-only;
};
partition@40000 {
label = "devconf";
reg = <0x40000 0x10000>;
read-only;
};
partition@50000 {
label = "upgrade_rec";
reg = <0x50000 0x100000>;
read-only;
};
partition@150000 {
compatible = "seama";
label = "firmware";
reg = <0x150000 0x6b0000>;
};
};
};
};
&gdma {
status = "okay";
};
&state_default {
gpio {
groups = "wdt", "rgmii1";
function = "gpio";
};
gpio_i2s {
groups = "uartf";
function = "gpio i2s";
};
};
&ethernet {
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
};
&wmac {
pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
pinctrl-1 = <&pa_gpio_pins>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};

View File

@@ -0,0 +1,149 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a.dtsi"
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/mtd/partitions/uimage.h>
/ {
compatible = "dlink,dir-510l", "ralink,mt7620a-soc";
model = "D-Link DIR-510L";
aliases {
led-boot = &led_status;
led-failsafe = &led_status;
led-running = &led_status;
led-upgrade = &led_status;
};
chosen {
bootargs = "console=ttyS1,57600";
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
leds {
compatible = "gpio-leds";
led_status: status {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
};
status-red {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_RED>;
gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
};
};
};
&ethernet {
mediatek,portmap = "llllw";
};
&uart {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "jboot";
reg = <0x0 0x10000>;
read-only;
};
partition@10000 {
label = "recovery";
reg = <0x10000 0x200000>;
read-only;
};
partition@210000 {
compatible = "openwrt,uimage", "denx,uimage";
openwrt,ih-magic = <IH_MAGIC_OKLI>;
openwrt,offset = <0x10000>;
label = "firmware";
reg = <0x210000 0xde0000>;
};
partition@ff0000 {
label = "config";
reg = <0xff0000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_config_e05d: eeprom@e05d {
reg = <0xe05d 0x200>;
};
macaddr_config_e490: macaddr@e490 {
compatible = "mac-base";
reg = <0xe490 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
};
};
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&pcie {
status = "okay";
};
&pcie0 {
mt76x0e@0,0 {
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_config_e05d>, <&macaddr_config_e490 2>;
nvmem-cell-names = "eeprom", "mac-address";
};
};
&state_default {
default {
groups = "i2c", "uartf";
function = "gpio";
};
};

View File

@@ -0,0 +1,169 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "dlink,dir-806a-b1", "ralink,mt7620a-soc";
model = "D-Link DIR-806A B1";
aliases {
led-boot = &wps_led;
led-failsafe = &wps_led;
led-running = &wps_led;
led-upgrade = &wps_led;
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; // #12
linux,code = <KEY_RESTART>;
};
};
leds {
compatible = "gpio-leds";
wifi_led: 2.4g {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_WLAN;
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; // #72
};
wps_led: wps {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_WPS;
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; // #39
};
};
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <48000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "ALL";
reg = <0x0 0x800000>;
read-only;
};
partition@0_1 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
};
partition@40000 {
label = "Factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_4: macaddr@4 {
compatible = "mac-base";
reg = <0x4 0x6>;
#nvmem-cell-cells = <1>;
};
macaddr_factory_8004: macaddr@8004 {
compatible = "mac-base";
reg = <0x8004 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x7b0000>;
};
};
};
};
&state_default {
gpio {
groups = "i2c", "uartf", "ephy";
function = "gpio";
};
};
&ethernet {
nvmem-cells = <&macaddr_factory_4 (-2)>;
nvmem-cell-names = "mac-address";
};
&wmac {
pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
pinctrl-1 = <&pa_gpio_pins>;
nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4 (-1)>;
nvmem-cell-names = "eeprom", "mac-address";
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
reg = <0x0000 0 0 0 0>;
ieee80211-freq-limit = <5000000 6000000>;
nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_8004 (-3)>;
nvmem-cell-names = "eeprom", "mac-address";
led {
led-active-low;
};
};
};

View File

@@ -0,0 +1,6 @@
#include "mt7620a_cameo_810.dtsi"
/ {
compatible = "dlink,dir-810l", "ralink,mt7620a-soc";
model = "D-Link DIR-810L";
};

View File

@@ -0,0 +1,212 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/mtd/partitions/uimage.h>
/ {
compatible = "dlink,dwr-118-a1", "ralink,mt7620a-soc";
model = "D-Link DWR-118 A1";
aliases {
led-boot = &led_internet;
led-failsafe = &led_internet;
led-upgrade = &led_internet;
};
keys {
compatible = "gpio-keys";
wps {
label = "wps";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
reset {
label = "reset";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
leds {
compatible = "gpio-leds";
wan {
function = LED_FUNCTION_WAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
};
led_internet: internet {
label = "green:internet";
gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
};
lan {
function = LED_FUNCTION_LAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
};
wlan2g {
label = "green:wlan2g";
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
usb {
function = LED_FUNCTION_USB;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
trigger-sources = <&ohci_port1>, <&ehci_port1>;
linux,default-trigger = "usbport";
};
};
gpio_export {
compatible = "gpio-export";
#size-cells = <0>;
usb {
gpio-export,name = "usb";
gpio-export,output = <0>;
gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
};
};
};
&gpio1 {
status = "okay";
};
&gpio2 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "jboot";
reg = <0x0 0x10000>;
read-only;
};
partition@10000 {
compatible = "openwrt,uimage", "denx,uimage";
openwrt,ih-magic = <IH_MAGIC_OKLI>;
openwrt,offset = <0x10000>;
label = "firmware";
reg = <0x10000 0xfe0000>;
};
partition@ff0000 {
label = "config";
reg = <0xff0000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_config_e083: eeprom@e083 {
reg = <0xe083 0x200>;
};
macaddr_config_e496: macaddr@e496 {
compatible = "mac-base";
reg = <0xe496 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
};
};
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&state_default {
default {
groups = "ephy", "uartf", "spi refclk", "wled";
function = "gpio";
};
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_config_e083>, <&macaddr_config_e496 2>;
nvmem-cell-names = "eeprom", "mac-address";
led {
led-sources = <0>;
led-active-low;
};
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
port@4 {
status = "okay";
phy-handle = <&phy4>;
phy-mode = "rgmii";
};
port@5 {
status = "okay";
phy-handle = <&phy5>;
phy-mode = "rgmii";
};
mdio-bus {
status = "okay";
phy4: ethernet-phy@4 {
reg = <4>;
phy-mode = "rgmii-rxid";
};
phy5: ethernet-phy@5 {
reg = <5>;
phy-mode = "rgmii-rxid";
};
};
};
&gsw {
mediatek,port4-gmac;
mediatek,ephy-base = /bits/ 8 <8>;
};

View File

@@ -0,0 +1,197 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/mtd/partitions/uimage.h>
/ {
compatible = "dlink,dwr-118-a2", "ralink,mt7620a-soc";
model = "D-Link DWR-118 A2";
aliases {
led-boot = &led_internet;
led-failsafe = &led_internet;
};
keys {
compatible = "gpio-keys";
wps {
label = "wps";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
reset {
label = "reset";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
leds {
compatible = "gpio-leds";
wan {
function = LED_FUNCTION_WAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
};
led_internet: internet {
label = "green:internet";
gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
};
lan {
function = LED_FUNCTION_LAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
};
wlan2g {
label = "green:wlan2g";
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
usb {
function = LED_FUNCTION_USB;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
trigger-sources = <&ohci_port1>, <&ehci_port1>;
linux,default-trigger = "usbport";
};
};
gpio_export {
compatible = "gpio-export";
#size-cells = <0>;
usb {
gpio-export,name = "usb";
gpio-export,output = <1>;
gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
};
};
};
&gpio1 {
status = "okay";
};
&gpio2 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "jboot";
reg = <0x0 0x10000>;
read-only;
};
partition@10000 {
compatible = "openwrt,uimage", "denx,uimage";
openwrt,ih-magic = <IH_MAGIC_OKLI>;
openwrt,offset = <0x10000>;
label = "firmware";
reg = <0x10000 0xfe0000>;
};
partition@ff0000 {
label = "config";
reg = <0xff0000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
macaddr_config_e4a8: macaddr@e4a8 {
compatible = "mac-base";
reg = <0xe4a8 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
};
};
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&state_default {
default {
groups = "ephy", "uartf", "spi refclk", "wled";
function = "gpio";
};
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
reg = <0x0000 0 0 0 0>;
ieee80211-freq-limit = <5000000 6000000>;
nvmem-cells = <&macaddr_config_e4a8 2>;
nvmem-cell-names = "mac-address";
led {
led-sources = <2>;
led-active-low;
};
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &mdio_pins>;
mediatek,portmap = "wllll";
port@4 {
status = "okay";
phy-handle = <&phy0>;
phy-mode = "rgmii";
};
mdio-bus {
status = "okay";
phy0: ethernet-phy@0 {
reg = <0>;
phy-mode = "rgmii-rxid";
};
};
};
&gsw {
mediatek,port4-gmac;
mediatek,ephy-base = /bits/ 8 <2>;
};

View File

@@ -0,0 +1,35 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a_dlink_dwr-96x.dtsi"
/ {
compatible = "dlink,dwr-960", "ralink,mt7620a-soc";
model = "D-Link DWR-960";
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii2_pins &mdio_pins>;
mediatek,portmap = "wllll";
port@5 {
status = "okay";
phy-mode = "rgmii-txid";
phy-handle = <&phy7>;
};
mdio-bus {
status = "okay";
phy7: ethernet-phy@7 {
reg = <7>;
phy-mode = "rgmii-id";
};
};
};
&wifi {
nvmem-cells = <&eeprom_config_e08e>, <&macaddr_config_e50e 2>;
nvmem-cell-names = "eeprom", "mac-address";
};

View File

@@ -0,0 +1,63 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* D-Link DWR-961 A1 Board Description
* Copyright 2022 Pawel Dembicki <paweldembicki@gmail.com>
*/
#include "mt7620a_dlink_dwr-96x.dtsi"
/ {
compatible = "dlink,dwr-961-a1", "ralink,mt7620a-soc";
model = "D-Link DWR-961 A1";
leds {
hidden-1 { /* hidden next to wlan5g led */
label = "green:hidden-1";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
};
hidden-2 { /* hidden next to sms led*/
label = "green:hidden-2";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
};
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &mdio_pins>;
port@5 {
status = "okay";
phy-mode = "rgmii";
mediatek,fixed-link = <1000 1 1 1>;
};
mdio-bus {
status = "okay";
ethernet-phy@0 {
reg = <0>;
phy-mode = "rgmii";
qca,ar8327-initvals = <
0x04 0x87300000 /* PORT0 PAD MODE CTRL */
0x0c 0x00000000 /* PORT6 PAD MODE CTRL */
0x7c 0x0000007e /* PORT0_STATUS */
0x80 0x00001200 /* PORT1_STATUS */
0x84 0x00001200 /* PORT2_STATUS */
0x88 0x00001200 /* PORT3_STATUS */
0x8c 0x00001200 /* PORT4_STATUS */
0x90 0x00001200 /* PORT5_STATUS */
0x94 0x00000000 /* PORT6_STATUS */
>;
};
};
};
&gsw {
mediatek,ephy-base = /bits/ 8 <8>;
};
&wifi {
nvmem-cells = <&eeprom_config_e29e>, <&macaddr_config_e50e 2>;
nvmem-cell-names = "eeprom", "mac-address";
};

View File

@@ -0,0 +1,191 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* D-Link DWR-96x Common Board Description
* Copyright 2022 Pawel Dembicki <paweldembicki@gmail.com>
*/
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/mtd/partitions/uimage.h>
/ {
aliases {
led-boot = &led_status;
led-failsafe = &led_status;
led-running = &led_status;
led-upgrade = &led_status;
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
leds {
compatible = "gpio-leds";
led_status: status {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
};
wan {
function = LED_FUNCTION_WAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
};
lan {
function = LED_FUNCTION_LAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
};
sms {
label = "green:sms";
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
signal_green {
label = "green:signal";
gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>;
};
signal_red {
label = "red:signal";
gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
};
4g {
label = "green:4g";
gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
};
3g {
label = "green:3g";
gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
};
wlan5g {
label = "green:wlan5g";
gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
wlan2g {
label = "green:wlan2g";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
};
};
&ehci {
status = "okay";
};
&gpio1 {
status = "okay";
};
&gpio2 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&ohci {
status = "okay";
};
&pcie {
status = "okay";
};
&pcie0 {
wifi: wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
ieee80211-freq-limit = <5000000 6000000>;
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "jboot";
reg = <0x0 0x10000>;
read-only;
};
partition@10000 {
compatible = "openwrt,uimage", "denx,uimage";
openwrt,ih-magic = <IH_MAGIC_OKLI>;
openwrt,offset = <0x10000>;
label = "firmware";
reg = <0x10000 0xfe0000>;
};
partition@ff0000 {
label = "config";
reg = <0xff0000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_config_e08e: eeprom@e08e {
reg = <0xe08e 0x200>;
};
eeprom_config_e29e: eeprom@e29e {
reg = <0xe29e 0x200>;
};
macaddr_config_e50e: macaddr@e50e {
compatible = "mac-base";
reg = <0xe50e 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
};
};
};
&state_default {
default {
groups = "i2c", "wled", "spi refclk", "uartf", "ephy";
function = "gpio";
};
};

View File

@@ -0,0 +1,201 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
aliases {
led-boot = &led_system_amber;
led-failsafe = &led_system_amber;
led-running = &led_system_green;
led-upgrade = &led_system_amber;
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
leds {
compatible = "gpio-leds";
led_system_green: system_green {
label = "green:system";
gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
};
led_system_amber: system_amber {
label = "amber:system";
gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
};
internet_green {
label = "green:internet";
gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
};
internet_amber {
label = "amber:internet";
gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
};
lan1 {
label = "amber:lan1";
gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
};
lan2 {
label = "amber:lan2";
gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
};
lan3 {
label = "amber:lan3";
gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
};
lan4 {
label = "amber:lan4";
gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
};
wan {
function = LED_FUNCTION_WAN;
color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
};
wlan2g {
label = "green:wlan2g";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
};
};
&gpio1 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
m25p,fast-read;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "bootloader";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "config";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_28: macaddr@28 {
reg = <0x28 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xfb0000>;
};
};
};
};
&state_default {
gpio {
groups = "uartf", "rgmii1", "wled";
function = "gpio";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
mediatek,portmap = "wllll";
nvmem-cells = <&macaddr_factory_28>;
nvmem-cell-names = "mac-address";
};
&sdhci {
status = "okay";
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
led {
led-sources = <0>;
led-active-low;
};
};
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};

View File

@@ -0,0 +1,8 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a_domywifi.dtsi"
/ {
compatible = "domywifi,dm202", "ralink,mt7620a-soc";
model = "DomyWifi DM202";
};

View File

@@ -0,0 +1,8 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a_domywifi.dtsi"
/ {
compatible = "domywifi,dm203", "ralink,mt7620a-soc";
model = "DomyWifi DM203";
};

View File

@@ -0,0 +1,8 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a_domywifi.dtsi"
/ {
compatible = "domywifi,dw22d", "ralink,mt7620a-soc";
model = "DomyWifi DW22D";
};

View File

@@ -0,0 +1,172 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "dovado,tiny-ac", "ralink,mt7620a-soc";
model = "Dovado Tiny AC";
leds {
compatible = "gpio-leds";
usb {
function = LED_FUNCTION_USB;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
trigger-sources = <&ohci_port1>, <&ehci_port1>;
linux,default-trigger = "usbport";
};
wifi {
label = "orange:wifi";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
gpio_export {
compatible = "gpio-export";
#size-cells = <0>;
usbpower {
gpio-export,name = "usbpower";
gpio-export,output = <1>;
gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
};
};
};
&gpio2 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x7b0000>;
};
};
};
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
mediatek,portmap = "llllw";
port@4 {
status = "okay";
phy-mode = "rgmii";
phy-handle = <&phy4>;
};
port@5 {
status = "okay";
phy-mode = "rgmii";
phy-handle = <&phy5>;
};
mdio-bus {
status = "okay";
phy4: ethernet-phy@4 {
reg = <4>;
phy-mode = "rgmii";
};
phy5: ethernet-phy@5 {
reg = <5>;
phy-mode = "rgmii";
};
};
};
&gsw {
mediatek,port4-gmac;
mediatek,ephy-base = /bits/ 8 <8>;
};
&pcie {
status = "okay";
};
&state_default {
gpio {
groups = "uartf", "nd_sd", "wled";
function = "gpio";
};
};
&pcie0 {
mt76@0,0 {
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
};
};

View File

@@ -0,0 +1,221 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2023 Stefan Weil <sw@weilnetz.de>
*/
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/mtd/partitions/uimage.h>
/ {
compatible = "edimax,br-6208ac-v2", "ralink,mt7620a-soc";
model = "Edimax BR-6208AC v2";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_firmware;
};
keys {
compatible = "gpio-keys";
// Vendor firmware: /proc/RESET_BUTTON
reset_wps {
label = "reset_wps";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
// Vendor firmware: /proc/driver/led
leds {
compatible = "gpio-leds";
led_power: power {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_POWER;
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
};
// RALINK_REG_PIO3924DATA 39-24
led_internet: internet {
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
// RALINK_REG_PIO7140DATA 44-40
led_wlan_2_4ghz: wlan_2_4ghz {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_WLAN;
gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
// RALINK_REG_PIO7140DATA 43-40
led_wlan_5ghz: wlan_5ghz {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_WLAN;
gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
// RALINK_REG_PIO7140DATA 42-40
led_firmware: firmware {
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
// default-state = "keep";
};
// RALINK_REG_PIO7140DATA 41-40
led_vpn: vpn {
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
};
};
};
&gdma {
status = "okay";
};
// Vendor firmware: RALINK_REG_PIO7140 - gpio0: gpio@600
// Vendor firmware: RALINK_REG_PIO3924 - gpio1: gpio@638
// Vendor firmware: RALINK_REG_PIO7140 - gpio2: gpio@660
// Vendor firmware: RALINK_REG_PIO72 - gpio3: gpio@688
&gpio1 {
status = "okay";
};
&gpio2 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
// Vendor partitions:
// 0x000000000000-0x000000030000 : "Bootloader"
// 0x000000030000-0x000000040000 : "Config"
// 0x000000040000-0x000000050000 : "Factory"
// 0x000000050000-0x000000070000 : "Cimage"
// 0x000000070000-0x000000fe0000 : "Uimage"
// 0x000000070000-0x000000190000 : "Kernel"
// 0x000000190000-0x000000fe0000 : "RootFS"
// 0x000000fe0000-0x000001000000 : "FreeSpace"
// Bootloader
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
// Config
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
// Factory
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
macaddr_factory_2e: macaddr@2e {
reg = <0x2e 0x6>;
};
};
};
// Cimage
partition@50000 {
label = "cimage";
reg = <0x50000 0x20000>;
read-only;
};
partition@70000 {
compatible = "openwrt,uimage", "denx,uimage";
openwrt,offset = <FW_EDIMAX_OFFSET>;
openwrt,partition-magic = <FW_MAGIC_EDIMAX>;
label = "firmware";
reg = <0x00070000 0x00f70000>;
};
// FreeSpace
partition@fe0000 {
label = "freespace";
reg = <0xfe0000 0x20000>;
read-only;
};
};
};
};
&state_default {
gpio {
// TODO: "spi refclk"?
groups = "i2c", "uartf", "rgmii1", "rgmii2", "ephy", "wled", "nd_sd";
function = "gpio";
};
};
&ethernet {
nvmem-cells = <&macaddr_factory_2e>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "llllw";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
};
};

View File

@@ -0,0 +1,231 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2016 Rohan Murch <rohan.murch@gmail.com>
* Copyright (C) 2016 Hans Ulli Kroll <ulli.kroll@googlemail.com>
* Copyright (C) 2017 James McKenzie <openwrt@madingley.org>
*/
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/mtd/partitions/uimage.h>
/ {
compatible = "edimax,br-6478ac-v2", "ralink,mt7620a-soc";
model = "Edimax BR-6478AC v2";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
keys {
compatible = "gpio-keys";
reset_wps {
label = "reset_wps";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
leds {
compatible = "gpio-leds";
led_power: power {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_WHITE>;
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
};
internet {
label = "blue:internet";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
};
wlan {
function = LED_FUNCTION_WLAN;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
};
usb {
function = LED_FUNCTION_USB;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
trigger-sources = <&ohci_port1>, <&ehci_port1>;
linux,default-trigger = "usbport";
};
};
gpio_export {
compatible = "gpio-export";
#size-cells = <0>;
usb-power {
gpio-export,name="usb-power";
gpio-export,output=<1>;
gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
};
};
};
&gpio2 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@50000 {
label = "cimage";
reg = <0x50000 0x20000>;
read-only;
};
partition@70000 {
compatible = "openwrt,uimage", "denx,uimage";
openwrt,offset = <FW_EDIMAX_OFFSET>;
openwrt,partition-magic = <FW_MAGIC_EDIMAX>;
label = "firmware";
reg = <0x00070000 0x00790000>;
};
};
};
};
&state_default {
gpio {
groups = "i2c", "uartf", "nd_sd";
function = "gpio";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "wllll";
port@5 {
status = "okay";
mediatek,fixed-link = <1000 1 1 1>;
phy-mode = "rgmii";
};
mdio-bus {
status = "okay";
phy0: ethernet-phy@0 {
reg = <0>;
phy-mode = "rgmii";
};
phy1: ethernet-phy@1 {
reg = <1>;
phy-mode = "rgmii";
};
phy2: ethernet-phy@2 {
reg = <2>;
phy-mode = "rgmii";
};
phy3: ethernet-phy@3 {
reg = <3>;
phy-mode = "rgmii";
};
phy4: ethernet-phy@4 {
reg = <4>;
phy-mode = "rgmii";
};
phy1f: ethernet-phy@1f {
reg = <0x1f>;
phy-mode = "rgmii";
};
};
};
&gsw {
mediatek,ephy-base = /bits/ 8 <12>;
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
};
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};

View File

@@ -0,0 +1,43 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a_edimax_ew-747x.dtsi"
/ {
compatible = "edimax,ew-7476rpc", "ralink,mt7620a-soc";
model = "Edimax EW-7476RPC";
keys {
switch_high {
label = "switch high";
gpios = <&gpio2 22 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
switch_off {
label = "switch off";
gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
linux,code = <BTN_1>;
linux,input-type = <EV_SW>;
};
};
leds {
wlan2g {
label = "blue:wlan2g";
gpios = <&gpio2 30 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1radio";
};
wlan5g {
label = "blue:wlan5g";
gpios = <&gpio2 31 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0radio";
};
crossband {
label = "green:crossband";
gpios = <&gpio2 29 GPIO_ACTIVE_LOW>;
};
};
};

View File

@@ -0,0 +1,43 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a_edimax_ew-747x.dtsi"
/ {
compatible = "edimax,ew-7478ac", "ralink,mt7620a-soc";
model = "Edimax EW-7478AC";
keys {
switch_high {
label = "switch high";
gpios = <&gpio2 22 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
switch_off {
label = "switch off";
gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
linux,code = <BTN_1>;
linux,input-type = <EV_SW>;
};
};
leds {
wlan2g {
label = "blue:wlan2g";
gpios = <&gpio2 30 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1radio";
};
wlan5g {
label = "blue:wlan5g";
gpios = <&gpio2 31 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0radio";
};
crossband {
label = "green:crossband";
gpios = <&gpio2 29 GPIO_ACTIVE_LOW>;
};
};
};

View File

@@ -0,0 +1,223 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/mtd/partitions/uimage.h>
/ {
compatible = "edimax,ew-7478apc", "ralink,mt7620a-soc";
model = "Edimax EW-7478APC";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
keys {
compatible = "gpio-keys";
reset_wps {
label = "reset_wps";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
leds {
compatible = "gpio-leds";
led_power: power {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_WHITE>;
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
};
internet {
label = "blue:internet";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
};
wlan {
function = LED_FUNCTION_WLAN;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
};
usb {
function = LED_FUNCTION_USB;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
trigger-sources = <&ohci_port1>, <&ehci_port1>;
linux,default-trigger = "usbport";
};
};
};
&gpio2 {
status = "okay";
enable_usb_power {
gpio-hog;
line-name = "enable USB power";
gpios = <5 GPIO_ACTIVE_HIGH>;
output-high;
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@50000 {
label = "cimage";
reg = <0x50000 0x20000>;
read-only;
};
partition@70000 {
compatible = "openwrt,uimage", "denx,uimage";
openwrt,offset = <FW_EDIMAX_OFFSET>;
openwrt,partition-magic = <FW_MAGIC_EDIMAX>;
label = "firmware";
reg = <0x00070000 0x00790000>;
};
};
};
};
&state_default {
gpio {
groups = "i2c", "uartf", "nd_sd";
function = "gpio";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "wllll";
port@5 {
status = "okay";
mediatek,fixed-link = <1000 1 1 1>;
phy-mode = "rgmii";
};
mdio-bus {
status = "okay";
phy0: ethernet-phy@0 {
reg = <0>;
phy-mode = "rgmii";
};
phy1: ethernet-phy@1 {
reg = <1>;
phy-mode = "rgmii";
};
phy2: ethernet-phy@2 {
reg = <2>;
phy-mode = "rgmii";
};
phy3: ethernet-phy@3 {
reg = <3>;
phy-mode = "rgmii";
};
phy4: ethernet-phy@4 {
reg = <4>;
phy-mode = "rgmii";
};
phy1f: ethernet-phy@1f {
reg = <0x1f>;
phy-mode = "rgmii";
};
};
};
&gsw {
mediatek,ephy-base = /bits/ 8 <12>;
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
};
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};

View File

@@ -0,0 +1,216 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/mtd/partitions/uimage.h>
/ {
compatible = "ralink,mt7620a-soc";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
keys {
compatible = "gpio-keys";
reset_wps {
label = "reset_wps";
gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
leds {
compatible = "gpio-leds";
led_power: power {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
};
lan {
function = LED_FUNCTION_LAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio2 26 GPIO_ACTIVE_LOW>;
};
wps {
function = LED_FUNCTION_WPS;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
};
};
};
&gpio1 {
status = "okay";
};
&gpio2 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_4: macaddr@4 {
compatible = "mac-base";
reg = <0x4 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
partition@50000 {
label = "cimage";
reg = <0x50000 0x20000>;
read-only;
};
partition@70000 {
compatible = "openwrt,uimage", "denx,uimage";
openwrt,offset = <FW_EDIMAX_OFFSET>;
openwrt,partition-magic = <FW_MAGIC_EDIMAX>;
label = "firmware";
reg = <0x00070000 0x00790000>;
};
};
};
};
&state_default {
gpio {
groups = "i2c", "uartf", "nd_sd", "rgmii2";
function = "gpio";
};
};
&pinctrl {
phy_reset_pins: phy-reset {
gpio {
groups = "spi refclk";
function = "gpio";
};
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &mdio_pins &phy_reset_pins>;
nvmem-cells = <&macaddr_factory_4 0>;
nvmem-cell-names = "mac-address";
phy-reset-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
phy-reset-duration = <30>;
port@5 {
status = "okay";
mediatek,fixed-link = <1000 1 1 1>;
phy-mode = "rgmii";
};
mdio-bus {
status = "okay";
phy0: ethernet-phy@0 {
status = "disabled";
reg = <0>;
phy-mode = "rgmii";
};
phy1: ethernet-phy@1 {
status = "disabled";
reg = <1>;
phy-mode = "rgmii";
};
phy2: ethernet-phy@2 {
status = "disabled";
reg = <2>;
phy-mode = "rgmii";
};
phy3: ethernet-phy@3 {
status = "disabled";
reg = <3>;
phy-mode = "rgmii";
};
phy4: ethernet-phy@4 {
status = "disabled";
reg = <4>;
phy-mode = "rgmii";
};
};
};
&gsw {
mediatek,ephy-base = /bits/ 8 <8>;
};
&wmac {
nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4 0>;
nvmem-cell-names = "eeprom", "mac-address";
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
reg = <0x0000 0 0 0 0>;
ieee80211-freq-limit = <5000000 6000000>;
nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_4 2>;
nvmem-cell-names = "eeprom", "mac-address";
};
};

View File

@@ -0,0 +1,246 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "engenius,epg600", "ralink,mt7620a-soc";
model = "EnGenius EPG600";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
chosen {
bootargs = "console=ttyS0,115200";
};
keys {
compatible = "gpio-keys";
reset {
linux,code = <KEY_RESTART>;
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
wps {
linux,code = <KEY_WPS_BUTTON>;
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
reg {
linux,code = <BTN_0>;
gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
};
leds {
compatible = "gpio-leds";
led_power: power {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wlan2g {
label = "blue:wlan2g";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
wlan5g {
label = "blue:wlan5g";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
};
wps2g {
label = "blue:wps2g";
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
wps5g {
label = "amber:wps5g";
gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
};
line {
label = "blue:line";
gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
};
};
};
&gpio1 {
status = "okay";
};
&gpio2 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <30000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
};
};
partition@50000 {
label = "rf";
reg = <0x50000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_rf_0: eeprom@0 {
reg = <0x0 0x200>;
};
macaddr_rf_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@60000 {
label = "firmware";
reg = <0x60000 0xf40000>;
compatible = "denx,uimage";
};
partition@fa0000 {
label = "backup";
reg = <0xfa0000 0x10000>;
read-only;
};
partition@fb0000 {
label = "storage";
reg = <0xfb0000 0x50000>;
read-only;
};
};
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&mdio_pins &rgmii1_pins &rgmii2_pins>;
nvmem-cells = <&macaddr_rf_4>;
nvmem-cell-names = "mac-address";
port@5 {
status = "okay";
phy-mode = "rgmii-txid";
mediatek,fixed-link = <1000 1 1 1>;
};
mdio-bus {
status = "okay";
ethernet-phy@0 {
reg = <0>;
phy-mode = "rgmii";
qca,ar8327-initvals = <
0x04 0x07600000 /* PORT0 PAD MODE CTRL */
0x08 0x01000000 /* PORT5 PAD MODE CTRL */
0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
0x10 0x40000000 /* POWER-ON STRAPPING */
0x7c 0x0000007e /* PORT0_STATUS */
0x94 0x0000007e /* PORT6_STATUS */
>;
};
};
};
&gsw {
mediatek,ephy-disable;
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
compatible = "pci1814,3091";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
};
&wmac {
nvmem-cells = <&eeprom_rf_0>;
nvmem-cell-names = "eeprom";
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&state_default {
default {
groups = "ephy", "wled", "spi refclk", "i2c", "uartf", "nd_sd";
function = "gpio";
};
};

View File

@@ -0,0 +1,224 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "engenius,esr600", "ralink,mt7620a-soc";
model = "EnGenius ESR600";
chosen {
bootargs = "console=ttyS0,115200";
};
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
leds {
compatible = "gpio-leds";
led_power: power {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
};
wps2g {
label = "amber:wps2g";
gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
};
wlan5g {
label = "blue:wlan5g";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
};
wlan2g {
label = "blue:wlan2g";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
debounce-interval = <60>;
};
wps {
label = "wps";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
debounce-interval = <60>;
};
};
};
&gpio2 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
m25p,fast-read;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
};
};
partition@50000 {
label = "iNIC_rf";
reg = <0x50000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_iNIC_rf_0: eeprom@0 {
reg = <0x0 0x200>;
};
macaddr_iNIC_rf_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@60000 {
label = "firmware";
reg = <0x60000 0xf40000>;
compatible = "denx,uimage";
};
partition@fa0000 {
label = "backup";
reg = <0xfa0000 0x10000>;
read-only;
};
partition@fb0000 {
label = "storage";
reg = <0xfb0000 0x50000>;
read-only;
};
};
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &mdio_pins>;
nvmem-cells = <&macaddr_iNIC_rf_4>;
nvmem-cell-names = "mac-address";
port@5 {
status = "okay";
phy-mode = "rgmii";
mediatek,fixed-link = <1000 1 1 1>;
};
mdio-bus {
status = "okay";
ethernet-phy@0 {
reg = <0>;
phy-mode = "rgmii";
qca,ar8327-initvals = <
0x10 0x40000000 /* POWER-ON STRAPPING */
0x04 0x07600000 /* PORT0 PAD MODE CTRL */
0x7c 0x0000007e /* PORT0 STATUS */
0x0c 0x05600000 /* PORT6 PAD MODE CTRL */
0x94 0x0000007e /* PORT6 STATUS */
>;
};
};
};
&gsw {
mediatek,ephy-base = /bits/ 8 <8>;
};
&state_default {
gpio {
groups = "i2c", "uartf", "nd_sd", "wled";
function = "gpio";
};
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
compatible = "pci1814,5592";
reg = <0x0 0 0 0 0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
};
&wmac {
nvmem-cells = <&eeprom_iNIC_rf_0>;
nvmem-cell-names = "eeprom";
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};

View File

@@ -0,0 +1,192 @@
// SPDX-License-Identifier: GPL-2.0-only
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "fon,fon2601", "ralink,mt7620a-soc";
model = "Fon FON2601";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
leds {
compatible = "gpio-leds";
led_power: power_r {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_RED>;
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
};
internet_g {
label = "green:internet";
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
};
net_g {
label = "green:net";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
};
wifi_g {
label = "green:wifi";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@50000 {
compatible = "openwrt,uimage", "denx,uimage";
openwrt,padding = <32>;
label = "firmware";
reg = <0x50000 0xf90000>;
};
partition@fe0000 {
label = "board_data";
reg = <0xfe0000 0x20000>;
read-only;
};
};
};
};
&state_default {
gpio {
groups = "i2c", "uartf";
function = "gpio";
};
nd_sd {
groups = "nd_sd";
function = "sd";
};
spi_cs {
groups = "spi refclk";
function = "spi refclk";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii2_pins &mdio_pins>;
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
port@4 {
status = "okay";
phy-handle = <&phy4>;
phy-mode = "rgmii";
};
mdio-bus {
status = "okay";
phy4: ethernet-phy@4 {
reg = <4>;
phy-mode = "rgmii";
};
};
};
&gsw {
mediatek,port4-gmac;
mediatek,ephy-base = /bits/ 8 <8>;
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>, <&wled_pins>;
pinctrl-1 = <&pa_gpio_pins>, <&wled_pins>;
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
compatible = "pci14c3,7662";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
};
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};

View File

@@ -0,0 +1,160 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "glinet,gl-mt300a", "ralink,mt7620a-soc";
model = "GL-MT300A";
aliases {
label-mac-device = &wmac;
};
chosen {
bootargs = "console=ttyS0,115200";
};
leds {
compatible = "gpio-leds";
wan {
label = "gl-mt300a:wan";
gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
};
lan {
label = "gl-mt300a:lan";
gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
};
wlan {
label = "gl-mt300a:wlan";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
};
usb {
label = "gl-mt300a:usb";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
BTN_0 {
label = "BTN_0";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
};
BTN_1 {
label = "BTN_1";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <BTN_1>;
};
};
};
&gpio2 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
macaddr_factory_4000: macaddr@4000 {
reg = <0x4000 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xf80000>;
};
partition@ff0000 {
label = "art";
reg = <0xff0000 0x10000>;
};
};
};
};
&sdhci {
status = "okay";
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&ethernet {
nvmem-cells = <&macaddr_factory_4000>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "wllll";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&state_default {
gpio {
groups = "wled","ephy","uartf","i2c";
function = "gpio";
};
};

View File

@@ -0,0 +1,151 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "glinet,gl-mt300n", "ralink,mt7620a-soc";
model = "GL-MT300N";
aliases {
label-mac-device = &wmac;
};
chosen {
bootargs = "console=ttyS0,115200";
};
leds {
compatible = "gpio-leds";
wan {
label = "gl-mt300n:wan";
gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
};
lan {
label = "gl-mt300n:lan";
gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
};
wlan {
label = "gl-mt300n:wlan";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
BTN_0 {
label = "BTN_0";
gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
};
BTN_1 {
label = "BTN_1";
gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
linux,code = <BTN_1>;
};
};
};
&gpio2 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
macaddr_factory_4000: macaddr@4000 {
reg = <0x4000 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xf80000>;
};
partition@ff0000 {
label = "art";
reg = <0xff0000 0x10000>;
};
};
};
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&ethernet {
nvmem-cells = <&macaddr_factory_4000>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "wllll";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&state_default {
gpio {
groups = "wled","ephy","i2c";
function = "gpio";
};
};

View File

@@ -0,0 +1,171 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "glinet,gl-mt750", "ralink,mt7620a-soc";
model = "GL-MT750";
aliases {
label-mac-device = &wmac;
};
chosen {
bootargs = "console=ttyS0,115200";
};
leds {
compatible = "gpio-leds";
wan {
label = "gl-mt750:wan";
gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
};
lan {
label = "gl-mt750:lan";
gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
};
wlan {
label = "gl-mt750:wlan";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
BTN_0 {
label = "BTN_0";
gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
};
BTN_1 {
label = "BTN_1";
gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
linux,code = <BTN_1>;
};
};
};
&gpio2 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_4000: macaddr@4000 {
reg = <0x4000 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xf80000>;
};
partition@ff0000 {
label = "art";
reg = <0xff0000 0x10000>;
};
};
};
};
&sdhci {
status = "okay";
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&ethernet {
nvmem-cells = <&macaddr_factory_4000>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "wllll";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&pcie {
status = "okay";
};
&pcie0 {
mt76@0,0 {
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
};
};
&state_default {
gpio {
groups = "wled","ephy","uartf";
function = "gpio";
};
};

View File

@@ -0,0 +1,205 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "head-weblink,hdrm200", "ralink,mt7620a-soc";
model = "Head Weblink HDRM200";
aliases {
led-boot = &led_system;
led-failsafe = &led_system;
led-running = &led_system;
led-upgrade = &led_system;
};
chosen {
bootargs = "console=ttyS1,57600";
};
leds {
compatible = "gpio-leds";
rssi {
label = "red:rssi";
gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
};
led_system: system {
label = "green:system";
gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
};
air {
label = "green:wifi";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
wps {
label = "wps";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
reset {
label = "reset";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xfb0000>;
};
};
};
};
&gpio1 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&sdhci {
status = "okay";
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
port@4 {
status = "okay";
phy-handle = <&phy4>;
phy-mode = "rgmii";
};
port@5 {
status = "okay";
phy-handle = <&phy5>;
phy-mode = "rgmii";
};
mdio-bus {
status = "okay";
phy4: ethernet-phy@4 {
reg = <4>;
phy-mode = "rgmii";
};
phy5: ethernet-phy@5 {
reg = <5>;
phy-mode = "rgmii";
};
};
};
&gsw {
mediatek,port4-gmac;
mediatek,ephy-base = /bits/ 8 <8>;
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&state_default {
default {
groups = "i2c", "uartf", "pa", "spi refclk",
"wled";
function = "gpio";
};
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
};
};
&uart {
status = "okay";
};

View File

@@ -0,0 +1,33 @@
#include "mt7620a_hiwifi_hc5x61.dtsi"
/ {
compatible = "hiwifi,hc5661", "hiwifi,hc5x61", "ralink,mt7620a-soc";
model = "HiWiFi HC5661";
aliases {
led-boot = &led_system;
led-failsafe = &led_system;
led-running = &led_system;
led-upgrade = &led_system;
};
leds {
compatible = "gpio-leds";
led_system: system {
label = "blue:system";
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
};
internet {
label = "blue:internet";
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
};
wlan2g {
label = "blue:wlan2g";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
};
};

View File

@@ -0,0 +1,71 @@
#include "mt7620a_hiwifi_hc5x61.dtsi"
/ {
compatible = "hiwifi,hc5761", "hiwifi,hc5x61", "ralink,mt7620a-soc";
model = "HiWiFi HC5761";
aliases {
led-boot = &led_system;
led-failsafe = &led_system;
led-running = &led_system;
led-upgrade = &led_system;
};
leds {
compatible = "gpio-leds";
led_system: system {
label = "blue:system";
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
};
internet {
label = "blue:internet";
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
};
wlan2g {
label = "blue:wlan2g";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
wlan5g {
label = "blue:wlan5g";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
};
gpio_export {
compatible = "gpio-export";
#size-cells = <0>;
usbpower {
gpio-export,name = "usbpower";
gpio-export,output = <1>;
gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
};
};
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&pcie {
status = "okay";
};
&pcie0 {
mt76@0,0 {
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
};
};

View File

@@ -0,0 +1,119 @@
#include "mt7620a_hiwifi_hc5x61.dtsi"
/ {
compatible = "hiwifi,hc5861", "hiwifi,hc5x61", "ralink,mt7620a-soc";
model = "HiWiFi HC5861";
aliases {
led-boot = &led_system;
led-failsafe = &led_system;
led-running = &led_system;
led-upgrade = &led_system;
};
leds {
compatible = "gpio-leds";
led_system: system {
label = "blue:system";
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
};
wlan2g {
label = "blue:wlan2g";
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
internet {
label = "blue:internet";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
};
wlan5g {
label = "blue:wlan5g";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
turbo {
label = "blue:turbo";
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
};
};
gpio_export {
compatible = "gpio-export";
#size-cells = <0>;
usbpower {
gpio-export,name = "usbpower";
gpio-export,output = <0>;
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
};
};
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
mediatek,portmap = "llllw";
port@5 {
status = "okay";
phy-handle = <&phy5>;
phy-mode = "rgmii";
};
mdio-bus {
status = "okay";
phy5: ethernet-phy@5 {
reg = <5>;
phy-mode = "rgmii";
};
};
};
&gsw {
mediatek,ephy-base = /bits/ 8 <12>;
};
&mmc_reg_3v3 {
/delete-property/ enable-active-high;
gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
compatible = "pci14c3,7662";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
};
};
&sdhci {
max-frequency = <24000000>;
};
&wmac {
pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
pinctrl-1 = <&pa_gpio_pins>;
};

View File

@@ -0,0 +1,126 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "hiwifi,hc5x61", "ralink,mt7620a-soc";
chosen {
bootargs = "console=ttyS0,115200";
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
m25p,fast-read;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "hw_panic";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xf70000>;
};
partition@fc0000 {
label = "oem";
reg = <0xfc0000 0x20000>;
read-only;
};
partition@fe0000 {
label = "bdinfo";
reg = <0xfe0000 0x10000>;
read-only;
};
partition@ff0000 {
label = "backup";
reg = <0xff0000 0x10000>;
read-only;
};
};
};
};
&ethernet {
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "wllll";
};
&sdhci {
status = "okay";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&state_default {
gpio {
groups = "uartf", "wled";
function = "gpio";
};
};

View File

@@ -0,0 +1,174 @@
// SPDX-License-Identifier: BSD-3-Clause
/*
* Copyright(c) 2017 Kristian Evensen <kristian.evensen@gmail.com>.
* All rights reserved.
*/
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "hnet,c108", "ralink,mt7620a-soc";
model = "HNET C108";
aliases {
led-boot = &led_lan_green;
led-failsafe = &led_lan_green;
led-running = &led_lan_green;
led-upgrade = &led_lan_green;
};
chosen {
bootargs = "console=ttyS0,115200";
};
gpio-export {
compatible = "gpio-export";
#size-cells = <0>;
power_modem {
gpio-export,name = "power_modem";
gpio-export,output = <1>;
gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
};
};
leds {
compatible = "gpio-leds";
sdcard {
label = "green:sdcard";
gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
};
modem_green {
label = "green:modem";
gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
};
modem_red {
label = "red:modem";
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
lan_red {
function = LED_FUNCTION_LAN;
color = <LED_COLOR_ID_RED>;
gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
};
led_lan_green: lan_green {
function = LED_FUNCTION_LAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
};
&gpio1 {
status = "okay";
};
&gpio2 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
macaddr_factory_28: macaddr@28 {
reg = <0x28 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xfb0000>;
};
};
};
};
&sdhci {
status = "okay";
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&ethernet {
nvmem-cells = <&macaddr_factory_28>;
nvmem-cell-names = "mac-address";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&state_default {
default {
groups = "i2c", "uartf", "spi refclk", "ephy";
function = "gpio";
};
};
&pcie {
status = "okay";
};

View File

@@ -0,0 +1,159 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/mtd/partitions/uimage.h>
/ {
compatible = "humax,e2", "ralink,mt7620a-soc";
model = "HUMAX E2";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
label-mac-device = &ethernet;
};
leds {
compatible = "gpio-leds";
led_power: power {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
};
pairing {
label = "green:pairing";
gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
};
wlan {
function = LED_FUNCTION_WLAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
};
lan {
function = LED_FUNCTION_LAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
};
wps {
function = LED_FUNCTION_WPS;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
};
&gpio1 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x30000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_10007: macaddr@10007 {
reg = <0x10007 0x6>;
};
};
};
partition@70000 {
compatible = "openwrt,uimage", "denx,uimage";
openwrt,offset = <FW_EDIMAX_OFFSET>;
openwrt,partition-magic = <FW_MAGIC_EDIMAX>;
label = "firmware";
reg = <0x70000 0x790000>;
};
};
};
};
&ethernet {
nvmem-cells = <&macaddr_factory_10007>;
nvmem-cell-names = "mac-address";
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
};
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&state_default {
gpio {
groups = "rgmii1";
function = "gpio";
};
};

View File

@@ -0,0 +1,241 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "iodata,wn-ac1167gr", "ralink,mt7620a-soc";
model = "I-O DATA WN-AC1167GR";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
leds {
compatible = "gpio-leds";
led_power: power {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wlan2g {
label = "green:wlan2g";
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
};
notification {
label = "green:notification";
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
};
wlan5g {
label = "green:wlan5g";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
wps {
label = "wps";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
reset {
label = "reset";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
auto {
label = "auto";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x8000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@48000 {
label = "iNIC_rf";
reg = <0x48000 0x8000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_iNIC_rf_0: eeprom@0 {
reg = <0x0 0x200>;
};
};
};
partition@50000 {
label = "NoUsed";
reg = <0x50000 0x20000>;
read-only;
};
partition@70000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x70000 0x6b4000>;
};
partition@724000 {
label = "manufacture";
reg = <0x724000 0x8c000>;
read-only;
};
partition@7b0000 {
label = "backup";
reg = <0x7b0000 0x10000>;
read-only;
};
partition@7c0000 {
label = "storage";
reg = <0x7c0000 0x40000>;
read-only;
};
};
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &mdio_pins>;
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
port@5 {
status = "okay";
mediatek,fixed-link = <1000 1 1 1>;
phy-mode = "rgmii";
};
mdio-bus {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
ethernet-phy@0 {
reg = <0>;
phy-mode = "rgmii";
};
ethernet-phy@1 {
reg = <1>;
phy-mode = "rgmii";
};
ethernet-phy@2 {
reg = <2>;
phy-mode = "rgmii";
};
ethernet-phy@3 {
reg = <3>;
phy-mode = "rgmii";
};
ethernet-phy@4 {
reg = <4>;
phy-mode = "rgmii";
};
ethernet-phy@1f {
reg = <0x1f>;
phy-mode = "rgmii";
};
};
};
&gsw {
mediatek,ephy-base = /bits/ 8 <12>;
};
&state_default {
gpio {
groups = "i2c", "uartf";
function = "gpio";
};
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_iNIC_rf_0>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
};
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};

View File

@@ -0,0 +1,219 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "iodata,wn-ac733gr3", "ralink,mt7620a-soc";
model = "I-O DATA WN-AC733GR3";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
leds {
compatible = "gpio-leds";
led_power: power {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
default-state = "on";
};
notification {
label = "green:notification";
gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
};
wlan2g {
label = "green:wlan2g";
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
};
wlan5g {
label = "green:wlan5g";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
router {
label = "router";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
auto {
label = "auto";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
linux,input-type = <EV_SW>;
};
};
rtl8367rb {
compatible = "realtek,rtl8367b";
gpio-sda = <&gpio0 22 GPIO_ACTIVE_HIGH>;
gpio-sck = <&gpio0 23 GPIO_ACTIVE_HIGH>;
realtek,extif = <6 1 0 1 1 1 1 1 1 2>;
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x8000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@48000 {
label = "iNIC_rf";
reg = <0x48000 0x8000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_iNIC_rf_0: eeprom@0 {
reg = <0x0 0x200>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x6d4000>;
};
partition@724000 {
label = "manufacture";
reg = <0x724000 0x8c000>;
read-only;
};
partition@7b0000 {
label = "backup";
reg = <0x7b0000 0x10000>;
read-only;
};
partition@7c0000 {
label = "storage";
reg = <0x7c0000 0x40000>;
read-only;
};
};
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins>;
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
port@5 {
status = "okay";
mediatek,fixed-link = <1000 1 1 1>;
phy-mode = "rgmii";
};
};
&gpio0 {
rtl8367rb_reset {
gpio-hog;
gpios = <0 GPIO_ACTIVE_HIGH>;
output-high;
line-name = "rtl8367rb-reset";
};
};
&state_default {
gpio {
groups = "i2c", "uartf", "mdio";
function = "gpio";
};
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_iNIC_rf_0>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
};
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};

View File

@@ -0,0 +1,106 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
aliases {
label-mac-device = &ethernet;
};
};
&gpio1 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <40000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x20000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_uboot_1f400: eeprom@1f400 {
reg = <0x1f400 0x200>;
};
eeprom_uboot_1f800: eeprom@1f800 {
reg = <0x1f800 0x200>;
};
macaddr_uboot_1fc20: macaddr@1fc20 {
reg = <0x1fc20 0x6>;
};
};
};
partition@20000 {
label = "config";
reg = <0x20000 0x10000>;
read-only;
};
firmware: partition@30000 {
compatible = "denx,uimage";
label = "firmware";
};
};
};
};
&ethernet {
nvmem-cells = <&macaddr_uboot_1fc20>;
nvmem-cell-names = "mac-address";
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_uboot_1f800>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
led {
led-sources = <0>;
led-active-low;
};
};
};
&wmac {
pinctrl-names = "default";
pinctrl-0 = <&wled_pins>;
nvmem-cells = <&eeprom_uboot_1f400>;
nvmem-cell-names = "eeprom";
};

View File

@@ -0,0 +1,111 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include <dt-bindings/leds/common.h>
#include "mt7620a_iptime.dtsi"
/ {
compatible = "iptime,a1004ns", "ralink,mt7620a-soc";
model = "ipTIME A1004ns";
aliases {
led-boot = &led_cpu;
led-failsafe = &led_cpu;
led-running = &led_cpu;
led-upgrade = &led_cpu;
};
leds {
compatible = "gpio-leds";
led_cpu: cpu {
function = LED_FUNCTION_CPU;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
};
usb {
function = LED_FUNCTION_USB;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
trigger-sources = <&ohci_port1>, <&ehci_port1>;
linux,default-trigger = "usbport";
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
};
&firmware {
reg = <0x30000 0xfd0000>;
};
&state_default {
gpio {
groups = "i2c", "uartf", "spi refclk";
function = "gpio";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &mdio_pins>;
port@5 {
status = "okay";
mediatek,fixed-link = <1000 1 1 1>;
phy-mode = "rgmii";
};
mdio-bus {
status = "okay";
ethernet-phy@0 {
reg = <0>;
phy-mode = "rgmii";
};
ethernet-phy@1 {
reg = <1>;
phy-mode = "rgmii";
};
ethernet-phy@2 {
reg = <2>;
phy-mode = "rgmii";
};
ethernet-phy@3 {
reg = <3>;
phy-mode = "rgmii";
};
ethernet-phy@4 {
reg = <4>;
phy-mode = "rgmii";
};
ethernet-phy@1f {
reg = <0x1f>;
phy-mode = "rgmii";
};
};
};
&gsw {
mediatek,ephy-base = /bits/ 8 <12>;
};

View File

@@ -0,0 +1,62 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include <dt-bindings/leds/common.h>
#include "mt7620a_iptime.dtsi"
/ {
compatible = "iptime,a104ns", "ralink,mt7620a-soc";
model = "ipTIME A104ns";
aliases {
led-boot = &led_cpu;
led-failsafe = &led_cpu;
led-running = &led_cpu;
led-upgrade = &led_cpu;
};
leds {
compatible = "gpio-leds";
usb {
function = LED_FUNCTION_USB;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
trigger-sources = <&ohci_port1>, <&ehci_port1>;
linux,default-trigger = "usbport";
};
led_cpu: cpu {
function = LED_FUNCTION_CPU;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
wps {
label = "wps";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
reset {
label = "reset";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
};
&firmware {
reg = <0x30000 0x7d0000>;
};
&state_default {
gpio {
groups = "uartf", "spi refclk";
function = "gpio";
};
};

View File

@@ -0,0 +1,129 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/{
compatible = "kimax,u25awf-h1","ralink,mt7620a-soc";
model = "Kimax U25AWF-H1";
aliases {
led-boot = &led_wifi;
led-failsafe = &led_wifi;
led-running = &led_wifi;
led-upgrade = &led_wifi;
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
leds {
compatible = "gpio-leds";
led_wifi: wifi {
label = "red:wifi";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
};
lan {
function = LED_FUNCTION_LAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
};
};
};
&gpio2 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xfb0000>;
};
};
};
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&ethernet {
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&state_default {
default {
groups = "uartf", "ephy", "wled";
function = "gpio";
};
};

View File

@@ -0,0 +1,181 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/mtd/partitions/uimage.h>
/ {
compatible = "lava,lr-25g001", "ralink,mt7620a-soc";
model = "LAVA LR-25G001";
aliases {
led-boot = &led_status;
led-failsafe = &led_status;
led-running = &led_status;
led-upgrade = &led_status;
};
keys {
compatible = "gpio-keys";
wps {
label = "wps";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
leds {
compatible = "gpio-leds";
led_status: status {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
};
wifi2g {
label = "green:wifi2g";
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
wifi5g {
label = "green:wifi5g";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
};
gpio_export {
compatible = "gpio-export";
#size-cells = <0>;
usbpower {
gpio-export,name = "usbpower";
gpio-export,output = <1>;
gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "jboot";
reg = <0x0 0x10000>;
read-only;
};
partition@10000 {
compatible = "openwrt,uimage", "denx,uimage";
openwrt,ih-magic = <IH_MAGIC_OKLI>;
openwrt,offset = <0x10000>;
label = "firmware";
reg = <0x10000 0xfe0000>;
};
partition@ff0000 {
label = "config";
reg = <0xff0000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_config_e08a: eeprom@e08a {
reg = <0xe08a 0x200>;
};
macaddr_config_e07e: macaddr@e07e {
compatible = "mac-base";
reg = <0xe07e 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
};
};
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
port@5 {
status = "okay";
phy-mode = "rgmii";
mediatek,fixed-link = <1000 1 1 1>;
};
mdio-bus {
status = "okay";
ethernet-phy@0 {
reg = <0>;
phy-mode = "rgmii";
qca,ar8327-initvals = <
0x04 0x87300000 /* PORT0 PAD MODE CTRL */
0x0c 0x00000000 /* PORT6 PAD MODE CTRL */
0x7c 0x0000007e /* PORT0_STATUS */
0x80 0x00001200 /* PORT1_STATUS */
0x84 0x00001200 /* PORT2_STATUS */
0x88 0x00001200 /* PORT3_STATUS */
0x8c 0x00001200 /* PORT4_STATUS */
0x90 0x00001200 /* PORT5_STATUS */
0x94 0x00000000 /* PORT6_STATUS */
>;
};
};
};
&gsw {
mediatek,ephy-base = /bits/ 8 <8>;
};
&pcie {
status = "okay";
};
&pcie0 {
mt76x0e@0,0 {
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_config_e08a>, <&macaddr_config_e07e 2>;
nvmem-cell-names = "eeprom", "mac-address";
};
};
&state_default {
gpio {
groups = "uartf", "i2c";
function = "gpio";
};
};

View File

@@ -0,0 +1,193 @@
// SPDX-License-Identifier: GPL-2.0-only
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "lb-link,bl-w1200", "ralink,mt7620a-soc";
model = "LB-Link BL-W1200";
aliases {
led-boot = &led_wps;
led-failsafe = &led_wps;
led-upgrade = &led_wps;
};
keys {
compatible = "gpio-keys";
reset_wps {
label = "reset_wps";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
leds {
compatible = "gpio-leds";
led_wps: wps {
function = LED_FUNCTION_WPS;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
};
};
&gpio1 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "config";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_28: macaddr@28 {
reg = <0x28 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x7b0000>;
};
};
};
};
&state_default {
gpio {
groups = "uartf", "spi refclk";
function = "gpio";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii2_pins &mdio_pins>;
nvmem-cells = <&macaddr_factory_28>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "wllll";
port@5 {
status = "okay";
mediatek,fixed-link = <1000 1 1 1>;
phy-mode = "rgmii";
};
mdio-bus {
status = "okay";
ethernet-phy@0 {
reg = <0>;
phy-mode = "rgmii";
};
ethernet-phy@1 {
reg = <1>;
phy-mode = "rgmii";
};
ethernet-phy@2 {
reg = <2>;
phy-mode = "rgmii";
};
ethernet-phy@3 {
reg = <3>;
phy-mode = "rgmii";
};
ethernet-phy@4 {
reg = <4>;
phy-mode = "rgmii";
};
ethernet-phy@1f {
reg = <0x1f>;
phy-mode = "rgmii";
};
};
};
&gsw {
mediatek,ephy-base = /bits/ 8 <12>;
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
ieee80211-freq-limit = <5000000 6000000>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
led {
led-sources = <2>;
led-active-low;
};
};
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};

View File

@@ -0,0 +1,65 @@
#include <dt-bindings/leds/common.h>
#include "mt7620a_lenovo_newifi-y1.dtsi"
/ {
compatible = "lenovo,newifi-y1", "ralink,mt7620a-soc";
model = "Lenovo Y1";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
label-mac-device = &ethernet;
};
leds {
compatible = "gpio-leds";
led_power: power {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
};
wlan1 {
label = "blue:wifi";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
};
wlan2 {
label = "blue:wifi5g";
gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
};
usb {
function = LED_FUNCTION_USB;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
trigger-sources = <&ohci_port1>, <&ehci_port1>;
linux,default-trigger = "usbport";
};
lan {
function = LED_FUNCTION_LAN;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
};
internet {
label = "blue:internet";
gpios = <&gpio2 11 GPIO_ACTIVE_LOW>;
};
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
nvmem-cells = <&macaddr_factory_28>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "llllw";
};

View File

@@ -0,0 +1,124 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "lenovo,newifi-y1", "ralink,mt7620a-soc";
chosen {
bootargs = "console=ttyS0,115200";
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
};
&gpio2 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_28: macaddr@28 {
reg = <0x28 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xfb0000>;
};
};
};
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&pcie {
status = "okay";
};
&pcie0 {
mt76@0,0 {
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
};
};
&wmac {
pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
pinctrl-1 = <&pa_gpio_pins>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&state_default {
gpio {
groups = "uartf", "wled", "nd_sd";
function = "gpio";
};
};

View File

@@ -0,0 +1,123 @@
#include <dt-bindings/leds/common.h>
#include "mt7620a_lenovo_newifi-y1.dtsi"
/ {
compatible = "lenovo,newifi-y1s", "lenovo,newifi-y1", "ralink,mt7620a-soc";
model = "Lenovo Y1S";
aliases {
led-boot = &led_power_blue;
led-failsafe = &led_power_blue;
led-running = &led_power_blue;
led-upgrade = &led_power_blue;
label-mac-device = &ethernet;
};
gpio_export {
compatible = "gpio-export";
#size-cells = <0>;
usb0 {
gpio-export,name = "usb0";
gpio-export,output = <1>;
gpios = <&gpio2 14 GPIO_ACTIVE_HIGH>;
};
usb1 {
gpio-export,name = "usb1";
gpio-export,output = <1>;
gpios = <&gpio2 15 GPIO_ACTIVE_HIGH>;
};
usb2 {
gpio-export,name = "usb2";
gpio-export,output = <1>;
gpios = <&gpio2 16 GPIO_ACTIVE_HIGH>;
};
};
leds {
compatible = "gpio-leds";
power1 {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_YELLOW>;
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
};
led_power_blue: power2 {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
};
wlan1 {
label = "yellow:wifi";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
};
wlan2 {
label = "blue:wifi";
gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
};
usb1 {
function = LED_FUNCTION_USB;
color = <LED_COLOR_ID_YELLOW>;
gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
};
usb2 {
function = LED_FUNCTION_USB;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
trigger-sources = <&ohci_port1>, <&ehci_port1>;
linux,default-trigger = "usbport";
};
internet {
label = "blue:internet";
gpios = <&gpio2 11 GPIO_ACTIVE_LOW>;
};
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
nvmem-cells = <&macaddr_factory_28>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "wllll";
port@4 {
status = "okay";
phy-handle = <&phy4>;
phy-mode = "rgmii";
};
port@5 {
status = "okay";
phy-handle = <&phy5>;
phy-mode = "rgmii";
};
mdio-bus {
status = "okay";
phy4: ethernet-phy@4 {
reg = <4>;
phy-mode = "rgmii";
};
phy5: ethernet-phy@5 {
reg = <5>;
phy-mode = "rgmii";
};
};
};
&gsw {
mediatek,port4-gmac;
mediatek,ephy-base = /bits/ 8 <8>;
};

View File

@@ -0,0 +1,172 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2014 Imre Kaloz <kaloz@openwrt.org>
*/
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "linksys,e1700", "ralink,mt7620a-soc";
model = "Linksys E1700";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
linux,code = <KEY_WPS_BUTTON>;
};
};
leds {
compatible = "gpio-leds";
led_power: power {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
};
wan {
function = LED_FUNCTION_WPS;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "config";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
macaddr_factory_28: macaddr@28 {
reg = <0x28 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x7b0000>;
};
};
};
};
&state_default {
gpio {
groups = "i2c", "uartf";
function = "gpio";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
nvmem-cells = <&macaddr_factory_28>;
nvmem-cell-names = "mac-address";
port@5 {
status = "okay";
mediatek,fixed-link = <1000 1 1 1>;
phy-mode = "rgmii";
};
mdio-bus {
status = "okay";
phy0: ethernet-phy@0 {
reg = <0>;
phy-mode = "rgmii";
};
phy1: ethernet-phy@1 {
reg = <1>;
phy-mode = "rgmii";
};
phy2: ethernet-phy@2 {
reg = <2>;
phy-mode = "rgmii";
};
phy3: ethernet-phy@3 {
reg = <3>;
phy-mode = "rgmii";
};
phy4: ethernet-phy@4 {
reg = <4>;
phy-mode = "rgmii";
};
phy1f: ethernet-phy@1f {
reg = <0x1f>;
phy-mode = "rgmii";
};
};
};
&gsw {
mediatek,ephy-base = /bits/ 8 <12>;
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};

View File

@@ -0,0 +1,113 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "microduino,microwrt", "ralink,mt7620a-soc";
model = "Microduino MicroWRT";
chosen {
bootargs = "console=ttyS0,115200";
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x20000>;
read-only;
};
partition@20000 {
label = "u-boot-env";
reg = <0x20000 0x10000>;
read-only;
};
partition@30000 {
label = "factory";
reg = <0x30000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@40000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x40000 0xfc0000>;
};
};
};
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "llllw";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&state_default {
default {
groups = "wled", "i2c", "wdt", "uartf";
function = "gpio";
};
};

View File

@@ -0,0 +1,150 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "netcore,nw5212", "ralink,mt7620a-soc";
model = "Netcore NW5212";
aliases {
label-mac-device = &ethernet;
};
leds {
compatible = "gpio-leds";
lan4 {
label = "green:lan4";
gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
};
lan3 {
label = "green:lan3";
gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
};
lan2 {
label = "green:lan2";
gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
};
lan1 {
label = "green:lan1";
gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
};
wan {
function = LED_FUNCTION_WAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
};
wlan2g {
label = "green:wlan2g";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
};
&gpio2 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
m25p,fast-read;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
macaddr_factory_28: macaddr@28 {
reg = <0x28 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xfb0000>;
};
};
};
};
&state_default {
gpio {
groups = "uartf", "wled", "ephy";
function = "gpio";
};
};
&ethernet {
mediatek,portmap = "llllw";
nvmem-cells = <&macaddr_factory_28>;
nvmem-cell-names = "mac-address";
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};

View File

@@ -0,0 +1,160 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2016 Joseph C. Lehner <joseph.c.lehner@gmail.com>
*/
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "netgear,ex2700", "ralink,mt7620a-soc";
model = "Netgear EX2700";
aliases {
led-boot = &led_power_green;
led-failsafe = &led_power_green;
led-running = &led_power_green;
led-upgrade = &led_power_green;
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
leds {
compatible = "gpio-leds";
led_power_green: power_g {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
default-state = "on";
};
power_r {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_RED>;
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
};
device_g {
label = "green:device";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
};
device_r {
label = "red:device";
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
};
router_g {
label = "green:router";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
};
router_r {
label = "red:router";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
};
wps {
function = LED_FUNCTION_WPS;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
};
};
&gpio1 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x40000 0x3b0000>;
};
partition@3f0000 {
label = "art";
reg = <0x3f0000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
macaddr_art_0: macaddr@0 {
reg = <0x0 0x6>;
};
macaddr_art_6: macaddr@6 {
reg = <0x6 0x6>;
};
eeprom_art_1000: eeprom@1000 {
reg = <0x1000 0x200>;
};
};
};
};
};
};
&ethernet {
nvmem-cells = <&macaddr_art_0>;
nvmem-cell-names = "mac-address";
};
&wmac {
nvmem-cells = <&eeprom_art_1000>, <&macaddr_art_6>;
nvmem-cell-names = "eeprom", "mac-address";
};
&state_default {
default {
groups = "i2c", "uartf", "spi refclk";
function = "gpio";
};
};

View File

@@ -0,0 +1,8 @@
/* This file is released into the public domain */
#include "mt7620a_netgear_ex3x00_ex61xx.dtsi"
/ {
compatible = "netgear,ex3700", "ralink,mt7620a-soc";
model = "Netgear EX3700/EX3800";
};

View File

@@ -0,0 +1,178 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
aliases {
led-boot = &led_power_amber;
led-failsafe = &led_power_amber;
led-running = &led_power_green;
led-upgrade = &led_power_green;
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio2 26 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
leds {
compatible = "gpio-leds";
led_power_green: power_green {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led_power_amber: power_amber {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
};
router_green {
label = "green:router";
gpios = <&gpio2 25 GPIO_ACTIVE_LOW>;
};
router_red {
label = "red:router";
gpios = <&gpio2 24 GPIO_ACTIVE_LOW>;
};
device_green {
label = "green:device";
gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
};
device_red {
label = "red:device";
gpios = <&gpio2 21 GPIO_ACTIVE_LOW>;
};
wps {
function = LED_FUNCTION_WPS;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
};
};
};
&gpio2 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "config";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_28: macaddr@28 {
reg = <0x28 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x790000>;
};
partition@7e0000 {
label = "board_data";
reg = <0x7e0000 0x10000>;
read-only;
};
partition@7f0000 {
label = "nvram";
reg = <0x7f0000 0x10000>;
read-only;
};
};
};
};
&pcie {
status = "okay";
};
&pcie0 {
mt76@0,0 {
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
};
};
&ethernet {
nvmem-cells = <&macaddr_factory_28>;
nvmem-cell-names = "mac-address";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&state_default {
default {
groups = "i2c", "rgmii2", "spi refclk";
function = "gpio";
};
};

View File

@@ -0,0 +1,8 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a_netgear_ex3x00_ex61xx.dtsi"
/ {
compatible = "netgear,ex6120", "ralink,mt7620a-soc";
model = "Netgear EX6120";
};

View File

@@ -0,0 +1,12 @@
/* This file is released into the public domain */
#include "mt7620a_netgear_ex3x00_ex61xx.dtsi"
/ {
compatible = "netgear,ex6130", "ralink,mt7620a-soc";
model = "Netgear EX6130";
aliases {
label-mac-device = &ethernet;
};
};

View File

@@ -0,0 +1,8 @@
/* This file is released into the public domain */
#include "mt7620a_netgear_wn3x00rp.dtsi"
/ {
compatible = "netgear,wn3000rp-v3", "ralink,mt7620a-soc";
model = "Netgear WN3000RP v3";
};

View File

@@ -0,0 +1,8 @@
/* This file is released into the public domain */
#include "mt7620a_netgear_wn3x00rp.dtsi"
/ {
compatible = "netgear,wn3100rp-v2", "ralink,mt7620a-soc";
model = "Netgear WN3100RP v2";
};

View File

@@ -0,0 +1,164 @@
/* This file is released into the public domain */
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
aliases {
led-boot = &led_power_green;
led-failsafe = &led_power_green;
led-running = &led_power_green;
led-upgrade = &led_power_green;
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
leds {
compatible = "gpio-leds";
led_power_green: power_g {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
default-state = "on";
};
power_r {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_RED>;
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
};
client_g {
label = "green:client";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
};
client_r {
label = "red:client";
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
};
router_g {
label = "green:router";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
};
router_r {
label = "red:router";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
};
wps {
function = LED_FUNCTION_WPS;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
l_arrow {
label = "blue:leftarrow";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
};
r_arrow {
label = "blue:rightarrow";
gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
};
};
};
&gpio1 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x40000 0x7b0000>;
};
partition@7f0000 {
label = "art";
reg = <0x7f0000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
macaddr_art_0: macaddr@0 {
reg = <0x0 0x6>;
};
macaddr_art_6: macaddr@6 {
reg = <0x6 0x6>;
};
eeprom_art_1000: eeprom@1000 {
reg = <0x1000 0x200>;
};
};
};
};
};
};
&ethernet {
nvmem-cells = <&macaddr_art_0>;
nvmem-cell-names = "mac-address";
};
&wmac {
nvmem-cells = <&eeprom_art_1000>, <&macaddr_art_6>;
nvmem-cell-names = "eeprom", "mac-address";
};
&state_default {
default {
groups = "i2c", "uartf", "spi refclk";
function = "gpio";
};
};

View File

@@ -0,0 +1,187 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "netis,wf2770", "ralink,mt7620a-soc";
model = "NETIS WF2770";
leds {
compatible = "gpio-leds";
wlan {
function = LED_FUNCTION_WLAN;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
rfkill {
label = "rfkill";
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RFKILL>;
};
led-toggle {
label = "led-toggle";
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
linux,code = <KEY_LIGHTS_TOGGLE>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "config";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xfb0000>;
};
};
};
};
&state_default {
gpio {
groups = "i2c", "uartf";
function = "gpio";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &mdio_pins>;
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
port@5 {
status = "okay";
mediatek,fixed-link = <1000 1 1 1>;
phy-mode = "rgmii";
};
mdio-bus {
status = "okay";
ethernet-phy@0 {
reg = <0>;
phy-mode = "rgmii";
};
ethernet-phy@1 {
reg = <1>;
phy-mode = "rgmii";
};
ethernet-phy@2 {
reg = <2>;
phy-mode = "rgmii";
};
ethernet-phy@3 {
reg = <3>;
phy-mode = "rgmii";
};
ethernet-phy@4 {
reg = <4>;
phy-mode = "rgmii";
};
ethernet-phy@1f {
reg = <0x1f>;
phy-mode = "rgmii";
};
};
};
&gsw {
mediatek,ephy-base = /bits/ 8 <12>;
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
};
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};

View File

@@ -0,0 +1,138 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "ohyeah,oy-0001", "ralink,mt7620a-soc";
model = "OY-0001";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
chosen {
bootargs = "console=ttyS0,115200";
};
leds {
compatible = "gpio-leds";
led_power: powerled {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
};
wifiled {
label = "green:wifi";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
s1 {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
macaddr_factory_28: macaddr@28 {
reg = <0x28 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xfb0000>;
};
};
};
};
&state_default {
gpio {
groups = "i2c", "uartf", "rgmii1", "rgmii2", "wled";
function = "gpio";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
nvmem-cells = <&macaddr_factory_28>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "llllw";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&sdhci {
status = "okay";
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};

View File

@@ -0,0 +1,24 @@
#include "mt7620a_phicomm_k2x.dtsi"
/ {
compatible = "phicomm,k2-v22.4", "ralink,mt7620a-soc";
model = "Phicomm K2 v22.4 or older";
};
&partitions {
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x7b0000>;
};
};
&ethernet {
mediatek,portmap = "llllw";
};
&wmac {
pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
pinctrl-1 = <&pa_gpio_pins>;
};

View File

@@ -0,0 +1,30 @@
#include "mt7620a_phicomm_k2x.dtsi"
/ {
compatible = "phicomm,k2-v22.5", "ralink,mt7620a-soc";
model = "Phicomm K2 v22.5 or newer";
};
&partitions {
partition@50000 {
label = "permanent_config";
reg = <0x50000 0x50000>;
read-only;
};
partition@a0000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0xa0000 0x760000>;
};
};
&ethernet {
mediatek,portmap = "llllw";
};
&wmac {
pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
pinctrl-1 = <&pa_gpio_pins>;
};

View File

@@ -0,0 +1,48 @@
#include "mt7620a_phicomm_k2x.dtsi"
/ {
compatible = "phicomm,k2g", "ralink,mt7620a-soc";
model = "Phicomm K2G";
};
&partitions {
partition@50000 {
reg = <0x50000 0x50000>;
label = "permanent_config";
read-only;
};
partition@a0000 {
compatible = "denx,uimage";
reg = <0xa0000 0x760000>;
label = "firmware";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii2_pins &mdio_pins>;
mediatek,portmap = "llllw";
port@5 {
status = "okay";
phy-handle = <&phy5>;
phy-mode = "rgmii";
};
mdio-bus {
status = "okay";
phy5: ethernet-phy@5 {
reg = <5>;
phy-mode = "rgmii";
};
};
};
&wmac {
pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
pinctrl-1 = <&pa_gpio_pins>;
};

View File

@@ -0,0 +1,130 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
aliases {
led-boot = &led_blue;
led-failsafe = &led_blue;
led-running = &led_blue;
led-upgrade = &led_blue;
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
leds {
compatible = "gpio-leds";
led_blue: blue {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
default-state = "on";
};
yellow {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_YELLOW>;
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
};
red {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_RED>;
gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
m25p,fast-read;
partitions: partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_28: macaddr@28 {
reg = <0x28 0x6>;
};
};
};
};
};
};
&state_default {
gpio {
groups = "i2c", "uartf";
function = "gpio";
};
};
&pcie {
status = "okay";
};
&pcie0 {
mt76@0,0 {
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
};
};
&ethernet {
nvmem-cells = <&macaddr_factory_28>;
nvmem-cell-names = "mac-address";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};

View File

@@ -0,0 +1,144 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "phicomm,psg1208", "ralink,mt7620a-soc";
model = "Phicomm PSG1208";
aliases {
led-boot = &led_wps;
led-failsafe = &led_wps;
led-running = &led_wps;
led-upgrade = &led_wps;
};
leds {
compatible = "gpio-leds";
led_wps: wps {
function = LED_FUNCTION_WPS;
color = <LED_COLOR_ID_WHITE>;
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
wlan {
label = "white:wlan2g";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
};
&gpio1 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
m25p,fast-read;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x7b0000>;
};
};
};
};
&state_default {
gpio {
groups = "i2c", "spi refclk", "wled";
function = "gpio";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "llllw";
};
&pcie {
status = "okay";
};
&pcie0 {
mt76@0,0 {
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
};
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};

View File

@@ -0,0 +1,14 @@
#include "mt7620a_phicomm_k2x.dtsi"
/ {
compatible = "phicomm,psg1218b", "phicomm,psg1218", "ralink,mt7620a-soc";
model = "Phicomm PSG1218 rev.B";
};
&partitions {
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x7b0000>;
};
};

View File

@@ -0,0 +1,157 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "planex,cs-qr10", "ralink,mt7620a-soc";
model = "Planex CS-QR10";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
leds {
compatible = "gpio-leds";
led_power: power {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_RED>;
gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
s1 {
label = "reset";
gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
s2 {
label = "wps";
gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
};
&gpio1 {
status = "okay";
};
&i2c {
status = "okay";
};
&i2s {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pcm_i2s_pins>;
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x7b0000>;
};
};
};
};
&pcm {
status = "okay";
};
&gdma {
status = "okay";
};
&state_default {
gpio {
groups = "spi refclk", "rgmii1";
function = "gpio";
};
wdt {
groups = "wdt";
function = "wdt refclk";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "llllw";
};
&sdhci {
status = "okay";
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};

View File

@@ -0,0 +1,117 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "planex,db-wrt01", "ralink,mt7620a-soc";
model = "Planex DB-WRT01";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
leds {
compatible = "gpio-leds";
led_power: power {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_ORANGE>;
gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
s1 {
label = "wps";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
};
&gpio1 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x7b0000>;
};
};
};
};
&state_default {
gpio {
groups = "i2c", "spi refclk", "rgmii1";
function = "gpio";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "llllw";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};

View File

@@ -0,0 +1,154 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "planex,mzk-750dhp", "ralink,mt7620a-soc";
model = "Planex MZK-750DHP";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
leds {
compatible = "gpio-leds";
wps {
function = LED_FUNCTION_WPS;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
};
led_power: power {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
wlan5g {
label = "green:wlan5g";
gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
s1 {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
s2 {
label = "wps";
gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
};
&gpio1 {
status = "okay";
};
&gpio2 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x7b0000>;
};
};
};
};
&state_default {
gpio {
groups = "i2c", "spi refclk", "rgmii1", "nd_sd";
function = "gpio";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "llllw";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&pcie {
status = "okay";
};
&pcie0 {
mt76@0,0 {
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
};
};

View File

@@ -0,0 +1,157 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "planex,mzk-ex300np", "ralink,mt7620a-soc";
model = "Planex MZK-EX300NP";
aliases {
led-boot = &led_wps;
led-failsafe = &led_wps;
led-running = &led_wps;
led-upgrade = &led_wps;
};
leds {
compatible = "gpio-leds";
wifi {
label = "green:wifi";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
};
led_wps: wps {
function = LED_FUNCTION_WPS;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
};
rep {
label = "blue:rep";
gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
};
wifi1 {
label = "blue:wifi1";
gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
};
wifi2 {
label = "blue:wifi2";
gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
};
wifi3 {
label = "blue:wifi3";
gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
linux,code = <KEY_RFKILL>;
};
};
};
&gpio1 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x730000>;
};
partition@780000 {
label = "Udata";
reg = <0x780000 0x80000>;
};
};
};
};
&state_default {
gpio {
groups = "i2c", "spi refclk", "rgmii1", "wled";
function = "gpio";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "llllw";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};

View File

@@ -0,0 +1,179 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "planex,mzk-ex750np", "ralink,mt7620a-soc";
model = "Planex MZK-EX750NP";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
leds {
compatible = "gpio-leds";
led_power: power {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_RED>;
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
};
wifi {
label = "red:wifi";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
};
wps {
function = LED_FUNCTION_WPS;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
};
rep {
label = "blue:rep";
gpios = <&gpio2 16 GPIO_ACTIVE_LOW>;
};
wifi1 {
label = "blue:wifi1";
gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
};
wifi2 {
label = "blue:wifi2";
gpios = <&gpio2 18 GPIO_ACTIVE_LOW>;
};
wifi3 {
label = "blue:wifi3";
gpios = <&gpio2 17 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
linux,code = <KEY_RFKILL>;
};
};
};
&gpio2 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x730000>;
};
partition@780000 {
label = "Udata";
reg = <0x780000 0x80000>;
};
};
};
};
&state_default {
gpio {
groups = "uartf", "nd_sd", "rgmii2", "wled";
function = "gpio";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "llllw";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&pcie {
status = "okay";
};
&pcie0 {
mt76@0,0 {
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
};
};

View File

@@ -0,0 +1,126 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "ralink,mt7620a-evb", "ralink,mt7620a-soc";
model = "Ralink MT7620a + MT7610e evaluation board";
keys {
compatible = "gpio-keys";
s2 {
label = "S2";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
};
s3 {
label = "S3";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <BTN_1>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x7b0000>;
};
};
};
};
&state_default {
gpio {
groups = "i2c", "uartf";
function = "gpio";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
mediatek,portmap = "llllw";
port@4 {
status = "okay";
phy-mode = "rgmii";
phy-handle = <&phy4>;
};
port@5 {
status = "okay";
phy-mode = "rgmii";
phy-handle = <&phy5>;
};
mdio-bus {
status = "okay";
phy4: ethernet-phy@4 {
reg = <4>;
phy-mode = "rgmii";
};
phy5: ethernet-phy@5 {
reg = <5>;
phy-mode = "rgmii";
};
};
};
&gsw {
mediatek,port4-gmac;
mediatek,ephy-base = /bits/ 8 <8>;
};
&sdhci {
status = "okay";
};
&pcie {
status = "okay";
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};

View File

@@ -0,0 +1,116 @@
#include "mt7620a.dtsi"
/ {
compatible = "ralink,mt7620a-mt7530-evb", "ralink,mt7620a-soc";
model = "Ralink MT7620a + MT7530 evaluation board";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x7b0000>;
};
};
};
};
&state_default {
gpio {
groups = "i2c", "uartf";
function = "gpio";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
mediatek,portmap = "llllw";
port@5 {
status = "okay";
mediatek,fixed-link = <1000 1 1 1>;
phy-mode = "rgmii";
};
mdio-bus {
status = "okay";
phy0: ethernet-phy@0 {
reg = <0>;
phy-mode = "rgmii";
};
phy1: ethernet-phy@1 {
reg = <1>;
phy-mode = "rgmii";
};
phy2: ethernet-phy@2 {
reg = <2>;
phy-mode = "rgmii";
};
phy3: ethernet-phy@3 {
reg = <3>;
phy-mode = "rgmii";
};
phy4: ethernet-phy@4 {
reg = <4>;
phy-mode = "rgmii";
};
phy1f: ethernet-phy@1f {
reg = <0x1f>;
phy-mode = "rgmii";
};
};
};
&gsw {
mediatek,ephy-base = /bits/ 8 <12>;
};
&pcie {
status = "okay";
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};

View File

@@ -0,0 +1,99 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "ralink,mt7620a-mt7610e-evb", "ralink,mt7620a-soc";
model = "Ralink MT7620A evaluation board";
keys {
compatible = "gpio-keys";
wps {
label = "wps";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
};
reset {
label = "reset";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
linux,code = <BTN_1>;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <1000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x7b0000>;
};
};
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&ephy_pins>;
mediatek,portmap = "llllw";
};
&sdhci {
status = "okay";
};
&pcie {
status = "okay";
};
&pcie0 {
wifi@0,0 {
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_8000>;
nvmem-cell-names = "eeprom";
ieee80211-freq-limit = <5000000 6000000>;
};
};

View File

@@ -0,0 +1,116 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "ralink,mt7620a-v22sg-evb", "ralink,mt7620a-soc";
model = "Ralink MT7620a V22SG High Power evaluation board";
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
aoss {
label = "aoss";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
nand {
compatible = "mtk,mt7620-nand";
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x40000>;
read-only;
};
partition@40000 {
label = "u-boot-env";
reg = <0x40000 0x20000>;
read-only;
};
partition@60000 {
label = "factory";
reg = <0x60000 0x20000>;
read-only;
};
partition@80000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x80000 0x7f80000>;
};
};
};
};
&state_default {
gpio {
groups = "i2c", "uartf", "spi";
function = "gpio";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
mediatek,portmap = "llllw";
port@4 {
status = "okay";
phy-handle = <&phy4>;
phy-mode = "rgmii";
};
port@5 {
status = "okay";
phy-handle = <&phy5>;
phy-mode = "rgmii";
};
mdio-bus {
status = "okay";
phy4: ethernet-phy@4 {
reg = <4>;
phy-mode = "rgmii";
};
phy5: ethernet-phy@5 {
reg = <5>;
phy-mode = "rgmii";
};
};
};
&gsw {
mediatek,port4-gmac;
mediatek,ephy-base = /bits/ 8 <8>;
};
&pcie {
status = "okay";
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};

View File

@@ -0,0 +1,8 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a_sercomm_cpj.dtsi"
/ {
compatible = "rostelecom,rt-fl-1", "ralink,mt7620a-soc";
model = "Rostelecom RT-FL-1";
};

View File

@@ -0,0 +1,8 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a_sercomm_cpj.dtsi"
/ {
compatible = "rostelecom,s1010", "ralink,mt7620a-soc";
model = "Rostelecom S1010";
};

View File

@@ -0,0 +1,194 @@
// SPDX-License-Identifier: BSD-3-Clause
/*
* Copyright(c) 2017 Kristian Evensen <kristian.evensen@gmail.com>.
* All rights reserved.
*/
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "sanlinking,d240", "ralink,mt7620a-soc";
model = "Sanlinking Technologies D240";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
chosen {
bootargs = "console=ttyS0,115200";
};
gpio-export {
compatible = "gpio-export";
#size-cells = <0>;
power_mpcie2 {
gpio-export,name = "power_mpcie2";
gpio-export,output = <1>;
gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
};
power_mpcie1 {
gpio-export,name = "power_mpcie1";
gpio-export,output = <1>;
gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>;
};
};
leds {
compatible = "gpio-leds";
led_power: power {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
};
usb {
function = LED_FUNCTION_USB;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
trigger-sources = <&ohci_port1>, <&ehci_port1>;
linux,default-trigger = "usbport";
};
air {
label = "blue:wifi";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
};
&gpio1 {
status = "okay";
};
&gpio2 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <10000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0xfb0000>;
};
};
};
};
&sdhci {
status = "okay";
/* the pins function is already set during pinmux driver load */
/delete-property/ pinctrl-0;
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&ethernet {
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "llllw";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&state_default {
default {
groups = "i2c", "uartf", "wled", "spi refclk", "pa";
function = "gpio";
};
/*
* The sd function of the nd_sd group configures two of the
* groups pins as gpios. The pins are used as PCIe reset/power.
* Due to the driver load order, the pins are configured way to
* late if triggered by the sd-card driver.
* To not introduce another kind of driver load order
* dependency and configure the pins as early as possible,
* means during pinmux driver load.
*/
gpio_sd {
groups = "nd_sd";
function = "sd";
};
};
&pcie {
status = "okay";
};

View File

@@ -0,0 +1,307 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
aliases {
label-mac-device = &ethernet;
led-boot = &status_green;
led-failsafe = &status_amber;
led-running = &status_green;
led-upgrade = &status_amber;
};
keys {
compatible = "gpio-keys";
button-0 {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
button-1 {
label = "wps";
linux,code = <KEY_RESTART>;
gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
};
leds {
compatible = "gpio-leds";
status_green: led-0 {
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_STATUS;
};
status_amber: led-1 {
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
color = <LED_COLOR_ID_AMBER>;
function = LED_FUNCTION_STATUS;
};
led-2 {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_WAN;
gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
};
led-3 {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_LAN;
function-enumerator = <1>;
gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
};
led-4 {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_LAN;
function-enumerator = <2>;
gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
};
led-5 {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_LAN;
function-enumerator = <3>;
gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
};
led-6 {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_LAN;
function-enumerator = <4>;
gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
};
led-7 {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_WLAN;
function-enumerator = <24>;
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
};
virtual_flash {
compatible = "mtd-concat";
devices = <&fwconcat0 &fwconcat1>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
compatible = "openwrt,uimage";
/* sercomm krnl hdr with fw chksums */
openwrt,offset = <0x100>;
label = "firmware";
reg = <0x0 0x0>;
};
};
};
};
&ethernet {
nvmem-cells = <&macaddr_label 0>;
nvmem-cell-names = "mac-address";
};
&gpio1 {
status = "okay";
};
&gpio2 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&pcie {
status = "okay";
};
/* mt7612 */
&pcie0 {
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
ieee80211-freq-limit = <5000000 6000000>;
nvmem-cells = <&eeprom_factory_8000>, <&macaddr_label 6>;
nvmem-cell-names = "eeprom", "mac-address";
/* 5 GHz WLAN phy green led */
led {
led-sources = <2>;
led-active-low;
};
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
m25p,fast-read;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/* whole flash */
partition@0_all {
label = "ALL";
reg = <0x0 0x1000000>;
read-only;
};
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "ftd_and_bootflag";
reg = <0x30000 0x20000>;
};
partition@50000 {
label = "Factory";
reg = <0x50000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_factory_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
};
};
partition@60000 {
label = "SC Nvram(permanent data)";
reg = <0x60000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
macaddr_label: macaddr@0 {
compatible = "mac-base";
reg = <0x0 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
fwconcat0: partition@70000 {
label = "Firmware";
reg = <0x70000 0x790000>;
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "Kernel";
reg = <0x0 0x200000>;
};
partition@200000 {
label = "RootFS";
reg = <0x200000 0x590000>;
};
};
fwconcat1: partition@800000 {
label = "Firmware2";
reg = <0x800000 0x790000>;
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "Kernel2";
reg = <0x0 0x200000>;
};
partition@200000 {
label = "RootFS2";
reg = <0x200000 0x590000>;
};
};
partition@f90000 {
label = "MAC IP";
reg = <0xf90000 0x10000>;
read-only;
};
partition@fa0000 {
label = "Critical Log";
reg = <0xfa0000 0x10000>;
read-only;
};
partition@fb000 {
label = "Critical Log Bak";
reg = <0xfb0000 0x10000>;
read-only;
};
partition@fc0000 {
label = "Xml Config";
reg = <0xfc0000 0x20000>;
read-only;
};
partition@fe0000 {
label = "Xml Config Bak";
reg = <0xfe0000 0x20000>;
read-only;
};
};
};
};
&state_default {
gpio {
groups = "ephy", "rgmii1", "uartf", "wled";
function = "gpio";
};
};
/* mt7620 */
&wmac {
nvmem-cells = <&eeprom_factory_0>, <&macaddr_label 2>;
nvmem-cell-names = "eeprom", "mac-address";
};

View File

@@ -0,0 +1,182 @@
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "sercomm,na930", "ralink,mt7620a-soc";
model = "Sercomm NA930";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
chosen {
bootargs = "console=ttyS1,57600";
};
nand {
compatible = "mtk,mt7620-nand";
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x20000>;
read-only;
};
partition@200000 {
label = "factory";
reg = <0x200000 0x40000>;
read-only;
};
partition@240000 {
label = "Config";
reg = <0x240000 0x400000>;
read-only;
};
partition@640000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x640000 0x1400000>;
};
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
zwave {
label = "zwave";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
linux,code = <BTN_0>;
};
wps {
label = "wps";
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
leds {
compatible = "gpio-leds";
zwave {
label = "blue:zwave";
gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
};
status {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio2 26 GPIO_ACTIVE_LOW>;
trigger-sources = <&ohci_port1>, <&ehci_port1>;
linux,default-trigger = "usbport";
};
service {
label = "blue:service";
gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
};
led_power: power {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio2 29 GPIO_ACTIVE_LOW>;
};
};
gpio_export {
compatible = "gpio-export";
#size-cells = <0>;
telit {
gpio-export,name = "telit";
gpio-export,output = <1>;
gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
};
};
};
&state_default {
gpio {
groups = "i2c", "rgmii2", "spi", "ephy";
function = "gpio";
};
uartf_gpio {
groups = "uartf";
function = "gpio uartf";
};
};
&uart {
status = "okay";
};
&gpio2 {
status = "okay";
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &mdio_pins>;
mediatek,portmap = "llllw";
port@4 {
status = "okay";
phy-handle = <&phy4>;
phy-mode = "rgmii";
};
port@5 {
status = "okay";
phy-handle = <&phy5>;
phy-mode = "rgmii";
};
mdio-bus {
status = "okay";
phy4: ethernet-phy@4 {
reg = <4>;
phy-mode = "rgmii";
};
phy5: ethernet-phy@5 {
reg = <5>;
phy-mode = "rgmii";
};
};
};
&gsw {
mediatek,port4-gmac;
mediatek,ephy-base = /bits/ 8 <8>;
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};

View File

@@ -0,0 +1,202 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "mt7620a.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
compatible = "sitecom,wlr-4100-v1-002", "ralink,mt7620a-soc";
model = "Sitecom WLR-4100 v1 002";
chosen {
bootargs = "console=ttyS0,115200";
};
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
leds {
compatible = "gpio-leds";
led_power: power {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wifi {
label = "blue:wifi";
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
wps {
function = LED_FUNCTION_WPS;
color = <LED_COLOR_ID_WHITE>;
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
wps {
label = "wps";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
reset {
label = "reset";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
gpio_export {
compatible = "gpio-export";
#size-cells = <0>;
usb-power {
gpio-export,name = "usb-power";
gpio-export,output = <1>;
gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
};
};
};
&gpio1 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <20000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "uboot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_factory_0: eeprom@0 {
reg = <0x0 0x200>;
};
macaddr_factory_4: macaddr@4 {
reg = <0x4 0x6>;
};
};
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x50000 0x790000>;
};
partition@7e0000 {
label = "backup";
reg = <0x7e0000 0x10000>;
read-only;
};
partition@7f0000 {
label = "storage";
reg = <0x7f0000 0x10000>;
read-only;
};
};
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &mdio_pins>;
nvmem-cells = <&macaddr_factory_4>;
nvmem-cell-names = "mac-address";
port@5 {
status = "okay";
phy-mode = "rgmii";
mediatek,fixed-link = <1000 1 1 1>;
};
mdio-bus {
status = "okay";
ethernet-phy@0 {
reg = <0>;
phy-mode = "rgmii";
qca,ar8327-initvals = <
0x04 0x06200000 /* PORT0 PAD MODE CTRL */
0x08 0x01000000 /* PORT5 PAD MODE CTRL RX delay EN all ports 0, 5, 6 */
0x7c 0x0000007e /* PORT0_STATUS */
0x94 0x00000000 /* PORT6_STATUS */
>;
};
};
};
&gsw {
mediatek,ephy-base = /bits/ 8 <8>;
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&wmac {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
};
&state_default {
gpio {
groups = "uartf", "i2c", "wled", "spi refclk";
function = "gpio";
};
};

View File

@@ -0,0 +1,144 @@
#include "mt7620a.dtsi"
#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>
/ {
chosen {
bootargs = "console=ttyS0,115200";
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
rfkill {
label = "rfkill";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RFKILL>;
};
};
};
&gpio1 {
status = "okay";
};
&gpio2 {
status = "okay";
};
&gpio3 {
status = "okay";
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <30000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x20000>;
read-only;
};
partition@20000 {
compatible = "tplink,firmware";
label = "firmware";
reg = <0x20000 0x7a0000>;
};
partition@7c0000 {
label = "config";
reg = <0x7c0000 0x10000>;
read-only;
};
partition@7d0000 {
label = "rom";
reg = <0x7d0000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
macaddr_rom_f100: macaddr@f100 {
compatible = "mac-base";
reg = <0xf100 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
partition@7e0000 {
label = "romfile";
reg = <0x7e0000 0x10000>;
read-only;
};
partition@7f0000 {
label = "radio";
reg = <0x7f0000 0x10000>;
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
eeprom_radio_0: eeprom@0 {
reg = <0x0 0x200>;
};
eeprom_radio_8000: eeprom@8000 {
reg = <0x8000 0x200>;
};
};
};
};
};
};
&ethernet {
pinctrl-names = "default";
nvmem-cells = <&macaddr_rom_f100 0>;
nvmem-cell-names = "mac-address";
mediatek,portmap = "wllll";
};
&ehci {
status = "okay";
};
&ohci {
status = "okay";
};
&pcie {
status = "okay";
};
&pcie0 {
wifi: mt76@0,0 {
reg = <0x0000 0 0 0 0>;
ieee80211-freq-limit = <5000000 6000000>;
};
};

View File

@@ -0,0 +1,94 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include <dt-bindings/leds/common.h>
#include "mt7620a_tplink_8m.dtsi"
/ {
compatible = "tplink,archer-c2-v1", "ralink,mt7620a-soc";
model = "TP-Link Archer C2 v1";
aliases {
led-boot = &led_wps;
led-failsafe = &led_wps;
led-running = &led_wps;
led-upgrade = &led_wps;
};
leds {
compatible = "gpio-leds";
led-0 {
function = LED_FUNCTION_LAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
};
led-1 {
function = LED_FUNCTION_USB;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
trigger-sources = <&ohci_port1>, <&ehci_port1>;
linux,default-trigger = "usbport";
};
led_wps: led-2 {
function = LED_FUNCTION_WPS;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
led-3 {
function = LED_FUNCTION_WAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
};
led-4 {
function = LED_FUNCTION_WLAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
};
rtl8367rb {
compatible = "realtek,rtl8367b";
realtek,extif = <6 1 0 1 1 1 1 1 1 2>;
mii-bus = <&mdio0>;
};
};
&state_default {
gpio {
groups = "i2c", "uartf", "wled", "ephy", "spi refclk";
function = "gpio";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
port@5 {
status = "okay";
mediatek,fixed-link = <1000 1 1 1>;
phy-mode = "rgmii";
};
mdio0: mdio-bus {
status = "okay";
};
};
&wmac {
nvmem-cells = <&eeprom_radio_0>, <&macaddr_rom_f100 0>;
nvmem-cell-names = "eeprom", "mac-address";
};
&wifi {
nvmem-cells = <&eeprom_radio_8000>, <&macaddr_rom_f100 (-1)>;
nvmem-cell-names = "eeprom", "mac-address";
};

View File

@@ -0,0 +1,93 @@
#include <dt-bindings/leds/common.h>
#include "mt7620a_tplink_8m.dtsi"
/ {
compatible = "tplink,archer-c20-v1", "ralink,mt7620a-soc";
model = "TP-Link Archer C20 v1";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
leds {
compatible = "gpio-leds";
led-0 {
function = LED_FUNCTION_LAN;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
};
led_power: led-1 {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
default-state = "keep";
};
led-2 {
function = LED_FUNCTION_USB;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
trigger-sources = <&ohci_port1>, <&ehci_port1>;
linux,default-trigger = "usbport";
};
led-3 {
function = LED_FUNCTION_WAN;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
};
led-4 {
function = LED_FUNCTION_WAN;
color = <LED_COLOR_ID_ORANGE>;
gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
};
led-5 {
function = LED_FUNCTION_WLAN_5GHZ;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
led-6 {
function = LED_FUNCTION_WLAN_2GHZ;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
led-7 {
function = LED_FUNCTION_WPS;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
};
};
&state_default {
gpio {
groups = "i2c", "uartf", "wled", "ephy", "spi refclk", "wdt";
function = "gpio";
};
};
&wmac {
pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
pinctrl-1 = <&pa_gpio_pins>;
nvmem-cells = <&eeprom_radio_0>, <&macaddr_rom_f100 (-2)>;
nvmem-cell-names = "eeprom", "mac-address";
};
&wifi {
nvmem-cells = <&eeprom_radio_8000>, <&macaddr_rom_f100 (-1)>;
nvmem-cell-names = "eeprom", "mac-address";
};

View File

@@ -0,0 +1,70 @@
#include <dt-bindings/leds/common.h>
#include "mt7620a_tplink_8m.dtsi"
/ {
compatible = "tplink,archer-c20i", "ralink,mt7620a-soc";
model = "TP-Link Archer C20i";
aliases {
led-boot = &led_wps;
led-failsafe = &led_wps;
led-running = &led_wps;
led-upgrade = &led_wps;
label-mac-device = &ethernet;
};
leds {
compatible = "gpio-leds";
led-0 {
function = LED_FUNCTION_LAN;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
};
led-1 {
function = LED_FUNCTION_USB;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
trigger-sources = <&ohci_port1>, <&ehci_port1>;
linux,default-trigger = "usbport";
};
led_wps: led-2 {
function = LED_FUNCTION_WPS;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
led-3 {
function = LED_FUNCTION_WAN;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
};
led-4 {
function = LED_FUNCTION_WLAN;
color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
};
};
&state_default {
gpio {
groups = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd", "ephy", "spi refclk";
function = "gpio";
};
};
&wmac {
nvmem-cells = <&eeprom_radio_0>, <&macaddr_rom_f100 0>;
nvmem-cell-names = "eeprom", "mac-address";
};
&wifi {
nvmem-cells = <&eeprom_radio_8000>, <&macaddr_rom_f100 (-1)>;
nvmem-cell-names = "eeprom", "mac-address";
};

View File

@@ -0,0 +1,126 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include <dt-bindings/leds/common.h>
#include "mt7620a_tplink_8m.dtsi"
/ {
compatible = "tplink,archer-c5-v4", "ralink,mt7620a-soc";
model = "TP-Link Archer C5 v4";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
label-mac-device = &ethernet;
};
leds {
compatible = "gpio-leds";
led_power: led-0 {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
};
led-1 {
function = LED_FUNCTION_WLAN_2GHZ;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
led-2 {
function = LED_FUNCTION_WLAN_5GHZ;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
led-3 {
function = LED_FUNCTION_WAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
};
led-4 {
function = LED_FUNCTION_WAN;
color = <LED_COLOR_ID_ORANGE>;
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
};
led-5 {
function = LED_FUNCTION_LAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
};
led-6 {
function = LED_FUNCTION_USB;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
trigger-sources = <&ohci_port1>, <&ehci_port1>;
linux,default-trigger = "usbport";
};
led-7 {
function = LED_FUNCTION_WPS;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
};
};
rtl8367s {
compatible = "realtek,rtl8367b";
realtek,extif = <7 1 0 1 1 1 1 1 1 2>;
mii-bus = <&mdio0>;
phy-id = <29>;
};
};
&spi0 {
flash@0 {
#address-cells = <1>;
#size-cells = <1>;
};
};
&state_default {
gpio {
groups = "i2c", "uartf", "ephy", "rgmii2";
function = "gpio";
};
};
&ethernet {
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &mdio_pins>;
port@5 {
status = "okay";
mediatek,fixed-link = <1000 1 1 1>;
phy-mode = "rgmii";
};
mdio0: mdio-bus {
status = "okay";
reset-gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
reset-delay-us = <10000>;
};
};
&wmac {
pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
pinctrl-1 = <&pa_gpio_pins>;
nvmem-cells = <&eeprom_radio_0>, <&macaddr_rom_f100 0>;
nvmem-cell-names = "eeprom", "mac-address";
};
&wifi {
nvmem-cells = <&eeprom_radio_8000>, <&macaddr_rom_f100 2>;
nvmem-cell-names = "eeprom", "mac-address";
};

View File

@@ -0,0 +1,93 @@
#include <dt-bindings/leds/common.h>
#include "mt7620a_tplink_8m.dtsi"
/ {
compatible = "tplink,archer-c50-v1", "ralink,mt7620a-soc";
model = "TP-Link Archer C50 v1";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
leds {
compatible = "gpio-leds";
led-0 {
function = LED_FUNCTION_LAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
};
led_power: led-1 {
function = LED_FUNCTION_POWER;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led-2 {
function = LED_FUNCTION_USB;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
trigger-sources = <&ohci_port1>, <&ehci_port1>;
linux,default-trigger = "usbport";
};
led-3 {
function = LED_FUNCTION_WAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
};
led-4 {
function = LED_FUNCTION_WAN;
color = <LED_COLOR_ID_ORANGE>;
gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
};
led-5 {
function = LED_FUNCTION_WLAN_5GHZ;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
led-6 {
function = LED_FUNCTION_WLAN_2GHZ;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
led-7 {
function = LED_FUNCTION_WPS;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
};
};
&state_default {
gpio {
groups = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "ephy", "spi refclk", "mdio", "wdt", "nd_sd";
function = "gpio";
};
};
&wmac {
pinctrl-names = "default", "pa_gpio";
pinctrl-0 = <&pa_pins>;
pinctrl-1 = <&pa_gpio_pins>;
nvmem-cells = <&eeprom_radio_0>, <&macaddr_rom_f100 (-2)>;
nvmem-cell-names = "eeprom", "mac-address";
};
&wifi {
nvmem-cells = <&eeprom_radio_8000>, <&macaddr_rom_f100 (-1)>;
nvmem-cell-names = "eeprom", "mac-address";
};

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