ramips: mt7620n: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7620n_wrtnode_wrtnode.dts
1 #include "mt7620n.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4
5 / {
6 compatible = "wrtnode,wrtnode", "ralink,mt7620n-soc";
7 model = "WRTNODE";
8
9 aliases {
10 led-boot = &led_indicator;
11 led-failsafe = &led_indicator;
12 led-running = &led_indicator;
13 led-upgrade = &led_indicator;
14 };
15
16 leds {
17 compatible = "gpio-leds";
18
19 led_indicator: indicator {
20 label = "blue:indicator";
21 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
22 };
23 };
24 };
25
26 &gpio1 {
27 status = "okay";
28 };
29
30 &spi0 {
31 status = "okay";
32
33 flash@0 {
34 compatible = "jedec,spi-nor";
35 reg = <0>;
36 spi-max-frequency = <10000000>;
37
38 partitions {
39 compatible = "fixed-partitions";
40 #address-cells = <1>;
41 #size-cells = <1>;
42
43 partition@0 {
44 label = "u-boot";
45 reg = <0x0 0x30000>;
46 read-only;
47 };
48
49 partition@30000 {
50 label = "u-boot-env";
51 reg = <0x30000 0x10000>;
52 read-only;
53 };
54
55 factory: partition@40000 {
56 label = "factory";
57 reg = <0x40000 0x10000>;
58 read-only;
59
60 nvmem-layout {
61 compatible = "fixed-layout";
62 #address-cells = <1>;
63 #size-cells = <1>;
64
65 eeprom_factory_0: eeprom@0 {
66 reg = <0x0 0x200>;
67 };
68
69 macaddr_factory_4: macaddr@4 {
70 reg = <0x4 0x6>;
71 };
72 };
73 };
74
75 partition@50000 {
76 compatible = "denx,uimage";
77 label = "firmware";
78 reg = <0x50000 0xfb0000>;
79 };
80 };
81 };
82 };
83
84 &ehci {
85 status = "okay";
86 };
87
88 &ohci {
89 status = "okay";
90 };
91
92 &ethernet {
93 nvmem-cells = <&macaddr_factory_4>;
94 nvmem-cell-names = "mac-address";
95
96 mediatek,portmap = "wllll";
97 };
98
99 &wmac {
100 nvmem-cells = <&eeprom_factory_0>;
101 nvmem-cell-names = "eeprom";
102 };
103
104 &state_default {
105 default {
106 groups = "ephy", "wled", "pa", "i2c", "wdt", "uartf", "spi refclk";
107 function = "gpio";
108 };
109 };