ath79: ar: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / ar9330_ziking_cpe46b.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9330.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 model = "ZiKing CPE46B";
10 compatible = "ziking,cpe46b", "qca,ar9330";
11
12 aliases {
13 label-mac-device = &eth0;
14 };
15
16 leds {
17 compatible = "gpio-leds";
18
19 wlan {
20 label = "green:wlan";
21 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
22 linux,default-trigger = "phy0tpt";
23 };
24
25 rssi1 {
26 label = "green:rssi1";
27 gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
28 };
29
30 rssi2 {
31 label = "green:rssi2";
32 gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
33 };
34 };
35
36 keys {
37 compatible = "gpio-keys";
38
39 reset {
40 label = "reset";
41 linux,code = <KEY_RESTART>;
42 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
43 };
44 };
45 };
46
47 &spi {
48 status = "okay";
49
50 flash@0 {
51 compatible = "jedec,spi-nor";
52 spi-max-frequency = <50000000>;
53 reg = <0>;
54
55 partitions {
56 compatible = "fixed-partitions";
57 #address-cells = <1>;
58 #size-cells = <1>;
59
60 partition@0 {
61 label = "u-boot";
62 reg = <0x000000 0x010000>;
63 read-only;
64 };
65
66 partition@10000 {
67 label = "u-boot-env";
68 reg = <0x010000 0x010000>;
69 };
70
71 partition@20000 {
72 compatible = "denx,uimage";
73 label = "firmware";
74 reg = <0x020000 0x7d0000>;
75 };
76
77 art: partition@7f0000 {
78 label = "art";
79 reg = <0x7f0000 0x010000>;
80 read-only;
81
82 nvmem-layout {
83 compatible = "fixed-layout";
84 #address-cells = <1>;
85 #size-cells = <1>;
86
87 macaddr_art_0: macaddr@0 {
88 reg = <0x0 0x6>;
89 };
90 };
91 };
92 };
93 };
94 };
95
96 &eth0 {
97 status = "okay";
98
99 nvmem-cells = <&macaddr_art_0>;
100 nvmem-cell-names = "mac-address";
101 };
102
103 &eth1 {
104 status = "okay";
105
106 nvmem-cells = <&macaddr_art_0>;
107 nvmem-cell-names = "mac-address";
108 mac-address-increment = <2>;
109 };
110
111 &wmac {
112 status = "okay";
113
114 mtd-cal-data = <&art 0x1000>;
115 };