ramips: Use dts alias based status led
[openwrt/openwrt.git] / target / linux / ramips / dts / 3G150B.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 = "tenda,3g150b", "ralink,rt5350-soc";
10 model = "Tenda 3G150B";
11
12 aliases {
13 led-status = &led_ap;
14 };
15
16 gpio-leds {
17 compatible = "gpio-leds";
18
19 led_ap: ap {
20 label = "3g150b:blue:ap";
21 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
22 };
23
24 3g {
25 label = "3g150b:blue:3g";
26 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
27 };
28 };
29
30 gpio-keys-polled {
31 compatible = "gpio-keys-polled";
32 #address-cells = <1>;
33 #size-cells = <0>;
34 poll-interval = <20>;
35
36 reset {
37 label = "reset";
38 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
39 linux,code = <KEY_RESTART>;
40 };
41 };
42
43 gpio_export {
44 compatible = "gpio-export";
45 #size-cells = <0>;
46
47 usb {
48 gpio-export,name = "usb";
49 gpio-export,output = <1>;
50 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
51 };
52 };
53 };
54
55 &spi0 {
56 status = "okay";
57
58 m25p80@0 {
59 #address-cells = <1>;
60 #size-cells = <1>;
61 compatible = "jedec,spi-nor";
62 reg = <0>;
63 spi-max-frequency = <10000000>;
64
65 partition@0 {
66 label = "u-boot";
67 reg = <0x0 0x30000>;
68 read-only;
69 };
70
71 partition@30000 {
72 label = "u-boot-env";
73 reg = <0x30000 0x10000>;
74 read-only;
75 };
76
77 factory: partition@40000 {
78 label = "factory";
79 reg = <0x40000 0x10000>;
80 read-only;
81 };
82
83 partition@50000 {
84 label = "firmware";
85 reg = <0x50000 0x3b0000>;
86 };
87 };
88 };
89
90 &gpio1 {
91 status = "okay";
92 };
93
94 &pinctrl {
95 state_default: pinctrl0 {
96 gpio {
97 ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf", "led";
98 ralink,function = "gpio";
99 };
100 };
101 };
102
103 &ethernet {
104 mtd-mac-address = <&factory 0x4>;
105 };
106
107 &esw {
108 mediatek,portmap = <0x2f>;
109 };
110
111 &wmac {
112 ralink,mtd-eeprom = <&factory 0>;
113 ralink,led-polarity = <1>;
114 };
115
116 &ehci {
117 status = "okay";
118 };
119
120 &ohci {
121 status = "okay";
122 };