From nobody Fri Sep 19 05:27:46 2025 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 88CADC46467 for ; Tue, 29 Nov 2022 08:52:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231515AbiK2Ivy (ORCPT ); Tue, 29 Nov 2022 03:51:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229640AbiK2IvT (ORCPT ); Tue, 29 Nov 2022 03:51:19 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59F6656D66 for ; Tue, 29 Nov 2022 00:51:18 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id vv4so32074280ejc.2 for ; Tue, 29 Nov 2022 00:51:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=Cw/am3froU3IMTWG9BB3ZSyfplgImMW6lCXqrhZP2N0=; b=MLKh8cdNSHTwMWrctPe//cKfk2YeweD6IiOtOpNFWPtWaa3dGYSXQ26Iyy0Mvi06pd yMSzWB1UEZcPHAAwX1WWMDmhwQqDEqGG1nBUTIwI9V4U+Y+g8Y6DoWVC1HuTWRBvKfKe cxIemB5+vH6Zix9m8MwyiBZwMe0ZFGD/RQgbcc6gx0C5xzmmeavCh9ZQ7vDd2MjEQtbX +Dc2KlMUGvNvZLsPSwvSucKRtJTcD5bZMC39GPz74J6AZfG/LcQZxDENPNRDQUR1FCeL SOuDLtFty5plgee61eo1Y6vuKjgz1dsYpOrju8g/sKPkEhiA+p19wuIF6LzBAsW2qY2T iuSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Cw/am3froU3IMTWG9BB3ZSyfplgImMW6lCXqrhZP2N0=; b=YkRsZ4F8AJ7AVknS18rMPg8fIS+OT0FBCcGBh+MfITPgyjDR+yrebTSOt+rrXuJvSa YpMmB3JdgDjlwiChzQEzGiH6gSIxiYrVCIO53E/cHgQCIzJ4kiWachJa+4m89gx1eOSp TYEFRzxCUyNCaLfH77llHGnFwv6dp9NAMcvwP78xBfWfvR2Md11VS6vWIfom5oU7B4ru VgL10Ob0a2z+WIVQGROvAw4qWBf5g7dLO1eSBHnQWQEFZweAk60HMyNo/ssEuk7UN5sD 1S4A7/cbIU6sBC7/4fBa3c4F34BFAhxiCmJUiT2dcdmql/qHv27JKsI1UkGoN7asEQkz H72Q== X-Gm-Message-State: ANoB5pnKM7qu0ndHbPQdro3fl1UFr7ggQNhjsdJ/lof86Rw4SIw/Ybtv nqMszVm0Y/bOSWoXB8jRvEM= X-Google-Smtp-Source: AA0mqf6Up2siIcQWYStjGjAfESej3aO3xQCrXX+nSu+RfXB3dccz+c6R1c389wG2ryi43AZZ0MqZDQ== X-Received: by 2002:a17:906:9c8a:b0:7bf:6698:d444 with SMTP id fj10-20020a1709069c8a00b007bf6698d444mr8732658ejc.548.1669711876881; Tue, 29 Nov 2022 00:51:16 -0800 (PST) Received: from cizrna.home (cst-prg-44-69.cust.vodafone.cz. [46.135.44.69]) by smtp.gmail.com with ESMTPSA id kz1-20020a17090777c100b0078de26f66b9sm5873219ejc.114.2022.11.29.00.51.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Nov 2022 00:51:16 -0800 (PST) Sender: Tomeu Vizoso From: Tomeu Vizoso Cc: italonicola@collabora.com, Tomeu Vizoso , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , linux-arm-kernel@lists.infradead.org (moderated list:ARM/Amlogic Meson SoC support), linux-amlogic@lists.infradead.org (open list:ARM/Amlogic Meson SoC support), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v3 3/5] soc: amlogic: meson-pwrc: Add NNA power domain for A311D Date: Tue, 29 Nov 2022 09:50:43 +0100 Message-Id: <20221129085047.49813-4-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221129085047.49813-1-tomeu.vizoso@collabora.com> References: <20221129085047.49813-1-tomeu.vizoso@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Based on power initialization sequence in downstream driver. Signed-off-by: Tomeu Vizoso Reviewed-by: Neil Armstrong --- drivers/soc/amlogic/meson-ee-pwrc.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/soc/amlogic/meson-ee-pwrc.c b/drivers/soc/amlogic/meso= n-ee-pwrc.c index dd5f2a13ceb5..dfbf0b1c7d29 100644 --- a/drivers/soc/amlogic/meson-ee-pwrc.c +++ b/drivers/soc/amlogic/meson-ee-pwrc.c @@ -46,6 +46,9 @@ #define HHI_NANOQ_MEM_PD_REG1 (0x47 << 2) #define HHI_VPU_MEM_PD_REG2 (0x4d << 2) =20 +#define G12A_HHI_NANOQ_MEM_PD_REG0 (0x43 << 2) +#define G12A_HHI_NANOQ_MEM_PD_REG1 (0x44 << 2) + struct meson_ee_pwrc; struct meson_ee_pwrc_domain; =20 @@ -106,6 +109,13 @@ static struct meson_ee_pwrc_top_domain sm1_pwrc_usb = =3D SM1_EE_PD(17); static struct meson_ee_pwrc_top_domain sm1_pwrc_pci =3D SM1_EE_PD(18); static struct meson_ee_pwrc_top_domain sm1_pwrc_ge2d =3D SM1_EE_PD(19); =20 +static struct meson_ee_pwrc_top_domain g12a_pwrc_nna =3D { \ + .sleep_reg =3D GX_AO_RTI_GEN_PWR_SLEEP0, \ + .sleep_mask =3D BIT(16) | BIT(17), \ + .iso_reg =3D GX_AO_RTI_GEN_PWR_ISO0, \ + .iso_mask =3D BIT(16) | BIT(17), \ + }; + /* Memory PD Domains */ =20 #define VPU_MEMPD(__reg) \ @@ -217,6 +227,11 @@ static struct meson_ee_pwrc_mem_domain sm1_pwrc_mem_au= dio[] =3D { { HHI_AUDIO_MEM_PD_REG0, GENMASK(27, 26) }, }; =20 +static struct meson_ee_pwrc_mem_domain g12a_pwrc_mem_nna[] =3D { + { G12A_HHI_NANOQ_MEM_PD_REG0, GENMASK(31, 0) }, + { G12A_HHI_NANOQ_MEM_PD_REG1, GENMASK(23, 0) }, +}; + #define VPU_PD(__name, __top_pd, __mem, __is_pwr_off, __resets, __clks) \ { \ .name =3D __name, \ @@ -253,6 +268,8 @@ static struct meson_ee_pwrc_domain_desc g12a_pwrc_domai= ns[] =3D { [PWRC_G12A_VPU_ID] =3D VPU_PD("VPU", &gx_pwrc_vpu, g12a_pwrc_mem_vpu, pwrc_ee_is_powered_off, 11, 2), [PWRC_G12A_ETH_ID] =3D MEM_PD("ETH", meson_pwrc_mem_eth), + [PWRC_G12A_NNA_ID] =3D TOP_PD("NNA", &g12a_pwrc_nna, g12a_pwrc_mem_nna, + pwrc_ee_is_powered_off), }; =20 static struct meson_ee_pwrc_domain_desc gxbb_pwrc_domains[] =3D { --=20 2.38.1