ramips: fix multi colour led handling
[openwrt/openwrt.git] / target / linux / ramips / dts / GB-PC2.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "gnubee,gb-pc2", "mediatek,mt7621-soc";
10 model = "GB-PC2";
11
12 aliases {
13 led-status = &led_status;
14 };
15
16 memory@0 {
17 device_type = "memory";
18 reg = <0x0 0x1c000000>, <0x20000000 0x4000000>;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,57600";
23 };
24
25 gpio-keys-polled {
26 compatible = "gpio-keys-polled";
27 poll-interval = <20>;
28
29 reset {
30 label = "reset";
31 gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
32 linux,code = <KEY_RESTART>;
33 };
34 };
35
36 gpio-leds {
37 compatible = "gpio-leds";
38
39 system {
40 label = "gb-pc2:green:system";
41 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
42 };
43
44 led_status: status {
45 label = "gb-pc2:green:status";
46 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
47 };
48
49 lan1 {
50 label = "gb-pc2:green:lan1";
51 gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
52 };
53
54 lan2 {
55 label = "gb-pc2:green:lan2";
56 gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
57 };
58
59 lan3-yellow {
60 label = "gb-pc2:yellow:lan3";
61 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
62 };
63
64 lan3-green {
65 label = "gb-pc2:green:lan3";
66 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
67 };
68 };
69 };
70
71 &sdhci {
72 status = "okay";
73
74 pinctrl-names = "default";
75 pinctrl-0 = <&sdhci_pins>;
76 };
77
78 &spi0 {
79 status = "okay";
80
81 m25p80@0 {
82 compatible = "jedec,spi-nor";
83 reg = <0>;
84 spi-max-frequency = <10000000>;
85 m25p,chunked-io = <32>;
86
87 partitions {
88 compatible = "fixed-partitions";
89 #address-cells = <1>;
90 #size-cells = <1>;
91
92 partition@0 {
93 label = "u-boot";
94 reg = <0x0 0x30000>;
95 read-only;
96 };
97
98 partition@30000 {
99 label = "u-boot-env";
100 reg = <0x30000 0x10000>;
101 read-only;
102 };
103
104 factory: partition@40000 {
105 label = "factory";
106 reg = <0x40000 0x10000>;
107 read-only;
108 };
109
110 partition@50000 {
111 label = "firmware";
112 reg = <0x50000 0x1fb0000>;
113 };
114 };
115 };
116 };
117
118 &cpuclock {
119 compatible = "fixed-clock";
120 clock-frequency = <900000000>;
121 };
122
123 &pcie {
124 status = "okay";
125 };
126
127 &ethernet {
128 mtd-mac-address = <&factory 0xe000>;
129 };
130
131 &pinctrl {
132 state_default: pinctrl0 {
133 gpio {
134 ralink,group = "jtag", "rgmii2", "uart3", "wdt";
135 ralink,function = "gpio";
136 };
137 };
138 };
139