ath79: convert mtd-mac-address to nvmem implementation
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9557_buffalo_bhr-4grv2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca955x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "buffalo,bhr-4grv2", "qca,qca9557";
10 model = "Buffalo BHR-4GRV2";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 led_power: power {
23 label = "green:power";
24 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
25 default-state = "on";
26 };
27
28 diag {
29 label = "orange:diag";
30 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
31 };
32
33 vpn_orange {
34 label = "orange:vpn";
35 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
36 };
37
38 vpn_green {
39 label = "green:vpn";
40 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
41 };
42 };
43
44 keys {
45 compatible = "gpio-keys";
46
47 reset {
48 label = "reset";
49 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_RESTART>;
51 debounce-interval = <60>;
52 };
53
54 eco {
55 label = "eco";
56 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
57 linux,code = <BTN_0>;
58 linux,input-type = <EV_SW>;
59 debounce-interval = <60>;
60 };
61 };
62 };
63
64 &spi {
65 status = "okay";
66
67 flash@0 {
68 compatible = "jedec,spi-nor";
69 reg = <0>;
70 spi-max-frequency = <25000000>;
71
72 partitions {
73 compatible = "fixed-partitions";
74 #address-cells = <1>;
75 #size-cells = <1>;
76
77 partition@0 {
78 label = "u-boot";
79 reg = <0x000000 0x040000>;
80 read-only;
81 };
82
83 partition@40000 {
84 label = "u-boot-env";
85 reg = <0x040000 0x010000>;
86 };
87
88 partition@50000 {
89 compatible = "denx,uimage";
90 label = "firmware";
91 reg = <0x050000 0xfa0000>;
92 };
93
94 art: partition@ff0000 {
95 label = "art";
96 reg = <0xff0000 0x010000>;
97 read-only;
98 };
99 };
100 };
101 };
102
103 &mdio0 {
104 status = "okay";
105
106 phy0: ethernet-phy@0 {
107 reg = <0>;
108
109 qca,ar8327-initvals = <
110 0x04 0x80080080 /* PORT0 PAD MODE CTRL */
111 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
112 0x7c 0x0000007e /* PORT0_STATUS */
113 0x94 0x0000007e /* PORT6 STATUS */
114 >;
115 };
116 };
117
118 &eth0 {
119 status = "okay";
120
121 nvmem-cells = <&macaddr_art_0>;
122 nvmem-cell-names = "mac-address";
123 phy-handle = <&phy0>;
124 pll-data = <0x56000000 0x00000101 0x00001616>;
125 };
126
127 &eth1 {
128 status = "okay";
129
130 nvmem-cells = <&macaddr_art_6>;
131 nvmem-cell-names = "mac-address";
132 pll-data = <0x03000101 0x00000101 0x00001616>;
133
134 fixed-link {
135 speed = <1000>;
136 full-duplex;
137 };
138 };
139
140 &art {
141 compatible = "nvmem-cells";
142 #address-cells = <1>;
143 #size-cells = <1>;
144
145 macaddr_art_0: macaddr@0 {
146 reg = <0x0 0x6>;
147 };
148
149 macaddr_art_6: macaddr@6 {
150 reg = <0x6 0x6>;
151 };
152 };