xref: /freebsd-src/sys/contrib/device-tree/src/mips/ralink/gardena_smart_gateway_mt7688.dts (revision cb7aa33ac6cd46a5434798e50363136e64f3ae98)
1c66ec88fSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0
2c66ec88fSEmmanuel Vadot/*
3c66ec88fSEmmanuel Vadot * Copyright (c) 2019 Stefan Roese <sr@denx.de>
4c66ec88fSEmmanuel Vadot */
5c66ec88fSEmmanuel Vadot
6c66ec88fSEmmanuel Vadot/dts-v1/;
7c66ec88fSEmmanuel Vadot
8c66ec88fSEmmanuel Vadot/include/ "mt7628a.dtsi"
9c66ec88fSEmmanuel Vadot
10c66ec88fSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
11c66ec88fSEmmanuel Vadot#include <dt-bindings/input/input.h>
12c66ec88fSEmmanuel Vadot
13c66ec88fSEmmanuel Vadot/ {
14c66ec88fSEmmanuel Vadot	compatible = "gardena,smart-gateway-mt7688", "ralink,mt7688a-soc",
15c66ec88fSEmmanuel Vadot		     "ralink,mt7628a-soc";
16c66ec88fSEmmanuel Vadot	model = "GARDENA smart Gateway (MT7688)";
17c66ec88fSEmmanuel Vadot
18c66ec88fSEmmanuel Vadot	memory@0 {
19c66ec88fSEmmanuel Vadot		device_type = "memory";
20c66ec88fSEmmanuel Vadot		reg = <0x0 0x8000000>;
21c66ec88fSEmmanuel Vadot	};
22c66ec88fSEmmanuel Vadot
23c66ec88fSEmmanuel Vadot	gpio-keys {
24c66ec88fSEmmanuel Vadot		compatible = "gpio-keys";
25c66ec88fSEmmanuel Vadot
26c66ec88fSEmmanuel Vadot		pinctrl-names = "default";
27c66ec88fSEmmanuel Vadot		pinctrl-0 = <&pinmux_gpio_gpio>;	/* GPIO11 */
28c66ec88fSEmmanuel Vadot
29b97ee269SEmmanuel Vadot		button {
30c66ec88fSEmmanuel Vadot			label = "USER_BTN1";
31c66ec88fSEmmanuel Vadot			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
32c66ec88fSEmmanuel Vadot			linux,code =<KEY_PROG1> ;
33c66ec88fSEmmanuel Vadot		};
34c66ec88fSEmmanuel Vadot	};
35c66ec88fSEmmanuel Vadot
36c66ec88fSEmmanuel Vadot	leds {
37c66ec88fSEmmanuel Vadot		compatible = "gpio-leds";
38c66ec88fSEmmanuel Vadot
39c66ec88fSEmmanuel Vadot		pinctrl-names = "default";
40c66ec88fSEmmanuel Vadot		pinctrl-0 = <&pinmux_pwm0_gpio>,	/* GPIO18 */
41c66ec88fSEmmanuel Vadot			    <&pinmux_pwm1_gpio>,	/* GPIO19 */
42c66ec88fSEmmanuel Vadot			    <&pinmux_sdmode_gpio>,	/* GPIO22..29 */
43c66ec88fSEmmanuel Vadot			    <&pinmux_p0led_an_gpio>;	/* GPIO43 */
44c66ec88fSEmmanuel Vadot		/*
45c66ec88fSEmmanuel Vadot		 * <&pinmux_i2s_gpio> (covers GPIO0..3) is needed here as
46c66ec88fSEmmanuel Vadot		 * well for GPIO3. But this is already claimed for uart1
47c66ec88fSEmmanuel Vadot		 * (see below). So we can't include it in this LED node.
48c66ec88fSEmmanuel Vadot		 */
49c66ec88fSEmmanuel Vadot
50*cb7aa33aSEmmanuel Vadot		led-power-blue {
51c66ec88fSEmmanuel Vadot			label = "smartgw:power:blue";
52c66ec88fSEmmanuel Vadot			gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
53c66ec88fSEmmanuel Vadot			default-state = "off";
54c66ec88fSEmmanuel Vadot		};
55c66ec88fSEmmanuel Vadot
56*cb7aa33aSEmmanuel Vadot		led-power-green {
57c66ec88fSEmmanuel Vadot			label = "smartgw:power:green";
58c66ec88fSEmmanuel Vadot			gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
59c66ec88fSEmmanuel Vadot			default-state = "off";
60c66ec88fSEmmanuel Vadot		};
61c66ec88fSEmmanuel Vadot
62*cb7aa33aSEmmanuel Vadot		led-power-red {
63c66ec88fSEmmanuel Vadot			label = "smartgw:power:red";
64c66ec88fSEmmanuel Vadot			gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
65c66ec88fSEmmanuel Vadot			default-state = "off";
66c66ec88fSEmmanuel Vadot		};
67c66ec88fSEmmanuel Vadot
68*cb7aa33aSEmmanuel Vadot		led-radio-blue {
69c66ec88fSEmmanuel Vadot			label = "smartgw:radio:blue";
70c66ec88fSEmmanuel Vadot			gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
71c66ec88fSEmmanuel Vadot			default-state = "off";
72c66ec88fSEmmanuel Vadot		};
73c66ec88fSEmmanuel Vadot
74*cb7aa33aSEmmanuel Vadot		led-radio-green {
75c66ec88fSEmmanuel Vadot			label = "smartgw:radio:green";
76c66ec88fSEmmanuel Vadot			gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
77c66ec88fSEmmanuel Vadot			default-state = "off";
78c66ec88fSEmmanuel Vadot		};
79c66ec88fSEmmanuel Vadot
80*cb7aa33aSEmmanuel Vadot		led-radio-red {
81c66ec88fSEmmanuel Vadot			label = "smartgw:radio:red";
82c66ec88fSEmmanuel Vadot			gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
83c66ec88fSEmmanuel Vadot			default-state = "off";
84c66ec88fSEmmanuel Vadot		};
85c66ec88fSEmmanuel Vadot
86*cb7aa33aSEmmanuel Vadot		led-internet-blue {
87c66ec88fSEmmanuel Vadot			label = "smartgw:internet:blue";
88c66ec88fSEmmanuel Vadot			gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;
89c66ec88fSEmmanuel Vadot			default-state = "off";
90c66ec88fSEmmanuel Vadot		};
91c66ec88fSEmmanuel Vadot
92*cb7aa33aSEmmanuel Vadot		led-internet-green {
93c66ec88fSEmmanuel Vadot			label = "smartgw:internet:green";
94c66ec88fSEmmanuel Vadot			gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
95c66ec88fSEmmanuel Vadot			default-state = "off";
96c66ec88fSEmmanuel Vadot		};
97c66ec88fSEmmanuel Vadot
98*cb7aa33aSEmmanuel Vadot		led-internet-red {
99c66ec88fSEmmanuel Vadot			label = "smartgw:internet:red";
100c66ec88fSEmmanuel Vadot			gpios = <&gpio 28 GPIO_ACTIVE_HIGH>;
101c66ec88fSEmmanuel Vadot			default-state = "off";
102c66ec88fSEmmanuel Vadot		};
103c66ec88fSEmmanuel Vadot
104*cb7aa33aSEmmanuel Vadot		led-ethernet-link {
105c66ec88fSEmmanuel Vadot			label = "smartgw:eth:link";
106c66ec88fSEmmanuel Vadot			gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
107c66ec88fSEmmanuel Vadot			linux,default-trigger = "netdev";
108c66ec88fSEmmanuel Vadot		};
109c66ec88fSEmmanuel Vadot
110*cb7aa33aSEmmanuel Vadot		led-ethernet-activity {
111c66ec88fSEmmanuel Vadot			label = "smartgw:eth:act";
112c66ec88fSEmmanuel Vadot			gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
113c66ec88fSEmmanuel Vadot			linux,default-trigger = "netdev";
114c66ec88fSEmmanuel Vadot		};
115c66ec88fSEmmanuel Vadot	};
116c66ec88fSEmmanuel Vadot
117c66ec88fSEmmanuel Vadot	aliases {
118c66ec88fSEmmanuel Vadot		serial0 = &uart0;
119c66ec88fSEmmanuel Vadot	};
120c66ec88fSEmmanuel Vadot};
121c66ec88fSEmmanuel Vadot
122c66ec88fSEmmanuel Vadot&i2c {
123c66ec88fSEmmanuel Vadot	status = "okay";
124c66ec88fSEmmanuel Vadot};
125c66ec88fSEmmanuel Vadot
126c66ec88fSEmmanuel Vadot&spi {
127c66ec88fSEmmanuel Vadot	status = "okay";
128c66ec88fSEmmanuel Vadot
129c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
130c66ec88fSEmmanuel Vadot	pinctrl-0 = <&pinmux_spi_spi>, <&pinmux_spi_cs1_cs>;
131c66ec88fSEmmanuel Vadot
132d5b0e70fSEmmanuel Vadot	flash@0 {
133c66ec88fSEmmanuel Vadot		compatible = "jedec,spi-nor";
134c66ec88fSEmmanuel Vadot		reg = <0>;
135c66ec88fSEmmanuel Vadot		spi-max-frequency = <40000000>;
136c66ec88fSEmmanuel Vadot
137c66ec88fSEmmanuel Vadot		partitions {
138c66ec88fSEmmanuel Vadot			compatible = "fixed-partitions";
139c66ec88fSEmmanuel Vadot			#address-cells = <1>;
140c66ec88fSEmmanuel Vadot			#size-cells = <1>;
141c66ec88fSEmmanuel Vadot
142c66ec88fSEmmanuel Vadot			partition@0 {
143c66ec88fSEmmanuel Vadot				label = "uboot";
144c66ec88fSEmmanuel Vadot				reg = <0x0 0xa0000>;
145c66ec88fSEmmanuel Vadot				read-only;
146c66ec88fSEmmanuel Vadot			};
147c66ec88fSEmmanuel Vadot
148c66ec88fSEmmanuel Vadot			partition@a0000 {
149c66ec88fSEmmanuel Vadot				label = "uboot_env0";
150c66ec88fSEmmanuel Vadot				reg = <0xa0000 0x10000>;
151c66ec88fSEmmanuel Vadot			};
152c66ec88fSEmmanuel Vadot
153c66ec88fSEmmanuel Vadot			partition@b0000 {
154c66ec88fSEmmanuel Vadot				label = "uboot_env1";
155c66ec88fSEmmanuel Vadot				reg = <0xb0000 0x10000>;
156c66ec88fSEmmanuel Vadot			};
157c66ec88fSEmmanuel Vadot
158c66ec88fSEmmanuel Vadot			factory: partition@c0000 {
159c66ec88fSEmmanuel Vadot				label = "factory";
160c66ec88fSEmmanuel Vadot				reg = <0xc0000 0x10000>;
161c66ec88fSEmmanuel Vadot				read-only;
162c66ec88fSEmmanuel Vadot			};
163c66ec88fSEmmanuel Vadot		};
164c66ec88fSEmmanuel Vadot	};
165c66ec88fSEmmanuel Vadot
166c66ec88fSEmmanuel Vadot	nand_flash@1 {
167c66ec88fSEmmanuel Vadot		compatible = "spi-nand";
168c66ec88fSEmmanuel Vadot		linux,mtd-name = "gd5f";
169c66ec88fSEmmanuel Vadot		reg = <1>;
170c66ec88fSEmmanuel Vadot		spi-max-frequency = <40000000>;
171c66ec88fSEmmanuel Vadot	};
172c66ec88fSEmmanuel Vadot};
173c66ec88fSEmmanuel Vadot
174c66ec88fSEmmanuel Vadot&uart1 {
175c66ec88fSEmmanuel Vadot	status = "okay";
176c66ec88fSEmmanuel Vadot
177c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
178c66ec88fSEmmanuel Vadot	pinctrl-0 = <&pinmux_i2s_gpio>;		/* GPIO0..3 */
179c66ec88fSEmmanuel Vadot
180c66ec88fSEmmanuel Vadot	fifo-size = <8>;
181c66ec88fSEmmanuel Vadot	tx-threshold = <8>;
182c66ec88fSEmmanuel Vadot
183c66ec88fSEmmanuel Vadot	rts-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
184c66ec88fSEmmanuel Vadot	cts-gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
185c66ec88fSEmmanuel Vadot};
186c66ec88fSEmmanuel Vadot
187c66ec88fSEmmanuel Vadot&uart2 {
188c66ec88fSEmmanuel Vadot	status = "okay";
189c66ec88fSEmmanuel Vadot
190c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
191c66ec88fSEmmanuel Vadot	pinctrl-0 = <&pinmux_p2led_an_gpio>,	/* GPIO41 */
192c66ec88fSEmmanuel Vadot		    <&pinmux_p3led_an_gpio>;	/* GPIO40 */
193c66ec88fSEmmanuel Vadot
194c66ec88fSEmmanuel Vadot	rts-gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
195c66ec88fSEmmanuel Vadot	cts-gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
196c66ec88fSEmmanuel Vadot};
197c66ec88fSEmmanuel Vadot
198c66ec88fSEmmanuel Vadot&watchdog {
199c66ec88fSEmmanuel Vadot	status = "okay";
200c66ec88fSEmmanuel Vadot};
201c66ec88fSEmmanuel Vadot
202c66ec88fSEmmanuel Vadot&wmac {
203c66ec88fSEmmanuel Vadot	status = "okay";
204c66ec88fSEmmanuel Vadot	mediatek,mtd-eeprom = <&factory 0x0000>;
205c66ec88fSEmmanuel Vadot};
206