mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-06 05:04:26 +00:00
bab972948e
The ROC-RK3328-CC from Firefly and Libre Computer Project is a credit card size development board based on the Rockchip RK3328 SoC, with: - 1/2/4 GB DDR4 DRAM - eMMC connector for optional module - micro SD card slot - 1 x USB 3.0 host port - 2 x USB 2.0 host port - 1 x USB 2.0 OTG port - HDMI video output - TRRS connector with audio and composite video output - gigabit Ethernet - consumer IR receiver - debug UART pins The ROC-RK3328-CC has the enable pin of the SD card power switch tied to GPIO_0_D6. This pin also has the function SDMMC0_PWREN, which is muxed by default. SDMMC0_PWREN is an active high signal controlled by the MMC controller, however the switch enable is active low, and pulled low (enabled) by default to make things work on boot. As such, we need to mux away from SDMMC0_PWREN and use GPIO to enable power to the card. The default GPIO state for the pin is pull-down and input, which doesn't require extra configuration when paired with the external pull-down and active low switch. Deal with this by enabling regulator support in SPL, and setting "u-boot,dm-spl" for the regulator and other device nodes needed for muxing the pin. The device tree file is synced from the Linux kernel next-20200324. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
47 lines
844 B
Text
47 lines
844 B
Text
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* (C) Copyright 2018-2019 Rockchip Electronics Co., Ltd
|
|
*/
|
|
|
|
#include "rk3328-u-boot.dtsi"
|
|
#include "rk3328-sdram-ddr4-666.dtsi"
|
|
/ {
|
|
chosen {
|
|
u-boot,spl-boot-order = "same-as-spl", &sdmmc, &emmc;
|
|
};
|
|
};
|
|
|
|
&gpio0 {
|
|
u-boot,dm-spl;
|
|
};
|
|
|
|
&pinctrl {
|
|
u-boot,dm-spl;
|
|
};
|
|
|
|
&sdmmc0m1_gpio {
|
|
u-boot,dm-spl;
|
|
};
|
|
|
|
&pcfg_pull_up_4ma {
|
|
u-boot,dm-spl;
|
|
};
|
|
|
|
&usb_host0_xhci {
|
|
vbus-supply = <&vcc_host1_5v>;
|
|
status = "okay";
|
|
};
|
|
|
|
/*
|
|
* This makes XHCI responsible for toggling VBUS. This is needed to work
|
|
* around an issue where either XHCI only works with USB 2.0 or OTG doesn't
|
|
* work, depending on how VBUS is configured. Having USB 3.0 seems better.
|
|
*/
|
|
&vcc_host1_5v {
|
|
/delete-property/ regulator-always-on;
|
|
};
|
|
|
|
/* Need this and all the pinctrl/gpio stuff above to set pinmux */
|
|
&vcc_sd {
|
|
u-boot,dm-spl;
|
|
};
|