mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-14 21:06:01 +01:00
board: stm32pm1: add stm32mp13 board support
Add stm32mp15x prefix to all STM32MP15x board specific functions, this patch is a preliminary step for STM32MP13x support. This patch also adds the RCC probe to avoid circular access with usbphyc probe as clk provider. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
This commit is contained in:
parent
cf1d0fd4c1
commit
ae3e2c2bf7
@ -554,8 +554,7 @@ static void sysconf_init(void)
|
|||||||
clrbits_le32(syscfg + SYSCFG_CMPCR, SYSCFG_CMPCR_SW_CTRL);
|
clrbits_le32(syscfg + SYSCFG_CMPCR, SYSCFG_CMPCR_SW_CTRL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fix to make I2C1 usable on DK2 for touchscreen usage in kernel */
|
static int board_stm32mp15x_dk2_init(void)
|
||||||
static int dk2_i2c1_fix(void)
|
|
||||||
{
|
{
|
||||||
ofnode node;
|
ofnode node;
|
||||||
struct gpio_desc hdmi, audio;
|
struct gpio_desc hdmi, audio;
|
||||||
@ -564,6 +563,7 @@ static int dk2_i2c1_fix(void)
|
|||||||
if (!IS_ENABLED(CONFIG_DM_REGULATOR))
|
if (!IS_ENABLED(CONFIG_DM_REGULATOR))
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
|
/* Fix to make I2C1 usable on DK2 for touchscreen usage in kernel */
|
||||||
node = ofnode_path("/soc/i2c@40012000/hdmi-transmitter@39");
|
node = ofnode_path("/soc/i2c@40012000/hdmi-transmitter@39");
|
||||||
if (!ofnode_valid(node)) {
|
if (!ofnode_valid(node)) {
|
||||||
log_debug("no hdmi-transmitter@39 ?\n");
|
log_debug("no hdmi-transmitter@39 ?\n");
|
||||||
@ -611,7 +611,7 @@ error:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool board_is_dk2(void)
|
static bool board_is_stm32mp15x_dk2(void)
|
||||||
{
|
{
|
||||||
if (CONFIG_IS_ENABLED(TARGET_ST_STM32MP15x) &&
|
if (CONFIG_IS_ENABLED(TARGET_ST_STM32MP15x) &&
|
||||||
of_machine_is_compatible("st,stm32mp157c-dk2"))
|
of_machine_is_compatible("st,stm32mp157c-dk2"))
|
||||||
@ -620,7 +620,7 @@ static bool board_is_dk2(void)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool board_is_ev1(void)
|
static bool board_is_stm32mp15x_ev1(void)
|
||||||
{
|
{
|
||||||
if (CONFIG_IS_ENABLED(TARGET_ST_STM32MP15x) &&
|
if (CONFIG_IS_ENABLED(TARGET_ST_STM32MP15x) &&
|
||||||
(of_machine_is_compatible("st,stm32mp157a-ev1") ||
|
(of_machine_is_compatible("st,stm32mp157a-ev1") ||
|
||||||
@ -644,7 +644,7 @@ U_BOOT_DRIVER(goodix) = {
|
|||||||
.of_match = goodix_ids,
|
.of_match = goodix_ids,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void board_ev1_init(void)
|
static void board_stm32mp15x_ev1_init(void)
|
||||||
{
|
{
|
||||||
struct udevice *dev;
|
struct udevice *dev;
|
||||||
|
|
||||||
@ -657,11 +657,11 @@ int board_init(void)
|
|||||||
{
|
{
|
||||||
board_key_check();
|
board_key_check();
|
||||||
|
|
||||||
if (board_is_ev1())
|
if (board_is_stm32mp15x_ev1())
|
||||||
board_ev1_init();
|
board_stm32mp15x_ev1_init();
|
||||||
|
|
||||||
if (board_is_dk2())
|
if (board_is_stm32mp15x_dk2())
|
||||||
dk2_i2c1_fix();
|
board_stm32mp15x_dk2_init();
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_DM_REGULATOR))
|
if (IS_ENABLED(CONFIG_DM_REGULATOR))
|
||||||
regulators_enable_boot_on(_DEBUG);
|
regulators_enable_boot_on(_DEBUG);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user