[v4,1/3] media: dt-bindings: media: mediatek: vcodec: adapt to the 'clock-names' of different platforms
Message ID | 20221202034450.3808-1-yunfei.dong@mediatek.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp631444wrr; Thu, 1 Dec 2022 19:55:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf76zUTKv0iZ0Yv1aJRIzLnBDDiVWVz2a97CzAT49peM1iOcKxQAWIo8aMa27ZniJ4IzWHmY X-Received: by 2002:a17:906:5a8b:b0:7c0:bf7c:a56b with SMTP id l11-20020a1709065a8b00b007c0bf7ca56bmr1689298ejq.306.1669953349346; Thu, 01 Dec 2022 19:55:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669953349; cv=none; d=google.com; s=arc-20160816; b=UBb39EWY/Ti9QKRQZxtnBB6I0vB8CWqomWJwZDYiqqe+Sf3it9lKx3aMeSmV+yC645 BCUJLXnmq/30IfSJczKazAHiYjETUAQwkT32PhaR99OeScfF07Zca4HPr9Jy8EquGcHL Jh8DPew4DjYdJFEZpgXolZC36rLg6q+tNuzufCUh67h4m7Fsmqo+AYjI08IRfNShRfkT h8eSJgTNf1GdD8K3f8scM1WNNnS4YjQOP6SFxh13SwEFlNlab3PnCRya+64QvA+NLBOm nj7IW/qOoCvmC2R/KSpl2AL1nAbyzjXsRjZR5eXMEHTQHHsG5WBXpOPRMo4IHSH8V/xU FQ9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=TAJ3T2+YM9j4HIm1trlpMZQnx74SQADR1vSM+bYGurk=; b=nsasplew2spF6yotumh/Uu9It+Au/+auhqJtjyDVCz3c7BanOJ6+uFMh37MonzOuKl +vTYCosdf5VEje3YDyR/fsuDN6fcLDGG/jEltrC0Q5Z8ealJJuU8wuzl8RYqRSIiiNiT pQx5+X8AJXzfpCVVc1g1wTIOuiNg+BV42oqrBIXnF3gSLnLSTFqsb1V+MT5czZb9rT0w azwVWBqv2mWkRXrKXg16RkTF16hcSD9+0Y0HGuCfVzRZ2qWo/XYy6oyPo2vaSGKijl8s WphB/XfZmHsYS22ocgmZ68Dbw2bqTVftUZ8P8HiyZ5TEIsJFk3jne8JViKy5yHWF1fs9 G7bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=qXGOMAUQ; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qf16-20020a1709077f1000b007c0c0d7c4c8si1082728ejc.44.2022.12.01.19.55.24; Thu, 01 Dec 2022 19:55:49 -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=@mediatek.com header.s=dk header.b=qXGOMAUQ; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232098AbiLBDpI (ORCPT <rfc822;heyuhang3455@gmail.com> + 99 others); Thu, 1 Dec 2022 22:45:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231195AbiLBDpF (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 1 Dec 2022 22:45:05 -0500 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1685E15739; Thu, 1 Dec 2022 19:44:59 -0800 (PST) X-UUID: 2a17ca0578314f7d8b1d7f4111d7d429-20221202 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=TAJ3T2+YM9j4HIm1trlpMZQnx74SQADR1vSM+bYGurk=; b=qXGOMAUQ//PZt5PLL7MoU7/h/vywAm9givDZt1eV9ULCWf8yiBmA0UCvjW23tnkFP7Re0yWnMwauhCCP6iRwT7N2vI9C9bo20A6sB8slTDeL6fmZIFksZ5tICumiCGPWdCnWNtaiWKcKIdYnLldjVEo0gC9ynRihQXgmZJa50rw=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.14,REQID:8904f67b-e575-4019-8b0e-0cc160290988,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:90 X-CID-INFO: VERSION:1.1.14,REQID:8904f67b-e575-4019-8b0e-0cc160290988,IP:0,URL :0,TC:0,Content:-5,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTIO N:quarantine,TS:90 X-CID-META: VersionHash:dcaaed0,CLOUDID:639e566c-41fe-47b6-8eb4-ec192dedaf7d,B ulkID:221202114456KP45APR0,BulkQuantity:0,Recheck:0,SF:38|28|17|19|48,TC:n il,Content:0,EDM:-3,IP:nil,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: 2a17ca0578314f7d8b1d7f4111d7d429-20221202 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from <yunfei.dong@mediatek.com>) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 797898477; Fri, 02 Dec 2022 11:44:54 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs11n1.mediatek.inc (172.21.101.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Fri, 2 Dec 2022 11:44:52 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Fri, 2 Dec 2022 11:44:52 +0800 From: Yunfei Dong <yunfei.dong@mediatek.com> To: Yunfei Dong <yunfei.dong@mediatek.com>, Rob Herring <robh@kernel.org>, Chen-Yu Tsai <wenst@chromium.org>, Hans Verkuil <hverkuil-cisco@xs4all.nl>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Benjamin Gaignard <benjamin.gaignard@collabora.com>, Tiffany Lin <tiffany.lin@mediatek.com> CC: Mauro Carvalho Chehab <mchehab@kernel.org>, Matthias Brugger <matthias.bgg@gmail.com>, Hsin-Yi Wang <hsinyi@chromium.org>, Daniel Vetter <daniel@ffwll.ch>, Steve Cho <stevecho@chromium.org>, <linux-media@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-mediatek@lists.infradead.org>, <Project_Global_Chrome_Upstream_Group@mediatek.com> Subject: [PATCH v4,1/3] media: dt-bindings: media: mediatek: vcodec: adapt to the 'clock-names' of different platforms Date: Fri, 2 Dec 2022 11:44:48 +0800 Message-ID: <20221202034450.3808-1-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, T_SPF_TEMPERROR,UNPARSEABLE_RELAY 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751073003157181605?= X-GMAIL-MSGID: =?utf-8?q?1751073003157181605?= |
Series |
[v4,1/3] media: dt-bindings: media: mediatek: vcodec: adapt to the 'clock-names' of different platforms
|
|
Commit Message
Yunfei Dong (董云飞)
Dec. 2, 2022, 3:44 a.m. UTC
mt8195 and mt8192 have different clock numbers, separate 'clock-names'
according to compatible name.
Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
---
compared with v3:
- rewrite clock-names according to different platforms.
Reference series:
[1]: v5 of this series is presend by Allen-KH Cheng.
message-id: 20221128143832.25584-4-allen-kh.cheng@mediatek.com
---
.../media/mediatek,vcodec-subdev-decoder.yaml | 41 ++++++++++++++++---
1 file changed, 35 insertions(+), 6 deletions(-)
Comments
On Fri, Dec 02, 2022 at 11:44:48AM +0800, Yunfei Dong wrote: > mt8195 and mt8192 have different clock numbers, separate 'clock-names' > according to compatible name. > > Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> > --- > compared with v3: > - rewrite clock-names according to different platforms. > > Reference series: > [1]: v5 of this series is presend by Allen-KH Cheng. > message-id: 20221128143832.25584-4-allen-kh.cheng@mediatek.com > --- > .../media/mediatek,vcodec-subdev-decoder.yaml | 41 ++++++++++++++++--- > 1 file changed, 35 insertions(+), 6 deletions(-) > > diff --git a/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml b/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml > index 7c5b4a91c59b..a08b2c814f40 100644 > --- a/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml > +++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml > @@ -110,15 +110,12 @@ patternProperties: > Refer to bindings/iommu/mediatek,iommu.yaml. > > clocks: > + minItems: 1 Why 1? Looks like it should be 4 or 5 clocks. > maxItems: 5 > > clock-names: > - items: > - - const: sel > - - const: soc-vdec > - - const: soc-lat > - - const: vdec > - - const: top > + minItems: 1 > + maxItems: 5 > > assigned-clocks: > maxItems: 1 > @@ -159,6 +156,38 @@ then: > required: > - interrupts > > +allOf: > + - if: > + properties: > + compatible: > + contains: > + enum: > + - mediatek,mt8192-vcodec-dec > + then: > + properties: > + clock-names: > + items: > + - const: sel > + - const: soc-vdec > + - const: soc-lat > + - const: vdec > + - const: top > + > + - if: > + properties: > + compatible: > + contains: > + enum: > + - mediatek,mt8195-vcodec-dec > + then: > + properties: > + clock-names: > + items: > + - const: sel > + - const: vdec > + - const: lat > + - const: top > + > additionalProperties: false > > examples: > -- > 2.18.0 > >
Hi Rob, Thanks for your suggestion. On Mon, 2022-12-05 at 11:54 -0600, Rob Herring wrote: > On Fri, Dec 02, 2022 at 11:44:48AM +0800, Yunfei Dong wrote: > > mt8195 and mt8192 have different clock numbers, separate 'clock- > > names' > > according to compatible name. > > > > Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> > > --- > > compared with v3: > > - rewrite clock-names according to different platforms. > > > > Reference series: > > [1]: v5 of this series is presend by Allen-KH Cheng. > > message-id: 20221128143832.25584-4-allen-kh.cheng@mediatek.com > > --- > > .../media/mediatek,vcodec-subdev-decoder.yaml | 41 > > ++++++++++++++++--- > > 1 file changed, 35 insertions(+), 6 deletions(-) > > > > diff --git > > a/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev- > > decoder.yaml > > b/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev- > > decoder.yaml > > index 7c5b4a91c59b..a08b2c814f40 100644 > > --- a/Documentation/devicetree/bindings/media/mediatek,vcodec- > > subdev-decoder.yaml > > +++ b/Documentation/devicetree/bindings/media/mediatek,vcodec- > > subdev-decoder.yaml > > @@ -110,15 +110,12 @@ patternProperties: > > Refer to bindings/iommu/mediatek,iommu.yaml. > > > > clocks: > > + minItems: 1 > > Why 1? Looks like it should be 4 or 5 clocks. > Yes, I should write this vale to 4, will change it again if 1 is used in the future. Best regards, Yunfei Dong > > maxItems: 5 > > > > clock-names: > > - items: > > - - const: sel > > - - const: soc-vdec > > - - const: soc-lat > > - - const: vdec > > - - const: top > > + minItems: 1 > > + maxItems: 5 > > > > assigned-clocks: > > maxItems: 1 > > @@ -159,6 +156,38 @@ then: > > required: > > - interrupts > > > > +allOf: > > + - if: > > + properties: > > + compatible: > > + contains: > > + enum: > > + - mediatek,mt8192-vcodec-dec > > + then: > > + properties: > > + clock-names: > > + items: > > + - const: sel > > + - const: soc-vdec > > + - const: soc-lat > > + - const: vdec > > + - const: top > > + > > + - if: > > + properties: > > + compatible: > > + contains: > > + enum: > > + - mediatek,mt8195-vcodec-dec > > + then: > > + properties: > > + clock-names: > > + items: > > + - const: sel > > + - const: vdec > > + - const: lat > > + - const: top > > + > > additionalProperties: false > > > > examples: > > -- > > 2.18.0 > > > >
diff --git a/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml b/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml index 7c5b4a91c59b..a08b2c814f40 100644 --- a/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml +++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decoder.yaml @@ -110,15 +110,12 @@ patternProperties: Refer to bindings/iommu/mediatek,iommu.yaml. clocks: + minItems: 1 maxItems: 5 clock-names: - items: - - const: sel - - const: soc-vdec - - const: soc-lat - - const: vdec - - const: top + minItems: 1 + maxItems: 5 assigned-clocks: maxItems: 1 @@ -159,6 +156,38 @@ then: required: - interrupts +allOf: + - if: + properties: + compatible: + contains: + enum: + - mediatek,mt8192-vcodec-dec + then: + properties: + clock-names: + items: + - const: sel + - const: soc-vdec + - const: soc-lat + - const: vdec + - const: top + + - if: + properties: + compatible: + contains: + enum: + - mediatek,mt8195-vcodec-dec + then: + properties: + clock-names: + items: + - const: sel + - const: vdec + - const: lat + - const: top + additionalProperties: false examples: