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