All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] usb: gadget: tegra-xudc: Add Tegra234 SOC support
@ 2022-09-28 13:55 Wayne Chang
  2022-09-28 19:03 ` Jon Hunter
  0 siblings, 1 reply; 4+ messages in thread
From: Wayne Chang @ 2022-09-28 13:55 UTC (permalink / raw)
  To: balbi, gregkh, thierry.reding, jonathanh
  Cc: waynec, singhanc, linux-usb, linux-tegra, linux-kernel

From: Sing-Han Chen <singhanc@nvidia.com>

This commit adds XUSB device mode controller support on Tegra234 SoC.
Tegra234 XUDC 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>
---
 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 3c37effdfa64..53277aa5a270 100644
--- a/drivers/usb/gadget/udc/tegra-xudc.c
+++ b/drivers/usb/gadget/udc/tegra-xudc.c
@@ -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);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] usb: gadget: tegra-xudc: Add Tegra234 SOC support
  2022-09-28 13:55 [PATCH 1/1] usb: gadget: tegra-xudc: Add Tegra234 SOC support Wayne Chang
@ 2022-09-28 19:03 ` Jon Hunter
  2022-09-29  3:46   ` Wayne Chang
  0 siblings, 1 reply; 4+ messages in thread
From: Jon Hunter @ 2022-09-28 19:03 UTC (permalink / raw)
  To: Wayne Chang, balbi, gregkh, thierry.reding
  Cc: singhanc, linux-usb, linux-tegra, linux-kernel


On 28/09/2022 14:55, Wayne Chang wrote:
> From: Sing-Han Chen <singhanc@nvidia.com>
> 
> This commit adds XUSB device mode controller support on Tegra234 SoC.
> Tegra234 XUDC 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>
> ---
>   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 3c37effdfa64..53277aa5a270 100644
> --- a/drivers/usb/gadget/udc/tegra-xudc.c
> +++ b/drivers/usb/gadget/udc/tegra-xudc.c
> @@ -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
> +	},


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

-- 
nvpublic

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] usb: gadget: tegra-xudc: Add Tegra234 SOC support
  2022-09-28 19:03 ` Jon Hunter
@ 2022-09-29  3:46   ` Wayne Chang
  2022-09-29  7:40     ` Jon Hunter
  0 siblings, 1 reply; 4+ messages in thread
From: Wayne Chang @ 2022-09-29  3:46 UTC (permalink / raw)
  To: Jonathan Hunter, balbi, gregkh, thierry.reding
  Cc: Sing-Han Chen, linux-usb, linux-tegra, linux-kernel

Hi Jonathan,

Thanks for the review.

On 9/29/22 03:04, Jonathan Hunter wrote:
> 
> On 28/09/2022 14:55, Wayne Chang wrote:
>> From: Sing-Han Chen <singhanc@nvidia.com>
>>
>> This commit adds XUSB device mode controller support on Tegra234 SoC.
>> Tegra234 XUDC 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>
>> ---
>>    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 3c37effdfa64..53277aa5a270 100644
>> --- a/drivers/usb/gadget/udc/tegra-xudc.c
>> +++ b/drivers/usb/gadget/udc/tegra-xudc.c
>> @@ -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
>> +	},
> 
> 
> 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/20220929034221.3817058-1-waynec@nvidia.com/T/#u

> 
> Thanks!
> Jon
> 

thanks,
Wayne.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] usb: gadget: tegra-xudc: Add Tegra234 SOC support
  2022-09-29  3:46   ` Wayne Chang
@ 2022-09-29  7:40     ` Jon Hunter
  0 siblings, 0 replies; 4+ messages in thread
From: Jon Hunter @ 2022-09-29  7:40 UTC (permalink / raw)
  To: Wayne Chang, balbi, gregkh, thierry.reding
  Cc: Sing-Han Chen, linux-usb, linux-tegra, linux-kernel


On 29/09/2022 04:46, Wayne Chang wrote:
> Hi Jonathan,
> 
> Thanks for the review.
> 
> On 9/29/22 03:04, Jonathan Hunter wrote:
>>
>> On 28/09/2022 14:55, Wayne Chang wrote:
>>> From: Sing-Han Chen <singhanc@nvidia.com>
>>>
>>> This commit adds XUSB device mode controller support on Tegra234 SoC.
>>> Tegra234 XUDC 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>
>>> ---
>>>     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 3c37effdfa64..53277aa5a270 100644
>>> --- a/drivers/usb/gadget/udc/tegra-xudc.c
>>> +++ b/drivers/usb/gadget/udc/tegra-xudc.c
>>> @@ -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
>>> +	},
>>
>>
>> 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/20220929034221.3817058-1-waynec@nvidia.com/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

-- 
nvpublic

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-09-29  7:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-28 13:55 [PATCH 1/1] usb: gadget: tegra-xudc: Add Tegra234 SOC support Wayne Chang
2022-09-28 19:03 ` Jon Hunter
2022-09-29  3:46   ` Wayne Chang
2022-09-29  7:40     ` Jon Hunter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.