b528c1b69ef81c1f9091da879385ec92c64c25fa
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7161_jjplus_ja76pf2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar7100.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/mtd/partitions/uimage.h>
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 = &led_d2;
24 led-failsafe = &led_d2;
25 led-running = &led_d2;
26 led-upgrade = &led_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 i2c {
37 compatible = "i2c-gpio";
38 sda-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
39 scl-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
40 #address-cells = <1>;
41 #size-cells = <0>;
42
43 sensor@48 {
44 compatible = "microchip,tcn75";
45 reg = <0x48>;
46 };
47 };
48
49 leds {
50 compatible = "gpio-leds";
51
52 led_d2: d2 {
53 label = "green:d2";
54 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
55 };
56
57 d3 {
58 label = "green:d3";
59 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
60 };
61
62 d4 {
63 label = "green:d4";
64 gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
65 };
66 };
67
68 keys {
69 compatible = "gpio-keys";
70
71 sw1 {
72 label = "sw1";
73 linux,code = <KEY_RESTART>;
74 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
75 debounce-interval = <60>;
76 };
77
78 sw2 {
79 label = "sw2";
80 linux,code = <KEY_WPS_BUTTON>;
81 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
82 debounce-interval = <60>;
83 };
84 };
85 };
86
87 &mdio0 {
88 status = "okay";
89
90 phy0: ethernet-phy@0 {
91 reg = <0>;
92 phy-mode = "rgmii";
93 };
94
95 phy4: ethernet-phy@4 {
96 reg = <4>;
97 phy-mode = "rgmii";
98 };
99 };
100
101 &eth0 {
102 status = "okay";
103
104 phy-handle = <&phy0>;
105 };
106
107 &eth1 {
108 status = "okay";
109
110 phy-handle = <&phy4>;
111 };
112
113 &pcie0 {
114 status = "okay";
115 };
116
117 &spi {
118 status = "okay";
119
120 flash@0 {
121 compatible = "jedec,spi-nor";
122 reg = <0>;
123 spi-max-frequency = <25000000>;
124
125 partitions {
126 compatible = "fixed-partitions";
127 #address-cells = <1>;
128 #size-cells = <1>;
129
130 partition@0 {
131 label = "RedBoot";
132 reg = <0x000000 0x040000>;
133 read-only;
134 };
135
136 partition@40000 {
137 label = "loader";
138 reg = <0x040000 0x020000>;
139 };
140
141 partition@60000 {
142 label = "firmware";
143 reg = <0x060000 0xf80000>;
144 compatible = "openwrt,uimage", "denx,uimage";
145 openwrt,ih-magic = <IH_MAGIC_OKLI>;
146 };
147
148 partition@fe0000 {
149 label = "FIS directory";
150 reg = <0xfe0000 0x00f000>;
151 read-only;
152 };
153
154 partition@fef000 {
155 label = "RedBoot config";
156 reg = <0xfef000 0x001000>;
157 read-only;
158 };
159
160 partition@ff0000 {
161 label = "Atheros Board Data";
162 reg = <0xff0000 0x10000>;
163 read-only;
164 };
165 };
166 };
167 };