aa642da11fdd50736dd47b8eb12552abe7784f5b
[openwrt/staging/nbd.git] / target / linux / ramips / dts / mt7628an_asus_rt-n1x.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 aliases {
10 led-boot = &led_power;
11 led-failsafe = &led_power;
12 led-running = &led_power;
13 led-upgrade = &led_power;
14 };
15
16 keys {
17 compatible = "gpio-keys";
18
19 reset {
20 label = "reset";
21 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
22 linux,code = <KEY_RESTART>;
23 };
24 };
25
26 leds {
27 compatible = "gpio-leds";
28
29 led_power: power {
30 label = "green:power";
31 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
32 };
33
34 wlan {
35 label = "green:wlan";
36 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
37 linux,default-trigger = "phy0tpt";
38 };
39
40 wan {
41 label = "green:wan";
42 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
43 };
44
45 lan {
46 label = "green:lan";
47 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
48 };
49 };
50 };
51
52 &spi0 {
53 status = "okay";
54
55 flash@0 {
56 compatible = "jedec,spi-nor";
57 reg = <0>;
58 spi-max-frequency = <40000000>;
59
60 partitions {
61 compatible = "fixed-partitions";
62 #address-cells = <1>;
63 #size-cells = <1>;
64
65 partition@0 {
66 label = "u-boot";
67 reg = <0x0 0x30000>;
68 read-only;
69 };
70
71 partition@30000 {
72 label = "u-boot-env";
73 reg = <0x30000 0x10000>;
74 read-only;
75 };
76
77 factory: partition@40000 {
78 label = "factory";
79 reg = <0x40000 0x10000>;
80 read-only;
81
82 nvmem-layout {
83 compatible = "fixed-layout";
84 #address-cells = <1>;
85 #size-cells = <1>;
86
87 eeprom_factory_0: eeprom@0 {
88 reg = <0x0 0x400>;
89 };
90
91 macaddr_factory_4: macaddr@4 {
92 reg = <0x4 0x6>;
93 };
94 };
95 };
96
97 partition@50000 {
98 compatible = "denx,uimage";
99 label = "firmware";
100 reg = <0x50000 0x7b0000>;
101 };
102 };
103 };
104 };
105
106 &ethernet {
107 nvmem-cells = <&macaddr_factory_4>;
108 nvmem-cell-names = "mac-address";
109 };
110
111 &esw {
112 mediatek,portmap = <0x2f>;
113 };
114
115 &wmac {
116 status = "okay";
117
118 nvmem-cells = <&eeprom_factory_0>;
119 nvmem-cell-names = "eeprom";
120 };
121
122 &state_default {
123 gpio {
124 groups = "i2c", "p0led_an", "p1led_an", "refclk", "wled_an";
125 function = "gpio";
126 };
127 };
128
129 &usbphy {
130 status = "disabled";
131 };
132
133 &ehci {
134 status = "disabled";
135 };
136
137 &ohci {
138 status = "disabled";
139 };