xref: /freebsd/sys/contrib/device-tree/src/arm/nxp/imx/imx6ull-dhcom-som-cfg-sdcard.dtsi (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
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.
18 * BT is also not available, so remove BT from the UART node.
19 */
20/delete-node/ &brcmf;
21/delete-node/ &bluetooth;
22
23/ {
24	aliases {
25		mmc1 = &usdhc1;
26		serial0 = &uart1;
27		serial1 = &uart2;
28		serial2 = &uart3;
29		serial3 = &uart4;
30		serial4 = &uart5;
31		serial5 = &uart6;
32	};
33
34	reg_sd1_vmmc: regulator-sd1-vmmc {
35		compatible = "regulator-fixed";
36		regulator-max-microvolt = <3300000>;
37		regulator-min-microvolt = <3300000>;
38		regulator-name = "VSD_3V3";
39	};
40};
41
42/* Micro SD card on module or external SD card via DHCOM */
43&usdhc1 {
44	/delete-property/ #address-cells;
45	/delete-property/ #size-cells;
46	/delete-property/ keep-power-in-suspend;
47	/delete-property/ mmc-pwrseq;
48	/delete-property/ non-removable;
49	/delete-property/ wakeup-source;
50	cd-gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
51	no-1-8-v;
52	pinctrl-0 = <&pinctrl_usdhc1>;
53	pinctrl-1 = <&pinctrl_usdhc1_100mhz>;
54	pinctrl-2 = <&pinctrl_usdhc1_200mhz>;
55	pinctrl-names = "default", "state_100mhz", "state_200mhz";
56	vmmc-supply = <&reg_sd1_vmmc>;
57	status = "okay";
58};
59
60&iomuxc {
61	pinctrl_usdhc1: usdhc1-grp {
62		fsl,pins = <
63			MX6UL_PAD_SD1_CMD__USDHC1_CMD		0x17059
64			MX6UL_PAD_SD1_CLK__USDHC1_CLK		0x10059
65			MX6UL_PAD_SD1_DATA0__USDHC1_DATA0	0x17059
66			MX6UL_PAD_SD1_DATA1__USDHC1_DATA1	0x17059
67			MX6UL_PAD_SD1_DATA2__USDHC1_DATA2	0x17059
68			MX6UL_PAD_SD1_DATA3__USDHC1_DATA3	0x17059
69			MX6UL_PAD_UART1_RTS_B__GPIO1_IO19	0x120b0 /* SD1 CD */
70		>;
71	};
72
73	pinctrl_usdhc1_100mhz: usdhc1-100mhz-grp {
74		fsl,pins = <
75			MX6UL_PAD_SD1_CMD__USDHC1_CMD		0x170b9
76			MX6UL_PAD_SD1_CLK__USDHC1_CLK		0x100b9
77			MX6UL_PAD_SD1_DATA0__USDHC1_DATA0	0x170b9
78			MX6UL_PAD_SD1_DATA1__USDHC1_DATA1	0x170b9
79			MX6UL_PAD_SD1_DATA2__USDHC1_DATA2	0x170b9
80			MX6UL_PAD_SD1_DATA3__USDHC1_DATA3	0x170b9
81			MX6UL_PAD_UART1_RTS_B__GPIO1_IO19	0x120b0 /* SD1 CD */
82
83		>;
84	};
85
86	pinctrl_usdhc1_200mhz: usdhc1-200mhz-grp {
87		fsl,pins = <
88			MX6UL_PAD_SD1_CMD__USDHC1_CMD		0x170f9
89			MX6UL_PAD_SD1_CLK__USDHC1_CLK		0x100f9
90			MX6UL_PAD_SD1_DATA0__USDHC1_DATA0	0x170f9
91			MX6UL_PAD_SD1_DATA1__USDHC1_DATA1	0x170f9
92			MX6UL_PAD_SD1_DATA2__USDHC1_DATA2	0x170f9
93			MX6UL_PAD_SD1_DATA3__USDHC1_DATA3	0x170f9
94			MX6UL_PAD_UART1_RTS_B__GPIO1_IO19	0x120b0 /* SD1 CD */
95		>;
96	};
97};
98