xref: /linux/scripts/dtc/include-prefixes/arm/rockchip/rk3288-veyron-sdmmc.dtsi (revision cdd5b5a9761fd66d17586e4f4ba6588c70e640ea)
1*724ba675SRob Herring// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2*724ba675SRob Herring/*
3*724ba675SRob Herring * Google Veyron (and derivatives) fragment for sdmmc cards
4*724ba675SRob Herring *
5*724ba675SRob Herring * Copyright 2015 Google, Inc
6*724ba675SRob Herring */
7*724ba675SRob Herring
8*724ba675SRob Herring/ {
9*724ba675SRob Herring	aliases {
10*724ba675SRob Herring		mmc1 = &sdmmc;
11*724ba675SRob Herring	};
12*724ba675SRob Herring};
13*724ba675SRob Herring
14*724ba675SRob Herring&io_domains {
15*724ba675SRob Herring	sdcard-supply = <&vccio_sd>;
16*724ba675SRob Herring};
17*724ba675SRob Herring
18*724ba675SRob Herring&pinctrl {
19*724ba675SRob Herring	sdmmc {
20*724ba675SRob Herring		/*
21*724ba675SRob Herring		 * We run sdmmc at max speed; bump up drive strength.
22*724ba675SRob Herring		 * We also have external pulls, so disable the internal ones.
23*724ba675SRob Herring		 */
24*724ba675SRob Herring		sdmmc_bus4: sdmmc-bus4 {
25*724ba675SRob Herring			rockchip,pins = <6 RK_PC0 1 &pcfg_pull_none_drv_8ma>,
26*724ba675SRob Herring					<6 RK_PC1 1 &pcfg_pull_none_drv_8ma>,
27*724ba675SRob Herring					<6 RK_PC2 1 &pcfg_pull_none_drv_8ma>,
28*724ba675SRob Herring					<6 RK_PC3 1 &pcfg_pull_none_drv_8ma>;
29*724ba675SRob Herring		};
30*724ba675SRob Herring
31*724ba675SRob Herring		sdmmc_clk: sdmmc-clk {
32*724ba675SRob Herring			rockchip,pins = <6 RK_PC4 1 &pcfg_pull_none_drv_8ma>;
33*724ba675SRob Herring		};
34*724ba675SRob Herring
35*724ba675SRob Herring		sdmmc_cmd: sdmmc-cmd {
36*724ba675SRob Herring			rockchip,pins = <6 RK_PC5 1 &pcfg_pull_none_drv_8ma>;
37*724ba675SRob Herring		};
38*724ba675SRob Herring
39*724ba675SRob Herring		/*
40*724ba675SRob Herring		 * Builtin CD line is hooked to ground to prevent JTAG at boot
41*724ba675SRob Herring		 * (and also to get the voltage rail correct).
42*724ba675SRob Herring		 * Configure gpio6_C6 as GPIO so dw_mmc builtin CD doesn't
43*724ba675SRob Herring		 * think there's a card inserted
44*724ba675SRob Herring		 */
45*724ba675SRob Herring		sdmmc_cd_disabled: sdmmc-cd-disabled {
46*724ba675SRob Herring			rockchip,pins = <6 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
47*724ba675SRob Herring		};
48*724ba675SRob Herring
49*724ba675SRob Herring		/* This is where we actually hook up CD */
50*724ba675SRob Herring		sdmmc_cd_pin: sdmmc-cd-pin {
51*724ba675SRob Herring			rockchip,pins = <7 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
52*724ba675SRob Herring		};
53*724ba675SRob Herring	};
54*724ba675SRob Herring};
55*724ba675SRob Herring
56*724ba675SRob Herring&rk808 {
57*724ba675SRob Herring	vcc9-supply = <&vcc_5v>;
58*724ba675SRob Herring
59*724ba675SRob Herring	regulators {
60*724ba675SRob Herring		vccio_sd: LDO_REG4 {
61*724ba675SRob Herring			regulator-name = "vccio_sd";
62*724ba675SRob Herring			regulator-min-microvolt = <1800000>;
63*724ba675SRob Herring			regulator-max-microvolt = <3300000>;
64*724ba675SRob Herring			regulator-state-mem {
65*724ba675SRob Herring				regulator-off-in-suspend;
66*724ba675SRob Herring			};
67*724ba675SRob Herring		};
68*724ba675SRob Herring
69*724ba675SRob Herring		vcc33_sd: LDO_REG5 {
70*724ba675SRob Herring			regulator-name = "vcc33_sd";
71*724ba675SRob Herring			regulator-min-microvolt = <3300000>;
72*724ba675SRob Herring			regulator-max-microvolt = <3300000>;
73*724ba675SRob Herring			regulator-state-mem {
74*724ba675SRob Herring				regulator-off-in-suspend;
75*724ba675SRob Herring			};
76*724ba675SRob Herring		};
77*724ba675SRob Herring	};
78*724ba675SRob Herring};
79*724ba675SRob Herring
80*724ba675SRob Herring&sdmmc {
81*724ba675SRob Herring	status = "okay";
82*724ba675SRob Herring
83*724ba675SRob Herring	bus-width = <4>;
84*724ba675SRob Herring	cap-mmc-highspeed;
85*724ba675SRob Herring	cap-sd-highspeed;
86*724ba675SRob Herring	card-detect-delay = <200>;
87*724ba675SRob Herring	cd-gpios = <&gpio7 RK_PA5 GPIO_ACTIVE_LOW>;
88*724ba675SRob Herring	rockchip,default-sample-phase = <90>;
89*724ba675SRob Herring	sd-uhs-sdr12;
90*724ba675SRob Herring	sd-uhs-sdr25;
91*724ba675SRob Herring	sd-uhs-sdr50;
92*724ba675SRob Herring	sd-uhs-sdr104;
93*724ba675SRob Herring	vmmc-supply = <&vcc33_sd>;
94*724ba675SRob Herring	vqmmc-supply = <&vccio_sd>;
95*724ba675SRob Herring};
96