Skip to contentSkip to conversation

bmips: add support for bcm6318 usbh phy

PATCH Superseded Álvaro Fernández Rojas 2 participants 10 messages Feb 4, 2018 – Mar 19, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover bmips: add support for bcm6318 usbh phy

Add support for BCM6318 usbh phy.

Álvaro Fernández Rojas (3):
phy: add support for bcm6318 usbh phy
mips: bmips: add support for bcm6318 usb
mips: bmips: add ar-5315 usb support

 arch/mips/dts/brcm,bcm6318.dtsi        |  30 +++++++
 arch/mips/dts/comtrend,ar-5315u.dts    |  12 +++
 configs/comtrend_ar5315u_ram_defconfig |   9 +++
 drivers/phy/Kconfig                    |   7 ++
 drivers/phy/Makefile                   |   1 +
 drivers/phy/bcm6318-usbh-phy.c         | 144 +++++++++++++++++++++++++++++++++
 include/configs/bmips_bcm6318.h        |   7 ++
 7 files changed, 210 insertions(+)
 create mode 100644 drivers/phy/bcm6318-usbh-phy.c
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/3 phy: add support for bcm6318 usbh phy

---
 drivers/phy/Kconfig            |   7 ++
 drivers/phy/Makefile           |   1 +
 drivers/phy/bcm6318-usbh-phy.c | 144 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 152 insertions(+)
 create mode 100644 drivers/phy/bcm6318-usbh-phy.c
drivers/phy/Kconfig +7 -0
index d3fa9ded2a..4e9d09910c 100644
@@ -59,6 +59,13 @@ config SPL_NOP_PHY
 	  This is useful when a driver uses the PHY framework but no real PHY
 	  hardware exists.
 
+config BCM6318_USBH_PHY
+	bool "BCM6318 USBH PHY support"
+	depends on PHY && ARCH_BMIPS
+	select POWER_DOMAIN
+	help
+	  Support for the Broadcom MIPS BCM6318 USBH PHY.
+
 config BCM6348_USBH_PHY
 	bool "BCM6348 USBH PHY support"
 	depends on PHY && ARCH_BMIPS
drivers/phy/Makefile +1 -0
index d8239854a3..68087ae3b1 100644
@@ -7,6 +7,7 @@
 
 obj-$(CONFIG_$(SPL_)PHY) += phy-uclass.o
 obj-$(CONFIG_$(SPL_)NOP_PHY) += nop-phy.o
+obj-$(CONFIG_BCM6318_USBH_PHY) += bcm6318-usbh-phy.o
 obj-$(CONFIG_BCM6348_USBH_PHY) += bcm6348-usbh-phy.o
 obj-$(CONFIG_BCM6358_USBH_PHY) += bcm6358-usbh-phy.o
 obj-$(CONFIG_BCM6368_USBH_PHY) += bcm6368-usbh-phy.o
drivers/phy/bcm6318-usbh-phy.c new file +144 -0

144 lines not on this page · raw message

Signature · 1 line
2.11.0
#2 lore raw

PATCH v2 1/3 phy: add support for bcm6318 usbh phy

Quoted 8 lines · Álvaro Fernández Rojas
---
 drivers/phy/Kconfig            |   7 ++
 drivers/phy/Makefile           |   1 +
 drivers/phy/bcm6318-usbh-phy.c | 144 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 152 insertions(+)
 create mode 100644 drivers/phy/bcm6318-usbh-phy.c
Signature · 9 lines
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180204/69078684/attachment.sig>
#3 lore raw

PATCH 2/3 mips: bmips: add support for bcm6318 usb

In reply to Álvaro Fernández Rojas
---
 arch/mips/dts/brcm,bcm6318.dtsi | 30 ++++++++++++++++++++++++++++++
 include/configs/bmips_bcm6318.h |  7 +++++++
 2 files changed, 37 insertions(+)
arch/mips/dts/brcm,bcm6318.dtsi +30 -0
index 54964a7009..015acc9173 100644
@@ -153,5 +153,35 @@
 			reg = <0x10004000 0x38>;
 			u-boot,dm-pre-reloc;
 		};
+
+		ehci: usb-controller at 10005000 {
+			compatible = "brcm,bcm6318-ehci", "generic-ehci";
+			reg = <0x10005000 0x100>;
+			phys = <&usbh>;
+			big-endian;
+
+			status = "disabled";
+		};
+
+		ohci: usb-controller at 10005100 {
+			compatible = "brcm,bcm6318-ohci", "generic-ohci";
+			reg = <0x10005100 0x100>;
+			phys = <&usbh>;
+			big-endian;
+
+			status = "disabled";
+		};
+
+		usbh: usb-phy at 10005200 {
+			compatible = "brcm,bcm6318-usbh";
+			reg = <0x10005200 0x30>;
+			#phy-cells = <0>;
+			clocks = <&periph_clk BCM6318_CLK_USB>;
+			clock-names = "usbh";
+			power-domains = <&periph_pwr BCM6318_PWR_USB>;
+			resets = <&periph_rst BCM6318_RST_USBH>;
+
+			status = "disabled";
+		};
 	};
 };
include/configs/bmips_bcm6318.h +7 -0
index 454a7b7f7b..5541cc5cf6 100644
@@ -14,6 +14,13 @@
 #define CONFIG_NR_DRAM_BANKS		1
 #define CONFIG_SYS_SDRAM_BASE		0x80000000
 
+/* USB */
+#define CONFIG_EHCI_DESC_BIG_ENDIAN
+#define CONFIG_EHCI_MMIO_BIG_ENDIAN
+#define CONFIG_SYS_OHCI_SWAP_REG_ACCESS
+#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
+#define CONFIG_USB_OHCI_NEW
+
 /* U-Boot */
 #define CONFIG_SYS_LOAD_ADDR		CONFIG_SYS_SDRAM_BASE + 0x100000
 
Signature · 1 line
2.11.0
#4 lore raw

PATCH 3/3 mips: bmips: add ar-5315 usb support

In reply to Álvaro Fernández Rojas
---
 arch/mips/dts/comtrend,ar-5315u.dts    | 12 ++++++++++++
 configs/comtrend_ar5315u_ram_defconfig |  9 +++++++++
 2 files changed, 21 insertions(+)
arch/mips/dts/comtrend,ar-5315u.dts +12 -0
index 4e4d69b638..af3159a03a 100644
@@ -21,6 +21,10 @@
 	};
 };
 
+&ehci {
+	status = "okay";
+};
+
 &leds {
 	status = "okay";
 
@@ -67,6 +71,10 @@
 	};
 };
 
+&ohci {
+	status = "okay";
+};
+
 &spi {
 	status = "okay";
 
@@ -83,3 +91,7 @@
 	u-boot,dm-pre-reloc;
 	status = "okay";
 };
+
+&usbh {
+	status = "okay";
+};
configs/comtrend_ar5315u_ram_defconfig +9 -0
index c83234a98b..1c3595d2b4 100644
@@ -28,6 +28,7 @@ CONFIG_CMD_MEMINFO=y
 # CONFIG_CMD_LOADS is not set
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
+CONFIG_CMD_USB=y
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
 # CONFIG_CMD_MISC is not set
@@ -41,6 +42,8 @@ CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SPI_FLASH_MTD=y
+CONFIG_PHY=y
+CONFIG_BCM6358_USBH_PHY=y
 CONFIG_POWER_DOMAIN=y
 CONFIG_BCM6328_POWER_DOMAIN=y
 CONFIG_DM_RESET=y
@@ -50,3 +53,9 @@ CONFIG_DM_SERIAL=y
 CONFIG_BCM6345_SERIAL=y
 CONFIG_DM_SPI=y
 CONFIG_BCM63XX_HSSPI=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_GENERIC=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_GENERIC=y
Signature · 1 line
2.11.0
#5 lore raw

v2 cover bmips: add support for bcm6318 usbh phy

In reply to Álvaro Fernández Rojas

Add support for BCM6318 usbh phy.

v2: use correct phy driver

Álvaro Fernández Rojas (3):
phy: add support for bcm6318 usbh phy
mips: bmips: add support for bcm6318 usb
mips: bmips: add ar-5315 usb support

 arch/mips/dts/brcm,bcm6318.dtsi        |  30 +++++++
 arch/mips/dts/comtrend,ar-5315u.dts    |  12 +++
 configs/comtrend_ar5315u_ram_defconfig |   9 +++
 drivers/phy/Kconfig                    |   7 ++
 drivers/phy/Makefile                   |   1 +
 drivers/phy/bcm6318-usbh-phy.c         | 144 +++++++++++++++++++++++++++++++++
 include/configs/bmips_bcm6318.h        |   7 ++
 7 files changed, 210 insertions(+)
 create mode 100644 drivers/phy/bcm6318-usbh-phy.c
Signature · 1 line
2.11.0
#6 lore raw

PATCH v2 1/3 phy: add support for bcm6318 usbh phy

---
v2: no changes

 drivers/phy/Kconfig            |   7 ++
 drivers/phy/Makefile           |   1 +
 drivers/phy/bcm6318-usbh-phy.c | 144 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 152 insertions(+)
 create mode 100644 drivers/phy/bcm6318-usbh-phy.c
drivers/phy/Kconfig +7 -0
index d3fa9ded2a..4e9d09910c 100644
@@ -59,6 +59,13 @@ config SPL_NOP_PHY
 	  This is useful when a driver uses the PHY framework but no real PHY
 	  hardware exists.
 
+config BCM6318_USBH_PHY
+	bool "BCM6318 USBH PHY support"
+	depends on PHY && ARCH_BMIPS
+	select POWER_DOMAIN
+	help
+	  Support for the Broadcom MIPS BCM6318 USBH PHY.
+
 config BCM6348_USBH_PHY
 	bool "BCM6348 USBH PHY support"
 	depends on PHY && ARCH_BMIPS
drivers/phy/Makefile +1 -0
index d8239854a3..68087ae3b1 100644
@@ -7,6 +7,7 @@
 
 obj-$(CONFIG_$(SPL_)PHY) += phy-uclass.o
 obj-$(CONFIG_$(SPL_)NOP_PHY) += nop-phy.o
+obj-$(CONFIG_BCM6318_USBH_PHY) += bcm6318-usbh-phy.o
 obj-$(CONFIG_BCM6348_USBH_PHY) += bcm6348-usbh-phy.o
 obj-$(CONFIG_BCM6358_USBH_PHY) += bcm6358-usbh-phy.o
 obj-$(CONFIG_BCM6368_USBH_PHY) += bcm6368-usbh-phy.o
drivers/phy/bcm6318-usbh-phy.c new file +144 -0

144 lines not on this page · raw message

Signature · 1 line
2.11.0
#7 lore raw

PATCH v2 2/3 mips: bmips: add support for bcm6318 usb

In reply to Álvaro Fernández Rojas

---
v2: no changes

 arch/mips/dts/brcm,bcm6318.dtsi | 30 ++++++++++++++++++++++++++++++
 include/configs/bmips_bcm6318.h |  7 +++++++
 2 files changed, 37 insertions(+)
arch/mips/dts/brcm,bcm6318.dtsi +30 -0
index 54964a7009..015acc9173 100644
@@ -153,5 +153,35 @@
 			reg = <0x10004000 0x38>;
 			u-boot,dm-pre-reloc;
 		};
+
+		ehci: usb-controller at 10005000 {
+			compatible = "brcm,bcm6318-ehci", "generic-ehci";
+			reg = <0x10005000 0x100>;
+			phys = <&usbh>;
+			big-endian;
+
+			status = "disabled";
+		};
+
+		ohci: usb-controller at 10005100 {
+			compatible = "brcm,bcm6318-ohci", "generic-ohci";
+			reg = <0x10005100 0x100>;
+			phys = <&usbh>;
+			big-endian;
+
+			status = "disabled";
+		};
+
+		usbh: usb-phy at 10005200 {
+			compatible = "brcm,bcm6318-usbh";
+			reg = <0x10005200 0x30>;
+			#phy-cells = <0>;
+			clocks = <&periph_clk BCM6318_CLK_USB>;
+			clock-names = "usbh";
+			power-domains = <&periph_pwr BCM6318_PWR_USB>;
+			resets = <&periph_rst BCM6318_RST_USBH>;
+
+			status = "disabled";
+		};
 	};
 };
include/configs/bmips_bcm6318.h +7 -0
index 454a7b7f7b..5541cc5cf6 100644
@@ -14,6 +14,13 @@
 #define CONFIG_NR_DRAM_BANKS		1
 #define CONFIG_SYS_SDRAM_BASE		0x80000000
 
+/* USB */
+#define CONFIG_EHCI_DESC_BIG_ENDIAN
+#define CONFIG_EHCI_MMIO_BIG_ENDIAN
+#define CONFIG_SYS_OHCI_SWAP_REG_ACCESS
+#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
+#define CONFIG_USB_OHCI_NEW
+
 /* U-Boot */
 #define CONFIG_SYS_LOAD_ADDR		CONFIG_SYS_SDRAM_BASE + 0x100000
 
Signature · 1 line
2.11.0
#8 lore raw

PATCH v2 3/3 mips: bmips: add ar-5315 usb support

In reply to Álvaro Fernández Rojas

---
v2: use correct phy driver

 arch/mips/dts/comtrend,ar-5315u.dts    | 12 ++++++++++++
 configs/comtrend_ar5315u_ram_defconfig |  9 +++++++++
 2 files changed, 21 insertions(+)
arch/mips/dts/comtrend,ar-5315u.dts +12 -0
index 4e4d69b638..af3159a03a 100644
@@ -21,6 +21,10 @@
 	};
 };
 
+&ehci {
+	status = "okay";
+};
+
 &leds {
 	status = "okay";
 
@@ -67,6 +71,10 @@
 	};
 };
 
+&ohci {
+	status = "okay";
+};
+
 &spi {
 	status = "okay";
 
@@ -83,3 +91,7 @@
 	u-boot,dm-pre-reloc;
 	status = "okay";
 };
+
+&usbh {
+	status = "okay";
+};
configs/comtrend_ar5315u_ram_defconfig +9 -0
index c83234a98b..586074c08e 100644
@@ -28,6 +28,7 @@ CONFIG_CMD_MEMINFO=y
 # CONFIG_CMD_LOADS is not set
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
+CONFIG_CMD_USB=y
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
 # CONFIG_CMD_MISC is not set
@@ -41,6 +42,8 @@ CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SPI_FLASH_MTD=y
+CONFIG_PHY=y
+CONFIG_BCM6318_USBH_PHY=y
 CONFIG_POWER_DOMAIN=y
 CONFIG_BCM6328_POWER_DOMAIN=y
 CONFIG_DM_RESET=y
@@ -50,3 +53,9 @@ CONFIG_DM_SERIAL=y
 CONFIG_BCM6345_SERIAL=y
 CONFIG_DM_SPI=y
 CONFIG_BCM63XX_HSSPI=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_GENERIC=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_GENERIC=y
Signature · 1 line
2.11.0
#9 lore raw

v2 cover bmips: add support for bcm6318 usbh phy

In reply to Álvaro Fernández Rojas
Quoted 9 lines · Álvaro Fernández Rojas

Add support for BCM6318 usbh phy.

v2: use correct phy driver

Álvaro Fernández Rojas (3):
phy: add support for bcm6318 usbh phy
mips: bmips: add support for bcm6318 usb
mips: bmips: add ar-5315 usb support

Quoted 10 lines
 arch/mips/dts/brcm,bcm6318.dtsi        |  30 +++++++
 arch/mips/dts/comtrend,ar-5315u.dts    |  12 +++
 configs/comtrend_ar5315u_ram_defconfig |   9 +++
 drivers/phy/Kconfig                    |   7 ++
 drivers/phy/Makefile                   |   1 +
 drivers/phy/bcm6318-usbh-phy.c         | 144 +++++++++++++++++++++++++++++++++
 include/configs/bmips_bcm6318.h        |   7 ++
 7 files changed, 210 insertions(+)
 create mode 100644 drivers/phy/bcm6318-usbh-phy.c

applied to u-boot-mips, thanks.

Signature · 9 lines
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180319/2dad9f03/attachment.sig>