Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7473159rwd; Tue, 20 Jun 2023 01:32:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6s88z00O2pgIeCHWTCyJ1nAV8aaj4XhzNy39sezUeQvukM1kpXedZzbpKfUi7CSyxU/0ix X-Received: by 2002:a17:90b:d89:b0:25e:8501:6662 with SMTP id bg9-20020a17090b0d8900b0025e85016662mr22811056pjb.7.1687249956610; Tue, 20 Jun 2023 01:32:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687249956; cv=none; d=google.com; s=arc-20160816; b=HuGOmPxLia3q0ueTprNYqtaVYnYkQL3y2VmhRGlTwfxtoo63OzLw65d0NMQp/NIc5t ukAa2u3LLI0fNUnvrPWVufjQJfJSQj7RBeKqp+DdKpDwy0KDuC5JoVRGNIY54Y6qeuU9 Ca27R1V1srL7v0XLN0y0lqiLKrIy/Rb9RrNQSbptZ5ZNEGNSXD7CgyrOd2oYxe4OtRMe Wiq/N6VE6OE69FiwOdIWTeu3VxLIGV92cwd40rUobiojhjgtw3BaoXfCkOli0qVuyAUL 3ETb9piN1lyiODbrUBN7P5jUatK1Mn8DHeaAqnIMbuoT+RIEqRs4DPGDOSfZqnqKqkws MhGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=2KRzE3IxHv0D72WxLTYYk5f9VrvCEP7kc7aTHTFKOSI=; b=ooKiqfXhzGNBrJcRaCqTDUxmKTBEhcnbgO20fgNo/0Y4FLZhaRr7b/jTXzYlSlp+kl R9oMYc9sGO4xxWFLw1jG4fdBq1vyZtfc5yTUNCa4bFTIx9vAENl1xclNl4h+W80npMSx W4aOIedgJZU+E6trIhqB8BX0V83zRa2ovLSDNIJkl9oIrnKPj3DiHC7Si8JuO7nzETAX GZn7IyxOSpQTB/49jC8DsQxsqw1KgdsMFbWhydpB3gUDzNnYz4USbaeidVziWYn3VT+Z UpFSBGhlqE8qdq/Wbcvdwjnmh9NNHG5w4Qfxi5yi/466m/qoCMwiMApX1zFYF1LA08d5 EWtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qNDBWvbu; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h2-20020a633842000000b005347d6bd7eesi1248975pgn.141.2023.06.20.01.32.22; Tue, 20 Jun 2023 01:32:36 -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=@linaro.org header.s=google header.b=qNDBWvbu; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231803AbjFTIMU (ORCPT + 99 others); Tue, 20 Jun 2023 04:12:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231398AbjFTIMT (ORCPT ); Tue, 20 Jun 2023 04:12:19 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1229A186 for ; Tue, 20 Jun 2023 01:12:18 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3f901f87195so23926975e9.1 for ; Tue, 20 Jun 2023 01:12:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687248736; x=1689840736; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=2KRzE3IxHv0D72WxLTYYk5f9VrvCEP7kc7aTHTFKOSI=; b=qNDBWvbudemDgPmOjnbu080AyvX8nOks7ZLsys7A4wfr+7VWtU26irPr90roJ30HcM GbWu6dlSkQX77ZWpwWA6jSUeISJ5jxEs82+08vFEDzk/hN4oQH0/mwyq+ziJq0FQkNGw Of+e9HOUY/sUl8Iz/A3o4o1oLV4BiWQuXJfHcdvg5tdRXDQK8bMhoE7yov2rYSvKQHY8 78+Q9+bHG3srLrD1hF2i9ACQ0zFDUoQkYbylSUsxNrCWRVXmTLCgu+shGZgrFTWZ8L3k 2KRrwrLEVI8z927SBQ1RfzUkCRmOL8DEN9j29rrbw0vzH+nP1nIqQDn1JdQnxo54UgIB xt2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687248736; x=1689840736; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2KRzE3IxHv0D72WxLTYYk5f9VrvCEP7kc7aTHTFKOSI=; b=gAOHNSIHAxhVkJQpPD0LdX2HDgNjXek86oMuF8XS8O+xLp8rucFSLpPk6oJspOWngi +4SK/icc721zYpJF547ssiL9Za5exLKyHMKbZMWexE3qStEAufhRN2yy5xv16E1uv+4Q Ey4MUJkuWpxWAWej4smXXTgCaQGrftpDPjXNUwqBnnO5Dhv9S3S25RGKfsopItliUKtK dqZVN4Kmcx/eSWBLzFN9/7ubNXe+UXAUgtOS+c7/cIeIcyTjwiOcbWz0eLbiyPohfAh2 ilDiTcCrQWUOfnnE5Kq37aPvQtGDXBa7hynGYFYaf8lVjcsGa6oWNVeivB8Y/K8a5dPJ KxJg== X-Gm-Message-State: AC+VfDzHDR+JMhybgAYXlCorc8dD8xo7a7oHS2CMwIUjEXw5WHnZ+xWV 2F2fyEmMD1cuBvO7QJYtflEIFg== X-Received: by 2002:a7b:c450:0:b0:3f7:367a:bd28 with SMTP id l16-20020a7bc450000000b003f7367abd28mr10053356wmi.4.1687248736480; Tue, 20 Jun 2023 01:12:16 -0700 (PDT) Received: from [192.168.1.20] ([178.197.219.26]) by smtp.gmail.com with ESMTPSA id p25-20020a1c7419000000b003f8fac0ad4bsm1674906wmc.17.2023.06.20.01.12.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Jun 2023 01:12:16 -0700 (PDT) Message-ID: <8b5e4a9b-7496-02a1-d3b6-a0be8ea85798@linaro.org> Date: Tue, 20 Jun 2023 10:12:14 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v3 3/6] media: dt-bindings: mediatek,vcodec: Remove VDEC_SYS for mt8183 Content-Language: en-US To: =?UTF-8?B?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Matthias Brugger , Hans Verkuil Cc: AngeloGioacchino Del Regno , kernel@collabora.com, 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 References: <20230620000349.2122191-1-nfraprado@collabora.com> <20230620000349.2122191-4-nfraprado@collabora.com> From: Krzysztof Kozlowski In-Reply-To: <20230620000349.2122191-4-nfraprado@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On 20/06/2023 02:03, NĂ­colas F. R. A. Prado wrote: > 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 hardware controlled clock, remove > the VDEC_SYS register space from the binding and describe an extra > syscon 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 > > --- > I dropped the tags from this commit since a syscon is now used instead > of an extra clock. > > Changes in v3: > - Removed the active clock > - Added a mediatek,vdecsys syscon property > > Changes in v2: > - Merged with patch 1 (media: dt-bindings: mediatek,vcodec: Allow single > clock for mt8183) to avoid changing number of clocks twice > - Added maxItems to reg-names > - Constrained clocks for each compatible > - Reordered properties for each compatible > > .../media/mediatek,vcodec-decoder.yaml | 30 +++++++++++++++++++ > 1 file changed, 30 insertions(+) > > diff --git a/Documentation/devicetree/bindings/media/mediatek,vcodec-decoder.yaml b/Documentation/devicetree/bindings/media/mediatek,vcodec-decoder.yaml > index 1e56ece44aee..2f625c50bbfe 100644 > --- a/Documentation/devicetree/bindings/media/mediatek,vcodec-decoder.yaml > +++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-decoder.yaml > @@ -21,8 +21,13 @@ properties: > - mediatek,mt8183-vcodec-dec > > reg: > + minItems: 11 > maxItems: 12 > > + reg-names: > + minItems: 11 > + maxItems: 11 maxItems: 12 > + > interrupts: > maxItems: 1 > > @@ -60,6 +65,10 @@ properties: > description: > Describes point to scp. > > + mediatek,vdecsys: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: Phandle to the vdecsys syscon node. > + > required: > - compatible > - reg > @@ -79,8 +88,26 @@ allOf: > then: > required: > - mediatek,scp > + - mediatek,vdecsys > > properties: > + 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 > + > clocks: > minItems: 1 > maxItems: 1 > @@ -101,6 +128,9 @@ allOf: > - mediatek,vpu > > properties: > + reg: > + minItems: 12 What about reg-names here? They should be also defined and in sync with regs. Best regards, Krzysztof