ramips: rtxxxx: convert to nvmem-layout
[openwrt/staging/jow.git] / target / linux / ramips / dts / rt5350_asiarf_awm002-evb.dtsi
1 #include "rt5350.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "asiarf,awm002-evb", "ralink,rt5350-soc";
8
9 leds {
10 compatible = "gpio-leds";
11
12 tx {
13 label = "green:tx";
14 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
15 };
16
17 rx {
18 label = "green:rx";
19 gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
20 };
21
22 wps {
23 label = "green:wps";
24 gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
25 };
26 };
27
28 keys {
29 compatible = "gpio-keys-polled";
30 poll-interval = <20>;
31
32 reset_wps {
33 label = "reset_wps";
34 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_RESTART>;
36 };
37
38 mode {
39 label = "mode";
40 gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
41 linux,code = <BTN_0>;
42 };
43 };
44 };
45
46 &spi0 {
47 status = "okay";
48
49 flash@0 {
50 reg = <0>;
51 compatible = "jedec,spi-nor";
52 spi-max-frequency = <10000000>;
53
54 partitions {
55 compatible = "fixed-partitions";
56 #address-cells = <1>;
57 #size-cells = <1>;
58
59 partition@0 {
60 label = "u-boot";
61 reg = <0x0 0x30000>;
62 read-only;
63 };
64
65 partition@30000 {
66 label = "u-boot-env";
67 reg = <0x30000 0x10000>;
68 read-only;
69 };
70
71 factory: partition@40000 {
72 label = "factory";
73 reg = <0x40000 0x10000>;
74 read-only;
75
76 nvmem-layout {
77 compatible = "fixed-layout";
78 #address-cells = <1>;
79 #size-cells = <1>;
80
81 eeprom_factory_0: eeprom@0 {
82 reg = <0x0 0x200>;
83 };
84
85 macaddr_factory_28: macaddr@28 {
86 reg = <0x28 0x6>;
87 };
88 };
89 };
90
91 firmware: partition@50000 {
92 compatible = "denx,uimage";
93 label = "firmware";
94 /* reg property is set based on flash size in DTS files */
95 };
96 };
97 };
98 };
99
100 &ethernet {
101 nvmem-cells = <&macaddr_factory_28>;
102 nvmem-cell-names = "mac-address";
103 };
104
105 &wmac {
106 nvmem-cells = <&eeprom_factory_0>;
107 nvmem-cell-names = "eeprom";
108 };
109
110 &state_default {
111 gpio {
112 groups = "i2c", "jtag";
113 function = "gpio";
114 };
115 };
116
117 &esw {
118 mediatek,portmap = <0x3f>;
119 };