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