Skip to contentSkip to conversation

bmips: add support for bcm6358 usbh phy

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

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

cover bmips: add support for bcm6358 usbh phy

Add support for BCM6358 usbh phy.

Álvaro Fernández Rojas (4):
phy: add support for bcm6358 usbh phy
mips: bmips: add support for bcm6358 usb
mips: bmips: add hg556a usb support
mips: bmips: add nb4-ser usb support

 arch/mips/dts/brcm,bcm6358.dtsi     | 27 +++++++++++
 arch/mips/dts/huawei,hg556a.dts     | 12 +++++
 arch/mips/dts/sfr,nb4-ser.dts       | 12 +++++
 configs/huawei_hg556a_ram_defconfig |  9 ++++
 configs/sfr_nb4-ser_ram_defconfig   |  9 ++++
 drivers/phy/Kconfig                 |  6 +++
 drivers/phy/Makefile                |  1 +
 drivers/phy/bcm6358-usbh-phy.c      | 94 +++++++++++++++++++++++++++++++++++++
 include/configs/bmips_bcm6358.h     |  7 +++
 9 files changed, 177 insertions(+)
 create mode 100644 drivers/phy/bcm6358-usbh-phy.c
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/4 phy: add support for bcm6358 usbh phy

---
 drivers/phy/Kconfig            |  6 +++
 drivers/phy/Makefile           |  1 +
 drivers/phy/bcm6358-usbh-phy.c | 94 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 101 insertions(+)
 create mode 100644 drivers/phy/bcm6358-usbh-phy.c
drivers/phy/Kconfig +6 -0
index cec2130c05..43fb4c9bfd 100644
@@ -65,6 +65,12 @@ config BCM6348_USBH_PHY
 	help
 	  Support for the Broadcom MIPS BCM6348 USBH PHY.
 
+config BCM6358_USBH_PHY
+	bool "BCM6358 USBH PHY support"
+	depends on PHY && ARCH_BMIPS
+	help
+	  Support for the Broadcom MIPS BCM6358 USBH PHY.
+
 config PIPE3_PHY
 	bool "Support omap's PIPE3 PHY"
 	depends on PHY && ARCH_OMAP2PLUS
drivers/phy/Makefile +1 -0
index 06e01e86eb..04843fd49b 100644
@@ -8,6 +8,7 @@
 obj-$(CONFIG_$(SPL_)PHY) += phy-uclass.o
 obj-$(CONFIG_$(SPL_)NOP_PHY) += nop-phy.o
 obj-$(CONFIG_BCM6348_USBH_PHY) += bcm6348-usbh-phy.o
+obj-$(CONFIG_BCM6358_USBH_PHY) += bcm6358-usbh-phy.o
 obj-$(CONFIG_PHY_SANDBOX) += sandbox-phy.o
 obj-$(CONFIG_$(SPL_)PIPE3_PHY) += ti-pipe3-phy.o
 obj-$(CONFIG_STI_USB_PHY) += sti_usb_phy.o
drivers/phy/bcm6358-usbh-phy.c new file +94 -0

94 lines not on this page · raw message

Signature · 1 line
2.11.0
#2 lore raw

PATCH 1/4 phy: add support for bcm6358 usbh phy

Quoted 8 lines · Álvaro Fernández Rojas
---
 drivers/phy/Kconfig            |  6 +++
 drivers/phy/Makefile           |  1 +
 drivers/phy/bcm6358-usbh-phy.c | 94 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 101 insertions(+)
 create mode 100644 drivers/phy/bcm6358-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/609db104/attachment.sig>
#3 lore raw

PATCH 2/4 mips: bmips: add support for bcm6358 usb

In reply to Álvaro Fernández Rojas
---
 arch/mips/dts/brcm,bcm6358.dtsi | 27 +++++++++++++++++++++++++++
 include/configs/bmips_bcm6358.h |  7 +++++++
 2 files changed, 34 insertions(+)
arch/mips/dts/brcm,bcm6358.dtsi +27 -0
index 1662783279..b63b53baee 100644
@@ -164,5 +164,32 @@
 			reg = <0xfffe1200 0x4c>;
 			u-boot,dm-pre-reloc;
 		};
+
+		ehci: usb-controller at fffe1300 {
+			compatible = "brcm,bcm6358-ehci", "generic-ehci";
+			reg = <0xfffe1300 0x100>;
+			phys = <&usbh>;
+			big-endian;
+
+			status = "disabled";
+		};
+
+		ohci: usb-controller at fffe1400 {
+			compatible = "brcm,bcm6358-ohci", "generic-ohci";
+			reg = <0xfffe1400 0x100>;
+			phys = <&usbh>;
+			big-endian;
+
+			status = "disabled";
+		};
+
+		usbh: usb-phy at fffe1500 {
+			compatible = "brcm,bcm6358-usbh";
+			reg = <0xfffe1500 0x28>;
+			#phy-cells = <0>;
+			resets = <&periph_rst BCM6358_RST_USBH>;
+
+			status = "disabled";
+		};
 	};
 };
include/configs/bmips_bcm6358.h +7 -0
index 5d018a3481..e3113ee309 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/4 mips: bmips: add hg556a usb support

In reply to Álvaro Fernández Rojas
---
 arch/mips/dts/huawei,hg556a.dts     | 12 ++++++++++++
 configs/huawei_hg556a_ram_defconfig |  9 +++++++++
 2 files changed, 21 insertions(+)
arch/mips/dts/huawei,hg556a.dts +12 -0
index 31c7d7ed5c..a1e9c15ab9 100644
@@ -90,10 +90,18 @@
 	};
 };
 
+&ehci {
+	status = "okay";
+};
+
 &gpio0 {
 	status = "okay";
 };
 
+&ohci {
+	status = "okay";
+};
+
 &pflash {
 	status = "okay";
 };
@@ -102,3 +110,7 @@
 	u-boot,dm-pre-reloc;
 	status = "okay";
 };
+
+&usbh {
+	status = "okay";
+};
configs/huawei_hg556a_ram_defconfig +9 -0
index 12ced3ef27..7f7f34ed61 100644
@@ -25,6 +25,7 @@ CONFIG_CMD_LICENSE=y
 CONFIG_CMD_MEMINFO=y
 # CONFIG_CMD_FPGA is not set
 # CONFIG_CMD_LOADS is not set
+CONFIG_CMD_USB=y
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
 # CONFIG_CMD_MISC is not set
@@ -37,8 +38,16 @@ CONFIG_LED_GPIO=y
 CONFIG_MTD=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_CFI_FLASH=y
+CONFIG_PHY=y
+CONFIG_BCM6358_USBH_PHY=y
 CONFIG_DM_RESET=y
 CONFIG_RESET_BCM6345=y
 # CONFIG_SPL_SERIAL_PRESENT is not set
 CONFIG_DM_SERIAL=y
 CONFIG_BCM6345_SERIAL=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

PATCH 4/4 mips: bmips: add nb4-ser usb support

In reply to Álvaro Fernández Rojas
---
 arch/mips/dts/sfr,nb4-ser.dts     | 12 ++++++++++++
 configs/sfr_nb4-ser_ram_defconfig |  9 +++++++++
 2 files changed, 21 insertions(+)
arch/mips/dts/sfr,nb4-ser.dts +12 -0
index f2092e9f99..473372faa1 100644
@@ -50,6 +50,10 @@
 	};
 };
 
+&ehci {
+	status = "okay";
+};
+
 &gpio0 {
 	status = "okay";
 };
@@ -83,6 +87,10 @@
 	};
 };
 
+&ohci {
+	status = "okay";
+};
+
 &pflash {
 	status = "okay";
 };
@@ -91,3 +99,7 @@
 	u-boot,dm-pre-reloc;
 	status = "okay";
 };
+
+&usbh {
+	status = "okay";
+};
configs/sfr_nb4-ser_ram_defconfig +9 -0
index 6218465ede..fc323d879d 100644
@@ -26,6 +26,7 @@ CONFIG_CMD_LICENSE=y
 CONFIG_CMD_MEMINFO=y
 # CONFIG_CMD_FPGA is not set
 # CONFIG_CMD_LOADS is not set
+CONFIG_CMD_USB=y
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
 # CONFIG_CMD_MISC is not set
@@ -39,8 +40,16 @@ CONFIG_LED_GPIO=y
 CONFIG_MTD=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_CFI_FLASH=y
+CONFIG_PHY=y
+CONFIG_BCM6358_USBH_PHY=y
 CONFIG_DM_RESET=y
 CONFIG_RESET_BCM6345=y
 # CONFIG_SPL_SERIAL_PRESENT is not set
 CONFIG_DM_SERIAL=y
 CONFIG_BCM6345_SERIAL=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
#6 lore raw

cover bmips: add support for bcm6358 usbh phy

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

Add support for BCM6358 usbh phy.

Álvaro Fernández Rojas (4):
phy: add support for bcm6358 usbh phy
mips: bmips: add support for bcm6358 usb
mips: bmips: add hg556a usb support
mips: bmips: add nb4-ser usb support

Quoted 12 lines
 arch/mips/dts/brcm,bcm6358.dtsi     | 27 +++++++++++
 arch/mips/dts/huawei,hg556a.dts     | 12 +++++
 arch/mips/dts/sfr,nb4-ser.dts       | 12 +++++
 configs/huawei_hg556a_ram_defconfig |  9 ++++
 configs/sfr_nb4-ser_ram_defconfig   |  9 ++++
 drivers/phy/Kconfig                 |  6 +++
 drivers/phy/Makefile                |  1 +
 drivers/phy/bcm6358-usbh-phy.c      | 94 +++++++++++++++++++++++++++++++++++++
 include/configs/bmips_bcm6358.h     |  7 +++
 9 files changed, 177 insertions(+)
 create mode 100644 drivers/phy/bcm6358-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/c89055b6/attachment.sig>