Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4471927rwl; Tue, 28 Mar 2023 07:25:55 -0700 (PDT) X-Google-Smtp-Source: AKy350aYf3mr/fpgrb0AL11QSrWJgM3QeaUikKxDp5aYWRHefF5T0uXxlTkMIlzhN5+imq0NjPRC X-Received: by 2002:a17:907:a808:b0:93f:fbe:c389 with SMTP id vo8-20020a170907a80800b0093f0fbec389mr12944733ejc.13.1680013554782; Tue, 28 Mar 2023 07:25:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680013554; cv=none; d=google.com; s=arc-20160816; b=Bv79+tchossgV0aAmwQKCooEuu5wZbEYumoDpWZk43VwPZFF2mYgdVvSqllkjToBM1 BRXIV22T5Jh2hkJZYOrGxvBfPGaaIjfZzBlSJxTm9tL+5Fqoc1S15Nbgfgkod84FvDM/ DtkSAQjZFffxLZ9Fxyg2MGKcuIDAw2IQwnPSv0/bKDtOrJa/N0DKVHOJN1sBwDWFREWh /J65gmVF7W2gPz47TvFpsNWQjFbPbeNJytnvoxU4vlqD/O2MZVIN9A74kM663BamvQEW u9x4ljMQxdgMAI5mv8FwCP2NU648lztZMH3lme3VLdZLajmJOfM+hhUReG19hdVZUiPC LVSQ== 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=V980h8LEVAH7v5xTJP3iTtznj/zOhEDcr2XJMd0tXB0=; b=mvUurpL8UlOiXEJvuE5liN6yxQpDpHMLoHK3Bk2Ic6RPM9XuWW0+0s43ZPA1wU7DUl yAII+LJdrdz851uiPZOC0cUcOoiMUyXzEu+Tdcg/TQ7kuUztFNV4WR5PeSlTV/X/PMPm uKbf1w+icf3al2CjafTSg3uhJIpts9YCTg4AKXNzxQvE4DMHqJhBGMtqnMw845PxHRuV 1JEXXgTthBacBFUUK8Ezvu0HCAZIcegoxtV8wF/WtRV8XKO/BqEy8yrFWNoFPYO92Wmi iO+xUl4/Ia1taM1D08PUwwL4FdbxEuoTgos19TyOTvDK/yA5u5LURI8LKv3s38qz3YBk Jj1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=BGziA7qs; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i5-20020a056402054500b004fc9c1d4360si31551299edx.529.2023.03.28.07.25.27; Tue, 28 Mar 2023 07:25:54 -0700 (PDT) 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=BGziA7qs; 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 S232322AbjC1OYm (ORCPT + 99 others); Tue, 28 Mar 2023 10:24:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230331AbjC1OYl (ORCPT ); Tue, 28 Mar 2023 10:24:41 -0400 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2910CA260 for ; Tue, 28 Mar 2023 07:24:36 -0700 (PDT) Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20230328142432epoutp025c2a2c3176ea1eb5c93eab77b3e6ff33~Qm1o1w-wc2281922819epoutp02R for ; Tue, 28 Mar 2023 14:24:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20230328142432epoutp025c2a2c3176ea1eb5c93eab77b3e6ff33~Qm1o1w-wc2281922819epoutp02R DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1680013472; bh=V980h8LEVAH7v5xTJP3iTtznj/zOhEDcr2XJMd0tXB0=; h=From:To:Cc:Subject:Date:References:From; b=BGziA7qsEUziLmGG3OfL8tQXj+4BbP0jjMoy7HdPAhachqTJwimtBOQl+FZNnl83U GRZgdSgE9Q8iPlBHdX1v8056rBUuLtNK4ZjXdozkTueZ56qK/UoOhPAzwCxR2cWlqG zN2j8B4BooSs1NtaHkyZGV+N27tGJDJsK08wW/bM= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas5p1.samsung.com (KnoxPortal) with ESMTP id 20230328142431epcas5p11a3fbae7e78223f1df386dc2dda5b6d9~Qm1oAOSOG1172711727epcas5p1H; Tue, 28 Mar 2023 14:24:31 +0000 (GMT) Received: from epsmges5p2new.samsung.com (unknown [182.195.38.176]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4PmBlL1Cxjz4x9Pr; Tue, 28 Mar 2023 14:24:30 +0000 (GMT) Received: from epcas5p4.samsung.com ( [182.195.41.42]) by epsmges5p2new.samsung.com (Symantec Messaging Gateway) with SMTP id A3.D4.55678.D98F2246; Tue, 28 Mar 2023 23:24:29 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p4.samsung.com (KnoxPortal) with ESMTPA id 20230328114738epcas5p475b8fa1d1e86bbb86d004afe365e0259~Qksou_lIK2683626836epcas5p4J; Tue, 28 Mar 2023 11:47:38 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230328114738epsmtrp2fd6c145e4d26ebdb7dd20fd032ea2f62~Qksosbhbm1607416074epsmtrp2o; Tue, 28 Mar 2023 11:47:38 +0000 (GMT) X-AuditID: b6c32a4a-909fc7000000d97e-30-6422f89d84cf Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id B9.90.31821.9D3D2246; Tue, 28 Mar 2023 20:47:37 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230328114733epsmtip2d83f080a32905f74d0b62e2b635f4cdf~QkskpBhXi2498624986epsmtip2E; Tue, 28 Mar 2023 11:47:33 +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 v7] dt-bindings: media: s5p-mfc: convert bindings to json-schema Date: Tue, 28 Mar 2023 17:17:29 +0530 Message-Id: <20230328114729.61436-1-aakarsh.jain@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA0VTa0xbZRjO19OedmSVIwP5bIThie7SBUaxwIeusux6IpviZnAal+6kPRSk nHZtEdxixkC2gYOJ29iA2hEuM2HcLNcVUFa6QEk2LiLoXCeMyaU/CK4QqgixUNB/z/s8z5v3 eb+LAPPrw0WCZNbA6FhaTeI+3Jbune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cGlNQcWX5TUl6qKjWU5M/9+ yVXF/aJ3BNWvzXlX9HPxHLO+M2/N84UDDx/3Orb7nXa8RtTsddXqyhJXWeae8jBySudW6qnb 5RCZPMvIsfzBnMvlrmLvjiuxFGckGmoxFxUnAgBmp70WCgMAAA== X-CMS-MailID: 20230328114738epcas5p475b8fa1d1e86bbb86d004afe365e0259 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230328114738epcas5p475b8fa1d1e86bbb86d004afe365e0259 References: X-Spam-Status: No, score=-2.5 required=5.0 tests=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 Convert s5p-mfc bindings to DT schema format using json-schema. Signed-off-by: Aakarsh Jain --- changes since v6: kept hw properties for Exynos3250 and Exynos4 under different if:then condition. changes since v5: kept compatible strings under enum sorted compatible strings added iommu maxItems:2 Added indentation with 4 spaces in dts example 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 .../devicetree/bindings/media/s5p-mfc.txt | 78 -------- .../bindings/media/samsung,s5p-mfc.yaml | 184 ++++++++++++++++++ 2 files changed, 184 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 new file mode 100644 index 000000000000..084b44582a43 --- /dev/null +++ b/Documentation/devicetree/bindings/media/samsung,s5p-mfc.yaml @@ -0,0 +1,184 @@ +# 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,exynos5433-mfc # Exynos5433 + - samsung,mfc-v5 # Exynos4 + - samsung,mfc-v6 # Exynos5 + - samsung,mfc-v7 # Exynos5420 + - samsung,mfc-v8 # Exynos5800 + - samsung,mfc-v10 # Exynos7880 + - items: + - enum: + - samsung,exynos3250-mfc # Exynos3250 + - const: samsung,mfc-v7 # Fall back for Exynos3250 + + 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,exynos3250-mfc + then: + properties: + clocks: + maxItems: 2 + clock-names: + items: + - const: mfc + - const: sclk_mfc + iommus: + maxItems: 1 + iommus-names: false + + - 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 + iommus-names: + items: + - const: left + - const: right + + - if: + properties: + compatible: + contains: + enum: + - samsung,mfc-v5 + then: + properties: + clocks: + maxItems: 2 + clock-names: + items: + - const: mfc + - const: sclk_mfc + iommus: + maxItems: 2 + iommus-names: + items: + - const: left + - const: right + + - if: + properties: + compatible: + contains: + enum: + - samsung,mfc-v6 + - samsung,mfc-v8 + then: + properties: + clocks: + maxItems: 1 + clock-names: + items: + - const: mfc + iommus: + maxItems: 2 + iommus-names: + items: + - const: left + - const: right + + - 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"; + }; -- 2.17.1