mbox series

[v2,0/3] Add USB DWC3 support for SC7180

Message ID 1574940787-1004-1-git-send-email-sanm@codeaurora.org
Headers show
Series Add USB DWC3 support for SC7180 | expand

Message

Sandeep Maheswaram Nov. 28, 2019, 11:33 a.m. UTC
Adding compatible for SC7180 in USB DWC3 driver.
Converting dt binding to yaml.
Adding compatible for SC7180 in dt bindings.

Changes in v2:
Sorted the compatible in dwc3 driver.
Converted dt binding to yaml.
Added compatible in yaml.

Sandeep Maheswaram (3):
  usb: dwc3: Add support for SC7180 SOC
  dt-bindings: usb: qcom,dwc3: Convert USB DWC3 bindings to yaml
  dt-bindings: usb: qcom,dwc3: Add compatible for SC7180

 .../devicetree/bindings/usb/qcom,dwc3.txt          | 104 --------------
 .../devicetree/bindings/usb/qcom,dwc3.yaml         | 156 +++++++++++++++++++++
 drivers/usb/dwc3/dwc3-qcom.c                       |   3 +-
 3 files changed, 158 insertions(+), 105 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/usb/qcom,dwc3.txt
 create mode 100644 Documentation/devicetree/bindings/usb/qcom,dwc3.yaml

Comments

Doug Anderson Dec. 11, 2019, 7:43 p.m. UTC | #1
Hi,

On Thu, Nov 28, 2019 at 3:35 AM Sandeep Maheswaram <sanm@codeaurora.org> wrote:
>
> Add compatible for SC7180 SOC in USB DWC3 driver
>
> Signed-off-by: Sandeep Maheswaram <sanm@codeaurora.org>
> ---
>  drivers/usb/dwc3/dwc3-qcom.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
> index 261af9e..1df2372 100644
> --- a/drivers/usb/dwc3/dwc3-qcom.c
> +++ b/drivers/usb/dwc3/dwc3-qcom.c
> @@ -1,5 +1,5 @@
>  // SPDX-License-Identifier: GPL-2.0
> -/* Copyright (c) 2018, The Linux Foundation. All rights reserved.
> +/* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
>   *
>   * Inspired by dwc3-of-simple.c
>   */
> @@ -753,6 +753,7 @@ static const struct of_device_id dwc3_qcom_of_match[] = {
>         { .compatible = "qcom,dwc3" },
>         { .compatible = "qcom,msm8996-dwc3" },
>         { .compatible = "qcom,msm8998-dwc3" },
> +       { .compatible = "qcom,sc7180-dwc3" },
>         { .compatible = "qcom,sdm845-dwc3" },

It is, of course, up to Felipe.  ...but in my opinion this is the
wrong change and instead we should be deleting the SoC-specific
strings (msm8996, msm8998, sdm845) from this file because they don't
buy us anything.  To explain how it works:

1. Device tree should have both the "SoC-specific" and generic
"qcom,dwc3" strings.  Only the "qcom,dwc3" will actually be used but
the SoC-specific string is there so if we find a case later where we
need to handle a SoC-specific quirk then it'll already be there.

2. Bindings should have both the "SoC-specific" and generic
"qcom,dwc3" strings.  The binding is describing what's in the device
tree.

3. Until we have a SoC-specific quirk to handle, we _don't_ need to
add the SoC-specific string to the driver itself.


-Doug
Sandeep Maheswaram Dec. 12, 2019, noon UTC | #2
Hi,

On 12/12/2019 1:13 AM, Doug Anderson wrote:
> Hi,
>
> On Thu, Nov 28, 2019 at 3:35 AM Sandeep Maheswaram <sanm@codeaurora.org> wrote:
>> Add compatible for SC7180 SOC in USB DWC3 driver
>>
>> Signed-off-by: Sandeep Maheswaram <sanm@codeaurora.org>
>> ---
>>   drivers/usb/dwc3/dwc3-qcom.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
>> index 261af9e..1df2372 100644
>> --- a/drivers/usb/dwc3/dwc3-qcom.c
>> +++ b/drivers/usb/dwc3/dwc3-qcom.c
>> @@ -1,5 +1,5 @@
>>   // SPDX-License-Identifier: GPL-2.0
>> -/* Copyright (c) 2018, The Linux Foundation. All rights reserved.
>> +/* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
>>    *
>>    * Inspired by dwc3-of-simple.c
>>    */
>> @@ -753,6 +753,7 @@ static const struct of_device_id dwc3_qcom_of_match[] = {
>>          { .compatible = "qcom,dwc3" },
>>          { .compatible = "qcom,msm8996-dwc3" },
>>          { .compatible = "qcom,msm8998-dwc3" },
>> +       { .compatible = "qcom,sc7180-dwc3" },
>>          { .compatible = "qcom,sdm845-dwc3" },
> It is, of course, up to Felipe.  ...but in my opinion this is the
> wrong change and instead we should be deleting the SoC-specific
> strings (msm8996, msm8998, sdm845) from this file because they don't
> buy us anything.  To explain how it works:
>
> 1. Device tree should have both the "SoC-specific" and generic
> "qcom,dwc3" strings.  Only the "qcom,dwc3" will actually be used but
> the SoC-specific string is there so if we find a case later where we
> need to handle a SoC-specific quirk then it'll already be there.
>
> 2. Bindings should have both the "SoC-specific" and generic
> "qcom,dwc3" strings.  The binding is describing what's in the device
> tree.
>
> 3. Until we have a SoC-specific quirk to handle, we _don't_ need to
> add the SoC-specific string to the driver itself.
>
>
> -Doug
>
Can i remove this patch { .compatible = "qcom,sc7180-dwc3" }, in the 
next version of this series ?
Doug Anderson Dec. 12, 2019, 9:22 p.m. UTC | #3
Hi,

On Thu, Dec 12, 2019 at 4:00 AM Sandeep Maheswaram (Temp)
<sanm@codeaurora.org> wrote:
>
> Hi,
>
> On 12/12/2019 1:13 AM, Doug Anderson wrote:
> > Hi,
> >
> > On Thu, Nov 28, 2019 at 3:35 AM Sandeep Maheswaram <sanm@codeaurora.org> wrote:
> >> Add compatible for SC7180 SOC in USB DWC3 driver
> >>
> >> Signed-off-by: Sandeep Maheswaram <sanm@codeaurora.org>
> >> ---
> >>   drivers/usb/dwc3/dwc3-qcom.c | 3 ++-
> >>   1 file changed, 2 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
> >> index 261af9e..1df2372 100644
> >> --- a/drivers/usb/dwc3/dwc3-qcom.c
> >> +++ b/drivers/usb/dwc3/dwc3-qcom.c
> >> @@ -1,5 +1,5 @@
> >>   // SPDX-License-Identifier: GPL-2.0
> >> -/* Copyright (c) 2018, The Linux Foundation. All rights reserved.
> >> +/* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
> >>    *
> >>    * Inspired by dwc3-of-simple.c
> >>    */
> >> @@ -753,6 +753,7 @@ static const struct of_device_id dwc3_qcom_of_match[] = {
> >>          { .compatible = "qcom,dwc3" },
> >>          { .compatible = "qcom,msm8996-dwc3" },
> >>          { .compatible = "qcom,msm8998-dwc3" },
> >> +       { .compatible = "qcom,sc7180-dwc3" },
> >>          { .compatible = "qcom,sdm845-dwc3" },
> > It is, of course, up to Felipe.  ...but in my opinion this is the
> > wrong change and instead we should be deleting the SoC-specific
> > strings (msm8996, msm8998, sdm845) from this file because they don't
> > buy us anything.  To explain how it works:
> >
> > 1. Device tree should have both the "SoC-specific" and generic
> > "qcom,dwc3" strings.  Only the "qcom,dwc3" will actually be used but
> > the SoC-specific string is there so if we find a case later where we
> > need to handle a SoC-specific quirk then it'll already be there.
> >
> > 2. Bindings should have both the "SoC-specific" and generic
> > "qcom,dwc3" strings.  The binding is describing what's in the device
> > tree.
> >
> > 3. Until we have a SoC-specific quirk to handle, we _don't_ need to
> > add the SoC-specific string to the driver itself.
> >
> >
> > -Doug
> >
> Can i remove this patch { .compatible = "qcom,sc7180-dwc3" }, in the
> next version of this series ?

Yeah, drop patch #1 from your series.  I've helped you out and posted:

https://lore.kernel.org/r/20191212132122.1.I85a23bdcff04dbce48cc46ddb8f1ffe7a51015eb@changeid

-Doug