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 56E9A3B8D53; Wed, 25 Feb 2026 14:11:23 +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=1772028684; cv=none; b=G12dwS57p7SEvGnsHpRAdrDlDhbrnsUTgNS9LM58/85orQH7BhPO8sylatYhK0RqeoZEct1okkY52IdX+GqqCYquhhE/IgfrdWEBVLxdljVrNt0lCeTrOnyP+idrOr3EEyUt4nqDq20W8Sz+0nK+C4RcKo6KFsTpR1OgsrVDDPs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772028684; c=relaxed/simple; bh=SjklxF5P1ukWq1BdzFbfzWWtsg3DlSbDa9GVYCTfBao=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=SPBTO3Tt5fk7LugNPUwnGF/Bmn87CguPAf2fAKAnkP8gTa6q9bcr62h/dYapuWGyhdKl0wnDiyxSeWmietx+zQextfamRH13l/a7gpV8o2j5ACzfaW3vZrRN23mpHqTa56LIRwMHdC5IvXZRvC/tqTpY0MX+fNBCESwMRIVeBpc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=B3ivDnBn; 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="B3ivDnBn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C094C2BC86; Wed, 25 Feb 2026 14:11:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772028683; bh=SjklxF5P1ukWq1BdzFbfzWWtsg3DlSbDa9GVYCTfBao=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=B3ivDnBnOfYCqWXOyOu+/9HdePS1rKGtYvm03h40GTUFPLcP2JpCzl2IQ1ByV0DwE Z7+ITwCMl2tD4W57SVN9g1RujPJIx6cyy/NwFhM0gomZcQ4vrMfzHuJDa6rFGQ55Cd rmkIOeo5l0cy8isgwOJ0GMwOvMoEXQLCJWZ2BEioD5AtCyIRQYj83/9d+Gqg6YcL4H D0oEkp9azfV0rCPDmuV9Vo4TcWYve+f0CnvgssNeBaPTv35f+79+PP467+orGSZOmQ b2idEes6l5kywJrNei3PLGIcH3L2cR5p/8o+eJU0rZAfiwJEDe2BjLgstjmAro4svs R2DBFCUDzNW+g== Message-ID: <85793250-425d-40da-b382-ada9fc7b50e1@kernel.org> Date: Wed, 25 Feb 2026 15:11:18 +0100 Precedence: bulk X-Mailing-List: linux-kernel@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} 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> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.org; keydata= xsF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oDcsQWXqY+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: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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? We always expect the list to grow, to have common set. That's rule given during reviews multiple times. For multiple reasons, also explained (consistency, maintenance and actually proper description of hardware like the main reg address space). Probably this was also given to that binding during discussions when it was upstream, so your change reverts previous discussion and to that I do not agree. Best regards, Krzysztof