ath79: add support for Ubiquiti AirRouter
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9558_ocedo_koala.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "qca9557.dtsi"
8
9 / {
10 compatible = "ocedo,koala", "qca,qca9557";
11 model = "OCEDO Koala";
12
13 chosen {
14 bootargs = "console=ttyS0,115200n8";
15 };
16
17 aliases {
18 led-boot = &system;
19 led-failsafe = &system;
20 led-running = &system;
21 led-upgrade = &system;
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 power {
28 label = "koala:green:power";
29 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
30 default-state = "on";
31 };
32
33 wifi2 {
34 label = "koala:yellow:wlan2";
35 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
36 linux,default-trigger = "phy1tpt";
37 default-state = "off";
38 };
39
40 wifi5 {
41 label = "koala:red:wlan58";
42 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
43 linux,default-trigger = "phy0tpt";
44 default-state = "off";
45 };
46
47 system: system {
48 label = "koala:blue:sys";
49 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
50 default-state = "off";
51 };
52 };
53
54 keys {
55 compatible = "gpio-keys-polled";
56 poll-interval = <100>;
57
58 reset {
59 label = "reset";
60 linux,code = <KEY_RESTART>;
61 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
62 };
63 };
64 };
65
66 &pcie0 {
67 status = "okay";
68 };
69
70 &uart {
71 status = "okay";
72 };
73
74 &pll {
75 clocks = <&extosc>;
76 };
77
78 &spi {
79 status = "okay";
80 num-cs = <1>;
81
82 flash@0 {
83 compatible = "jedec,spi-nor";
84 reg = <0>;
85 spi-max-frequency = <25000000>;
86
87 partitions {
88 compatible = "fixed-partitions";
89 #address-cells = <1>;
90 #size-cells = <1>;
91
92 uboot: partition@0 {
93 label = "u-boot";
94 reg = <0x000000 0x040000>;
95 read-only;
96 };
97
98 partition@40000 {
99 label = "u-boot-env";
100 reg = <0x040000 0x010000>;
101 };
102
103 partition@50000 {
104 compatible = "denx,uimage";
105 label = "firmware";
106 reg = <0x050000 0x740000>;
107 };
108
109 partition@790000 {
110 label = "vendor";
111 reg = <0x790000 0x740000>;
112 read-only;
113 };
114
115 partition@ed0000 {
116 label = "data";
117 reg = <0xed0000 0x110000>;
118 read-only;
119 };
120
121 partition@fe0000 {
122 label = "id";
123 reg = <0xfe0000 0x010000>;
124 read-only;
125 };
126
127 art: partition@ff0000 {
128 label = "art";
129 reg = <0xff0000 0x010000>;
130 read-only;
131 };
132 };
133 };
134 };
135
136 &wmac {
137 status = "okay";
138
139 mtd-cal-data = <&art 0x1000>;
140 mtd-mac-address = <&art 0x06>;
141 };
142
143 &mdio0 {
144 status = "okay";
145
146 phy5: ethernet-phy@5 {
147 reg = <5>;
148 phy-mode = "rgmii-rxid";
149
150 at803x-disable-smarteee;
151 };
152 };
153
154 &eth0 {
155 status = "okay";
156
157 mtd-mac-address = <&art 0x00>;
158
159 phy-handle = <&phy5>;
160 phy-mode = "rgmii-rxid";
161
162 pll-data = <0xae000000 0xa0000101 0xa0001313>;
163
164 gmac-config {
165 device = <&gmac>;
166
167 rxdv-delay = <3>;
168 rxd-delay = <3>;
169 txen-delay = <0>;
170 txd-delay = <0>;
171 rgmii-enabled = <1>;
172 };
173 };