ath79: small wr1043nd-v4 fixes
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9563_phicomm-k2t.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 "qca956x.dtsi"
8
9 / {
10         model = "Phicomm K2T";
11         compatible = "phicomm,k2t";
12
13         aliases {
14                 led-status = &status_red;
15         };
16
17         chosen {
18                 bootargs = "console=ttyS0,115200n8";
19         };
20
21         leds {
22                 compatible = "gpio-leds";
23
24                 status_blue {
25                         label = "phicomm:blue:status";
26                         gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
27                         default-state = "off";
28                 };
29
30                 status_red: status_red {
31                         label = "phicomm:red:status";
32                         gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
33                         default-state = "off";
34                 };
35
36                 status_yellow {
37                         label = "phicomm:yellow:status";
38                         gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
39                         default-state = "off";
40                 };
41         };
42
43         keys {
44                 compatible = "gpio-keys-polled";
45                 #address-cells = <1>;
46                 #size-cells = <0>;
47                 poll-interval = <20>;
48
49                 reset {
50                         linux,code = <KEY_RESTART>;
51                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
52                         debounce-interval = <60>;
53                 };
54         };
55 };
56
57 &uart {
58         status = "okay";
59 };
60
61 &gpio {
62         status = "okay";
63 };
64
65 &pcie {
66         status = "okay";
67 };
68
69 &spi {
70         num-cs = <1>;
71
72         status = "okay";
73
74         flash@0 {
75                 #address-cells = <1>;
76                 #size-cells = <1>;
77                 compatible = "jedec,spi-nor";
78                 reg = <0>;
79                 spi-max-frequency = <25000000>;
80
81                 partitions {
82                         compatible = "fixed-partitions";
83                         #address-cells = <1>;
84                         #size-cells = <1>;
85
86                         partition@0 {
87                                 label = "u-boot";
88                                 reg = <0x000000 0x30000>;
89                                 read-only;
90                         };
91
92                         partition@30000 {
93                                 label = "config";
94                                 reg = <0x030000 0x10000>;
95                                 read-only;
96                         };
97
98                         partition@40000 {
99                                 label = "permanent";
100                                 reg = <0x040000 0x50000>;
101                                 read-only;
102                         };
103
104                         partition@90000 {
105                                 label = "firmware";
106                                 reg = <0x090000 0xf60000>;
107                         };
108
109                         art: partition@ff0000 {
110                                 label = "art";
111                                 reg = <0xff0000 0x010000>;
112                                 read-only;
113                         };
114                 };
115         };
116 };
117
118 &mdio0 {
119         status = "okay";
120
121         phy-mask = <0>;
122
123         phy0: ethernet-phy@0 {
124                 reg = <0>;
125                 phy-mode = "sgmii";
126
127                 qca,ar8327-initvals = <
128                         0x04 0x00080080 /* PORT0 PAD MODE CTRL */
129                         0x10 0x81000080 /* POWER_ON_STRIP */
130                         0x50 0xcc35cc35 /* LED_CTRL0 */
131                         0x54 0xcb37cb37 /* LED_CTRL1 */
132                         0x58 0x00000000 /* LED_CTRL2 */
133                         0x5c 0x00f3cf00 /* LED_CTRL3 */
134                         0x7c 0x0000007e /* PORT0_STATUS */
135                         >;
136         };
137 };
138
139 &eth0 {
140         status = "okay";
141
142         pll-data = <0x03000101 0x00000101 0x00001919>;
143
144         phy-mode = "sgmii";
145         phy-handle = <&phy0>;
146 };
147
148 &wmac {
149         status = "okay";
150         mtd-cal-data = <&art 0x1000>;
151 };