From patchwork Thu Apr 18 11:10:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jianfeng Liu X-Patchwork-Id: 13634529 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (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 E2B6915E5AD; Thu, 18 Apr 2024 11:10:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713438659; cv=none; b=gQTO5Ga2Iuvkp0Yw9UQvuL/P96Hn0a/puLar4zWecaPiTy6JSQ1+gQRstyQR3/zq4gQP+dGgnR7BeIeJH2vdqUuLtiPo9ZL+7iTC0FS9odhEg/NOH87+raw5MgKgc1ojPwfEFpWo3kbunKklN1qhulQKs7e9log5v76DXL4QDYI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713438659; c=relaxed/simple; bh=bsJCDRz+TKIglM4cWg07JvmVQTPCEJmCzFegytaF78M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=TpzJTgSVhYfPyCU33ea21q758xnx0Q0YsKzdybPNeCyqb39zJMrsj+m5dBDF0qi208TEyIPdNZos6b7tmOYc3zWI7+7n+caAAffn8J2lOI9mGdvP2EW7icDso03Z76hIWoNZHpOzjLNuht8TDBaHuTaRsr4G+xI7ygncjtTt+cs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jvYxY2gw; arc=none smtp.client-ip=209.85.214.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jvYxY2gw" Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1e2bbc2048eso6342275ad.3; Thu, 18 Apr 2024 04:10:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713438657; x=1714043457; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eJC1T3mQkrgyBVmgG4Hu8QZ7tiEZ+HFBgioNIYsukyY=; b=jvYxY2gw45+M+QIIpRO8Y15DT4DEPwr054Y1igJhcUxbTWTzdnHuPqN1T2GNeM7qJQ w1So3INjKrD6q3uK5S3i2bvd9MjR4OnN7Gn/xEo+KKX2tgnAr2USmGykWP28SPEd+LrA 1JUQJ1yaxw3pDWjCf6tYsNMLC5Iy6r1n5kEf4ehwSMdiiOG9gdECE31dq+e01X2Rjgvs qqPZPVQlKBf3ZtDHIdGHX+SmUHvWvOjUmbSD2TFIKb3WWmioUdjsHZ0+HRwzSlhhzlxM KP4rNPd8o2ZUdq2lOefFR3uBy46v/8Rw/gpb7U+5FkjidbBXXxbFT6HHduriIgIgJaK4 jq4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713438657; x=1714043457; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eJC1T3mQkrgyBVmgG4Hu8QZ7tiEZ+HFBgioNIYsukyY=; b=YfIF5hpxOiPjB932A1u1jAR2XT/IddUixFJ1oypzmL0nfoaUwfSbh3hpN3mNQMlXLc t0RFDdmNZBFB51gSsJFD8sEvOGwHubBLOntQHey4XBbuP8aCZyCjIODK+ra4qWEYUIyg aq3JFUe8jkxGOUWPdpH/TosAbC+Ku+T1q3q+1/XhQXAPWsB2QxNzligA1vKOJtrDujSp pSNxgO4aSQqUAo2ajzxjamwUGZzwqsd06MXDGV+cwm120ppkiPFWznSwXHcDDXes5TD+ K//X221b5BlndEJKL5UEkV6ozvFNQmTCO8J4nJI7VklbuYEYGg4aovGzDAQ/NnKu2xph eqhg== X-Forwarded-Encrypted: i=1; AJvYcCX3GwfEZgCXGiiQniFhsLo9a69k3bW7selngg2JBkYZpyyNhI2fbDgGjB4YSt2rzQUh3ISIc1tWgXEeqk1xpca45GCQRQQrBa3qoRXlljIpOclisyk5gwwvShVzplXi/oLCGCRA8w/xHw== X-Gm-Message-State: AOJu0YwMUiWcKY9E78B3frZ1WUiLdoquq7+1/Wg/DBsbug2vW+fIXFeF Axchx2UpiP2b7sIZTvnFKi04pKgQs4pm569zzOK9LOihqARw0KhwFSB8sC/oZR4= X-Google-Smtp-Source: AGHT+IGc+icXUbFSmOlUkEUSR9oX6zwW9ZpI7DD8PLSjyTb8Y03/SUSR0so++BJZpsPUlfe1xNmGOw== X-Received: by 2002:a17:902:bd85:b0:1e2:7fb2:b08 with SMTP id q5-20020a170902bd8500b001e27fb20b08mr2211620pls.43.1713438656875; Thu, 18 Apr 2024 04:10:56 -0700 (PDT) Received: from localhost.localdomain ([221.220.135.251]) by smtp.gmail.com with ESMTPSA id kh5-20020a170903064500b001e4d22f828fsm1051159plb.33.2024.04.18.04.10.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 04:10:36 -0700 (PDT) From: Jianfeng Liu To: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de, mchehab@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, heiko@sntech.de, liujianfeng1994@gmail.com, sfr@canb.auug.org.au, sebastian.reichel@collabora.com, sigmaris@gmail.com, didi.debian@cknow.org, Conor Dooley Subject: [PATCH v6 1/2] dt-bindings: media: rockchip-vpu: Add rk3588 vdpu121 compatible string Date: Thu, 18 Apr 2024 19:10:01 +0800 Message-Id: <20240418111002.83015-2-liujianfeng1994@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240418111002.83015-1-liujianfeng1994@gmail.com> References: <20240418111002.83015-1-liujianfeng1994@gmail.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add Hantro G1 VPU compatible string for RK3588. RK3588 has the same Hantro G1 ip as RK3568, which are both known as VDPU121 in TRM of RK3568 and RK3588. Signed-off-by: Jianfeng Liu Acked-by: Conor Dooley Reviewed-by: Sebastian Reichel --- Documentation/devicetree/bindings/media/rockchip-vpu.yaml | 3 +++ 1 file changed, 3 insertions(+) -- 2.34.1 diff --git a/Documentation/devicetree/bindings/media/rockchip-vpu.yaml b/Documentation/devicetree/bindings/media/rockchip-vpu.yaml index c57e1f488..4f667db91 100644 --- a/Documentation/devicetree/bindings/media/rockchip-vpu.yaml +++ b/Documentation/devicetree/bindings/media/rockchip-vpu.yaml @@ -31,6 +31,9 @@ properties: - items: - const: rockchip,rk3228-vpu - const: rockchip,rk3399-vpu + - items: + - const: rockchip,rk3588-vdpu121 + - const: rockchip,rk3568-vpu reg: maxItems: 1 From patchwork Thu Apr 18 11:10:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jianfeng Liu X-Patchwork-Id: 13634530 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (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 7A91B15F326; Thu, 18 Apr 2024 11:11:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713438668; cv=none; b=ThHP+LMZey+WFLIKkJDjGoaCbmbVCxJlfLYXbkueUMTHENZb5KzT5itEt57v135MO22561X5GljRTWANHSGAER3EPz3w3S3c8eve3SynsyUdoLCmCwU8L/WhSXY2loXkdbFofR/+GO8WAk7UFYbYruwXHIrSMUSCkIXLoIPl8Sw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713438668; c=relaxed/simple; bh=MkWEyyE0Nhw0JoHKbE3hW1kmGt0W+ifC+nyPrGRuBmc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ov6oL9cJITIvew9ujj+84FCXfFGtdjW+IJoM7Hovb8majR645VBMTw8sjq1HoeM9PJbPsIkXcEsrItimoMJ5EewN5AmpHDWPmkPt2aigQlLPhALHKBkuFWYIGV6L+4/D1ceNC5VNCjIcwiQ5BAP2dJFG5ysK+XXb27s/ir+3q/4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=WPxptB+i; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WPxptB+i" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1e86d56b3bcso6764065ad.1; Thu, 18 Apr 2024 04:11:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713438666; x=1714043466; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Lxb2yFQOzOHStfCQA/m2P7fU2z/qbCohGERMxV0x4sk=; b=WPxptB+iur2mi30cg+k4hq/rIlYgk0VW6zdPnDuGYUic/dNo600iD9zcals928OpGz m9gvxnVVrftJaao2EjK8fcPpgsADfHSPHGZP/t/d4RKjVG4+/osOvhr4omrT17uoPaj2 1VnNrlPzpcNjEUHujjCzGMGr7054W/FaqIEdAOnmPHDOMUg+YvRgz8utfFA0GwqOH1bo QXQAqrlX5UjoD1bfUEipRkqS4qWxQ/EagYX4jT5kjsCJ5clTUKErlVnzHQVnK/3Z92AI dat7P28rhNqa9maPCEMZx8H+tFhLfPqRvTBrEGGhfTYu5DFhp2fzy43WmFuQojKq9kNW rdQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713438666; x=1714043466; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Lxb2yFQOzOHStfCQA/m2P7fU2z/qbCohGERMxV0x4sk=; b=wdW725d1yAfqNDKpRqPOTTAmUiM6QGbD/sOy+vAYqDa8F7NtHGq9M2H7X+pOO5dUe0 qUjRGg7b0c2PYFoqp+eJqW1WOtHiikKKDidNzLTZPIjv7qyDOn8a6pEEFe7Uc4G8kCxL ygjs+FhVDLFEo4xEjcALPJsssvc7iU62VFhj7pfV8v7wfmWB+WLcBqmsCQuU1qEzHH1V rIlUYJEfO3bmVtqJ5jczK6fuWNLE65VJmWf/5Ft4kw7oqgYOZ2br9IQrB9zHCnJ3QnAX 6/nAhX5j+r4bqqr1zElhACQ9RIvonEFNkg3ycvh9Al9anl6Lwb71DKamtWyltSVld4do LVtg== X-Forwarded-Encrypted: i=1; AJvYcCUCOrjQVx3Y6slaS43v+28ThFNN0ZqZpT1BfcXQJD2/bj5WJrqBKlsQvd9Uj3AkXvNtA097MI5IbTNMzMGd2/BP2Qtje8B5l5KVUILas0GT6fJoEQIaEcvSIvRk6JP7oW4xd+53CIn9+Q== X-Gm-Message-State: AOJu0Yz+JUFg5jy2V5CXSl2dSfmAeTYpEm5laSIuT0LsokqCcJcnYoPi kYaDRiSkTQ84Qp5M24Ifcpy692kYRQfgCkc5E3ou9DApX9tm9dbv+0A+FDytnts= X-Google-Smtp-Source: AGHT+IFslWsdauAw3+GK4AxaZnWnbDcqaOOWdRddILDSGXxdvFx/EDWKsSl4+dq3Al/RraRAbXnS5Q== X-Received: by 2002:a17:902:c185:b0:1e3:e0a2:ccc3 with SMTP id d5-20020a170902c18500b001e3e0a2ccc3mr2740474pld.30.1713438665941; Thu, 18 Apr 2024 04:11:05 -0700 (PDT) Received: from localhost.localdomain ([221.220.135.251]) by smtp.gmail.com with ESMTPSA id kh5-20020a170903064500b001e4d22f828fsm1051159plb.33.2024.04.18.04.10.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 04:11:05 -0700 (PDT) From: Jianfeng Liu To: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de, mchehab@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, heiko@sntech.de, liujianfeng1994@gmail.com, sfr@canb.auug.org.au, sebastian.reichel@collabora.com, sigmaris@gmail.com, didi.debian@cknow.org Subject: [PATCH v6 2/2] arm64: dts: rockchip: Add Hantro G1 VPU support for RK3588 Date: Thu, 18 Apr 2024 19:10:02 +0800 Message-Id: <20240418111002.83015-3-liujianfeng1994@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240418111002.83015-1-liujianfeng1994@gmail.com> References: <20240418111002.83015-1-liujianfeng1994@gmail.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Enable Hantro G1 video decoder in RK3588's devicetree. Tested with FFmpeg v4l2_request code taken from [1] with MPEG2, H.264 and VP8 samples. [1] https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/multimedia/ffmpeg/patches/v4l2-request/ffmpeg-001-v4l2-request.patch Signed-off-by: Jianfeng Liu Tested-by: Hugh Cole-Baker Reviewed-by: Sebastian Reichel --- arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) -- 2.34.1 diff --git a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi index b0a59ec51..b0817382f 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi @@ -1135,6 +1135,27 @@ power-domain@RK3588_PD_SDMMC { }; }; + vpu: video-codec@fdb50000 { + compatible = "rockchip,rk3588-vdpu121", "rockchip,rk3568-vpu"; + reg = <0x0 0xfdb50000 0x0 0x800>; + interrupts = ; + interrupt-names = "vdpu"; + clocks = <&cru ACLK_VPU>, <&cru HCLK_VPU>; + clock-names = "aclk", "hclk"; + iommus = <&vdpu_mmu>; + power-domains = <&power RK3588_PD_VDPU>; + }; + + vdpu_mmu: iommu@fdb50800 { + compatible = "rockchip,rk3588-iommu", "rockchip,rk3568-iommu"; + reg = <0x0 0xfdb50800 0x0 0x40>; + interrupts = ; + clock-names = "aclk", "iface"; + clocks = <&cru ACLK_VPU>, <&cru HCLK_VPU>; + power-domains = <&power RK3588_PD_VDPU>; + #iommu-cells = <0>; + }; + av1d: video-codec@fdc70000 { compatible = "rockchip,rk3588-av1-vpu"; reg = <0x0 0xfdc70000 0x0 0x800>;