2016-11-18 11:46:27 +00:00
|
|
|
#include "mt7621.dtsi"
|
|
|
|
|
|
|
|
#include <dt-bindings/gpio/gpio.h>
|
|
|
|
#include <dt-bindings/input/input.h>
|
2024-02-07 13:48:43 +00:00
|
|
|
#include <dt-bindings/leds/common.h>
|
2016-11-18 11:46:27 +00:00
|
|
|
|
|
|
|
/ {
|
2020-03-18 15:38:58 +00:00
|
|
|
aliases {
|
|
|
|
label-mac-device = &wan;
|
|
|
|
};
|
|
|
|
|
2021-08-01 15:02:49 +00:00
|
|
|
leds {
|
|
|
|
compatible = "gpio-leds";
|
|
|
|
|
|
|
|
usb {
|
2024-02-07 13:48:43 +00:00
|
|
|
function = LED_FUNCTION_USB;
|
|
|
|
color = <LED_COLOR_ID_GREEN>;
|
2021-08-01 15:02:49 +00:00
|
|
|
gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
|
|
|
|
trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
|
|
|
|
linux,default-trigger = "usbport";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-12-30 11:17:25 +00:00
|
|
|
keys {
|
2019-09-20 12:03:02 +00:00
|
|
|
compatible = "gpio-keys";
|
2016-11-18 11:46:27 +00:00
|
|
|
|
|
|
|
reset {
|
|
|
|
label = "reset";
|
2020-03-03 21:22:24 +00:00
|
|
|
gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
|
2016-11-18 11:46:27 +00:00
|
|
|
linux,code = <KEY_RESTART>;
|
|
|
|
};
|
|
|
|
|
|
|
|
wps {
|
|
|
|
label = "wps";
|
2020-03-03 21:22:24 +00:00
|
|
|
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
|
2016-11-18 11:46:27 +00:00
|
|
|
linux,code = <KEY_WPS_BUTTON>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&spi0 {
|
|
|
|
status = "okay";
|
|
|
|
|
2019-10-07 12:36:05 +00:00
|
|
|
flash@0 {
|
2016-11-18 11:46:27 +00:00
|
|
|
compatible = "jedec,spi-nor";
|
|
|
|
reg = <0>;
|
2019-10-07 12:36:05 +00:00
|
|
|
spi-max-frequency = <80000000>;
|
|
|
|
m25p,fast-read;
|
2016-11-18 11:46:27 +00:00
|
|
|
|
2018-08-01 20:32:34 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2024-02-17 14:10:10 +00:00
|
|
|
partition@40000 {
|
2018-08-01 20:32:34 +00:00
|
|
|
label = "factory";
|
|
|
|
reg = <0x40000 0x10000>;
|
|
|
|
read-only;
|
2023-10-02 02:12:02 +00:00
|
|
|
|
2023-11-07 23:55:58 +00:00
|
|
|
nvmem-layout {
|
|
|
|
compatible = "fixed-layout";
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <1>;
|
2023-10-02 02:12:02 +00:00
|
|
|
|
2023-11-07 23:55:58 +00:00
|
|
|
eeprom_factory_0: eeprom@0 {
|
|
|
|
reg = <0x0 0x400>;
|
|
|
|
};
|
2023-10-02 02:12:02 +00:00
|
|
|
|
2023-11-07 23:55:58 +00:00
|
|
|
eeprom_factory_8000: eeprom@8000 {
|
|
|
|
reg = <0x8000 0x200>;
|
|
|
|
};
|
|
|
|
|
|
|
|
macaddr_factory_2e: macaddr@2e {
|
|
|
|
reg = <0x2e 0x6>;
|
|
|
|
};
|
2023-10-02 02:12:02 +00:00
|
|
|
|
2023-11-07 23:55:58 +00:00
|
|
|
macaddr_factory_e000: macaddr@e000 {
|
|
|
|
reg = <0xe000 0x6>;
|
|
|
|
};
|
2023-10-02 02:12:02 +00:00
|
|
|
};
|
2018-08-01 20:32:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
partition@50000 {
|
2018-11-28 03:28:35 +00:00
|
|
|
compatible = "denx,uimage";
|
2018-08-01 20:32:34 +00:00
|
|
|
label = "firmware";
|
|
|
|
reg = <0x50000 0xfb0000>;
|
|
|
|
};
|
2016-11-18 11:46:27 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&pcie {
|
|
|
|
status = "okay";
|
2018-07-21 14:19:46 +00:00
|
|
|
};
|
2016-11-18 11:46:27 +00:00
|
|
|
|
2018-07-21 14:19:46 +00:00
|
|
|
&pcie0 {
|
|
|
|
wifi@0,0 {
|
2019-10-07 12:36:05 +00:00
|
|
|
compatible = "mediatek,mt76";
|
2018-07-21 14:19:46 +00:00
|
|
|
reg = <0x0000 0 0 0 0>;
|
2023-10-02 02:12:02 +00:00
|
|
|
nvmem-cells = <&eeprom_factory_0>;
|
|
|
|
nvmem-cell-names = "eeprom";
|
2019-10-07 12:36:05 +00:00
|
|
|
|
|
|
|
led {
|
|
|
|
led-sources = <0>;
|
|
|
|
led-active-low;
|
|
|
|
};
|
2016-11-18 11:46:27 +00:00
|
|
|
};
|
2018-07-21 14:19:46 +00:00
|
|
|
};
|
2016-11-18 11:46:27 +00:00
|
|
|
|
2018-07-21 14:19:46 +00:00
|
|
|
&pcie1 {
|
|
|
|
wifi@0,0 {
|
2019-10-07 12:36:05 +00:00
|
|
|
compatible = "mediatek,mt76";
|
2018-07-21 14:19:46 +00:00
|
|
|
reg = <0x0000 0 0 0 0>;
|
2023-10-02 02:12:02 +00:00
|
|
|
nvmem-cells = <&eeprom_factory_8000>;
|
|
|
|
nvmem-cell-names = "eeprom";
|
2018-07-21 14:19:46 +00:00
|
|
|
ieee80211-freq-limit = <5000000 6000000>;
|
2019-10-07 12:36:05 +00:00
|
|
|
|
|
|
|
led {
|
|
|
|
led-sources = <2>;
|
|
|
|
led-active-low;
|
|
|
|
};
|
2016-11-18 11:46:27 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-02-14 07:00:40 +00:00
|
|
|
ðernet {
|
|
|
|
pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
|
|
|
|
};
|
|
|
|
|
2020-03-18 15:38:58 +00:00
|
|
|
&gmac0 {
|
2021-04-02 21:50:02 +00:00
|
|
|
nvmem-cells = <&macaddr_factory_e000>;
|
|
|
|
nvmem-cell-names = "mac-address";
|
2016-11-18 11:46:27 +00:00
|
|
|
};
|
|
|
|
|
2020-03-18 15:38:58 +00:00
|
|
|
&switch0 {
|
|
|
|
ports {
|
|
|
|
port@0 {
|
|
|
|
status = "okay";
|
|
|
|
label = "lan4";
|
|
|
|
};
|
|
|
|
|
|
|
|
port@1 {
|
|
|
|
status = "okay";
|
|
|
|
label = "lan3";
|
|
|
|
};
|
|
|
|
|
|
|
|
port@2 {
|
|
|
|
status = "okay";
|
|
|
|
label = "lan2";
|
|
|
|
};
|
|
|
|
|
|
|
|
port@3 {
|
|
|
|
status = "okay";
|
|
|
|
label = "lan1";
|
|
|
|
};
|
|
|
|
wan: port@4 {
|
|
|
|
status = "okay";
|
|
|
|
label = "wan";
|
2021-04-02 21:50:02 +00:00
|
|
|
nvmem-cells = <&macaddr_factory_2e>;
|
|
|
|
nvmem-cell-names = "mac-address";
|
2020-03-18 15:38:58 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-12-12 18:49:55 +00:00
|
|
|
&state_default {
|
|
|
|
gpio {
|
2020-03-13 13:27:03 +00:00
|
|
|
groups = "wdt", "rgmii2";
|
|
|
|
function = "gpio";
|
2016-11-18 11:46:27 +00:00
|
|
|
};
|
|
|
|
};
|