From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 003B1C433F5 for ; Mon, 13 Sep 2021 00:35:49 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 70F1460FBF for ; Mon, 13 Sep 2021 00:35:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 70F1460FBF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4A887839DF; Mon, 13 Sep 2021 02:35:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 3CCD383982; Mon, 13 Sep 2021 02:33:07 +0200 (CEST) Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CA4B0839B8 for ; Mon, 13 Sep 2021 02:32:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tom.rini@gmail.com Received: by mail-qv1-f54.google.com with SMTP id r18so5072281qvy.8 for ; Sun, 12 Sep 2021 17:32:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=99j8Lo8psebzhwaqSrxRZslHGMySuLq0fIkwakaaqqY=; b=iksw2xfoP3XG+CutNjQtyvbxy7YYFX1J9VjXqjeGSM/Bl9/JZSa1lVMM2gUP8gun7g pYylMKnT8+sJ3EJwVjKU7Sty4SB3koj3gVlV3ocmmQTA+NhsiSw8Gb0+xcLh33XrCIx2 o//3uPjTR6P8X6aNxKwn2hkJvGE1GnVS8thMcZM3Sr8K55he3fBcssIEtV3UiuoR/Enb cd7DLXKo/PRPdlc2J6Jyl9NDaZKME7+z0ohm5ZFzuqk2IlmXYWckjy0NnyLOCLtaVPWF BxbXB9s5euv5M0V1zgcYMwZMulfnc6mmd5IKl7R0UPX8F1WaLs7xGrk/ji7FfrbF+M07 ozHQ== X-Gm-Message-State: AOAM532Ms/Zt9be24vLY27z2qFaas4ebawipN5HDPTMEJAjwKpsoXDCY dNmLQC+Unlb2YnQTPyqs+Ykbt6gfsw== X-Google-Smtp-Source: ABdhPJzU4GgrPG+Suuf+Fux3PDlX6me3sw8PIgKAFkPefAOus6hVklIEOCYWWzl9sSipwNZlYBudDQ== X-Received: by 2002:a0c:9d82:: with SMTP id s2mr8004707qvd.23.1631493168270; Sun, 12 Sep 2021 17:32:48 -0700 (PDT) Received: from bill-the-cat.lan (2603-6081-7b01-cbda-0166-c2e8-bb10-efce.res6.spectrum.com. [2603:6081:7b01:cbda:166:c2e8:bb10:efce]) by smtp.gmail.com with ESMTPSA id x27sm3300211qtm.23.2021.09.12.17.32.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Sep 2021 17:32:47 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCH 12/17] Convert CONFIG_OMAP_EHCI_PHY1_RESET_GPIO et al to Kconfig Date: Sun, 12 Sep 2021 20:32:28 -0400 Message-Id: <20210913003233.4125-12-trini@konsulko.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210913003233.4125-1-trini@konsulko.com> References: <20210913003233.4125-1-trini@konsulko.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean This converts the following to Kconfig: CONFIG_OMAP_EHCI_PHY1_RESET_GPIO CONFIG_OMAP_EHCI_PHY2_RESET_GPIO CONFIG_OMAP_EHCI_PHY3_RESET_GPIO To do this, we also introduce CONFIG_HAS_CONFIG_OMAP_EHCI_PHYn_RESET_GPIO options to get setting the GPIO number. Signed-off-by: Tom Rini --- configs/am3517_evm_defconfig | 2 ++ configs/omap35_logic_somlv_defconfig | 2 ++ configs/omap3_beagle_defconfig | 2 ++ configs/omap3_logic_somlv_defconfig | 2 ++ configs/omap4_panda_defconfig | 4 ++++ configs/omap5_uevm_defconfig | 4 ++++ drivers/usb/host/Kconfig | 34 ++++++++++++++++++++++++++++ include/configs/am3517_evm.h | 2 -- include/configs/omap3_beagle.h | 3 --- include/configs/omap3_logic.h | 3 --- include/configs/omap4_panda.h | 2 -- include/configs/omap5_uevm.h | 3 --- include/configs/tam3517-common.h | 2 -- 13 files changed, 50 insertions(+), 15 deletions(-) diff --git a/configs/am3517_evm_defconfig b/configs/am3517_evm_defconfig index 1234aa2251e4..864d16cf01ce 100644 --- a/configs/am3517_evm_defconfig +++ b/configs/am3517_evm_defconfig @@ -77,6 +77,8 @@ CONFIG_DM_SPI=y CONFIG_OMAP3_SPI=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y +CONFIG_HAS_OMAP_EHCI_PHY1_RESET_GPIO=y +CONFIG_OMAP_EHCI_PHY1_RESET_GPIO=57 CONFIG_USB_MUSB_HOST=y CONFIG_USB_MUSB_AM35X=y CONFIG_BCH=y diff --git a/configs/omap35_logic_somlv_defconfig b/configs/omap35_logic_somlv_defconfig index 4e31f77049a3..9f3a88f28ecf 100644 --- a/configs/omap35_logic_somlv_defconfig +++ b/configs/omap35_logic_somlv_defconfig @@ -82,6 +82,8 @@ CONFIG_OMAP3_SPI=y CONFIG_USB=y # CONFIG_SPL_DM_USB is not set CONFIG_USB_EHCI_HCD=y +CONFIG_HAS_OMAP_EHCI_PHY1_RESET_GPIO=y +CONFIG_OMAP_EHCI_PHY1_RESET_GPIO=4 CONFIG_USB_MUSB_HOST=y CONFIG_USB_MUSB_OMAP2PLUS=y CONFIG_TWL4030_USB=y diff --git a/configs/omap3_beagle_defconfig b/configs/omap3_beagle_defconfig index 89b2bff5925a..578e6829ff14 100644 --- a/configs/omap3_beagle_defconfig +++ b/configs/omap3_beagle_defconfig @@ -84,6 +84,8 @@ CONFIG_OMAP3_SPI=y CONFIG_USB=y # CONFIG_SPL_DM_USB is not set CONFIG_USB_EHCI_HCD=y +CONFIG_HAS_OMAP_EHCI_PHY1_RESET_GPIO=y +CONFIG_OMAP_EHCI_PHY1_RESET_GPIO=147 CONFIG_USB_OMAP3=y CONFIG_USB_MUSB_GADGET=y CONFIG_USB_MUSB_OMAP2PLUS=y diff --git a/configs/omap3_logic_somlv_defconfig b/configs/omap3_logic_somlv_defconfig index 96f9c6bcaaaa..7a78682bf69a 100644 --- a/configs/omap3_logic_somlv_defconfig +++ b/configs/omap3_logic_somlv_defconfig @@ -83,6 +83,8 @@ CONFIG_OMAP3_SPI=y CONFIG_USB=y # CONFIG_SPL_DM_USB is not set CONFIG_USB_EHCI_HCD=y +CONFIG_HAS_OMAP_EHCI_PHY1_RESET_GPIO=y +CONFIG_OMAP_EHCI_PHY1_RESET_GPIO=4 CONFIG_USB_MUSB_HOST=y CONFIG_USB_MUSB_OMAP2PLUS=y CONFIG_TWL4030_USB=y diff --git a/configs/omap4_panda_defconfig b/configs/omap4_panda_defconfig index 687e3865e77a..8c6baaf4fda5 100644 --- a/configs/omap4_panda_defconfig +++ b/configs/omap4_panda_defconfig @@ -40,6 +40,10 @@ CONFIG_CONS_INDEX=3 CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y +CONFIG_HAS_OMAP_EHCI_PHY1_RESET_GPIO=y +CONFIG_OMAP_EHCI_PHY1_RESET_GPIO=1 +CONFIG_HAS_OMAP_EHCI_PHY2_RESET_GPIO=y +CONFIG_OMAP_EHCI_PHY2_RESET_GPIO=62 CONFIG_USB_OMAP3=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_SMSC95XX=y diff --git a/configs/omap5_uevm_defconfig b/configs/omap5_uevm_defconfig index 0436463e0872..0280b4ac8d07 100644 --- a/configs/omap5_uevm_defconfig +++ b/configs/omap5_uevm_defconfig @@ -49,6 +49,10 @@ CONFIG_CONS_INDEX=3 CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y +CONFIG_HAS_OMAP_EHCI_PHY2_RESET_GPIO=y +CONFIG_OMAP_EHCI_PHY2_RESET_GPIO=80 +CONFIG_HAS_OMAP_EHCI_PHY3_RESET_GPIO=y +CONFIG_OMAP_EHCI_PHY3_RESET_GPIO=79 CONFIG_USB_DWC3=y CONFIG_USB_DWC3_OMAP=y CONFIG_USB_DWC3_PHY_OMAP=y diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index e04cf9411ae5..10b0479a8a6a 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -183,6 +183,40 @@ config USB_EHCI_OMAP Enables support for the on-chip EHCI controller on OMAP3 and later SoCs. +if USB_EHCI_OMAP + +config HAS_OMAP_EHCI_PHY1_RESET_GPIO + bool "PHY #1 requires a GPIO hold to it in RESET while PHY settles" + help + Enable this to be able to configure the GPIO number used to hold the + PHY in RESET for enough time until the PHY is settled and ready. + +config OMAP_EHCI_PHY1_RESET_GPIO + int "GPIO number to hold PHY #1 in RESET" + depends on HAS_OMAP_EHCI_PHY1_RESET_GPIO + +config HAS_OMAP_EHCI_PHY2_RESET_GPIO + bool "PHY #2 requires a GPIO hold to it in RESET while PHY settles" + help + Enable this to be able to configure the GPIO number used to hold the + PHY in RESET for enough time until the PHY is settled and ready. + +config OMAP_EHCI_PHY2_RESET_GPIO + int "GPIO number to hold PHY #2 in RESET" + depends on HAS_OMAP_EHCI_PHY2_RESET_GPIO + +config HAS_OMAP_EHCI_PHY3_RESET_GPIO + bool "PHY #3 requires a GPIO hold to it in RESET while PHY settles" + help + Enable this to be able to configure the GPIO number used to hold the + PHY in RESET for enough time until the PHY is settled and ready. + +config OMAP_EHCI_PHY3_RESET_GPIO + int "GPIO number to hold PHY #3 in RESET" + depends on HAS_OMAP_EHCI_PHY3_RESET_GPIO + +endif + config USB_EHCI_VF bool "Support for Vybrid on-chip EHCI USB controller" depends on ARCH_VF610 diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h index edfd890767d1..9b56e2101c16 100644 --- a/include/configs/am3517_evm.h +++ b/include/configs/am3517_evm.h @@ -23,8 +23,6 @@ */ #ifdef CONFIG_SPL_BUILD #undef CONFIG_USB_EHCI_OMAP -#else -#define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO 57 #endif /* I2C */ diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index 5d300b13f34e..265b1e2197c9 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -41,9 +41,6 @@ #endif /* CONFIG_SPL_OS_BOOT */ #endif /* CONFIG_MTD_RAW_NAND */ -/* USB EHCI */ -#define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO 147 - /* Enable Multi Bus support for I2C */ #define CONFIG_I2C_MULTI_BUS diff --git a/include/configs/omap3_logic.h b/include/configs/omap3_logic.h index 886f2e9d86f8..89ffdef287c4 100644 --- a/include/configs/omap3_logic.h +++ b/include/configs/omap3_logic.h @@ -27,9 +27,6 @@ #ifdef CONFIG_SPL_BUILD #undef CONFIG_USB_EHCI_OMAP #endif -#ifdef CONFIG_USB_EHCI_OMAP -#define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO 4 -#endif /* Board NAND Info. */ #ifdef CONFIG_MTD_RAW_NAND diff --git a/include/configs/omap4_panda.h b/include/configs/omap4_panda.h index 14eb363816ae..5320dffe55b9 100644 --- a/include/configs/omap4_panda.h +++ b/include/configs/omap4_panda.h @@ -16,8 +16,6 @@ */ /* USB UHH support options */ -#define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO 1 -#define CONFIG_OMAP_EHCI_PHY2_RESET_GPIO 62 /* USB Networking options */ diff --git a/include/configs/omap5_uevm.h b/include/configs/omap5_uevm.h index a1f1dafad79b..188ab0bf365d 100644 --- a/include/configs/omap5_uevm.h +++ b/include/configs/omap5_uevm.h @@ -43,9 +43,6 @@ /* USB UHH support options */ #define CONFIG_EHCI_HCD_INIT_AFTER_RESET -#define CONFIG_OMAP_EHCI_PHY2_RESET_GPIO 80 -#define CONFIG_OMAP_EHCI_PHY3_RESET_GPIO 79 - /* Enabled commands */ /* USB Networking options */ diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h index 166b8397adac..adbc2ae0c5df 100644 --- a/include/configs/tam3517-common.h +++ b/include/configs/tam3517-common.h @@ -43,8 +43,6 @@ #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\ 115200} -/* EHCI */ -#define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO 25 #define CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW 0x07 -- 2.17.1