ramips: mt7628: use mac-base
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7628an_motorola_mwr03.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 model = "Motorola MWR03";
10 compatible = "motorola,mwr03", "mediatek,mt7628an-soc";
11
12 aliases {
13 led-boot = &led_status_orange;
14 led-failsafe = &led_status_orange;
15 led-running = &led_status_white;
16 led-upgrade = &led_status_orange;
17 };
18
19 keys {
20 compatible = "gpio-keys";
21
22 reset {
23 label = "reset";
24 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
25 linux,code = <KEY_RESTART>;
26 };
27 };
28
29 leds {
30 compatible = "gpio-leds";
31
32 led_status_orange: status_orange {
33 label = "orange:status";
34 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
35 };
36
37 led_status_white: status_white {
38 label = "white:status";
39 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
40 };
41 };
42 };
43
44 &spi0 {
45 status = "okay";
46
47 flash@0 {
48 compatible = "jedec,spi-nor";
49 reg = <0>;
50 spi-max-frequency = <80000000>;
51 m25p,fast-read;
52
53 partitions {
54 compatible = "fixed-partitions";
55 #address-cells = <1>;
56 #size-cells = <1>;
57
58 partition@0 {
59 label = "bootloader";
60 reg = <0x0 0x30000>;
61 read-only;
62 };
63
64 partition@30000 {
65 label = "config";
66 reg = <0x30000 0x10000>;
67 read-only;
68 };
69
70 factory: partition@40000 {
71 label = "factory";
72 reg = <0x40000 0x10000>;
73 read-only;
74
75 nvmem-layout {
76 compatible = "fixed-layout";
77 #address-cells = <1>;
78 #size-cells = <1>;
79
80 eeprom_factory_0: eeprom@0 {
81 reg = <0x0 0x400>;
82 };
83
84 eeprom_factory_8000: eeprom@8000 {
85 reg = <0x8000 0x200>;
86 };
87
88 macaddr_factory_4: macaddr@4 {
89 compatible = "mac-base";
90 reg = <0x4 0x6>;
91 #nvmem-cell-cells = <1>;
92 };
93 };
94 };
95
96 partition@50000 {
97 compatible = "denx,uimage";
98 label = "firmware";
99 reg = <0x50000 0x7b0000>;
100 };
101 };
102 };
103 };
104
105 &state_default {
106 gpio {
107 groups = "i2c", "i2s";
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 &ethernet {
125 nvmem-cells = <&macaddr_factory_4 (-1)>;
126 nvmem-cell-names = "mac-address";
127 };
128
129 &esw {
130 mediatek,portmap = <0x3e>;
131 mediatek,portdisable = <0x30>;
132 };
133
134 &pcie {
135 status = "okay";
136 };
137
138 &pcie0 {
139 wifi@0,0 {
140 reg = <0x0000 0 0 0 0>;
141 nvmem-cells = <&eeprom_factory_8000>;
142 nvmem-cell-names = "eeprom";
143 ieee80211-freq-limit = <5000000 6000000>;
144 };
145 };
146
147 &wmac {
148 status = "okay";
149
150 nvmem-cells = <&eeprom_factory_0>;
151 nvmem-cell-names = "eeprom";
152 };