Skip to contentSkip to conversation

arm: add usb-phy init support for Kirkwood SoCs

PATCH New Prafulla Wadaskar 3 participants 5 messages Jun 23, 2009 – Jun 27, 2009

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

PATCH 1/2 arm: add usb-phy init support for Kirkwood SoCs

On kirkwood by default USB PHY is disabled
and from Linux-2.6.29 onward, phy_version for kirkwood platforms are programmed to EHCI_PHY_NA, expecting such platform specific setup should be done by boot loader

This patch provides arch specific requirement for usb-phy init

---
 cpu/arm926ejs/kirkwood/cpu.c             |    9 +++++++++
 include/asm-arm/arch-kirkwood/cpu.h      |    1 +
 include/asm-arm/arch-kirkwood/kirkwood.h |    1 +
 3 files changed, 11 insertions(+), 0 deletions(-)
cpu/arm926ejs/kirkwood/cpu.c +9 -0
index 194ba1c..1f6d014 100644
@@ -260,6 +260,15 @@ int arch_cpu_init(void)
 	reg &= ~(1 << 4);	/* Clear PortReset Bit */
 	writel(reg, (KWGBE_PORT_SERIAL_CONTROL1_REG(1)));
 #endif
+#ifdef CONFIG_KIRKWOOD_USBPHY_INIT
+	/*
+	 * On kirkwood by default USB PHY is disabled
+	 * and from Linux-2.6.29 onward, ehci kernel driver has changed
+	 * expecting such platform specific init should be done by boot
+	 * loader
+	 */
+	orion_usb_phy_v1_setup();
+#endif /* CONFIG_KIRKWOOD_USBPHY_INIT */
 #ifdef CONFIG_KIRKWOOD_PCIE_INIT
 	/*
 	 * Enable PCI Express Port0
include/asm-arm/arch-kirkwood/cpu.h +1 -0
index 36064ae..30a4bfa 100644
@@ -155,5 +155,6 @@ int kw_config_mpp(unsigned int mpp0_7, unsigned int mpp8_15,
 		unsigned int mpp16_23, unsigned int mpp24_31,
 		unsigned int mpp32_39, unsigned int mpp40_47,
 		unsigned int mpp48_55);
+void orion_usb_phy_v1_setup(void);
 #endif /* __ASSEMBLY__ */
 #endif /* _KWCPU_H */
include/asm-arm/arch-kirkwood/kirkwood.h +1 -0
index d5f25f9..52dafc2 100644
@@ -55,6 +55,7 @@
 #define KW_CPU_REG_BASE			(KW_REGISTER(0x20100))
 #define KW_TIMER_BASE			(KW_REGISTER(0x20300))
 #define KW_REG_PCIE_BASE		(KW_REGISTER(0x40000))
+#define KW_USB20_BASE			(KW_REGISTER(0x50000))
 #define KW_EGIGA0_BASE			(KW_REGISTER(0x72000))
 #define KW_EGIGA1_BASE			(KW_REGISTER(0x76000))
 
Signature · 1 line
1.5.3.3
#1 lore raw

PATCH 2/2 usb: add Kirkwood ehci driver support

Features supported:
1. usb-phy init support (tested on sheevaplug) This support is required to bring up USB interface at kernel level on Kirkwood platforms

---
 drivers/usb/host/Makefile        |    1 +
 drivers/usb/host/ehci-kirkwood.c |  102 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 103 insertions(+), 0 deletions(-)
 create mode 100644 drivers/usb/host/ehci-kirkwood.c
drivers/usb/host/Makefile +1 -0
index ec1d689..4fe7cb3 100644
@@ -37,6 +37,7 @@ COBJS-$(CONFIG_USB_SL811HS) += sl811-hcd.o
 COBJS-$(CONFIG_USB_EHCI) += ehci-hcd.o
 COBJS-$(CONFIG_USB_EHCI_FSL) += ehci-fsl.o
 COBJS-$(CONFIG_USB_EHCI_IXP4XX) += ehci-ixp.o
+COBJS-$(CONFIG_USB_EHCI_KIRKWOOD)	+= ehci-kirkwood.o
 COBJS-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o
 COBJS-$(CONFIG_USB_EHCI_VCT) += ehci-vct.o
 
drivers/usb/host/ehci-kirkwood.c new file +102 -0

102 lines not on this page · raw message

Signature · 1 line
1.5.3.3
#2 lore raw

PATCH 1/2 arm: add usb-phy init support for Kirkwood SoCs

In reply to Prafulla Wadaskar
Quoted 7 lines · Prafulla Wadaskar

On kirkwood by default USB PHY is disabled
and from Linux-2.6.29 onward, phy_version for kirkwood platforms are programmed to EHCI_PHY_NA, expecting such platform specific setup should be done by boot loader

This patch provides arch specific requirement for usb-phy init

Nicolas could you explain why the kernel require such init in the boot loader?

Best Regards,
J.

#3 lore raw

PATCH 1/2 arm: add usb-phy init support for Kirkwood SoCs

Quoted 10 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 7 lines · Prafulla Wadaskar

On kirkwood by default USB PHY is disabled
and from Linux-2.6.29 onward, phy_version for kirkwood platforms are programmed to EHCI_PHY_NA, expecting such platform specific setup should be done by boot loader

This patch provides arch specific requirement for usb-phy init

Nicolas could you explain why the kernel require such init in the boot loader?

No particular reason other than the fact that no one made a patch for the kernel yet.

Nicolas

#4 lore raw

PATCH 1/2 arm: add usb-phy init support for Kirkwood SoCs

Quoted 8 lines · Nicolas Pitre
Quoted 6 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 5 lines · Prafulla Wadaskar

On kirkwood by default USB PHY is disabled
and from Linux-2.6.29 onward, phy_version for kirkwood platforms are programmed to EHCI_PHY_NA, expecting such platform specific setup should be done by boot loader

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

This patch provides arch specific requirement for usb-phy init

Nicolas could you explain why the kernel require such init in the boot loader?

No particular reason other than the fact that no one made a patch for the kernel yet.

tks

Prafulla,
U-Boot is supposed to init the usb only if it use it so init it by default is not correct. Please fix it.

Btw it will be nice to fix the kernel too

Best Regards,
J.