ramips: convert MT7628 EEPROM to NVMEM format
[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
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 compatible = "nvmem-cells";
79 label = "factory";
80 reg = <0x40000 0x10000>;
81 #address-cells = <1>;
82 #size-cells = <1>;
83 read-only;
84
85 eeprom_factory_0: eeprom@0 {
86 reg = <0x0 0x400>;
87 };
88
89 macaddr_factory_4: macaddr@4 {
90 reg = <0x4 0x6>;
91 };
92 };
93
94 partition@50000 {
95 compatible = "denx,uimage";
96 label = "firmware";
97 reg = <0x50000 0x7b0000>;
98 };
99 };
100 };
101 };
102
103 &ethernet {
104 nvmem-cells = <&macaddr_factory_4>;
105 nvmem-cell-names = "mac-address";
106 };
107
108 &esw {
109 mediatek,portmap = <0x2f>;
110 };
111
112 &wmac {
113 status = "okay";
114
115 nvmem-cells = <&eeprom_factory_0>;
116 nvmem-cell-names = "eeprom";
117 };
118
119 &state_default {
120 gpio {
121 groups = "i2c", "p0led_an", "p1led_an", "refclk", "wled_an";
122 function = "gpio";
123 };
124 };
125
126 &usbphy {
127 status = "disabled";
128 };
129
130 &ehci {
131 status = "disabled";
132 };
133
134 &ohci {
135 status = "disabled";
136 };