* [PATCH v2 0/3] usb: host: npcm7xx-ehci: add Arbel NPCM8XX support and remove reset sequence
@ 2022-07-18 18:18 Tomer Maimon
2022-07-18 18:18 ` [PATCH v2 1/3] usb: host: npcm7xx: remove USB EHCI host " Tomer Maimon
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Tomer Maimon @ 2022-07-18 18:18 UTC (permalink / raw)
To: avifishman70, tali.perry1, joel, venture, yuenn, benjaminfair,
gregkh, stern, tony, felipe.balbi, jgross, lukas.bulwahn, arnd,
robh+dt, krzysztof.kozlowski+dt
Cc: openbmc, linux-usb, linux-kernel, devicetree, Tomer Maimon
This patch set
- Adds Arbel NPCM8XX USB EHCI host controller support to USB EHCI driver.
- Remove the USB reset sequence because it is done in the NPCM reset driver.
The NPCM USB host driver tested on the NPCM845 evaluation board.
Addressed comments from:
- Arnd Bergmann : https://lore.kernel.org/all/CAK8P3a2PM9pe5tN=N7BMdkwZZKNv9Wa+CEFCyQT_6Ur=O7P5pQ@mail.gmail.com/
- Alan Stern: https://lore.kernel.org/all/YtVuildpxcI5By4x@rowland.harvard.edu/
Changes since version 1:
- Remove NPCM reset configuration dependency.
- Remove unused definitions.
Changes since version 1:
- Modify dt-binding compatible property.
- Use device_get_match_data function instead of_match_node function.
Tomer Maimon (3):
usb: host: npcm7xx: remove USB EHCI host reset sequence
dt-bindings: usb: npcm7xx: Add npcm845 compatible
USB: host: npcm: Add NPCM8XX support
.../devicetree/bindings/usb/npcm7xx-usb.txt | 4 +-
drivers/usb/host/Kconfig | 8 +--
drivers/usb/host/ehci-npcm7xx.c | 50 -------------------
3 files changed, 7 insertions(+), 55 deletions(-)
--
2.33.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/3] usb: host: npcm7xx: remove USB EHCI host reset sequence
2022-07-18 18:18 [PATCH v2 0/3] usb: host: npcm7xx-ehci: add Arbel NPCM8XX support and remove reset sequence Tomer Maimon
@ 2022-07-18 18:18 ` Tomer Maimon
2022-07-18 18:18 ` [PATCH v2 2/3] dt-bindings: usb: npcm7xx: Add npcm845 compatible Tomer Maimon
2022-07-18 18:18 ` [PATCH v2 3/3] USB: host: npcm: Add NPCM8XX support Tomer Maimon
2 siblings, 0 replies; 4+ messages in thread
From: Tomer Maimon @ 2022-07-18 18:18 UTC (permalink / raw)
To: avifishman70, tali.perry1, joel, venture, yuenn, benjaminfair,
gregkh, stern, tony, felipe.balbi, jgross, lukas.bulwahn, arnd,
robh+dt, krzysztof.kozlowski+dt
Cc: openbmc, linux-usb, linux-kernel, devicetree, Tomer Maimon
Remove USB EHCI host controller reset sequence from NPCM7XX USB EHCI
host probe function because it is done in the NPCM reset driver.
Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
---
drivers/usb/host/ehci-npcm7xx.c | 50 ---------------------------------
1 file changed, 50 deletions(-)
diff --git a/drivers/usb/host/ehci-npcm7xx.c b/drivers/usb/host/ehci-npcm7xx.c
index 6b5a7a873e01..1d2e2c3c0bf0 100644
--- a/drivers/usb/host/ehci-npcm7xx.c
+++ b/drivers/usb/host/ehci-npcm7xx.c
@@ -22,19 +22,9 @@
#include "ehci.h"
-#include <linux/regmap.h>
-#include <linux/mfd/syscon.h>
-
#define DRIVER_DESC "EHCI npcm7xx driver"
static const char hcd_name[] = "npcm7xx-ehci";
-
-#define USB2PHYCTL_OFFSET 0x144
-
-#define IPSRST2_OFFSET 0x24
-#define IPSRST3_OFFSET 0x34
-
-
static struct hc_driver __read_mostly ehci_npcm7xx_hc_driver;
static int __maybe_unused ehci_npcm7xx_drv_suspend(struct device *dev)
@@ -60,52 +50,12 @@ static int npcm7xx_ehci_hcd_drv_probe(struct platform_device *pdev)
{
struct usb_hcd *hcd;
struct resource *res;
- struct regmap *gcr_regmap;
- struct regmap *rst_regmap;
const struct hc_driver *driver = &ehci_npcm7xx_hc_driver;
int irq;
int retval;
dev_dbg(&pdev->dev, "initializing npcm7xx ehci USB Controller\n");
- gcr_regmap = syscon_regmap_lookup_by_compatible("nuvoton,npcm750-gcr");
- if (IS_ERR(gcr_regmap)) {
- dev_err(&pdev->dev, "%s: failed to find nuvoton,npcm750-gcr\n",
- __func__);
- return PTR_ERR(gcr_regmap);
- }
-
- rst_regmap = syscon_regmap_lookup_by_compatible("nuvoton,npcm750-rst");
- if (IS_ERR(rst_regmap)) {
- dev_err(&pdev->dev, "%s: failed to find nuvoton,npcm750-rst\n",
- __func__);
- return PTR_ERR(rst_regmap);
- }
-
- /********* phy init ******/
- // reset usb host
- regmap_update_bits(rst_regmap, IPSRST2_OFFSET,
- (0x1 << 26), (0x1 << 26));
- regmap_update_bits(rst_regmap, IPSRST3_OFFSET,
- (0x1 << 25), (0x1 << 25));
- regmap_update_bits(gcr_regmap, USB2PHYCTL_OFFSET,
- (0x1 << 28), 0);
-
- udelay(1);
-
- // enable phy
- regmap_update_bits(rst_regmap, IPSRST3_OFFSET,
- (0x1 << 25), 0);
-
- udelay(50); // enable phy
-
- regmap_update_bits(gcr_regmap, USB2PHYCTL_OFFSET,
- (0x1 << 28), (0x1 << 28));
-
- // enable host
- regmap_update_bits(rst_regmap, IPSRST2_OFFSET,
- (0x1 << 26), 0);
-
if (usb_disabled())
return -ENODEV;
--
2.33.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/3] dt-bindings: usb: npcm7xx: Add npcm845 compatible
2022-07-18 18:18 [PATCH v2 0/3] usb: host: npcm7xx-ehci: add Arbel NPCM8XX support and remove reset sequence Tomer Maimon
2022-07-18 18:18 ` [PATCH v2 1/3] usb: host: npcm7xx: remove USB EHCI host " Tomer Maimon
@ 2022-07-18 18:18 ` Tomer Maimon
2022-07-18 18:18 ` [PATCH v2 3/3] USB: host: npcm: Add NPCM8XX support Tomer Maimon
2 siblings, 0 replies; 4+ messages in thread
From: Tomer Maimon @ 2022-07-18 18:18 UTC (permalink / raw)
To: avifishman70, tali.perry1, joel, venture, yuenn, benjaminfair,
gregkh, stern, tony, felipe.balbi, jgross, lukas.bulwahn, arnd,
robh+dt, krzysztof.kozlowski+dt
Cc: openbmc, linux-usb, linux-kernel, devicetree, Tomer Maimon,
Krzysztof Kozlowski
Add a compatible string for Nuvoton BMC NPCM845 USB EHCI host controller.
Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Documentation/devicetree/bindings/usb/npcm7xx-usb.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/usb/npcm7xx-usb.txt b/Documentation/devicetree/bindings/usb/npcm7xx-usb.txt
index 5a0f1f14fbfa..352a0a1e2f76 100644
--- a/Documentation/devicetree/bindings/usb/npcm7xx-usb.txt
+++ b/Documentation/devicetree/bindings/usb/npcm7xx-usb.txt
@@ -5,7 +5,9 @@ EHCI:
-----
Required properties:
-- compatible: "nuvoton,npcm750-ehci"
+- compatible: should be one of
+ "nuvoton,npcm750-ehci"
+ "nuvoton,npcm845-ehci"
- interrupts: Should contain the EHCI interrupt
- reg: Physical address and length of the register set for the device
--
2.33.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 3/3] USB: host: npcm: Add NPCM8XX support
2022-07-18 18:18 [PATCH v2 0/3] usb: host: npcm7xx-ehci: add Arbel NPCM8XX support and remove reset sequence Tomer Maimon
2022-07-18 18:18 ` [PATCH v2 1/3] usb: host: npcm7xx: remove USB EHCI host " Tomer Maimon
2022-07-18 18:18 ` [PATCH v2 2/3] dt-bindings: usb: npcm7xx: Add npcm845 compatible Tomer Maimon
@ 2022-07-18 18:18 ` Tomer Maimon
2 siblings, 0 replies; 4+ messages in thread
From: Tomer Maimon @ 2022-07-18 18:18 UTC (permalink / raw)
To: avifishman70, tali.perry1, joel, venture, yuenn, benjaminfair,
gregkh, stern, tony, felipe.balbi, jgross, lukas.bulwahn, arnd,
robh+dt, krzysztof.kozlowski+dt
Cc: openbmc, linux-usb, linux-kernel, devicetree, Tomer Maimon
Modify NPCM USB EHCI host controller configuration to support all NPCM
BMC SoC.
Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
---
drivers/usb/host/Kconfig | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 682b3d2da623..bcd595e30811 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -205,12 +205,12 @@ config USB_EHCI_FSL
Variation of ARC USB block used in some Freescale chips.
config USB_EHCI_HCD_NPCM7XX
- tristate "Support for Nuvoton NPCM7XX on-chip EHCI USB controller"
- depends on (USB_EHCI_HCD && ARCH_NPCM7XX) || COMPILE_TEST
- default y if (USB_EHCI_HCD && ARCH_NPCM7XX)
+ tristate "Support for Nuvoton NPCM on-chip EHCI USB controller"
+ depends on (USB_EHCI_HCD && ARCH_NPCM) || COMPILE_TEST
+ default y if (USB_EHCI_HCD && ARCH_NPCM)
help
Enables support for the on-chip EHCI controller on
- Nuvoton NPCM7XX chips.
+ Nuvoton NPCM chips.
config USB_EHCI_HCD_OMAP
tristate "EHCI support for OMAP3 and later chips"
--
2.33.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-07-18 18:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-18 18:18 [PATCH v2 0/3] usb: host: npcm7xx-ehci: add Arbel NPCM8XX support and remove reset sequence Tomer Maimon
2022-07-18 18:18 ` [PATCH v2 1/3] usb: host: npcm7xx: remove USB EHCI host " Tomer Maimon
2022-07-18 18:18 ` [PATCH v2 2/3] dt-bindings: usb: npcm7xx: Add npcm845 compatible Tomer Maimon
2022-07-18 18:18 ` [PATCH v2 3/3] USB: host: npcm: Add NPCM8XX support Tomer Maimon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).