From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 93EBA3D349E; Wed, 25 Feb 2026 14:27:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772029658; cv=none; b=fFaW042HTDeaznIfF1COqEyehTQpDyzKwqmMauC3w15kAe75MvHTZ4GA3amXXEjpN1NZJlwnHYhKxTiidI3Oc/AW2VUNFVHo8Ilku1z0UbZvlhmH1KGa+SFzbp9Qeo4Me7WLUde7Dbd3dgI8/KUQGYEXGZ4si9xtnTjwQAaxtMc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772029658; c=relaxed/simple; bh=U9E2ZLZ0JLTenLJ3Y/BpGghxxT+1M6o7BfxH/hbK7+Y=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=nr+fr+uvQL1W/k8CzpxRkkpqdDnhcZBhHhe5Rkk6yYEba5ks41gowsonXQLB+EoqGTNaxlYvbMIdOkeSemmJvV7CED5zAi+vGA08cUDYeq9iF58nkcn/yOTxjINsvIAn+L2fszlot5nuUIytiWbkOqTQ1EIpzAvyTSn9hkLRKFE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Bx31QDeC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Bx31QDeC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B86ECC116D0; Wed, 25 Feb 2026 14:27:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772029658; bh=U9E2ZLZ0JLTenLJ3Y/BpGghxxT+1M6o7BfxH/hbK7+Y=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=Bx31QDeCwTuAv0aIQC96Gk1GVeLTBS/5yg+8jPkfcS6e3IMl75T4NlxJ9G0tryUnN IwmSR2rhnZlVpi+VkmtVWjkx4gzFs89OMpzBIsLk+CUBSRt60CZOz5jkucToy+6Sy5 7Z1DuPVuIRdvs6+DkD57hD3DGA4lBu8w5RUi08PhT/KC36hxERT9AY49nRZhUNY74E dFiNO6MTyDJV36oCsckH8LDrJuPy5CAqFWm37LxF741OCI3k0rNhjuDk0U1hOsozit CUDNjbCW43/zEuIr97h/ZIiTlqJgnGf2zej+VK1OiDdgff9TGrhbDjdaxhRvu8cIpu NYdsnDPkkZKcA== Message-ID: Date: Wed, 25 Feb 2026 15:27:32 +0100 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 1/3] media: dt-bindings: rockchip,vdec: Add alternative reg-names order for RK35{76,88} From: Krzysztof Kozlowski To: Cristian Ciocaltea , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Detlev Casanova , Ezequiel Garcia , Mauro Carvalho Chehab , Nicolas Dufresne , Hans Verkuil Cc: kernel@collabora.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Conor Dooley , linux-media@vger.kernel.org References: <20260225-vdec-reg-order-rk3576-v3-0-5a2ebe1b11a8@collabora.com> <20260225-vdec-reg-order-rk3576-v3-1-5a2ebe1b11a8@collabora.com> <9bb74438-e759-46a7-9fa1-2c6b1fced76b@kernel.org> <85793250-425d-40da-b382-ada9fc7b50e1@kernel.org> Content-Language: en-US Autocrypt: addr=krzk@kern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vl3VBHIsBv0oDcsQWXqY+NaFahT0lRPjYtrTa1v3tem/ JoFzZ4B0p27K+qQCF2R96hVvuEyjzBmdq2esyE6zIqftdo4MOJho8uctOiWbwNNq2U9pPWmu 4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB YpsFAmgXUF8FCRaWWyoACgkQG5NDfTtBYptO0w//dlXJs5/42hAXKsk+PDg3wyEFb4NpyA1v qmx7SfAzk9Hf6lWwU1O6AbqNMbh6PjEwadKUk1m04S7EjdQLsj/MBSgoQtCT3MDmWUUtHZd5 RYIPnPq3WVB47GtuO6/u375tsxhtf7vt95QSYJwCB+ZUgo4T+FV4hquZ4AsRkbgavtIzQisg Dgv76tnEv3YHV8Jn9mi/Bu0FURF+5kpdMfgo1sq6RXNQ//TVf8yFgRtTUdXxW/qHjlYURrm2 H4kutobVEIxiyu6m05q3e9eZB/TaMMNVORx+1kM3j7f0rwtEYUFzY1ygQfpcMDPl7pRYoJjB dSsm0ZuzDaCwaxg2t8hqQJBzJCezTOIkjHUsWAK+tEbU4Z4SnNpCyM3fBqsgYdJxjyC/tWVT AQ18NRLtPw7tK1rdcwCl0GFQHwSwk5pDpz1NH40e6lU+NcXSeiqkDDRkHlftKPV/dV+lQXiu jWt87ecuHlpL3uuQ0ZZNWqHgZoQLXoqC2ZV5KrtKWb/jyiFX/sxSrodALf0zf+tfHv0FZWT2 zHjUqd0t4njD/UOsuIMOQn4Ig0SdivYPfZukb5cdasKJukG1NOpbW7yRNivaCnfZz6dTawXw XRIV/KDsHQiyVxKvN73bThKhONkcX2LWuD928tAR6XMM2G5ovxLe09vuOzzfTWQDsm++9UKF a/A= In-Reply-To: <85793250-425d-40da-b382-ada9fc7b50e1@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 25/02/2026 15:11, Krzysztof Kozlowski wrote: > On 25/02/2026 14:36, Cristian Ciocaltea wrote: >> On 2/25/26 2:26 PM, Krzysztof Kozlowski wrote: >>> On 25/02/2026 13:19, Cristian Ciocaltea wrote: >>>> With the introduction of the RK3588 SoC, and RK3576 afterwards, the >>>> 'link' and 'cache' register blocks have been provided for the video >>>> decoder unit in addition to the existing 'function' one, which now shows >>>> up in between them (from address-based ordering point of view). >>>> >>>> However, the binding does not properly describe this hardware layout, as >>>> the new blocks are listed after the old one. Therefore it breaks the >>>> convention expecting the unit address to indicate the first register >>>> range. >>>> >>>> Since the binding changes have been already released and a fix would >>>> bring up an ABI break, mark the current 'reg-names' listing as >>>> deprecated and introduce an alternative 'link,function,cache' one. >>>> >>>> Additionally, drop the 'reg' description items as the order is not fixed >>>> anymore, while the information they offer is not very relevant anyway. >>>> >>>> Signed-off-by: Cristian Ciocaltea >>>> --- >>>> .../devicetree/bindings/media/rockchip,vdec.yaml | 19 ++++++++++++------- >>>> 1 file changed, 12 insertions(+), 7 deletions(-) >>>> >>>> diff --git a/Documentation/devicetree/bindings/media/rockchip,vdec.yaml b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml >>>> index 809fda45b3bd..3f6072e8baa5 100644 >>>> --- a/Documentation/devicetree/bindings/media/rockchip,vdec.yaml >>>> +++ b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml >>>> @@ -28,16 +28,21 @@ properties: >>>> >>>> reg: >>>> minItems: 1 >>>> - items: >>>> - - description: The function configuration registers base >>>> - - description: The link table configuration registers base >>>> - - description: The cache configuration registers base >>>> + maxItems: 3 >>>> >>>> reg-names: >>>> - items: >>>> + oneOf: >>>> - const: function >>> >>> This is confusing, I think I missed that in previous patch because it >>> did not leave that part or I misread the diff hunk - why do you allow >>> one entry? >> >> That's for the older SoCs, e.g. RK3288, RK3399, as the 'link' and 'cache' blocks >> are only available for RK3576 & RK3588. > > Yeah, I see in the bottom of the binding > >> >>> >>> If the first entry is function, then all others MUST built on top, thus >>> this: >>> >>>> + - const: link >>>> + - const: function >>>> + - const: cache >>> >>> is not correct. >>> >>> No, you don't change the orders. So again, if you have such binding, >>> then you just fix the unit address leaving the binding as is. >> >> Changing the unit address would mean it will point inside the register range, >> rather than at the beginning of it. > > First, not true. If this was one register range, you would have one > entry. You cannot split entries. Split entries means you have two > SEPARATE register ranges. > Second, it does not matter because main rule stays - the unit address > describes the main address space. The main address space in other device > was called "function", so I assume the main address space is also here > the "function". Which makes sense, because link feels secondary to > functioning of the device. > >> >> Sorry, but I don't quite get why would this be a better approach than just >> properly list the items according to the HW layout, i.e. following the >> address-based ordering? One more comment here, actually repeating Rob, because this awfully reminds me discussions with Linaro folks around media/iris/camss where they came with terrible idea of sorting everything by value (reg+clocks+interrupts) - because binding does not know anything about addresses, thus you cannot sort/order this list in the binding by address. There is simple no "key" to sort with. Best regards, Krzysztof