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