Support UDC on Tegra 20/30/114/124
Subsystems (5)
cover Support UDC on Tegra 20/30/114/124
Some time ago Thierry Reding sent out patches that enabled UDC on NVIDIA Tegra, unfortunately they haven't got enough traction to get into the kernel. I've rebased those patches and added a fix for the Ethernet USB Gadget on Tegra20, Marc Dietrich tested UDC driver on AC100 and Nicolas Chauvet on TK1. Like an original patchset, this series adds support for the peripheral mode only.
Dmitry Osipenko (4):
usb: gadget: f_ecm/f_eem/f_rndis: Setup quirk_avoids_skb_reserve
usb: chipidea: udc: Support SKB alignment quirk
ARM: tegra: Enable UDC on AC100
ARM: defconfig: tegra: Enable ChipIdea UDC driver
Thierry Reding (5):
usb: chipidea: Add support for Tegra20/30/114/124
ARM: tegra: Enable UDC on TrimSlice
ARM: tegra: Enable UDC on Beaver
ARM: tegra: Enable UDC on Dalmore
ARM: tegra: Enable UDC on Jetson TK1
arch/arm/boot/dts/tegra114-dalmore.dts | 10 ++ arch/arm/boot/dts/tegra124-jetson-tk1.dts | 12 ++- arch/arm/boot/dts/tegra20-paz00.dts | 2 + arch/arm/boot/dts/tegra20-trimslice.dts | 2 + arch/arm/boot/dts/tegra30-beaver.dts | 10 ++ arch/arm/configs/tegra_defconfig | 10 +- drivers/usb/chipidea/Makefile | 1 + drivers/usb/chipidea/ci_hdrc_tegra.c | 156 ++++++++++++++++++++++++++++++ drivers/usb/chipidea/udc.c | 3 + drivers/usb/gadget/function/f_ecm.c | 2 + drivers/usb/gadget/function/f_eem.c | 2 + drivers/usb/gadget/function/f_rndis.c | 4 + include/linux/usb/chipidea.h | 1 + 13 files changed, 209 insertions(+), 6 deletions(-) create mode 100644 drivers/usb/chipidea/ci_hdrc_tegra.c
Signature · 6 lines
2.13.2 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): cover.1499273075.git.digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
PATCH 1/9 usb: gadget: f_ecm/f_eem/f_rndis: Setup quirk_avoids_skb_reserve
This quirk is required to make USB Ethernet gadget working with HW that can't cope with unaligned DMA. For some reason only f_ncm handles that quirk, let's handle it in the rest of the network models. All models have been tested with a ChipIdea UDC driver on NVIDIA Tegra20 SoC that require DMA to be aligned.
--- drivers/usb/gadget/function/f_ecm.c | 2 ++ drivers/usb/gadget/function/f_eem.c | 2 ++ drivers/usb/gadget/function/f_rndis.c | 4 ++++ 3 files changed, 8 insertions(+)
drivers/usb/gadget/function/f_ecm.c +2 -0
@@ -584,6 +584,8 @@ static int ecm_set_alt(struct usb_function *f, unsigned intf, unsigned alt)*/ ecm->port.is_zlp_ok =gadget_is_zlp_supported (cdev->gadget); + ecm->port.no_skb_reserve = +gadget_avoids_skb_reserve (cdev->gadget); ecm->port.cdc_filter =DEFAULT_FILTER ;DBG (cdev,"activate ecm\n" ); net =gether_connect (&ecm->port);
drivers/usb/gadget/function/f_eem.c +2 -0
@@ -215,6 +215,8 @@ static int eem_set_alt(struct usb_function *f, unsigned intf, unsigned alt)*/ eem->port.is_zlp_ok =1 ; eem->port.cdc_filter =DEFAULT_FILTER ; + eem->port.no_skb_reserve = +gadget_avoids_skb_reserve (cdev->gadget);DBG (cdev,"activate eem\n" ); net =gether_connect (&eem->port);if (IS_ERR (net))
drivers/usb/gadget/function/f_rndis.c +4 -0
@@ -593,6 +593,10 @@ static int rndis_set_alt(struct usb_function *f, unsigned intf, unsigned alt)*/ rndis->port.cdc_filter =0 ; +/* Setup DMA alignment workaround for UDC's that need it */ + rndis->port.no_skb_reserve = +gadget_avoids_skb_reserve (cdev->gadget); +DBG (cdev,"RNDIS RX/TX early activation ... \n" ); net =gether_connect (&rndis->port);if (IS_ERR (net))
Signature · 1 line
2.13.2
A message that is not in the archive (sent off-list or not yet received): a2f60b1ee32dba0adb7dfaaab7b1ee4d67699107.1499273075.git.digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Re: [PATCH v1 1/9] usb: gadget: f_ecm/f_eem/f_rndis: Setup quirk_avoids_skb_reserve
Quoted 44 lines · Dmitry Osipenko
This quirk is required to make USB Ethernet gadget working with HW that can't cope with unaligned DMA. For some reason only
f_ncmhandles that quirk, let's handle it in the rest of the network models. All models have been tested with a ChipIdea UDC driver on NVIDIA Tegra20 SoC that require DMA to be aligned.Signed-off-by Dmitry Osipenko <[email protected]>--- drivers/usb/gadget/function/f_ecm.c | 2 ++ drivers/usb/gadget/function/f_eem.c | 2 ++ drivers/usb/gadget/function/f_rndis.c | 4 ++++ 3 files changed, 8 insertions(+)drivers/usb/gadget/function/f_ecm.c +2
-0@@ -584,6 +584,8 @@ static int ecm_set_alt(struct usb_function *f, unsigned intf, unsigned alt)*/ ecm->port.is_zlp_ok =gadget_is_zlp_supported (cdev->gadget); + ecm->port.no_skb_reserve = +gadget_avoids_skb_reserve (cdev->gadget); ecm->port.cdc_filter =DEFAULT_FILTER ;DBG (cdev,"activate ecm\n" ); net =gether_connect (&ecm->port);drivers/usb/gadget/function/f_eem.c +2
-0@@ -215,6 +215,8 @@ static int eem_set_alt(struct usb_function *f, unsigned intf, unsigned alt)*/ eem->port.is_zlp_ok =1 ; eem->port.cdc_filter =DEFAULT_FILTER ; + eem->port.no_skb_reserve = +gadget_avoids_skb_reserve (cdev->gadget);DBG (cdev,"activate eem\n" ); net =gether_connect (&eem->port);if (IS_ERR (net))drivers/usb/gadget/function/f_rndis.c +0
-0
drivers/usb/gadget/function/f_rndis.c static int rndis_set_alt(struct usb_function *f, unsigned intf, unsigned alt) · line 599
Quoted 7 lines
drivers/usb/gadget/function/f_rndis.c +4
-0@@ -593,6 +593,10 @@ static int rndis_set_alt(struct usb_function *f, unsigned intf, unsigned alt)*/ rndis->port.cdc_filter =0 ; +/* Setup DMA alignment workaround for UDC's that need it */ + rndis->port.no_skb_reserve = +gadget_avoids_skb_reserve (cdev->gadget); +
You may add above comments for other two changes.
Quoted 10 lines
drivers/usb/gadget/function/f_rndis.c +0
-0DBG (cdev,"RNDIS RX/TX early activation ... \n" ); net =gether_connect (&rndis->port);if (IS_ERR (net))Signature · 6 lines
2.13.2 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Best Regards, Peter Chen
Re: [PATCH v1 1/9] usb: gadget: f_ecm/f_eem/f_rndis: Setup quirk_avoids_skb_reserve
Quoted 48 lines · Peter Chen
Quoted 47 lines · Dmitry Osipenko
This quirk is required to make USB Ethernet gadget working with HW that can't cope with unaligned DMA. For some reason only
f_ncmhandles that quirk, let's handle it in the rest of the network models. All models have been tested with a ChipIdea UDC driver on NVIDIA Tegra20 SoC that require DMA to be aligned.Signed-off-by Dmitry Osipenko <[email protected]>--- drivers/usb/gadget/function/f_ecm.c | 2 ++ drivers/usb/gadget/function/f_eem.c | 2 ++ drivers/usb/gadget/function/f_rndis.c | 4 ++++ 3 files changed, 8 insertions(+)drivers/usb/gadget/function/f_ecm.c +2
-0@@ -584,6 +584,8 @@ static int ecm_set_alt(struct usb_function *f, unsigned intf, unsigned alt)*/ ecm->port.is_zlp_ok =gadget_is_zlp_supported (cdev->gadget); + ecm->port.no_skb_reserve = +gadget_avoids_skb_reserve (cdev->gadget); ecm->port.cdc_filter =DEFAULT_FILTER ;DBG (cdev,"activate ecm\n" ); net =gether_connect (&ecm->port);drivers/usb/gadget/function/f_eem.c +2
-0@@ -215,6 +215,8 @@ static int eem_set_alt(struct usb_function *f, unsigned intf, unsigned alt)*/ eem->port.is_zlp_ok =1 ; eem->port.cdc_filter =DEFAULT_FILTER ; + eem->port.no_skb_reserve = +gadget_avoids_skb_reserve (cdev->gadget);DBG (cdev,"activate eem\n" ); net =gether_connect (&eem->port);if (IS_ERR (net))drivers/usb/gadget/function/f_rndis.c +0
-0@@ -593,6 +593,10 @@ static int rndis_set_alt(struct usb_function *f, unsigned intf, unsigned alt)*/ rndis->port.cdc_filter =0 ;
Quoted 7 lines
drivers/usb/gadget/function/f_rndis.c static int rndis_set_alt(struct usb_function *f, unsigned intf, unsigned alt) · line 599
Quoted 4 lines
drivers/usb/gadget/function/f_rndis.c +4
-0+/* Setup DMA alignment workaround for UDC's that need it */ + rndis->port.no_skb_reserve = +gadget_avoids_skb_reserve (cdev->gadget); +You may add above comments for other two changes.
Yeah, but I haven't added a comment there for consistency.
Signature · 1 line
Dmitry
PATCH 2/9 usb: chipidea: udc: Support SKB alignment quirk
In reply to a message not in the archiveNVIDIA Tegra20 UDC can't cope with unaligned DMA and require a USB gadget quirk that avoids SKB buffer alignment to be set in order to make Ethernet Gadget working. Later Tegra generations do not require that quirk. Let's add a new platform data flag that allows to enable USB gadget quirk for platforms that require it.
--- drivers/usb/chipidea/udc.c | 3 +++ include/linux/usb/chipidea.h | 1 + 2 files changed, 4 insertions(+)
drivers/usb/chipidea/udc.c +3 -0
@@ -1899,6 +1899,9 @@ static int udc_start(struct ci_hdrc *ci) ci->gadget.name = ci->platdata->name; ci->gadget.otg_caps = otg_caps; +if (ci->platdata->flags &CI_HDRC_REQUIRES_ALIGNED_DMA ) + ci->gadget.quirk_avoids_skb_reserve =1 ; +if (ci->is_otg && (otg_caps->hnp_support || otg_caps->srp_support || otg_caps->adp_support)) ci->gadget.is_otg =1 ;
include/linux/usb/chipidea.h +1 -0
@@ -58,6 +58,7 @@ struct ci_hdrc_platform_data {#define CI_HDRC_OVERRIDE_TX_BURST BIT(10)#define CI_HDRC_OVERRIDE_RX_BURST BIT(11)#define CI_HDRC_OVERRIDE_PHY_CONTROL BIT(12)/* Glue layer manages phy */ +#define CI_HDRC_REQUIRES_ALIGNED_DMA BIT(13)enum usb_dr_mode dr_mode;#define CI_HDRC_CONTROLLER_RESET_EVENT 0#define CI_HDRC_CONTROLLER_STOPPED_EVENT 1
Signature · 1 line
2.13.2
A message that is not in the archive (sent off-list or not yet received): 719de7513f42948f5f75742c31f4cc09582411fd.1499273075.git.digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Peter Chen
Acked-byRe: [PATCH v1 2/9] usb: chipidea: udc: Support SKB alignment quirk
Quoted 31 lines · Dmitry Osipenko
NVIDIA Tegra20 UDC can't cope with unaligned DMA and require a USB gadget quirk that avoids SKB buffer alignment to be set in order to make Ethernet Gadget working. Later Tegra generations do not require that quirk. Let's add a new platform data flag that allows to enable USB gadget quirk for platforms that require it.
Signed-off-by Dmitry Osipenko <[email protected]>--- drivers/usb/chipidea/udc.c | 3 +++ include/linux/usb/chipidea.h | 1 + 2 files changed, 4 insertions(+)drivers/usb/chipidea/udc.c +3
-0@@ -1899,6 +1899,9 @@ static int udc_start(struct ci_hdrc *ci) ci->gadget.name = ci->platdata->name; ci->gadget.otg_caps = otg_caps; +if (ci->platdata->flags &CI_HDRC_REQUIRES_ALIGNED_DMA ) + ci->gadget.quirk_avoids_skb_reserve =1 ; +if (ci->is_otg && (otg_caps->hnp_support || otg_caps->srp_support || otg_caps->adp_support)) ci->gadget.is_otg =1 ;include/linux/usb/chipidea.h +0
-0
include/linux/usb/chipidea.h struct ci_hdrc_platform_data { · line 64
Quoted 7 lines
include/linux/usb/chipidea.h +1
-0@@ -58,6 +58,7 @@ struct ci_hdrc_platform_data {#define CI_HDRC_OVERRIDE_TX_BURST BIT(10)#define CI_HDRC_OVERRIDE_RX_BURST BIT(11)#define CI_HDRC_OVERRIDE_PHY_CONTROL BIT(12)/* Glue layer manages phy */ +#define CI_HDRC_REQUIRES_ALIGNED_DMA BIT(13)enum usb_dr_mode dr_mode;#define CI_HDRC_CONTROLLER_RESET_EVENT 0#define CI_HDRC_CONTROLLER_STOPPED_EVENT 1
Signature · 6 lines
Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 3/9 usb: chipidea: Add support for Tegra20/30/114/124
In reply to a message not in the archiveFrom: Thierry Reding <[email protected]>
All of these Tegra SoC generations have a ChipIdea UDC IP block that can be used for device mode communication with a host. Implement rudimentary support that doesn't allow switching between host and device modes.
--- drivers/usb/chipidea/Makefile | 1 + drivers/usb/chipidea/ci_hdrc_tegra.c | 156 +++++++++++++++++++++++++++++++++++ 2 files changed, 157 insertions(+) create mode 100644 drivers/usb/chipidea/ci_hdrc_tegra.c
drivers/usb/chipidea/Makefile +1 -0
@@ -15,3 +15,4 @@ obj-$(CONFIG_USB_CHIPIDEA) += ci_hdrc_zevio.o obj-$(CONFIG_USB_CHIPIDEA_PCI) += ci_hdrc_pci.o obj-$(CONFIG_USB_CHIPIDEA_OF) += usbmisc_imx.o ci_hdrc_imx.o +obj-$(CONFIG_USB_CHIPIDEA_OF) += ci_hdrc_tegra.o
drivers/usb/chipidea/ci_hdrc_tegra.c new file +156 -0
156 lines not on this page · raw message
Signature · 1 line
2.13.2
A message that is not in the archive (sent off-list or not yet received): 9e0127ea9b580e1af334c4c3bcb8b3c0705614ea.1499273075.git.digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Re: [PATCH v1 3/9] usb: chipidea: Add support for Tegra20/30/114/124
Quoted 4 lines · Dmitry Osipenko
drivers/usb/chipidea/ci_hdrc_tegra.c new file +4
-0+/* setup and register ChipIdea HDRC device */ + udc->data.name ="tegra-udc" ; + udc->data.capoffset =DEF_CAPOFFSET ; + udc->data.flags =0 ;
drivers/usb/chipidea/ci_hdrc_tegra.c line 113
Quoted 10 lines
drivers/usb/chipidea/ci_hdrc_tegra.c new file +10
-0+ udc->data.usb_phy = udc->phy; + +/* setup device specific quirks */ + soc = id->data; + +if (!soc->supports_unaligned_dma) + udc->data.flags |=CI_HDRC_REQUIRES_ALIGNED_DMA ; + +/* power on UDC controller */ +usb_phy_set_suspend (udc->phy,0 );
Why above is needed? The chipidea core will do usb_phy_init for power on.
Quoted 15 lines
drivers/usb/chipidea/ci_hdrc_tegra.c new file +15
-0+ + udc->dev =ci_hdrc_add_device (&pdev->dev, pdev->resource, + pdev->num_resources, &udc->data); +if (IS_ERR (udc->dev)) { + err =PTR_ERR (udc->dev); +dev_err (&pdev->dev,"failed to add HDRC device: %d\n" , err); + goto power_off; + } + +platform_set_drvdata (pdev, udc); + +return 0 ; + +power_off: +usb_phy_set_suspend (udc->phy,1 );
[...]
Quoted 5 lines
drivers/usb/chipidea/ci_hdrc_tegra.c new file +5
-0+static int tegra_udc_remove (struct platform_device *pdev) +{ +struct tegra_udc *udc =platform_get_drvdata (pdev); + +usb_phy_set_suspend (udc->phy,1 );
[...]
Signature · 2 lines
Best Regards, Peter Chen
Re: [PATCH v1 3/9] usb: chipidea: Add support for Tegra20/30/114/124
Quoted 10 lines · Peter Chen
Quoted 9 lines · Dmitry Osipenko
drivers/usb/chipidea/ci_hdrc_tegra.c new file +9
-0+/* setup and register ChipIdea HDRC device */ + udc->data.name ="tegra-udc" ; + udc->data.capoffset =DEF_CAPOFFSET ; + udc->data.flags =0 ; + udc->data.usb_phy = udc->phy; + +/* setup device specific quirks */ + soc = id->data; +
Quoted 9 lines
drivers/usb/chipidea/ci_hdrc_tegra.c line 113
Quoted 5 lines
drivers/usb/chipidea/ci_hdrc_tegra.c new file +5
-0+if (!soc->supports_unaligned_dma) + udc->data.flags |=CI_HDRC_REQUIRES_ALIGNED_DMA ; + +/* power on UDC controller */ +usb_phy_set_suspend (udc->phy,0 );Why above is needed? The chipidea core will do
usb_phy_initfor power on.
It is needed because Tegra's USB PHY driver doesn't hook up .init() of the struct usb_phy and the power management is handled by set_suspend().
Signature · 1 line
Dmitry
A message that is not in the archive (sent off-list or not yet received): 59e943b8-8771-0b1e-36fa-babd5e52a6d5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Re: [PATCH v1 3/9] usb: chipidea: Add support for Tegra20/30/114/124
Quoted 21 lines · Dmitry Osipenko
Quoted 10 lines · Peter Chen
Quoted 9 lines · Dmitry Osipenko
drivers/usb/chipidea/ci_hdrc_tegra.c new file +9
-0+/* setup and register ChipIdea HDRC device */ + udc->data.name ="tegra-udc" ; + udc->data.capoffset =DEF_CAPOFFSET ; + udc->data.flags =0 ; + udc->data.usb_phy = udc->phy; + +/* setup device specific quirks */ + soc = id->data; +Quoted 9 lines
drivers/usb/chipidea/ci_hdrc_tegra.c line 113
Quoted 5 lines
drivers/usb/chipidea/ci_hdrc_tegra.c new file +5
-0+if (!soc->supports_unaligned_dma) + udc->data.flags |=CI_HDRC_REQUIRES_ALIGNED_DMA ; + +/* power on UDC controller */ +usb_phy_set_suspend (udc->phy,0 );Why above is needed? The chipidea core will do
usb_phy_initfor power on.
Quoted 3 lines
It is needed because Tegra's USB PHY driver doesn't hook up .init() of the struct
usb_phyand the power management is handled byset_suspend().
Ok, please comment it since it is strange that initialize phy at .set_suspend API, after that, you can add my Ack for this patch.
Signature · 2 lines
Best Regards, Peter Chen
Re: [PATCH v1 3/9] usb: chipidea: Add support for Tegra20/30/114/124
Quoted 22 lines · Peter Chen
Quoted 21 lines · Dmitry Osipenko
Quoted 19 lines · Peter Chen
Quoted 4 lines · Dmitry Osipenko
drivers/usb/chipidea/ci_hdrc_tegra.c new file +4
-0+/* setup and register ChipIdea HDRC device */ + udc->data.name ="tegra-udc" ; + udc->data.capoffset =DEF_CAPOFFSET ; + udc->data.flags =0 ;drivers/usb/chipidea/ci_hdrc_tegra.c line 113
Quoted 10 lines
drivers/usb/chipidea/ci_hdrc_tegra.c new file +10
-0+ udc->data.usb_phy = udc->phy; + +/* setup device specific quirks */ + soc = id->data; + +if (!soc->supports_unaligned_dma) + udc->data.flags |=CI_HDRC_REQUIRES_ALIGNED_DMA ; + +/* power on UDC controller */ +usb_phy_set_suspend (udc->phy,0 );Why above is needed? The chipidea core will do
usb_phy_initfor power on.
Quoted 7 lines
Quoted 3 lines
It is needed because Tegra's USB PHY driver doesn't hook up .init() of the struct
usb_phyand the power management is handled byset_suspend().Ok, please comment it since it is strange that initialize phy at .set_suspend API, after that, you can add my Ack for this patch.
Alright, thank you for the review.
Signature · 1 line
Dmitry
PATCH 4/9 ARM: tegra: Enable UDC on TrimSlice
In reply to a message not in the archiveFrom: Thierry Reding <[email protected]>
Override the compatible string of the first USB controller to enable device mode.
--- arch/arm/boot/dts/tegra20-trimslice.dts | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/boot/dts/tegra20-trimslice.dts +2 -0
@@ -336,7 +336,9 @@ }; usb@c5000000 { + compatible = "nvidia,tegra20-udc"; status = "okay"; + dr_mode = "otg"; }; usb-phy@c5000000 {
Signature · 6 lines
2.13.2 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 82321d32d968c6b9481a77fbecae8c0756d37f0f.1499273075.git.digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Re: [PATCH v1 4/9] ARM: tegra: Enable UDC on TrimSlice
Quoted 15 lines · Dmitry Osipenko
From: Thierry Reding <[email protected]>
Override the compatible string of the first USB controller to enable device mode.
Signed-off-by Thierry Reding <[email protected]>--- arch/arm/boot/dts/tegra20-trimslice.dts | 2 ++ 1 file changed, 2 insertions(+)arch/arm/boot/dts/tegra20-trimslice.dts +0
-0
arch/arm/boot/dts/tegra20-trimslice.dts line 341
Quoted 6 lines
arch/arm/boot/dts/tegra20-trimslice.dts +2
-0@@ -336,7 +336,9 @@ }; usb@c5000000 { + compatible = "nvidia,tegra20-udc"; status = "okay"; + dr_mode = "otg";
If this board supports peripheral-only, you need to set dr_mode as "peripheral".
Signature · 2 lines
Best Regards, Peter Chen
Re: [PATCH v1 4/9] ARM: tegra: Enable UDC on TrimSlice
Quoted 18 lines · Peter Chen
Quoted 17 lines · Dmitry Osipenko
From: Thierry Reding <[email protected]>
Override the compatible string of the first USB controller to enable device mode.
Signed-off-by Thierry Reding <[email protected]>--- arch/arm/boot/dts/tegra20-trimslice.dts | 2 ++ 1 file changed, 2 insertions(+)arch/arm/boot/dts/tegra20-trimslice.dts +0
-0@@ -336,7 +336,9 @@ };
Quoted 8 lines
arch/arm/boot/dts/tegra20-trimslice.dts line 341
Quoted 4 lines
arch/arm/boot/dts/tegra20-trimslice.dts +2
-0usb@c5000000 { + compatible = "nvidia,tegra20-udc"; status = "okay"; + dr_mode = "otg";If this board supports peripheral-only, you need to set
dr_modeas "peripheral".
It should support OTG, but we aren't going to implement the host mode switch for now. Stephen claims that the host mode is working with the tegra-ehci driver, it would be nice if anyone could confirm this.
Signature · 5 lines
Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): d23f841a-f46d-bf3f-cdb6-9d9c033e80bd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Re: [PATCH v1 4/9] ARM: tegra: Enable UDC on TrimSlice
Quoted 28 lines · Dmitry Osipenko
Quoted 18 lines · Peter Chen
Quoted 17 lines · Dmitry Osipenko
From: Thierry Reding <[email protected]>
Override the compatible string of the first USB controller to enable device mode.
Signed-off-by Thierry Reding <[email protected]>--- arch/arm/boot/dts/tegra20-trimslice.dts | 2 ++ 1 file changed, 2 insertions(+)arch/arm/boot/dts/tegra20-trimslice.dts +0
-0@@ -336,7 +336,9 @@ };Quoted 8 lines
arch/arm/boot/dts/tegra20-trimslice.dts line 341
Quoted 4 lines
arch/arm/boot/dts/tegra20-trimslice.dts +2
-0usb@c5000000 { + compatible = "nvidia,tegra20-udc"; status = "okay"; + dr_mode = "otg";If this board supports peripheral-only, you need to set
dr_modeas "peripheral".
Quoted 4 lines
It should support OTG, but we aren't going to implement the host mode switch for now. Stephen claims that the host mode is working with the tegra-ehci driver, it would be nice if anyone could confirm this.
Stephen, git blame tells that it is you enabled that port on TrimSlice and AC100. Could you test them again please?
Signature · 1 line
Dmitry
Re: [PATCH v1 4/9] ARM: tegra: Enable UDC on TrimSlice
In reply to a message not in the archiveQuoted 32 lines · Dmitry Osipenko
Quoted 14 lines · Peter Chen
Quoted 13 lines · Dmitry Osipenko
From: Thierry Reding <[email protected] .org>
Override the compatible string of the first USB controller to enable
device mode.Signed-off-by Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
arch/arm/boot/dts/tegra20-trimslice.dts | 2 ++1 file changed, 2 insertions(+)Quoted 16 lines
arch/arm/boot/dts/tegra20-trimslice.dts line 341
Quoted 12 lines
arch/arm/boot/dts/tegra20-trimslice.dts +0
-0@@ -336,7 +336,9 @@ };
usb@c5000000 {arch/arm/boot/dts/tegra20-trimslice.dts +1
-0+ compatible = "nvidia,tegra20-udc";status = "okay";
arch/arm/boot/dts/tegra20-trimslice.dts +1
-0+ dr_mode = "otg";If this board supports peripheral-only, you need to set
dr_modeas "peripheral".
Quoted 5 lines
It should support OTG, but we aren't going to implement the host mode switch for
now. Stephen claims that the host mode is working with the tegra-ehci driver, it
would be nice if anyone could confirm this.
I can confirm that on Colibri T20, Apalis/Colibri T30 and Apalis TK1 host mode works just fine with the regular tegra-ehci driver.
I'm about to give your patch set a try on those boards as well and will give further feedback.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH v1 4/9] ARM: tegra: Enable UDC on TrimSlice
Quoted 33 lines · Marcel Ziswiler
Quoted 32 lines · Dmitry Osipenko
Quoted 30 lines · Peter Chen
Quoted 19 lines · Dmitry Osipenko
From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA-XMD5yJDbdMToUJ55TTLPZA@public.gmane.org .org>
Override the compatible string of the first USB controller to enable
device mode.Signed-off-by Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
--- arch/arm/boot/dts/tegra20-trimslice.dts | 2 ++ 1 file changed, 2 insertions(+)arch/arm/boot/dts/tegra20-trimslice.dts +0
-0arch/arm/boot/dts/tegra20-trimslice.dts line 341
Quoted 6 lines
arch/arm/boot/dts/tegra20-trimslice.dts +2
-0@@ -336,7 +336,9 @@ }; usb@c5000000 { + compatible = "nvidia,tegra20-udc"; status = "okay"; + dr_mode = "otg";If this board supports peripheral-only, you need to set
dr_modeas "peripheral".
Quoted 9 lines
Quoted 5 lines
It should support OTG, but we aren't going to implement the host mode switch for
now. Stephen claims that the host mode is working with the tegra-ehci driver, it
would be nice if anyone could confirm this.I can confirm that on Colibri T20, Apalis/Colibri T30 and Apalis TK1 host mode works just fine with the regular tegra-ehci driver.
Good to know, thank you :)
Quoted 3 lines
I'm about to give your patch set a try on those boards as well and will give further feedback.
Okay, but we won't be able to switch those boards to the UDC driver until the peripheral/host mode switching would be implemented. As Stephen pointed, it would be a user-visible regression.
Signature · 1 line
Dmitry
Re: [PATCH v1 4/9] ARM: tegra: Enable UDC on TrimSlice
In reply to Peter ChenQuoted 18 lines · Peter Chen
Quoted 17 lines · Dmitry Osipenko
From: Thierry Reding <[email protected]>
Override the compatible string of the first USB controller to enable device mode.
Signed-off-by Thierry Reding <[email protected]>--- arch/arm/boot/dts/tegra20-trimslice.dts | 2 ++ 1 file changed, 2 insertions(+)arch/arm/boot/dts/tegra20-trimslice.dts +0
-0@@ -336,7 +336,9 @@ };
Quoted 7 lines
arch/arm/boot/dts/tegra20-trimslice.dts line 341
Quoted 4 lines
arch/arm/boot/dts/tegra20-trimslice.dts +2
-0usb@c5000000 { + compatible = "nvidia,tegra20-udc"; status = "okay"; + dr_mode = "otg";If this board supports peripheral-only, you need to set
dr_modeas "peripheral".
I agree here. Even if the ports can theoretically do otg, and DT is supposed to represent HW not SW, given we have no SW support for actual OTG, it'd be best not to change the DT to OTG until it's actually useful to do so. This comment applies to the patches I ack'd already too.
A message that is not in the archive (sent off-list or not yet received): 7717016d-6da4-6933-a36e-4a6bf45646ab-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org
Re: [PATCH v1 4/9] ARM: tegra: Enable UDC on TrimSlice
Quoted 27 lines · Stephen Warren
Quoted 11 lines · Peter Chen
Quoted 10 lines · Dmitry Osipenko
From: Thierry Reding <[email protected]>
Override the compatible string of the first USB controller to enable device mode.
Signed-off-by Thierry Reding <[email protected]>--- arch/arm/boot/dts/tegra20-trimslice.dts | 2 ++ 1 file changed, 2 insertions(+)Quoted 14 lines
arch/arm/boot/dts/tegra20-trimslice.dts line 340
Quoted 11 lines
arch/arm/boot/dts/tegra20-trimslice.dts +2
-0@@ -336,7 +336,9 @@ }; usb@c5000000 { + compatible = "nvidia,tegra20-udc"; status = "okay"; + dr_mode = "otg";If this board supports peripheral-only, you need to set
dr_modeas "peripheral".
Quoted 4 lines
I agree here. Even if the ports can theoretically do otg, and DT is supposed to represent HW not SW, given we have no SW support for actual OTG, it'd be best not to change the DT to OTG until it's actually useful to do so. This comment applies to the patches I ack'd already too.
In case of absence of the "dr_mode" option or without a support of host mode switching, UDC driver fallbacks to the peripheral mode. Given that DT is supposed to be stable, I'm not sure what to do... should I specify the peripheral mode for now (which doesn't represent the HW) or completely remove the "dr_mode"?
Signature · 5 lines
Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 8c56c8e4-0c61-9400-5f52-0e6c00b51310-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Re: [PATCH v1 4/9] ARM: tegra: Enable UDC on TrimSlice
Quoted 33 lines · Dmitry Osipenko
Quoted 27 lines · Stephen Warren
Quoted 11 lines · Peter Chen
Quoted 10 lines · Dmitry Osipenko
From: Thierry Reding <[email protected]>
Override the compatible string of the first USB controller to enable device mode.
Signed-off-by Thierry Reding <[email protected]>--- arch/arm/boot/dts/tegra20-trimslice.dts | 2 ++ 1 file changed, 2 insertions(+)Quoted 14 lines
arch/arm/boot/dts/tegra20-trimslice.dts line 340
Quoted 11 lines
arch/arm/boot/dts/tegra20-trimslice.dts +2
-0@@ -336,7 +336,9 @@ }; usb@c5000000 { + compatible = "nvidia,tegra20-udc"; status = "okay"; + dr_mode = "otg";If this board supports peripheral-only, you need to set
dr_modeas "peripheral".Quoted 4 lines
I agree here. Even if the ports can theoretically do otg, and DT is supposed to represent HW not SW, given we have no SW support for actual OTG, it'd be best not to change the DT to OTG until it's actually useful to do so. This comment applies to the patches I ack'd already too.
Quoted 5 lines
In case of absence of the "
dr_mode" option or without a support of host mode switching, UDC driver fallbacks to the peripheral mode. Given that DT is supposed to be stable, I'm not sure what to do... should I specify the peripheral mode for now (which doesn't represent the HW) or completely remove the "dr_mode"?
I think specifying dr_mode="peripheral" now is fine; we can change it later.
DT ABI compatibility isn't about never changing the DT content, it's about making sure that any schema changes occur in a backwards-compatible fashion.
Also in the case of a USB port that does support OTG, the dr_mode property represents both (a) the HW's capabilities, and (b) the user's desired (initial, if e.g. sysfs modification is possible) mode of operation if the HW has multiple capabilities. Given (b), I think it's fine to specify peripheral mode for now, and allow the user to change it back to host or OTG mode if they want (although OTG mode isn't useful/valid until SW support exists).
A message that is not in the archive (sent off-list or not yet received): 52a9941a-59a5-5b49-be67-3b4991497395-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org
Re: [PATCH v1 4/9] ARM: tegra: Enable UDC on TrimSlice
Quoted 45 lines · Stephen Warren
Quoted 33 lines · Dmitry Osipenko
Quoted 27 lines · Stephen Warren
Quoted 11 lines · Peter Chen
Quoted 10 lines · Dmitry Osipenko
From: Thierry Reding <[email protected]>
Override the compatible string of the first USB controller to enable device mode.
Signed-off-by Thierry Reding <[email protected]>--- arch/arm/boot/dts/tegra20-trimslice.dts | 2 ++ 1 file changed, 2 insertions(+)Quoted 14 lines
arch/arm/boot/dts/tegra20-trimslice.dts line 340
Quoted 11 lines
arch/arm/boot/dts/tegra20-trimslice.dts +2
-0@@ -336,7 +336,9 @@ }; usb@c5000000 { + compatible = "nvidia,tegra20-udc"; status = "okay"; + dr_mode = "otg";If this board supports peripheral-only, you need to set
dr_modeas "peripheral".Quoted 4 lines
I agree here. Even if the ports can theoretically do otg, and DT is supposed to represent HW not SW, given we have no SW support for actual OTG, it'd be best not to change the DT to OTG until it's actually useful to do so. This comment applies to the patches I ack'd already too.
Quoted 5 lines
In case of absence of the "
dr_mode" option or without a support of host mode switching, UDC driver fallbacks to the peripheral mode. Given that DT is supposed to be stable, I'm not sure what to do... should I specify the peripheral mode for now (which doesn't represent the HW) or completely remove the "dr_mode"?I think specifying dr_mode="peripheral" now is fine; we can change it later.
DT ABI compatibility isn't about never changing the DT content, it's about making sure that any schema changes occur in a backwards-compatible fashion.
Quoted 6 lines
Also in the case of a USB port that does support OTG, the
dr_modeproperty represents both (a) the HW's capabilities, and (b) the user's desired (initial, if e.g. sysfs modification is possible) mode of operation if the HW has multiple capabilities. Given (b), I think it's fine to specify peripheral mode for now, and allow the user to change it back to host or OTG mode if they want (although OTG mode isn't useful/valid until SW support exists).
Thank you for the clarification.
Signature · 5 lines
Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v1 4/9] ARM: tegra: Enable UDC on TrimSlice
In reply to a message not in the archivearch/arm/boot/dts/tegra20-trimslice.dts line 342
Quoted 12 lines · Dmitry Osipenko
From: Thierry Reding <[email protected]>
Override the compatible string of the first USB controller to enable device mode.
arch/arm/boot/dts/tegra20-trimslice.dts +2
-0usb@c5000000 { + compatible = "nvidia,tegra20-udc"; status = "okay"; + dr_mode = "otg"; };
As mentioned elsewhere in this thread, there is a mux between this Tegra USB port and the external micro USB connector and the internal USB USB-SATA adapter, such that the micro USB connector is routed to Tegra in USB recovery mode, but the USB-SATA adapter is routed to Tegra at other times. Making the change above will prevent using the USB-SATA adapter, so I don't think we should make this change.
PATCH 5/9 ARM: tegra: Enable UDC on Beaver
In reply to a message not in the archiveFrom: Thierry Reding <[email protected]>
Override the compatible string of the first USB controller to enable device mode.
--- arch/arm/boot/dts/tegra30-beaver.dts | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm/boot/dts/tegra30-beaver.dts +10 -0
@@ -1927,6 +1927,16 @@ non-removable; }; + usb@7d000000 { + compatible = "nvidia,tegra30-udc"; + status = "okay"; + dr_mode = "otg"; + }; + + usb-phy@7d000000 { + status = "okay"; + }; + usb@7d004000 { status = "okay"; };
Signature · 1 line
2.13.2
A message that is not in the archive (sent off-list or not yet received): 39b0632e80a95ec0208e3ed867033ec8de898624.1499273075.git.digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Stephen Warren
Acked-byRe: [PATCH v1 5/9] ARM: tegra: Enable UDC on Beaver
Quoted 4 lines · Dmitry Osipenko
From: Thierry Reding <[email protected]>
Override the compatible string of the first USB controller to enable device mode.
Conceptually I'm fine with this change since the port isn't enabled at all yet and so this doesn't change any existing behaviour. I hope someone tested this on real HW?
A message that is not in the archive (sent off-list or not yet received): 1d7ffa85-edae-fb1a-d013-cd44d11e1536-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org
Re: [PATCH v1 5/9] ARM: tegra: Enable UDC on Beaver
Quoted 11 lines · Stephen Warren
Quoted 4 lines · Dmitry Osipenko
From: Thierry Reding <[email protected]>
Override the compatible string of the first USB controller to enable device mode.
Conceptually I'm fine with this change since the port isn't enabled at all yet and so this doesn't change any existing behaviour. I hope someone tested this on real HW?
Acked-by Stephen Warren <[email protected]>
I presume that Thierry tested all the boards before, Thierry did you?
Signature · 5 lines
Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 6/9 ARM: tegra: Enable UDC on Dalmore
In reply to a message not in the archiveFrom: Thierry Reding <[email protected]>
Override the compatible string of the first USB controller to enable device mode.
--- arch/arm/boot/dts/tegra114-dalmore.dts | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm/boot/dts/tegra114-dalmore.dts +10 -0
@@ -1122,6 +1122,16 @@ non-removable; }; + usb@7d000000 { + compatible = "nvidia,tegra114-udc"; + status = "okay"; + dr_mode = "otg"; + }; + + usb-phy@7d000000 { + status = "okay"; + }; + usb@7d008000 { status = "okay"; };
Signature · 6 lines
2.13.2 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 6756bf3afa16e414c924ec1b4b2608731a9ebcea.1499273075.git.digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Re: [PATCH v1 6/9] ARM: tegra: Enable UDC on Dalmore
Quoted 4 lines · Dmitry Osipenko
From: Thierry Reding <[email protected]>
Override the compatible string of the first USB controller to enable device mode.
I don't have easy access to this HW any more to test this patch; we do have one in our automated test system, but it's rather painful to manually test new features on the board, and I think doing so is more effort than it's worth investing in this particular board.
Do you have this board (I don't think they're widely available at all), and did you test it? If not, I'm a bit surprised it was sent without mentioning that it was untested...
As such, I'd suggest dropping this patch.
PATCH 7/9 ARM: tegra: Enable UDC on Jetson TK1
In reply to a message not in the archiveFrom: Thierry Reding <[email protected]>
Override the compatible string of the first USB controller to enable device mode.
--- arch/arm/boot/dts/tegra124-jetson-tk1.dts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
arch/arm/boot/dts/tegra124-jetson-tk1.dts +11 -1
@@ -1722,7 +1722,7 @@ lanes { usb2-0 { - nvidia,function = "xusb"; + nvidia,function = "snps"; status = "okay"; };
@@ -1829,6 +1829,16 @@ }; }; + usb@7d000000 { + compatible = "nvidia,tegra124-udc"; + status = "okay"; + dr_mode = "otg"; + }; + + usb-phy@7d000000 { + status = "okay"; + }; + /* mini-PCIe USB */ usb@7d004000 { status = "okay";
Signature · 1 line
2.13.2
A message that is not in the archive (sent off-list or not yet received): c6b78a8d149eb9341f41a6b1181569c4b78df1af.1499273075.git.digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Stephen Warren
Acked-byRe: [PATCH v1 7/9] ARM: tegra: Enable UDC on Jetson TK1
Quoted 4 lines · Dmitry Osipenko
From: Thierry Reding <[email protected]>
Override the compatible string of the first USB controller to enable device mode.
Conceptually I'm fine with this change since the port isn't enabled at all yet and so this doesn't change any existing behaviour.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 8/9 ARM: tegra: Enable UDC on AC100
In reply to a message not in the archiveOverride the compatible string of the first USB controller to enable device mode.
--- arch/arm/boot/dts/tegra20-paz00.dts | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/boot/dts/tegra20-paz00.dts +2 -0
@@ -452,7 +452,9 @@ }; usb@c5000000 { + compatible = "nvidia,tegra20-udc"; status = "okay"; + dr_mode = "otg"; }; usb-phy@c5000000 {
Signature · 1 line
2.13.2
A message that is not in the archive (sent off-list or not yet received): a0923f46a14c27afd7d2595dfb8878c2ebf02230.1499273075.git.digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Re: [PATCH v1 8/9] ARM: tegra: Enable UDC on AC100
arch/arm/boot/dts/tegra20-paz00.dts line 458
Quoted 10 lines · Dmitry Osipenko
Override the compatible string of the first USB controller to enable device mode.
arch/arm/boot/dts/tegra20-paz00.dts +2
-0usb@c5000000 { + compatible = "nvidia,tegra20-udc"; status = "okay"; + dr_mode = "otg"; };
This port is the only external USB port on the AC100. I'm not sure it's a good idea to reconfigure it so it can only work in device mode, although given that display, keyboard, and mouse are built-in to this device, perhaps this change is merely unexpected rather than catastrophic to a user, since they can recover via the keyboard/display. Let's drop this patch until OTG mode is actually implemented.
A message that is not in the archive (sent off-list or not yet received): 402c57db-a01b-33eb-28d4-7f4b372351f2-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org
Re: [PATCH v1 8/9] ARM: tegra: Enable UDC on AC100
Quoted 7 lines · Stephen Warren
Quoted 5 lines · Dmitry Osipenko
Override the compatible string of the first USB controller to enable device mode.
arch/arm/boot/dts/tegra20-paz00.dts +0
-0
Quoted 7 lines
arch/arm/boot/dts/tegra20-paz00.dts line 458
Quoted 5 lines
usb@c5000000 {arch/arm/boot/dts/tegra20-paz00.dts +2
-0+ compatible = "nvidia,tegra20-udc"; status = "okay"; + dr_mode = "otg"; };This port is the only external USB port on the AC100.
Seems that's not true. http://elinux.org/Tegra/Boards/Toshiba_AC100 claims that there are host and micro USB ports.
I'm not sure it's a good
Quoted 4 lines
idea to reconfigure it so it can only work in device mode, although given that display, keyboard, and mouse are built-in to this device, perhaps this change is merely unexpected rather than catastrophic to a user, since they can recover via the keyboard/display. Let's drop this patch until OTG mode is actually implemented.
Signature · 1 line
Dmitry
A message that is not in the archive (sent off-list or not yet received): 32f880f8-a49c-8f29-fe26-f50cae31e215-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Stephen Warren
Acked-byRe: [PATCH v1 8/9] ARM: tegra: Enable UDC on AC100
Quoted 14 lines · Dmitry Osipenko
Quoted 13 lines · Stephen Warren
Quoted 11 lines · Dmitry Osipenko
Override the compatible string of the first USB controller to enable device mode.
arch/arm/boot/dts/tegra20-paz00.dts +2
-0usb@c5000000 { + compatible = "nvidia,tegra20-udc"; status = "okay"; + dr_mode = "otg"; };
Quoted 4 lines
Quoted 1 line
This port is the only external USB port on the AC100.
Seems that's not true. http://elinux.org/Tegra/Boards/Toshiba_AC100 claims that there are host and micro USB ports.
You're right; I was getting this board confused with the Springbank variety of Seaboard, and when I looked at the mini USB port on the AC100 I thought it was something else.
Given the physical connector on this USB port on the AC100, it's probably fine to convert it to device-mode only since I don't expect anyone has a USB OTG cable that has a mini size connector on the host end.
It looks like this port is only enabled because the very first version of tegra-paz00.dts didn't explicitly disable the port, and when tegra20.dtsi was updated to disable all USB ports by default, tegra-paz00.dtsi was updated to enable the port so that the DT change didn't affect behaviour, which then left the port enabled explicitly albeit without much reason.
So, once the dr_mode is fixed in this change, it's:
A message that is not in the archive (sent off-list or not yet received): 33990cfa-f2f8-48ba-240b-ad088ba50bb5-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org
Marc Dietrich
Tested-byRe: [PATCH v1 8/9] ARM: tegra: Enable UDC on AC100
Am Donnerstag, 6. Juli 2017, 20:00:02 CEST schrieb Stephen Warren:
Quoted 21 lines · Dmitry Osipenko
Quoted 20 lines · Stephen Warren
Quoted 18 lines · Dmitry Osipenko
Quoted 5 lines
Override the compatible string of the first USB controller to enable device mode.
arch/arm/boot/dts/tegra20-paz00.dts
Quoted 10 lines
arch/arm/boot/dts/tegra20-paz00.dts +2
-0usb@c5000000 { + compatible = "nvidia,tegra20-udc"; status = "okay"; + dr_mode = "otg"; };This port is the only external USB port on the AC100.
Quoted 6 lines
Quoted 2 lines
Seems that's not true. http://elinux.org/Tegra/Boards/Toshiba_AC100 claims that there are host and micro USB ports.
You're right; I was getting this board confused with the Springbank variety of Seaboard, and when I looked at the mini USB port on the AC100 I thought it was something else.
Sorry, for the late reply, I'm on vacation.
Quoted 10 lines
Given the physical connector on this USB port on the AC100, it's probably fine to convert it to device-mode only since I don't expect anyone has a USB OTG cable that has a mini size connector on the host end.
It looks like this port is only enabled because the very first version of
tegra-paz00.dtsdidn't explicitly disable the port, and whentegra20.dtsiwas updated to disable all USB ports by default,tegra-paz00.dtsiwas updated to enable the port so that the DT change didn't affect behaviour, which then left the port enabled explicitly albeit without much reason.
I think someone used it in the past in host mode and it was working, but I think everyone will be happy to have it operating as client only (as original intended), especially because we already have an external (and also an internal) usb port.
Quoted 2 lines
So, once the
dr_modeis fixed in this change, it's:Acked-by Stephen Warren <[email protected]>
Re: [PATCH v1 8/9] ARM: tegra: Enable UDC on AC100
Quoted 22 lines · Marc Dietrich
Am Donnerstag, 6. Juli 2017, 20:00:02 CEST schrieb Stephen Warren:
Quoted 21 lines · Dmitry Osipenko
Quoted 20 lines · Stephen Warren
Quoted 18 lines · Dmitry Osipenko
Quoted 5 lines
Override the compatible string of the first USB controller to enable device mode.
arch/arm/boot/dts/tegra20-paz00.dts
Quoted 10 lines
arch/arm/boot/dts/tegra20-paz00.dts +2
-0usb@c5000000 { + compatible = "nvidia,tegra20-udc"; status = "okay"; + dr_mode = "otg"; };This port is the only external USB port on the AC100.
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
Seems that's not true. http://elinux.org/Tegra/Boards/Toshiba_AC100 claims that there are host and micro USB ports.
You're right; I was getting this board confused with the Springbank variety of Seaboard, and when I looked at the mini USB port on the AC100 I thought it was something else.
Sorry, for the late reply, I'm on vacation.
No worries, have a good time!;)
Quoted 21 lines
Quoted 10 lines
Given the physical connector on this USB port on the AC100, it's probably fine to convert it to device-mode only since I don't expect anyone has a USB OTG cable that has a mini size connector on the host end.
It looks like this port is only enabled because the very first version of
tegra-paz00.dtsdidn't explicitly disable the port, and whentegra20.dtsiwas updated to disable all USB ports by default,tegra-paz00.dtsiwas updated to enable the port so that the DT change didn't affect behaviour, which then left the port enabled explicitly albeit without much reason.I think someone used it in the past in host mode and it was working, but I think everyone will be happy to have it operating as client only (as original intended), especially because we already have an external (and also an internal) usb port.
Quoted 2 lines
So, once the
dr_modeis fixed in this change, it's:Acked-by Stephen Warren <[email protected]>Tested-by Marc Dietrich <[email protected]>
Signature · 5 lines
Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 9/9 ARM: defconfig: tegra: Enable ChipIdea UDC driver
In reply to a message not in the archiveSince NVIDIA Tegra 20/30/40/TK1 are supported now by the ChipIdea driver, let's enable this driver in tegra_defconfig.
--- arch/arm/configs/tegra_defconfig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
arch/arm/configs/tegra_defconfig +5 -5
@@ -121,7 +121,6 @@ CONFIG_TOUCHSCREEN_WM97XX=y CONFIG_TOUCHSCREEN_STMPE=y CONFIG_INPUT_MISC=y # CONFIG_LEGACY_PTYS is not set -# CONFIG_DEVKMEM is not set CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_OF_PLATFORM=y
@@ -218,6 +217,9 @@ CONFIG_USB_EHCI_TEGRA=y CONFIG_USB_ACM=y CONFIG_USB_WDM=y CONFIG_USB_STORAGE=y +CONFIG_USB_CHIPIDEA=m +CONFIG_USB_CHIPIDEA_UDC=y +CONFIG_USB_GADGET=m CONFIG_MMC=y CONFIG_MMC_BLOCK_MINORS=16 CONFIG_MMC_SDHCI=y
@@ -247,8 +249,6 @@ CONFIG_RTC_DRV_TEGRA=y CONFIG_DMADEVICES=y CONFIG_TEGRA20_APB_DMA=y CONFIG_STAGING=y -CONFIG_SENSORS_ISL29018=y -CONFIG_SENSORS_ISL29028=y CONFIG_MFD_NVEC=y CONFIG_KEYBOARD_NVEC=y CONFIG_SERIO_NVEC_PS2=y
@@ -263,6 +263,8 @@ CONFIG_ARCH_TEGRA_124_SOC=y CONFIG_MEMORY=y CONFIG_IIO=y CONFIG_MPU3050_I2C=y +CONFIG_SENSORS_ISL29018=y +CONFIG_SENSORS_ISL29028=y CONFIG_AK8975=y CONFIG_PWM=y CONFIG_PWM_TEGRA=y
@@ -288,13 +290,11 @@ CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y CONFIG_PRINTK_TIME=y CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_FS=y CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_SLAB=y CONFIG_DEBUG_VM=y CONFIG_DETECT_HUNG_TASK=y CONFIG_SCHEDSTATS=y -CONFIG_TIMER_STATS=y # CONFIG_DEBUG_PREEMPT is not set CONFIG_DEBUG_MUTEXES=y CONFIG_DEBUG_SG=y
Signature · 1 line
2.13.2
A message that is not in the archive (sent off-list or not yet received): 5eac9306f4049ba51ed8b7f53820d28f294725cb.1499273075.git.digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Re: [PATCH v1 9/9] ARM: defconfig: tegra: Enable ChipIdea UDC driver
Quoted 2 lines · Dmitry Osipenko
Since NVIDIA Tegra 20/30/40/TK1 are supported now by the ChipIdea driver, let's enable this driver in
tegra_defconfig.
Shouldn't this patch be earlier in the series so that we don't completely break USB support between the patch which switches a port to the UDC driver and the UDC driver actually being built? --
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 3fe1b3b2-6473-399a-807e-f007a10c05cd-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org
Re: [PATCH v1 9/9] ARM: defconfig: tegra: Enable ChipIdea UDC driver
Quoted 7 lines · Stephen Warren
Quoted 2 lines · Dmitry Osipenko
Since NVIDIA Tegra 20/30/40/TK1 are supported now by the ChipIdea driver, let's enable this driver in
tegra_defconfig.Shouldn't this patch be earlier in the series so that we don't completely break USB support between the patch which switches a port to the UDC driver and the UDC driver actually being built?
I assume that host mode doesn't work at all on AC100 / TrimSlice. Otherwise this patch should be earlier in the series only if we agree that it should be okay to switch those devices to the UDC driver.
Signature · 5 lines
Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 6 lines · Dmitry Osipenko
Some time ago Thierry Reding sent out patches that enabled UDC on NVIDIA Tegra, unfortunately they haven't got enough traction to get into the kernel. I've rebased those patches and added a fix for the Ethernet USB Gadget on Tegra20, Marc Dietrich tested UDC driver on AC100 and Nicolas Chauvet on TK1. Like an original patchset, this series adds support for the peripheral mode only.
Does this mean that the relevant ports no longer support host mode? That's going to be a user-visible regression, which doesn't sound like a good idea. Isn't OTG possible instead?
A message that is not in the archive (sent off-list or not yet received): b5c54655-ccf4-2d4e-59fe-4a9e4609605a-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org
Quoted 11 lines · Stephen Warren
Quoted 6 lines · Dmitry Osipenko
Some time ago Thierry Reding sent out patches that enabled UDC on NVIDIA Tegra, unfortunately they haven't got enough traction to get into the kernel. I've rebased those patches and added a fix for the Ethernet USB Gadget on Tegra20, Marc Dietrich tested UDC driver on AC100 and Nicolas Chauvet on TK1. Like an original patchset, this series adds support for the peripheral mode only.
Does this mean that the relevant ports no longer support host mode? That's going to be a user-visible regression, which doesn't sound like a good idea. Isn't OTG possible instead?
We are going to switch only AC100 and TrimSlice to use the UDC driver. Do you know whether that port is working in a host mode with the tegra-ehci driver on these devices? That should be a micro USB port. Since that port is working in a device mode by default, I presume that switching it into a host mode would require some extra 'dance', otherwise I may drop the AC100 / TrimSlice patches.
The full-featured OTG should be possible, it could be done later if desired. I'm leaving it to somebody else to implement.
Signature · 1 line
Dmitry
A message that is not in the archive (sent off-list or not yet received): c8d9740a-7792-87d9-9466-8d3a45280403-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Quoted 9 lines · Dmitry Osipenko
Quoted 8 lines · Stephen Warren
Quoted 6 lines · Dmitry Osipenko
Some time ago Thierry Reding sent out patches that enabled UDC on NVIDIA Tegra, unfortunately they haven't got enough traction to get into the kernel. I've rebased those patches and added a fix for the Ethernet USB Gadget on Tegra20, Marc Dietrich tested UDC driver on AC100 and Nicolas Chauvet on TK1. Like an original patchset, this series adds support for the peripheral mode only.
Quoted 5 lines
Quoted 3 lines
Does this mean that the relevant ports no longer support host mode? That's going to be a user-visible regression, which doesn't sound like a good idea. Isn't OTG possible instead?
We are going to switch only AC100 and TrimSlice to use the UDC driver.
Really? I saw patches in the series for Beaver, Dalmore, and Jetson TK1 too.
Quoted 3 lines
Do you
know whether that port is working in a host mode with the tegra-ehci driver on these devices?
If any USB port is enabled in the DT, it was certainly validated at some point. IIRC, we only have host mode enabled at present. So, yes, I'd expect this port to work in host mode currently without any issue.
Quoted 6 lines
That should be a micro USB port. Since that port is working in a device mode by default, I presume that switching it into a host mode would require some extra 'dance', otherwise I may drop the AC100 / TrimSlice patches.
The full-featured OTG should be possible, it could be done later if desired. I'm leaving it to somebody else to implement.
A message that is not in the archive (sent off-list or not yet received): 63e87e5c-5331-2680-7686-5ed22718a2bd-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org
Quoted 10 lines · Stephen Warren
Quoted 9 lines · Dmitry Osipenko
Quoted 8 lines · Stephen Warren
Quoted 6 lines · Dmitry Osipenko
Some time ago Thierry Reding sent out patches that enabled UDC on NVIDIA Tegra, unfortunately they haven't got enough traction to get into the kernel. I've rebased those patches and added a fix for the Ethernet USB Gadget on Tegra20, Marc Dietrich tested UDC driver on AC100 and Nicolas Chauvet on TK1. Like an original patchset, this series adds support for the peripheral mode only.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Does this mean that the relevant ports no longer support host mode? That's going to be a user-visible regression, which doesn't sound like a good idea. Isn't OTG possible instead?
We are going to switch only AC100 and TrimSlice to use the UDC driver.
Really? I saw patches in the series for Beaver, Dalmore, and Jetson TK1 too.
Yes, the "PHY" and "EHCI" nodes are disabled on those boards in DT.
Quoted 8 lines
Quoted 3 lines
Do you
know whether that port is working in a host mode with the tegra-ehci driver on these devices?If any USB port is enabled in the DT, it was certainly validated at some point. IIRC, we only have host mode enabled at present. So, yes, I'd expect this port to work in host mode currently without any issue.
Okay, so we have to decide whether it's reasonable to switch AC100 and TrimSlice to the peripheral mode. I think realistically chances that someone uses that port in a host mode are quite low, while it works fine and probably more useful in a device mode.
Quoted 6 lines
Quoted 6 lines
That should be a micro USB port. Since that port is working in a device mode by default, I presume that switching it into a host mode would require some extra 'dance', otherwise I may drop the AC100 / TrimSlice patches.
The full-featured OTG should be possible, it could be done later if desired. I'm leaving it to somebody else to implement.
Signature · 5 lines
Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 94e2532d-d342-3062-ec7a-6dfd865c1b62-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Quoted 31 lines · Dmitry Osipenko
Quoted 10 lines · Stephen Warren
Quoted 9 lines · Dmitry Osipenko
Quoted 8 lines · Stephen Warren
Quoted 6 lines · Dmitry Osipenko
Some time ago Thierry Reding sent out patches that enabled UDC on NVIDIA Tegra, unfortunately they haven't got enough traction to get into the kernel. I've rebased those patches and added a fix for the Ethernet USB Gadget on Tegra20, Marc Dietrich tested UDC driver on AC100 and Nicolas Chauvet on TK1. Like an original patchset, this series adds support for the peripheral mode only.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Does this mean that the relevant ports no longer support host mode? That's going to be a user-visible regression, which doesn't sound like a good idea. Isn't OTG possible instead?
We are going to switch only AC100 and TrimSlice to use the UDC driver.
Really? I saw patches in the series for Beaver, Dalmore, and Jetson TK1 too.
Yes, the "PHY" and "EHCI" nodes are disabled on those boards in DT.
Quoted 8 lines
Quoted 3 lines
Do you
know whether that port is working in a host mode with the tegra-ehci driver on these devices?If any USB port is enabled in the DT, it was certainly validated at some point. IIRC, we only have host mode enabled at present. So, yes, I'd expect this port to work in host mode currently without any issue.
Quoted 4 lines
Okay, so we have to decide whether it's reasonable to switch AC100 and TrimSlice to the peripheral mode. I think realistically chances that someone uses that port in a host mode are quite low, while it works fine and probably more useful in a device mode.
Judging by this:
http://trimslice.com/download/documentation/trim-slice-man.pdf
at least TrimSlice doesn't seem to implement OTG, so we'd have to make a choice to support either host or peripheral mode. I guess technically it would need to be peripheral mode because pin 4 is not connected.
Does a similar document exist for AC100?
Thierry
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 56 lines · Thierry Reding
Quoted 43 lines · Dmitry Osipenko
Quoted 21 lines · Stephen Warren
Quoted 20 lines · Dmitry Osipenko
Quoted 18 lines · Stephen Warren
Quoted 11 lines · Dmitry Osipenko
Some time ago Thierry Reding sent out patches that enabled UDC on NVIDIA
Tegra, unfortunately they haven't got enough traction to get into the
kernel. I've rebased those patches and added a fix for the Ethernet USB
Gadget on Tegra20, Marc Dietrich tested UDC driver on AC100 and Nicolas
Chauvet on TK1. Like an original patchset, this series adds support for
the peripheral mode only.Does this mean that the relevant ports no longer support host mode? That's going
to be a user-visible regression, which doesn't sound like a good idea. Isn't OTG
possible instead?Quoted 6 lines
Quoted 2 lines
We are going to switch only AC100 and TrimSlice to use the UDC driver.
Really? I saw patches in the series for Beaver, Dalmore, and Jetson TK1 too.
Yes, the "PHY" and "EHCI" nodes are disabled on those boards in DT.
Quoted 11 lines
Quoted 4 lines
Do you
know whether that port is working in a host mode with the tegra-ehci driver on
these devices?If any USB port is enabled in the DT, it was certainly validated at some point.
IIRC, we only have host mode enabled at present. So, yes, I'd expect this port
to work in host mode currently without any issue.Quoted 7 lines
Okay, so we have to decide whether it's reasonable to switch AC100 and TrimSlice
to the peripheral mode. I think realistically chances that someone uses that
port in a host mode are quite low, while it works fine and probably more useful
in a device mode.Judging by this:
http://trimslice.com/download/documentation/trim-slice-man.pdf
Quoted 7 lines
at least TrimSlice doesn't seem to implement OTG, so we'd have to make a
choice to support either host or peripheral mode. I guess technically it
would need to be peripheral mode because pin 4 is not connected.Does a similar document exist for AC100?
Judging by the Compal PAZ00 schematics it does indeed have an ID pin which is connected to the mini USB socket.
USB1_ID1: From Connector
USB1_ID2: From EC
So an alternative possibility to switch device/host mode would be from the EC (;-p).
Quoted 1 line
Thierry
Cheers
Marcel
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 68 lines · Marcel Ziswiler
Quoted 56 lines · Thierry Reding
Quoted 43 lines · Dmitry Osipenko
Quoted 21 lines · Stephen Warren
Quoted 20 lines · Dmitry Osipenko
Quoted 18 lines · Stephen Warren
Quoted 11 lines · Dmitry Osipenko
Some time ago Thierry Reding sent out patches that enabled UDC on NVIDIA
Tegra, unfortunately they haven't got enough traction to get into the
kernel. I've rebased those patches and added a fix for the Ethernet USB
Gadget on Tegra20, Marc Dietrich tested UDC driver on AC100 and Nicolas
Chauvet on TK1. Like an original patchset, this series adds support for
the peripheral mode only.Does this mean that the relevant ports no longer support host mode? That's going
to be a user-visible regression, which doesn't sound like a good idea. Isn't OTG
possible instead?Quoted 6 lines
Quoted 2 lines
We are going to switch only AC100 and TrimSlice to use the UDC driver.
Really? I saw patches in the series for Beaver, Dalmore, and Jetson TK1 too.
Yes, the "PHY" and "EHCI" nodes are disabled on those boards in DT.
Quoted 11 lines
Quoted 4 lines
Do you
know whether that port is working in a host mode with the tegra-ehci driver on
these devices?If any USB port is enabled in the DT, it was certainly validated at some point.
IIRC, we only have host mode enabled at present. So, yes, I'd expect this port
to work in host mode currently without any issue.Quoted 7 lines
Okay, so we have to decide whether it's reasonable to switch AC100 and TrimSlice
to the peripheral mode. I think realistically chances that someone uses that
port in a host mode are quite low, while it works fine and probably more useful
in a device mode.Judging by this:
http://trimslice.com/download/documentation/trim-slice-man.pdf
Quoted 7 lines
at least TrimSlice doesn't seem to implement OTG, so we'd have to make a
choice to support either host or peripheral mode. I guess technically it
would need to be peripheral mode because pin 4 is not connected.Does a similar document exist for AC100?
Judging by the Compal PAZ00 schematics it does indeed have an ID pin which is connected to the mini USB socket.
Quoted 6 lines
USB1_ID1: From Connector
USB1_ID2: From ECSo an alternative possibility to switch device/host mode would be from the EC (;-p).
According to the TRM, there's a USB PHY register that can be used to query the ID/VBUS pins. They can optionally also be connected to a pair of GPIO lines. Apparently it's even possible to hook them up to the PMU and use a PMU specific mechanism. Most of that information can be found in downstream kernel code.
Using U-Boot I can monitor the USB1_IF_USB_PHY_VBUS_WAKEUP_ID_0 register (address 0x7d000408) and I see that bit ID_STS changes, and can presumably trigger an interrupt when ID_INT_EN is set.
According to the downstream kernel this isn't supposed to work on the Jetson TK1 up to and including the D revision, but it seems to work in U-Boot at least on the C revision that I have. For earlier revisions there is a sysfs attribute that can be used to force the port into the desired mode.
Can anyone check whether or not the above register (on Tegra20, the physical address of the register should be 0xc5000408) changes when switching between micro A and micro B cables on TrimSlice and/or PAZ00? Note that I wasn't able to see a difference after unplugging a micro B cable. It only toggles after plugging in the micro A or after unplugging the micro B, which I think really only means that by default the port will be in peripheral mode. This can probably also be influenced by setting or clearing the ID_PU field (pull-up on ID pin).
If this works reliably, we may be able to implement a very simple form of detecting host/peripheral mode.
Thierry
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 101 lines · Thierry Reding
Quoted 68 lines · Marcel Ziswiler
Quoted 56 lines · Thierry Reding
Quoted 43 lines · Dmitry Osipenko
Quoted 21 lines · Stephen Warren
Quoted 20 lines · Dmitry Osipenko
Quoted 18 lines · Stephen Warren
Quoted 11 lines · Dmitry Osipenko
Some time ago Thierry Reding sent out patches that enabled UDC on NVIDIA
Tegra, unfortunately they haven't got enough traction to get into the
kernel. I've rebased those patches and added a fix for the Ethernet USB
Gadget on Tegra20, Marc Dietrich tested UDC driver on AC100 and Nicolas
Chauvet on TK1. Like an original patchset, this series adds support for
the peripheral mode only.Does this mean that the relevant ports no longer support host mode? That's going
to be a user-visible regression, which doesn't sound like a good idea. Isn't OTG
possible instead?Quoted 6 lines
Quoted 2 lines
We are going to switch only AC100 and TrimSlice to use the UDC driver.
Really? I saw patches in the series for Beaver, Dalmore, and Jetson TK1 too.
Yes, the "PHY" and "EHCI" nodes are disabled on those boards in DT.
Quoted 11 lines
Quoted 4 lines
Do you
know whether that port is working in a host mode with the tegra-ehci driver on
these devices?If any USB port is enabled in the DT, it was certainly validated at some point.
IIRC, we only have host mode enabled at present. So, yes, I'd expect this port
to work in host mode currently without any issue.Quoted 7 lines
Okay, so we have to decide whether it's reasonable to switch AC100 and TrimSlice
to the peripheral mode. I think realistically chances that someone uses that
port in a host mode are quite low, while it works fine and probably more useful
in a device mode.Judging by this:
http://trimslice.com/download/documentation/trim-slice-man.pdf
Quoted 7 lines
at least TrimSlice doesn't seem to implement OTG, so we'd have to make a
choice to support either host or peripheral mode. I guess technically it
would need to be peripheral mode because pin 4 is not connected.Does a similar document exist for AC100?
Judging by the Compal PAZ00 schematics it does indeed have an ID pin which is connected to the mini USB socket.
Quoted 6 lines
USB1_ID1: From Connector
USB1_ID2: From ECSo an alternative possibility to switch device/host mode would be from the EC (;-p).
According to the TRM, there's a USB PHY register that can be used to query the ID/VBUS pins. They can optionally also be connected to a pair of GPIO lines. Apparently it's even possible to hook them up to the PMU and use a PMU specific mechanism. Most of that information can be found in downstream kernel code.
Using U-Boot I can monitor the
USB1_IF_USB_PHY_VBUS_WAKEUP_ID_0register (address0x7d000408) and I see that bitID_STSchanges, and can presumably trigger an interrupt whenID_INT_ENis set.According to the downstream kernel this isn't supposed to work on the Jetson TK1 up to and including the D revision, but it seems to work in U-Boot at least on the C revision that I have. For earlier revisions there is a sysfs attribute that can be used to force the port into the desired mode.
Can anyone check whether or not the above register (on Tegra20, the physical address of the register should be
0xc5000408) changes when switching between micro A and micro B cables on TrimSlice and/or PAZ00? Note that I wasn't able to see a difference after unplugging a micro B cable. It only toggles after plugging in the micro A or after unplugging the micro B, which I think really only means that by default the port will be in peripheral mode. This can probably also be influenced by setting or clearing theID_PUfield (pull-up on ID pin).
Quoted 2 lines
If this works reliably, we may be able to implement a very simple form of detecting host/peripheral mode.
According to the doc, the primary function of USB1 controller on TrimSlice is for USB-to-SATA. So I think micro USB there is intended for recovery mode only, in that case we should drop TrimSlice from the patchset.
Signature · 1 line
Dmitry
Quoted 13 lines · Dmitry Osipenko
Quoted 11 lines · Stephen Warren
Quoted 6 lines · Dmitry Osipenko
Some time ago Thierry Reding sent out patches that enabled UDC on NVIDIA Tegra, unfortunately they haven't got enough traction to get into the kernel. I've rebased those patches and added a fix for the Ethernet USB Gadget on Tegra20, Marc Dietrich tested UDC driver on AC100 and Nicolas Chauvet on TK1. Like an original patchset, this series adds support for the peripheral mode only.
Does this mean that the relevant ports no longer support host mode? That's going to be a user-visible regression, which doesn't sound like a good idea. Isn't OTG possible instead?
Quoted 9 lines
We are going to switch only AC100 and TrimSlice to use the UDC driver. Do you know whether that port is working in a host mode with the tegra-ehci driver on these devices? That should be a micro USB port. Since that port is working in a device mode by default, I presume that switching it into a host mode would require some extra 'dance', otherwise I may drop the AC100 / TrimSlice patches.
The full-featured OTG should be possible, it could be done later if desired. I'm leaving it to somebody else to implement.
Full-featured OTG? Do you mean it is compliances OTG spec, or just support dual-role switch through ID pin or external connector?
Signature · 2 lines
Best Regards, Peter Chen
Quoted 20 lines · Peter Chen
Quoted 19 lines · Dmitry Osipenko
Quoted 11 lines · Stephen Warren
Quoted 6 lines · Dmitry Osipenko
Some time ago Thierry Reding sent out patches that enabled UDC on NVIDIA Tegra, unfortunately they haven't got enough traction to get into the kernel. I've rebased those patches and added a fix for the Ethernet USB Gadget on Tegra20, Marc Dietrich tested UDC driver on AC100 and Nicolas Chauvet on TK1. Like an original patchset, this series adds support for the peripheral mode only.
Does this mean that the relevant ports no longer support host mode? That's going to be a user-visible regression, which doesn't sound like a good idea. Isn't OTG possible instead?
We are going to switch only AC100 and TrimSlice to use the UDC driver. Do you know whether that port is working in a host mode with the tegra-ehci driver on these devices? That should be a micro USB port. Since that port is working in a device mode by default, I presume that switching it into a host mode would require some extra 'dance', otherwise I may drop the AC100 / TrimSlice patches.
Quoted 7 lines
Quoted 3 lines
The full-featured OTG should be possible, it could be done later if desired. I'm leaving it to somebody else to implement.
Full-featured OTG? Do you mean it is compliances OTG spec, or just support dual-role switch through ID pin or external connector?
I meant the dual-role.
Signature · 1 line
Dmitry