ramips: rtxxxx: convert to nvmem-layout
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / rt5350_zorlik_zl5900v2.dts
1 #include "rt5350.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "zorlik,zl5900v2", "ralink,rt5350-soc";
8 model = "Zorlik ZL5900V2";
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 leds {
18 compatible = "gpio-leds";
19
20 lan {
21 label = "green:lan";
22 gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
23 };
24
25 led_power: power {
26 label = "blue:power";
27 gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
28 };
29 };
30
31 keys {
32 compatible = "gpio-keys-polled";
33 poll-interval = <20>;
34
35 reset {
36 label = "reset";
37 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
38 linux,code = <KEY_RESTART>;
39 };
40 };
41 };
42
43 &spi0 {
44 status = "okay";
45
46 flash@0 {
47 compatible = "jedec,spi-nor";
48 reg = <0>;
49 spi-max-frequency = <10000000>;
50
51 partitions {
52 compatible = "fixed-partitions";
53 #address-cells = <1>;
54 #size-cells = <1>;
55
56 partition@0 {
57 label = "u-boot";
58 reg = <0x0 0x30000>;
59 read-only;
60 };
61
62 partition@30000 {
63 label = "u-boot-env";
64 reg = <0x30000 0x10000>;
65 read-only;
66 };
67
68 factory: partition@40000 {
69 label = "factory";
70 reg = <0x40000 0x10000>;
71 read-only;
72
73 nvmem-layout {
74 compatible = "fixed-layout";
75 #address-cells = <1>;
76 #size-cells = <1>;
77
78 eeprom_factory_0: eeprom@0 {
79 reg = <0x0 0x200>;
80 };
81
82 macaddr_factory_4: macaddr@4 {
83 reg = <0x4 0x6>;
84 };
85 };
86 };
87
88 partition@50000 {
89 compatible = "denx,uimage";
90 label = "firmware";
91 reg = <0x50000 0x7b0000>;
92 };
93 };
94 };
95 };
96
97 &state_default {
98 gpio {
99 groups = "jtag", "uartf";
100 function = "gpio";
101 };
102 };
103
104 &ethernet {
105 nvmem-cells = <&macaddr_factory_4>;
106 nvmem-cell-names = "mac-address";
107 };
108
109 &esw {
110 mediatek,portdisable = <0x2f>;
111 };
112
113 &wmac {
114 nvmem-cells = <&eeprom_factory_0>;
115 nvmem-cell-names = "eeprom";
116 };