xref: /linux/arch/arm/boot/dts/nxp/imx/imx6ull-dhcom-som-cfg-sdcard.dtsi (revision 1f20a5769446a1acae67ac9e63d07a594829a789)
1// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
2/*
3 * Copyright (C) 2023 DH electronics GmbH
4 */
5
6/*
7 * Special SoM configuration: SD card
8 *
9 * Enabled:  Micro SD card on module or
10 *           external SD card via DHCOM depends on hardware variant
11 *           GPIO H and GPIO I will be available
12 *           DHCOM UART2 will be available
13 * Disabled: WiFi and BT
14 */
15
16/*
17 * To use usdhc1 as SD card, the WiFi node must be deleted. The associated
18 * pwrseq node is also deleted in order to ensure that GPIO H is released.
19 * BT is also not available, so remove BT from the UART node.
20 */
21/delete-node/ &brcmf;
22/delete-node/ &usdhc1_pwrseq;
23/delete-node/ &bluetooth;
24
25/ {
26	aliases {
27		mmc1 = &usdhc1;
28		serial0 = &uart1;
29		serial1 = &uart2;
30		serial2 = &uart3;
31		serial3 = &uart4;
32		serial4 = &uart5;
33		serial5 = &uart6;
34	};
35
36	reg_sd1_vmmc: regulator-sd1-vmmc {
37		compatible = "regulator-fixed";
38		regulator-max-microvolt = <3300000>;
39		regulator-min-microvolt = <3300000>;
40		regulator-name = "VSD_3V3";
41	};
42};
43
44/* Micro SD card on module or external SD card via DHCOM */
45&usdhc1 {
46	/delete-property/ #address-cells;
47	/delete-property/ #size-cells;
48	/delete-property/ keep-power-in-suspend;
49	/delete-property/ mmc-pwrseq;
50	/delete-property/ non-removable;
51	/delete-property/ wakeup-source;
52	cd-gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
53	no-1-8-v;
54	pinctrl-0 = <&pinctrl_usdhc1>;
55	pinctrl-1 = <&pinctrl_usdhc1_100mhz>;
56	pinctrl-2 = <&pinctrl_usdhc1_200mhz>;
57	pinctrl-names = "default", "state_100mhz", "state_200mhz";
58	vmmc-supply = <&reg_sd1_vmmc>;
59	status = "okay";
60};
61
62&iomuxc {
63	pinctrl_usdhc1: usdhc1-grp {
64		fsl,pins = <
65			MX6UL_PAD_SD1_CMD__USDHC1_CMD		0x17059
66			MX6UL_PAD_SD1_CLK__USDHC1_CLK		0x10059
67			MX6UL_PAD_SD1_DATA0__USDHC1_DATA0	0x17059
68			MX6UL_PAD_SD1_DATA1__USDHC1_DATA1	0x17059
69			MX6UL_PAD_SD1_DATA2__USDHC1_DATA2	0x17059
70			MX6UL_PAD_SD1_DATA3__USDHC1_DATA3	0x17059
71			MX6UL_PAD_UART1_RTS_B__GPIO1_IO19	0x120b0 /* SD1 CD */
72		>;
73	};
74
75	pinctrl_usdhc1_100mhz: usdhc1-100mhz-grp {
76		fsl,pins = <
77			MX6UL_PAD_SD1_CMD__USDHC1_CMD		0x170b9
78			MX6UL_PAD_SD1_CLK__USDHC1_CLK		0x100b9
79			MX6UL_PAD_SD1_DATA0__USDHC1_DATA0	0x170b9
80			MX6UL_PAD_SD1_DATA1__USDHC1_DATA1	0x170b9
81			MX6UL_PAD_SD1_DATA2__USDHC1_DATA2	0x170b9
82			MX6UL_PAD_SD1_DATA3__USDHC1_DATA3	0x170b9
83			MX6UL_PAD_UART1_RTS_B__GPIO1_IO19	0x120b0 /* SD1 CD */
84
85		>;
86	};
87
88	pinctrl_usdhc1_200mhz: usdhc1-200mhz-grp {
89		fsl,pins = <
90			MX6UL_PAD_SD1_CMD__USDHC1_CMD		0x170f9
91			MX6UL_PAD_SD1_CLK__USDHC1_CLK		0x100f9
92			MX6UL_PAD_SD1_DATA0__USDHC1_DATA0	0x170f9
93			MX6UL_PAD_SD1_DATA1__USDHC1_DATA1	0x170f9
94			MX6UL_PAD_SD1_DATA2__USDHC1_DATA2	0x170f9
95			MX6UL_PAD_SD1_DATA3__USDHC1_DATA3	0x170f9
96			MX6UL_PAD_UART1_RTS_B__GPIO1_IO19	0x120b0 /* SD1 CD */
97		>;
98	};
99};
100