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