lantiq: fix dts error in LED color/function conversion
[openwrt/openwrt.git] / target / linux / lantiq / files / arch / mips / boot / dts / lantiq / amazonse_allnet_all0333cj.dts
1 #include <dt-bindings/leds/common.h>
2
3 #include "amazonse.dtsi"
4
5 / {
6 compatible = "allnet,all0333cj", "lantiq,xway", "lantiq,ase";
7 model = "Allnet ALL0333CJ DSL Modem";
8
9 chosen {
10 bootargs = "console=ttyLTQ0,115200";
11
12 aliases {
13 led-boot = &power;
14 led-failsafe = &power;
15 led-running = &power;
16 led-upgrade = &power;
17
18 led-dsl = &dsl;
19 led-internet = &online_green;
20 };
21 };
22
23 memory@0 {
24 device_type = "memory";
25 reg = <0x0 0x1000000>;
26 };
27
28 leds {
29 compatible = "gpio-leds";
30
31 /* power led: red=off, green=on */
32 power: power {
33 function = LED_FUNCTION_POWER;
34 color = <LED_COLOR_ID_GREEN>;
35 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
36 default-state = "keep";
37 };
38
39 lan: lan {
40 function = LED_FUNCTION_LAN;
41 color = <LED_COLOR_ID_GREEN>;
42 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
43 };
44
45 dsl: dsl {
46 label = "green:dsl";
47 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
48 };
49
50 online_green: online {
51 label = "green:online";
52 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
53 };
54 online_red {
55 label = "red:online";
56 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
57 };
58 };
59 };
60
61 &gpio {
62 pinctrl-names = "default";
63 pinctrl-0 = <&state_default>;
64
65 state_default: pinmux {
66 keys_in {
67 lantiq,pins = "io0",/* "io25", */"io29";
68 lantiq,pull = <2>;
69 lantiq,open-drain = <1>;
70 };
71 };
72 };
73
74 &gsw {
75 phy-mode = "mii";
76 };
77
78 &localbus {
79 flash@0 {
80 compatible = "lantiq,nor";
81 bank-width = <2>;
82 reg = <0 0x0 0x400000>;
83
84 partitions {
85 compatible = "fixed-partitions";
86 #address-cells = <1>;
87 #size-cells = <1>;
88
89 partition@0 {
90 label = "uboot";
91 reg = <0x00000 0x10000>;
92 read-only;
93 };
94
95 partition@10000 {
96 label = "firmware";
97 reg = <0x10000 0x3ef200>;
98 };
99
100 partition@3ff200 {
101 label = "u-boot-env";
102 reg = <0x3ff200 0xc00>;
103 read-only;
104 };
105
106 partition@3ffe00 {
107 label = "dummy_bits";
108 reg = <0x3ffe00 0x200>;
109 read-only;
110 };
111 };
112 };
113 };