42193f857c2bd1fac6fa4d520c976492ebfae783
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9331_8dev_carambola2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9331.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 model = "8devices Carambola2";
10 compatible = "8dev,carambola2", "qca,ar9331";
11
12 aliases {
13 serial0 = &uart;
14 label-mac-device = &wmac;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 wlan {
21 label = "green:wlan";
22 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
23 linux,default-trigger = "phy0tpt";
24 };
25
26 eth0 {
27 label = "orange:eth0";
28 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
29 };
30
31 eth1 {
32 label = "orange:eth1";
33 gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
34 };
35 };
36
37 keys {
38 compatible = "gpio-keys";
39
40 wps {
41 label = "wps";
42 linux,code = <KEY_WPS_BUTTON>;
43 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
44 };
45 };
46 };
47
48 &ref {
49 clock-frequency = <40000000>;
50 };
51
52 &uart {
53 status = "okay";
54 };
55
56 &usb {
57 dr_mode = "host";
58 status = "okay";
59 };
60
61 &usb_phy {
62 status = "okay";
63 };
64
65 &spi {
66 status = "okay";
67
68 flash@0 {
69 compatible = "jedec,spi-nor";
70 spi-max-frequency = <50000000>;
71 reg = <0>;
72
73 partitions {
74 compatible = "fixed-partitions";
75 #address-cells = <1>;
76 #size-cells = <1>;
77
78 uboot: partition@0 {
79 label = "u-boot";
80 reg = <0x000000 0x040000>;
81 read-only;
82 };
83
84 partition@40000 {
85 label = "u-boot-env";
86 reg = <0x040000 0x010000>;
87 read-only;
88 };
89
90 partition@50000 {
91 compatible = "denx,uimage";
92 label = "firmware";
93 reg = <0x50000 0xfa0000>;
94 };
95
96 art: partition@ff0000 {
97 label = "art";
98 reg = <0xff0000 0x010000>;
99 read-only;
100 };
101 };
102 };
103 };
104
105 &mdio0 {
106 status = "okay";
107 };
108
109 &eth0 {
110 status = "okay";
111 mtd-mac-address = <&art 0x0>;
112
113 gmac-config {
114 device = <&gmac>;
115
116 switch-phy-addr-swap = <1>;
117 switch-phy-swap = <1>;
118 };
119 };
120
121 &eth1 {
122 status = "okay";
123 mtd-mac-address = <&art 0x6>;
124 };
125
126 &wmac {
127 status = "okay";
128 mtd-cal-data = <&art 0x1000>;
129 };