diff --git a/arch/arm/include/asm/arch-imx8m/sys_proto.h b/arch/arm/include/asm/arch-imx8m/sys_proto.h index 3e54f9b6764a..069dc3579621 100644 --- a/arch/arm/include/asm/arch-imx8m/sys_proto.h +++ b/arch/arm/include/asm/arch-imx8m/sys_proto.h @@ -12,6 +12,7 @@ void set_wdog_reset(struct wdog_regs *wdog); void enable_tzc380(void); void restore_boot_params(void); int imx8m_usb_power(int usb_id, bool on); +int imx8m_gpc_power(int id, bool on); extern unsigned long rom_pointer[]; enum boot_device get_boot_device(void); bool is_usb_boot(void); diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c index f8fc3bcbe76d..676fc236ba70 100644 --- a/arch/arm/mach-imx/imx8m/soc.c +++ b/arch/arm/mach-imx/imx8m/soc.c @@ -236,9 +236,10 @@ void reset_cpu(ulong addr) } } -#ifdef CONFIG_USB_XHCI_IMX8M #define FSL_SIP_GPC 0xC2000000 #define FSL_SIP_CONFIG_GPC_PM_DOMAIN 0x03 + +#ifdef CONFIG_USB_XHCI_IMX8M int imx8m_usb_power(int usb_id, bool on) { unsigned long ret; @@ -254,3 +255,16 @@ int imx8m_usb_power(int usb_id, bool on) return 0; } #endif + +int imx8m_gpc_power(int id, bool on) +{ + unsigned long ret; + + ret = call_imx_sip(FSL_SIP_GPC, + FSL_SIP_CONFIG_GPC_PM_DOMAIN, id, on, 0); + if (ret) + return -EPERM; + + return 0; +} + diff --git a/board/solidrun/imx8mq_hb/imx8mq_hb.c b/board/solidrun/imx8mq_hb/imx8mq_hb.c index 80f4202caef2..70ca8830b5be 100644 --- a/board/solidrun/imx8mq_hb/imx8mq_hb.c +++ b/board/solidrun/imx8mq_hb/imx8mq_hb.c @@ -306,5 +306,8 @@ int board_late_init(void) init_usb_clk(0); init_usb_clk(1); + imx8m_gpc_power(10, false); + imx8m_gpc_power(1, false); + return 0; }