From patchwork Fri Mar 3 01:38:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen-KH Cheng X-Patchwork-Id: 63716 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp170763wrd; Thu, 2 Mar 2023 17:42:45 -0800 (PST) X-Google-Smtp-Source: AK7set/pwPGVcH2/kq27t7b4Fs3kfGvhUM+uMTS4OLS1hYRW8JRU+GZZPAe0O967UlniHPl7zzsu X-Received: by 2002:a62:79c6:0:b0:5b1:53e:ae46 with SMTP id u189-20020a6279c6000000b005b1053eae46mr537326pfc.31.1677807765470; Thu, 02 Mar 2023 17:42:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677807765; cv=none; d=google.com; s=arc-20160816; b=fWctaiS18GzR4YQm4ct96n6R7V7zwzVHokTYkFimwMXQzN0dvzczku4kItBJ8VlTR+ 8zDcNKm2f5WbMp2T1OHuxgw74HkrCB5kDxlQEssM82sVRRIExK2VsdrpHp6DEhnAEfg9 S/IGoV3sJ/Vr1rU1qaw3EjOo2CLAD5uQx7ANvOA7+d1ERjDaIeDMwYx+l85qFh2vJ1PH gNAZFpVjd+YoFLcuEr71VCFUqCMyjnoW/iE+wyWpPT4WrRYo1HOcJsqbGCOSI2NEzSzr aZScwLBPgf6X5gyMOfJKrpqOcgeY21zUGN1C9I2fWxUIKYpp/WEHppA0lokWnaizxCr2 6icw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=d52g3hRZkl/a2eC5lgJWmYH122SOlYvP/ZU+/rzmV+8=; b=TX+7Tz3Xkj/Z9O+nBrBvBVqMvnVga3LkDUcIJHE2/MViMmcO+n1jDtt/VQ4KhwVCfn sHZhe6/oNG5zKOpORVzlldmK2PkzzWZXi/0SCYUETs9RbzbHljZNdI7+jzKpGSzpslrP r7N1JJvY9EOjJ24vPxA4/qn8eQJKnHRcNvJf8yESSdQ3UBieD996LUK68GOGKsrPCAl0 WLFBcWs5iLj8xVRF0qoiBLRKZ0/GEg8QdPPts5pU+Rx8A7Vl/JO78ZjqkplUXmoAY2ff D7Ms78UDQDbybtAvkiI6d52X0PqziXcOSEt2eP2wZdgihxsdsmSQwc+W7ES1MOo1BD/A FIXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=lQ846jgK; 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 f65-20020a623844000000b005a91144267asi745462pfa.247.2023.03.02.17.42.32; Thu, 02 Mar 2023 17:42:45 -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=lQ846jgK; 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 S229957AbjCCBi7 (ORCPT + 99 others); Thu, 2 Mar 2023 20:38:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229950AbjCCBiv (ORCPT ); Thu, 2 Mar 2023 20:38:51 -0500 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3159714221; Thu, 2 Mar 2023 17:38:50 -0800 (PST) X-UUID: 2424b0ccb96411eda06fc9ecc4dadd91-20230303 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=d52g3hRZkl/a2eC5lgJWmYH122SOlYvP/ZU+/rzmV+8=; b=lQ846jgKlZ0WjLrwr6tl0ieoNT7U5vKivqxGQtXHzBvLRgzPYbhw+y/SX0lifug4VnlWWj+DRjNd+GnhYzncBSjH6VUcDEXDHvemo3t55+JcQRkN5ZBmV6cAWxUwrBdOGxtxqBfqmwuk9vkKewlBaFbr3d5fw3RCUcMSN6mexHE=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.20,REQID:af29954f-38c1-4f74-abf0-ee9ab85f64cf,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:25b5999,CLOUDID:e6379bf4-ddba-41c3-91d9-10eeade8eac7,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0 X-CID-BVR: 0 X-UUID: 2424b0ccb96411eda06fc9ecc4dadd91-20230303 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 468382880; Fri, 03 Mar 2023 09:38:47 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Fri, 3 Mar 2023 09:38:46 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.25 via Frontend Transport; Fri, 3 Mar 2023 09:38:46 +0800 From: Allen-KH Cheng To: Mauro Carvalho Chehab , Matthias Brugger , Rob Herring , "Krzysztof Kozlowski" CC: , , , , , , , "Allen-KH Cheng" Subject: [RESEND 4/6] media: dt-bindings: media: mediatek: vcodec: adapt to the 'clock-names' of different platforms Date: Fri, 3 Mar 2023 09:38:40 +0800 Message-ID: <20230303013842.23259-5-allen-kh.cheng@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230303013842.23259-1-allen-kh.cheng@mediatek.com> References: <20230303013842.23259-1-allen-kh.cheng@mediatek.com> MIME-Version: 1.0 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, SPF_PASS,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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759308955167175799?= X-GMAIL-MSGID: =?utf-8?q?1759308955167175799?= From: Yunfei Dong mt8195 and mt8192 have different clock numbers, separate 'clock-names' according to compatible name. Signed-off-by: Yunfei Dong Signed-off-by: Allen-KH Cheng Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai --- .../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 7efc70ae4406..51c0ff7baa52 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: 4 maxItems: 5 clock-names: - items: - - const: sel - - const: soc-vdec - - const: soc-lat - - const: vdec - - const: top + minItems: 4 + maxItems: 5 assigned-clocks: maxItems: 1 @@ -160,6 +157,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: