lantiq: convert to new LED color/function format where possible
[openwrt/staging/robimarko.git] / target / linux / lantiq / files / arch / mips / boot / dts / lantiq / vr9_avm_fritz7412.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "vr9.dtsi"
4
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/leds/common.h>
7 #include <dt-bindings/mips/lantiq_rcu_gphy.h>
8
9 / {
10 compatible = "avm,fritz7412", "lantiq,xway", "lantiq,vr9";
11 model = "AVM FRITZ!Box 7412";
12
13 chosen {
14 bootargs = "console=ttyLTQ0,115200";
15 };
16
17 aliases {
18 led-boot = &power_green;
19 led-failsafe = &power_red;
20 led-running = &power_green;
21 led-upgrade = &power_red;
22
23 led-dsl = &info;
24 led-wifi = &wifi;
25 };
26
27 memory@0 {
28 device_type = "memory";
29 reg = <0x0 0x8000000>;
30 };
31
32 keys {
33 compatible = "gpio-keys-polled";
34 poll-interval = <100>;
35
36 wps {
37 label = "wps";
38 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
39 linux,code = <KEY_WPS_BUTTON>;
40 };
41
42 dect {
43 label = "dect";
44 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
45 linux,code = <KEY_PHONE>;
46 };
47 };
48
49 leds {
50 compatible = "gpio-leds";
51
52 power_green: power_green {
53 function = LED_FUNCTION_POWER;
54 color = <LED_COLOR_ID_GREEN>;
55 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
56 default-state = "keep";
57 };
58
59 power_red: power_red {
60 function = LED_FUNCTION_POWER;
61 color = <LED_COLOR_ID_RED>;
62 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
63 };
64
65 fon {
66 label = "green:fon";
67 gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
68 };
69
70 dect {
71 label = "green:dect";
72 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
73 };
74
75 wifi: wifi {
76 label = "green:wifi";
77 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
78 };
79
80 info: info {
81 label = "green:info";
82 gpios = <&gpio 35 GPIO_ACTIVE_LOW>;
83 };
84 };
85 };
86
87 &localbus {
88 flash@0 {
89 compatible = "lantiq,nand-xway";
90 bank-width = <2>;
91 reg = <0 0x0 0x2000000>;
92 lantiq,cs = <1>;
93
94 pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>;
95 pinctrl-names = "default";
96
97 nand-use-soft-ecc-engine;
98
99 partitions {
100 compatible = "fixed-partitions";
101 #address-cells = <1>;
102 #size-cells = <1>;
103
104 partition@0 {
105 label = "urlader";
106 reg = <0x0 0x40000>;
107 read-only;
108 };
109
110 partition@40000 {
111 label = "nand-tffs";
112 reg = <0x40000 0x400000>;
113 read-only;
114 };
115
116 partition@440000 {
117 label = "kernel";
118 reg = <0x440000 0x400000>;
119 };
120
121 partition@840000 {
122 label = "ubi";
123 reg = <0x840000 0x3000000>;
124 };
125
126 partition@3840000 {
127 label = "reserved-kernel";
128 reg = <0x3840000 0x400000>;
129 read-only;
130 };
131
132 partition@3c40000 {
133 label = "reserved-filesystem";
134 reg = <0x3c40000 0x3000000>;
135 read-only;
136 };
137
138 partition@6c40000 {
139 label = "config";
140 reg = <0x6c40000 0x400000>;
141 read-only;
142 };
143
144 partition@6e40000 {
145 label = "nand-filesystem";
146 reg = <0x6e40000 0x400000>;
147 read-only;
148 };
149 };
150 };
151 };
152
153 &pcie0 {
154 status = "okay";
155 gpio-reset = <&gpio 11 GPIO_ACTIVE_HIGH>;
156
157 pcie@0 {
158 reg = <0 0 0 0 0>;
159 #interrupt-cells = <1>;
160 #size-cells = <2>;
161 #address-cells = <3>;
162 device_type = "pci";
163
164 wifi@168c,002e {
165 compatible = "pci168c,002e";
166 reg = <0 0 0 0 0>;
167 qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:01:00.0.bin */
168 };
169 };
170 };
171
172 &gpio {
173 pinctrl-names = "default";
174 pinctrl-0 = <&state_default>;
175
176 state_default: pinmux {
177 pcie-rst {
178 lantiq,pins = "io11";
179 lantiq,open-drain = <1>;
180 lantiq,output = <1>;
181 };
182 };
183 };
184
185 &gphy0 {
186 lantiq,gphy-mode = <GPHY_MODE_FE>;
187 };
188
189 &gswip_mdio {
190 phy11: ethernet-phy@11 {
191 reg = <0x11>;
192 };
193 };
194
195 &gswip_ports {
196 port@2 {
197 reg = <2>;
198 label = "lan";
199 phy-mode = "internal";
200 phy-handle = <&phy11>;
201 };
202 };