ramips: convert rt2x00 EEPROM to NVMEM format
[openwrt/staging/nbd.git] / target / linux / ramips / dts / rt3050_asus_rt-g32-b1.dts
1 #include "rt3050.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "asus,rt-g32-b1", "ralink,rt3050-soc";
8 model = "Asus RT-G32 B1";
9
10 keys {
11 compatible = "gpio-keys-polled";
12 poll-interval = <20>;
13
14 reset {
15 label = "reset";
16 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
17 linux,code = <KEY_RESTART>;
18 };
19
20 wps {
21 label = "wps";
22 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_WPS_BUTTON>;
24 };
25 };
26 };
27
28 &spi0 {
29 status = "okay";
30
31 flash@0 {
32 compatible = "jedec,spi-nor";
33 reg = <0>;
34 spi-max-frequency = <10000000>;
35
36 partitions {
37 compatible = "fixed-partitions";
38 #address-cells = <1>;
39 #size-cells = <1>;
40
41 partition@0 {
42 label = "u-boot";
43 reg = <0x0 0x30000>;
44 read-only;
45 };
46
47 partition@30000 {
48 label = "devdata";
49 reg = <0x30000 0x10000>;
50 read-only;
51 };
52
53 devconf: partition@40000 {
54 compatible = "nvmem-cells";
55 label = "devconf";
56 reg = <0x40000 0x10000>;
57 #address-cells = <1>;
58 #size-cells = <1>;
59 read-only;
60
61 eeprom_devconf_0: eeprom@0 {
62 reg = <0x0 0x200>;
63 };
64
65 macaddr_devconf_4: macaddr@4 {
66 reg = <0x4 0x6>;
67 };
68 };
69
70 partition@50000 {
71 compatible = "denx,uimage";
72 label = "firmware";
73 reg = <0x50000 0x3b0000>;
74 };
75 };
76 };
77 };
78
79 &state_default {
80 gpio {
81 groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
82 function = "gpio";
83 };
84 };
85
86 &ethernet {
87 nvmem-cells = <&macaddr_devconf_4>;
88 nvmem-cell-names = "mac-address";
89 };
90
91 &esw {
92 mediatek,portmap = <0x2f>;
93 };
94
95 &wmac {
96 nvmem-cells = <&eeprom_devconf_0>;
97 nvmem-cell-names = "eeprom";
98 };