Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5886920rwd; Mon, 5 Jun 2023 09:50:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7CAVh+fXmzRd3Nn4YWEhaFGQsg1WQ20V4HC2Ew7dbNruTv5np/RDviiJ/xrOJhz3v8U3MX X-Received: by 2002:a05:6a20:1610:b0:10c:3cf3:ef91 with SMTP id l16-20020a056a20161000b0010c3cf3ef91mr2724467pzj.4.1685983810027; Mon, 05 Jun 2023 09:50:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685983810; cv=none; d=google.com; s=arc-20160816; b=mYMEjHlPiygpSo+ECROTE9Xmm7zSNtENkXvT+uNA0kpILkyc7jTCbNtCO7gzZKfDz2 uVJND1qz8PwhXJv36c8RxcE1zd2TdAu+29g/EIUdTYpDyDaNGRy1/tyC4MaectcH3xQd 3TkbwJauQjYg5jjcCaSXM0XBa6UEwHHf67lAav02OndAhqLpzCnTr8UST07yeGR39ZdP +HtS+Ojk8MCWKTqhhPtXHqCR3DJ8VeyAPVIbbPv44IDeSknlm5Vez2WnLThGSHfek499 qheAuxJl5QUj48jRLV18taHhuCNUT+Qbb0wTvVMTCvsRGtBudNJgMM1Cot+lXvJuAfsr JrFQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=N0AzILRftCsPd11y2thIXKDh5eNvFQizGaGCUsqmtIU=; b=M4reISHxGig4RHApbg6RbM006M6fFzRGXU/tpaUe9MR6AVZTPls1H6A1VVNhLN1bz3 nrNzPeyky5RjW63p5Agtz77C4wbb2N1zrhT89P3Du1KXyEMRrev5+ypxQAXGzXU/TMQI yB7w6E7U70BnEEFIszxgtVqS7AcOfLuLpVMgwEj8eRQLZk4u5YRIDlv6n1wBilQf/Y/t 9ZbBl7PLcJhfoBZEtJb9weFF8d+owX0KyojMM0b3/vXWw6IGGdnF2D6ImkiNcHoWoaqK /PizPOPBngsIAko+KQlGgIbVj2r1PClD7he4axteoPa5hj5UAlJUGHf8VBL+pWfmqhGc 7FjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=WjIsU6PB; 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=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 19-20020a631753000000b0053b62724848si5601437pgx.679.2023.06.05.09.49.53; Mon, 05 Jun 2023 09:50:09 -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=@collabora.com header.s=mail header.b=WjIsU6PB; 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234793AbjFEQVk (ORCPT + 99 others); Mon, 5 Jun 2023 12:21:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234668AbjFEQVd (ORCPT ); Mon, 5 Jun 2023 12:21:33 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B131EA; Mon, 5 Jun 2023 09:21:32 -0700 (PDT) Received: from notapiano.myfiosgateway.com (zone.collabora.co.uk [167.235.23.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id DB2896606E8F; Mon, 5 Jun 2023 17:21:28 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1685982091; bh=FBxkyNk+wH42mt6PnhdzeId5YI52PJ33/87A7v+PAUw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WjIsU6PBPQljs3cQ78Cgl3WM66ZSuCLbOq5VIHZioKLnkOeABvFutQ6grd6TD3vk6 xwjYiWrpsAji/CfOAUSGybbUcMMOXplj4rqdJ8sfCb6ffrbnirCMI4MerrgFD5jKjw R6GPE3W/yPlYSYJhRtYvny8+cT/IM43tkOB7k/mbchRqjvZbU6fniXBFC2XIwEhrHE 2xGvvoWP/OfQ38BUzu45bjim1SUxYND4Ka1yH7NRYhoFlKsjwZ+N0c7iHMES046Aj+ jWOHzBtjIcCfJkrOBXTCJg/plkgykkiy98zFO2JDGnocRCaCYWozJwBeyI8FxUjZCQ 294Sym1jSsP5Q== From: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= To: Matthias Brugger , Hans Verkuil Cc: AngeloGioacchino Del Regno , kernel@collabora.com, =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , Andrew-CT Chen , Conor Dooley , Krzysztof Kozlowski , Mauro Carvalho Chehab , Rob Herring , Tiffany Lin , Yunfei Dong , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH 3/6] media: dt-bindings: mediatek,vcodec: Remove VDEC_SYS for mt8183 Date: Mon, 5 Jun 2023 12:20:27 -0400 Message-Id: <20230605162030.274395-4-nfraprado@collabora.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230605162030.274395-1-nfraprado@collabora.com> References: <20230605162030.274395-1-nfraprado@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 The binding expects the first register space to be VDEC_SYS. But on mt8183, which uses the stateless decoders, this space is used only for controlling clocks and resets, which are better described as separate clock-controller and reset-controller nodes. In fact, in mt8173's devicetree there are already such separate clock-controller nodes, which cause duplicate addresses between the vdecsys node and the vcodec node. But for this SoC, since the stateful decoder code makes other uses of the VDEC_SYS register space, it's not straightforward to remove it. In order to avoid the same address conflict to happen on mt8183, since the only current use of the VDEC_SYS register space in the driver is to read the status of a clock that indicates the hardware is active, remove the VDEC_SYS register space from the binding and describe an extra clock that will be used to directly check the hardware status. Also add reg-names to be able to tell that this new register schema is used, so the driver can keep backward compatibility. Signed-off-by: NĂ­colas F. R. A. Prado --- .../media/mediatek,vcodec-decoder.yaml | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/media/mediatek,vcodec-decoder.yaml b/Documentation/devicetree/bindings/media/mediatek,vcodec-decoder.yaml index 6447e6c86f29..36a53b2484d6 100644 --- a/Documentation/devicetree/bindings/media/mediatek,vcodec-decoder.yaml +++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-decoder.yaml @@ -21,17 +21,21 @@ properties: - mediatek,mt8183-vcodec-dec reg: + minItems: 11 maxItems: 12 + reg-names: + minItems: 11 + interrupts: maxItems: 1 clocks: - minItems: 1 + minItems: 2 maxItems: 8 clock-names: - minItems: 1 + minItems: 2 maxItems: 8 assigned-clocks: true @@ -84,6 +88,24 @@ allOf: clock-names: items: - const: vdec + - const: active + + reg: + maxItems: 11 + + reg-names: + items: + - const: misc + - const: ld + - const: top + - const: cm + - const: ad + - const: av + - const: pp + - const: hwd + - const: hwq + - const: hwb + - const: hwg - if: properties: @@ -108,6 +130,9 @@ allOf: - const: venc_lt_sel - const: vdec_bus_clk_src + reg: + minItems: 12 + additionalProperties: false examples: -- 2.40.1