a84c273f8622c50bc0a094dbf00af902e22e3469
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9344_embeddedwireless_balin.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 #include <dt-bindings/leds/common.h>
8
9 / {
10 model = "Embedded Wireless Balin";
11 compatible = "embeddedwireless,balin", "qca,ar9344";
12
13 chosen {
14 stdout-path = "serial0:115200n8";
15 };
16
17 aliases {
18 led-boot = &led_system;
19 led-failsafe = &led_system;
20 led-running = &led_system;
21 led-upgrade = &led_system;
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 led_system: led-0 {
28 label = "green:system";
29 color = <LED_COLOR_ID_GREEN>;
30 function = LED_FUNCTION_POWER;
31 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
32 default-state = "on";
33 };
34 };
35
36 keys {
37 compatible = "gpio-keys";
38
39 reset {
40 linux,code = <KEY_RESTART>;
41 gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
42 debounce-interval = <60>;
43 };
44 };
45 };
46
47 &ref {
48 clock-frequency = <40000000>;
49 };
50
51 &spi {
52 status = "okay";
53
54 flash@0 {
55 compatible = "jedec,spi-nor";
56 reg = <0>;
57 spi-max-frequency = <50000000>;
58
59 partitions {
60 compatible = "fixed-partitions";
61 #address-cells = <1>;
62 #size-cells = <1>;
63
64 partition@0 {
65 label = "u-boot";
66 reg = <0x000000 0x040000>;
67 read-only;
68 };
69
70 partition@40000 {
71 label = "u-boot-env";
72 reg = <0x040000 0x010000>;
73 };
74
75 partition@50000 {
76 compatible = "denx,uimage";
77 label = "firmware";
78 reg = <0x050000 0xfa0000>;
79 };
80
81 partition@ff0000 {
82 label = "art";
83 reg = <0xff0000 0x010000>;
84 read-only;
85
86 compatible = "nvmem-cells";
87 #address-cells = <1>;
88 #size-cells = <1>;
89
90 calibration_art_1000: calibration_data@1000 {
91 reg = <0x1000 0x440>;
92 };
93
94 macaddr_art_1002: macaddr@1002 {
95 reg = <0x1002 0x6>;
96 };
97 };
98 };
99 };
100 };
101
102 &builtin_switch {
103 /delete-property/qca,phy4-mii-enable;
104 };
105
106 &eth1 {
107 status = "okay";
108
109 nvmem-cells = <&macaddr_art_1002>;
110 nvmem-cell-names = "mac-address";
111 mac-address-increment-byte = <3>;
112 mac-address-increment = <0x40>;
113
114 gmac-config {
115 device = <&gmac>;
116 switch-phy-swap = <0>;
117 switch-only-mode = <1>;
118 };
119 };
120
121 &wmac {
122 status = "okay";
123
124 nvmem-cells = <&macaddr_art_1002>, <&calibration_art_1000>;
125 nvmem-cell-names = "mac-address", "calibration";
126 };
127
128 &pcie {
129 status = "okay";
130 };