[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190926140315.GA16002@pi3>
Date: Thu, 26 Sep 2019 16:03:15 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Marek Szyprowski <m.szyprowski@...sung.com>
Cc: devicetree@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Inki Dae <inki.dae@...sung.com>,
Maciej Falkowski <m.falkowski@...sung.com>
Subject: Re: [PATCH v2] dt-bindings: gpu: Convert Samsung Image Scaler to
dt-schema
On Thu, Sep 26, 2019 at 02:56:14PM +0200, Marek Szyprowski wrote:
> From: Maciej Falkowski <m.falkowski@...sung.com>
>
> Convert Samsung Image Scaler to newer dt-schema format.
>
> Signed-off-by: Maciej Falkowski <m.falkowski@...sung.com>
> Signed-off-by: Marek Szyprowski <m.szyprowski@...sung.com>
> ---
> v2:
> - Removed quotation marks from string in 'compatible' property
> - Added if-then statement for 'clocks' and 'clock-names' property
> - Added include directive to example
> - Added GIC_SPI macro to example
>
> Best regards,
> Maciej Falkowski
> ---
> .../bindings/gpu/samsung-scaler.txt | 27 -------
> .../bindings/gpu/samsung-scaler.yaml | 71 +++++++++++++++++++
> 2 files changed, 71 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@...00000 {
> - 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..af19930d052e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/gpu/samsung-scaler.yaml
> @@ -0,0 +1,71 @@
> +# 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 <inki.dae@...sung.com>
> +
> +properties:
> + compatible:
> + enum:
> + - samsung,exynos5420-scaler
> + - samsung,exynos5433-scaler
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
I am repeating myself... leave the clocks and clock-names.
"I think it is worth to leave the clocks and clock-names here (could be
empty or with min/max values for number of items). This makes it easy to
find the properties by humans.
Midgard bindings could be used as example."
> +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: mscl 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
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/exynos5420.h>
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> + scaler@...00000 {
> + compatible = "samsung,exynos5420-scaler";
> + reg = <0x12800000 0x1294>;
> + interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&clock CLK_MSCL0>;
> + clock-names = "mscl";
> + };
> +
Unneeded trailing line.
Best regards,
Krzysztof
Powered by blists - more mailing lists