media: dt-bindings: media: samsung,s5pv210-jpeg: convert to dtschema

Convert the Samsung SoC JPEG codec bindings to DT schema.

The original bindings were quite old and incomplete, so change during
conversion:
1. Add typical (already used) properties like iommus and power domains.
2. Document samsung,exynos4212-jpeg compatible (already used in DTS and
   driver).
3. List clocks per each variant.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
Krzysztof Kozlowski 2022-06-29 13:08:03 +01:00 committed by Mauro Carvalho Chehab
parent afba6e2080
commit 57020a3e24
3 changed files with 124 additions and 16 deletions

View File

@ -1,16 +0,0 @@
Samsung S5P/Exynos SoC series JPEG codec
Required properties:
- compatible : should be one of:
"samsung,s5pv210-jpeg", "samsung,exynos4210-jpeg",
"samsung,exynos3250-jpeg", "samsung,exynos5420-jpeg",
"samsung,exynos5433-jpeg";
- reg : address and length of the JPEG codec IP register set;
- interrupts : specifies the JPEG codec IP interrupt;
- clock-names : should contain:
- "jpeg" for the core gate clock,
- "sclk" for the special clock (optional).
- clocks : should contain the clock specifier and clock ID list
matching entries in the clock-names property; from
the common clock bindings.

View File

@ -0,0 +1,123 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/media/samsung,s5pv210-jpeg.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Samsung S5PV210 and Exynos SoC JPEG codec
maintainers:
- Jacek Anaszewski <jacek.anaszewski@gmail.com>
- Krzysztof Kozlowski <krzk@kernel.org>
- Sylwester Nawrocki <s.nawrocki@samsung.com>
- Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>
properties:
compatible:
enum:
- samsung,s5pv210-jpeg
- samsung,exynos3250-jpeg
- samsung,exynos4210-jpeg
- samsung,exynos4212-jpeg
- samsung,exynos5420-jpeg
- samsung,exynos5433-jpeg
clocks:
minItems: 1
maxItems: 4
clock-names:
minItems: 1
maxItems: 4
interrupts:
maxItems: 1
iommus:
maxItems: 1
power-domains:
maxItems: 1
reg:
maxItems: 1
required:
- compatible
- clocks
- clock-names
- interrupts
- reg
allOf:
- if:
properties:
compatible:
contains:
enum:
- samsung,s5pv210-jpeg
- samsung,exynos4210-jpeg
- samsung,exynos4212-jpeg
- samsung,exynos5420-jpeg
then:
properties:
clocks:
maxItems: 1
clock-names:
items:
- const: jpeg
- if:
properties:
compatible:
contains:
enum:
- samsung,exynos3250-jpeg
then:
properties:
clocks:
minItems: 2
maxItems: 2
clock-names:
items:
- const: jpeg
- const: sclk
- if:
properties:
compatible:
contains:
enum:
- samsung,exynos5433-jpeg
then:
properties:
clocks:
minItems: 4
maxItems: 4
clock-names:
items:
- const: pclk
- const: aclk
- const: aclk_xiu
- const: sclk
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/exynos5433.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
codec@15020000 {
compatible = "samsung,exynos5433-jpeg";
reg = <0x15020000 0x10000>;
interrupts = <GIC_SPI 411 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "pclk", "aclk", "aclk_xiu", "sclk";
clocks = <&cmu_mscl CLK_PCLK_JPEG>,
<&cmu_mscl CLK_ACLK_JPEG>,
<&cmu_mscl CLK_ACLK_XIU_MSCLX>,
<&cmu_mscl CLK_SCLK_JPEG>;
iommus = <&sysmmu_jpeg>;
power-domains = <&pd_mscl>;
};

View File

@ -2729,6 +2729,7 @@ M: Sylwester Nawrocki <s.nawrocki@samsung.com>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
L: linux-media@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/media/samsung,s5pv210-jpeg.yaml
F: drivers/media/platform/samsung/s5p-jpeg/
ARM/SAMSUNG S5P SERIES Multi Format Codec (MFC) SUPPORT