From patchwork Thu Feb 23 10:46:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aakarsh Jain X-Patchwork-Id: 60905 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp250176wrd; Thu, 23 Feb 2023 03:03:24 -0800 (PST) X-Google-Smtp-Source: AK7set81asIrLx3qVvfrO2pdSeRNtg/ru8AVLWJ42zuUPIeFQPq0jXCO9KHgYWlgvEZRxF31NKpX X-Received: by 2002:a17:902:bb0f:b0:197:8e8e:f15 with SMTP id im15-20020a170902bb0f00b001978e8e0f15mr12588919plb.6.1677150203777; Thu, 23 Feb 2023 03:03:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677150203; cv=none; d=google.com; s=arc-20160816; b=eUo80lYzoOYax6TAzT6DvexdgDdx5TCY92HuV1t4WddHF3XCFqfxIvVlfK9+lE/0xx PrJBIV93K7cwijbw0zu0XNXeSljG0WfLzqqWKAHzIDsk2nJ5ukfOfRqNvh1sJAmSpwgK JNxjbkFAt5tulz5+4Z6Yq+zVOAzIZraYGGQrkZDEBn7BCqQwqLdRxTEK82AA0oFyYBBJ X8oUVTaiTla0fPQl49nQDO8oBZzXYH8K0aVHnBrHLuwlYMvkWmVHXlIVKBG2AXNv87tG GfiNFKUrgAASwSGM0ScyikStlkw6Bqxj2iu2c6gJ192ZN6ydJZFz/STEdM/E3lJmBdVU vSkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=6Am/pU+0DRzbajMRwCB6It4syIPlNp3VoLOYpRU4yCQ=; b=R23V2Gv0P5Fg0zfm5y34vWQILckmfJVFj1gNtzJeeOmQSv/8ob5liAvdFAN0Ubb94g TxEnndzSyoOIP//XADXA9mjCRk04jl87Og8J6IuomHEQaykA4ZBMlYooGcpuGmnBgytQ 5SpJfGlBT/+/DtFjuQzSNx/FAwDHodycAuISIZPkRgsEBVm4GT2zdJyDDXCCwGmxmysO 0o9pSYRcskVJ/WZ9AAvB/xwI22hDZqJ6wtOV1hNdP/MmXGQHciRTY0spbis7WzjIwk9P xMPOpZIZ1Q6k5Bmg1CCsm+pUt43zVi/ktqw2MJHgojH82pZG8V7ll7ydaxmcSBqvA4vt qziw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=sEoVfkky; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w16-20020a1709027b9000b00188ef2314b2si101163pll.79.2023.02.23.03.02.59; Thu, 23 Feb 2023 03:03:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=sEoVfkky; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233981AbjBWLB4 (ORCPT + 99 others); Thu, 23 Feb 2023 06:01:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233904AbjBWLBs (ORCPT ); Thu, 23 Feb 2023 06:01:48 -0500 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72EA754567 for ; Thu, 23 Feb 2023 03:01:40 -0800 (PST) Received: from epcas5p3.samsung.com (unknown [182.195.41.41]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20230223110138epoutp02dafdcf0d811d5e8244f7dcd80ec8a9f6~GbyD3VQAP3104431044epoutp02S for ; Thu, 23 Feb 2023 11:01:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20230223110138epoutp02dafdcf0d811d5e8244f7dcd80ec8a9f6~GbyD3VQAP3104431044epoutp02S DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1677150098; bh=6Am/pU+0DRzbajMRwCB6It4syIPlNp3VoLOYpRU4yCQ=; h=From:To:Cc:Subject:Date:References:From; b=sEoVfkkyyx75sM1XGUU83Z1luTWtMSTVBEdiI0s9Yj7d5O4DollVnDI/sv2I+pgZy 5Fy5jWQawCM4M5QEJYFT3uQXsXM8szTfpL+JXEMMUWJ5pXZi2OSJAA/Ase7r9n9ova sel3sTFcec9F0ubAI1Wifrp4UxYqxWQH9JHJNZcc= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20230223110137epcas5p38c18c38934281e8f8d9d9ef9a21e33db~GbyCzirgn1474914749epcas5p3u; Thu, 23 Feb 2023 11:01:37 +0000 (GMT) Received: from epsmges5p1new.samsung.com (unknown [182.195.38.174]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4PMqpR3Kd2z4x9Q9; Thu, 23 Feb 2023 11:01:35 +0000 (GMT) Received: from epcas5p4.samsung.com ( [182.195.41.42]) by epsmges5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 48.1A.10528.F8747F36; Thu, 23 Feb 2023 20:01:35 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20230223104649epcas5p260da7a49016c9ef7826ac1fab7567776~GblIIBS6x0042400424epcas5p2l; Thu, 23 Feb 2023 10:46:49 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230223104649epsmtrp1e92b922e75ba00bacd4219ef0374638c~GblIG-Srv1201512015epsmtrp10; Thu, 23 Feb 2023 10:46:49 +0000 (GMT) X-AuditID: b6c32a49-c17ff70000012920-2a-63f7478f5309 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 02.39.05839.91447F36; Thu, 23 Feb 2023 19:46:49 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230223104646epsmtip2496f2c8dcee31e0110a003036556156a~GblFJEi2O0991609916epsmtip2T; Thu, 23 Feb 2023 10:46:46 +0000 (GMT) From: Aakarsh Jain To: linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: m.szyprowski@samsung.com, andrzej.hajda@intel.com, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, ezequiel@vanguardiasur.com.ar, jernej.skrabec@gmail.com, benjamin.gaignard@collabora.com, krzysztof.kozlowski+dt@linaro.org, stanimir.varbanov@linaro.org, dillon.minfei@gmail.com, david.plowman@raspberrypi.com, mark.rutland@arm.com, robh+dt@kernel.org, krzk+dt@kernel.org, andi@etezian.org, alim.akhtar@samsung.com, aswani.reddy@samsung.com, pankaj.dubey@samsung.com, Aakarsh Jain Subject: [PATCH] dt-bindings: media: s5p-mfc: convert bindings to json-schema Date: Thu, 23 Feb 2023 16:16:14 +0530 Message-Id: <20230223104614.10954-1-aakarsh.jain@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA0WTfUxTVxjGc+69vbeoJVeEcWBT2Y3b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0tOWQsvPxGlO0V y9dTrsufqOKv1OZ0s1af/GLfCb6WzS+VeQ+tu98Uu7uWYcakOQ/ihPJFZZlb+zI3sT9yKnn1 4xnjTz7zxfULOg57uJ198y1R9Jx45kv3oszyN/dXzd4h+2dCNIPSCdkz899eeMG99wHT6cvF bUebzjV03t3/edHRQuePq11eb2GpCNphaaSumFmxfO/Pt05d/TavlPY9/H32z83VUa+TzU6U xby73n9k/tOYoqvzT8695XdOiaU4I9FQi7moOBEAmd2ZMwkDAAA= X-CMS-MailID: 20230223104649epcas5p260da7a49016c9ef7826ac1fab7567776 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230223104649epcas5p260da7a49016c9ef7826ac1fab7567776 References: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758619451835767850?= X-GMAIL-MSGID: =?utf-8?q?1758619451835767850?= Convert s5p-mfc bindings to DT schema format using json-schema. Signed-off-by: Aakarsh Jain --- Since, obsolete properties are not part of dt-node so we are not including these properties in dt-schema. .../devicetree/bindings/media/s5p-mfc.txt | 78 --------- .../bindings/media/samsung,s5p-mfc.yaml | 160 ++++++++++++++++++ 2 files changed, 160 insertions(+), 78 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/samsung,s5p-mfc.yaml diff --git a/Documentation/devicetree/bindings/media/s5p-mfc.txt b/Documentation/devicetree/bindings/media/s5p-mfc.txt index 8eb90c043d5d..e69de29bb2d1 100644 --- a/Documentation/devicetree/bindings/media/s5p-mfc.txt +++ b/Documentation/devicetree/bindings/media/s5p-mfc.txt @@ -1,78 +0,0 @@ -* Samsung Multi Format Codec (MFC) - -Multi Format Codec (MFC) is the IP present in Samsung SoCs which -supports high resolution decoding and encoding functionalities. -The MFC device driver is a v4l2 driver which can encode/decode -video raw/elementary streams and has support for all popular -video codecs. - -Required properties: - - compatible : value should be either one among the following - (a) "samsung,mfc-v5" for MFC v5 present in Exynos4 SoCs - (b) "samsung,mfc-v6" for MFC v6 present in Exynos5 SoCs - (c) "samsung,exynos3250-mfc", "samsung,mfc-v7" for MFC v7 - present in Exynos3250 SoC - (d) "samsung,mfc-v7" for MFC v7 present in Exynos5420 SoC - (e) "samsung,mfc-v8" for MFC v8 present in Exynos5800 SoC - (f) "samsung,exynos5433-mfc" for MFC v8 present in Exynos5433 SoC - (g) "samsung,mfc-v10" for MFC v10 present in Exynos7880 SoC - - - reg : Physical base address of the IP registers and length of memory - mapped region. - - - interrupts : MFC interrupt number to the CPU. - - clocks : from common clock binding: handle to mfc clock. - - clock-names : from common clock binding: must contain "mfc", - corresponding to entry in the clocks property. - -Optional properties: - - power-domains : power-domain property defined with a phandle - to respective power domain. - - memory-region : from reserved memory binding: phandles to two reserved - memory regions, first is for "left" mfc memory bus interfaces, - second if for the "right" mfc memory bus, used when no SYSMMU - support is available; used only by MFC v5 present in Exynos4 SoCs - -Obsolete properties: - - samsung,mfc-r, samsung,mfc-l : support removed, please use memory-region - property instead - - -Example: -SoC specific DT entry: - -mfc: codec@13400000 { - compatible = "samsung,mfc-v5"; - reg = <0x13400000 0x10000>; - interrupts = <0 94 0>; - power-domains = <&pd_mfc>; - clocks = <&clock 273>; - clock-names = "mfc"; -}; - -Reserved memory specific DT entry for given board (see reserved memory binding -for more information): - -reserved-memory { - #address-cells = <1>; - #size-cells = <1>; - ranges; - - mfc_left: region@51000000 { - compatible = "shared-dma-pool"; - no-map; - reg = <0x51000000 0x800000>; - }; - - mfc_right: region@43000000 { - compatible = "shared-dma-pool"; - no-map; - reg = <0x43000000 0x800000>; - }; -}; - -Board specific DT entry: - -codec@13400000 { - memory-region = <&mfc_left>, <&mfc_right>; -}; diff --git a/Documentation/devicetree/bindings/media/samsung,s5p-mfc.yaml b/Documentation/devicetree/bindings/media/samsung,s5p-mfc.yaml index 000000000000..e82b143086ba --- /dev/null +++ b/Documentation/devicetree/bindings/media/samsung,s5p-mfc.yaml @@ -0,0 +1,160 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/samsung,s5p-mfc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung Exynos Multi Format Codec (MFC) + +maintainers: + - Marek Szyprowski + - Aakarsh Jain + +description: + Multi Format Codec (MFC) is the IP present in Samsung SoCs which + supports high resolution decoding and encoding functionalities. + +properties: + compatible: + oneOf: + - items: + - enum: + - samsung,mfc-v5 # Exynos4 + - samsung,mfc-v6 # Exynos5 + - items: + - enum: + - samsung,exynos3250-mfc # Exynos3250 + - const: samsung,mfc-v7 # Fall back Exynos3250 + - items: + - enum: + - samsung,mfc-v7 # Exynos5420 + - samsung,mfc-v8 # Exynos5800 + - samsung,exynos5433-mfc # Exynos5433 + - samsung,mfc-v10 # Exynos7880 + + reg: + maxItems: 1 + + clocks: + minItems: 1 + maxItems: 3 + + clock-names: + minItems: 1 + maxItems: 3 + + interrupts: + maxItems: 1 + + iommus: + minItems: 1 + maxItems: 2 + + iommu-names: + minItems: 1 + maxItems: 2 + + power-domains: + maxItems: 1 + + memory-region: + minItems: 1 + maxItems: 2 + +required: + - compatible + - reg + - clocks + - clock-names + - interrupts + +additionalProperties: false + +allOf: + - if: + properties: + compatible: + contains: + enum: + - samsung,mfc-v5 + - samsung,exynos3250-mfc + then: + properties: + clocks: + maxItems: 2 + clock-names: + items: + - const: mfc + - const: sclk_mfc + iommus: + minItems: 1 + maxItems: 2 + + - if: + properties: + compatible: + contains: + enum: + - samsung,mfc-v6 + - samsung,mfc-v8 + then: + properties: + clocks: + maxItems: 1 + clock-names: + items: + - const: mfc + iommus: + maxItems: 2 + + - if: + properties: + compatible: + contains: + enum: + - samsung,exynos5433-mfc + then: + properties: + clocks: + maxItems: 3 + clock-names: + items: + - const: pclk + - const: aclk + - const: aclk_xiu + iommus: + maxItems: 2 + + - if: + properties: + compatible: + contains: + enum: + - samsung,mfc-v7 + then: + properties: + clocks: + minItems: 1 + maxItems: 2 + iommus: + minItems: 1 + maxItems: 2 + +examples: + - | + #include + #include + #include + #include + + codec@13400000 { + compatible = "samsung,mfc-v5"; + reg = <0x13400000 0x10000>; + interrupts = ; + power-domains = <&pd_mfc>; + clocks = <&clock CLK_MFC>, <&clock CLK_SCLK_MFC>; + clock-names = "mfc", "sclk_mfc"; + iommus = <&sysmmu_mfc_l>, <&sysmmu_mfc_r>; + iommu-names = "left", "right"; + + };