ath79: add support for TP-Link TL-WR841N/ND v12
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7161_jjplus_ja76pf2.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 "ar7100.dtsi"
8
9 / {
10 model = "jjPlus JA76PF2";
11 compatible = "jjplus,ja76pf2", "qca,ar7161";
12
13 memory@0 {
14 device_type = "memory";
15 reg = <0x0 0x4000000>;
16 };
17
18 chosen {
19 bootargs = "console=ttyS0,115200n8";
20 };
21
22 aliases {
23 led-boot = &d2;
24 led-failsafe = &d2;
25 led-running = &d2;
26 led-upgrade = &d2;
27 };
28
29 extosc: ref {
30 compatible = "fixed-clock";
31 #clock-cells = <0>;
32 clock-output-names = "ref";
33 clock-frequency = <40000000>;
34 };
35
36 leds {
37 compatible = "gpio-leds";
38
39 d2: d2 {
40 label = "ja76pf2:green:d2";
41 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
42 };
43
44 d3 {
45 label = "ja76pf2:green:d3";
46 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
47 };
48
49 d4 {
50 label = "ja76pf2:green:d4";
51 gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
52 };
53 };
54
55 keys {
56 compatible = "gpio-keys-polled";
57 poll-interval = <20>;
58
59 sw1 {
60 label = "sw1";
61 linux,code = <KEY_RESTART>;
62 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
63 debounce-interval = <60>;
64 };
65
66 sw2 {
67 label = "sw2";
68 linux,code = <KEY_WPS_BUTTON>;
69 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
70 debounce-interval = <60>;
71 };
72 };
73 };
74
75 &mdio0 {
76 status = "okay";
77
78 phy-mask = <0x1>;
79
80 phy0: ethernet-phy@0 {
81 reg = <0>;
82 phy-mode = "rgmii";
83 };
84
85 phy4: ethernet-phy@4 {
86 reg = <4>;
87 phy-mode = "rgmii";
88 };
89 };
90
91 &eth0 {
92 status = "okay";
93
94 phy-handle = <&phy0>;
95 };
96
97 &eth1 {
98 status = "okay";
99
100 phy-handle = <&phy4>;
101 };
102
103 &pcie0 {
104 status = "okay";
105 };
106
107 &spi {
108 status = "okay";
109 num-cs = <1>;
110
111 flash@0 {
112 compatible = "jedec,spi-nor";
113 reg = <0>;
114 spi-max-frequency = <25000000>;
115
116 partitions {
117 #address-cells = <1>;
118 #size-cells = <1>;
119 compatible = "ecoscentric,redboot-fis-partitions";
120 };
121 };
122 };
123
124 &uart {
125 status = "okay";
126 };