ramips: add support for indicating the boot state using multiple leds
[openwrt/openwrt.git] / target / linux / ramips / dts / ZBT-CPE102.dts
1 /dts-v1/;
2
3 #include "mt7620n.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "zbtlink,zbt-cpe102", "ralink,mt7620n-soc";
10 model = "Zbtlink ZBT-CPE102";
11
12 chosen {
13 bootargs = "console=ttyS0,115200";
14 };
15
16
17 aliases {
18 led-boot = &led_4g_0;
19 led-failsafe = &led_4g_0;
20 led-running = &led_4g_0;
21 led-upgrade = &led_4g_0;
22 };
23
24 gpio-leds {
25 compatible = "gpio-leds";
26
27 led_4g_0: 4g-0 {
28 label = "zbt-cpe102:green:4g-0";
29 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
30 };
31
32 4g-1 {
33 label = "zbt-cpe102:green:4g-1";
34 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
35 };
36
37 4g-2 {
38 label = "zbt-cpe102:green:4g-2";
39 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
40 };
41 };
42
43 gpio-keys-polled {
44 compatible = "gpio-keys-polled";
45 poll-interval = <20>;
46
47 reset {
48 label = "reset";
49 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_RESTART>;
51 };
52 };
53 };
54
55 &gpio1 {
56 status = "okay";
57 };
58
59 &gpio2 {
60 status = "okay";
61 };
62
63 &gpio3 {
64 status = "okay";
65 };
66
67 &spi0 {
68 status = "okay";
69
70 en25q64@0 {
71 compatible = "jedec,spi-nor";
72 reg = <0>;
73 spi-max-frequency = <10000000>;
74
75 partitions {
76 compatible = "fixed-partitions";
77 #address-cells = <1>;
78 #size-cells = <1>;
79
80 partition@0 {
81 label = "u-boot";
82 reg = <0x0 0x30000>;
83 read-only;
84 };
85
86 partition@30000 {
87 label = "u-boot-env";
88 reg = <0x30000 0x10000>;
89 read-only;
90 };
91
92 factory: partition@40000 {
93 label = "factory";
94 reg = <0x40000 0x10000>;
95 read-only;
96 };
97
98 partition@50000 {
99 label = "firmware";
100 reg = <0x50000 0x760000>;
101 };
102 };
103 };
104 };
105
106 &ehci {
107 status = "okay";
108 };
109
110 &ohci {
111 status = "okay";
112 };
113
114 &ethernet {
115 mtd-mac-address = <&factory 0x4>;
116 mediatek,portmap = "wllll";
117 };
118
119 &wmac {
120 ralink,mtd-eeprom = <&factory 0>;
121 };
122
123 &pinctrl {
124 state_default: pinctrl0 {
125 default {
126 ralink,group = "i2c", "spi refclk", "wled";
127 ralink,function = "gpio";
128 };
129 };
130 };