From patchwork Mon Feb 27 08:47:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aakarsh Jain X-Patchwork-Id: 61890 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2324704wrd; Mon, 27 Feb 2023 01:46:59 -0800 (PST) X-Google-Smtp-Source: AK7set/LJAcdGRk2BfK6gQDng1qlvPcHIke6WS1ILGa3V9Kpo97jKW3FWvjzfTHgpZAGHYhBvBrx X-Received: by 2002:a17:90a:190f:b0:233:c9e7:c885 with SMTP id 15-20020a17090a190f00b00233c9e7c885mr25383016pjg.36.1677491218943; Mon, 27 Feb 2023 01:46:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677491218; cv=none; d=google.com; s=arc-20160816; b=KEU3HPIvrvGYoh5glwRefSv81BMZzwXV+GkK7X798xlG5rZGla6JFLW26Jv79v/Pij c3uYpibhxY62BWxq7TAdkgmLvUt45BCcGnXrYFLsBtT0MsFJwVoG3VAvNNq8G8EnkMfJ WTCmmm47SkLn8svxX8MvDVFxil7pqn6/83VllO8PmHJnMftiD6fcBJWC4yn9IChwA6Jx RDPUyaKSjUvLu039fYvMUuz4XaGKG4CtRg8or4l5f93t31Md4DBVTX2JwoMyCqz77SlY TBT4qpw7x/kKm/5oN0AIu6pfaJGd6iHGPZMRNOshzGwzLUx+EcdhOrM0JufHGXuhL7TK JYvQ== 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=GcC728ZJBF/qRatNWquihSzkmxihf6LSYIUW6SKVvXw=; b=xNAEwULrbYene2PNmMIutWrh3DBzPULp1P82Y0pByqQBHvko9HMTc5DvUc2Wr9NYZ3 RcmJhhOWZ8IQii2QqCeR43KelFw5Uofee3xxABVHwR4VNElReqrM2w0C9Y/QbcPqpKuH RS+2PDameAxWh8maaqRqPWMl8ue1ZWaiGqnStywTKMgm1NQfMGjCqNcxYTEXSRjM4Pdi 0CfEbPseUT1D05kxKsbZMCiKgnjoTqRnicovtWU0S2V45rsKlNaPg21kc0WlejOPeIKU jXNLibSm6OwH2BeBkIFjKW0RHem7nuNJqhM+L2IWwQ1F3nooInHg8aeA4mSB2NewAP3g /xuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=VQGN5Au9; 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 x15-20020a17090a530f00b0022bb7ca5bc0si6321938pjh.151.2023.02.27.01.46.46; Mon, 27 Feb 2023 01:46:58 -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=VQGN5Au9; 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 S229379AbjB0JO1 (ORCPT + 99 others); Mon, 27 Feb 2023 04:14:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229992AbjB0JOL (ORCPT ); Mon, 27 Feb 2023 04:14:11 -0500 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A18EE65A4 for ; Mon, 27 Feb 2023 01:07:11 -0800 (PST) Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20230227090708epoutp04337ef93df8bb99210a9fe61fcb19765f~HozPAMmnW2231422314epoutp04N for ; Mon, 27 Feb 2023 09:07:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20230227090708epoutp04337ef93df8bb99210a9fe61fcb19765f~HozPAMmnW2231422314epoutp04N DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1677488828; bh=GcC728ZJBF/qRatNWquihSzkmxihf6LSYIUW6SKVvXw=; h=From:To:Cc:Subject:Date:References:From; b=VQGN5Au9oOY+0/S8axXmFgNZFin9/RarIEXN+Yu7v7Yy98JUsAC8vsXp9aFtNwS2s mB0ArWQhBHQpBJWAve9Vfb0PaxNX/F53VBQITNuG1SqvLP3J+xPoKwkPr8aoBI3JIe zT/YsTJheNTLvOWtITZp0lE0v+LKU3Rz4H5mRt84= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p4.samsung.com (KnoxPortal) with ESMTP id 20230227090708epcas5p447230e3115e46354016862898ce30d56~HozOZjz3D3001530015epcas5p4I; Mon, 27 Feb 2023 09:07:08 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.183]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4PQF4V48qCz4x9QC; Mon, 27 Feb 2023 09:07:06 +0000 (GMT) Received: from epcas5p1.samsung.com ( [182.195.41.39]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id 22.A7.06765.AB27CF36; Mon, 27 Feb 2023 18:07:06 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20230227084748epcas5p2602a39017d3366bdfb5af95088ed89dc~HoiV7i8140056800568epcas5p2D; Mon, 27 Feb 2023 08:47:48 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230227084748epsmtrp160012d04d53fde53f181d53b2b23a429~HoiV39A3b2498824988epsmtrp1g; Mon, 27 Feb 2023 08:47:47 +0000 (GMT) X-AuditID: b6c32a4b-20fff70000011a6d-4e-63fc72ba5c41 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id AC.53.17995.33E6CF36; Mon, 27 Feb 2023 17:47:47 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230227084744epsmtip2ae3d3948fd93a167a7495f705bd17b83~HoiS2jcvb0614606146epsmtip2h; Mon, 27 Feb 2023 08:47:44 +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 v5] dt-bindings: media: s5p-mfc: convert bindings to json-schema Date: Mon, 27 Feb 2023 14:17:36 +0530 Message-Id: <20230227084736.89361-1-aakarsh.jain@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA0VTa0xTZxjOd87padF0O1YI38hkXTNncCm0WsoHsw6HwzNxE2T+cGbDrhwp obS1pw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UZt9+0Inrn7y+Lr4Sz75Lo3DDyQnx0S8m3CSwXJBq2zB lqnz7+adf5n/8N6pDz52eee8rWd8u712Vt7NXpvZh+bl33vksXqdHlvNGS/H5nVPhUT/Vs26 sK9iQoNkivzKK24BZ9KPHlf8IB5Yuz12+x/RL3dnJv9rrbrts2h59Vwu+RW7/91WS+2ynWhw +ZwW0zn296ff/JR/7HiktVo6LFiJpTgj0VCLuag4EQCeSHp4CQMAAA== X-CMS-MailID: 20230227084748epcas5p2602a39017d3366bdfb5af95088ed89dc X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230227084748epcas5p2602a39017d3366bdfb5af95088ed89dc 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, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=ham 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?1758977031876612010?= X-GMAIL-MSGID: =?utf-8?q?1758977031876612010?= Convert s5p-mfc bindings to DT schema format using json-schema. Signed-off-by: Aakarsh Jain --- changes since v4: Removed items from oneOf section dropped black line defined the iommus names items as items: -const left -const right changes since v3: fixed dt-schema warnings and errors while running make dtbs_check and make dt_binding_check for ARMv7 Since, obsolete properties are not part of dt-node so we are not including these properties in dt-schema. changes since v2: changed Commit message from Adds to Convert Removed text "This file has moved to samsung,s5p-mfc.yaml" from s5p-mfc.txt fixed dt-schema warnings and errors while running make dtbs_check and make dt_binding_check changes since v1: fixed dt-schema warnings and errors while running make dtbs_check and make dt_binding_check Removed description. Listed items. Added allOf:if:then for restricting two items to specific compatible This patch is independent from the previous MFC v12 patch series for HW3 support. .../devicetree/bindings/media/s5p-mfc.txt | 78 --------- .../bindings/media/samsung,s5p-mfc.yaml | 148 ++++++++++++++++++ 2 files changed, 148 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..b4a289619db0 --- /dev/null +++ b/Documentation/devicetree/bindings/media/samsung,s5p-mfc.yaml @@ -0,0 +1,148 @@ +# 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: + - enum: + - samsung,mfc-v5 # Exynos4 + - samsung,mfc-v6 # Exynos5 + - items: + - enum: + - samsung,exynos3250-mfc # Exynos3250 + - const: samsung,mfc-v7 # Fall back for Exynos3250 + - 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: + items: + - const: left + - const: right + + 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 + + - if: + properties: + compatible: + contains: + enum: + - samsung,mfc-v6 + - samsung,mfc-v8 + then: + properties: + clocks: + maxItems: 1 + clock-names: + items: + - const: mfc + + - if: + properties: + compatible: + contains: + enum: + - samsung,exynos5433-mfc + then: + properties: + clocks: + maxItems: 3 + clock-names: + items: + - const: pclk + - const: aclk + - const: aclk_xiu + + - if: + properties: + compatible: + contains: + enum: + - samsung,mfc-v7 + then: + properties: + clocks: + 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"; + };