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