package/network/utils/iptables: fix PKG_CPE_ID
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_sanlinking_d240.dts
1 // SPDX-License-Identifier: BSD-3-Clause
2 /*
3 * Copyright(c) 2017 Kristian Evensen <kristian.evensen@gmail.com>.
4 * All rights reserved.
5 */
6
7 #include "mt7620a.dtsi"
8
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/input.h>
11 #include <dt-bindings/leds/common.h>
12
13 / {
14 compatible = "sanlinking,d240", "ralink,mt7620a-soc";
15 model = "Sanlinking Technologies D240";
16
17 aliases {
18 led-boot = &led_power;
19 led-failsafe = &led_power;
20 led-running = &led_power;
21 led-upgrade = &led_power;
22 };
23
24 chosen {
25 bootargs = "console=ttyS0,115200";
26 };
27
28 gpio-export {
29 compatible = "gpio-export";
30 #size-cells = <0>;
31
32 power_mpcie2 {
33 gpio-export,name = "power_mpcie2";
34 gpio-export,output = <1>;
35 gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
36 };
37
38 power_mpcie1 {
39 gpio-export,name = "power_mpcie1";
40 gpio-export,output = <1>;
41 gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>;
42 };
43 };
44
45 leds {
46 compatible = "gpio-leds";
47
48 led_power: power {
49 function = LED_FUNCTION_POWER;
50 color = <LED_COLOR_ID_BLUE>;
51 gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
52 };
53
54 usb {
55 function = LED_FUNCTION_USB;
56 color = <LED_COLOR_ID_BLUE>;
57 gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
58 trigger-sources = <&ohci_port1>, <&ehci_port1>;
59 linux,default-trigger = "usbport";
60 };
61
62 air {
63 label = "blue:wifi";
64 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
65 };
66 };
67
68 keys {
69 compatible = "gpio-keys";
70
71 reset {
72 label = "reset";
73 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
74 linux,code = <KEY_RESTART>;
75 };
76 };
77 };
78
79 &gpio1 {
80 status = "okay";
81 };
82
83 &gpio2 {
84 status = "okay";
85 };
86
87 &gpio3 {
88 status = "okay";
89 };
90
91 &spi0 {
92 status = "okay";
93
94 flash@0 {
95 compatible = "jedec,spi-nor";
96 reg = <0>;
97 spi-max-frequency = <10000000>;
98
99 partitions {
100 compatible = "fixed-partitions";
101 #address-cells = <1>;
102 #size-cells = <1>;
103
104 partition@0 {
105 label = "u-boot";
106 reg = <0x0 0x30000>;
107 read-only;
108 };
109
110 partition@30000 {
111 label = "u-boot-env";
112 reg = <0x30000 0x10000>;
113 read-only;
114 };
115
116 partition@40000 {
117 label = "factory";
118 reg = <0x40000 0x10000>;
119 read-only;
120
121 nvmem-layout {
122 compatible = "fixed-layout";
123 #address-cells = <1>;
124 #size-cells = <1>;
125
126 eeprom_factory_0: eeprom@0 {
127 reg = <0x0 0x200>;
128 };
129
130 macaddr_factory_4: macaddr@4 {
131 reg = <0x4 0x6>;
132 };
133 };
134 };
135
136 partition@50000 {
137 compatible = "denx,uimage";
138 label = "firmware";
139 reg = <0x50000 0xfb0000>;
140 };
141 };
142 };
143 };
144
145 &sdhci {
146 status = "okay";
147 /* the pins function is already set during pinmux driver load */
148 /delete-property/ pinctrl-0;
149 };
150
151 &ehci {
152 status = "okay";
153 };
154
155 &ohci {
156 status = "okay";
157 };
158
159 &ethernet {
160 nvmem-cells = <&macaddr_factory_4>;
161 nvmem-cell-names = "mac-address";
162
163 mediatek,portmap = "llllw";
164 };
165
166 &wmac {
167 nvmem-cells = <&eeprom_factory_0>;
168 nvmem-cell-names = "eeprom";
169 };
170
171 &state_default {
172 default {
173 groups = "i2c", "uartf", "wled", "spi refclk", "pa";
174 function = "gpio";
175 };
176
177 /*
178 * The sd function of the nd_sd group configures two of the
179 * groups pins as gpios. The pins are used as PCIe reset/power.
180 * Due to the driver load order, the pins are configured way to
181 * late if triggered by the sd-card driver.
182 * To not introduce another kind of driver load order
183 * dependency and configure the pins as early as possible,
184 * means during pinmux driver load.
185 */
186 gpio_sd {
187 groups = "nd_sd";
188 function = "sd";
189 };
190 };
191
192 &pcie {
193 status = "okay";
194 };