ARM: tegra: TrimSlice: add support for USB1 port
PATCH 1/1 ARM: tegra: TrimSlice: add support for USB1 port
From: Stephen Warren <[email protected]>
TrimSlice's USB1 port has two purposes; it either acts as a device port hosting Tegra's USB recovery protocol, or acts as a host port connected to the internal USB->SATA bridge chip, which may in turn be connected to an SSD or HDD. Add the appropriate device tree and board configuration options to enable this port as a host port, and route the port to the SATA bridge using the VBUS GPIO.
--- board/compulab/dts/tegra20-trimslice.dts | 3 ++- board/compulab/trimslice/trimslice.c | 8 ++++++++ include/configs/trimslice.h | 1 + 3 files changed, 11 insertions(+), 1 deletions(-)
board/compulab/dts/tegra20-trimslice.dts +2 -1
@@ -8,6 +8,7 @@ aliases { usb0 = "/usb at c5008000"; + usb1 = "/usb at c5000000"; }; memory {
@@ -48,7 +49,7 @@ }; usb at c5000000 { - status = "disabled"; + nvidia,vbus-gpio = <&gpio 170 0>; /* PV2 */ }; usb at c5004000 {
board/compulab/trimslice/trimslice.c +8 -0
@@ -34,6 +34,14 @@#include <mmc.h> #endif +void pin_mux_usb (void ) +{ +/* +* USB1 internal/external mux GPIO, which masquerades as a VBUS GPIO +* in the current device tree. +*/ +pinmux_tristate_disable (PINGRP_UAC ); +}void pin_mux_spi (void ) {
include/configs/trimslice.h +1 -0
@@ -80,6 +80,7 @@#define CONFIG_ENV_OFFSET (512 * 1024)/* USB Host support */ +#define CONFIG_USB_MAX_CONTROLLER_COUNT 3#define CONFIG_USB_EHCI #define CONFIG_USB_EHCI_TEGRA #define CONFIG_USB_STORAGE
Signature · 1 line
1.7.0.4
PATCH 1/1 ARM: tegra: TrimSlice: add support for USB1 port
Hi Stephen,
Am Donnerstag, den 01.11.2012, 16:14 -0600 schrieb Stephen Warren:
Quoted 9 lines
From: Stephen Warren <[email protected]>
TrimSlice's USB1 port has two purposes; it either acts as a device port hosting Tegra's USB recovery protocol, or acts as a host port connected to the internal
USB->SATAbridge chip, which may in turn be connected to an SSD or HDD. Add the appropriate device tree and board configuration options to enable this port as a host port, and route the port to the SATA bridge using the VBUS GPIO.
Hm, I don't really like to abuse the VBUS GPIO for this function. As the GPIO controlled routing is more a sort of pinmux can't you just add the GPIO enable to pin_mux_usb()?
Quoted 59 lines
Signed-off-by Stephen Warren <[email protected]>--- board/compulab/dts/tegra20-trimslice.dts | 3 ++- board/compulab/trimslice/trimslice.c | 8 ++++++++ include/configs/trimslice.h | 1 + 3 files changed, 11 insertions(+), 1 deletions(-)board/compulab/dts/tegra20-trimslice.dts +2
-1@@ -8,6 +8,7 @@ aliases { usb0 = "/usb at c5008000"; + usb1 = "/usb at c5000000"; }; memory {@@ -48,7 +49,7 @@ }; usb at c5000000 { - status = "disabled"; + nvidia,vbus-gpio = <&gpio 170 0>; /* PV2 */ }; usb at c5004000 {board/compulab/trimslice/trimslice.c +8
-0@@ -34,6 +34,14 @@#include <mmc.h> #endif +void pin_mux_usb (void ) +{ +/* +* USB1 internal/external mux GPIO, which masquerades as a VBUS GPIO +* in the current device tree. +*/ +pinmux_tristate_disable (PINGRP_UAC ); +}void pin_mux_spi (void ) {include/configs/trimslice.h +1
-0@@ -80,6 +80,7 @@#define CONFIG_ENV_OFFSET (512 * 1024)/* USB Host support */ +#define CONFIG_USB_MAX_CONTROLLER_COUNT 3#define CONFIG_USB_EHCI #define CONFIG_USB_EHCI_TEGRA #define CONFIG_USB_STORAGE
PATCH 1/1 ARM: tegra: TrimSlice: add support for USB1 port
Quoted 12 lines · Lucas Stach
Hi Stephen,
Am Donnerstag, den 01.11.2012, 16:14 -0600 schrieb Stephen Warren:
Quoted 9 lines
From: Stephen Warren <[email protected]>
TrimSlice's USB1 port has two purposes; it either acts as a device port hosting Tegra's USB recovery protocol, or acts as a host port connected to the internal
USB->SATAbridge chip, which may in turn be connected to an SSD or HDD. Add the appropriate device tree and board configuration options to enable this port as a host port, and route the port to the SATA bridge using the VBUS GPIO.
Quoted 3 lines
Hm, I don't really like to abuse the VBUS GPIO for this function. As the GPIO controlled routing is more a sort of pinmux can't you just add the GPIO enable to
pin_mux_usb()?
I don't know, I think it's fine. It's certainly this way in the kernel. And for all I know, this GPIO does actually affect VBUS as well as flipping any mux (and the more I think about that, the more likely it is) although I can't actually know for sure since I don't have the schematics.
PATCH 1/1 ARM: tegra: TrimSlice: add support for USB1 port
Am Donnerstag, den 01.11.2012, 17:30 -0600 schrieb Stephen Warren:
Quoted 17 lines · Lucas Stach
Quoted 12 lines
Hi Stephen,
Am Donnerstag, den 01.11.2012, 16:14 -0600 schrieb Stephen Warren:
Quoted 9 lines
From: Stephen Warren <[email protected]>
TrimSlice's USB1 port has two purposes; it either acts as a device port hosting Tegra's USB recovery protocol, or acts as a host port connected to the internal
USB->SATAbridge chip, which may in turn be connected to an SSD or HDD. Add the appropriate device tree and board configuration options to enable this port as a host port, and route the port to the SATA bridge using the VBUS GPIO.Quoted 3 lines
Hm, I don't really like to abuse the VBUS GPIO for this function. As the GPIO controlled routing is more a sort of pinmux can't you just add the GPIO enable to
pin_mux_usb()?
Quoted 6 lines
I don't know, I think it's fine. It's certainly this way in the kernel. And for all I know, this GPIO does actually affect VBUS as well as flipping any mux (and the more I think about that, the more likely it is) although I can't actually know for sure since I don't have the schematics.
If it's really triggering VBUS I'm fine with this, but then the comment in pin_mux_usb() is a bit off.
PATCH 1/1 ARM: tegra: TrimSlice: add support for USB1 port
Quoted 18 lines · Lucas Stach
Am Donnerstag, den 01.11.2012, 17:30 -0600 schrieb Stephen Warren:
Quoted 17 lines · Lucas Stach
Quoted 15 lines
Hi Stephen,
Am Donnerstag, den 01.11.2012, 16:14 -0600 schrieb Stephen Warren:
Quoted 9 lines
From: Stephen Warren <[email protected]>
TrimSlice's USB1 port has two purposes; it either acts as a device port hosting Tegra's USB recovery protocol, or acts as a host port connected to the internal
USB->SATAbridge chip, which may in turn be connected to an SSD or HDD. Add the appropriate device tree and board configuration options to enable this port as a host port, and route the port to the SATA bridge using the VBUS GPIO.Hm, I don't really like to abuse the VBUS GPIO for this function. As the GPIO controlled routing is more a sort of pinmux can't you just add the GPIO enable to
pin_mux_usb()?
Quoted 8 lines
Quoted 5 lines
I don't know, I think it's fine. It's certainly this way in the kernel. And for all I know, this GPIO does actually affect VBUS as well as flipping any mux (and the more I think about that, the more likely it is) although I can't actually know for sure since I don't have the schematics.
If it's really triggering VBUS I'm fine with this, but then the comment in
pin_mux_usb()is a bit off.
Sorry, I don't see anything inaccurate about it. What's wrong?
PATCH 1/1 ARM: tegra: TrimSlice: add support for USB1 port
Am Freitag, den 02.11.2012, 08:45 -0600 schrieb Stephen Warren:
Quoted 25 lines · Lucas Stach
Quoted 24 lines
Am Donnerstag, den 01.11.2012, 17:30 -0600 schrieb Stephen Warren:
Quoted 22 lines · Lucas Stach
Quoted 12 lines
Hi Stephen,
Am Donnerstag, den 01.11.2012, 16:14 -0600 schrieb Stephen Warren:
Quoted 9 lines
From: Stephen Warren <[email protected]>
TrimSlice's USB1 port has two purposes; it either acts as a device port hosting Tegra's USB recovery protocol, or acts as a host port connected to the internal
USB->SATAbridge chip, which may in turn be connected to an SSD or HDD. Add the appropriate device tree and board configuration options to enable this port as a host port, and route the port to the SATA bridge using the VBUS GPIO.Quoted 3 lines
Hm, I don't really like to abuse the VBUS GPIO for this function. As the GPIO controlled routing is more a sort of pinmux can't you just add the GPIO enable to
pin_mux_usb()?I don't know, I think it's fine. It's certainly this way in the kernel. And for all I know, this GPIO does actually affect VBUS as well as flipping any mux (and the more I think about that, the more likely it is) although I can't actually know for sure since I don't have the schematics.
Quoted 5 lines
Quoted 2 lines
If it's really triggering VBUS I'm fine with this, but then the comment in
pin_mux_usb()is a bit off.Sorry, I don't see anything inaccurate about it. What's wrong?
In which way is it "masquerades as a VBUS GPIO"? If it triggers VBUS it _is_ a VBUS GPIO. So the comment should rather state that switching on VBUS also muxes the port to the internal bridge.
PATCH 1/1 ARM: tegra: TrimSlice: add support for USB1 port
Quoted 26 lines · Lucas Stach
Am Freitag, den 02.11.2012, 08:45 -0600 schrieb Stephen Warren:
Quoted 25 lines · Lucas Stach
Quoted 24 lines
Am Donnerstag, den 01.11.2012, 17:30 -0600 schrieb Stephen Warren:
Quoted 22 lines · Lucas Stach
Quoted 12 lines
Hi Stephen,
Am Donnerstag, den 01.11.2012, 16:14 -0600 schrieb Stephen Warren:
Quoted 9 lines
From: Stephen Warren <[email protected]>
TrimSlice's USB1 port has two purposes; it either acts as a device port hosting Tegra's USB recovery protocol, or acts as a host port connected to the internal
USB->SATAbridge chip, which may in turn be connected to an SSD or HDD. Add the appropriate device tree and board configuration options to enable this port as a host port, and route the port to the SATA bridge using the VBUS GPIO.Quoted 3 lines
Hm, I don't really like to abuse the VBUS GPIO for this function. As the GPIO controlled routing is more a sort of pinmux can't you just add the GPIO enable to
pin_mux_usb()?I don't know, I think it's fine. It's certainly this way in the kernel. And for all I know, this GPIO does actually affect VBUS as well as flipping any mux (and the more I think about that, the more likely it is) although I can't actually know for sure since I don't have the schematics.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
If it's really triggering VBUS I'm fine with this, but then the comment in
pin_mux_usb()is a bit off.Sorry, I don't see anything inaccurate about it. What's wrong?
In which way is it "masquerades as a VBUS GPIO"? If it triggers VBUS it _is_ a VBUS GPIO. So the comment should rather state that switching on VBUS also muxes the port to the internal bridge.
The GPIO definitely flips some form of bus mux. It's unclear whether it is a also VBUS GPIO for the internal device or not. My suspicion is that it must be, but without schematics I can't confirm. Either way, the comment seems quite accurate and descriptive, and this seems a perfectly reasonable solution.
PATCH 1/1 ARM: tegra: TrimSlice: add support for USB1 port
In reply to Stephen WarrenQuoted 10 lines · Stephen Warren
From: Stephen Warren <[email protected]>
TrimSlice's USB1 port has two purposes; it either acts as a device port hosting Tegra's USB recovery protocol, or acts as a host port connected to the internal
USB->SATAbridge chip, which may in turn be connected to an SSD or HDD. Add the appropriate device tree and board configuration options to enable this port as a host port, and route the port to the SATA bridge using the VBUS GPIO.Signed-off-by Stephen Warren <[email protected]>
Looks right to me.
Quoted 5 lines
--- board/compulab/dts/tegra20-trimslice.dts | 3 ++- board/compulab/trimslice/trimslice.c | 8 ++++++++ include/configs/trimslice.h | 1 + 3 files changed, 11 insertions(+), 1 deletions(-)