2744b01c8e3f3908f48dc994e1e9c970898503ff
[openwrt/staging/blocktrron.git] / target / linux / ath79 / dts / qca9558_openmesh_om5p-ac-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca955x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "openmesh,om5p-ac-v1", "qca,qca9558";
10 model = "OpenMesh OM5P-AC v1";
11
12 chosen {
13 /delete-property/ bootargs;
14 };
15
16 aliases {
17 serial0 = &uart;
18 led-boot = &led_power_blue;
19 led-failsafe = &led_power_blue;
20 led-running = &led_power_blue;
21 led-upgrade = &led_power_blue;
22 label-mac-device = &eth0;
23 };
24
25 leds {
26 compatible = "gpio-leds";
27
28 led_power_blue: power_blue {
29 label = "blue:power";
30 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
31 default-state = "on";
32 };
33
34 wan_blue {
35 label = "blue:wan";
36 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
37 };
38
39 lan_blue {
40 label = "blue:lan";
41 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
42 };
43
44 wifi_green {
45 label = "green:wifi";
46 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
47 linux,default-trigger = "phy0tpt";
48 };
49
50 wifi_yellow {
51 label = "yellow:wifi";
52 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
53 };
54
55 wifi_red {
56 label = "red:wifi";
57 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
58 };
59 };
60
61 i2c {
62 compatible = "i2c-gpio";
63 gpios = <&gpio 11 GPIO_ACTIVE_HIGH /* sda */
64 &gpio 12 GPIO_ACTIVE_HIGH /* scl */
65 >;
66 #address-cells = <1>;
67 #size-cells = <0>;
68
69 i2c-gpio,scl-open-drain;
70 i2c-gpio,sda-open-drain;
71
72 tmp423a@4c {
73 compatible = "ti,tmp423";
74 reg = <0x4c>;
75 };
76 };
77
78 watchdog {
79 compatible = "linux,wdt-gpio";
80 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
81 hw_algo = "toggle";
82 /* hw_margin_ms is actually 300s but driver limits it to 60s */
83 hw_margin_ms = <60000>;
84 always-running;
85 };
86 };
87
88 &spi {
89 status = "okay";
90
91 flash@0 {
92 compatible = "jedec,spi-nor";
93 reg = <0>;
94 spi-max-frequency = <40000000>;
95
96 /* partitions are passed via bootloader */
97 partitions {
98 compatible = "fixed-partitions";
99 #address-cells = <1>;
100 #size-cells = <1>;
101
102 partition@0 {
103 label = "u-boot";
104 reg = <0x000000 0x040000>;
105 read-only;
106 };
107
108 partition@40000 {
109 label = "u-boot-env";
110 reg = <0x040000 0x010000>;
111 };
112
113 partition@50000 {
114 label = "custom";
115 reg = <0x050000 0x060000>;
116 read-only;
117 };
118
119 partition@b0000 {
120 label = "inactive";
121 reg = <0x0b0000 0x7a0000>;
122 };
123
124 partition@850000 {
125 label = "inactive2";
126 reg = <0x850000 0x7a0000>;
127 };
128
129 art: partition@ff0000 {
130 label = "ART";
131 reg = <0xff0000 0x010000>;
132 read-only;
133
134 nvmem-layout {
135 compatible = "fixed-layout";
136 #address-cells = <1>;
137 #size-cells = <1>;
138
139 macaddr_art_0: macaddr@0 {
140 reg = <0x0 0x6>;
141 };
142
143 macaddr_art_6: macaddr@6 {
144 reg = <0x6 0x6>;
145 };
146 };
147 };
148 };
149 };
150 };
151
152 &mdio0 {
153 status = "okay";
154
155 phy1: ethernet-phy@1 {
156 reg = <1>;
157 eee-broken-100tx;
158 eee-broken-1000t;
159 };
160
161 phy2: ethernet-phy@2 {
162 reg = <2>;
163 eee-broken-100tx;
164 eee-broken-1000t;
165 at803x-override-sgmii-link-check;
166 };
167 };
168
169 &eth0 {
170 status = "okay";
171
172 pll-data = <0x82000101 0x80000101 0x80001313>;
173
174 nvmem-cells = <&macaddr_art_0>;
175 nvmem-cell-names = "mac-address";
176
177 phy-mode = "rgmii-id";
178 phy-handle = <&phy1>;
179
180 gmac-config {
181 device = <&gmac>;
182 rgmii-enabled = <1>;
183 rxd-delay = <3>;
184 rxdv-delay = <3>;
185 txd-delay = <0>;
186 txen-delay = <0>;
187 };
188 };
189
190 &eth1 {
191 status = "okay";
192
193 pll-data = <0x03000101 0x80000101 0x80001313>;
194
195 nvmem-cells = <&macaddr_art_6>;
196 nvmem-cell-names = "mac-address";
197
198 qca955x-sgmii-fixup;
199
200 phy-handle = <&phy2>;
201 };
202
203 &wmac {
204 status = "okay";
205
206 mtd-cal-data = <&art 0x1000>;
207 nvmem-cells = <&macaddr_art_0>;
208 nvmem-cell-names = "mac-address";
209 mac-address-increment = <2>;
210 };
211
212 &pcie1 {
213 status = "okay";
214 };