2019-09-27 14:33:56

by Marek Szyprowski

[permalink] [raw]
Subject: [PATCH v3] dt-bindings: gpu: Convert Samsung Image Scaler to dt-schema

From: Maciej Falkowski <[email protected]>

Convert Samsung Image Scaler to newer dt-schema format.

Signed-off-by: Maciej Falkowski <[email protected]>
Signed-off-by: Marek Szyprowski <[email protected]>
---
v3:
- Fixed description of 'clocks' property:
rather than 'mscl clock', 'pclk clock'
- Added empty line within if-else statement
- Added 'additionalProperties: false'
- Listed all missing 'properties' in properties scope

Best regards,
Maciej Falkowski
---
.../bindings/gpu/samsung-scaler.txt | 27 -------
.../bindings/gpu/samsung-scaler.yaml | 81 +++++++++++++++++++
2 files changed, 81 insertions(+), 27 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/gpu/samsung-scaler.txt
create mode 100644 Documentation/devicetree/bindings/gpu/samsung-scaler.yaml

diff --git a/Documentation/devicetree/bindings/gpu/samsung-scaler.txt b/Documentation/devicetree/bindings/gpu/samsung-scaler.txt
deleted file mode 100644
index 9c3d98105dfd..000000000000
--- a/Documentation/devicetree/bindings/gpu/samsung-scaler.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-* Samsung Exynos Image Scaler
-
-Required properties:
- - compatible : value should be one of the following:
- (a) "samsung,exynos5420-scaler" for Scaler IP in Exynos5420
- (b) "samsung,exynos5433-scaler" for Scaler IP in Exynos5433
-
- - reg : Physical base address of the IP registers and length of memory
- mapped region.
-
- - interrupts : Interrupt specifier for scaler interrupt, according to format
- specific to interrupt parent.
-
- - clocks : Clock specifier for scaler clock, according to generic clock
- bindings. (See Documentation/devicetree/bindings/clock/exynos*.txt)
-
- - clock-names : Names of clocks. For exynos scaler, it should be "mscl"
- on 5420 and "pclk", "aclk" and "aclk_xiu" on 5433.
-
-Example:
- scaler@12800000 {
- compatible = "samsung,exynos5420-scaler";
- reg = <0x12800000 0x1294>;
- interrupts = <0 220 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&clock CLK_MSCL0>;
- clock-names = "mscl";
- };
diff --git a/Documentation/devicetree/bindings/gpu/samsung-scaler.yaml b/Documentation/devicetree/bindings/gpu/samsung-scaler.yaml
new file mode 100644
index 000000000000..5317ac64426a
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpu/samsung-scaler.yaml
@@ -0,0 +1,81 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpu/samsung-scaler.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung Exynos SoC Image Scaler
+
+maintainers:
+ - Inki Dae <[email protected]>
+
+properties:
+ compatible:
+ enum:
+ - samsung,exynos5420-scaler
+ - samsung,exynos5433-scaler
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks: {}
+ clock-names: {}
+ iommus: {}
+ power-domains: {}
+
+if:
+ properties:
+ compatible:
+ contains:
+ const: samsung,exynos5420-scaler
+
+then:
+ properties:
+ clocks:
+ items:
+ - description: mscl clock
+
+ clock-names:
+ items:
+ - const: mscl
+
+else:
+ properties:
+ clocks:
+ items:
+ - description: pclk clock
+ - description: aclk clock
+ - description: aclk_xiu clock
+
+ clock-names:
+ items:
+ - const: pclk
+ - const: aclk
+ - const: aclk_xiu
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/exynos5420.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ scaler@12800000 {
+ compatible = "samsung,exynos5420-scaler";
+ reg = <0x12800000 0x1294>;
+ interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clock CLK_MSCL0>;
+ clock-names = "mscl";
+ };
+
+...
--
2.17.1




2019-09-27 15:00:31

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v3] dt-bindings: gpu: Convert Samsung Image Scaler to dt-schema

On Fri, 27 Sep 2019 at 16:33, Marek Szyprowski <[email protected]> wrote:
>
> From: Maciej Falkowski <[email protected]>
>
> Convert Samsung Image Scaler to newer dt-schema format.
>
> Signed-off-by: Maciej Falkowski <[email protected]>
> Signed-off-by: Marek Szyprowski <[email protected]>
> ---
> v3:
> - Fixed description of 'clocks' property:
> rather than 'mscl clock', 'pclk clock'
> - Added empty line within if-else statement
> - Added 'additionalProperties: false'
> - Listed all missing 'properties' in properties scope
>
> Best regards,
> Maciej Falkowski
> ---
> .../bindings/gpu/samsung-scaler.txt | 27 -------
> .../bindings/gpu/samsung-scaler.yaml | 81 +++++++++++++++++++
> 2 files changed, 81 insertions(+), 27 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/gpu/samsung-scaler.txt
> create mode 100644 Documentation/devicetree/bindings/gpu/samsung-scaler.yaml
>
> diff --git a/Documentation/devicetree/bindings/gpu/samsung-scaler.txt b/Documentation/devicetree/bindings/gpu/samsung-scaler.txt
> deleted file mode 100644
> index 9c3d98105dfd..000000000000
> --- a/Documentation/devicetree/bindings/gpu/samsung-scaler.txt
> +++ /dev/null
> @@ -1,27 +0,0 @@
> -* Samsung Exynos Image Scaler
> -
> -Required properties:
> - - compatible : value should be one of the following:
> - (a) "samsung,exynos5420-scaler" for Scaler IP in Exynos5420
> - (b) "samsung,exynos5433-scaler" for Scaler IP in Exynos5433
> -
> - - reg : Physical base address of the IP registers and length of memory
> - mapped region.
> -
> - - interrupts : Interrupt specifier for scaler interrupt, according to format
> - specific to interrupt parent.
> -
> - - clocks : Clock specifier for scaler clock, according to generic clock
> - bindings. (See Documentation/devicetree/bindings/clock/exynos*.txt)
> -
> - - clock-names : Names of clocks. For exynos scaler, it should be "mscl"
> - on 5420 and "pclk", "aclk" and "aclk_xiu" on 5433.
> -
> -Example:
> - scaler@12800000 {
> - compatible = "samsung,exynos5420-scaler";
> - reg = <0x12800000 0x1294>;
> - interrupts = <0 220 IRQ_TYPE_LEVEL_HIGH>;
> - clocks = <&clock CLK_MSCL0>;
> - clock-names = "mscl";
> - };
> diff --git a/Documentation/devicetree/bindings/gpu/samsung-scaler.yaml b/Documentation/devicetree/bindings/gpu/samsung-scaler.yaml
> new file mode 100644
> index 000000000000..5317ac64426a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/gpu/samsung-scaler.yaml
> @@ -0,0 +1,81 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/gpu/samsung-scaler.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Samsung Exynos SoC Image Scaler
> +
> +maintainers:
> + - Inki Dae <[email protected]>
> +
> +properties:
> + compatible:
> + enum:
> + - samsung,exynos5420-scaler
> + - samsung,exynos5433-scaler
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + clocks: {}
> + clock-names: {}
> + iommus: {}
> + power-domains: {}
> +
> +if:
> + properties:
> + compatible:
> + contains:
> + const: samsung,exynos5420-scaler
> +
> +then:
> + properties:
> + clocks:
> + items:
> + - description: mscl clock
> +
> + clock-names:
> + items:
> + - const: mscl
> +
> +else:
> + properties:
> + clocks:
> + items:
> + - description: pclk clock
> + - description: aclk clock
> + - description: aclk_xiu clock
> +
> + clock-names:
> + items:
> + - const: pclk
> + - const: aclk
> + - const: aclk_xiu
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - clocks
> + - clock-names
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/exynos5420.h>
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> + scaler@12800000 {
> + compatible = "samsung,exynos5420-scaler";
> + reg = <0x12800000 0x1294>;
> + interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&clock CLK_MSCL0>;
> + clock-names = "mscl";
> + };
> +
> +...

You have some left-overs at the end. With cleaning them:
Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2019-09-30 21:22:31

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH v3] dt-bindings: gpu: Convert Samsung Image Scaler to dt-schema

On Fri, Sep 27, 2019 at 9:59 AM Krzysztof Kozlowski <[email protected]> wrote:
>
> On Fri, 27 Sep 2019 at 16:33, Marek Szyprowski <[email protected]> wrote:
> >
> > From: Maciej Falkowski <[email protected]>
> >
> > Convert Samsung Image Scaler to newer dt-schema format.
> >
> > Signed-off-by: Maciej Falkowski <[email protected]>
> > Signed-off-by: Marek Szyprowski <[email protected]>
> > ---
> > v3:
> > - Fixed description of 'clocks' property:
> > rather than 'mscl clock', 'pclk clock'
> > - Added empty line within if-else statement
> > - Added 'additionalProperties: false'
> > - Listed all missing 'properties' in properties scope
> >
> > Best regards,
> > Maciej Falkowski
> > ---
> > .../bindings/gpu/samsung-scaler.txt | 27 -------
> > .../bindings/gpu/samsung-scaler.yaml | 81 +++++++++++++++++++
> > 2 files changed, 81 insertions(+), 27 deletions(-)
> > delete mode 100644 Documentation/devicetree/bindings/gpu/samsung-scaler.txt
> > create mode 100644 Documentation/devicetree/bindings/gpu/samsung-scaler.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/gpu/samsung-scaler.txt b/Documentation/devicetree/bindings/gpu/samsung-scaler.txt
> > deleted file mode 100644
> > index 9c3d98105dfd..000000000000
> > --- a/Documentation/devicetree/bindings/gpu/samsung-scaler.txt
> > +++ /dev/null
> > @@ -1,27 +0,0 @@
> > -* Samsung Exynos Image Scaler
> > -
> > -Required properties:
> > - - compatible : value should be one of the following:
> > - (a) "samsung,exynos5420-scaler" for Scaler IP in Exynos5420
> > - (b) "samsung,exynos5433-scaler" for Scaler IP in Exynos5433
> > -
> > - - reg : Physical base address of the IP registers and length of memory
> > - mapped region.
> > -
> > - - interrupts : Interrupt specifier for scaler interrupt, according to format
> > - specific to interrupt parent.
> > -
> > - - clocks : Clock specifier for scaler clock, according to generic clock
> > - bindings. (See Documentation/devicetree/bindings/clock/exynos*.txt)
> > -
> > - - clock-names : Names of clocks. For exynos scaler, it should be "mscl"
> > - on 5420 and "pclk", "aclk" and "aclk_xiu" on 5433.
> > -
> > -Example:
> > - scaler@12800000 {
> > - compatible = "samsung,exynos5420-scaler";
> > - reg = <0x12800000 0x1294>;
> > - interrupts = <0 220 IRQ_TYPE_LEVEL_HIGH>;
> > - clocks = <&clock CLK_MSCL0>;
> > - clock-names = "mscl";
> > - };
> > diff --git a/Documentation/devicetree/bindings/gpu/samsung-scaler.yaml b/Documentation/devicetree/bindings/gpu/samsung-scaler.yaml
> > new file mode 100644
> > index 000000000000..5317ac64426a
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/gpu/samsung-scaler.yaml
> > @@ -0,0 +1,81 @@
> > +# SPDX-License-Identifier: GPL-2.0
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/gpu/samsung-scaler.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Samsung Exynos SoC Image Scaler
> > +
> > +maintainers:
> > + - Inki Dae <[email protected]>
> > +
> > +properties:
> > + compatible:
> > + enum:
> > + - samsung,exynos5420-scaler
> > + - samsung,exynos5433-scaler
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + interrupts:
> > + maxItems: 1
> > +
> > + clocks: {}
> > + clock-names: {}
> > + iommus: {}
> > + power-domains: {}
> > +
> > +if:
> > + properties:
> > + compatible:
> > + contains:
> > + const: samsung,exynos5420-scaler
> > +
> > +then:
> > + properties:
> > + clocks:
> > + items:
> > + - description: mscl clock
> > +
> > + clock-names:
> > + items:
> > + - const: mscl
> > +
> > +else:
> > + properties:
> > + clocks:
> > + items:
> > + - description: pclk clock
> > + - description: aclk clock
> > + - description: aclk_xiu clock
> > +
> > + clock-names:
> > + items:
> > + - const: pclk
> > + - const: aclk
> > + - const: aclk_xiu
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - interrupts
> > + - clocks
> > + - clock-names
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > + - |
> > + #include <dt-bindings/clock/exynos5420.h>
> > + #include <dt-bindings/interrupt-controller/arm-gic.h>
> > +
> > + scaler@12800000 {
> > + compatible = "samsung,exynos5420-scaler";
> > + reg = <0x12800000 0x1294>;
> > + interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>;
> > + clocks = <&clock CLK_MSCL0>;
> > + clock-names = "mscl";
> > + };
> > +
> > +...
>
> You have some left-overs at the end. With cleaning them:
> Reviewed-by: Krzysztof Kozlowski <[email protected]>

You mean the '...'? That's the end of YAML marker. It's not strictly needed.

Rob

2019-10-01 13:45:02

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v3] dt-bindings: gpu: Convert Samsung Image Scaler to dt-schema

On Fri, 27 Sep 2019 16:33:06 +0200, Marek Szyprowski wrote:
> From: Maciej Falkowski <[email protected]>
>
> Convert Samsung Image Scaler to newer dt-schema format.
>
> Signed-off-by: Maciej Falkowski <[email protected]>
> Signed-off-by: Marek Szyprowski <[email protected]>
> ---
> v3:
> - Fixed description of 'clocks' property:
> rather than 'mscl clock', 'pclk clock'
> - Added empty line within if-else statement
> - Added 'additionalProperties: false'
> - Listed all missing 'properties' in properties scope
>
> Best regards,
> Maciej Falkowski
> ---
> .../bindings/gpu/samsung-scaler.txt | 27 -------
> .../bindings/gpu/samsung-scaler.yaml | 81 +++++++++++++++++++
> 2 files changed, 81 insertions(+), 27 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/gpu/samsung-scaler.txt
> create mode 100644 Documentation/devicetree/bindings/gpu/samsung-scaler.yaml
>

Applied, thanks.

Rob