ramips: fix nvmem-cells for routers based on TP-Link Archer
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_mikrotik_ltap-2hnd.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621_mikrotik.dtsi"
4
5 / {
6 compatible = "mikrotik,ltap-2hnd", "mediatek,mt7621-soc";
7 model = "MikroTik RouterBOARD LtAP-2HnD";
8
9 aliases {
10 led-boot = &led_usr;
11 led-failsafe = &led_usr;
12 led-running = &led_usr;
13 led-upgrade = &led_usr;
14 };
15
16 ath9k-leds {
17 compatible = "gpio-leds";
18
19 rssi0 {
20 label = "green:rssi0";
21 gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
22 };
23 rssi1 {
24 label = "green:rssi1";
25 gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
26 };
27 rssi2 {
28 label = "green:rssi2";
29 gpios = <&ath9k 2 GPIO_ACTIVE_LOW>;
30 };
31 rssi3 {
32 label = "green:rssi3";
33 gpios = <&ath9k 3 GPIO_ACTIVE_LOW>;
34 };
35 rssi4 {
36 label = "green:rssi4";
37 gpios = <&ath9k 4 GPIO_ACTIVE_LOW>;
38 };
39 };
40
41 leds {
42 compatible = "gpio-leds";
43
44 pwr {
45 label = "blue:pwr";
46 gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
47 default-state = "on";
48 };
49
50 led_usr: usr {
51 label = "green:usr";
52 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
53 };
54
55 gps {
56 label = "green:gps";
57 gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
58 };
59 };
60
61 /* TODO: find GPIOs for the WLAN antenna switches */
62 gpio-export {
63 compatible = "gpio-export";
64
65 usb-select {
66 gpio-export,name = "usb-select";
67 gpio-export,output = <1>;
68 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
69 };
70 gps-reset {
71 gpio-export,name = "gps-reset";
72 gpio-export,output = <1>;
73 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
74 };
75 sim-select {
76 gpio-export,name = "sim-select";
77 gpio-export,output = <1>;
78 gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
79 };
80 gps-ant-select {
81 /* internal antenna = 0 */
82 gpio-export,name = "gps-ant-select";
83 gpio-export,output = <0>;
84 gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
85 };
86 lte-reset {
87 gpio-export,name = "lte-reset";
88 gpio-export,output = <1>;
89 gpios = <&gpio 29 GPIO_ACTIVE_HIGH>;
90 };
91 };
92
93 pps {
94 compatible = "pps-gpio";
95 gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
96 };
97
98 pcie1_vcc_reg {
99 compatible = "regulator-fixed";
100 regulator-name = "pcie1_vcc";
101
102 regulator-min-microvolt = <3300000>;
103 regulator-max-microvolt = <3300000>;
104 gpio = <&gpio 10 GPIO_ACTIVE_HIGH>;
105 enable-active-high;
106 regulator-boot-on;
107 };
108
109 pcie2_vcc_reg {
110 compatible = "regulator-fixed";
111 regulator-name = "pcie2_vcc";
112
113 regulator-min-microvolt = <3300000>;
114 regulator-max-microvolt = <3300000>;
115 gpio = <&gpio 11 GPIO_ACTIVE_HIGH>;
116 enable-active-high;
117 regulator-boot-on;
118 };
119 };
120
121 &partitions {
122 partition@40000 {
123 compatible = "mikrotik,minor";
124 label = "firmware";
125 reg = <0x040000 0xfc0000>;
126 };
127 };
128
129 &ethernet {
130 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
131 };
132
133 &switch0 {
134 ports {
135 port@0 {
136 status = "okay";
137 label = "lan";
138 };
139 };
140 };
141
142 &pcie0 {
143 status = "okay";
144
145 ath9k: wifi@0,0 {
146 compatible = "pci168c,0030";
147 reg = <0x0000 0 0 0 0>;
148 qca,no-eeprom;
149 gpio-controller;
150 #gpio-cells = <2>;
151 };
152 };
153
154 &state_default {
155 gpio {
156 groups = "uart2", "wdt", "rgmii2";
157 function = "gpio";
158 };
159 };
160
161 &i2c {
162 status = "okay";
163 };
164
165 &pcie {
166 status = "okay";
167 };
168
169 &uartlite3 {
170 status = "okay";
171 };