c2dfa6ba2d5eea5ca2dae14dd60ffec1aaccdc38
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / ar9344_compex_wpj344-16m.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9344.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "compex,wpj344-16m", "qca,ar9344";
10 model = "Compex WPJ344 (16MB flash)";
11
12 aliases {
13 label-mac-device = &eth0;
14 led-boot = &led_status;
15 led-failsafe = &led_status;
16 led-running = &led_status;
17 led-upgrade = &led_status;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led_status: status {
24 label = "wpj344:green:status";
25 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
26 };
27
28 sig1 {
29 label = "wpj344:red:sig1";
30 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
31 };
32
33 sig2 {
34 label = "wpj344:yellow:sig2";
35 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
36 };
37
38 sig3 {
39 label = "wpj344:green:sig3";
40 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
41 };
42
43 sig4 {
44 label = "wpj344:green:sig4";
45 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
46 };
47 };
48
49 keys {
50 compatible = "gpio-keys";
51
52 reset {
53 linux,code = <KEY_RESTART>;
54 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
55 debounce-interval = <60>;
56 };
57 };
58 };
59
60 &ref {
61 clock-frequency = <40000000>;
62 };
63
64 &uart {
65 status = "okay";
66 };
67
68 &spi {
69 status = "okay";
70
71 num-cs = <1>;
72
73 flash@0 {
74 compatible = "jedec,spi-nor";
75 reg = <0>;
76 spi-max-frequency = <25000000>;
77
78 partitions {
79 compatible = "fixed-partitions";
80 #address-cells = <1>;
81 #size-cells = <1>;
82
83 uboot: partition@0 {
84 label = "u-boot";
85 reg = <0x000000 0x030000>;
86 read-only;
87 };
88
89 partition@30000 {
90 label = "firmware";
91 reg = <0x030000 0xfc0000>;
92 compatible = "denx,uimage";
93 };
94
95 art: partition@ff0000 {
96 label = "art";
97 reg = <0xff0000 0x010000>;
98 read-only;
99 };
100 };
101 };
102 };
103
104 &usb {
105 status = "okay";
106 };
107
108 &usb_phy {
109 status = "okay";
110 };
111
112 &pcie {
113 status = "okay";
114 };
115
116 &wmac {
117 status = "okay";
118
119 mtd-cal-data = <&art 0x1000>;
120 };
121
122 &mdio0 {
123 status = "okay";
124
125 phy-mask = <0>;
126
127 phy0: ethernet-phy@0 {
128 reg = <0>;
129 phy-mode = "rgmii";
130
131 qca,ar8327-initvals = <
132 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
133 0x10 0x80000080 /* POWER_ON_STRAP */
134 0x50 0x00000000 /* LED_CTRL0 */
135 0x54 0xc737c737 /* LED_CTRL1 */
136 0x58 0x00000000 /* LED_CTRL2 */
137 0x5c 0x00c30c00 /* LED_CTRL3 */
138 0x7c 0x0000007e /* PORT0_STATUS */
139 >;
140 };
141 };
142
143 &eth0 {
144 status = "okay";
145
146 pll-data = <0x06000000 0x00000101 0x00001616>;
147
148 mtd-mac-address = <&uboot 0x2e010>;
149
150 phy-mode = "rgmii";
151 phy-handle = <&phy0>;
152 };