Message ID | 20220810133005.74653-2-shenwei.wang@nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add IMX8 SCU GPIO support | expand |
On 10/08/2022 16:30, Shenwei Wang wrote: > Add binding document for the imx scu gpio driver. > > Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com> > --- > .../bindings/gpio/fsl,imx-sc-gpio.yaml | 40 +++++++++++++++++++ > 1 file changed, 40 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..66abff316c0c > --- /dev/null > +++ b/Documentation/devicetree/bindings/gpio/fsl,imx-sc-gpio.yaml > @@ -0,0 +1,40 @@ > +# 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 <shenwei.wang@nxp.com> > + > +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 > + - fsl,imx-scu-gpio This is too generic compatible and it even conflicts with the above... Your driver binds to both without driver data which is even more confusing. Make the compatible specific for one, given SoC. Best regards, Krzysztof
> -----Original Message----- > From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > Sent: Wednesday, August 10, 2022 9:46 AM > To: Shenwei Wang <shenwei.wang@nxp.com>; robh+dt@kernel.org; > krzysztof.kozlowski+dt@linaro.org; linus.walleij@linaro.org; brgl@bgdev.pl; > shawnguo@kernel.org; s.hauer@pengutronix.de; kernel@pengutronix.de; > festevam@gmail.com; dl-linux-imx <linux-imx@nxp.com> > Cc: devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; linux- > gpio@vger.kernel.org; linux-arm-kernel@lists.infradead.org; imx@lists.linux.dev > Subject: [EXT] Re: [PATCH v3 1/3] dt-bindings: gpio: Add imx scu gpio driver > bindings > > Caution: EXT Email > > On 10/08/2022 16:30, Shenwei Wang wrote: > > Add binding document for the imx scu gpio driver. > > > > Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com> > > --- > > .../bindings/gpio/fsl,imx-sc-gpio.yaml | 40 +++++++++++++++++++ > > +properties: > > + compatible: > > + enum: > > + - fsl,imx8qxp-sc-gpio > > + - fsl,imx-scu-gpio > > > This is too generic compatible and it even conflicts with the above... > Your driver binds to both without driver data which is even more confusing. > Make the compatible specific for one, given SoC. > Oh, that's my bad. It is a typo. The generic compatible should be "fsl,imx-sc-gpio". So far there is no driver data required for both imx8qxp and imx8dxl, but it might be required sometimes later in case the scu firmware is customized for a specified use case. That's why I put the generic one here. Thanks, Shenwei > > Best regards, > Krzysztof
On 10/08/2022 18:23, Shenwei Wang wrote: > > >> -----Original Message----- >> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> >> Sent: Wednesday, August 10, 2022 9:46 AM >> To: Shenwei Wang <shenwei.wang@nxp.com>; robh+dt@kernel.org; >> krzysztof.kozlowski+dt@linaro.org; linus.walleij@linaro.org; brgl@bgdev.pl; >> shawnguo@kernel.org; s.hauer@pengutronix.de; kernel@pengutronix.de; >> festevam@gmail.com; dl-linux-imx <linux-imx@nxp.com> >> Cc: devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; linux- >> gpio@vger.kernel.org; linux-arm-kernel@lists.infradead.org; imx@lists.linux.dev >> Subject: [EXT] Re: [PATCH v3 1/3] dt-bindings: gpio: Add imx scu gpio driver >> bindings >> >> Caution: EXT Email >> >> On 10/08/2022 16:30, Shenwei Wang wrote: >>> Add binding document for the imx scu gpio driver. >>> >>> Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com> >>> --- >>> .../bindings/gpio/fsl,imx-sc-gpio.yaml | 40 +++++++++++++++++++ >>> +properties: >>> + compatible: >>> + enum: >>> + - fsl,imx8qxp-sc-gpio >>> + - fsl,imx-scu-gpio >> >> >> This is too generic compatible and it even conflicts with the above... >> Your driver binds to both without driver data which is even more confusing. >> Make the compatible specific for one, given SoC. >> > > Oh, that's my bad. It is a typo. The generic compatible should be "fsl,imx-sc-gpio". > So far there is no driver data required for both imx8qxp and imx8dxl, but it might be > required sometimes later in case the scu firmware is customized for a specified use case. > That's why I put the generic one here. That's not a proper reason to add generic one. Either all implementations are compatible or not. If you are unsure, this should be assumed as not and just use specific compatible. If you are 100% sure, then use fallback, not two compatibles, and properly justify it. Best regards, Krzysztof
> -----Original Message----- > From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > Sent: Wednesday, August 10, 2022 10:46 AM > To: Shenwei Wang <shenwei.wang@nxp.com>; robh+dt@kernel.org; > krzysztof.kozlowski+dt@linaro.org; linus.walleij@linaro.org; brgl@bgdev.pl; > shawnguo@kernel.org; s.hauer@pengutronix.de; kernel@pengutronix.de; > festevam@gmail.com; dl-linux-imx <linux-imx@nxp.com> > Cc: devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; linux- > gpio@vger.kernel.org; linux-arm-kernel@lists.infradead.org; imx@lists.linux.dev > Subject: Re: [EXT] Re: [PATCH v3 1/3] dt-bindings: gpio: Add imx scu gpio driver > bindings > > Caution: EXT Email > > On 10/08/2022 18:23, Shenwei Wang wrote: > > > > > >> -----Original Message----- > >> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > >> Sent: Wednesday, August 10, 2022 9:46 AM > >> To: Shenwei Wang <shenwei.wang@nxp.com>; robh+dt@kernel.org; > >> krzysztof.kozlowski+dt@linaro.org; linus.walleij@linaro.org; > >> brgl@bgdev.pl; shawnguo@kernel.org; s.hauer@pengutronix.de; > >> kernel@pengutronix.de; festevam@gmail.com; dl-linux-imx > >> <linux-imx@nxp.com> > >> Cc: devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; linux- > >> gpio@vger.kernel.org; linux-arm-kernel@lists.infradead.org; > >> imx@lists.linux.dev > >> Subject: [EXT] Re: [PATCH v3 1/3] dt-bindings: gpio: Add imx scu gpio > >> driver bindings > >> > >> Caution: EXT Email > >> > >> On 10/08/2022 16:30, Shenwei Wang wrote: > >>> Add binding document for the imx scu gpio driver. > >>> > >>> Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com> > >>> --- > >>> .../bindings/gpio/fsl,imx-sc-gpio.yaml | 40 +++++++++++++++++++ > >>> +properties: > >>> + compatible: > >>> + enum: > >>> + - fsl,imx8qxp-sc-gpio > >>> + - fsl,imx-scu-gpio > >> > >> > >> This is too generic compatible and it even conflicts with the above... > >> Your driver binds to both without driver data which is even more confusing. > >> Make the compatible specific for one, given SoC. > >> > > > > Oh, that's my bad. It is a typo. The generic compatible should be "fsl,imx-sc- > gpio". > > So far there is no driver data required for both imx8qxp and imx8dxl, > > but it might be required sometimes later in case the scu firmware is > customized for a specified use case. > > That's why I put the generic one here. > > That's not a proper reason to add generic one. Either all implementations are > compatible or not. If you are unsure, this should be assumed as not and just use > specific compatible. If you are 100% sure, then use fallback, not two > compatibles, and properly justify it. > Okay. I will only keep "fsl,imx8qxp-sc-gpio" for now. Thanks, Shenwei > Best regards, > Krzysztof
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..66abff316c0c --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/fsl,imx-sc-gpio.yaml @@ -0,0 +1,40 @@ +# 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 <shenwei.wang@nxp.com> + +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 + - fsl,imx-scu-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>; + };
Add binding document for the imx scu gpio driver. Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com> --- .../bindings/gpio/fsl,imx-sc-gpio.yaml | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/fsl,imx-sc-gpio.yaml