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