748eec823bfa5b37f2a7d8ce496811bec08c37f3
[oweals/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                                 label = "firmware";
105                                 reg = <0x050000 0x740000>;
106                         };
107
108                         partition@790000 {
109                                 label = "vendor";
110                                 reg = <0x790000 0x740000>;
111                                 read-only;
112                         };
113
114                         partition@ed0000 {
115                                 label = "data";
116                                 reg = <0xed0000 0x110000>;
117                                 read-only;
118                         };
119
120                         partition@fe0000 {
121                                 label = "id";
122                                 reg = <0xfe0000 0x010000>;
123                                 read-only;
124                         };
125
126                         art: partition@ff0000 {
127                                 label = "art";
128                                 reg = <0xff0000 0x010000>;
129                                 read-only;
130                         };
131                 };
132         };
133 };
134
135 &wmac {
136         status = "okay";
137
138         mtd-cal-data = <&art 0x1000>;
139         mtd-mac-address = <&art 0x06>;
140 };
141
142 &mdio0 {
143         status = "okay";
144
145         phy5: ethernet-phy@5 {
146                 reg = <5>;
147                 phy-mode = "rgmii-rxid";
148
149                 at803x-disable-smarteee;
150         };
151 };
152
153 &eth0 {
154         status = "okay";
155
156         mtd-mac-address = <&art 0x00>;
157
158         phy-handle = <&phy5>;
159         phy-mode = "rgmii-rxid";
160
161         pll-data = <0xae000000 0xa0000101 0xa0001313>;
162
163         gmac-config {
164                 device = <&gmac>;
165
166                 rxdv-delay = <3>;
167                 rxd-delay = <3>;
168                 txen-delay = <0>;
169                 txd-delay = <0>;
170                 rgmii-enabled = <1>;
171         };
172 };