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