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