ramips: add support for JS76x8 series DEV boards
[openwrt/staging/rmilecki.git] / target / linux / ramips / dts / mt7628an_jotale_js76x8.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "jotale,js76x8", "mediatek,mt7628an-soc";
10
11 aliases {
12 led-boot = &led_system;
13 led-failsafe = &led_system;
14 led-running = &led_system;
15 led-upgrade = &led_system;
16 };
17
18 chosen {
19 bootargs = "console=ttyS0,115200";
20 };
21
22 leds {
23 compatible = "gpio-leds";
24
25 led_system: system {
26 label = "js76x8:green:system";
27 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
28 };
29
30 wifi {
31 label = "js76x8:green:wifi";
32 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
33 linux,default-trigger = "phy0tpt";
34 };
35 };
36
37 keys {
38 compatible = "gpio-keys";
39
40 reset {
41 label = "reset";
42 gpios = <&gpio 38 GPIO_ACTIVE_HIGH>;
43 linux,code = <KEY_RESTART>;
44 };
45 };
46 };
47
48 &state_default {
49 gpio {
50 groups = "refclk", "wdt", "wled_an";
51 function = "gpio";
52 };
53 };
54
55 &spi0 {
56 status = "okay";
57
58 pinctrl-names = "default";
59 pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
60
61 flash@0 {
62 compatible = "jedec,spi-nor";
63 reg = <0>;
64 spi-max-frequency = <40000000>;
65 m25p,chunked-io = <32>;
66
67 partitions {
68 compatible = "fixed-partitions";
69 #address-cells = <1>;
70 #size-cells = <1>;
71
72 partition@0 {
73 label = "u-boot";
74 reg = <0x0 0x30000>;
75 read-only;
76 };
77
78 partition@30000 {
79 label = "u-boot-env";
80 reg = <0x30000 0x10000>;
81 read-only;
82 };
83
84 factory: partition@40000 {
85 label = "factory";
86 reg = <0x40000 0x10000>;
87 read-only;
88 };
89
90 firmware: partition@50000 {
91 compatible = "denx,uimage";
92 label = "firmware";
93 /* reg property is set based on flash size in DTS files */
94 };
95 };
96 };
97 };
98
99 &i2c {
100 status = "okay";
101 };
102
103 &i2s {
104 status = "okay";
105 };
106
107 &uart1 {
108 status = "okay";
109 };
110
111 &uart2 {
112 status = "okay";
113 };
114
115 &ethernet {
116 mtd-mac-address = <&factory 0x28>;
117 };
118
119 &sdhci {
120 status = "okay";
121 mediatek,cd-low;
122 };
123
124 &wmac {
125 status = "okay";
126 };