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