ath79: ar: convert to nvmem-layout
[openwrt/staging/hauke.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 label-mac-device = &wmac;
14 };
15
16 leds {
17 compatible = "gpio-leds";
18
19 wlan {
20 label = "green:wlan";
21 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
22 linux,default-trigger = "phy0tpt";
23 };
24
25 eth0 {
26 label = "orange:eth0";
27 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
28 };
29
30 eth1 {
31 label = "orange:eth1";
32 gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
33 };
34 };
35
36 keys {
37 compatible = "gpio-keys";
38
39 wps {
40 label = "wps";
41 linux,code = <KEY_WPS_BUTTON>;
42 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
43 };
44 };
45 };
46
47 &ref {
48 clock-frequency = <40000000>;
49 };
50
51 &usb {
52 dr_mode = "host";
53 status = "okay";
54 };
55
56 &usb_phy {
57 status = "okay";
58 };
59
60 &spi {
61 status = "okay";
62
63 flash@0 {
64 compatible = "jedec,spi-nor";
65 spi-max-frequency = <50000000>;
66 reg = <0>;
67
68 partitions {
69 compatible = "fixed-partitions";
70 #address-cells = <1>;
71 #size-cells = <1>;
72
73 uboot: partition@0 {
74 label = "u-boot";
75 reg = <0x000000 0x040000>;
76 read-only;
77 };
78
79 partition@40000 {
80 label = "u-boot-env";
81 reg = <0x040000 0x010000>;
82 read-only;
83 };
84
85 partition@50000 {
86 compatible = "denx,uimage";
87 label = "firmware";
88 reg = <0x50000 0xfa0000>;
89 };
90
91 art: partition@ff0000 {
92 label = "art";
93 reg = <0xff0000 0x010000>;
94 read-only;
95
96 nvmem-layout {
97 compatible = "fixed-layout";
98 #address-cells = <1>;
99 #size-cells = <1>;
100
101 macaddr_art_0: macaddr@0 {
102 reg = <0x0 0x6>;
103 };
104
105 macaddr_art_6: macaddr@6 {
106 reg = <0x6 0x6>;
107 };
108 };
109 };
110 };
111 };
112 };
113
114 &mdio0 {
115 status = "okay";
116 };
117
118 &eth0 {
119 status = "okay";
120 nvmem-cells = <&macaddr_art_0>;
121 nvmem-cell-names = "mac-address";
122
123 gmac-config {
124 device = <&gmac>;
125
126 switch-phy-addr-swap = <1>;
127 switch-phy-swap = <1>;
128 };
129 };
130
131 &eth1 {
132 status = "okay";
133 nvmem-cells = <&macaddr_art_6>;
134 nvmem-cell-names = "mac-address";
135 };
136
137 &wmac {
138 status = "okay";
139 mtd-cal-data = <&art 0x1000>;
140 };