xref: /freebsd/sys/contrib/device-tree/src/arm/st/ste-nomadik-s8815.dts (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Device Tree for the ST-Ericsson Nomadik S8815 board
4 * Produced by Calao Systems
5 */
6
7/dts-v1/;
8#include <dt-bindings/interrupt-controller/irq.h>
9#include "ste-nomadik-stn8815.dtsi"
10
11/ {
12	model = "Calao Systems USB-S8815";
13	compatible = "calaosystems,usb-s8815";
14
15	chosen {
16		bootargs = "root=/dev/ram0 console=ttyAMA1,115200n8 earlyprintk";
17	};
18
19	aliases {
20		serial0 = &uart0;
21		serial1 = &uart1;
22	};
23
24	gpio3: gpio@101e7000 {
25		/* This hog will bias the MMC/SD card detect line */
26		mmcsd-gpio {
27			gpio-hog;
28			gpios = <16 0x0>;
29			output-low;
30			line-name = "card detect bias";
31		};
32	};
33
34	src@101e0000 {
35		/* These chrystal drivers are not used on this board */
36		disable-sxtalo;
37		disable-mxtalo;
38	};
39
40	pinctrl {
41		/* Hog CD pins */
42		pinctrl-names = "default";
43		pinctrl-0 = <&cd_default_mode>;
44
45		uart0 {
46			/* Only use RX/TX pins */
47			uart0_s8815_mode: uart0_mux {
48				u0_default_mux {
49					function = "u0";
50					groups = "u0txrx_a_1";
51				};
52			};
53		};
54		mmcsd-cd {
55			cd_default_mode: cd_default {
56				cd_default_cfg1 {
57					/* CD input GPIO */
58					pins = "GPIO111_H21";
59					ste,input = <0>;
60				};
61				cd_default_cfg2 {
62					/* CD GPIO biasing */
63					pins = "GPIO112_J21";
64					ste,output = <0>;
65				};
66			};
67		};
68		gpioi2c {
69			gpioi2c_default_mode: gpioi2c_default {
70				gpioi2c_default_cfg {
71					pins = "GPIO73_C21", "GPIO74_C20";
72					ste,input = <0>;
73				};
74			};
75		};
76		user-led {
77			user_led_default_mode: user_led_default {
78				user_led_default_cfg {
79					pins = "GPIO2_C5";
80					ste,output = <1>;
81				};
82			};
83		};
84		user-button {
85			user_button_default_mode: user_button_default {
86				user_button_default_cfg {
87					pins = "GPIO3_A4";
88					ste,input = <0>;
89				};
90			};
91		};
92	};
93
94	/* Ethernet */
95	external-bus@34000000 {
96		compatible = "simple-bus";
97		reg = <0x34000000 0x1000000>;
98		#address-cells = <1>;
99		#size-cells = <1>;
100		ranges = <0 0x34000000 0x1000000>;
101		ethernet@300 {
102			compatible = "smsc,lan91c111";
103			reg = <0x300 0x0fd00>;
104			interrupt-parent = <&gpio3>;
105			interrupts = <8 IRQ_TYPE_EDGE_RISING>;
106		};
107	};
108
109	i2c1 {
110		lis3lv02dl@1d {
111			/* Accelerometer */
112			compatible = "st,lis3lv02dl-accel";
113			reg = <0x1d>;
114		};
115	};
116
117	/* GPIO I2C connected to the USB portions of the STw4811 only */
118	gpio-i2c {
119		compatible = "i2c-gpio";
120		gpios = <&gpio2 10 0>, /* sda */
121			<&gpio2 9 0>; /* scl */
122		#address-cells = <1>;
123		#size-cells = <0>;
124		pinctrl-names = "default";
125		pinctrl-0 = <&gpioi2c_default_mode>;
126
127		stw4811@2d {
128			   compatible = "st,stw4811-usb";
129			   reg = <0x2d>;
130		};
131	};
132
133
134	amba {
135		/* Activate RXTX on UART 0 */
136		uart0: serial@101fd000 {
137			pinctrl-names = "default";
138			pinctrl-0 = <&uart0_s8815_mode>;
139			status = "okay";
140		};
141		/* Configure card detect for the uSD slot */
142		mmc@101f6000 {
143			cd-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>;
144		};
145	};
146
147	/* The user LED on the board is set up to be used for heartbeat */
148	leds {
149		compatible = "gpio-leds";
150		user-led {
151			label = "user_led";
152			gpios = <&gpio0 2 0x1>;
153			default-state = "off";
154			linux,default-trigger = "heartbeat";
155			pinctrl-names = "default";
156			pinctrl-0 = <&user_led_default_mode>;
157		};
158	};
159
160	/* User key mapped in as "escape" */
161	gpio-keys {
162		compatible = "gpio-keys";
163		user-button {
164			label = "user_button";
165			gpios = <&gpio0 3 0x1>;
166			linux,code = <1>; /* KEY_ESC */
167			wakeup-source;
168			pinctrl-names = "default";
169			pinctrl-0 = <&user_button_default_mode>;
170		};
171	};
172};
173