* [PATCH 0/3] usb: am654: Add support for host mode to the USB port on overlay board
@ 2020-11-20 15:48 Aswath Govindraju
2020-11-20 15:48 ` [PATCH 1/3] board: ti: am65x: Set SERDES0 mux to PCIe to use USB 2.0 interface Aswath Govindraju
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: Aswath Govindraju @ 2020-11-20 15:48 UTC (permalink / raw)
To: u-boot
The following series of patches
- adds support for host mode to USB3SS0 controller
- adds aliases for USB subsystems
- adds a workaround to use USB0 in USB 2.0 only mode
Aswath Govindraju (3):
board: ti: am65x: Set SERDES0 mux to PCIe to use USB 2.0 interface
dts: am654-base-board-uboot: Set USB0 dr_mode to host
dts: am654-base-board-uboot: Add aliases for USB subsystems
arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 4 +++-
board/ti/am65x/evm.c | 16 ++++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
--
2.17.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] board: ti: am65x: Set SERDES0 mux to PCIe to use USB 2.0 interface
2020-11-20 15:48 [PATCH 0/3] usb: am654: Add support for host mode to the USB port on overlay board Aswath Govindraju
@ 2020-11-20 15:48 ` Aswath Govindraju
2020-11-20 15:48 ` [PATCH 2/3] dts: am654-base-board-uboot: Set USB0 dr_mode to host Aswath Govindraju
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Aswath Govindraju @ 2020-11-20 15:48 UTC (permalink / raw)
To: u-boot
It has been observed that setting SERDES0 lane mux to USB prevents USB 2.0
operation on USB0. Setting SERDES0 lane mux to non-USB when USB0 is used in
USB 2.0 only mode solves this issue. However, for USB3.0+2.0 operation this
issue is not present.
Implement this workaround by writing 1 to LANE_FUNC_SEL field in
CTRLMMR_SERDES0_CTRL register.
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
---
board/ti/am65x/evm.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c
index 36063b11383d..4438f14e4ff1 100644
--- a/board/ti/am65x/evm.c
+++ b/board/ti/am65x/evm.c
@@ -38,6 +38,10 @@ enum {
/* Max number of MAC addresses that are parsed/processed per daughter card */
#define DAUGHTER_CARD_NO_OF_MAC_ADDR 8
+/* Regiter that controls the SERDES0 lane and clock assignment */
+#define CTRLMMR_SERDES0_CTRL 0x00104080
+#define PCIE_LANE0 0x1
+
DECLARE_GLOBAL_DATA_PTR;
int board_init(void)
@@ -312,6 +316,18 @@ static int probe_daughtercards(void)
(uchar *)mac_addr[j]);
}
+ /*
+ * It has been observed that setting SERDES0 lane mux to USB prevents USB
+ * 2.0 operation on USB0. Setting SERDES0 lane mux to non-USB when USB0 is
+ * used in USB 2.0 only mode solves this issue. For USB3.0+2.0 operation
+ * this issue is not present.
+ *
+ * Implement this workaround by writing 1 to LANE_FUNC_SEL field in
+ * CTRLMMR_SERDES0_CTRL register.
+ */
+ if (!strncmp(ep.name, "SER-PCIE2LEVM", sizeof(ep.name)))
+ writel(PCIE_LANE0, CTRLMMR_SERDES0_CTRL);
+
/* Skip if no overlays are to be added */
if (!strlen(cards[i].dtbo_name))
continue;
--
2.17.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] dts: am654-base-board-uboot: Set USB0 dr_mode to host
2020-11-20 15:48 [PATCH 0/3] usb: am654: Add support for host mode to the USB port on overlay board Aswath Govindraju
2020-11-20 15:48 ` [PATCH 1/3] board: ti: am65x: Set SERDES0 mux to PCIe to use USB 2.0 interface Aswath Govindraju
@ 2020-11-20 15:48 ` Aswath Govindraju
2020-12-21 15:12 ` Lokesh Vutla
2020-11-20 15:48 ` [PATCH 3/3] dts: am654-base-board-uboot: Add aliases for USB subsystems Aswath Govindraju
` (2 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: Aswath Govindraju @ 2020-11-20 15:48 UTC (permalink / raw)
To: u-boot
USB3SS0 controller is to be used as a host in U-boot. Fix it by changing
the dr_mode to host.
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
---
arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/dts/k3-am654-base-board-u-boot.dtsi b/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
index d75d1b1c285a..bd2f334c2b50 100644
--- a/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
+++ b/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
@@ -270,7 +270,7 @@
&usb0 {
pinctrl-names = "default";
pinctrl-0 = <&usb0_pins_default>;
- dr_mode = "peripheral";
+ dr_mode = "host";
u-boot,dm-spl;
};
--
2.17.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] dts: am654-base-board-uboot: Add aliases for USB subsystems
2020-11-20 15:48 [PATCH 0/3] usb: am654: Add support for host mode to the USB port on overlay board Aswath Govindraju
2020-11-20 15:48 ` [PATCH 1/3] board: ti: am65x: Set SERDES0 mux to PCIe to use USB 2.0 interface Aswath Govindraju
2020-11-20 15:48 ` [PATCH 2/3] dts: am654-base-board-uboot: Set USB0 dr_mode to host Aswath Govindraju
@ 2020-11-20 15:48 ` Aswath Govindraju
2020-11-23 8:26 ` [PATCH 0/3] usb: am654: Add support for host mode to the USB port on overlay board Roger Quadros
2020-12-23 8:13 ` Lokesh Vutla
4 siblings, 0 replies; 8+ messages in thread
From: Aswath Govindraju @ 2020-11-20 15:48 UTC (permalink / raw)
To: u-boot
The sequence number assigned for USB subsystem in a uclass is dependent on
the order of occurrence in the device tree. If the dr_mode of USB3SS0
controller is varied then the sequence number of USB3SS1 controller also
changes. If aliases are added then sequence numbers are assigned using the
alias number. This makes the sequence number of USB3SS1 controller
independent of USB3SS0 controller's dr_mode.
Therefore, add aliases to fix the sequence number assigned to the USB
subsystems.
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
---
arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/dts/k3-am654-base-board-u-boot.dtsi b/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
index bd2f334c2b50..727bc3e8a0e3 100644
--- a/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
+++ b/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
@@ -14,6 +14,8 @@
aliases {
serial2 = &main_uart0;
ethernet0 = &cpsw_port1;
+ usb0 = &usb0;
+ usb1 = &usb1;
};
};
--
2.17.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 0/3] usb: am654: Add support for host mode to the USB port on overlay board
2020-11-20 15:48 [PATCH 0/3] usb: am654: Add support for host mode to the USB port on overlay board Aswath Govindraju
` (2 preceding siblings ...)
2020-11-20 15:48 ` [PATCH 3/3] dts: am654-base-board-uboot: Add aliases for USB subsystems Aswath Govindraju
@ 2020-11-23 8:26 ` Roger Quadros
2020-12-23 8:13 ` Lokesh Vutla
4 siblings, 0 replies; 8+ messages in thread
From: Roger Quadros @ 2020-11-23 8:26 UTC (permalink / raw)
To: u-boot
Hi,
On 20/11/2020 17:48, Aswath Govindraju wrote:
> The following series of patches
> - adds support for host mode to USB3SS0 controller
> - adds aliases for USB subsystems
> - adds a workaround to use USB0 in USB 2.0 only mode
>
> Aswath Govindraju (3):
> board: ti: am65x: Set SERDES0 mux to PCIe to use USB 2.0 interface
> dts: am654-base-board-uboot: Set USB0 dr_mode to host
> dts: am654-base-board-uboot: Add aliases for USB subsystems
For all patches,
Acked-by: Roger Quadros <rogerq@ti.com>
>
> arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 4 +++-
> board/ti/am65x/evm.c | 16 ++++++++++++++++
> 2 files changed, 19 insertions(+), 1 deletion(-)
>
cheers,
-roger
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/3] dts: am654-base-board-uboot: Set USB0 dr_mode to host
2020-11-20 15:48 ` [PATCH 2/3] dts: am654-base-board-uboot: Set USB0 dr_mode to host Aswath Govindraju
@ 2020-12-21 15:12 ` Lokesh Vutla
2020-12-21 15:48 ` Aswath Govindraju
0 siblings, 1 reply; 8+ messages in thread
From: Lokesh Vutla @ 2020-12-21 15:12 UTC (permalink / raw)
To: u-boot
On 20/11/20 9:18 pm, Aswath Govindraju wrote:
> USB3SS0 controller is to be used as a host in U-boot. Fix it by changing
> the dr_mode to host.
>
> Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Won't it break dfu support or is it used in different controller?
Thanks and regards,
Lokesh
> ---
> arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/dts/k3-am654-base-board-u-boot.dtsi b/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
> index d75d1b1c285a..bd2f334c2b50 100644
> --- a/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
> +++ b/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
> @@ -270,7 +270,7 @@
> &usb0 {
> pinctrl-names = "default";
> pinctrl-0 = <&usb0_pins_default>;
> - dr_mode = "peripheral";
> + dr_mode = "host";
> u-boot,dm-spl;
> };
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/3] dts: am654-base-board-uboot: Set USB0 dr_mode to host
2020-12-21 15:12 ` Lokesh Vutla
@ 2020-12-21 15:48 ` Aswath Govindraju
0 siblings, 0 replies; 8+ messages in thread
From: Aswath Govindraju @ 2020-12-21 15:48 UTC (permalink / raw)
To: u-boot
On 21/12/20 8:42 pm, Lokesh Vutla wrote:
>
>
> On 20/11/20 9:18 pm, Aswath Govindraju wrote:
>> USB3SS0 controller is to be used as a host in U-boot. Fix it by changing
>> the dr_mode to host.
>>
>> Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
>
> Won't it break dfu support or is it used in different controller?
>
It is used in a different controller. The port on the base board is used
for dfu and and the port on the overlay board is used for host mode.
Thanks,
Aswath
>
>> ---
>> arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/dts/k3-am654-base-board-u-boot.dtsi b/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
>> index d75d1b1c285a..bd2f334c2b50 100644
>> --- a/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
>> +++ b/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
>> @@ -270,7 +270,7 @@
>> &usb0 {
>> pinctrl-names = "default";
>> pinctrl-0 = <&usb0_pins_default>;
>> - dr_mode = "peripheral";
>> + dr_mode = "host";
>> u-boot,dm-spl;
>> };
>>
>>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 0/3] usb: am654: Add support for host mode to the USB port on overlay board
2020-11-20 15:48 [PATCH 0/3] usb: am654: Add support for host mode to the USB port on overlay board Aswath Govindraju
` (3 preceding siblings ...)
2020-11-23 8:26 ` [PATCH 0/3] usb: am654: Add support for host mode to the USB port on overlay board Roger Quadros
@ 2020-12-23 8:13 ` Lokesh Vutla
4 siblings, 0 replies; 8+ messages in thread
From: Lokesh Vutla @ 2020-12-23 8:13 UTC (permalink / raw)
To: u-boot
On 20/11/20 9:18 pm, Aswath Govindraju wrote:
> The following series of patches
> - adds support for host mode to USB3SS0 controller
> - adds aliases for USB subsystems
> - adds a workaround to use USB0 in USB 2.0 only mode
Fixed the dts patches subject to arm: dts: .... and
applied to u-boot-ti for-next branch.
Thanks and regards,
Lokesh
>
> Aswath Govindraju (3):
> board: ti: am65x: Set SERDES0 mux to PCIe to use USB 2.0 interface
> dts: am654-base-board-uboot: Set USB0 dr_mode to host
> dts: am654-base-board-uboot: Add aliases for USB subsystems
>
> arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 4 +++-
> board/ti/am65x/evm.c | 16 ++++++++++++++++
> 2 files changed, 19 insertions(+), 1 deletion(-)
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-12-23 8:13 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-20 15:48 [PATCH 0/3] usb: am654: Add support for host mode to the USB port on overlay board Aswath Govindraju
2020-11-20 15:48 ` [PATCH 1/3] board: ti: am65x: Set SERDES0 mux to PCIe to use USB 2.0 interface Aswath Govindraju
2020-11-20 15:48 ` [PATCH 2/3] dts: am654-base-board-uboot: Set USB0 dr_mode to host Aswath Govindraju
2020-12-21 15:12 ` Lokesh Vutla
2020-12-21 15:48 ` Aswath Govindraju
2020-11-20 15:48 ` [PATCH 3/3] dts: am654-base-board-uboot: Add aliases for USB subsystems Aswath Govindraju
2020-11-23 8:26 ` [PATCH 0/3] usb: am654: Add support for host mode to the USB port on overlay board Roger Quadros
2020-12-23 8:13 ` Lokesh Vutla
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.