Message ID | 20220928092937.27120-1-zhang.lyra@gmail.com |
---|---|
State | Changes Requested, archived |
Headers | show |
Series | [1/3] dt-bindings: gpio: Conver Unisoc GPIO controller binding to yaml | expand |
Context | Check | Description |
---|---|---|
robh/checkpatch | warning | total: 0 errors, 2 warnings, 70 lines checked |
robh/patch-applied | success | |
robh/dtbs-check | warning | build log |
robh/dt-meta-schema | success |
On 28/09/2022 11:29, Chunyan Zhang wrote: > From: Chunyan Zhang <chunyan.zhang@unisoc.com> > > Convert the Unisoc gpio controller binding to DT schema format. > Thank you for your patch. There is something to discuss/improve. > diff --git a/Documentation/devicetree/bindings/gpio/sprd,gpio.yaml b/Documentation/devicetree/bindings/gpio/sprd,gpio.yaml > new file mode 100644 > index 000000000000..c0cd1ed9809b > --- /dev/null > +++ b/Documentation/devicetree/bindings/gpio/sprd,gpio.yaml > @@ -0,0 +1,70 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +# Copyright 2022 Unisoc Inc. > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/gpio/sprd,gpio.yaml# Use compatible as filename, so sprd,sc9860-gpio.yaml > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Unisoc GPIO controller > + Best regards, Krzysztof
Hi Krzysztof, On Wed, 28 Sept 2022 at 19:31, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > On 28/09/2022 11:29, Chunyan Zhang wrote: > > From: Chunyan Zhang <chunyan.zhang@unisoc.com> > > > > Convert the Unisoc gpio controller binding to DT schema format. > > > > > Thank you for your patch. There is something to discuss/improve. > > > diff --git a/Documentation/devicetree/bindings/gpio/sprd,gpio.yaml b/Documentation/devicetree/bindings/gpio/sprd,gpio.yaml > > new file mode 100644 > > index 000000000000..c0cd1ed9809b > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/gpio/sprd,gpio.yaml > > @@ -0,0 +1,70 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +# Copyright 2022 Unisoc Inc. > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/gpio/sprd,gpio.yaml# > > Use compatible as filename, so sprd,sc9860-gpio.yaml Humm... This is not only for SC9860, also for other IPs, UMS512 as an example which added in this patchset. Thanks for the review, Chunyan > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Unisoc GPIO controller > > + > > Best regards, > Krzysztof >
On 29/09/2022 04:29, Chunyan Zhang wrote: > Hi Krzysztof, > > On Wed, 28 Sept 2022 at 19:31, Krzysztof Kozlowski > <krzysztof.kozlowski@linaro.org> wrote: >> >> On 28/09/2022 11:29, Chunyan Zhang wrote: >>> From: Chunyan Zhang <chunyan.zhang@unisoc.com> >>> >>> Convert the Unisoc gpio controller binding to DT schema format. >>> >> >> >> Thank you for your patch. There is something to discuss/improve. >> >>> diff --git a/Documentation/devicetree/bindings/gpio/sprd,gpio.yaml b/Documentation/devicetree/bindings/gpio/sprd,gpio.yaml >>> new file mode 100644 >>> index 000000000000..c0cd1ed9809b >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/gpio/sprd,gpio.yaml >>> @@ -0,0 +1,70 @@ >>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >>> +# Copyright 2022 Unisoc Inc. >>> +%YAML 1.2 >>> +--- >>> +$id: http://devicetree.org/schemas/gpio/sprd,gpio.yaml# >> >> Use compatible as filename, so sprd,sc9860-gpio.yaml > > Humm... This is not only for SC9860, also for other IPs, UMS512 as an > example which added in this patchset. > Then it's ok. It seems you have also typo in commit subject (Conver). Best regards, Krzysztof
On Thu, 29 Sept 2022 at 15:02, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > On 29/09/2022 04:29, Chunyan Zhang wrote: > > Hi Krzysztof, > > > > On Wed, 28 Sept 2022 at 19:31, Krzysztof Kozlowski > > <krzysztof.kozlowski@linaro.org> wrote: > >> > >> On 28/09/2022 11:29, Chunyan Zhang wrote: > >>> From: Chunyan Zhang <chunyan.zhang@unisoc.com> > >>> > >>> Convert the Unisoc gpio controller binding to DT schema format. > >>> > >> > >> > >> Thank you for your patch. There is something to discuss/improve. > >> > >>> diff --git a/Documentation/devicetree/bindings/gpio/sprd,gpio.yaml b/Documentation/devicetree/bindings/gpio/sprd,gpio.yaml > >>> new file mode 100644 > >>> index 000000000000..c0cd1ed9809b > >>> --- /dev/null > >>> +++ b/Documentation/devicetree/bindings/gpio/sprd,gpio.yaml > >>> @@ -0,0 +1,70 @@ > >>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > >>> +# Copyright 2022 Unisoc Inc. > >>> +%YAML 1.2 > >>> +--- > >>> +$id: http://devicetree.org/schemas/gpio/sprd,gpio.yaml# > >> > >> Use compatible as filename, so sprd,sc9860-gpio.yaml > > > > Humm... This is not only for SC9860, also for other IPs, UMS512 as an > > example which added in this patchset. > > > > > Then it's ok. It seems you have also typo in commit subject (Conver). Ah yes -_-||, will fix that. > > Best regards, > Krzysztof >
diff --git a/Documentation/devicetree/bindings/gpio/gpio-sprd.txt b/Documentation/devicetree/bindings/gpio/gpio-sprd.txt deleted file mode 100644 index eca97d45388f..000000000000 --- a/Documentation/devicetree/bindings/gpio/gpio-sprd.txt +++ /dev/null @@ -1,28 +0,0 @@ -Spreadtrum GPIO controller bindings - -The controller's registers are organized as sets of sixteen 16-bit -registers with each set controlling a bank of up to 16 pins. A single -interrupt is shared for all of the banks handled by the controller. - -Required properties: -- compatible: Should be "sprd,sc9860-gpio". -- reg: Define the base and range of the I/O address space containing -the GPIO controller registers. -- gpio-controller: Marks the device node as a GPIO controller. -- #gpio-cells: Should be <2>. The first cell is the gpio number and -the second cell is used to specify optional parameters. -- interrupt-controller: Marks the device node as an interrupt controller. -- #interrupt-cells: Should be <2>. Specifies the number of cells needed -to encode interrupt source. -- interrupts: Should be the port interrupt shared by all the gpios. - -Example: - ap_gpio: gpio@40280000 { - compatible = "sprd,sc9860-gpio"; - reg = <0 0x40280000 0 0x1000>; - gpio-controller; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; - interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>; - }; diff --git a/Documentation/devicetree/bindings/gpio/sprd,gpio.yaml b/Documentation/devicetree/bindings/gpio/sprd,gpio.yaml new file mode 100644 index 000000000000..c0cd1ed9809b --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/sprd,gpio.yaml @@ -0,0 +1,70 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright 2022 Unisoc Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/gpio/sprd,gpio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Unisoc GPIO controller + +maintainers: + - Orson Zhai <orsonzhai@gmail.com> + - Baolin Wang <baolin.wang7@gmail.com> + - Chunyan Zhang <zhang.lyra@gmail.com> + +description: + The controller's registers are organized as sets of sixteen 16-bit + registers with each set controlling a bank of up to 16 pins. A single + interrupt is shared for all of the banks handled by the controller. + +properties: + compatible: + const: sprd,sc9860-gpio + + reg: + maxItems: 1 + + gpio-controller: true + + "#gpio-cells": + const: 2 + + interrupt-controller: true + + "#interrupt-cells": + const: 2 + + interrupts: + maxItems: 1 + description: The interrupt shared by all GPIO lines for this controller. + +required: + - compatible + - reg + - gpio-controller + - "#gpio-cells" + - interrupt-controller + - "#interrupt-cells" + - interrupts + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + soc { + #address-cells = <2>; + #size-cells = <2>; + + ap_gpio: gpio@40280000 { + compatible = "sprd,sc9860-gpio"; + reg = <0 0x40280000 0 0x1000>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>; + }; + }; +...