From patchwork Tue Nov 14 10:19:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 744860 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8ECDBC4167D for ; Tue, 14 Nov 2023 10:20:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231945AbjKNKUB (ORCPT ); Tue, 14 Nov 2023 05:20:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229799AbjKNKUA (ORCPT ); Tue, 14 Nov 2023 05:20:00 -0500 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2394C1A8 for ; Tue, 14 Nov 2023 02:19:57 -0800 (PST) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4084e49a5e5so46947385e9.3 for ; Tue, 14 Nov 2023 02:19:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699957195; x=1700561995; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=D1QWKo5v1x3RldbHoETv2ObEXLCGaOLMr/Qq6NkPTAw=; b=slwWsjAiu3nkpkU54skAv6EME0H3gWV0VPr+pLTm/kwOi83uBiLdJPhyCOfAnW2oMT Mcxaf/tjRuRcuFTcwOH/77MxVbaIdeB6V077IgjR39meWs8SnZjc9rxVVHPAlfFRoVDC NDMfyjl1EPdKcHuBpB6G8DG9myrB87sS00CEw7qOkx0OnHS+nld/KvTd/ptm1527KVDP eHMtEQbrXLSaoihWdZcVafV/AAzM7bQfrWmQL8Lu+s28BOCQbnKEdRs6pnu17h79caWz UxNyTuWWmRSFrBRsPoClx7GdUfGs/wJw8UIXzBTU+pJyO0P3CjPjChf08QuPX0L8khtz /IXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699957195; x=1700561995; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=D1QWKo5v1x3RldbHoETv2ObEXLCGaOLMr/Qq6NkPTAw=; b=oc7KWu1NX8zpnc4sQI/PCl7DrPtGKchks2kHkOCGf+L8gHPYVhcKI/9wbIDudc3Q89 zGjZ9v1mbcdTHGKE5rgRDOpKa4zcdqcflSy9Efg7TILhJTCJTecxQPY04gPo2bx6raep uSxywzDLkgj/qnWmlhjRpDWB6mg3bhVWT7X+RUWQyKtExM7HarP1ya/R8o31uEobYzI5 mZ7K8okko+KBJWAuKvKCRDuOn01qmelJwSQ3RjemWmrdlJk7JAdYbopQVPUcmPtiLBpk 7Vq+xSRIsQPwhCOCbLNmiWAvoaqb+V42MRJSNoqlc31sJ46dKCG9Bgpqy7JfhyvQwjCp NE/g== X-Gm-Message-State: AOJu0Ywo2slXtGuVNBqSxQmKlew/9JSULnyxHTQq/lhuYeM1iJ/3fstX /LFYspuBQUMaSBh1HYQ645vwKQ== X-Google-Smtp-Source: AGHT+IEtRy6/1TJjxurvCCcvkAtUDZaID1wnEiQdKSWVWSMY+EUI5ohY3QFVq9O366Nao94h1NMqJw== X-Received: by 2002:a05:6000:bce:b0:324:8239:2873 with SMTP id dm14-20020a0560000bce00b0032482392873mr5689990wrb.37.1699957195651; Tue, 14 Nov 2023 02:19:55 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:8261:5fff:fe11:bdda]) by smtp.gmail.com with ESMTPSA id v9-20020a5d43c9000000b0032da022855fsm7419675wrr.111.2023.11.14.02.19.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 02:19:55 -0800 (PST) From: Neil Armstrong Date: Tue, 14 Nov 2023 11:19:50 +0100 Subject: [PATCH 1/2] dt-bindings: power: meson-g12a-power: document ISP power domain MIME-Version: 1.0 Message-Id: <20231114-topic-amlogic-upstream-isp-pmdomain-v1-1-f01e6fca67a0@linaro.org> References: <20231114-topic-amlogic-upstream-isp-pmdomain-v1-0-f01e6fca67a0@linaro.org> In-Reply-To: <20231114-topic-amlogic-upstream-isp-pmdomain-v1-0-f01e6fca67a0@linaro.org> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Ulf Hansson Cc: Daniel Scally , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=643; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=TxQCQp8KexETWz0DJ5Ct9muX5KYY3F1pMZr7p8jc1eY=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBlU0nJN8WGk5SnAfQY6NQMuQ9Y2QaJiEjnrNK28CTN 3KX/EhuJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZVNJyQAKCRB33NvayMhJ0c3aEA Cojhb5oA95QAfgsCKWFyi0lXKqq0xsdU+OqBoQahY5LJYvKMov4oy1eWZO8JgU4DbIzXZMXKKv8Fvt occrcqxosWG/hDs5U5qEdWM5N6PoLVgYtofaqm/7GD9Zsm4GRpqIbFgkFZhXAt+VifzXwgYf4STkMM JPYa9O+itDHAOkLyN+kT4Gf9qQunbGaqNQTMs6RMM3Mb6ka6YYRuOm2qopuEv31DE86+U5Cin5TpbM xCUob2ZbP5bL9ue2UcHBsFQ7wJ1FKSByJcEiN0pd8TFWZH2zRLkBWORx1knQ2tObqCzNiNdGJucSS5 i397W51sjErzBVTnBoHLq8Qs6PA8Rimrqdw0LwP6ED+b79yCiyhsjjpRhmiPMO5Wr+iXc7rjWf0i5e 00UhsuZG8ruOVONe8zi0kr9EdG3pvwdiJ1Mzfg2U/YRgfXkBGotX0w5ww2xnaeUHiw5NGRnd0BXUyB 2azZ3kOSKNtAxfd90b5GOoDFmUWCRB2g/LStbmpM2Qj4c7MHaA3ItuWkxR2Og6cnAb2ljJk9h0+bpU ocgbE9Kb5Xf6R2wytOISOQ7JuzLBW69l91xmGTkCdPVjTQfm4vze8RE/sxl9NI85H4dHaG0kYW+EE7 V9e26rxwkJdHD74bj0B0B0rXhA79oQ1GRpXDyQPn0YWJJKEbSeYmD+Tu+tvQ== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add MIPI ISP power domain ID to the G12A Power domains bindings header Signed-off-by: Neil Armstrong --- include/dt-bindings/power/meson-g12a-power.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/dt-bindings/power/meson-g12a-power.h b/include/dt-bindings/power/meson-g12a-power.h index 44ec0c50e340..01fd0ac4dd08 100644 --- a/include/dt-bindings/power/meson-g12a-power.h +++ b/include/dt-bindings/power/meson-g12a-power.h @@ -10,5 +10,6 @@ #define PWRC_G12A_VPU_ID 0 #define PWRC_G12A_ETH_ID 1 #define PWRC_G12A_NNA_ID 2 +#define PWRC_G12A_ISP_ID 3 #endif From patchwork Tue Nov 14 10:19:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 743924 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B146DC4167B for ; Tue, 14 Nov 2023 10:20:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232482AbjKNKUD (ORCPT ); Tue, 14 Nov 2023 05:20:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231810AbjKNKUB (ORCPT ); Tue, 14 Nov 2023 05:20:01 -0500 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C0021AD for ; Tue, 14 Nov 2023 02:19:58 -0800 (PST) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4084de32db5so47183335e9.0 for ; Tue, 14 Nov 2023 02:19:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699957196; x=1700561996; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=OEIBIUZc6uePJfntJdIEYKl8kqhtvCCVMaiOaHpDyfM=; b=K+HGsPuiYL3ZrqRk7KkXHGbkyLrn6PeTwb33cDrYHxY5xNX5cpz53uQSSv23D8aN8N JwXyC8Fc4OvS+vhbmSrGPPsiUHia0y5rrk2kYhwCg9PhI2vRNdMvgjjUWjjhiLmGHojM MuW8XF93vuy1QC6Sc7igbbTFCkjnevsvtghCeWCLs/qSAJykX3GvE6uy8waLeejkGC29 Egpoctb92Bgjc8QdUEAL7CR4ZZ863/EVhoBC9JLJ6W+qig7ANMoWwcuXnz7xOZtBAuYB 6bsAtMz8zylgoelMrKkt53zc5o5xAXDfzKtwFVt8UukWhI6fTny9h1cpPJRHz3+uGPkl cBUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699957196; x=1700561996; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OEIBIUZc6uePJfntJdIEYKl8kqhtvCCVMaiOaHpDyfM=; b=wwhnL935cUFX/rfmaHzMtZo7q9SisGI0LpyAC+cOsBz0hptglWPV3UO7ezZJiSjVNV P6F8ic3vqqEKj6WsTpHN7InFAuYfD6hX37Dam+ykC8HTf2AhEecFa9S+MIHzdcsgRysG UuM+RZzQ2AlOSc2xU1cVVTu12/liwh3ZLehOgXB3X7ZwXd8bkvxq40vXycNRNqvPJu5t MXXFwDtSr6TjUtcWwQRFTF4FtnG11b3BUEhQarSxTbAjvo9I11SuqkXXegOaQhv9e8CE TKdyD8B70bG/+v1u6vI9pudfyRYGzwTh5XAVX2YUcDp12q25NHnezKBDGH1eBLRRrbaJ 80kw== X-Gm-Message-State: AOJu0YwsJqDFB2Vea8+W56kR8MX2JJlQijUGPHcHuizU9GUbjCjnX/6L 3xHuOwftH56CUT+jrSVhGa12KZHC2eznhZ117Qf3j2Tr X-Google-Smtp-Source: AGHT+IFNvpoPpsHx2p5m3MMv9VHHwSghZIW3y1edhUbi+6SVcRkn4CBysD08DhvHC8uZ2rPXGDk8rw== X-Received: by 2002:a5d:4e85:0:b0:32f:7967:aa4d with SMTP id e5-20020a5d4e85000000b0032f7967aa4dmr6050646wru.68.1699957196533; Tue, 14 Nov 2023 02:19:56 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:8261:5fff:fe11:bdda]) by smtp.gmail.com with ESMTPSA id v9-20020a5d43c9000000b0032da022855fsm7419675wrr.111.2023.11.14.02.19.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 02:19:56 -0800 (PST) From: Neil Armstrong Date: Tue, 14 Nov 2023 11:19:51 +0100 Subject: [PATCH 2/2] pmdomain: amlogic: meson-ee-pwrc: add support for G12A ISP power domain MIME-Version: 1.0 Message-Id: <20231114-topic-amlogic-upstream-isp-pmdomain-v1-2-f01e6fca67a0@linaro.org> References: <20231114-topic-amlogic-upstream-isp-pmdomain-v1-0-f01e6fca67a0@linaro.org> In-Reply-To: <20231114-topic-amlogic-upstream-isp-pmdomain-v1-0-f01e6fca67a0@linaro.org> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Ulf Hansson Cc: Daniel Scally , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2024; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=aQxr32do09NNbq0amsdwX/uvKdT6sjjcfu6Gh0FrHoI=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBlU0nJG2mljBw/0T6F93TKPKViSSLGHPI+v240fNwU 6mi3DumJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZVNJyQAKCRB33NvayMhJ0XjED/ 9KRANEUmUjaRu1euBCtDmLf/JYF1uTV/2Zv2jc7KgMIDYp88B7esJ6pba+UtJ3jN3oj/xO2oRkRPWA gn3mgr1zCNWeFchLMDHwrE9AOwUQlesIWdh2PZSwSxZ9M+4IyyWY8shQkUVKf4U6/2hD4tujoQ8HaX C37kWyzbxzLZ2oWFl3DxsGAFk5doAr6Uh4q523pFst1oS0fs3WU6Ms5UgAf+6McUPwaPWSth3JRvG1 V6ybYoD8aQmPjlvO+0TcsfemJ9U8OzU76SlgENyFxTHMSi/O0080wR2dGQAYfrRYyiRJDGa5IuNgLX Gf2/hs48OniwJBKhpc0FJQ2fQWOW2LKyoDw00w7CSoBujUqwHTR8GOupyHqqOodBrsXXmfyrucu0Au qINla3qD8EYH/br77LI4Zlt9F4KpKR7bI7DnznwBtRTsg9AUK0tIwSVgapO9vDCirhQML0m3sksavo wSmFDAqgSV1foZkzxtKndM/yM7G/g2bf3fpsY4QoGy40QnKfHCWZgNdvKp/yycTpTR+AtqhWgY8Qd2 o1cskcw0iSfh+R5Mle6a071YtCqQ5mSUCMsFn9v/2nTKAnrh1+82YcrdHiGYHO2neof5AUxNK9aV1y bPYUBc1t9KJPXT35IEmzS9XP9L8AOOYy42+RD4smlOdstkhbboEWekFvpG8A== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add entries for the ISP power domain found in the Amlogic G12B SoC Signed-off-by: Neil Armstrong --- drivers/pmdomain/amlogic/meson-ee-pwrc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/pmdomain/amlogic/meson-ee-pwrc.c b/drivers/pmdomain/amlogic/meson-ee-pwrc.c index 0dd71cd814c5..cba216a2175e 100644 --- a/drivers/pmdomain/amlogic/meson-ee-pwrc.c +++ b/drivers/pmdomain/amlogic/meson-ee-pwrc.c @@ -47,6 +47,8 @@ #define G12A_HHI_NANOQ_MEM_PD_REG0 (0x43 << 2) #define G12A_HHI_NANOQ_MEM_PD_REG1 (0x44 << 2) +#define G12A_HHI_ISP_MEM_PD_REG0 (0x45 << 2) +#define G12A_HHI_ISP_MEM_PD_REG1 (0x46 << 2) struct meson_ee_pwrc; struct meson_ee_pwrc_domain; @@ -115,6 +117,13 @@ static struct meson_ee_pwrc_top_domain g12a_pwrc_nna = { .iso_mask = BIT(16) | BIT(17), }; +static struct meson_ee_pwrc_top_domain g12a_pwrc_isp = { + .sleep_reg = GX_AO_RTI_GEN_PWR_SLEEP0, + .sleep_mask = BIT(18) | BIT(19), + .iso_reg = GX_AO_RTI_GEN_PWR_ISO0, + .iso_mask = BIT(18) | BIT(19), +}; + /* Memory PD Domains */ #define VPU_MEMPD(__reg) \ @@ -231,6 +240,11 @@ static struct meson_ee_pwrc_mem_domain g12a_pwrc_mem_nna[] = { { G12A_HHI_NANOQ_MEM_PD_REG1, GENMASK(31, 0) }, }; +static struct meson_ee_pwrc_mem_domain g12a_pwrc_mem_isp[] = { + { G12A_HHI_ISP_MEM_PD_REG0, GENMASK(31, 0) }, + { G12A_HHI_ISP_MEM_PD_REG0, GENMASK(31, 0) }, +}; + #define VPU_PD(__name, __top_pd, __mem, __is_pwr_off, __resets, __clks) \ { \ .name = __name, \ @@ -269,6 +283,8 @@ static struct meson_ee_pwrc_domain_desc g12a_pwrc_domains[] = { [PWRC_G12A_ETH_ID] = MEM_PD("ETH", meson_pwrc_mem_eth), [PWRC_G12A_NNA_ID] = TOP_PD("NNA", &g12a_pwrc_nna, g12a_pwrc_mem_nna, pwrc_ee_is_powered_off), + [PWRC_G12A_ISP_ID] = TOP_PD("ISP", &g12a_pwrc_isp, g12a_pwrc_mem_isp, + pwrc_ee_is_powered_off), }; static struct meson_ee_pwrc_domain_desc gxbb_pwrc_domains[] = {