ramips: Use dts alias based status led
[openwrt/staging/dedeckeh.git] / target / linux / ramips / dts / OY-0001.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "ohyeah,oy-0001", "ralink,mt7620a-soc";
10 model = "OY-0001";
11
12 aliases {
13 led-status = &led_power;
14 };
15
16 chosen {
17 bootargs = "console=ttyS0,115200";
18 };
19
20 gpio-leds {
21 compatible = "gpio-leds";
22
23 led_power: powerled {
24 label = "oy-0001:green:power";
25 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
26 };
27
28 wifiled {
29 label = "oy-0001:green:wifi";
30 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
31 };
32 };
33
34 gpio-keys-polled {
35 compatible = "gpio-keys-polled";
36 #address-cells = <1>;
37 #size-cells = <0>;
38 poll-interval = <20>;
39
40 s1 {
41 label = "reset";
42 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
43 linux,code = <KEY_RESTART>;
44 };
45 };
46 };
47
48 &gpio2 {
49 status = "okay";
50 };
51
52 &gpio3 {
53 status = "okay";
54 };
55
56 &spi0 {
57 status = "okay";
58
59 m25p80@0 {
60 #address-cells = <1>;
61 #size-cells = <1>;
62 compatible = "jedec,spi-nor";
63 reg = <0>;
64 spi-max-frequency = <10000000>;
65
66 partition@0 {
67 label = "u-boot";
68 reg = <0x0 0x30000>;
69 read-only;
70 };
71
72 partition@30000 {
73 label = "u-boot-env";
74 reg = <0x30000 0x10000>;
75 read-only;
76 };
77
78 factory: partition@40000 {
79 label = "factory";
80 reg = <0x40000 0x10000>;
81 read-only;
82 };
83
84 partition@50000 {
85 label = "firmware";
86 reg = <0x50000 0xfb0000>;
87 };
88 };
89 };
90
91 &pinctrl {
92 state_default: pinctrl0 {
93 gpio {
94 ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd";
95 ralink,function = "gpio";
96 };
97 };
98 };
99
100 &ethernet {
101 pinctrl-names = "default";
102 pinctrl-0 = <&ephy_pins>;
103 mediatek,portmap = "llllw";
104 };
105
106 &gsw {
107 mediatek,port4 = "ephy";
108 };
109
110 &wmac {
111 ralink,mtd-eeprom = <&factory 0>;
112 };
113
114 &sdhci {
115 status = "okay";
116 };
117
118 &ehci {
119 status = "okay";
120 };
121
122 &ohci {
123 status = "okay";
124 };
125
126 &pcie {
127 status = "okay";
128 };