xref: /linux/scripts/dtc/include-prefixes/arm/gemini/gemini-verbatim-s08v1901-d1.dts (revision b2128290c29902315e632ea59e0504d6bc9e9b42)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Device Tree file for the Verbatim S08V1901-D1
4 * on product packaging called "Verbatim Gigabit Ethernet Hard Drive"
5 */
6
7/dts-v1/;
8
9#include "gemini.dtsi"
10#include <dt-bindings/leds/common.h>
11#include <dt-bindings/input/input.h>
12
13/ {
14	model = "Verbatim Gigabit Ethernet Hard Drive S08V1901-D1";
15	compatible = "verbatim,s08v1901-d1", "cortina,gemini";
16	#address-cells = <1>;
17	#size-cells = <1>;
18
19	memory@0 {
20		/* 64MB SDRAM in 2 x Hynix HY5DU561622ETP-D43 */
21		device_type = "memory";
22		reg = <0x00000000 0x4000000>;
23	};
24
25	chosen {
26		bootargs = "console=ttyS0,19200n8 root=/dev/sda1 rw rootwait";
27		stdout-path = &uart0;
28	};
29
30	gpio_keys {
31		compatible = "gpio-keys";
32
33		button-reset {
34			debounce-interval = <50>;
35			wakeup-source;
36			linux,code = <KEY_RESTART>;
37			label = "reset";
38			gpios = <&gpio1 31 GPIO_ACTIVE_LOW>;
39		};
40	};
41
42	leds {
43		compatible = "gpio-leds";
44		led-green-harddisk {
45			function = LED_FUNCTION_DISK_ACTIVITY;
46			color = <LED_COLOR_ID_GREEN>;
47			gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
48			default-state = "off";
49			linux,default-trigger = "disk-activity";
50		};
51	};
52
53	/*
54	 * Fan control candidates: gpio0 10, gpio1 28
55	 */
56
57	mdio0: mdio {
58		compatible = "virtual,mdio-gpio";
59		/* Uses MDC and MDIO */
60		gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
61			<&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
62		#address-cells = <1>;
63		#size-cells = <0>;
64
65		/* This is a Realtek RTL8211CL ethernet PHY */
66		phy0: ethernet-phy@1 {
67			reg = <1>;
68		};
69	};
70
71	/*
72	 * I haven't found a way to control the fan, it appears to be
73	 * always on.
74	 */
75	thermal-zones {
76		chassis-thermal {
77			/* Poll every 20 seconds */
78			polling-delay = <20000>;
79			/* Poll every 2nd second when cooling */
80			polling-delay-passive = <2000>;
81			/*  Use the thermal sensor in the hard drive */
82			thermal-sensors = <&drive0>;
83
84			/* Tripping points from the fan.script in the rootfs */
85			trips {
86				alert: chassis-alert {
87					/* At 43 degrees turn on the fan */
88					temperature = <43000>;
89					hysteresis = <3000>;
90					type = "active";
91				};
92				crit: chassis-crit {
93					/* Just shut down at 60 degrees */
94					temperature = <60000>;
95					hysteresis = <2000>;
96					type = "critical";
97				};
98			};
99		};
100	};
101
102	soc {
103		flash@30000000 {
104			/*
105			 * This is a Spansion S29GL128P11TFI01 852FB245 A
106			 * 128Mbit (16MB) Flash memory.
107			 */
108			status = "okay";
109			reg = <0x30000000 0x01000000>;
110
111			partitions {
112				compatible = "redboot-fis";
113				/* Eraseblock at 0xfe0000 */
114				fis-index-block = <0x7f>;
115			};
116		};
117
118		syscon: syscon@40000000 {
119			pinctrl {
120				/*
121				 * gpio0agrp cover line 0-4 as line 1 is used for the LED
122				 * gpio0hgrp cover line 21, 22 used by MDIO for Marvell PHY
123				 */
124				gpio0_default_pins: pinctrl-gpio0 {
125					mux {
126						function = "gpio0";
127						groups = "gpio0agrp", "gpio0hgrp";
128					};
129				};
130				gpio1_default_pins: pinctrl-gpio1 {
131					/*
132					 * Free up the TVC pins at GPIO1 offset 28,29,30,31
133					 * line 31 is used for reset key
134					 */
135					mux {
136						function = "gpio1";
137						groups = "gpio1dgrp";
138					};
139				};
140				pinctrl-gmii {
141					mux {
142						function = "gmii";
143						groups = "gmii_gmac0_grp";
144					};
145					/* TODO: investigate vendor registers on boot */
146					conf0 {
147						pins = "V8 GMAC0 RXDV";
148						skew-delay = <0>;
149					};
150					conf1 {
151						pins = "Y7 GMAC0 RXC";
152						skew-delay = <15>;
153					};
154					conf2 {
155						pins = "T8 GMAC0 TXEN";
156						skew-delay = <7>;
157					};
158					conf3 {
159						pins = "U8 GMAC0 TXC";
160						skew-delay = <10>;
161					};
162					conf4 {
163						/* The data lines all have default skew */
164						pins = "W8 GMAC0 RXD0", "V9 GMAC0 RXD1",
165						       "Y8 GMAC0 RXD2", "U9 GMAC0 RXD3",
166						       "T7 GMAC0 TXD0", "U6 GMAC0 TXD1",
167						       "V7 GMAC0 TXD2", "U7 GMAC0 TXD3";
168						skew-delay = <7>;
169					};
170				};
171			};
172		};
173
174		/* Both interfaces brought out on SATA connectors */
175		sata: sata@46000000 {
176			cortina,gemini-ata-muxmode = <0>;
177			cortina,gemini-enable-sata-bridge;
178			status = "okay";
179		};
180
181		gpio0: gpio@4d000000 {
182			pinctrl-names = "default";
183			pinctrl-0 = <&gpio0_default_pins>;
184		};
185
186		gpio1: gpio@4e000000 {
187			pinctrl-names = "default";
188			pinctrl-0 = <&gpio1_default_pins>;
189		};
190
191		ethernet@60000000 {
192			status = "okay";
193
194			ethernet-port@0 {
195				phy-mode = "rgmii";
196				phy-handle = <&phy0>;
197			};
198		};
199
200		ide@63000000 {
201			status = "okay";
202			/*
203			 * This drive may have a temperature sensor with a
204			 * thermal zone we can use for thermal control of the
205			 * chassis temperature using the fan.
206			 */
207			drive0: ide-port@0 {
208				reg = <0>;
209				#thermal-sensor-cells = <0>;
210			};
211		};
212
213		ide@63400000 {
214			status = "okay";
215		};
216
217		usb@68000000 {
218			status = "okay";
219		};
220
221		usb@69000000 {
222			status = "okay";
223		};
224	};
225};
226