Upstream refresh for v1.5.0-rc1 : Upstream 19.07 : 4fb6b8c553f692eeb5bcb203e0f8ee8df0...
[librecmc/librecmc.git] / target / linux / ath79 / dts / ar9331_8dev_carambola2.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 "ar9331.dtsi"
8
9 / {
10         model = "8devices Carambola2";
11         compatible = "8dev,carambola2", "qca,ar9331";
12
13         aliases {
14                 serial0 = &uart;
15         };
16
17         leds {
18                 compatible = "gpio-leds";
19
20                 wlan {
21                         label = "carambola2:green:wlan";
22                         gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
23                         linux,default-trigger = "phy0tpt";
24                 };
25
26                 eth0 {
27                         label = "carambola2:orange:eth0";
28                         gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
29                 };
30
31                 eth1 {
32                         label = "carambola2: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 &gpio {
57         status = "okay";
58 };
59
60 &usb {
61         dr_mode = "host";
62         status = "okay";
63 };
64
65 &usb_phy {
66         status = "okay";
67 };
68
69 &spi {
70         num-chipselects = <0>;
71         status = "okay";
72
73         flash@0 {
74                 compatible = "jedec,spi-nor";
75                 spi-max-frequency = <104000000>;
76                 reg = <0>;
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 0x040000>;
86                                 read-only;
87                         };
88
89                         partition@40000 {
90                                 label = "u-boot-env";
91                                 reg = <0x040000 0x010000>;
92                                 read-only;
93                         };
94
95                         partition@50000 {
96                                 compatible = "denx,uimage";
97                                 label = "firmware";
98                                 reg = <0x50000 0xfa0000>;
99                         };
100
101                         art: partition@ff0000 {
102                                 label = "art";
103                                 reg = <0xff0000 0x010000>;
104                                 read-only;
105                         };
106                 };
107         };
108 };
109
110 &mdio0 {
111         status = "okay";
112 };
113
114 &eth0 {
115         status = "okay";
116         mtd-mac-address = <&art 0x0>;
117
118         gmac-config {
119                 device = <&gmac>;
120
121                 switch-phy-addr-swap = <1>;
122                 switch-phy-swap = <1>;
123         };
124 };
125
126 &eth1 {
127         status = "okay";
128         mtd-mac-address = <&art 0x6>;
129 };
130
131 &wmac {
132         status = "okay";
133         mtd-cal-data = <&art 0x1000>;
134         mtd-mac-address = <&art 0x1002>;
135 };