From patchwork Sat Dec 2 12:51:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 13476929 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7E69FC46CA3 for ; Sat, 2 Dec 2023 12:52:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1FD7A10E1D9; Sat, 2 Dec 2023 12:52:05 +0000 (UTC) Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1690410E19A for ; Sat, 2 Dec 2023 12:52:02 +0000 (UTC) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-40b27b498c3so32769685e9.0 for ; Sat, 02 Dec 2023 04:52:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701521520; x=1702126320; darn=lists.freedesktop.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=ZZ7Vk4rlYI4wpR0DprPRhwDbWK92/MFMHHXtx/iHz6w=; b=CtJpAe/xKndXgvyqnJRGSg6WEnKJIxruwj3V68Ciy49x70/zUQaR9RoY3pbnWd6i/B TNNSqZ373MuW3IiNT+IFaJn6TNTkLc1JnJ3wuBm15zFdZXJxeeIs7vAf2PqBctKjRkIf phlKfeVY1vDyRzyLW6kK77A6CQ4T3VfFYHxdRf02wI+bRUTnQj+y/nfGl0koLZEwBosp 2jXtF4aOco+8uAFMdRdI8DUk5uJPrWkBcA0T6JsAWUNhSacS+P2VCi9WRcuGTK4ynXCf LMkpSNnlxwk07aaKJ93BKIDKR5PFvadxi/m+o32trxA6HnWh7mHthevgDU9dlMBaIMMJ RJTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701521520; x=1702126320; 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=ZZ7Vk4rlYI4wpR0DprPRhwDbWK92/MFMHHXtx/iHz6w=; b=PtguBX06c1+K4xZv4AtBujRQiCYhdW9NhN7zzzIf9GBz12RjTxijulnoWGEWnasegr 0kzPLjZqqrwzzHOLiVNKedNvMNC0biMKeJa7RiIRA3EuPhDQ7wUfRGDAzwFE4OioPWFX kU84S9d9FZCeg3EAeP10P776dbBLzyUDGz0LkCevIYhEwrgHu1zNI3gT8ip6t1hDCW5Y yP8dKZ08y9yxB00wG5wKyHD6T6vsdJj7Q1EkvNMKmPBCO3J2ICtX6yi4/z1Dj/9dER8n C57F6C/ou2G9SbxfgWrCxaWijaBihTLgsQuOhki8+8KkKaO0hfLCcfQwGT8a/0d/Sf3n cNlQ== X-Gm-Message-State: AOJu0YwMQKKH7uiYjT9dLg1OxEzhdl+ymRhK0CfA9GIUynUCfWUHiInF 8oaVIqy87wROaFR7ybIgUw== X-Google-Smtp-Source: AGHT+IGHKK9cB3J1W0QWDzln8wREBYdZjVmE10rf8PD+2/UqMjmKdajLeMCstCvLsLWhy3jXHtShew== X-Received: by 2002:a05:600c:3b85:b0:40b:5e21:dd1a with SMTP id n5-20020a05600c3b8500b0040b5e21dd1amr414964wms.72.1701521520134; Sat, 02 Dec 2023 04:52:00 -0800 (PST) Received: from U4.lan ([2a02:810b:f40:4300:908e:b829:354b:f8ee]) by smtp.gmail.com with ESMTPSA id g5-20020a170906198500b009c5c5c2c5a4sm3018161ejd.219.2023.12.02.04.51.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Dec 2023 04:51:59 -0800 (PST) From: Alex Bee To: Heiko Stuebner , Conor Dooley , Krzysztof Kozlowski , Rob Herring Subject: [PATCH v2 1/5] pmdomain: rockchip: Add missing powerdomains for RK3128 Date: Sat, 2 Dec 2023 13:51:40 +0100 Message-ID: <20231202125144.66052-2-knaerzche@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231202125144.66052-1-knaerzche@gmail.com> References: <20231202125144.66052-1-knaerzche@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Maxime Ripard , Alex Bee , linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" For RK3128 the powerdomains PD_PERI, PD_SYS and PD_CRYPTO are currently missing. Add them. Signed-off-by: Alex Bee --- drivers/pmdomain/rockchip/pm-domains.c | 13 ++++++++----- include/dt-bindings/power/rk3128-power.h | 3 +++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/pmdomain/rockchip/pm-domains.c b/drivers/pmdomain/rockchip/pm-domains.c index 9b76b62869d0..62ba4129f6bb 100644 --- a/drivers/pmdomain/rockchip/pm-domains.c +++ b/drivers/pmdomain/rockchip/pm-domains.c @@ -998,11 +998,14 @@ static const struct rockchip_domain_info rk3066_pm_domains[] = { }; static const struct rockchip_domain_info rk3128_pm_domains[] = { - [RK3128_PD_CORE] = DOMAIN_RK3288("core", BIT(0), BIT(0), BIT(4), false), - [RK3128_PD_MSCH] = DOMAIN_RK3288("msch", 0, 0, BIT(6), true), - [RK3128_PD_VIO] = DOMAIN_RK3288("vio", BIT(3), BIT(3), BIT(2), false), - [RK3128_PD_VIDEO] = DOMAIN_RK3288("video", BIT(2), BIT(2), BIT(1), false), - [RK3128_PD_GPU] = DOMAIN_RK3288("gpu", BIT(1), BIT(1), BIT(3), false), + [RK3128_PD_CORE] = DOMAIN_RK3288("core", BIT(0), BIT(0), BIT(4), false), + [RK3128_PD_MSCH] = DOMAIN_RK3288("msch", 0, 0, BIT(6), true), + [RK3128_PD_VIO] = DOMAIN_RK3288("vio", BIT(3), BIT(3), BIT(2), false), + [RK3128_PD_VIDEO] = DOMAIN_RK3288("video", BIT(2), BIT(2), BIT(1), false), + [RK3128_PD_GPU] = DOMAIN_RK3288("gpu", BIT(1), BIT(1), BIT(3), false), + [RK3128_PD_PERI] = DOMAIN_RK3288("peri", 0, 0, BIT(0), false), + [RK3128_PD_SYS] = DOMAIN_RK3288("sys", 0, 0, BIT(5), true), + [RK3128_PD_CRYPTO] = DOMAIN_RK3288("crypto", 0, 0, BIT(7), false), }; static const struct rockchip_domain_info rk3188_pm_domains[] = { diff --git a/include/dt-bindings/power/rk3128-power.h b/include/dt-bindings/power/rk3128-power.h index c051dc3108db..68af6c68c272 100644 --- a/include/dt-bindings/power/rk3128-power.h +++ b/include/dt-bindings/power/rk3128-power.h @@ -10,5 +10,8 @@ #define RK3128_PD_VIDEO 2 #define RK3128_PD_GPU 3 #define RK3128_PD_MSCH 4 +#define RK3128_PD_PERI 5 +#define RK3128_PD_SYS 6 +#define RK3128_PD_CRYPTO 7 #endif From patchwork Sat Dec 2 12:51:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 13476930 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 33EEDC10F09 for ; Sat, 2 Dec 2023 12:52:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DC0FA10E1DB; Sat, 2 Dec 2023 12:52:06 +0000 (UTC) Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by gabe.freedesktop.org (Postfix) with ESMTPS id C6B0C10E19A for ; Sat, 2 Dec 2023 12:52:02 +0000 (UTC) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a1a2615e909so206143666b.3 for ; Sat, 02 Dec 2023 04:52:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701521521; x=1702126321; darn=lists.freedesktop.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=vGS3uiiSRjNFmcXcLobVydkfz1z0YWeEIsOnLuIOTtk=; b=EAeC3/lKbOMR8IZ58Pty7xpcQI0v4hEXIPzHGfNSlVtxPSHkFRy7lbbR6JrkEwuPRE mVPnq9qYzzR92UXW+b/9kDNC44bs52M+Wc2zyQgtaWbuWOoTfDzFkTXoQcCej5zWuAHQ qFCsyTXx7z05YTpzhkVoOcaroHy8kPl39fyCwN78wk6CZWG8L5Dm7dF/s+v+0/Nekc1c elzXzoLRUdqIbRUcUT/aKKUn9OAJNkacYgVhqPpsUozYgbKVvkOoQOo7avlKOFPyQ9b0 +itE677pnLy11sBdnxqoU2VrPVOK9t8D3DrmEsRUM01WnlsO5hvc0yivSGUpo35T2xB7 JGEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701521521; x=1702126321; 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=vGS3uiiSRjNFmcXcLobVydkfz1z0YWeEIsOnLuIOTtk=; b=VY6lHE9wLmX82BI2mG1Qc+Ow8fu2GrnMWzZ/CczlAAJAeRsKWEWaxW6FIl1DM0jKyE nDCOLLprxFyIEM/MuiPkMFXi01jss52xqv6PTgEvHAPh1N2mK4LUzF+JgPsefPlNJOGg 7oEOm7E7zQT0k50Pb5LwBpiYpV7hACnzDiGGs0HW2D07/zyka3RpMhQKEs8Q4pGFoKhw 1VxiFDpVee8cB3m0ksXKi60OOhXfg0DnXEJyZ9F6D1RdI1q/v9S7glonMfouzzBHHDLX f2kbm5ryA9l914+XTuLCzs0JAmiBXzHxh7rIhZl4Jp+XJFn2zZWwlAK7n7DL2pUHV/6w 2wFA== X-Gm-Message-State: AOJu0YykdSMHjM8b4BLyp4YbOs4dlH1bvAksFNNPw5Qn2OAhcD8tAWWw P0jHkICmYWf4/ENZrG/4cA== X-Google-Smtp-Source: AGHT+IFQCssdJ19Dhg4av1bEqGzWCJHnq4HF6friZV69W7kUuaniNiFQHWBT6X9GqTCcTQpVcwkvXw== X-Received: by 2002:a17:907:a18f:b0:a19:9b79:8b47 with SMTP id om15-20020a170907a18f00b00a199b798b47mr814246ejc.88.1701521521158; Sat, 02 Dec 2023 04:52:01 -0800 (PST) Received: from U4.lan ([2a02:810b:f40:4300:908e:b829:354b:f8ee]) by smtp.gmail.com with ESMTPSA id g5-20020a170906198500b009c5c5c2c5a4sm3018161ejd.219.2023.12.02.04.52.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Dec 2023 04:52:00 -0800 (PST) From: Alex Bee To: Heiko Stuebner , Conor Dooley , Krzysztof Kozlowski , Rob Herring Subject: [PATCH v2 2/5] ARM: dts: rockchip: Add power-controller for RK3128 Date: Sat, 2 Dec 2023 13:51:41 +0100 Message-ID: <20231202125144.66052-3-knaerzche@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231202125144.66052-1-knaerzche@gmail.com> References: <20231202125144.66052-1-knaerzche@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Maxime Ripard , Alex Bee , linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add power controller and qos nodes for RK3128 in order to use them as powerdomains. Signed-off-by: Alex Bee --- arch/arm/boot/dts/rockchip/rk3128.dtsi | 101 +++++++++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/arch/arm/boot/dts/rockchip/rk3128.dtsi b/arch/arm/boot/dts/rockchip/rk3128.dtsi index 4e8b38604ecd..b72905db04f7 100644 --- a/arch/arm/boot/dts/rockchip/rk3128.dtsi +++ b/arch/arm/boot/dts/rockchip/rk3128.dtsi @@ -8,6 +8,7 @@ #include #include #include +#include / { compatible = "rockchip,rk3128"; @@ -133,6 +134,106 @@ smp-sram@0 { pmu: syscon@100a0000 { compatible = "rockchip,rk3128-pmu", "syscon", "simple-mfd"; reg = <0x100a0000 0x1000>; + + power: power-controller { + compatible = "rockchip,rk3128-power-controller"; + #power-domain-cells = <1>; + #address-cells = <1>; + #size-cells = <0>; + + power-domain@RK3128_PD_VIO { + reg = ; + clocks = <&cru ACLK_CIF>, + <&cru HCLK_CIF>, + <&cru DCLK_EBC>, + <&cru HCLK_EBC>, + <&cru ACLK_IEP>, + <&cru HCLK_IEP>, + <&cru ACLK_LCDC0>, + <&cru HCLK_LCDC0>, + <&cru PCLK_MIPI>, + <&cru ACLK_RGA>, + <&cru HCLK_RGA>, + <&cru ACLK_VIO0>, + <&cru ACLK_VIO1>, + <&cru HCLK_VIO>, + <&cru HCLK_VIO_H2P>, + <&cru DCLK_VOP>, + <&cru SCLK_VOP>; + pm_qos = <&qos_ebc>, + <&qos_iep>, + <&qos_lcdc>, + <&qos_rga>, + <&qos_vip>; + #power-domain-cells = <0>; + }; + + power-domain@RK3128_PD_VIDEO { + reg = ; + clocks = <&cru ACLK_VDPU>, + <&cru HCLK_VDPU>, + <&cru ACLK_VEPU>, + <&cru HCLK_VEPU>, + <&cru SCLK_HEVC_CORE>; + pm_qos = <&qos_vpu>; + #power-domain-cells = <0>; + }; + + power-domain@RK3128_PD_GPU { + reg = ; + clocks = <&cru ACLK_GPU>; + pm_qos = <&qos_gpu>; + #power-domain-cells = <0>; + }; + + power-domain@RK3128_PD_CRYPTO { + reg = ; + clocks = <&cru HCLK_CRYPTO>, + <&cru SCLK_CRYPTO>; + pm_qos = <&qos_crypto>; + #power-domain-cells = <0>; + }; + }; + }; + + qos_crypto: qos@10128080 { + compatible = "rockchip,rk3128-qos", "syscon"; + reg = <0x10128080 0x20>; + }; + + qos_gpu: qos@1012d000 { + compatible = "rockchip,rk3128-qos", "syscon"; + reg = <0x1012d000 0x20>; + }; + + qos_vpu: qos@1012e000 { + compatible = "rockchip,rk3128-qos", "syscon"; + reg = <0x1012e000 0x20>; + }; + + qos_rga: qos@1012f000 { + compatible = "rockchip,rk3128-qos", "syscon"; + reg = <0x1012f000 0x20>; + }; + + qos_ebc: qos@1012f080 { + compatible = "rockchip,rk3128-qos", "syscon"; + reg = <0x1012f080 0x20>; + }; + + qos_iep: qos@1012f100 { + compatible = "rockchip,rk3128-qos", "syscon"; + reg = <0x1012f100 0x20>; + }; + + qos_lcdc: qos@1012f180 { + compatible = "rockchip,rk3128-qos", "syscon"; + reg = <0x1012f180 0x20>; + }; + + qos_vip: qos@1012f200 { + compatible = "rockchip,rk3128-qos", "syscon"; + reg = <0x1012f200 0x20>; }; gic: interrupt-controller@10139000 { From patchwork Sat Dec 2 12:51:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 13476931 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 33C95C10DC1 for ; Sat, 2 Dec 2023 12:52:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7640810E1C4; Sat, 2 Dec 2023 12:52:06 +0000 (UTC) Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by gabe.freedesktop.org (Postfix) with ESMTPS id A817F10E1C4 for ; Sat, 2 Dec 2023 12:52:03 +0000 (UTC) Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a06e59384b6so433940166b.1 for ; Sat, 02 Dec 2023 04:52:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701521522; x=1702126322; darn=lists.freedesktop.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=5TpM4rIE4qqT65pAaY9eqEHRHauyEUGalgmDwr8uKk4=; b=XDkcnPIBELBmYW5m2k4Bzh2nxsV1mb/IgnZQYPg7sWuCCPAONj71EMQGwzLO5cbCv1 ti/cvygSJQR0fXaRA0fubyQafvYTVpm5ZtdCj/fbuoaQwxrZWNT35rJ1eoXacBxFLVRB Ds6wmkWk/3lXCFdDPSHx1DrB/K5jnnOVV3NDrdnb9N1lrZkhBGEo0INoB6YtAA0mcqOQ 7+k6BxiL4QZJjSXzRy28w0d212QYiqlpd6d5c0LXrUPushpw6LbNERdnoRTVwG0BDhBH SuvQnyHcltGV7s8zImRitzyjjh4EGIlPSzoYz84k/WqtaVXh1txEd5CFz4RpyrMYxqh1 2Dcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701521522; x=1702126322; 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=5TpM4rIE4qqT65pAaY9eqEHRHauyEUGalgmDwr8uKk4=; b=gs5P/jngyO7zok+gOFYjgpuq7zZth0jHVwQ5yktZCGBD0ZD0UuVzn+YH1D09fUbjEt tbrVHFCjvY/slEAXItcTyoEMbFdRtN+hcJ3ysPhJuUieR3lkBYS2MyfL6oQH4KdlOKmT H8YC8GJ4FpsSTdc8mNhyjQB4LU2CG/AzSLg5bjMFWjlpcaaEkLJNV4ZE4xdPF1qIdW87 Gg0+GRYkqPmPXg+0r8zC/bvDjumk05oFB/7r+fRC+5RRiGZHndl1/DWYWNzzP2jEeeqO 41E1GU8CwAjNHn7V7oeioQQ+zI69QmiN6yq4W8y54l76O0riQM2zEEHvnMHkSeVutitY GuSw== X-Gm-Message-State: AOJu0YyF+WfYRMyby6zBWWcBtJPMH+pOYgZQVSDEakOJm/GsY1pazl5h YYF9n8AbCQLO3IGn7Dqdjg== X-Google-Smtp-Source: AGHT+IEyleq1fwiEbFjEWs4F50ggLLxGB/KOmVoOHqA2365tzKaQw281kj2swtpYsUJqACRktkUtTA== X-Received: by 2002:a17:906:3b43:b0:a16:92f1:2f47 with SMTP id h3-20020a1709063b4300b00a1692f12f47mr1536630ejf.57.1701521522024; Sat, 02 Dec 2023 04:52:02 -0800 (PST) Received: from U4.lan ([2a02:810b:f40:4300:908e:b829:354b:f8ee]) by smtp.gmail.com with ESMTPSA id g5-20020a170906198500b009c5c5c2c5a4sm3018161ejd.219.2023.12.02.04.52.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Dec 2023 04:52:01 -0800 (PST) From: Alex Bee To: Heiko Stuebner , Conor Dooley , Krzysztof Kozlowski , Rob Herring Subject: [PATCH v2 3/5] dt-bindings: gpu: mali-utgard: Add Rockchip RK3128 compatible Date: Sat, 2 Dec 2023 13:51:42 +0100 Message-ID: <20231202125144.66052-4-knaerzche@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231202125144.66052-1-knaerzche@gmail.com> References: <20231202125144.66052-1-knaerzche@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Maxime Ripard , Alex Bee , linux-rockchip@lists.infradead.org, Krzysztof Kozlowski , dri-devel@lists.freedesktop.org, Thomas Zimmermann , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Rockchip RK312x SoC family has a Mali400 MP2. Add a compatible for it. Signed-off-by: Alex Bee Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml index 0fae1ef013be..abd4aa335fbc 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml @@ -29,6 +29,7 @@ properties: - allwinner,sun50i-a64-mali - rockchip,rk3036-mali - rockchip,rk3066-mali + - rockchip,rk3128-mali - rockchip,rk3188-mali - rockchip,rk3228-mali - samsung,exynos4210-mali From patchwork Sat Dec 2 12:51:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 13476932 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 38AF4C4167B for ; Sat, 2 Dec 2023 12:52:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 23FC110E19A; Sat, 2 Dec 2023 12:52:09 +0000 (UTC) Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by gabe.freedesktop.org (Postfix) with ESMTPS id A5A9C10E19A for ; Sat, 2 Dec 2023 12:52:04 +0000 (UTC) Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a187cd4eb91so388395866b.3 for ; Sat, 02 Dec 2023 04:52:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701521523; x=1702126323; darn=lists.freedesktop.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=HR4GQ7+5atR3ar2YrCztGhjSeU/LO6OVqwoc3hEbrC0=; b=k9WW6nU2WEYI14j1Zlj5Cq0GLuKeL6PGO9qfFza6kLlhNtIyNwe0yOMSTJOYur3CDY bIJ3jko9boFKrs+8NlabXl7+jea5Y1sgVWoweICN3bklxc8oPE5whMh5OxNI11w+SkCV eQVF1KgYm1vHQOPO3vPueM5l0t7nH0cABKs4ATvd7GelpmspUqwFeq7I3m6vn7OuV6Fp q/N33QwexhCnkJNeSN8P4r9Z6S6jKJvUxuUrairgvZT6clhFRZwNqs7pZWXKJ6UVTkCa 0Wz3O7wCerppWFfvu9aTHCB3vU3VEfrL/2/DaTJlINZAIHHPVxXuW2ae1HwYZdDeyoBV sKMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701521523; x=1702126323; 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=HR4GQ7+5atR3ar2YrCztGhjSeU/LO6OVqwoc3hEbrC0=; b=dmUzbeJxuFFMlFYaTYcL074ufEAtohrspoXHBNx/0x2uCqbmbwctUcdXdTsQYNuDzg CWk7BKpz0bV8mVa/cmk1R4EbsP0AlYFay7w2t7F4namwkP0J7ww+ldc6Jok3xxse3K3T OoMQdRENnUlyznjJ3Sg6YvfwJUJP/eUYMr0+Mt3HwtPQPRKWUnWTFy5UWuhFaKGpywaj NcEpTYFMzFiDVB2ec3w1Xm0kI0OIoSweHSBQnFJXe/XaFuWdhUVPi/GZh/Uuk/Qz/mZB OY0r4RR9nF+/os+fUwauvpcRTgri2npJYXCPiS6kHLDi+b3pXCL+BepfZ7MXqsGEz/sd 1sPQ== X-Gm-Message-State: AOJu0Yz/WYtCPtRQvA5LwZazw5TCgtMdh5ljWxQgtypbz2vaT53jjftU tTRrr5yyRO4wfVikdCjAKQ== X-Google-Smtp-Source: AGHT+IFsV7yIlBBzkDPIYNDCqw3wEkc8AQ/SUwRG3frSQ5X+KzW+68Zbs/ntALcZcfg6t9TIXCXl8g== X-Received: by 2002:a17:906:35ca:b0:a19:a1ba:bacb with SMTP id p10-20020a17090635ca00b00a19a1babacbmr891820ejb.113.1701521523169; Sat, 02 Dec 2023 04:52:03 -0800 (PST) Received: from U4.lan ([2a02:810b:f40:4300:908e:b829:354b:f8ee]) by smtp.gmail.com with ESMTPSA id g5-20020a170906198500b009c5c5c2c5a4sm3018161ejd.219.2023.12.02.04.52.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Dec 2023 04:52:02 -0800 (PST) From: Alex Bee To: Heiko Stuebner , Conor Dooley , Krzysztof Kozlowski , Rob Herring Subject: [PATCH v2 4/5] ARM: dts: rockchip: Add GPU node for RK3128 Date: Sat, 2 Dec 2023 13:51:43 +0100 Message-ID: <20231202125144.66052-5-knaerzche@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231202125144.66052-1-knaerzche@gmail.com> References: <20231202125144.66052-1-knaerzche@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Maxime Ripard , Alex Bee , linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" RK3128 SoCs have Mali400 MP2 GPU. Add the respective device tree node and the correspondending opp-table. The frequencies and voltages of the opp-table have been taken from downstream kernel. Signed-off-by: Alex Bee --- arch/arm/boot/dts/rockchip/rk3128.dtsi | 44 ++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/arch/arm/boot/dts/rockchip/rk3128.dtsi b/arch/arm/boot/dts/rockchip/rk3128.dtsi index b72905db04f7..b05ee3d926aa 100644 --- a/arch/arm/boot/dts/rockchip/rk3128.dtsi +++ b/arch/arm/boot/dts/rockchip/rk3128.dtsi @@ -101,6 +101,27 @@ opp-1200000000 { }; }; + gpu_opp_table: opp-table-1 { + compatible = "operating-points-v2"; + + opp-200000000 { + opp-hz = /bits/ 64 <200000000>; + opp-microvolt = <975000 975000 1250000>; + }; + opp-300000000 { + opp-hz = /bits/ 64 <300000000>; + opp-microvolt = <1050000 1050000 1250000>; + }; + opp-400000000 { + opp-hz = /bits/ 64 <400000000>; + opp-microvolt = <1150000 1150000 1250000>; + }; + opp-480000000 { + opp-hz = /bits/ 64 <480000000>; + opp-microvolt = <1250000 1250000 1250000>; + }; + }; + timer { compatible = "arm,armv7-timer"; interrupts = , @@ -131,6 +152,29 @@ smp-sram@0 { }; }; + gpu: gpu@10090000 { + compatible = "rockchip,rk3128-mali", "arm,mali-400"; + reg = <0x10090000 0x10000>; + interrupts = , + , + , + , + , + ; + interrupt-names = "gp", + "gpmmu", + "pp0", + "ppmmu0", + "pp1", + "ppmmu1"; + clocks = <&cru ACLK_GPU>, <&cru ACLK_GPU>; + clock-names = "bus", "core"; + power-domains = <&power RK3128_PD_GPU>; + resets = <&cru SRST_GPU>; + operating-points-v2 = <&gpu_opp_table>; + status = "disabled"; + }; + pmu: syscon@100a0000 { compatible = "rockchip,rk3128-pmu", "syscon", "simple-mfd"; reg = <0x100a0000 0x1000>; From patchwork Sat Dec 2 12:51:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 13476933 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 32A6EC10DC1 for ; Sat, 2 Dec 2023 12:52:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BA1B110E1E1; Sat, 2 Dec 2023 12:52:11 +0000 (UTC) Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by gabe.freedesktop.org (Postfix) with ESMTPS id 06A5210E19A for ; Sat, 2 Dec 2023 12:52:06 +0000 (UTC) Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-54c67b0da54so1748647a12.0 for ; Sat, 02 Dec 2023 04:52:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701521524; x=1702126324; darn=lists.freedesktop.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=uvqh3YsIrEQFTmWeg+MPEc2rGBC/JrpRd/TYuGzYb50=; b=E989+fiSM8vPlzamHZdzCpdjCmdKcG+j8SXRwaIyYEiwBhnFh5adgYz0gSBVBTAxP8 2mdD1g3vTZq0uqV2n0MHVpCuvGjytz1tftif3ujGBgYfKagq+neup3jzLQ8GkUwSPYOm UB6CS7xVT2INy/7JWFBrJxK4gfjfQuFSnIvZCXXtsk+5b0+DvF49b5YLzsa8wkpJ/hcs CPg/kXZ7KVsiYW4WHDZrQcxt6jpLGCfzk8th9vXrVNTdxgt7GhewjNqOML5EFKPG5GB0 6orhlwUwv5HP+gU3x85c1VEPyZnNdiemiY0PrhoOCmmg8017WLPRBZmQigdi75amNG2S QFow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701521524; x=1702126324; 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=uvqh3YsIrEQFTmWeg+MPEc2rGBC/JrpRd/TYuGzYb50=; b=buVp52jxyj7cQaVH2bvQisG75QxBQZPJsYqHnDcALedlqv85gRb/aOWBIkryEwzkGT sjZSo1YVeO7ZKzfsgkUzp8VYOfM4HLVuEJc+6v78Jfvi+pKPyUmxcodMh1ojPEskaiZ3 5Qu2i9ZqyANSykWt+vGb80Ls6PJJcIWPdkElZIcyleztvFSn/EYQVzTCgh9EmLS1rU3R qz9etIRp8YGuwaQdiycgPGh8UA+F8aEXeDPa8fvljF1AHj3f8ThFdRoSGEU7tJ06EeT/ zM3GevP9U2SvfJqM0Jq4PLU3eDDGnEiPbVjHhEaFNnHa69jx/FaXXpU0i1p1EXMsN3VM S7Mg== X-Gm-Message-State: AOJu0YxdpwHSMbgUBQfQjpbAHHKtpozBNYaMbzQZdFsfXs174Z6iofah J1nfxRtGJJD87VWkGzCFYQ== X-Google-Smtp-Source: AGHT+IFQ04hd02/k8ts4CI8E4zUUh78rM2JYghUB6DkvNvfM35AgawiZ8im+gUYqpmxxzX2y97BApA== X-Received: by 2002:a17:907:bb86:b0:a18:f82c:65d2 with SMTP id xo6-20020a170907bb8600b00a18f82c65d2mr1932769ejc.34.1701521524226; Sat, 02 Dec 2023 04:52:04 -0800 (PST) Received: from U4.lan ([2a02:810b:f40:4300:908e:b829:354b:f8ee]) by smtp.gmail.com with ESMTPSA id g5-20020a170906198500b009c5c5c2c5a4sm3018161ejd.219.2023.12.02.04.52.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Dec 2023 04:52:03 -0800 (PST) From: Alex Bee To: Heiko Stuebner , Conor Dooley , Krzysztof Kozlowski , Rob Herring Subject: [PATCH v2 5/5] ARM: dts: rockchip: Enable GPU for XPI-3128 Date: Sat, 2 Dec 2023 13:51:44 +0100 Message-ID: <20231202125144.66052-6-knaerzche@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231202125144.66052-1-knaerzche@gmail.com> References: <20231202125144.66052-1-knaerzche@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Maxime Ripard , Alex Bee , linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add the supply and enable gpu node for XPI-3128 board. Signed-off-by: Alex Bee --- arch/arm/boot/dts/rockchip/rk3128-xpi-3128.dts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/rockchip/rk3128-xpi-3128.dts b/arch/arm/boot/dts/rockchip/rk3128-xpi-3128.dts index 61b9f069c8a2..0a8ead0bfe09 100644 --- a/arch/arm/boot/dts/rockchip/rk3128-xpi-3128.dts +++ b/arch/arm/boot/dts/rockchip/rk3128-xpi-3128.dts @@ -315,6 +315,11 @@ &gpio3 { "", "", "", ""; }; +&gpu { + mali-supply = <&vdd_log>; + status = "okay"; +}; + &pinctrl { dp83848c { dp83848c_rst: dp83848c-rst {