]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: theobroma-systems: puma: Migrate to use IO-domain driver
authorJonas Karlman <jonas@kwiboo.se>
Tue, 12 Mar 2024 23:36:20 +0000 (23:36 +0000)
committerKever Yang <kever.yang@rock-chips.com>
Thu, 14 Mar 2024 10:19:28 +0000 (18:19 +0800)
Switch to use the IO-domain driver to configure IO-domain based on
device tree instead of a setup_iodomain() function.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
board/theobroma-systems/puma_rk3399/puma-rk3399.c
configs/puma-rk3399_defconfig

index 8b998ef45565d5a98fd91dea090e38b52ff7b4bd..eeb8a99231e445a0d32a7c241e81125f0364e5d6 100644 (file)
@@ -3,31 +3,10 @@
  * (C) Copyright 2017 Theobroma Systems Design und Consulting GmbH
  */
 
-#include <dm.h>
-#include <syscon.h>
-#include <dm/pinctrl.h>
-#include <asm/arch-rockchip/clock.h>
-#include <asm/arch-rockchip/hardware.h>
-#include <asm/arch-rockchip/grf_rk3399.h>
 #include "../common/common.h"
 
-static void setup_iodomain(void)
-{
-       const u32 GRF_IO_VSEL_GPIO4CD_SHIFT = 3;
-       struct rk3399_grf_regs *grf =
-           syscon_get_first_range(ROCKCHIP_SYSCON_GRF);
-
-       /*
-        * Set bit 3 in GRF_IO_VSEL so PCIE_RST# works (pin GPIO4_C6).
-        * Linux assumes that PCIE_RST# works out of the box as it probes
-        * PCIe before loading the iodomain driver.
-        */
-       rk_setreg(&grf->io_vsel, 1 << GRF_IO_VSEL_GPIO4CD_SHIFT);
-}
-
 int rockchip_early_misc_init_r(void)
 {
-       setup_iodomain();
        setup_boottargets();
 
        return 0;
index 7e76ec5076f9350ec38f276b5f0ce49d47ebbdb9..c2759e1a952083dab55c5bea1e9352acc3d7656b 100644 (file)
@@ -66,6 +66,7 @@ CONFIG_GPIO_HOG=y
 CONFIG_SPL_GPIO_HOG=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_SYS_I2C_ROCKCHIP=y
+CONFIG_ROCKCHIP_IODOMAIN=y
 CONFIG_MMC_DW=y
 CONFIG_MMC_DW_ROCKCHIP=y
 CONFIG_MMC_SDHCI=y