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