ramips: Use dts alias based status led
[openwrt/openwrt.git] / target / linux / ramips / dts / X8.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 = "poray,x8", "ralink,rt5350-soc";
10 model = "Poray X8";
11
12 aliases {
13 led-status = &led_power;
14 };
15
16 gpio-leds {
17 compatible = "gpio-leds";
18
19 led_power: power {
20 label = "x8:green:power";
21 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
22 };
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 10 GPIO_ACTIVE_LOW>;
34 linux,code = <KEY_RESTART>;
35 };
36 };
37 };
38
39 &spi0 {
40 status = "okay";
41
42 m25p80@0 {
43 #address-cells = <1>;
44 #size-cells = <1>;
45 compatible = "jedec,spi-nor";
46 reg = <0>;
47 spi-max-frequency = <10000000>;
48
49 partition@0 {
50 label = "u-boot";
51 reg = <0x0 0x30000>;
52 read-only;
53 };
54
55 partition@30000 {
56 label = "u-boot-env";
57 reg = <0x30000 0x10000>;
58 read-only;
59 };
60
61 factory: partition@40000 {
62 label = "factory";
63 reg = <0x40000 0x10000>;
64 read-only;
65 };
66
67 partition@50000 {
68 label = "firmware";
69 reg = <0x50000 0x7b0000>;
70 };
71 };
72 };
73
74 &pinctrl {
75 state_default: pinctrl0 {
76 gpio {
77 ralink,group = "i2c", "jtag", "uartf";
78 ralink,function = "gpio";
79 };
80 };
81 };
82
83 &ethernet {
84 mtd-mac-address = <&factory 0x4>;
85 };
86
87 &esw {
88 mediatek,portmap = <0x2f>;
89 mediatek,led_polarity = <1>;
90 };
91
92 &wmac {
93 ralink,mtd-eeprom = <&factory 0>;
94 ralink,led-polarity = <1>;
95 };
96
97 &ehci {
98 status = "okay";
99 };
100
101 &ohci {
102 status = "okay";
103 };