From patchwork Fri Apr 12 15:15:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emmanuel Gil Peyrot X-Patchwork-Id: 788502 Received: from luna.linkmauve.fr (luna.linkmauve.fr [82.65.109.163]) (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 E230C149C4D; Fri, 12 Apr 2024 15:15:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=82.65.109.163 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712934920; cv=none; b=b5AwX/3XHmClXtFs0K1CniBitO6TnQU56KLUPCU2jtkgttsk7Z542QT65nCVTyxtDm+fhrPDDx2FC41otthBmfqXU2qtTxc3KalvB2bcY4M5w7IowIbwrQoBT2qxHN3L02BIXWXktvyvTP/FqMzPVLE7F1XG6yLTkY0/01gpUuQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712934920; c=relaxed/simple; bh=J1jG4kj0aYZKcUmMvtYUKNLJlJWsegdKYmIoMD1fTS8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=p2pXpr/SW6mpEG2VEroTsCyc877Vw+cbXi4KMOhkq2M2XrYMaYNAE8U3QM7czNkb09Ky0MkuAecLe/x90nNkdW+S4x05nq91JxcRJ10YRtOlNJjAAn6KY7PhUMobQFjpSb+No1WIPvHz274jmk8Z3+FkahXOz4sLAkF/gGjy6gg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linkmauve.fr; spf=pass smtp.mailfrom=linkmauve.fr; arc=none smtp.client-ip=82.65.109.163 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linkmauve.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linkmauve.fr Received: by luna.linkmauve.fr (Postfix, from userid 1000) id 73A2C10A2675; Fri, 12 Apr 2024 17:15:17 +0200 (CEST) From: Emmanuel Gil Peyrot To: linux-kernel@vger.kernel.org Cc: Emmanuel Gil Peyrot , Ezequiel Garcia , Philipp Zabel , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Joerg Roedel , Will Deacon , Robin Murphy , Sebastian Reichel , Cristian Ciocaltea , Dragan Simic , Shreeya Patel , Chris Morgan , Andy Yan , Nicolas Frattaroli , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev Subject: [PATCH v3 1/2] =?utf-8?q?media=3A_dt-binding=3A_media=3A_Document_r?= =?utf-8?q?k3588=E2=80=99s_VEPU121?= Date: Fri, 12 Apr 2024 17:15:10 +0200 Message-ID: <20240412151515.837824-2-linkmauve@linkmauve.fr> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240412151515.837824-1-linkmauve@linkmauve.fr> References: <20240412151515.837824-1-linkmauve@linkmauve.fr> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This encoder-only device is present four times on this SoC, and should support everything the rk3568 vepu supports (so JPEG, H.264 and VP8 encoding). According to the TRM[1], there is also the VEPU580 encoder which supports H.264 and H.265, and various VDPU* decoders, of which only the VDPU981 is currently supported. This patch describes only the VEPU121. [1] https://github.com/FanX-Tek/rk3588-TRM-and-Datasheet Signed-off-by: Emmanuel Gil Peyrot --- .../devicetree/bindings/media/rockchip,rk3568-vepu.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/media/rockchip,rk3568-vepu.yaml b/Documentation/devicetree/bindings/media/rockchip,rk3568-vepu.yaml index 9d90d8d0565a..4c6cb21da041 100644 --- a/Documentation/devicetree/bindings/media/rockchip,rk3568-vepu.yaml +++ b/Documentation/devicetree/bindings/media/rockchip,rk3568-vepu.yaml @@ -15,8 +15,12 @@ description: properties: compatible: - enum: - - rockchip,rk3568-vepu + oneOf: + - const: rockchip,rk3568-vepu + - items: + - enum: + - rockchip,rk3588-vepu121 + - const: rockchip,rk3568-vepu reg: maxItems: 1 From patchwork Fri Apr 12 15:15:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emmanuel Gil Peyrot X-Patchwork-Id: 788683 Received: from luna.linkmauve.fr (luna.linkmauve.fr [82.65.109.163]) (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 E224A1474B3; Fri, 12 Apr 2024 15:15:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=82.65.109.163 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712934920; cv=none; b=O5f7jQ0St3oFCKJQjWe6LVp0qn8mNN6lvuZdntaX0sBFxZaa5ymF8Anxhr8lZlC8ql2bIAtHAV2wvPkTzIRekj8RVLUB2z/XqQiKGo3yWD1am5xR2Q5vUolsL7PGtwN332tHkd8i5sXdZvF1M6/CeX5fyUQEAIRKntfMKc9h2wc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712934920; c=relaxed/simple; bh=khnIpkn4yrHxzU3ugFrDelJTUu9XiJ/2d4EE3ztbAUQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jfk6bsDcmNThySM39huZuLoEMhQ+H2OBAL82aw/IeTBA+dQCq55zBHJuwf2GmWssQtASDM3mQudvP0vmN0Q9lbQaVReR/UhzVVr73o5H6jgMdY7XeoMkH4kxuhFgA+ivuyWqau92tlUU9x69GS7SG/3k4CiT95S/FnDIS3XkhB4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linkmauve.fr; spf=pass smtp.mailfrom=linkmauve.fr; arc=none smtp.client-ip=82.65.109.163 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linkmauve.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linkmauve.fr Received: by luna.linkmauve.fr (Postfix, from userid 1000) id 7773A10A2677; Fri, 12 Apr 2024 17:15:17 +0200 (CEST) From: Emmanuel Gil Peyrot To: linux-kernel@vger.kernel.org Cc: Emmanuel Gil Peyrot , Ezequiel Garcia , Philipp Zabel , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Joerg Roedel , Will Deacon , Robin Murphy , Sebastian Reichel , Cristian Ciocaltea , Dragan Simic , Shreeya Patel , Chris Morgan , Andy Yan , Nicolas Frattaroli , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev Subject: [PATCH v3 2/2] arm64: dts: rockchip: Add one VEPU121 to rk3588 Date: Fri, 12 Apr 2024 17:15:11 +0200 Message-ID: <20240412151515.837824-3-linkmauve@linkmauve.fr> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240412151515.837824-1-linkmauve@linkmauve.fr> References: <20240412151515.837824-1-linkmauve@linkmauve.fr> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The TRM (version 1.0 page 385) lists five VEPU121 cores, but only four interrupts are listed (on page 24), and the driver would expose them all as different video nodes so only one of them is exposed for now. Signed-off-by: Emmanuel Gil Peyrot --- arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi index 87b83c87bd55..5c6cc4cd81df 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi @@ -2488,6 +2488,35 @@ gpio4: gpio@fec50000 { }; }; + /* + * Currently only one of the four JPEG encoders is exposed, this + * reduces the optimal throughput by four. + * + * Once the driver is made to expose all four devices as a single video + * node, the rest can be enabled again, see the full patch here: + * https://lore.kernel.org/linux-media/20240327134115.424846-1-linkmauve@linkmauve.fr/T/#m3a6df0ba15e4af40b998b0ff2a02b0dd0d730c8e + */ + + jpeg_enc0: video-codec@fdba0000 { + compatible = "rockchip,rk3588-vepu121", "rockchip,rk3568-vepu"; + reg = <0x0 0xfdba0000 0x0 0x800>; + interrupts = ; + clocks = <&cru ACLK_JPEG_ENCODER0>, <&cru HCLK_JPEG_ENCODER0>; + clock-names = "aclk", "hclk"; + iommus = <&jpeg_enc0_mmu>; + power-domains = <&power RK3588_PD_VDPU>; + }; + + jpeg_enc0_mmu: iommu@fdba0800 { + compatible = "rockchip,rk3588-iommu", "rockchip,rk3568-iommu"; + reg = <0x0 0xfdba0800 0x0 0x40>; + interrupts = ; + clocks = <&cru ACLK_JPEG_ENCODER0>, <&cru HCLK_JPEG_ENCODER0>; + clock-names = "aclk", "iface"; + power-domains = <&power RK3588_PD_VDPU>; + #iommu-cells = <0>; + }; + av1d: video-codec@fdc70000 { compatible = "rockchip,rk3588-av1-vpu"; reg = <0x0 0xfdc70000 0x0 0x800>;