diff mbox series

[v3,13/13] usb: gadget: tegra-xudc: Add Tegra234 support

Message ID 20221114124053.1873316-14-waynec@nvidia.com (mailing list archive)
State Accepted
Commit 331df1f3bbbc5e783dbf6f6100daabd40e12fb87
Headers show
Series Enable USB host and device functions on Jetson | expand

Commit Message

Wayne Chang Nov. 14, 2022, 12:40 p.m. UTC
From: Sing-Han Chen <singhanc@nvidia.com>

This commit adds support for XUSB device mode controller support on
Tegra234 SoC. This is very similar to the existing Tegra194 XUDC.

Signed-off-by: Sing-Han Chen <singhanc@nvidia.com>
Signed-off-by: Wayne Chang <waynec@nvidia.com>
---
V2 -> V3:nothing has changed
V1 -> V2:nothing has changed
 drivers/usb/gadget/udc/tegra-xudc.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

Comments

Jon Hunter Nov. 15, 2022, 12:23 p.m. UTC | #1
On 14/11/2022 12:40, Wayne Chang wrote:
> From: Sing-Han Chen <singhanc@nvidia.com>
> 
> This commit adds support for XUSB device mode controller support on
> Tegra234 SoC. This is very similar to the existing Tegra194 XUDC.
> 
> Signed-off-by: Sing-Han Chen <singhanc@nvidia.com>
> Signed-off-by: Wayne Chang <waynec@nvidia.com>
> ---
> V2 -> V3:nothing has changed
> V1 -> V2:nothing has changed
>   drivers/usb/gadget/udc/tegra-xudc.c | 17 +++++++++++++++++
>   1 file changed, 17 insertions(+)
> 
> diff --git a/drivers/usb/gadget/udc/tegra-xudc.c b/drivers/usb/gadget/udc/tegra-xudc.c
> index 76919d7570d2..ff697190469b 100644
> --- a/drivers/usb/gadget/udc/tegra-xudc.c
> +++ b/drivers/usb/gadget/udc/tegra-xudc.c
> @@ -3660,6 +3660,19 @@ static struct tegra_xudc_soc tegra194_xudc_soc_data = {
>   	.has_ipfs = false,
>   };
>   
> +static struct tegra_xudc_soc tegra234_xudc_soc_data = {
> +	.clock_names = tegra186_xudc_clock_names,
> +	.num_clks = ARRAY_SIZE(tegra186_xudc_clock_names),
> +	.num_phys = 4,
> +	.u1_enable = true,
> +	.u2_enable = true,
> +	.lpm_enable = true,
> +	.invalid_seq_num = false,
> +	.pls_quirk = false,
> +	.port_reset_quirk = false,
> +	.has_ipfs = false,
> +};
> +
>   static const struct of_device_id tegra_xudc_of_match[] = {
>   	{
>   		.compatible = "nvidia,tegra210-xudc",
> @@ -3673,6 +3686,10 @@ static const struct of_device_id tegra_xudc_of_match[] = {
>   		.compatible = "nvidia,tegra194-xudc",
>   		.data = &tegra194_xudc_soc_data
>   	},
> +	{
> +		.compatible = "nvidia,tegra234-xudc",
> +		.data = &tegra234_xudc_soc_data
> +	},
>   	{ }
>   };
>   MODULE_DEVICE_TABLE(of, tegra_xudc_of_match);

Reviewed-by: Jon Hunter <jonathanh@nvidia.com>

Thanks
Jon
diff mbox series

Patch

diff --git a/drivers/usb/gadget/udc/tegra-xudc.c b/drivers/usb/gadget/udc/tegra-xudc.c
index 76919d7570d2..ff697190469b 100644
--- a/drivers/usb/gadget/udc/tegra-xudc.c
+++ b/drivers/usb/gadget/udc/tegra-xudc.c
@@ -3660,6 +3660,19 @@  static struct tegra_xudc_soc tegra194_xudc_soc_data = {
 	.has_ipfs = false,
 };
 
+static struct tegra_xudc_soc tegra234_xudc_soc_data = {
+	.clock_names = tegra186_xudc_clock_names,
+	.num_clks = ARRAY_SIZE(tegra186_xudc_clock_names),
+	.num_phys = 4,
+	.u1_enable = true,
+	.u2_enable = true,
+	.lpm_enable = true,
+	.invalid_seq_num = false,
+	.pls_quirk = false,
+	.port_reset_quirk = false,
+	.has_ipfs = false,
+};
+
 static const struct of_device_id tegra_xudc_of_match[] = {
 	{
 		.compatible = "nvidia,tegra210-xudc",
@@ -3673,6 +3686,10 @@  static const struct of_device_id tegra_xudc_of_match[] = {
 		.compatible = "nvidia,tegra194-xudc",
 		.data = &tegra194_xudc_soc_data
 	},
+	{
+		.compatible = "nvidia,tegra234-xudc",
+		.data = &tegra234_xudc_soc_data
+	},
 	{ }
 };
 MODULE_DEVICE_TABLE(of, tegra_xudc_of_match);