xref: /freebsd-src/sys/contrib/device-tree/src/arm/nxp/imx/imx50-kobo-aura.dts (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0+
2f126890aSEmmanuel Vadot// Copyright 2019 Jonathan Neuschäfer
3f126890aSEmmanuel Vadot//
4f126890aSEmmanuel Vadot// The Kobo Aura e-book reader, model N514. The mainboard is marked as E606F0B.
5f126890aSEmmanuel Vadot
6f126890aSEmmanuel Vadot/dts-v1/;
7f126890aSEmmanuel Vadot#include "imx50.dtsi"
8f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h>
9f126890aSEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h>
10f126890aSEmmanuel Vadot
11f126890aSEmmanuel Vadot/ {
12f126890aSEmmanuel Vadot	model = "Kobo Aura (N514)";
13f126890aSEmmanuel Vadot	compatible = "kobo,aura", "fsl,imx50";
14f126890aSEmmanuel Vadot
15f126890aSEmmanuel Vadot	chosen {
16f126890aSEmmanuel Vadot		stdout-path = "serial1:115200n8";
17f126890aSEmmanuel Vadot	};
18f126890aSEmmanuel Vadot
19f126890aSEmmanuel Vadot	memory@70000000 {
20f126890aSEmmanuel Vadot		device_type = "memory";
21f126890aSEmmanuel Vadot		reg = <0x70000000 0x10000000>;
22f126890aSEmmanuel Vadot	};
23f126890aSEmmanuel Vadot
24f126890aSEmmanuel Vadot	gpio-leds {
25f126890aSEmmanuel Vadot		compatible = "gpio-leds";
26f126890aSEmmanuel Vadot		pinctrl-names = "default";
27f126890aSEmmanuel Vadot		pinctrl-0 = <&pinctrl_leds>;
28f126890aSEmmanuel Vadot
29f126890aSEmmanuel Vadot		led-on {
30f126890aSEmmanuel Vadot			label = "kobo_aura:orange:on";
31f126890aSEmmanuel Vadot			gpios = <&gpio6 24 GPIO_ACTIVE_LOW>;
32f126890aSEmmanuel Vadot			panic-indicator;
33f126890aSEmmanuel Vadot		};
34f126890aSEmmanuel Vadot	};
35f126890aSEmmanuel Vadot
36f126890aSEmmanuel Vadot	gpio-keys {
37f126890aSEmmanuel Vadot		compatible = "gpio-keys";
38f126890aSEmmanuel Vadot		pinctrl-names = "default";
39f126890aSEmmanuel Vadot		pinctrl-0 = <&pinctrl_gpiokeys>;
40f126890aSEmmanuel Vadot
41f126890aSEmmanuel Vadot		key-power {
42f126890aSEmmanuel Vadot			label = "Power Button";
43f126890aSEmmanuel Vadot			gpios = <&gpio4 10 GPIO_ACTIVE_LOW>;
44f126890aSEmmanuel Vadot			linux,code = <KEY_POWER>;
45f126890aSEmmanuel Vadot		};
46f126890aSEmmanuel Vadot
47f126890aSEmmanuel Vadot		event-hallsensor {
48f126890aSEmmanuel Vadot			label = "Hallsensor";
49f126890aSEmmanuel Vadot			gpios = <&gpio5 15 GPIO_ACTIVE_LOW>;
50f126890aSEmmanuel Vadot			linux,code = <KEY_RESERVED>;
51f126890aSEmmanuel Vadot			linux,input-type = <EV_SW>;
52f126890aSEmmanuel Vadot		};
53f126890aSEmmanuel Vadot
54f126890aSEmmanuel Vadot		event-frontlight {
55f126890aSEmmanuel Vadot			label = "Frontlight";
56f126890aSEmmanuel Vadot			gpios = <&gpio4 1 GPIO_ACTIVE_LOW>;
57f126890aSEmmanuel Vadot			linux,code = <KEY_DISPLAYTOGGLE>;
58f126890aSEmmanuel Vadot		};
59f126890aSEmmanuel Vadot	};
60f126890aSEmmanuel Vadot
61f126890aSEmmanuel Vadot	sd2_pwrseq: pwrseq {
62f126890aSEmmanuel Vadot		compatible = "mmc-pwrseq-simple";
63f126890aSEmmanuel Vadot		pinctrl-names = "default";
64f126890aSEmmanuel Vadot		pinctrl-0 = <&pinctrl_sd2_reset>;
65f126890aSEmmanuel Vadot		reset-gpios = <&gpio4 17 GPIO_ACTIVE_LOW>;
66f126890aSEmmanuel Vadot	};
67f126890aSEmmanuel Vadot
68f126890aSEmmanuel Vadot	sd2_vmmc: gpio-regulator {
69f126890aSEmmanuel Vadot		compatible = "regulator-gpio";
70f126890aSEmmanuel Vadot		pinctrl-names = "default";
71f126890aSEmmanuel Vadot		pinctrl-0 = <&pinctrl_sd2_vmmc>;
72f126890aSEmmanuel Vadot		regulator-name = "vmmc";
73f126890aSEmmanuel Vadot		states = <3300000 0>;
74f126890aSEmmanuel Vadot		regulator-min-microvolt = <3300000>;
75f126890aSEmmanuel Vadot		regulator-max-microvolt = <3300000>;
76*aa1a8ff2SEmmanuel Vadot		enable-gpios = <&gpio4 12 GPIO_ACTIVE_LOW>;
77f126890aSEmmanuel Vadot		startup-delay-us = <100000>;
78f126890aSEmmanuel Vadot	};
79f126890aSEmmanuel Vadot};
80f126890aSEmmanuel Vadot
81f126890aSEmmanuel Vadot&esdhc1 {
82f126890aSEmmanuel Vadot	pinctrl-names = "default";
83f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_sd1>;
84f126890aSEmmanuel Vadot	max-frequency = <50000000>;
85f126890aSEmmanuel Vadot	bus-width = <4>;
86f126890aSEmmanuel Vadot	cd-gpios = <&gpio5 17 GPIO_ACTIVE_LOW>;
87f126890aSEmmanuel Vadot	disable-wp;
88f126890aSEmmanuel Vadot	status = "okay";
89f126890aSEmmanuel Vadot
90f126890aSEmmanuel Vadot	/* External µSD card */
91f126890aSEmmanuel Vadot};
92f126890aSEmmanuel Vadot
93f126890aSEmmanuel Vadot&esdhc2 {
94f126890aSEmmanuel Vadot	pinctrl-names = "default";
95f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_sd2>;
96f126890aSEmmanuel Vadot	bus-width = <4>;
97f126890aSEmmanuel Vadot	max-frequency = <50000000>;
98f126890aSEmmanuel Vadot	disable-wp;
99f126890aSEmmanuel Vadot	mmc-pwrseq = <&sd2_pwrseq>;
100f126890aSEmmanuel Vadot	vmmc-supply = <&sd2_vmmc>;
101f126890aSEmmanuel Vadot	status = "okay";
102f126890aSEmmanuel Vadot
103f126890aSEmmanuel Vadot	/* CyberTan WC121 SDIO WiFi (BCM43362) */
104f126890aSEmmanuel Vadot};
105f126890aSEmmanuel Vadot
106f126890aSEmmanuel Vadot&esdhc3 {
107f126890aSEmmanuel Vadot	pinctrl-names = "default";
108f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_sd3>;
109f126890aSEmmanuel Vadot	bus-width = <8>;
110f126890aSEmmanuel Vadot	non-removable;
111f126890aSEmmanuel Vadot	max-frequency = <50000000>;
112f126890aSEmmanuel Vadot	disable-wp;
113f126890aSEmmanuel Vadot	status = "okay";
114f126890aSEmmanuel Vadot
115f126890aSEmmanuel Vadot	/* Internal eMMC */
116f126890aSEmmanuel Vadot};
117f126890aSEmmanuel Vadot
118f126890aSEmmanuel Vadot&i2c1 {
119f126890aSEmmanuel Vadot	pinctrl-names = "default";
120f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_i2c1>;
121f126890aSEmmanuel Vadot	status = "okay";
122f126890aSEmmanuel Vadot
123f126890aSEmmanuel Vadot	touchscreen@15 {
124f126890aSEmmanuel Vadot		reg = <0x15>;
125f126890aSEmmanuel Vadot		compatible = "elan,ektf2132";
126f126890aSEmmanuel Vadot		pinctrl-names = "default";
127f126890aSEmmanuel Vadot		pinctrl-0 = <&pinctrl_ts>;
128f126890aSEmmanuel Vadot		power-gpios = <&gpio4 9 GPIO_ACTIVE_HIGH>;
129f126890aSEmmanuel Vadot		interrupts-extended = <&gpio5 13 IRQ_TYPE_EDGE_FALLING>;
130f126890aSEmmanuel Vadot	};
131f126890aSEmmanuel Vadot};
132f126890aSEmmanuel Vadot
133f126890aSEmmanuel Vadot&i2c2 {
134f126890aSEmmanuel Vadot	pinctrl-names = "default";
135f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_i2c2>;
136f126890aSEmmanuel Vadot	status = "okay";
137f126890aSEmmanuel Vadot
138f126890aSEmmanuel Vadot	/* TODO: TPS65185 PMIC for E Ink at 0x68 */
139f126890aSEmmanuel Vadot};
140f126890aSEmmanuel Vadot
141f126890aSEmmanuel Vadot&i2c3 {
142f126890aSEmmanuel Vadot	pinctrl-names = "default";
143f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_i2c3>;
144f126890aSEmmanuel Vadot	status = "okay";
145f126890aSEmmanuel Vadot
146f126890aSEmmanuel Vadot	embedded-controller@43 {
147f126890aSEmmanuel Vadot		pinctrl-names = "default";
148f126890aSEmmanuel Vadot		pinctrl-0 = <&pinctrl_ec>;
149f126890aSEmmanuel Vadot		compatible = "netronix,ntxec";
150f126890aSEmmanuel Vadot		reg = <0x43>;
151f126890aSEmmanuel Vadot		system-power-controller;
152f126890aSEmmanuel Vadot		interrupts-extended = <&gpio4 11 IRQ_TYPE_EDGE_FALLING>;
153f126890aSEmmanuel Vadot		#pwm-cells = <2>;
154f126890aSEmmanuel Vadot	};
155f126890aSEmmanuel Vadot};
156f126890aSEmmanuel Vadot
157f126890aSEmmanuel Vadot&iomuxc {
158f126890aSEmmanuel Vadot	pinctrl_ec: ecgrp {
159f126890aSEmmanuel Vadot		fsl,pins = <
160f126890aSEmmanuel Vadot			MX50_PAD_CSPI_SS0__GPIO4_11		0x0	/* INT */
161f126890aSEmmanuel Vadot		>;
162f126890aSEmmanuel Vadot	};
163f126890aSEmmanuel Vadot
164f126890aSEmmanuel Vadot	pinctrl_gpiokeys: gpiokeysgrp {
165f126890aSEmmanuel Vadot		fsl,pins = <
166f126890aSEmmanuel Vadot			MX50_PAD_CSPI_MISO__GPIO4_10		0x0
167f126890aSEmmanuel Vadot			MX50_PAD_SD2_D7__GPIO5_15		0x0
168f126890aSEmmanuel Vadot			MX50_PAD_KEY_ROW0__GPIO4_1		0x0
169f126890aSEmmanuel Vadot		>;
170f126890aSEmmanuel Vadot	};
171f126890aSEmmanuel Vadot
172f126890aSEmmanuel Vadot	pinctrl_i2c1: i2c1grp {
173f126890aSEmmanuel Vadot		fsl,pins = <
174f126890aSEmmanuel Vadot			MX50_PAD_I2C1_SCL__I2C1_SCL		0x400001fd
175f126890aSEmmanuel Vadot			MX50_PAD_I2C1_SDA__I2C1_SDA		0x400001fd
176f126890aSEmmanuel Vadot		>;
177f126890aSEmmanuel Vadot	};
178f126890aSEmmanuel Vadot
179f126890aSEmmanuel Vadot	pinctrl_i2c2: i2c2grp {
180f126890aSEmmanuel Vadot		fsl,pins = <
181f126890aSEmmanuel Vadot			MX50_PAD_I2C2_SCL__I2C2_SCL		0x400001fd
182f126890aSEmmanuel Vadot			MX50_PAD_I2C2_SDA__I2C2_SDA		0x400001fd
183f126890aSEmmanuel Vadot		>;
184f126890aSEmmanuel Vadot	};
185f126890aSEmmanuel Vadot
186f126890aSEmmanuel Vadot	pinctrl_i2c3: i2c3grp {
187f126890aSEmmanuel Vadot		fsl,pins = <
188f126890aSEmmanuel Vadot			MX50_PAD_I2C3_SCL__I2C3_SCL		0x400001fd
189f126890aSEmmanuel Vadot			MX50_PAD_I2C3_SDA__I2C3_SDA		0x400001fd
190f126890aSEmmanuel Vadot		>;
191f126890aSEmmanuel Vadot	};
192f126890aSEmmanuel Vadot
193f126890aSEmmanuel Vadot	pinctrl_leds: ledsgrp {
194f126890aSEmmanuel Vadot		fsl,pins = <
195f126890aSEmmanuel Vadot			MX50_PAD_PWM1__GPIO6_24			0x0
196f126890aSEmmanuel Vadot		>;
197f126890aSEmmanuel Vadot	};
198f126890aSEmmanuel Vadot
199f126890aSEmmanuel Vadot	pinctrl_sd1: sd1grp {
200f126890aSEmmanuel Vadot		fsl,pins = <
201f126890aSEmmanuel Vadot			MX50_PAD_SD1_CMD__ESDHC1_CMD		0x1e4
202f126890aSEmmanuel Vadot			MX50_PAD_SD1_CLK__ESDHC1_CLK		0xd4
203f126890aSEmmanuel Vadot			MX50_PAD_SD1_D0__ESDHC1_DAT0		0x1d4
204f126890aSEmmanuel Vadot			MX50_PAD_SD1_D1__ESDHC1_DAT1		0x1d4
205f126890aSEmmanuel Vadot			MX50_PAD_SD1_D2__ESDHC1_DAT2		0x1d4
206f126890aSEmmanuel Vadot			MX50_PAD_SD1_D3__ESDHC1_DAT3		0x1d4
207f126890aSEmmanuel Vadot
208f126890aSEmmanuel Vadot			MX50_PAD_SD2_CD__GPIO5_17		0x0
209f126890aSEmmanuel Vadot		>;
210f126890aSEmmanuel Vadot	};
211f126890aSEmmanuel Vadot
212f126890aSEmmanuel Vadot	pinctrl_sd2: sd2grp {
213f126890aSEmmanuel Vadot		fsl,pins = <
214f126890aSEmmanuel Vadot			MX50_PAD_SD2_CMD__ESDHC2_CMD		0x1e4
215f126890aSEmmanuel Vadot			MX50_PAD_SD2_CLK__ESDHC2_CLK		0xd4
216f126890aSEmmanuel Vadot			MX50_PAD_SD2_D0__ESDHC2_DAT0		0x1d4
217f126890aSEmmanuel Vadot			MX50_PAD_SD2_D1__ESDHC2_DAT1		0x1d4
218f126890aSEmmanuel Vadot			MX50_PAD_SD2_D2__ESDHC2_DAT2		0x1d4
219f126890aSEmmanuel Vadot			MX50_PAD_SD2_D3__ESDHC2_DAT3		0x1d4
220f126890aSEmmanuel Vadot		>;
221f126890aSEmmanuel Vadot	};
222f126890aSEmmanuel Vadot
223f126890aSEmmanuel Vadot	pinctrl_sd2_reset: sd2-resetgrp {
224f126890aSEmmanuel Vadot		fsl,pins = <
225f126890aSEmmanuel Vadot			MX50_PAD_ECSPI2_MOSI__GPIO4_17		0x0
226f126890aSEmmanuel Vadot		>;
227f126890aSEmmanuel Vadot	};
228f126890aSEmmanuel Vadot
229f126890aSEmmanuel Vadot	pinctrl_sd2_vmmc: sd2-vmmcgrp {
230f126890aSEmmanuel Vadot		fsl,pins = <
231f126890aSEmmanuel Vadot			MX50_PAD_ECSPI1_SCLK__GPIO4_12		0x0
232f126890aSEmmanuel Vadot		>;
233f126890aSEmmanuel Vadot	};
234f126890aSEmmanuel Vadot
235f126890aSEmmanuel Vadot	pinctrl_sd3: sd3grp {
236f126890aSEmmanuel Vadot		fsl,pins = <
237f126890aSEmmanuel Vadot			MX50_PAD_SD3_CMD__ESDHC3_CMD		0x1e4
238f126890aSEmmanuel Vadot			MX50_PAD_SD3_CLK__ESDHC3_CLK		0xd4
239f126890aSEmmanuel Vadot			MX50_PAD_SD3_D0__ESDHC3_DAT0		0x1d4
240f126890aSEmmanuel Vadot			MX50_PAD_SD3_D1__ESDHC3_DAT1		0x1d4
241f126890aSEmmanuel Vadot			MX50_PAD_SD3_D2__ESDHC3_DAT2		0x1d4
242f126890aSEmmanuel Vadot			MX50_PAD_SD3_D3__ESDHC3_DAT3		0x1d4
243f126890aSEmmanuel Vadot			MX50_PAD_SD3_D4__ESDHC3_DAT4		0x1d4
244f126890aSEmmanuel Vadot			MX50_PAD_SD3_D5__ESDHC3_DAT5		0x1d4
245f126890aSEmmanuel Vadot			MX50_PAD_SD3_D6__ESDHC3_DAT6		0x1d4
246f126890aSEmmanuel Vadot			MX50_PAD_SD3_D7__ESDHC3_DAT7		0x1d4
247f126890aSEmmanuel Vadot		>;
248f126890aSEmmanuel Vadot	};
249f126890aSEmmanuel Vadot
250f126890aSEmmanuel Vadot	pinctrl_ts: tsgrp {
251f126890aSEmmanuel Vadot		fsl,pins = <
252f126890aSEmmanuel Vadot			MX50_PAD_CSPI_MOSI__GPIO4_9		0x0
253f126890aSEmmanuel Vadot			MX50_PAD_SD2_D5__GPIO5_13		0x0
254f126890aSEmmanuel Vadot		>;
255f126890aSEmmanuel Vadot	};
256f126890aSEmmanuel Vadot
257f126890aSEmmanuel Vadot	pinctrl_uart2: uart2grp {
258f126890aSEmmanuel Vadot		fsl,pins = <
259f126890aSEmmanuel Vadot			MX50_PAD_UART2_TXD__UART2_TXD_MUX	0x1e4
260f126890aSEmmanuel Vadot			MX50_PAD_UART2_RXD__UART2_RXD_MUX	0x1e4
261f126890aSEmmanuel Vadot		>;
262f126890aSEmmanuel Vadot	};
263f126890aSEmmanuel Vadot
264f126890aSEmmanuel Vadot	pinctrl_usbphy: usbphygrp {
265f126890aSEmmanuel Vadot		fsl,pins = <
266f126890aSEmmanuel Vadot			MX50_PAD_ECSPI2_SS0__GPIO4_19		0x0
267f126890aSEmmanuel Vadot		>;
268f126890aSEmmanuel Vadot	};
269f126890aSEmmanuel Vadot};
270f126890aSEmmanuel Vadot
271f126890aSEmmanuel Vadot&uart2 {
272f126890aSEmmanuel Vadot	pinctrl-names = "default";
273f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_uart2>;
274f126890aSEmmanuel Vadot	status = "okay";
275f126890aSEmmanuel Vadot};
276f126890aSEmmanuel Vadot
277f126890aSEmmanuel Vadot&usbotg {
278f126890aSEmmanuel Vadot	phy_type = "utmi_wide";
279f126890aSEmmanuel Vadot	dr_mode = "peripheral";
280f126890aSEmmanuel Vadot	status = "okay";
281f126890aSEmmanuel Vadot};
282f126890aSEmmanuel Vadot
283f126890aSEmmanuel Vadot&usbphy0 {
284f126890aSEmmanuel Vadot	pinctrl-names = "default";
285f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_usbphy>;
286f126890aSEmmanuel Vadot	vbus-detect-gpio = <&gpio4 19 GPIO_ACTIVE_LOW>;
287f126890aSEmmanuel Vadot};
288