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