xref: /freebsd-src/sys/contrib/device-tree/src/arm/gemini/gemini-rut1xx.dts (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0
2*f126890aSEmmanuel Vadot/*
3*f126890aSEmmanuel Vadot * Device Tree file for Teltonika RUT1xx
4*f126890aSEmmanuel Vadot */
5*f126890aSEmmanuel Vadot
6*f126890aSEmmanuel Vadot/dts-v1/;
7*f126890aSEmmanuel Vadot
8*f126890aSEmmanuel Vadot#include "gemini.dtsi"
9*f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h>
10*f126890aSEmmanuel Vadot
11*f126890aSEmmanuel Vadot/ {
12*f126890aSEmmanuel Vadot	model = "Teltonika RUT1xx";
13*f126890aSEmmanuel Vadot	compatible = "teltonika,rut1xx", "cortina,gemini";
14*f126890aSEmmanuel Vadot	#address-cells = <1>;
15*f126890aSEmmanuel Vadot	#size-cells = <1>;
16*f126890aSEmmanuel Vadot
17*f126890aSEmmanuel Vadot	memory@0 { /* 128 MB */
18*f126890aSEmmanuel Vadot		device_type = "memory";
19*f126890aSEmmanuel Vadot		reg = <0x00000000 0x8000000>;
20*f126890aSEmmanuel Vadot	};
21*f126890aSEmmanuel Vadot
22*f126890aSEmmanuel Vadot	chosen {
23*f126890aSEmmanuel Vadot		bootargs = "console=ttyS0,115200n8";
24*f126890aSEmmanuel Vadot		stdout-path = &uart0;
25*f126890aSEmmanuel Vadot	};
26*f126890aSEmmanuel Vadot
27*f126890aSEmmanuel Vadot	gpio_keys {
28*f126890aSEmmanuel Vadot		compatible = "gpio-keys";
29*f126890aSEmmanuel Vadot
30*f126890aSEmmanuel Vadot		button-setup {
31*f126890aSEmmanuel Vadot			debounce-interval = <100>;
32*f126890aSEmmanuel Vadot			wakeup-source;
33*f126890aSEmmanuel Vadot			linux,code = <KEY_SETUP>;
34*f126890aSEmmanuel Vadot			label = "Reset to defaults";
35*f126890aSEmmanuel Vadot			/* Conflict with TVC */
36*f126890aSEmmanuel Vadot			gpios = <&gpio1 28 GPIO_ACTIVE_LOW>;
37*f126890aSEmmanuel Vadot		};
38*f126890aSEmmanuel Vadot	};
39*f126890aSEmmanuel Vadot
40*f126890aSEmmanuel Vadot	leds {
41*f126890aSEmmanuel Vadot		compatible = "gpio-leds";
42*f126890aSEmmanuel Vadot		led-gsm {
43*f126890aSEmmanuel Vadot			/* FIXME: add the LED color */
44*f126890aSEmmanuel Vadot			label = "rut1xx::gsm";
45*f126890aSEmmanuel Vadot			/* Conflict with ICE */
46*f126890aSEmmanuel Vadot			gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
47*f126890aSEmmanuel Vadot			default-state = "on";
48*f126890aSEmmanuel Vadot		};
49*f126890aSEmmanuel Vadot		led-power {
50*f126890aSEmmanuel Vadot			/* FIXME: add the LED color */
51*f126890aSEmmanuel Vadot			label = "rut1xx::power";
52*f126890aSEmmanuel Vadot			/* Conflict with NAND CE0 */
53*f126890aSEmmanuel Vadot			gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
54*f126890aSEmmanuel Vadot			default-state = "off";
55*f126890aSEmmanuel Vadot			linux,default-trigger = "heartbeat";
56*f126890aSEmmanuel Vadot		};
57*f126890aSEmmanuel Vadot	};
58*f126890aSEmmanuel Vadot
59*f126890aSEmmanuel Vadot	mdio0: mdio {
60*f126890aSEmmanuel Vadot		compatible = "virtual,mdio-gpio";
61*f126890aSEmmanuel Vadot		gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
62*f126890aSEmmanuel Vadot			<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
63*f126890aSEmmanuel Vadot		#address-cells = <1>;
64*f126890aSEmmanuel Vadot		#size-cells = <0>;
65*f126890aSEmmanuel Vadot
66*f126890aSEmmanuel Vadot		phy0: ethernet-phy@1 {
67*f126890aSEmmanuel Vadot			reg = <1>;
68*f126890aSEmmanuel Vadot			device_type = "ethernet-phy";
69*f126890aSEmmanuel Vadot		};
70*f126890aSEmmanuel Vadot	};
71*f126890aSEmmanuel Vadot
72*f126890aSEmmanuel Vadot	soc {
73*f126890aSEmmanuel Vadot		flash@30000000 {
74*f126890aSEmmanuel Vadot			status = "okay";
75*f126890aSEmmanuel Vadot			/* 8MB of flash */
76*f126890aSEmmanuel Vadot			reg = <0x30000000 0x00800000>;
77*f126890aSEmmanuel Vadot			/* TODO: add flash partitions here */
78*f126890aSEmmanuel Vadot		};
79*f126890aSEmmanuel Vadot
80*f126890aSEmmanuel Vadot		syscon: syscon@40000000 {
81*f126890aSEmmanuel Vadot			pinctrl {
82*f126890aSEmmanuel Vadot				/*
83*f126890aSEmmanuel Vadot				 * gpio0bgrp cover line 7 used by GSM LED
84*f126890aSEmmanuel Vadot				 * gpio0fgrp cover line 17 used by power LED
85*f126890aSEmmanuel Vadot				 */
86*f126890aSEmmanuel Vadot				gpio0_default_pins: pinctrl-gpio0 {
87*f126890aSEmmanuel Vadot					mux {
88*f126890aSEmmanuel Vadot						function = "gpio0";
89*f126890aSEmmanuel Vadot						groups = "gpio0bgrp",
90*f126890aSEmmanuel Vadot						"gpio0fgrp";
91*f126890aSEmmanuel Vadot					};
92*f126890aSEmmanuel Vadot				};
93*f126890aSEmmanuel Vadot				/*
94*f126890aSEmmanuel Vadot				 * gpio1dgrp cover line 28-31 otherwise used
95*f126890aSEmmanuel Vadot				 * by TVC.
96*f126890aSEmmanuel Vadot				 */
97*f126890aSEmmanuel Vadot				gpio1_default_pins: pinctrl-gpio1 {
98*f126890aSEmmanuel Vadot					mux {
99*f126890aSEmmanuel Vadot						function = "gpio1";
100*f126890aSEmmanuel Vadot						groups = "gpio1dgrp";
101*f126890aSEmmanuel Vadot					};
102*f126890aSEmmanuel Vadot				};
103*f126890aSEmmanuel Vadot			};
104*f126890aSEmmanuel Vadot		};
105*f126890aSEmmanuel Vadot
106*f126890aSEmmanuel Vadot		gpio0: gpio@4d000000 {
107*f126890aSEmmanuel Vadot			pinctrl-names = "default";
108*f126890aSEmmanuel Vadot			pinctrl-0 = <&gpio0_default_pins>;
109*f126890aSEmmanuel Vadot		};
110*f126890aSEmmanuel Vadot
111*f126890aSEmmanuel Vadot		gpio1: gpio@4e000000 {
112*f126890aSEmmanuel Vadot			pinctrl-names = "default";
113*f126890aSEmmanuel Vadot			pinctrl-0 = <&gpio1_default_pins>;
114*f126890aSEmmanuel Vadot		};
115*f126890aSEmmanuel Vadot
116*f126890aSEmmanuel Vadot		ethernet@60000000 {
117*f126890aSEmmanuel Vadot			status = "okay";
118*f126890aSEmmanuel Vadot
119*f126890aSEmmanuel Vadot			ethernet-port@0 {
120*f126890aSEmmanuel Vadot				phy-mode = "rgmii";
121*f126890aSEmmanuel Vadot				phy-handle = <&phy0>;
122*f126890aSEmmanuel Vadot			};
123*f126890aSEmmanuel Vadot			ethernet-port@1 {
124*f126890aSEmmanuel Vadot				/* Not used in this platform */
125*f126890aSEmmanuel Vadot			};
126*f126890aSEmmanuel Vadot		};
127*f126890aSEmmanuel Vadot
128*f126890aSEmmanuel Vadot		usb@68000000 {
129*f126890aSEmmanuel Vadot			status = "okay";
130*f126890aSEmmanuel Vadot		};
131*f126890aSEmmanuel Vadot
132*f126890aSEmmanuel Vadot		usb@69000000 {
133*f126890aSEmmanuel Vadot			status = "okay";
134*f126890aSEmmanuel Vadot		};
135*f126890aSEmmanuel Vadot	};
136*f126890aSEmmanuel Vadot};
137