ramips: rtxxxx: convert to nvmem-layout
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3052_argus_atp-52b.dts
1 #include "rt3050.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "argus,atp-52b", "ralink,rt3052-soc";
8 model = "Argus ATP-52B";
9
10 aliases {
11 led-boot = &led_run;
12 led-failsafe = &led_run;
13 led-running = &led_run;
14 led-upgrade = &led_run;
15 };
16
17 flash@1f000000 {
18 compatible = "cfi-flash";
19 reg = <0x1f000000 0x800000>;
20 bank-width = <2>;
21 device-width = <2>;
22
23 partitions {
24 compatible = "fixed-partitions";
25 #address-cells = <1>;
26 #size-cells = <1>;
27
28 partition@0 {
29 label = "bootloader";
30 reg = <0x0 0x30000>;
31 read-only;
32 };
33
34 partition@30000 {
35 label = "config";
36 reg = <0x30000 0x10000>;
37 };
38
39 factory: partition@40000 {
40 label = "factory";
41 reg = <0x40000 0x10000>;
42
43 nvmem-layout {
44 compatible = "fixed-layout";
45 #address-cells = <1>;
46 #size-cells = <1>;
47
48 eeprom_factory_0: eeprom@0 {
49 reg = <0x0 0x200>;
50 };
51
52 macaddr_factory_4: macaddr@4 {
53 reg = <0x4 0x6>;
54 };
55 };
56 };
57
58 partition@50000 {
59 compatible = "denx,uimage";
60 label = "firmware";
61 reg = <0x50000 0x7a0000>;
62 };
63 };
64 };
65
66 leds {
67 compatible = "gpio-leds";
68
69 led_run: run {
70 label = "green:run";
71 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
72 };
73
74 net {
75 label = "amber:net";
76 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
77 };
78 };
79
80 keys {
81 compatible = "gpio-keys-polled";
82 poll-interval = <20>;
83
84 wps {
85 label = "wps";
86 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
87 linux,code = <KEY_WPS_BUTTON>;
88 };
89
90 reset {
91 label = "reset";
92 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
93 linux,code = <KEY_RESTART>;
94 };
95 };
96 };
97
98 &state_default {
99 gpio {
100 groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
101 function = "gpio";
102 };
103 };
104
105 &ethernet {
106 nvmem-cells = <&macaddr_factory_4>;
107 nvmem-cell-names = "mac-address";
108 };
109
110 &esw {
111 mediatek,portmap = <0x3e>;
112 };
113
114 &wmac {
115 nvmem-cells = <&eeprom_factory_0>;
116 nvmem-cell-names = "eeprom";
117 };
118
119 &otg {
120 status = "okay";
121 };