ee4b82ee8d9de4746d9bbb36c8fd4bd8ec382322
[openwrt/staging/svanheule.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 compatible = "mac-base";
141 reg = <0x0 0x6>;
142 #nvmem-cell-cells = <1>;
143 };
144
145 macaddr_art_6: macaddr@6 {
146 reg = <0x6 0x6>;
147 };
148 };
149 };
150 };
151 };
152 };
153
154 &mdio0 {
155 status = "okay";
156
157 phy1: ethernet-phy@1 {
158 reg = <1>;
159 eee-broken-100tx;
160 eee-broken-1000t;
161 };
162
163 phy2: ethernet-phy@2 {
164 reg = <2>;
165 eee-broken-100tx;
166 eee-broken-1000t;
167 at803x-override-sgmii-link-check;
168 };
169 };
170
171 &eth0 {
172 status = "okay";
173
174 pll-data = <0x82000101 0x80000101 0x80001313>;
175
176 nvmem-cells = <&macaddr_art_0 0>;
177 nvmem-cell-names = "mac-address";
178
179 phy-mode = "rgmii-id";
180 phy-handle = <&phy1>;
181
182 gmac-config {
183 device = <&gmac>;
184 rgmii-enabled = <1>;
185 rxd-delay = <3>;
186 rxdv-delay = <3>;
187 txd-delay = <0>;
188 txen-delay = <0>;
189 };
190 };
191
192 &eth1 {
193 status = "okay";
194
195 pll-data = <0x03000101 0x80000101 0x80001313>;
196
197 nvmem-cells = <&macaddr_art_6>;
198 nvmem-cell-names = "mac-address";
199
200 qca955x-sgmii-fixup;
201
202 phy-handle = <&phy2>;
203 };
204
205 &wmac {
206 status = "okay";
207
208 mtd-cal-data = <&art 0x1000>;
209 nvmem-cells = <&macaddr_art_0 2>;
210 nvmem-cell-names = "mac-address";
211 };
212
213 &pcie1 {
214 status = "okay";
215 };