Skip to contentSkip to conversation

STiH410-B2260: add reset, usb and fastboot support

PATCH Superseded patrice.chotard at st.com 4 participants 24 messages Mar 28, 2017 – May 9, 2017

Subsystems (6)

v3 of 10 Superseded Latest is v10 →

lore
Share & tools
lore
#0 lore raw

v3 cover STiH410-B2260: add reset, usb and fastboot support

From: Patrice Chotard <[email protected]>

This series adds :
_ update existing sdhci driver to use reset framework _ add usb phy driver
_ add ehci support
_ add ohci support
_ add xhci support
_ add fastboot support

With all this feature enable, it's now possible to
_ boot on usb mass storage device
_ boot from kernel image and dtb previously loaded using tftp _ update mmc partiton using fastboot

v3: _ remove reset driver (already applied on u-boot-dm tree by Simon
Glass)
_ patch 4: add new USB PHY uclass requested by Simon Glass
_ patch 5: convert STi usb phy driver to new USB PHY uclass
_ patch 6/7: update echi/ohci drivers to use USB PHY uclass
_ patch 8/9: rework xhci-sti.c and dwc3-sti.c. Previously, xhci-sti driver binded
dwc3-sti (STi glue driver) which was not correct. Now we respect the device tree hierarchy, ie the STi dwc3 glue driver is first probed, then bind the xhci-sti driver.

v2: _ add Reviewed-by: Jaehoon Chung <[email protected]> in patches 2,3 and 4
_ fix remarks done by Marek Vasut :
_ patch 5 : replace bitfield_replace() by clrsetbits_le32() _ patch 6 : update error messages and add remove callback _ patch 8 : put board specific defines in a separate patch _ patch 7: use setbits_le32() instead of read, modify, write
sequence and add missing parenthesis
_ squash previous patches 7,9,11,12,14,16,17,18,19,20 and 21
in patch 14

Patrice Chotard (13):
mmc: sti_sdhci: Rework sti_mmc_core_config()
ARM: dts: stih410-family: Add missing reset_names for mmc1 node
mmc: sti_sdhci: Use reset framework
dm: usb: Add a uclass for USB PHY
usb: phy: Add STi USB2 PHY
usb: ehci: Add STi ehci support
usb: ohci: Add STi ohci support
usb: xhci: Add STi xhci support
usb: dwc3: Add dwc3 glue driver support for STi
board: STiH410-B2260: add OHCI and XHCI related defines
board: STiH410-B2260: add fastboot support
STiH410-B2260: enable USB Host Networking
STiH410-B2260: enable USB, fastboot, reset related flags

 arch/arm/dts/stih407-family.dtsi                 |   1 +
 arch/arm/include/asm/arch-stih410/sys_proto.h    |  11 +
 board/st/stih410-b2260/board.c                   |  44 ++++
 configs/stih410-b2260_defconfig                  |  36 ++-
 doc/device-tree-bindings/phy/phy-stih407-usb.txt |  24 ++
 doc/device-tree-bindings/usb/dwc3-st.txt         |  60 +++++
 drivers/mmc/sti_sdhci.c                          |  60 +++--
 drivers/usb/Kconfig                              |   4 +
 drivers/usb/host/Kconfig                         |  26 +++
 drivers/usb/host/Makefile                        |   3 +
 drivers/usb/host/dwc3-sti-glue.c                 | 278 +++++++++++++++++++++++
 drivers/usb/host/ehci-sti.c                      | 116 ++++++++++
 drivers/usb/host/ohci-sti.c                      |  93 ++++++++
 drivers/usb/host/xhci-sti.c                      | 114 ++++++++++
 drivers/usb/phy/Kconfig                          |  19 ++
 drivers/usb/phy/Makefile                         |   2 +
 drivers/usb/phy/sti_usb_phy.c                    | 181 +++++++++++++++
 drivers/usb/phy/usb_phy_uclass.c                 |  90 ++++++++
 include/configs/stih410-b2260.h                  |  16 ++
 include/dm/uclass-id.h                           |   1 +
 include/dwc3-sti-glue.h                          |  43 ++++
 include/usb_phy-uclass.h                         |  42 ++++
 include/usb_phy.h                                | 112 +++++++++
 23 files changed, 1350 insertions(+), 26 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-stih410/sys_proto.h
 create mode 100644 doc/device-tree-bindings/phy/phy-stih407-usb.txt
 create mode 100644 doc/device-tree-bindings/usb/dwc3-st.txt
 create mode 100644 drivers/usb/host/dwc3-sti-glue.c
 create mode 100644 drivers/usb/host/ehci-sti.c
 create mode 100644 drivers/usb/host/ohci-sti.c
 create mode 100644 drivers/usb/host/xhci-sti.c
 create mode 100644 drivers/usb/phy/Kconfig
 create mode 100644 drivers/usb/phy/sti_usb_phy.c
 create mode 100644 drivers/usb/phy/usb_phy_uclass.c
 create mode 100644 include/dwc3-sti-glue.h
 create mode 100644 include/usb_phy-uclass.h
 create mode 100644 include/usb_phy.h
Signature · 1 line
1.9.1
#1 lore raw

PATCH v3 1/13 mmc: sti_sdhci: Rework sti_mmc_core_config()

From: Patrice Chotard <[email protected]>

Use struct udevice* as input parameter. Previous parameters are retrieved through plat and priv data.

This to prepare to use the reset framework.

---
 drivers/mmc/sti_sdhci.c | 33 ++++++++++++++++++---------------
 1 file changed, 18 insertions(+), 15 deletions(-)
drivers/mmc/sti_sdhci.c +18 -15
index 2a07082..d6c4d67 100644
@@ -16,6 +16,7 @@ DECLARE_GLOBAL_DATA_PTR;
 struct sti_sdhci_plat {
 	struct mmc_config cfg;
 	struct mmc mmc;
+	int instance;
 };
 
 /*
@@ -26,8 +27,8 @@ struct sti_sdhci_plat {
 
 /**
  * sti_mmc_core_config: configure the Arasan HC
- * @regbase: base address
- * @mmc_instance: mmc instance id
+ * @dev : udevice
+ *
  * Description: this function is to configure the Arasan MMC HC.
  * This should be called when the system starts in case of, on the SoC,
  * it is needed to configure the host controller.
@@ -36,33 +37,35 @@ struct sti_sdhci_plat {
  * W/o these settings the SDHCI could configure and use the embedded controller
  * with limited features.
  */
-static void sti_mmc_core_config(const u32 regbase, int mmc_instance)
+static void sti_mmc_core_config(struct udevice *dev)
 {
+	struct sti_sdhci_plat *plat = dev_get_platdata(dev);
+	struct sdhci_host *host = dev_get_priv(dev);
 	unsigned long *sysconf;
 
 	/* only MMC1 has a reset line */
-	if (mmc_instance) {
+	if (plat->instance) {
 		sysconf = (unsigned long *)(STIH410_SYSCONF5_BASE +
 			  ST_MMC_CCONFIG_REG_5);
 		generic_set_bit(SYSCONF_MMC1_ENABLE_BIT, sysconf);
 	}
 
 	writel(STI_FLASHSS_MMC_CORE_CONFIG_1,
-	       regbase + FLASHSS_MMC_CORE_CONFIG_1);
+	       host->ioaddr + FLASHSS_MMC_CORE_CONFIG_1);
 
-	if (mmc_instance) {
+	if (plat->instance) {
 		writel(STI_FLASHSS_MMC_CORE_CONFIG2,
-		       regbase + FLASHSS_MMC_CORE_CONFIG_2);
+		       host->ioaddr + FLASHSS_MMC_CORE_CONFIG_2);
 		writel(STI_FLASHSS_MMC_CORE_CONFIG3,
-		       regbase + FLASHSS_MMC_CORE_CONFIG_3);
+		       host->ioaddr + FLASHSS_MMC_CORE_CONFIG_3);
 	} else {
 		writel(STI_FLASHSS_SDCARD_CORE_CONFIG2,
-		       regbase + FLASHSS_MMC_CORE_CONFIG_2);
+		       host->ioaddr + FLASHSS_MMC_CORE_CONFIG_2);
 		writel(STI_FLASHSS_SDCARD_CORE_CONFIG3,
-		       regbase + FLASHSS_MMC_CORE_CONFIG_3);
+		       host->ioaddr + FLASHSS_MMC_CORE_CONFIG_3);
 	}
 	writel(STI_FLASHSS_MMC_CORE_CONFIG4,
-	       regbase + FLASHSS_MMC_CORE_CONFIG_4);
+	       host->ioaddr + FLASHSS_MMC_CORE_CONFIG_4);
 }
 
 static int sti_sdhci_probe(struct udevice *dev)
@@ -70,7 +73,7 @@ static int sti_sdhci_probe(struct udevice *dev)
 	struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
 	struct sti_sdhci_plat *plat = dev_get_platdata(dev);
 	struct sdhci_host *host = dev_get_priv(dev);
-	int ret, mmc_instance;
+	int ret;
 
 	/*
 	 * identify current mmc instance, mmc1 has a reset, not mmc0
@@ -79,11 +82,11 @@ static int sti_sdhci_probe(struct udevice *dev)
 	 */
 
 	if (fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "resets", NULL))
-		mmc_instance = 1;
+		plat->instance = 1;
 	else
-		mmc_instance = 0;
+		plat->instance = 0;
 
-	sti_mmc_core_config((const u32) host->ioaddr, mmc_instance);
+	sti_mmc_core_config(dev);
 
 	host->quirks = SDHCI_QUIRK_WAIT_SEND_CMD |
 		       SDHCI_QUIRK_32BIT_DMA_ADDR |
Signature · 1 line
1.9.1
#2 lore raw

PATCH v3 2/13 ARM: dts: stih410-family: Add missing reset_names for mmc1 node

In reply to patrice.chotard at st.com

From: Patrice Chotard <[email protected]>

reset-names property is needed to use the reset
API for STi sdhci driver.

---
 arch/arm/dts/stih407-family.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/dts/stih407-family.dtsi +1 -0
index af66b53..452ac1c 100644
@@ -563,6 +563,7 @@
 			clocks = <&clk_s_c0_flexgen CLK_MMC_1>,
 				 <&clk_s_c0_flexgen CLK_RX_ICN_HVA>;
 			resets = <&softreset STIH407_MMC1_SOFTRESET>;
+			reset-names = "softreset";
 			bus-width = <4>;
 		};
 
Signature · 1 line
1.9.1
#3 lore raw

PATCH v3 3/13 mmc: sti_sdhci: Use reset framework

In reply to patrice.chotard at st.com

From: Patrice Chotard <[email protected]>

---
 drivers/mmc/sti_sdhci.c | 31 ++++++++++++++++++++++---------
 1 file changed, 22 insertions(+), 9 deletions(-)
drivers/mmc/sti_sdhci.c +22 -9
index d6c4d67..8b1b2c0 100644
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <dm.h>
 #include <mmc.h>
+#include <reset-uclass.h>
 #include <sdhci.h>
 #include <asm/arch/sdhci.h>
 
@@ -16,6 +17,7 @@ DECLARE_GLOBAL_DATA_PTR;
 struct sti_sdhci_plat {
 	struct mmc_config cfg;
 	struct mmc mmc;
+	struct reset_ctl reset;
 	int instance;
 };
 
@@ -37,17 +39,19 @@ struct sti_sdhci_plat {
  * W/o these settings the SDHCI could configure and use the embedded controller
  * with limited features.
  */
-static void sti_mmc_core_config(struct udevice *dev)
+static int sti_mmc_core_config(struct udevice *dev)
 {
 	struct sti_sdhci_plat *plat = dev_get_platdata(dev);
 	struct sdhci_host *host = dev_get_priv(dev);
-	unsigned long *sysconf;
+	int ret;
 
 	/* only MMC1 has a reset line */
 	if (plat->instance) {
-		sysconf = (unsigned long *)(STIH410_SYSCONF5_BASE +
-			  ST_MMC_CCONFIG_REG_5);
-		generic_set_bit(SYSCONF_MMC1_ENABLE_BIT, sysconf);
+		ret = reset_deassert(&plat->reset);
+		if (ret < 0) {
+			error("MMC1 deassert failed: %d", ret);
+			return ret;
+		}
 	}
 
 	writel(STI_FLASHSS_MMC_CORE_CONFIG_1,
@@ -66,6 +70,8 @@ static void sti_mmc_core_config(struct udevice *dev)
 	}
 	writel(STI_FLASHSS_MMC_CORE_CONFIG4,
 	       host->ioaddr + FLASHSS_MMC_CORE_CONFIG_4);
+
+	return 0;
 }
 
 static int sti_sdhci_probe(struct udevice *dev)
@@ -80,13 +86,20 @@ static int sti_sdhci_probe(struct udevice *dev)
 	 * MMC0 is wired to the SD slot,
 	 * MMC1 is wired on the high speed connector
 	 */
-
-	if (fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "resets", NULL))
+	if (fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "resets", NULL)) {
 		plat->instance = 1;
-	else
+		ret = reset_get_by_name(dev, "softreset", &plat->reset);
+		if (ret) {
+			error("can't get reset for %s (%d)", dev->name, ret);
+			return ret;
+		}
+	} else {
 		plat->instance = 0;
+	}
 
-	sti_mmc_core_config(dev);
+	ret = sti_mmc_core_config(dev);
+	if (ret)
+		return ret;
 
 	host->quirks = SDHCI_QUIRK_WAIT_SEND_CMD |
 		       SDHCI_QUIRK_32BIT_DMA_ADDR |
Signature · 1 line
1.9.1
#4 lore raw

PATCH v3 4/13 dm: usb: Add a uclass for USB PHY

In reply to patrice.chotard at st.com

From: Patrice Chotard <[email protected]>

This is a basic implementation of USB PHY which
define a standard API that link USB PHY client to
USB PHY driver controller.

---

v3: _ this patch intoduce new USB PHY uclass

 drivers/usb/Kconfig              |   4 ++
 drivers/usb/phy/Kconfig          |  10 ++++
 drivers/usb/phy/Makefile         |   1 +
 drivers/usb/phy/usb_phy_uclass.c |  90 +++++++++++++++++++++++++++++++
 include/dm/uclass-id.h           |   1 +
 include/usb_phy-uclass.h         |  42 +++++++++++++++
 include/usb_phy.h                | 112 +++++++++++++++++++++++++++++++++++++++
 7 files changed, 260 insertions(+)
 create mode 100644 drivers/usb/phy/Kconfig
 create mode 100644 drivers/usb/phy/usb_phy_uclass.c
 create mode 100644 include/usb_phy-uclass.h
 create mode 100644 include/usb_phy.h
drivers/usb/Kconfig +4 -0
index da3ec2f..e30c9d6 100644
@@ -94,4 +94,8 @@ endif
 
 source "drivers/usb/gadget/Kconfig"
 
+comment "USB PHY"
+
+source "drivers/usb/phy/Kconfig"
+
 endif
drivers/usb/phy/Kconfig new file +10 -0
new file mode 100644
index 0000000..0539401
@@ -0,0 +1,10 @@
+menu "USB PHY drivers"
+
+config USB_PHY
+	bool "Enable driver model for USB PHY drivers"
+	depends on DM
+	help
+	  Enable driver model for USB PHY access. It defines basic
+	  init and exit API.
+
+endmenu
drivers/usb/phy/Makefile +1 -0
index 4e548c2..5314dcb 100644
@@ -5,6 +5,7 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
+obj-$(CONFIG_USB_PHY) += usb_phy_uclass.o
 obj-$(CONFIG_TWL4030_USB) += twl4030.o
 obj-$(CONFIG_OMAP_USB_PHY) += omap_usb_phy.o
 obj-$(CONFIG_ROCKCHIP_USB2_PHY) += rockchip_usb2_phy.o
drivers/usb/phy/usb_phy_uclass.c new file +90 -0

90 lines not on this page · raw message

include/dm/uclass-id.h +1 -0
index 8c92d0b..feb6689 100644
@@ -80,6 +80,7 @@ enum uclass_id {
 	UCLASS_USB,		/* USB bus */
 	UCLASS_USB_DEV_GENERIC,	/* USB generic device */
 	UCLASS_USB_HUB,		/* USB hub */
+	UCLASS_USB_PHY,		/* USB Phy */
 	UCLASS_VIDEO,		/* Video or LCD device */
 	UCLASS_VIDEO_BRIDGE,	/* Video bridge, e.g. DisplayPort to LVDS */
 	UCLASS_VIDEO_CONSOLE,	/* Text console driver for video device */
include/usb_phy-uclass.h new file +42 -0

42 lines not on this page · raw message

include/usb_phy.h new file +112 -0

112 lines not on this page · raw message

Signature · 1 line
1.9.1
#5 lore raw

PATCH v3 4/13 dm: usb: Add a uclass for USB PHY

Hi Patrice,

Quoted 11 lines · On 28 March 2017 at 10:03, <[email protected]> wrote:

From: Patrice Chotard <[email protected]>

This is a basic implementation of USB PHY which
define a standard API that link USB PHY client to
USB PHY driver controller.

---

v3: _ this patch intoduce new USB PHY uclass

Quoted 12 lines
 drivers/usb/Kconfig              |   4 ++
 drivers/usb/phy/Kconfig          |  10 ++++
 drivers/usb/phy/Makefile         |   1 +
 drivers/usb/phy/usb_phy_uclass.c |  90 +++++++++++++++++++++++++++++++
 include/dm/uclass-id.h           |   1 +
 include/usb_phy-uclass.h         |  42 +++++++++++++++
 include/usb_phy.h                | 112 +++++++++++++++++++++++++++++++++++++++
 7 files changed, 260 insertions(+)
 create mode 100644 drivers/usb/phy/Kconfig
 create mode 100644 drivers/usb/phy/usb_phy_uclass.c
 create mode 100644 include/usb_phy-uclass.h
 create mode 100644 include/usb_phy.h

Can you please take a look at u-boot-dm/next in generic_phy.h? Does that uclass do what you need or is there something specific about the USB PHY?

Regards,
Simon

#6 lore raw

PATCH v3 4/13 dm: usb: Add a uclass for USB PHY

Hi Simon

Quoted 27 lines · Simon Glass

Hi Patrice,

Quoted 11 lines · On 28 March 2017 at 10:03, <[email protected]> wrote:

From: Patrice Chotard <[email protected]>

This is a basic implementation of USB PHY which
define a standard API that link USB PHY client to
USB PHY driver controller.

---

v3: _ this patch intoduce new USB PHY uclass

Quoted 12 lines
 drivers/usb/Kconfig              |   4 ++
 drivers/usb/phy/Kconfig          |  10 ++++
 drivers/usb/phy/Makefile         |   1 +
 drivers/usb/phy/usb_phy_uclass.c |  90 +++++++++++++++++++++++++++++++
 include/dm/uclass-id.h           |   1 +
 include/usb_phy-uclass.h         |  42 +++++++++++++++
 include/usb_phy.h                | 112 +++++++++++++++++++++++++++++++++++++++
 7 files changed, 260 insertions(+)
 create mode 100644 drivers/usb/phy/Kconfig
 create mode 100644 drivers/usb/phy/usb_phy_uclass.c
 create mode 100644 include/usb_phy-uclass.h
 create mode 100644 include/usb_phy.h
Quoted 3 lines

Can you please take a look at u-boot-dm/next in generic_phy.h? Does that uclass do what you need or is there something specific about the USB PHY?

This generic_phy looks ok for my needs, i will rework this series and resubmit a v4 soon.

Thanks

Patrice

Quoted 4 lines

Regards,
Simon

#7 lore raw

PATCH v3 5/13 usb: phy: Add STi USB2 PHY

In reply to patrice.chotard at st.com

From: Patrice Chotard <[email protected]>

This is the generic phy driver for the picoPHY ports used by USB2/1.1 controllers. It is found on STiH407 SoC family from STMicroelectronics.

---

v3: _ convert driver to USB PHY uclass

v2: _ replace bitfield_replace() by clrsetbits_le32()

 doc/device-tree-bindings/phy/phy-stih407-usb.txt |  24 +++
 drivers/usb/phy/Kconfig                          |   9 ++
 drivers/usb/phy/Makefile                         |   1 +
 drivers/usb/phy/sti_usb_phy.c                    | 181 +++++++++++++++++++++++
 4 files changed, 215 insertions(+)
 create mode 100644 doc/device-tree-bindings/phy/phy-stih407-usb.txt
 create mode 100644 drivers/usb/phy/sti_usb_phy.c
doc/device-tree-bindings/phy/phy-stih407-usb.txt new file +24 -0
new file mode 100644
index 0000000..de6a706
@@ -0,0 +1,24 @@
+ST STiH407 USB PHY controller
+
+This file documents the dt bindings for the usb picoPHY driver which is the PHY for both USB2 and USB3
+host controllers (when controlling usb2/1.1 devices) available on STiH407 SoC family from STMicroelectronics.
+
+Required properties:
+- compatible		: should be "st,stih407-usb2-phy"
+- st,syscfg		: phandle of sysconfig bank plus integer array containing phyparam and phyctrl register offsets
+- resets		: list of phandle and reset specifier pairs. There should be two entries, one
+			  for the whole phy and one for the port
+- reset-names		: list of reset signal names. Should be "global" and "port"
+See: Documentation/devicetree/bindings/reset/st,sti-powerdown.txt
+See: Documentation/devicetree/bindings/reset/reset.txt
+
+Example:
+
+usb2_picophy0: usbpicophy at f8 {
+	compatible	= "st,stih407-usb2-phy";
+	#phy-cells	= <0>;
+	st,syscfg	= <&syscfg_core 0x100 0xf4>;
+	resets		= <&softreset STIH407_PICOPHY_SOFTRESET>,
+			  <&picophyreset STIH407_PICOPHY0_RESET>;
+	reset-names	= "global", "port";
+};
drivers/usb/phy/Kconfig +9 -0
index 0539401..98c1995 100644
@@ -7,4 +7,13 @@ config USB_PHY
 	  Enable driver model for USB PHY access. It defines basic
 	  init and exit API.
 
+config STI_USB_PHY
+	bool "STMicroelectronics USB2 picoPHY driver for STiH407 family"
+	depends on USB_PHY
+	default y if ARCH_STI
+	help
+	  This is the generic phy driver for the picoPHY ports
+	  used by USB2 and USB3 Host controllers available on
+	  STiH407 SoC families.
+
 endmenu
drivers/usb/phy/Makefile +1 -0
index 5314dcb..584cc96 100644
@@ -9,3 +9,4 @@ obj-$(CONFIG_USB_PHY) += usb_phy_uclass.o
 obj-$(CONFIG_TWL4030_USB) += twl4030.o
 obj-$(CONFIG_OMAP_USB_PHY) += omap_usb_phy.o
 obj-$(CONFIG_ROCKCHIP_USB2_PHY) += rockchip_usb2_phy.o
+obj-$(CONFIG_STI_USB_PHY) += sti_usb_phy.o
drivers/usb/phy/sti_usb_phy.c new file +181 -0

181 lines not on this page · raw message

Signature · 1 line
1.9.1
#8 lore raw

PATCH v3 6/13 usb: ehci: Add STi ehci support

In reply to patrice.chotard at st.com

From: Patrice Chotard <[email protected]>

Add support for on-chip ehci controller available on STMicrolectronics SoCs.
ehci support will be then available on both type A USB 2.0 connectors.

---

v3: _ update to use new USB PHY uclass

v2: _ update error messages
_ add remove callback to put core into reset

 drivers/usb/host/Kconfig    |   9 ++++
 drivers/usb/host/Makefile   |   1 +
 drivers/usb/host/ehci-sti.c | 116 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 126 insertions(+)
 create mode 100644 drivers/usb/host/ehci-sti.c
drivers/usb/host/Kconfig +9 -0
index 0bf8274..7c29bf5 100644
@@ -121,6 +121,15 @@ config USB_EHCI_MSM
 	  This driver supports combination of Chipidea USB controller
 	  and Synapsys USB PHY in host mode only.
 
+config USB_EHCI_STI
+	bool "Support for STMicroelectronics on-chip EHCI USB controller"
+	depends on ARCH_STI
+	select STI_PHY_USB
+	default y
+	---help---
+	  Enables support for the on-chip EHCI controller on
+	  STMicroelectronics SoCs.
+
 config USB_EHCI_ZYNQ
 	bool "Support for Xilinx Zynq on-chip EHCI USB controller"
 	depends on ARCH_ZYNQ
drivers/usb/host/Makefile +1 -0
index 58c0cf5..303aa32 100644
@@ -46,6 +46,7 @@ obj-$(CONFIG_USB_EHCI_MARVELL) += ehci-marvell.o
 obj-$(CONFIG_USB_EHCI_MSM) += ehci-msm.o
 obj-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o
 obj-$(CONFIG_USB_EHCI_SPEAR) += ehci-spear.o
+obj-$(CONFIG_USB_EHCI_STI) += ehci-sti.o
 obj-$(CONFIG_USB_EHCI_SUNXI) += ehci-sunxi.o
 obj-$(CONFIG_USB_EHCI_TEGRA) += ehci-tegra.o
 obj-$(CONFIG_USB_EHCI_VCT) += ehci-vct.o
drivers/usb/host/ehci-sti.c new file +116 -0

116 lines not on this page · raw message

Signature · 1 line
1.9.1
#9 lore raw

PATCH v3 7/13 usb: ohci: Add STi ohci support

In reply to patrice.chotard at st.com

From: Patrice Chotard <[email protected]>

Add support for on-chip ohci controller available on STMicrolectronics SoCs.
Ohci support will be then available on both type A USB 2.0 connectors.

---

v3: _ update to use new USB PHY uclass

v2: _ put board specific defines in a separate patch

 drivers/usb/host/Kconfig    |  9 +++++
 drivers/usb/host/Makefile   |  1 +
 drivers/usb/host/ohci-sti.c | 93 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 103 insertions(+)
 create mode 100644 drivers/usb/host/ohci-sti.c
drivers/usb/host/Kconfig +9 -0
index 7c29bf5..b259a05 100644
@@ -169,6 +169,15 @@ config USB_OHCI_GENERIC
 	---help---
 	  Enables support for generic OHCI controller.
 
+config USB_OHCI_STI
+	bool "Support for STMicroelectronics OHCI USB controller"
+	depends on ARCH_STI
+	depends on OF_CONTROL
+	depends on DM_USB
+	select USB_HOST
+	---help---
+	  Enables support for the on-chip OHCI controller on STMicroelectronics SoCs.
+
 endif # USB_OHCI_HCD
 
 config USB_UHCI_HCD
drivers/usb/host/Makefile +1 -0
index 303aa32..b78e632 100644
@@ -22,6 +22,7 @@ obj-$(CONFIG_USB_OHCI_EP93XX) += ohci-ep93xx.o
 obj-$(CONFIG_USB_OHCI_SUNXI) += ohci-sunxi.o
 obj-$(CONFIG_USB_OHCI_LPC32XX) += ohci-lpc32xx.o
 obj-$(CONFIG_USB_OHCI_GENERIC) += ohci-generic.o
+obj-$(CONFIG_USB_OHCI_STI) += ohci-sti.o
 
 # echi
 obj-$(CONFIG_USB_EHCI) += ehci-hcd.o
drivers/usb/host/ohci-sti.c new file +93 -0

93 lines not on this page · raw message

Signature · 1 line
1.9.1
#10 lore raw

PATCH v3 8/13 usb: xhci: Add STi xhci support

In reply to patrice.chotard at st.com

From: Patrice Chotard <[email protected]>

Add support for on-chip DWC3 controller available on STMicrolectronics STiH407 family SoCs.
On B2260 board, the type AB USB connector is managed by a DWC3 IP. As USB3 signals are not wired, only USB2 is supported.

---

v3: _ update to use the new USB PHY uclass
_ previously, xhci-sti driver binded dwc3-sti (STi glue driver) which was not correct.
Now we respect the device tree hierarchy, ie the STi dwc3 glue driver is first probed, then bind the xhci-sti driver.

 drivers/usb/host/Kconfig    |   8 ++++
 drivers/usb/host/Makefile   |   1 +
 drivers/usb/host/xhci-sti.c | 114 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 123 insertions(+)
 create mode 100644 drivers/usb/host/xhci-sti.c
drivers/usb/host/Kconfig +8 -0
index b259a05..62dc5b6 100644
@@ -38,6 +38,14 @@ config USB_XHCI_ROCKCHIP
 	help
 	  Enables support for the on-chip xHCI controller on Rockchip SoCs.
 
+config USB_XHCI_STI
+	bool "Support for STMicroelectronics STiH407 family on-chip xHCI USB controller"
+	depends on ARCH_STI
+	default y
+	help
+	  Enables support for the on-chip xHCI controller on STMicroelectronics
+	  STiH407 family SoCs.
+
 config USB_XHCI_ZYNQMP
 	bool "Support for Xilinx ZynqMP on-chip xHCI USB controller"
 	depends on ARCH_ZYNQMP
drivers/usb/host/Makefile +1 -0
index b78e632..40ff830 100644
@@ -66,6 +66,7 @@ obj-$(CONFIG_USB_XHCI_FSL) += xhci-fsl.o
 obj-$(CONFIG_USB_XHCI_MVEBU) += xhci-mvebu.o
 obj-$(CONFIG_USB_XHCI_OMAP) += xhci-omap.o
 obj-$(CONFIG_USB_XHCI_PCI) += xhci-pci.o
+obj-$(CONFIG_USB_XHCI_STI) += xhci-sti.o
 
 # designware
 obj-$(CONFIG_USB_DWC2) += dwc2.o
drivers/usb/host/xhci-sti.c new file +114 -0

114 lines not on this page · raw message

Signature · 1 line
1.9.1
#11 lore raw

PATCH v3 9/13 usb: dwc3: Add dwc3 glue driver support for STi

In reply to patrice.chotard at st.com

From: Patrice Chotard <[email protected]>

This patch adds the ST glue logic to manage the DWC3 HC on STiH407 SoC family. It configures the internal glue logic and syscfg registers.

Part of this code been extracted from kernel.org driver (drivers/usb/dwc3/dwc3-st.c)

---
v3: _ rename dwc3-sti.c to dwc3-sti-glue.c
_ respect device tree hierarchy, this driver is now responsible
for xhci-sti binding (done in sti_dwc3_glue_bind())

v2: _ use setbits_le32() instead of read, modify, write sequence
_ add missing parenthesis

 arch/arm/include/asm/arch-stih410/sys_proto.h |  11 +
 doc/device-tree-bindings/usb/dwc3-st.txt      |  60 ++++++
 drivers/usb/host/Makefile                     |   2 +-
 drivers/usb/host/dwc3-sti-glue.c              | 278 ++++++++++++++++++++++++++
 include/dwc3-sti-glue.h                       |  43 ++++
 5 files changed, 393 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/include/asm/arch-stih410/sys_proto.h
 create mode 100644 doc/device-tree-bindings/usb/dwc3-st.txt
 create mode 100644 drivers/usb/host/dwc3-sti-glue.c
 create mode 100644 include/dwc3-sti-glue.h
arch/arm/include/asm/arch-stih410/sys_proto.h new file +11 -0
new file mode 100644
index 0000000..5c40d3b
@@ -0,0 +1,11 @@
+/*
+ * Copyright (c) 2017
+ * Patrice Chotard <[email protected]>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#ifndef _ASM_ARCH_SYS_PROTO_H
+#define _ASM_ARCH_SYS_PROTO_H
+
+#endif /* _ASM_ARCH_SYS_PROTO_H */
doc/device-tree-bindings/usb/dwc3-st.txt new file +60 -0

60 lines not on this page · raw message

drivers/usb/host/Makefile +1 -1
index 40ff830..6be40b8 100644
@@ -66,7 +66,7 @@ obj-$(CONFIG_USB_XHCI_FSL) += xhci-fsl.o
 obj-$(CONFIG_USB_XHCI_MVEBU) += xhci-mvebu.o
 obj-$(CONFIG_USB_XHCI_OMAP) += xhci-omap.o
 obj-$(CONFIG_USB_XHCI_PCI) += xhci-pci.o
-obj-$(CONFIG_USB_XHCI_STI) += xhci-sti.o
+obj-$(CONFIG_USB_XHCI_STI) += xhci-sti.o dwc3-sti-glue.o
 
 # designware
 obj-$(CONFIG_USB_DWC2) += dwc2.o
drivers/usb/host/dwc3-sti-glue.c new file +278 -0

278 lines not on this page · raw message

include/dwc3-sti-glue.h new file +43 -0

43 lines not on this page · raw message

Signature · 1 line
1.9.1
#12 lore raw

PATCH v3 10/13 board: STiH410-B2260: add OHCI and XHCI related defines

In reply to patrice.chotard at st.com

From: Patrice Chotard <[email protected]>

---

v3: _ squas patches 8 and 10

 include/configs/stih410-b2260.h | 4 ++++
 1 file changed, 4 insertions(+)
include/configs/stih410-b2260.h +4 -0
index 6f4070f..3df0e04 100644
@@ -52,4 +52,8 @@
 
 #define CONFIG_SKIP_LOWLEVEL_INIT
 
+#define CONFIG_USB_OHCI_NEW
+#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS	2
+#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS	2
+
 #endif /* __CONFIG_H */
Signature · 1 line
1.9.1
#13 lore raw

PATCH v3 11/13 board: STiH410-B2260: add fastboot support

In reply to patrice.chotard at st.com

From: Patrice Chotard <[email protected]>

Add usb_gadget_handle_interrupts(), board_usb_init(), board_usb_cleanup() and g_dnl_board_usb_cable_connected() callbacks needed for FASTBOOT support

---
 board/st/stih410-b2260/board.c | 44 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
board/st/stih410-b2260/board.c +44 -0
index 0c06bca..3edfc7f 100644
@@ -7,6 +7,9 @@
  */
 
 #include <common.h>
+#include <dwc3-sti-glue.h>
+#include <dwc3-uboot.h>
+#include <usb.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -26,3 +29,44 @@ int board_init(void)
 {
 	return 0;
 }
+
+#ifdef CONFIG_USB_DWC3
+static struct dwc3_device dwc3_device_data = {
+	.maximum_speed = USB_SPEED_HIGH,
+	.dr_mode = USB_DR_MODE_PERIPHERAL,
+	.index = 0,
+};
+
+int usb_gadget_handle_interrupts(int index)
+{
+	dwc3_uboot_handle_interrupt(index);
+	return 0;
+}
+
+int board_usb_init(int index, enum usb_init_type init)
+{
+	int node;
+	const void *blob = gd->fdt_blob;
+
+	/* find the snps,dwc3 node */
+	node = fdt_node_offset_by_compatible(blob, -1, "snps,dwc3");
+
+	dwc3_device_data.base = fdtdec_get_addr(blob, node, "reg");
+
+	/* init dwc3 glue with mode forced to PERIPHERAL */
+	sti_dwc3_init(USB_DR_MODE_PERIPHERAL);
+
+	return dwc3_uboot_init(&dwc3_device_data);
+}
+
+int board_usb_cleanup(int index, enum usb_init_type init)
+{
+	dwc3_uboot_exit(index);
+	return 0;
+}
+
+int g_dnl_board_usb_cable_connected(void)
+{
+	return 1;
+}
+#endif
Signature · 1 line
1.9.1
#14 lore raw

PATCH v3 12/13 STiH410-B2260: enable USB Host Networking

In reply to patrice.chotard at st.com

From: Patrice Chotard <[email protected]>

---
 include/configs/stih410-b2260.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)
include/configs/stih410-b2260.h +12 -0
index 3df0e04..6c84e9b 100644
@@ -52,8 +52,20 @@
 
 #define CONFIG_SKIP_LOWLEVEL_INIT
 
+/* USB Configs */
 #define CONFIG_USB_OHCI_NEW
 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS	2
 #define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS	2
 
+#define CONFIG_USB_HOST_ETHER
+#define CONFIG_USB_ETHER_ASIX
+#define CONFIG_USB_ETHER_MCS7830
+#define CONFIG_USB_ETHER_SMSC95XX
+
+/* NET Configs */
+#define CONFIG_BOOTP_SUBNETMASK
+#define CONFIG_BOOTP_GATEWAY
+#define CONFIG_BOOTP_HOSTNAME
+#define CONFIG_BOOTP_BOOTPATH
+
 #endif /* __CONFIG_H */
Signature · 1 line
1.9.1
#15 lore raw

PATCH v3 13/13 STiH410-B2260: enable USB, fastboot, reset related flags

In reply to patrice.chotard at st.com

From: Patrice Chotard <[email protected]>

---

v2 : _ squash patch 7,9,11,12,14,16,17,18,19,20 and 21

 configs/stih410-b2260_defconfig | 36 ++++++++++++++++++++++++++++++++----
 1 file changed, 32 insertions(+), 4 deletions(-)
configs/stih410-b2260_defconfig +32 -4
index 4e6942f..b8df85c 100644
@@ -2,25 +2,53 @@ CONFIG_ARM=y
 CONFIG_ARCH_STI=y
 CONFIG_IDENT_STRING="STMicroelectronics STiH410-B2260"
 CONFIG_DEFAULT_DEVICE_TREE="stih410-b2260"
+CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_SYS_PROMPT="stih410-b2260 => "
+CONFIG_FASTBOOT=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
+CONFIG_CMD_FASTBOOT=y
+CONFIG_ANDROID_BOOT_IMAGE=y
+CONFIG_FASTBOOT_BUF_ADDR=0x40000000
+CONFIG_FASTBOOT_BUF_SIZE=0x3DF00000
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 # CONFIG_CMD_IMLS is not set
+CONFIG_CMD_GPT=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_USB=y
 CONFIG_CMD_TIME=y
 CONFIG_CMD_TIMER=y
-CONFIG_CMD_EXT2=y
-CONFIG_CMD_EXT4=y
-CONFIG_CMD_FAT=y
-CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_EXT4_WRITE=y
+# CONFIG_ISO_PARTITION is not set
 CONFIG_OF_CONTROL=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
+CONFIG_MISC=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_STI=y
 CONFIG_PINCTRL=y
+CONFIG_STI_RESET=y
 CONFIG_STI_ASC_SERIAL=y
 CONFIG_SYSRESET=y
 CONFIG_TIMER=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_STI=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_G_DNL_MANUFACTURER="STMicroelectronics"
+CONFIG_G_DNL_VENDOR_NUM=0x483
+CONFIG_G_DNL_PRODUCT_NUM=0x7270
+CONFIG_USB_PHY=y
+CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_SPL_OF_LIBFDT=y
Signature · 1 line
1.9.1
#16 lore raw

v3 cover STiH410-B2260: add reset, usb and fastboot support

In reply to patrice.chotard at st.com

Hi

It's just a gentle reminder as this series is present on mailing list since one month without any review.

Thanks

Patrice

Quoted 88 lines · patrice.chotard at st.com

From: Patrice Chotard <[email protected]>

This series adds :
_ update existing sdhci driver to use reset framework _ add usb phy driver
_ add ehci support
_ add ohci support
_ add xhci support
_ add fastboot support

With all this feature enable, it's now possible to
_ boot on usb mass storage device
_ boot from kernel image and dtb previously loaded using tftp _ update mmc partiton using fastboot

v3: _ remove reset driver (already applied on u-boot-dm tree by Simon
Glass)
_ patch 4: add new USB PHY uclass requested by Simon Glass
_ patch 5: convert STi usb phy driver to new USB PHY uclass
_ patch 6/7: update echi/ohci drivers to use USB PHY uclass
_ patch 8/9: rework xhci-sti.c and dwc3-sti.c. Previously, xhci-sti driver binded
dwc3-sti (STi glue driver) which was not correct. Now we respect the device tree hierarchy, ie the STi dwc3 glue driver is first probed, then bind the xhci-sti driver.

v2: _ add Reviewed-by: Jaehoon Chung <[email protected]> in patches 2,3 and 4
_ fix remarks done by Marek Vasut :
_ patch 5 : replace bitfield_replace() by clrsetbits_le32() _ patch 6 : update error messages and add remove callback _ patch 8 : put board specific defines in a separate patch _ patch 7: use setbits_le32() instead of read, modify, write
sequence and add missing parenthesis
_ squash previous patches 7,9,11,12,14,16,17,18,19,20 and 21
in patch 14

Patrice Chotard (13):
mmc: sti_sdhci: Rework sti_mmc_core_config()
ARM: dts: stih410-family: Add missing reset_names for mmc1 node
mmc: sti_sdhci: Use reset framework
dm: usb: Add a uclass for USB PHY
usb: phy: Add STi USB2 PHY
usb: ehci: Add STi ehci support
usb: ohci: Add STi ohci support
usb: xhci: Add STi xhci support
usb: dwc3: Add dwc3 glue driver support for STi
board: STiH410-B2260: add OHCI and XHCI related defines
board: STiH410-B2260: add fastboot support
STiH410-B2260: enable USB Host Networking
STiH410-B2260: enable USB, fastboot, reset related flags

 arch/arm/dts/stih407-family.dtsi                 |   1 +
 arch/arm/include/asm/arch-stih410/sys_proto.h    |  11 +
 board/st/stih410-b2260/board.c                   |  44 ++++
 configs/stih410-b2260_defconfig                  |  36 ++-
 doc/device-tree-bindings/phy/phy-stih407-usb.txt |  24 ++
 doc/device-tree-bindings/usb/dwc3-st.txt         |  60 +++++
 drivers/mmc/sti_sdhci.c                          |  60 +++--
 drivers/usb/Kconfig                              |   4 +
 drivers/usb/host/Kconfig                         |  26 +++
 drivers/usb/host/Makefile                        |   3 +
 drivers/usb/host/dwc3-sti-glue.c                 | 278 +++++++++++++++++++++++
 drivers/usb/host/ehci-sti.c                      | 116 ++++++++++
 drivers/usb/host/ohci-sti.c                      |  93 ++++++++
 drivers/usb/host/xhci-sti.c                      | 114 ++++++++++
 drivers/usb/phy/Kconfig                          |  19 ++
 drivers/usb/phy/Makefile                         |   2 +
 drivers/usb/phy/sti_usb_phy.c                    | 181 +++++++++++++++
 drivers/usb/phy/usb_phy_uclass.c                 |  90 ++++++++
 include/configs/stih410-b2260.h                  |  16 ++
 include/dm/uclass-id.h                           |   1 +
 include/dwc3-sti-glue.h                          |  43 ++++
 include/usb_phy-uclass.h                         |  42 ++++
 include/usb_phy.h                                | 112 +++++++++
 23 files changed, 1350 insertions(+), 26 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-stih410/sys_proto.h
 create mode 100644 doc/device-tree-bindings/phy/phy-stih407-usb.txt
 create mode 100644 doc/device-tree-bindings/usb/dwc3-st.txt
 create mode 100644 drivers/usb/host/dwc3-sti-glue.c
 create mode 100644 drivers/usb/host/ehci-sti.c
 create mode 100644 drivers/usb/host/ohci-sti.c
 create mode 100644 drivers/usb/host/xhci-sti.c
 create mode 100644 drivers/usb/phy/Kconfig
 create mode 100644 drivers/usb/phy/sti_usb_phy.c
 create mode 100644 drivers/usb/phy/usb_phy_uclass.c
 create mode 100644 include/dwc3-sti-glue.h
 create mode 100644 include/usb_phy-uclass.h
 create mode 100644 include/usb_phy.h
#17 lore raw

v3 cover STiH410-B2260: add reset, usb and fastboot support

Hi Patrice,

Quoted 5 lines · Patrice CHOTARD

Hi

It's just a gentle reminder as this series is present on mailing list since one month without any review.

I'll take a look at the phy uclass patch.

Who is the custodian for ST?

Regards,
Simon

Quoted 94 lines

Thanks

Patrice

Quoted 88 lines · patrice.chotard at st.com

From: Patrice Chotard <[email protected]>

This series adds :
_ update existing sdhci driver to use reset framework _ add usb phy driver
_ add ehci support
_ add ohci support
_ add xhci support
_ add fastboot support

With all this feature enable, it's now possible to
_ boot on usb mass storage device
_ boot from kernel image and dtb previously loaded using tftp _ update mmc partiton using fastboot

v3: _ remove reset driver (already applied on u-boot-dm tree by Simon
Glass)
_ patch 4: add new USB PHY uclass requested by Simon Glass
_ patch 5: convert STi usb phy driver to new USB PHY uclass
_ patch 6/7: update echi/ohci drivers to use USB PHY uclass
_ patch 8/9: rework xhci-sti.c and dwc3-sti.c. Previously, xhci-sti driver binded
dwc3-sti (STi glue driver) which was not correct. Now we respect the device tree hierarchy, ie the STi dwc3 glue driver is first probed, then bind the xhci-sti driver.

v2: _ add Reviewed-by: Jaehoon Chung <[email protected]> in patches 2,3 and 4
_ fix remarks done by Marek Vasut :
_ patch 5 : replace bitfield_replace() by clrsetbits_le32() _ patch 6 : update error messages and add remove callback _ patch 8 : put board specific defines in a separate patch _ patch 7: use setbits_le32() instead of read, modify, write
sequence and add missing parenthesis
_ squash previous patches 7,9,11,12,14,16,17,18,19,20 and 21
in patch 14

Patrice Chotard (13):
mmc: sti_sdhci: Rework sti_mmc_core_config()
ARM: dts: stih410-family: Add missing reset_names for mmc1 node
mmc: sti_sdhci: Use reset framework
dm: usb: Add a uclass for USB PHY
usb: phy: Add STi USB2 PHY
usb: ehci: Add STi ehci support
usb: ohci: Add STi ohci support
usb: xhci: Add STi xhci support
usb: dwc3: Add dwc3 glue driver support for STi
board: STiH410-B2260: add OHCI and XHCI related defines
board: STiH410-B2260: add fastboot support
STiH410-B2260: enable USB Host Networking
STiH410-B2260: enable USB, fastboot, reset related flags

 arch/arm/dts/stih407-family.dtsi                 |   1 +
 arch/arm/include/asm/arch-stih410/sys_proto.h    |  11 +
 board/st/stih410-b2260/board.c                   |  44 ++++
 configs/stih410-b2260_defconfig                  |  36 ++-
 doc/device-tree-bindings/phy/phy-stih407-usb.txt |  24 ++
 doc/device-tree-bindings/usb/dwc3-st.txt         |  60 +++++
 drivers/mmc/sti_sdhci.c                          |  60 +++--
 drivers/usb/Kconfig                              |   4 +
 drivers/usb/host/Kconfig                         |  26 +++
 drivers/usb/host/Makefile                        |   3 +
 drivers/usb/host/dwc3-sti-glue.c                 | 278 +++++++++++++++++++++++
 drivers/usb/host/ehci-sti.c                      | 116 ++++++++++
 drivers/usb/host/ohci-sti.c                      |  93 ++++++++
 drivers/usb/host/xhci-sti.c                      | 114 ++++++++++
 drivers/usb/phy/Kconfig                          |  19 ++
 drivers/usb/phy/Makefile                         |   2 +
 drivers/usb/phy/sti_usb_phy.c                    | 181 +++++++++++++++
 drivers/usb/phy/usb_phy_uclass.c                 |  90 ++++++++
 include/configs/stih410-b2260.h                  |  16 ++
 include/dm/uclass-id.h                           |   1 +
 include/dwc3-sti-glue.h                          |  43 ++++
 include/usb_phy-uclass.h                         |  42 ++++
 include/usb_phy.h                                | 112 +++++++++
 23 files changed, 1350 insertions(+), 26 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-stih410/sys_proto.h
 create mode 100644 doc/device-tree-bindings/phy/phy-stih407-usb.txt
 create mode 100644 doc/device-tree-bindings/usb/dwc3-st.txt
 create mode 100644 drivers/usb/host/dwc3-sti-glue.c
 create mode 100644 drivers/usb/host/ehci-sti.c
 create mode 100644 drivers/usb/host/ohci-sti.c
 create mode 100644 drivers/usb/host/xhci-sti.c
 create mode 100644 drivers/usb/phy/Kconfig
 create mode 100644 drivers/usb/phy/sti_usb_phy.c
 create mode 100644 drivers/usb/phy/usb_phy_uclass.c
 create mode 100644 include/dwc3-sti-glue.h
 create mode 100644 include/usb_phy-uclass.h
 create mode 100644 include/usb_phy.h
#18 lore raw

v3 cover STiH410-B2260: add reset, usb and fastboot support

Hi Simon

Quoted 10 lines · Simon Glass

Hi Patrice,

Quoted 5 lines · Patrice CHOTARD

Hi

It's just a gentle reminder as this series is present on mailing list since one month without any review.

I'll take a look at the phy uclass patch.

ok thank you

Quoted 2 lines

Who is the custodian for ST?

I think nobody.

Vipin Kumar <[email protected]> was ST custodian for STMicroelectronics SPEAR architecture.

I tried to contact him, got no response, and not sure he was still employed by ST.

Patrice

Quoted 98 lines

Regards,
Simon

Quoted 94 lines

Thanks

Patrice

Quoted 88 lines · patrice.chotard at st.com

From: Patrice Chotard <[email protected]>

This series adds :
_ update existing sdhci driver to use reset framework _ add usb phy driver
_ add ehci support
_ add ohci support
_ add xhci support
_ add fastboot support

With all this feature enable, it's now possible to
_ boot on usb mass storage device
_ boot from kernel image and dtb previously loaded using tftp _ update mmc partiton using fastboot

v3: _ remove reset driver (already applied on u-boot-dm tree by Simon
Glass)
_ patch 4: add new USB PHY uclass requested by Simon Glass
_ patch 5: convert STi usb phy driver to new USB PHY uclass
_ patch 6/7: update echi/ohci drivers to use USB PHY uclass
_ patch 8/9: rework xhci-sti.c and dwc3-sti.c. Previously, xhci-sti driver binded
dwc3-sti (STi glue driver) which was not correct. Now we respect the device tree hierarchy, ie the STi dwc3 glue driver is first probed, then bind the xhci-sti driver.

v2: _ add Reviewed-by: Jaehoon Chung <[email protected]> in patches 2,3 and 4
_ fix remarks done by Marek Vasut :
_ patch 5 : replace bitfield_replace() by clrsetbits_le32() _ patch 6 : update error messages and add remove callback _ patch 8 : put board specific defines in a separate patch _ patch 7: use setbits_le32() instead of read, modify, write
sequence and add missing parenthesis
_ squash previous patches 7,9,11,12,14,16,17,18,19,20 and 21
in patch 14

Patrice Chotard (13):
mmc: sti_sdhci: Rework sti_mmc_core_config()
ARM: dts: stih410-family: Add missing reset_names for mmc1 node
mmc: sti_sdhci: Use reset framework
dm: usb: Add a uclass for USB PHY
usb: phy: Add STi USB2 PHY
usb: ehci: Add STi ehci support
usb: ohci: Add STi ohci support
usb: xhci: Add STi xhci support
usb: dwc3: Add dwc3 glue driver support for STi
board: STiH410-B2260: add OHCI and XHCI related defines
board: STiH410-B2260: add fastboot support
STiH410-B2260: enable USB Host Networking
STiH410-B2260: enable USB, fastboot, reset related flags

 arch/arm/dts/stih407-family.dtsi                 |   1 +
 arch/arm/include/asm/arch-stih410/sys_proto.h    |  11 +
 board/st/stih410-b2260/board.c                   |  44 ++++
 configs/stih410-b2260_defconfig                  |  36 ++-
 doc/device-tree-bindings/phy/phy-stih407-usb.txt |  24 ++
 doc/device-tree-bindings/usb/dwc3-st.txt         |  60 +++++
 drivers/mmc/sti_sdhci.c                          |  60 +++--
 drivers/usb/Kconfig                              |   4 +
 drivers/usb/host/Kconfig                         |  26 +++
 drivers/usb/host/Makefile                        |   3 +
 drivers/usb/host/dwc3-sti-glue.c                 | 278 +++++++++++++++++++++++
 drivers/usb/host/ehci-sti.c                      | 116 ++++++++++
 drivers/usb/host/ohci-sti.c                      |  93 ++++++++
 drivers/usb/host/xhci-sti.c                      | 114 ++++++++++
 drivers/usb/phy/Kconfig                          |  19 ++
 drivers/usb/phy/Makefile                         |   2 +
 drivers/usb/phy/sti_usb_phy.c                    | 181 +++++++++++++++
 drivers/usb/phy/usb_phy_uclass.c                 |  90 ++++++++
 include/configs/stih410-b2260.h                  |  16 ++
 include/dm/uclass-id.h                           |   1 +
 include/dwc3-sti-glue.h                          |  43 ++++
 include/usb_phy-uclass.h                         |  42 ++++
 include/usb_phy.h                                | 112 +++++++++
 23 files changed, 1350 insertions(+), 26 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-stih410/sys_proto.h
 create mode 100644 doc/device-tree-bindings/phy/phy-stih407-usb.txt
 create mode 100644 doc/device-tree-bindings/usb/dwc3-st.txt
 create mode 100644 drivers/usb/host/dwc3-sti-glue.c
 create mode 100644 drivers/usb/host/ehci-sti.c
 create mode 100644 drivers/usb/host/ohci-sti.c
 create mode 100644 drivers/usb/host/xhci-sti.c
 create mode 100644 drivers/usb/phy/Kconfig
 create mode 100644 drivers/usb/phy/sti_usb_phy.c
 create mode 100644 drivers/usb/phy/usb_phy_uclass.c
 create mode 100644 include/dwc3-sti-glue.h
 create mode 100644 include/usb_phy-uclass.h
 create mode 100644 include/usb_phy.h
#19 lore raw

v3 cover STiH410-B2260: add reset, usb and fastboot support

+Tom

Hi Patrice,

Quoted 19 lines · Patrice CHOTARD

Hi Simon

Quoted 10 lines · Simon Glass

Hi Patrice,

Quoted 5 lines · Patrice CHOTARD

Hi

It's just a gentle reminder as this series is present on mailing list since one month without any review.

I'll take a look at the phy uclass patch.

ok thank you

Quoted 2 lines

Who is the custodian for ST?

Quoted 7 lines

I think nobody.

Vipin Kumar <[email protected]> was ST custodian for STMicroelectronics SPEAR architecture.

I tried to contact him, got no response, and not sure he was still employed by ST.

OK. I wonder if Tom might apply these, although I have a comment on the PHY patch.

Regards,
Simon

Quoted 103 lines

Patrice

Quoted 98 lines

Regards,
Simon

Quoted 94 lines

Thanks

Patrice

Quoted 88 lines · patrice.chotard at st.com

From: Patrice Chotard <[email protected]>

This series adds :
_ update existing sdhci driver to use reset framework _ add usb phy driver
_ add ehci support
_ add ohci support
_ add xhci support
_ add fastboot support

With all this feature enable, it's now possible to
_ boot on usb mass storage device
_ boot from kernel image and dtb previously loaded using tftp _ update mmc partiton using fastboot

v3: _ remove reset driver (already applied on u-boot-dm tree by Simon
Glass)
_ patch 4: add new USB PHY uclass requested by Simon Glass
_ patch 5: convert STi usb phy driver to new USB PHY uclass
_ patch 6/7: update echi/ohci drivers to use USB PHY uclass
_ patch 8/9: rework xhci-sti.c and dwc3-sti.c. Previously, xhci-sti driver binded
dwc3-sti (STi glue driver) which was not correct. Now we respect the device tree hierarchy, ie the STi dwc3 glue driver is first probed, then bind the xhci-sti driver.

v2: _ add Reviewed-by: Jaehoon Chung <[email protected]> in patches 2,3 and 4
_ fix remarks done by Marek Vasut :
_ patch 5 : replace bitfield_replace() by clrsetbits_le32() _ patch 6 : update error messages and add remove callback _ patch 8 : put board specific defines in a separate patch _ patch 7: use setbits_le32() instead of read, modify, write
sequence and add missing parenthesis
_ squash previous patches 7,9,11,12,14,16,17,18,19,20 and 21
in patch 14

Patrice Chotard (13):
mmc: sti_sdhci: Rework sti_mmc_core_config()
ARM: dts: stih410-family: Add missing reset_names for mmc1 node
mmc: sti_sdhci: Use reset framework
dm: usb: Add a uclass for USB PHY
usb: phy: Add STi USB2 PHY
usb: ehci: Add STi ehci support
usb: ohci: Add STi ohci support
usb: xhci: Add STi xhci support
usb: dwc3: Add dwc3 glue driver support for STi
board: STiH410-B2260: add OHCI and XHCI related defines
board: STiH410-B2260: add fastboot support
STiH410-B2260: enable USB Host Networking
STiH410-B2260: enable USB, fastboot, reset related flags

 arch/arm/dts/stih407-family.dtsi                 |   1 +
 arch/arm/include/asm/arch-stih410/sys_proto.h    |  11 +
 board/st/stih410-b2260/board.c                   |  44 ++++
 configs/stih410-b2260_defconfig                  |  36 ++-
 doc/device-tree-bindings/phy/phy-stih407-usb.txt |  24 ++
 doc/device-tree-bindings/usb/dwc3-st.txt         |  60 +++++
 drivers/mmc/sti_sdhci.c                          |  60 +++--
 drivers/usb/Kconfig                              |   4 +
 drivers/usb/host/Kconfig                         |  26 +++
 drivers/usb/host/Makefile                        |   3 +
 drivers/usb/host/dwc3-sti-glue.c                 | 278 +++++++++++++++++++++++
 drivers/usb/host/ehci-sti.c                      | 116 ++++++++++
 drivers/usb/host/ohci-sti.c                      |  93 ++++++++
 drivers/usb/host/xhci-sti.c                      | 114 ++++++++++
 drivers/usb/phy/Kconfig                          |  19 ++
 drivers/usb/phy/Makefile                         |   2 +
 drivers/usb/phy/sti_usb_phy.c                    | 181 +++++++++++++++
 drivers/usb/phy/usb_phy_uclass.c                 |  90 ++++++++
 include/configs/stih410-b2260.h                  |  16 ++
 include/dm/uclass-id.h                           |   1 +
 include/dwc3-sti-glue.h                          |  43 ++++
 include/usb_phy-uclass.h                         |  42 ++++
 include/usb_phy.h                                | 112 +++++++++
 23 files changed, 1350 insertions(+), 26 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-stih410/sys_proto.h
 create mode 100644 doc/device-tree-bindings/phy/phy-stih407-usb.txt
 create mode 100644 doc/device-tree-bindings/usb/dwc3-st.txt
 create mode 100644 drivers/usb/host/dwc3-sti-glue.c
 create mode 100644 drivers/usb/host/ehci-sti.c
 create mode 100644 drivers/usb/host/ohci-sti.c
 create mode 100644 drivers/usb/host/xhci-sti.c
 create mode 100644 drivers/usb/phy/Kconfig
 create mode 100644 drivers/usb/phy/sti_usb_phy.c
 create mode 100644 drivers/usb/phy/usb_phy_uclass.c
 create mode 100644 include/dwc3-sti-glue.h
 create mode 100644 include/usb_phy-uclass.h
 create mode 100644 include/usb_phy.h
#20 lore raw

v3 cover STiH410-B2260: add reset, usb and fastboot support

In reply to Patrice CHOTARD

Hi Simon and Patrice

Quoted 23 lines

Hi Simon

Quoted 3 lines · Simon Glass

Hi Patrice,

On 27 April 2017 at 05:30, Patrice CHOTARD <[email protected]>

Quoted 7 lines · wrote:
Quoted 5 lines

Hi

It's just a gentle reminder as this series is present on mailing list since one month without any review.

I'll take a look at the phy uclass patch.

ok thank you

Quoted 2 lines

Who is the custodian for ST?

I think nobody.

Quoted 8 lines

Vipin Kumar <[email protected]> was ST custodian for STMicroelectronics SPEAR architecture.

I tried to contact him, got no response, and not sure he was still employed by ST.

Patrice

Few Month ago I had the next answer for vipin when I ask about ST branch :

Hello Patrick,
I used to manage u-boot on spear for the time I was at ST. As you rightly pointed, this branch is unused and can be used by an ST employee for other projects
However, you would still have to ping Wolfgang denk to pass the ssh key Regards
Vipin

So the ST branch is today orphan, without custodians.

In the near future ST will propose someone to take back this role for new ST projects (new chip but no for spear family).

Do you think is already time to propose a new name ?

Regards,

Patrick

#21 lore raw

v3 cover STiH410-B2260: add reset, usb and fastboot support

Hi Patrick, Simon

+Tom Rini

Quoted 44 lines · Patrick DELAUNAY

Hi Simon and Patrice

Quoted 23 lines

Hi Simon

Quoted 3 lines · Simon Glass

Hi Patrice,

On 27 April 2017 at 05:30, Patrice CHOTARD <[email protected]>

Quoted 7 lines · wrote:
Quoted 5 lines

Hi

It's just a gentle reminder as this series is present on mailing list since one month without any review.

I'll take a look at the phy uclass patch.

ok thank you

Quoted 2 lines

Who is the custodian for ST?

I think nobody.

Quoted 8 lines

Vipin Kumar <[email protected]> was ST custodian for STMicroelectronics SPEAR architecture.

I tried to contact him, got no response, and not sure he was still employed by ST.

Patrice

Few Month ago I had the next answer for vipin when I ask about ST branch :

Hello Patrick,
I used to manage u-boot on spear for the time I was at ST. As you rightly pointed, this branch is unused and can be used by an ST employee for other projects
However, you would still have to ping Wolfgang denk to pass the ssh key Regards
Vipin

Quoted 5 lines

So the ST branch is today orphan, without custodians.

In the near future ST will propose someone to take back this role for new ST projects (new chip but no for spear family).

Do you think is already time to propose a new name ?

Few weeks ago, i asked if a dedicated STi U-Boot git tree was needed for my upstream activities about STiH410-B2260, Tom didn't required it
(http://u-boot.10912.n7.nabble.com/STi-U-boot-git-tree-request-td283565.html).

Tom, Simon, tell us about your favorite choice. At STMicroelectronics, we can propose someone for current ST platforms (STi and STM32) and for newt projects.

Patrice

Quoted 5 lines

Regards,

Patrick

#22 lore raw

v3 cover STiH410-B2260: add reset, usb and fastboot support

Quoted 55 lines · Patrice CHOTARD

Hi Patrick, Simon

+Tom Rini

Quoted 44 lines · Patrick DELAUNAY

Hi Simon and Patrice

Quoted 23 lines

Hi Simon

Quoted 3 lines · Simon Glass

Hi Patrice,

On 27 April 2017 at 05:30, Patrice CHOTARD <[email protected]>

Quoted 7 lines · wrote:
Quoted 5 lines

Hi

It's just a gentle reminder as this series is present on mailing list since one month without any review.

I'll take a look at the phy uclass patch.

ok thank you

Quoted 2 lines

Who is the custodian for ST?

I think nobody.

Quoted 8 lines

Vipin Kumar <[email protected]> was ST custodian for STMicroelectronics SPEAR architecture.

I tried to contact him, got no response, and not sure he was still employed by ST.

Patrice

Few Month ago I had the next answer for vipin when I ask about ST branch :

Hello Patrick,
I used to manage u-boot on spear for the time I was at ST. As you rightly pointed, this branch is unused and can be used by an ST employee for other projects
However, you would still have to ping Wolfgang denk to pass the ssh key Regards
Vipin

Quoted 5 lines

So the ST branch is today orphan, without custodians.

In the near future ST will propose someone to take back this role for new ST projects (new chip but no for spear family).

Do you think is already time to propose a new name ?

Quoted 7 lines

Few weeks ago, i asked if a dedicated STi U-Boot git tree was needed for my upstream activities about STiH410-B2260, Tom didn't required it
(http://u-boot.10912.n7.nabble.com/STi-U-boot-git-tree-request-td283565.html).

Tom, Simon, tell us about your favorite choice. At STMicroelectronics, we can propose someone for current ST platforms (STi and STM32) and for newt projects.

Well, As I was asking in private, there's no overlap between STM32 and STi, so I don't think we need a "st" tree at this time. Thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170509/2383eb02/attachment.sig>
#23 lore raw

v3 cover STiH410-B2260: add reset, usb and fastboot support

In reply to patrice.chotard at st.com

FYI a new v4 is available following remarks from Simon Glass in order to use the new PHY uclass available on dm-next branch

Patrice

Quoted 88 lines · patrice.chotard at st.com

From: Patrice Chotard <[email protected]>

This series adds :
_ update existing sdhci driver to use reset framework _ add usb phy driver
_ add ehci support
_ add ohci support
_ add xhci support
_ add fastboot support

With all this feature enable, it's now possible to
_ boot on usb mass storage device
_ boot from kernel image and dtb previously loaded using tftp _ update mmc partiton using fastboot

v3: _ remove reset driver (already applied on u-boot-dm tree by Simon
Glass)
_ patch 4: add new USB PHY uclass requested by Simon Glass
_ patch 5: convert STi usb phy driver to new USB PHY uclass
_ patch 6/7: update echi/ohci drivers to use USB PHY uclass
_ patch 8/9: rework xhci-sti.c and dwc3-sti.c. Previously, xhci-sti driver binded
dwc3-sti (STi glue driver) which was not correct. Now we respect the device tree hierarchy, ie the STi dwc3 glue driver is first probed, then bind the xhci-sti driver.

v2: _ add Reviewed-by: Jaehoon Chung <[email protected]> in patches 2,3 and 4
_ fix remarks done by Marek Vasut :
_ patch 5 : replace bitfield_replace() by clrsetbits_le32() _ patch 6 : update error messages and add remove callback _ patch 8 : put board specific defines in a separate patch _ patch 7: use setbits_le32() instead of read, modify, write
sequence and add missing parenthesis
_ squash previous patches 7,9,11,12,14,16,17,18,19,20 and 21
in patch 14

Patrice Chotard (13):
mmc: sti_sdhci: Rework sti_mmc_core_config()
ARM: dts: stih410-family: Add missing reset_names for mmc1 node
mmc: sti_sdhci: Use reset framework
dm: usb: Add a uclass for USB PHY
usb: phy: Add STi USB2 PHY
usb: ehci: Add STi ehci support
usb: ohci: Add STi ohci support
usb: xhci: Add STi xhci support
usb: dwc3: Add dwc3 glue driver support for STi
board: STiH410-B2260: add OHCI and XHCI related defines
board: STiH410-B2260: add fastboot support
STiH410-B2260: enable USB Host Networking
STiH410-B2260: enable USB, fastboot, reset related flags

 arch/arm/dts/stih407-family.dtsi                 |   1 +
 arch/arm/include/asm/arch-stih410/sys_proto.h    |  11 +
 board/st/stih410-b2260/board.c                   |  44 ++++
 configs/stih410-b2260_defconfig                  |  36 ++-
 doc/device-tree-bindings/phy/phy-stih407-usb.txt |  24 ++
 doc/device-tree-bindings/usb/dwc3-st.txt         |  60 +++++
 drivers/mmc/sti_sdhci.c                          |  60 +++--
 drivers/usb/Kconfig                              |   4 +
 drivers/usb/host/Kconfig                         |  26 +++
 drivers/usb/host/Makefile                        |   3 +
 drivers/usb/host/dwc3-sti-glue.c                 | 278 +++++++++++++++++++++++
 drivers/usb/host/ehci-sti.c                      | 116 ++++++++++
 drivers/usb/host/ohci-sti.c                      |  93 ++++++++
 drivers/usb/host/xhci-sti.c                      | 114 ++++++++++
 drivers/usb/phy/Kconfig                          |  19 ++
 drivers/usb/phy/Makefile                         |   2 +
 drivers/usb/phy/sti_usb_phy.c                    | 181 +++++++++++++++
 drivers/usb/phy/usb_phy_uclass.c                 |  90 ++++++++
 include/configs/stih410-b2260.h                  |  16 ++
 include/dm/uclass-id.h                           |   1 +
 include/dwc3-sti-glue.h                          |  43 ++++
 include/usb_phy-uclass.h                         |  42 ++++
 include/usb_phy.h                                | 112 +++++++++
 23 files changed, 1350 insertions(+), 26 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-stih410/sys_proto.h
 create mode 100644 doc/device-tree-bindings/phy/phy-stih407-usb.txt
 create mode 100644 doc/device-tree-bindings/usb/dwc3-st.txt
 create mode 100644 drivers/usb/host/dwc3-sti-glue.c
 create mode 100644 drivers/usb/host/ehci-sti.c
 create mode 100644 drivers/usb/host/ohci-sti.c
 create mode 100644 drivers/usb/host/xhci-sti.c
 create mode 100644 drivers/usb/phy/Kconfig
 create mode 100644 drivers/usb/phy/sti_usb_phy.c
 create mode 100644 drivers/usb/phy/usb_phy_uclass.c
 create mode 100644 include/dwc3-sti-glue.h
 create mode 100644 include/usb_phy-uclass.h
 create mode 100644 include/usb_phy.h