ramips: rtxxxx: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ramips / dts / rt5350_belkin_f7c027.dts
1 #include "rt5350.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "belkin,f7c027", "ralink,rt5350-soc";
8 model = "Belkin F7C027";
9
10 aliases {
11 led-boot = &led_status_orange;
12 led-failsafe = &led_status_orange;
13 led-running = &led_status_orange;
14 led-upgrade = &led_status_orange;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 status {
21 label = "blue:status";
22 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
23 };
24
25 power {
26 label = "blue:power";
27 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
28 };
29
30 led_status_orange: orange {
31 label = "orange:status";
32 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
33 };
34
35 relay {
36 label = "device:relay";
37 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
38 };
39 };
40
41 keys {
42 compatible = "gpio-keys-polled";
43 poll-interval = <20>;
44
45 top {
46 label = "restore";
47 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_RESTART>;
49 };
50
51 power {
52 label = "power";
53 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_RFKILL>;
55 };
56
57 sensor {
58 label = "sensor";
59 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
60 linux,code = <BTN_0>;
61 };
62 };
63 };
64
65 &spi0 {
66 status = "okay";
67
68 flash@0 {
69 compatible = "jedec,spi-nor";
70 reg = <0>;
71 spi-max-frequency = <10000000>;
72
73 partitions {
74 compatible = "fixed-partitions";
75 #address-cells = <1>;
76 #size-cells = <1>;
77
78 partition@0 {
79 label = "u-boot";
80 reg = <0x0 0x30000>;
81 read-only;
82 };
83
84 partition@30000 {
85 label = "u-boot-env";
86 reg = <0x30000 0x10000>;
87 read-only;
88 };
89
90 factory: partition@40000 {
91 label = "factory";
92 reg = <0x40000 0x10000>;
93 read-only;
94
95 nvmem-layout {
96 compatible = "fixed-layout";
97 #address-cells = <1>;
98 #size-cells = <1>;
99
100 eeprom_factory_0: eeprom@0 {
101 reg = <0x0 0x200>;
102 };
103 };
104 };
105
106 partition@50000 {
107 compatible = "denx,uimage";
108 label = "firmware";
109 reg = <0x50000 0x770000>;
110 };
111
112 partition@7c0000 {
113 label = "firmware2";
114 reg = <0x7c0000 0x770000>;
115 };
116
117 partition@f30000 {
118 label = "belkin_settings";
119 reg = <0xf30000 0xa0000>;
120 };
121
122 partition@fd0000 {
123 label = "unknown";
124 reg = <0xfd0000 0x10000>;
125 };
126
127 partition@fe0000 {
128 label = "nvram";
129 reg = <0xfe0000 0x10000>;
130 };
131
132 partition@ff0000 {
133 label = "user_factory";
134 reg = <0xff0000 0x10000>;
135 };
136 };
137 };
138 };
139
140 &wmac {
141 nvmem-cells = <&eeprom_factory_0>;
142 nvmem-cell-names = "eeprom";
143 };
144
145 &state_default {
146 gpio {
147 groups = "i2c", "jtag", "uartf";
148 function = "gpio";
149 };
150 };