ramips: Use dts alias based status led
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / WIZFI630A.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 = "wiznet,wizfi630a", "ralink,rt5350-soc";
10 model = "WIZnet WizFi630A";
11
12 aliases {
13 led-status = &led_run;
14 };
15
16 chosen {
17 bootargs = "console=ttyS1,115200";
18 };
19
20 gpio-leds {
21 compatible = "gpio-leds";
22
23 led_run: run {
24 label = "wizfi630a::run";
25 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
26 };
27
28 wps {
29 label = "wizfi630a::wps";
30 gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
31 };
32
33 uart1 {
34 label = "wizfi630a::uart1";
35 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
36 };
37
38 uart2 {
39 label = "wizfi630a::uart2";
40 gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
41 };
42 };
43
44 gpio-keys-polled {
45 compatible = "gpio-keys-polled";
46 #address-cells = <1>;
47 #size-cells = <0>;
48 poll-interval = <20>;
49
50 reset {
51 label = "reset";
52 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
53 linux,code = <KEY_RESTART>;
54 };
55
56 wps {
57 label = "wps";
58 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
59 linux,code = <KEY_WPS_BUTTON>;
60 };
61
62 scm1 {
63 label = "SCM1";
64 gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
65 linux,code = <BTN_0>;
66 };
67
68 scm2 {
69 label = "SCM2";
70 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
71 linux,code = <BTN_1>;
72 };
73 };
74 };
75
76 &gpio1 {
77 status = "okay";
78 };
79
80 &spi0 {
81 status = "okay";
82
83 m25p80@0 {
84 #address-cells = <1>;
85 #size-cells = <1>;
86 compatible = "jedec,spi-nor";
87 reg = <0>;
88 spi-max-frequency = <10000000>;
89
90 partition@0 {
91 #size-cells = <1>;
92 label = "uboot";
93 reg = <0x0 0x30000>;
94 read-only;
95 };
96
97 partition@30000 {
98 #size-cells = <1>;
99 label = "uboot-env";
100 reg = <0x30000 0x10000>;
101 read-only;
102 };
103
104 factory: partition@40000 {
105 #size-cells = <1>;
106 label = "factory";
107 reg = <0x40000 0x10000>;
108 read-only;
109 };
110
111 partition@50000 {
112 #size-cells = <1>;
113 label = "firmware";
114 reg = <0x50000 0xfb0000>;
115 };
116 };
117 };
118
119 &uart {
120 status = "okay";
121 pinctrl-names = "default";
122 pinctrl-0 = <&uartf_pins>;
123 };
124
125 &pinctrl {
126 state_default: pinctrl0 {
127 gpio {
128 ralink,group = "i2c", "jtag" ;
129 ralink,function = "gpio";
130 };
131 };
132 };
133
134 &ethernet {
135 mtd-mac-address = <&factory 0x4>;
136 };
137
138 &esw {
139 mediatek,portmap = <0x17>;
140 };
141
142 &wmac {
143 ralink,mtd-eeprom = <&factory 0>;
144 };
145
146 &ehci {
147 status = "okay";
148 };
149
150 &ohci {
151 status = "okay";
152 };