Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp1266728lqs; Sat, 15 Jun 2024 01:26:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXruW+QikztTBvRNRfNVHWHlisEitNfUpDahqeeN/QHGAku7gtN7AUDvsLFwRNmusH5sHN8a9kDz48Lw5+BiSZjU2/Kdz76fWfzR2ddwQ== X-Google-Smtp-Source: AGHT+IFHQd/2oVap/c2dvzTKKS0uhMOfs3ownqrkoumQCNv8COaoo/Lj6Bx//JykmdkIqrkiMWca X-Received: by 2002:a50:a6d0:0:b0:578:6c08:88fb with SMTP id 4fb4d7f45d1cf-57cbd6839admr3736683a12.12.1718439963830; Sat, 15 Jun 2024 01:26:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718439963; cv=pass; d=google.com; s=arc-20160816; b=0jFQJIZphvL0kkxqoD3OA5QYR5P6Jdm43z6obs0gwpTGYtl+olXLF13swHUP1s3nLm DBhYf30TMWYPyGiqI4Tje11r8CVZGpNGUnier/azOdiw6nhMJXPZSfyLSyez7k/tacqP X8esGUWDhBzZ+EFfL5E2T5AcwNIBobSdZMnR4Ah5sbMz1BguceohTbkgtxqfbcCyQ2iJ gFwXywYA4dlThuDeyXIKaFT3GkYFbLWF25ACNRwa8yUI4fD+ljTowXrxortp9nCeVVr8 8jqt4oKpEHPFNm05+Ai44IwqNo0SypUS6mD7lVESuSr71/O+67SgnbDCQGCoT/cbcLmq y4JQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=EW7jvkwNl5KPdKEMQlw7NNrj1stNAcl0D/1kkAtbX9s=; fh=TCNZ/GcxMWzrOnyCmANFVmx4sQPcMNb9FXNr8UdcVQ4=; b=RGL8hizDvg+UQNBnaiDg85iPnW9tpcsgeFFKk7fKfys1kb04nYN5XHKm03yeEAfd3d nRI+AWVHPkBbzyRC3PpHeuOQDyQA6rdDWRSf1KILtbQa5ZhD9qqg0WbRACxiTHYEITQu 6qVdXJb9PkNgsb5s50ufnUz3/ONscqwuZGffDMtHsCSmsGRcd08ZLWngAE6+ata1DV4J JEb6PqIjZFbGnJ687nljwEfi88D5t3i2M4XUnhsC61fHoliG/RvTFufD9AUCRnfFfWNz nT8wvNRjwRb7RfgBMxnkCS5qbVecEG5xaVbP7zKo1r9rEfiBSNr+7bHm8m5LEFyeIjKz n8Ew==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kwiboo.se header.s=fe-e1b5cab7be header.b=x4pKHQ8x; arc=pass (i=1 spf=pass spfdomain=fe-bounces.kwiboo.se dkim=pass dkdomain=kwiboo.se dmarc=pass fromdomain=kwiboo.se); spf=pass (google.com: domain of linux-kernel+bounces-215787-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215787-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kwiboo.se Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57cb74614b5si2499150a12.565.2024.06.15.01.26.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jun 2024 01:26:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215787-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kwiboo.se header.s=fe-e1b5cab7be header.b=x4pKHQ8x; arc=pass (i=1 spf=pass spfdomain=fe-bounces.kwiboo.se dkim=pass dkdomain=kwiboo.se dmarc=pass fromdomain=kwiboo.se); spf=pass (google.com: domain of linux-kernel+bounces-215787-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215787-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kwiboo.se Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8C57A1F21123 for ; Sat, 15 Jun 2024 08:26:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E6DF1B5AA; Sat, 15 Jun 2024 08:25:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kwiboo.se header.i=@kwiboo.se header.b="x4pKHQ8x" Received: from smtp.forwardemail.net (smtp.forwardemail.net [149.28.215.223]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D6FBE17BD6 for ; Sat, 15 Jun 2024 08:25:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=149.28.215.223 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718439955; cv=none; b=Npwe6CNt58xkdaSVfhZScMG3AoEgPJGD+TIHz8KlsxZP27jSzN1F1Ab87O/FiDDqgVVmqlobvfLCV6xY2m8Bzo/3ApViULguKYjhq8ScgfH331RCe7P6IAmjNqE69TF90s32CARf4/mB6ZegJSIp3q2TAodJ0tqTsgk+8rp514I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718439955; c=relaxed/simple; bh=RPVnhJfAcbOnu/iAuVsxIQIuS1yChCUbf4uGbhv50aI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=gTL9EvzVVS2FrIPOf/jEGsllidtSVHYn21Uuz9r/RMIm1qzIBeYuq3VKbOnNwEXAE7yJC+xb5mUJ4iv8XDAWXgXewUvFOigDciKxDSFahkgOXGWIPggxjCHJFVAcAStSB7WoomR3kDGoJC6YV9ijXb+oIS6P8Yf9rxDDT6olwPY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kwiboo.se; spf=pass smtp.mailfrom=fe-bounces.kwiboo.se; dkim=pass (2048-bit key) header.d=kwiboo.se header.i=@kwiboo.se header.b=x4pKHQ8x; arc=none smtp.client-ip=149.28.215.223 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kwiboo.se Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fe-bounces.kwiboo.se DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: From: References: Cc: To: Subject: MIME-Version: Date: Message-ID; q=dns/txt; s=fe-e1b5cab7be; t=1718439934; bh=EW7jvkwNl5KPdKEMQlw7NNrj1stNAcl0D/1kkAtbX9s=; b=x4pKHQ8xY4jG2m4ai/rW5ZXbsDn3QBmtALJi+WiuR4Fz4Weyu0kuskrVNAsce9CQ4pgLgcBmp JnXriXcuP18dwwfs2e51uanLqxEFSxN0U26zVBFTa6tY5BIIu5BhJnU2CbhuRr2HHwIOnFrwR28 ZJL3Cm/zmz7mraYUKnVelMcRnC3iJAGPXtfBTasiPYn3ntsqo8CSLDukQ+rw+j0C++dF4NDPV9w eK5t9JKqMkx1P7rw36uqM8YNKgZ6fYadat6ssaWIM4F8bQrsxgnaC/eU4O3M0Rc3GgR6mjmYTnG 1pj/NnJbD5j8U3iCSi/05NhRobCfDSHDfDhe9Zt0knvA== Message-ID: <944c4296-8dd2-4ffd-b430-1839ff3a3ed2@kwiboo.se> Date: Sat, 15 Jun 2024 10:25:27 +0200 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 3/3] arm64: dts: rockchip: Add rkvdec2 Video Decoder on rk3588(s) To: Detlev Casanova Cc: linux-kernel@vger.kernel.org, Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , "Greg Kroah-Hartman" , Sebastian Reichel , Dragan Simic , Alexey Charkov , Cristian Ciocaltea , Diederik de Haas , Andy Yan , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-staging@lists.linux.dev References: <20240615015734.1612108-1-detlev.casanova@collabora.com> <20240615015734.1612108-4-detlev.casanova@collabora.com> Content-Language: en-US From: Jonas Karlman In-Reply-To: <20240615015734.1612108-4-detlev.casanova@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Report-Abuse-To: abuse@forwardemail.net X-Report-Abuse: abuse@forwardemail.net X-Complaints-To: abuse@forwardemail.net X-ForwardEmail-Version: 0.4.40 X-ForwardEmail-Sender: rfc822; jonas@kwiboo.se, smtp.forwardemail.net, 149.28.215.223 X-ForwardEmail-ID: 666d4ffdb23880544d1f1533 Hi Detlev, On 2024-06-15 03:56, Detlev Casanova wrote: > Add the rkvdec2 Video Decoder to the RK3588s devicetree. > > Signed-off-by: Detlev Casanova > --- > .../boot/dts/rockchip/rk3588-rock-5b.dts | 4 ++++ > .../boot/dts/rockchip/rk3588s-orangepi-5.dts | 4 ++++ > arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 19 +++++++++++++++++++ > 3 files changed, 27 insertions(+) > > diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts > index c551b676860c..965322c24a65 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts > +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts > @@ -503,6 +503,10 @@ &pwm1 { > status = "okay"; > }; > > +&rkvdec0 { > + status = "okay"; > +}; Enable of rkvdec0 should probably be split out from the patch that adds the rkvdec0 node to soc dtsi. Also why is rkvdec0 only enabled on rock-5b and orangepi-5? > + > &saradc { > vref-supply = <&avcc_1v8_s0>; > status = "okay"; > diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts > index feea6b20a6bf..2828fb4c182a 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts > +++ b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts > @@ -321,6 +321,10 @@ typec5v_pwren: typec5v-pwren { > }; > }; > > +&rkvdec0 { > + status = "okay"; > +}; > + > &saradc { > vref-supply = <&avcc_1v8_s0>; > status = "okay"; > diff --git a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi > index 0fecbf46e127..09672636dcea 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi > +++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi > @@ -3034,6 +3034,9 @@ system_sram2: sram@ff001000 { > ranges = <0x0 0x0 0xff001000 0xef000>; > #address-cells = <1>; > #size-cells = <1>; Blank line is missing. > + rkvdec0_sram: rkvdec-sram@0 { > + reg = <0x0 0x78000>; > + }; > }; > > pinctrl: pinctrl { > @@ -3103,6 +3106,22 @@ gpio4: gpio@fec50000 { > #interrupt-cells = <2>; > }; > }; > + > + rkvdec0: video-decoder@fdc38100 { > + compatible = "rockchip,rk3588-vdec2"; > + reg = <0x0 0xfdc38100 0x0 0x500>; > + interrupts = ; > + clocks = <&cru ACLK_RKVDEC0>, <&cru HCLK_RKVDEC0>, <&cru CLK_RKVDEC0_CORE>, > + <&cru CLK_RKVDEC0_CA>, <&cru CLK_RKVDEC0_HEVC_CA>; > + clock-names = "axi", "ahb", "core", > + "cabac", "hevc_cabac"; > + assigned-clocks = <&cru ACLK_RKVDEC0>, <&cru CLK_RKVDEC0_CORE>, > + <&cru CLK_RKVDEC0_CA>, <&cru CLK_RKVDEC0_HEVC_CA>; > + assigned-clock-rates = <800000000>, <600000000>, > + <600000000>, <1000000000>; > + power-domains = <&power RK3588_PD_RKVDEC0>; iommus and resets should probably be added. > + status = "disabled"; > + }; The iommu node for rkvdec0_mmu seem to be missing, is it not required to be able to use memory >4GiB as decoding buffers? I would also consider adding the rkvdec1 node(s), if I am understanding correctly they can both be used in a cluster or completely independent. Also on RK3582/RK3583 one (or both) of the decoder cores may be marked as bad, yet the remaining one can still be used independently. The idea will be that bootloader fixup the DT and disabled/delete-node the bad core(s). Regards, Jonas > }; > > #include "rk3588s-pinctrl.dtsi"