ramips: Use dts alias based status led
[openwrt/openwrt.git] / target / linux / ramips / dts / GB-PC1.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-pc1", "mediatek,mt7621-soc";
10 model = "GB-PC1";
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 #address-cells = <1>;
28 #size-cells = <0>;
29 poll-interval = <20>;
30
31 reset {
32 label = "reset";
33 gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
34 linux,code = <KEY_RESTART>;
35 };
36 };
37
38 gpio-leds {
39 compatible = "gpio-leds";
40
41 system {
42 label = "gb-pc1:green:system";
43 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
44 };
45
46 led_status: status {
47 label = "gb-pc1:green:status";
48 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
49 };
50
51 lan1 {
52 label = "gb-pc1:green:lan1";
53 gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
54 };
55
56 lan2 {
57 label = "gb-pc1:green:lan2";
58 gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
59 };
60 };
61 };
62
63 &sdhci {
64 status = "okay";
65
66 pinctrl-names = "default";
67 pinctrl-0 = <&sdhci_pins>;
68 };
69
70 &spi0 {
71 status = "okay";
72
73 m25p80@0 {
74 #address-cells = <1>;
75 #size-cells = <1>;
76 compatible = "jedec,spi-nor";
77 reg = <0>;
78 spi-max-frequency = <10000000>;
79 m25p,chunked-io = <32>;
80
81 partition@0 {
82 label = "u-boot";
83 reg = <0x0 0x30000>;
84 read-only;
85 };
86
87 partition@30000 {
88 label = "u-boot-env";
89 reg = <0x30000 0x10000>;
90 read-only;
91 };
92
93 factory: partition@40000 {
94 label = "factory";
95 reg = <0x40000 0x10000>;
96 read-only;
97 };
98
99 partition@50000 {
100 label = "firmware";
101 reg = <0x50000 0x1fb0000>;
102 };
103 };
104 };
105
106 &cpuclock {
107 compatible = "fixed-clock";
108 clock-frequency = <900000000>;
109 };
110
111 &pcie {
112 status = "okay";
113 };
114
115 &ethernet {
116 mtd-mac-address = <&factory 0xe000>;
117 };
118
119 &pinctrl {
120 state_default: pinctrl0 {
121 gpio {
122 ralink,group = "jtag", "rgmii2", "uart3", "wdt";
123 ralink,function = "gpio";
124 };
125 };
126 };