ramips: add support for indicating the boot state using multiple leds
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / NBG-419N2.dts
1 /dts-v1/;
2
3 #include "rt3352.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "zyxel,nbg-419n-v2", "ralink,rt3352-soc";
10 model = "ZyXEL NBG-419N v2";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 palmbus@10000000 {
20 spi@b00 {
21 status = "okay";
22 m25p80@0 {
23 compatible = "jedec,spi-nor";
24 reg = <0 0>;
25 spi-max-frequency = <10000000>;
26
27 partitions {
28 compatible = "fixed-partitions";
29 #address-cells = <1>;
30 #size-cells = <1>;
31
32 partition@0 {
33 label = "u-boot";
34 reg = <0x0 0x30000>;
35 read-only;
36 };
37
38 partition@30000 {
39 label = "u-boot-env";
40 reg = <0x30000 0x10000>;
41 read-only;
42 };
43
44 factory: partition@40000 {
45 label = "factory";
46 reg = <0x40000 0x10000>;
47 read-only;
48 };
49
50 partition@50000 {
51 label = "firmware";
52 reg = <0x50000 0x7b0000>;
53 };
54 };
55 };
56 };
57 };
58
59 gpio-leds {
60 compatible = "gpio-leds";
61
62 led_power: power {
63 label = "nbg-419n2:green:power";
64 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
65 };
66
67 wps {
68 label = "nbg-419n2:green:wps";
69 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
70 };
71
72 usb {
73 label = "nbg-419n2:green:usb";
74 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
75 trigger-sources = <&ohci_port1>, <&ehci_port1>;
76 linux,default-trigger = "usbport";
77 };
78 };
79
80 gpio-keys-polled {
81 compatible = "gpio-keys-polled";
82 poll-interval = <20>;
83 reset {
84 label = "reset";
85 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
86 linux,code = <KEY_RESTART>;
87 };
88 wps {
89 label = "wps";
90 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
91 linux,code = <KEY_WPS_BUTTON>;
92 };
93 rfkill {
94 label = "rfkill";
95 linux,input-type = <EV_SW>;
96 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
97 linux,code = <KEY_RFKILL>;
98 };
99 };
100 };
101
102 &pinctrl {
103 state_default: pinctrl0 {
104 gpio {
105 ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
106 ralink,function = "gpio";
107 };
108 };
109 };
110
111 &ethernet {
112 mtd-mac-address = <&factory 0x28>;
113 };
114
115 &esw {
116 mediatek,portmap = <0x2f>;
117 };
118
119 &wmac {
120 ralink,mtd-eeprom = <&factory 0>;
121 };
122
123 &ehci {
124 status = "okay";
125 };
126
127 &ohci {
128 status = "okay";
129 };