2022-08-11 12:45:16

by Shenwei Wang

[permalink] [raw]
Subject: [PATCH v4 1/3] dt-bindings: gpio: Add imx scu gpio driver bindings

Add binding document for the imx scu gpio driver.

Signed-off-by: Shenwei Wang <[email protected]>
---
.../bindings/gpio/fsl,imx-sc-gpio.yaml | 39 +++++++++++++++++++
1 file changed, 39 insertions(+)
create mode 100644 Documentation/devicetree/bindings/gpio/fsl,imx-sc-gpio.yaml

diff --git a/Documentation/devicetree/bindings/gpio/fsl,imx-sc-gpio.yaml b/Documentation/devicetree/bindings/gpio/fsl,imx-sc-gpio.yaml
new file mode 100644
index 000000000000..a1b024cddc97
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/fsl,imx-sc-gpio.yaml
@@ -0,0 +1,39 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpio/fsl,imx-sc-gpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: GPIO driver over IMX SCU firmware API
+
+maintainers:
+ - Shenwei Wang <[email protected]>
+
+description: |
+ This module provides the standard interface to control the
+ resource pins in SCU domain on i.MX8 platforms.
+
+properties:
+ compatible:
+ enum:
+ - fsl,imx8qxp-sc-gpio
+
+ "#gpio-cells":
+ const: 2
+
+ gpio-controller: true
+
+required:
+ - compatible
+ - "#gpio-cells"
+ - gpio-controller
+
+additionalProperties: false
+
+examples:
+ - |
+ gpio0: gpio {
+ compatible = "fsl,imx8qxp-sc-gpio";
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
--
2.25.1


2022-08-11 14:47:04

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v4 1/3] dt-bindings: gpio: Add imx scu gpio driver bindings

On 11/08/2022 15:41, Shenwei Wang wrote:
> Add binding document for the imx scu gpio driver.
>
> Signed-off-by: Shenwei Wang <[email protected]>
> ---
> .../bindings/gpio/fsl,imx-sc-gpio.yaml | 39 +++++++++++++++++++
> 1 file changed, 39 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/gpio/fsl,imx-sc-gpio.yaml
>
> diff --git a/Documentation/devicetree/bindings/gpio/fsl,imx-sc-gpio.yaml b/Documentation/devicetree/bindings/gpio/fsl,imx-sc-gpio.yaml
> new file mode 100644
> index 000000000000..a1b024cddc97
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/gpio/fsl,imx-sc-gpio.yaml
> @@ -0,0 +1,39 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/gpio/fsl,imx-sc-gpio.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: GPIO driver over IMX SCU firmware API
> +
> +maintainers:
> + - Shenwei Wang <[email protected]>
> +
> +description: |
> + This module provides the standard interface to control the
> + resource pins in SCU domain on i.MX8 platforms.
> +
> +properties:
> + compatible:
> + enum:
> + - fsl,imx8qxp-sc-gpio

Now the filename does not match compatible. Use the same compatible as
filename.

Best regards,
Krzysztof

2022-08-11 15:04:26

by Shenwei Wang

[permalink] [raw]
Subject: RE: [EXT] Re: [PATCH v4 1/3] dt-bindings: gpio: Add imx scu gpio driver bindings



> -----Original Message-----
> From: Krzysztof Kozlowski <[email protected]>
> Sent: Thursday, August 11, 2022 9:36 AM
> To: Shenwei Wang <[email protected]>; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; dl-linux-imx <[email protected]>
> Cc: [email protected]; [email protected]; linux-
> [email protected]; [email protected]; [email protected]
> Subject: [EXT] Re: [PATCH v4 1/3] dt-bindings: gpio: Add imx scu gpio driver
> bindings
> > diff --git
> > a/Documentation/devicetree/bindings/gpio/fsl,imx-sc-gpio.yaml
> > b/Documentation/devicetree/bindings/gpio/fsl,imx-sc-gpio.yaml
> > new file mode 100644
> > index 000000000000..a1b024cddc97
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/gpio/fsl,imx-sc-gpio.yaml
> > +description: |
> > + This module provides the standard interface to control the
> > + resource pins in SCU domain on i.MX8 platforms.
> > +
> > +properties:
> > + compatible:
> > + enum:
> > + - fsl,imx8qxp-sc-gpio
>
> Now the filename does not match compatible. Use the same compatible as
> filename.

The subnodes under fsl,scu.yaml have their own naming rule. For example, the watchdog
compatible is "fsl,imx-sc-wdt", but the file name is "fsl,scu-wdt.yaml". Is the filename required
to match its compatible?

Regards,
Shenwei

>
> Best regards,
> Krzysztof

2022-08-11 15:23:29

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [EXT] Re: [PATCH v4 1/3] dt-bindings: gpio: Add imx scu gpio driver bindings

On 11/08/2022 17:52, Shenwei Wang wrote:
>
>
>> -----Original Message-----
>> From: Krzysztof Kozlowski <[email protected]>
>> Sent: Thursday, August 11, 2022 9:36 AM
>> To: Shenwei Wang <[email protected]>; [email protected];
>> [email protected]; [email protected]; [email protected];
>> [email protected]; [email protected]; [email protected];
>> [email protected]; dl-linux-imx <[email protected]>
>> Cc: [email protected]; [email protected]; linux-
>> [email protected]; [email protected]; [email protected]
>> Subject: [EXT] Re: [PATCH v4 1/3] dt-bindings: gpio: Add imx scu gpio driver
>> bindings
>>> diff --git
>>> a/Documentation/devicetree/bindings/gpio/fsl,imx-sc-gpio.yaml
>>> b/Documentation/devicetree/bindings/gpio/fsl,imx-sc-gpio.yaml
>>> new file mode 100644
>>> index 000000000000..a1b024cddc97
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/gpio/fsl,imx-sc-gpio.yaml
>>> +description: |
>>> + This module provides the standard interface to control the
>>> + resource pins in SCU domain on i.MX8 platforms.
>>> +
>>> +properties:
>>> + compatible:
>>> + enum:
>>> + - fsl,imx8qxp-sc-gpio
>>
>> Now the filename does not match compatible. Use the same compatible as
>> filename.
>
> The subnodes under fsl,scu.yaml have their own naming rule. For example, the watchdog
> compatible is "fsl,imx-sc-wdt", but the file name is "fsl,scu-wdt.yaml".

The other files have for example fsl,imx-sc-wdt, so they match compatible.

> Is the filename required
> to match its compatible?

Yes, that's the convention. Otherwise people tend to name the files in
whatever way they like...

Best regards,
Krzysztof

2022-08-11 15:50:47

by Shenwei Wang

[permalink] [raw]
Subject: RE: [EXT] Re: [PATCH v4 1/3] dt-bindings: gpio: Add imx scu gpio driver bindings



> -----Original Message-----
> From: Krzysztof Kozlowski <[email protected]>
> Sent: Thursday, August 11, 2022 10:11 AM
> To: Shenwei Wang <[email protected]>; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; dl-linux-imx <[email protected]>
> Cc: [email protected]; [email protected]; linux-
> [email protected]; [email protected]; [email protected]
> Subject: Re: [EXT] Re: [PATCH v4 1/3] dt-bindings: gpio: Add imx scu gpio driver
> bindings
>
> Caution: EXT Email
>
> On 11/08/2022 17:52, Shenwei Wang wrote:
> >
> >
> >> -----Original Message-----
> >> From: Krzysztof Kozlowski <[email protected]>
> >> Sent: Thursday, August 11, 2022 9:36 AM
> >> To: Shenwei Wang <[email protected]>; [email protected];
> >> [email protected]; [email protected];
> >> [email protected]; [email protected]; [email protected];
> >> [email protected]; [email protected]; dl-linux-imx
> >> <[email protected]>
> >> Cc: [email protected]; [email protected]; linux-
> >> [email protected]; [email protected];
> >> [email protected]
> >> Subject: [EXT] Re: [PATCH v4 1/3] dt-bindings: gpio: Add imx scu gpio
> >> driver bindings
> >>> diff --git
> >>> a/Documentation/devicetree/bindings/gpio/fsl,imx-sc-gpio.yaml
> >>> b/Documentation/devicetree/bindings/gpio/fsl,imx-sc-gpio.yaml
> >>> new file mode 100644
> >>> index 000000000000..a1b024cddc97
> >>> --- /dev/null
> >>> +++ b/Documentation/devicetree/bindings/gpio/fsl,imx-sc-gpio.yaml
> >>> +description: |
> >>> + This module provides the standard interface to control the
> >>> + resource pins in SCU domain on i.MX8 platforms.
> >>> +
> >>> +properties:
> >>> + compatible:
> >>> + enum:
> >>> + - fsl,imx8qxp-sc-gpio
> >>
> >> Now the filename does not match compatible. Use the same compatible
> >> as filename.
> >
> > The subnodes under fsl,scu.yaml have their own naming rule. For
> > example, the watchdog compatible is "fsl,imx-sc-wdt", but the file name is
> "fsl,scu-wdt.yaml".
>
> The other files have for example fsl,imx-sc-wdt, so they match compatible.

I don't see the file fsl,imx-sc-wdt you mentioned under the watchdog directory.

$ ls fsl*
fsl-imx7ulp-wdt.yaml fsl-imx-wdt.yaml fsl,scu-wdt.yaml

Regards,
Shenwei

>
> > Is the filename required
> > to match its compatible?
>
> Yes, that's the convention. Otherwise people tend to name the files in whatever
> way they like...
>
> Best regards,
> Krzysztof

2022-08-12 09:12:50

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [EXT] Re: [PATCH v4 1/3] dt-bindings: gpio: Add imx scu gpio driver bindings

On 11/08/2022 18:30, Shenwei Wang wrote:
>
>
>> -----Original Message-----
>> From: Krzysztof Kozlowski <[email protected]>
>> Sent: Thursday, August 11, 2022 10:11 AM
>> To: Shenwei Wang <[email protected]>; [email protected];
>> [email protected]; [email protected]; [email protected];
>> [email protected]; [email protected]; [email protected];
>> [email protected]; dl-linux-imx <[email protected]>
>> Cc: [email protected]; [email protected]; linux-
>> [email protected]; [email protected]; [email protected]
>> Subject: Re: [EXT] Re: [PATCH v4 1/3] dt-bindings: gpio: Add imx scu gpio driver
>> bindings
>>
>> Caution: EXT Email
>>
>> On 11/08/2022 17:52, Shenwei Wang wrote:
>>>
>>>
>>>> -----Original Message-----
>>>> From: Krzysztof Kozlowski <[email protected]>
>>>> Sent: Thursday, August 11, 2022 9:36 AM
>>>> To: Shenwei Wang <[email protected]>; [email protected];
>>>> [email protected]; [email protected];
>>>> [email protected]; [email protected]; [email protected];
>>>> [email protected]; [email protected]; dl-linux-imx
>>>> <[email protected]>
>>>> Cc: [email protected]; [email protected]; linux-
>>>> [email protected]; [email protected];
>>>> [email protected]
>>>> Subject: [EXT] Re: [PATCH v4 1/3] dt-bindings: gpio: Add imx scu gpio
>>>> driver bindings
>>>>> diff --git
>>>>> a/Documentation/devicetree/bindings/gpio/fsl,imx-sc-gpio.yaml
>>>>> b/Documentation/devicetree/bindings/gpio/fsl,imx-sc-gpio.yaml
>>>>> new file mode 100644
>>>>> index 000000000000..a1b024cddc97
>>>>> --- /dev/null
>>>>> +++ b/Documentation/devicetree/bindings/gpio/fsl,imx-sc-gpio.yaml
>>>>> +description: |
>>>>> + This module provides the standard interface to control the
>>>>> + resource pins in SCU domain on i.MX8 platforms.
>>>>> +
>>>>> +properties:
>>>>> + compatible:
>>>>> + enum:
>>>>> + - fsl,imx8qxp-sc-gpio
>>>>
>>>> Now the filename does not match compatible. Use the same compatible
>>>> as filename.
>>>
>>> The subnodes under fsl,scu.yaml have their own naming rule. For
>>> example, the watchdog compatible is "fsl,imx-sc-wdt", but the file name is
>> "fsl,scu-wdt.yaml".
>>
>> The other files have for example fsl,imx-sc-wdt, so they match compatible.
>
> I don't see the file fsl,imx-sc-wdt you mentioned under the watchdog directory.
>
> $ ls fsl*
> fsl-imx7ulp-wdt.yaml fsl-imx-wdt.yaml fsl,scu-wdt.yaml

Eh, they looked similar enough that I did not spot it during review.
fsl,scu-wdt.yaml should be named fsl,imx-sc-wdt.yaml, of course.


Best regards,
Krzysztof