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