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