Skip to contentSkip to conversation

usb: gadget: tegra-xudc: Add Tegra234 SOC support

PATCH In review Wayne Chang 2 participants 4 messages Sep 28, 2022 – Sep 29, 2022

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

PATCH 1/1 usb: gadget: tegra-xudc: Add Tegra234 SOC support

From: Sing-Han Chen <[email protected]>

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

---
 drivers/usb/gadget/udc/tegra-xudc.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
drivers/usb/gadget/udc/tegra-xudc.c +17 -0
index 3c37effdfa64..53277aa5a270 100644
@@ -3656,6 +3656,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",
@@ -3669,6 +3682,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);
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 36 lines · Wayne Chang

From: Sing-Han Chen <[email protected]>

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

---
  drivers/usb/gadget/udc/tegra-xudc.c | 17 +++++++++++++++++
  1 file changed, 17 insertions(+)
drivers/usb/gadget/udc/tegra-xudc.c +13 -0
index 3c37effdfa64..53277aa5a270 100644
@@ -3656,6 +3656,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",

drivers/usb/gadget/udc/tegra-xudc.c static const struct of_device_id tegra_xudc_of_match[] = { · line 3688

Quoted 7 lines
drivers/usb/gadget/udc/tegra-xudc.c +4 -0
@@ -3669,6 +3682,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
+	},

The device-tree binding documentation is missing for this compatible string. Please send a patch to add this compatible string to the appropriate binding doc.

Thanks!
Jon

Signature · 1 line
nvpublic
#2 lore raw

Hi Jonathan,

Thanks for the review.

Quoted 42 lines · Jonathan Hunter
Quoted 40 lines · Wayne Chang

From: Sing-Han Chen <[email protected]>

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

---
   drivers/usb/gadget/udc/tegra-xudc.c | 17 +++++++++++++++++
   1 file changed, 17 insertions(+)
drivers/usb/gadget/udc/tegra-xudc.c +14 -0
index 3c37effdfa64..53277aa5a270 100644
@@ -3656,6 +3656,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",
@@ -3669,6 +3682,10 @@ static const struct of_device_id tegra_xudc_of_match[] = {
   		.compatible = "nvidia,tegra194-xudc",
   		.data = &tegra194_xudc_soc_data
   	},
+	{
Quoted 8 lines

drivers/usb/gadget/udc/tegra-xudc.c static const struct of_device_id tegra_xudc_of_match[] = { · line 3688

Quoted 3 lines
drivers/usb/gadget/udc/tegra-xudc.c +3 -0
+		.compatible = "nvidia,tegra234-xudc",
+		.data = &tegra234_xudc_soc_data
+	},

The device-tree binding documentation is missing for this compatible string. Please send a patch to add this compatible string to the appropriate binding doc.

Thanks. Sent out the change to add the compatible string to xudc binding doc.

https://lore.kernel.org/all/[email protected]/T/#u

Quoted 4 lines

Thanks!
Jon

thanks,
Wayne.

maintainer
#3 lore raw
Quoted 55 lines · Wayne Chang

Hi Jonathan,

Thanks for the review.

Quoted 42 lines · Jonathan Hunter
Quoted 40 lines · Wayne Chang

From: Sing-Han Chen <[email protected]>

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

---
    drivers/usb/gadget/udc/tegra-xudc.c | 17 +++++++++++++++++
    1 file changed, 17 insertions(+)
drivers/usb/gadget/udc/tegra-xudc.c +14 -0
index 3c37effdfa64..53277aa5a270 100644
@@ -3656,6 +3656,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",
@@ -3669,6 +3682,10 @@ static const struct of_device_id tegra_xudc_of_match[] = {
    		.compatible = "nvidia,tegra194-xudc",
    		.data = &tegra194_xudc_soc_data
    	},
+	{
Quoted 8 lines

drivers/usb/gadget/udc/tegra-xudc.c static const struct of_device_id tegra_xudc_of_match[] = { · line 3688

Quoted 3 lines
drivers/usb/gadget/udc/tegra-xudc.c +3 -0
+		.compatible = "nvidia,tegra234-xudc",
+		.data = &tegra234_xudc_soc_data
+	},

The device-tree binding documentation is missing for this compatible string. Please send a patch to add this compatible string to the appropriate binding doc.

Quoted 4 lines

Thanks. Sent out the change to add the compatible string to xudc binding doc.

https://lore.kernel.org/all/[email protected]/T/#u

OK. Always best to send out these patches in a series together. I see Krzysztof asking for the driver and DTS change. Given that we are already at v6.0-rc7 this will not make v6.1, and so good to put all the patches together in a series and resend.

Thanks
Jon

Signature · 1 line
nvpublic