ath79: qca: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / qca9531_letv_lba-047-ch.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca953x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8 #include <dt-bindings/mtd/partitions/uimage.h>
9
10 / {
11 model = "Letv LBA-047-CH";
12 compatible = "letv,lba-047-ch", "qca,qca9531";
13
14 aliases {
15 label-mac-device = &eth0;
16 led-boot = &led_status_red;
17 led-failsafe = &led_status_blue;
18 led-running = &led_status_green;
19 led-upgrade = &led_status_blue;
20 };
21
22 keys {
23 compatible = "gpio-keys";
24
25 reset {
26 label = "reset";
27 linux,code = <KEY_RESTART>;
28 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
29 };
30 };
31
32 leds {
33 compatible = "gpio-leds";
34
35 led_status_blue: led-0 {
36 label = "blue:status";
37 color = <LED_COLOR_ID_BLUE>;
38 function = LED_FUNCTION_STATUS;
39 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
40 };
41
42 led_status_green: led-1 {
43 label = "green:status";
44 color = <LED_COLOR_ID_GREEN>;
45 function = LED_FUNCTION_STATUS;
46 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
47 };
48
49 led_status_red: led-2 {
50 label = "red:status";
51 color = <LED_COLOR_ID_RED>;
52 function = LED_FUNCTION_STATUS;
53 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
54 };
55 };
56
57 virtual_flash {
58 compatible = "mtd-concat";
59 devices = <&fwconcat0 &fwconcat1>;
60
61 partitions {
62 compatible = "fixed-partitions";
63 #address-cells = <1>;
64 #size-cells = <1>;
65
66 partition@0 {
67 reg = <0x0 0x0>;
68 label = "firmware";
69 compatible = "openwrt,uimage", "denx,uimage";
70 openwrt,ih-magic = <IH_MAGIC_OKLI>;
71 };
72 };
73 };
74 };
75
76 &spi {
77 status = "okay";
78
79 flash@0 {
80 compatible = "jedec,spi-nor";
81 reg = <0>;
82 spi-max-frequency = <30000000>;
83 m25p,fast-read;
84
85 partitions {
86 compatible = "fixed-partitions";
87 #address-cells = <1>;
88 #size-cells = <1>;
89
90 partition@0 {
91 label = "u-boot";
92 reg = <0x0 0x40000>;
93 read-only;
94 };
95
96 partition@40000 {
97 label = "u-boot-env";
98 reg = <0x40000 0x10000>;
99 read-only;
100 };
101
102 fwconcat0: partition@50000 {
103 label = "fwconcat0";
104 reg = <0x50000 0xe30000>;
105 };
106
107 partition@e80000 {
108 label = "loader";
109 reg = <0xe80000 0x10000>;
110 };
111
112 fwconcat1: partition@e90000 {
113 label = "fwconcat1";
114 reg = <0xe90000 0x160000>;
115 };
116
117 partition@ff0000 {
118 label = "art";
119 reg = <0xff0000 0x10000>;
120 read-only;
121
122 nvmem-layout {
123 compatible = "fixed-layout";
124 #address-cells = <1>;
125 #size-cells = <1>;
126
127 macaddr_art_0: macaddr@0 {
128 reg = <0x0 0x6>;
129 };
130
131 macaddr_art_6: macaddr@6 {
132 reg = <0x6 0x6>;
133 };
134
135 cal_art_1000: calibration@1000 {
136 reg = <0x1000 0x440>;
137 };
138 };
139 };
140 };
141 };
142 };
143
144 &eth0 {
145 status = "okay";
146
147 phy-handle = <&swphy4>;
148
149 nvmem-cells = <&macaddr_art_0>;
150 nvmem-cell-names = "mac-address";
151 };
152
153 &eth1 {
154 compatible = "qca,qca9530-eth", "syscon", "simple-mfd";
155
156 nvmem-cells = <&macaddr_art_6>;
157 nvmem-cell-names = "mac-address";
158 };
159
160 &wmac {
161 status = "okay";
162
163 nvmem-cells = <&cal_art_1000>;
164 nvmem-cell-names = "calibration";
165 };