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