ramips: rtxxxx: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ramips / dts / rt3352_allnet_all5002.dts
1 #include "rt3352.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "allnet,all5002", "ralink,rt3352-soc";
8 model = "Allnet ALL5002";
9
10 i2c-gpio {
11 #address-cells = <1>;
12 #size-cells = <0>;
13
14 compatible = "i2c-gpio";
15 gpios = <&gpio0 1 GPIO_ACTIVE_HIGH &gpio0 2 GPIO_ACTIVE_HIGH>;
16 i2c-gpio,delay-us = <10>;
17
18 pcf0: iexp@38 {
19 #gpio-cells = <2>;
20 compatible = "inxp,pcf8574a";
21 reg = <0x38>;
22 gpio-controller;
23 };
24
25 hwmon@4b {
26 compatible = "national,lm92";
27 reg = <0x4b>;
28 };
29 };
30
31 leds {
32 compatible = "gpio-leds";
33
34 ld1 {
35 label = "green:ld1";
36 gpios = <&pcf0 0 GPIO_ACTIVE_LOW>;
37 };
38
39 ld2 {
40 label = "green:ld2";
41 gpios = <&pcf0 1 GPIO_ACTIVE_LOW>;
42 };
43 };
44 };
45
46 &spi0 {
47 status = "okay";
48
49 flash@0 {
50 compatible = "jedec,spi-nor";
51 reg = <0>;
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 partition@50000 {
92 compatible = "denx,uimage";
93 label = "firmware";
94 reg = <0x50000 0x1fb0000>;
95 };
96 };
97 };
98 };
99
100 &state_default {
101 gpio {
102 groups = "i2c", "jtag", "rgmii", "mdio", "uartf";
103 function = "gpio";
104 };
105 };
106
107 &ethernet {
108 nvmem-cells = <&macaddr_factory_28>;
109 nvmem-cell-names = "mac-address";
110 };
111
112 &esw {
113 mediatek,portmap = <0x3f>;
114 };
115
116 &wmac {
117 nvmem-cells = <&eeprom_factory_0>;
118 nvmem-cell-names = "eeprom";
119 };
120
121 &ehci {
122 status = "okay";
123 };
124
125 &ohci {
126 status = "okay";
127 };