Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5434360pxb; Wed, 26 Jan 2022 11:53:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzcpY3qjLR+t+EFwrI05kjORAvXKEjuzv+Xf1Z4QUaabcfQKylFE4ZHVtymMcCPaefa3dQQ X-Received: by 2002:a17:902:e843:: with SMTP id t3mr208153plg.63.1643226833491; Wed, 26 Jan 2022 11:53:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643226833; cv=none; d=google.com; s=arc-20160816; b=Vz9boYzc00f3ZmuMkOWoJ2CXIJkH+i5OvjdWa9B/EhYLyEs95/ihRJFzduH7xSvegI NgQDOWpkHVSkFHlXx2FO0Ee/w/tjT0ohS2qPw+/9EDpj3vTDBVod24bXPIomyjnhFNKk tkn1BiQE6J7rXJSGQoIWTsio8frmdSMw1o139MTs6vbRwxe3krknCnAwhJSUJrmv8kME GN+LfPAmejotbJGiuAmHFAOYxByGMW2DMCbPtXaF9E7G8gao3R1P+oLA0iROqDCU8B76 O0uOxOYeqcTCMultfJJNzx0IcUPfaKaQeKF9oUqSCs/O64EB2+2Bt9yemnYuC/nwhSB7 KFEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ajUwhYvzv76QTACADlOgIn/TJ/9UES2gn2XPE9o514k=; b=clgGLIFOolFzxTy+OQEwoNKCqPDGTUNLMjoNTt3HxUCa4yndQfIcN41Cw1RwoHlMs6 TMmoIjbdM9BpW1fO+dfZ2NUZ8i1VKH9lL3UNKrpq1doTz6LWI5DDfES4CzeB5eZ4jnbf I0YBrslrN3WRdvGIYXEX1IHm+diBPY8Wt6o2Y8uoMfGYFYQKWMFD+hh/O9l5/eH005X6 RrosJdlFwOUNxhBQPduHruh9hmjbcCOPzpH/r4EbyJI8rpIJhSyTyM9/3bX02SSOrmat eQhxY+g/WRv8JlwOiqOy8qa2nztJosyL6ZSzx6nwHu22BS3LkSqpnHb0meYmhd42HisI 1SIg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j2si3373261pjt.122.2022.01.26.11.53.41; Wed, 26 Jan 2022 11:53:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235071AbiAZGKf (ORCPT + 99 others); Wed, 26 Jan 2022 01:10:35 -0500 Received: from mail-sh.amlogic.com ([58.32.228.43]:63091 "EHLO mail-sh.amlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234959AbiAZGKe (ORCPT ); Wed, 26 Jan 2022 01:10:34 -0500 Received: from droid01-cd.amlogic.com (10.98.11.200) by mail-sh.amlogic.com (10.18.11.5) with Microsoft SMTP Server id 15.1.2176.14; Wed, 26 Jan 2022 14:10:31 +0800 From: Shunzhou Jiang To: , , CC: , , , , , Subject: [PATCH 2/2] soc: s4: Add support for power domains controller Date: Wed, 26 Jan 2022 14:10:18 +0800 Message-ID: <20220126061018.705338-3-shunzhou.jiang@amlogic.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220126061018.705338-1-shunzhou.jiang@amlogic.com> References: <20220126061018.705338-1-shunzhou.jiang@amlogic.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.98.11.200] Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add support s4 Power controller. In s4, power control registers are in secure domain, and should be accessed by smc. Signed-off-by: Shunzhou Jiang --- drivers/soc/amlogic/meson-secure-pwrc.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/soc/amlogic/meson-secure-pwrc.c b/drivers/soc/amlogic/meson-secure-pwrc.c index 59bd195fa9c9..8fee01aabab6 100644 --- a/drivers/soc/amlogic/meson-secure-pwrc.c +++ b/drivers/soc/amlogic/meson-secure-pwrc.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -119,6 +120,17 @@ static struct meson_secure_pwrc_domain_desc a1_pwrc_domains[] = { SEC_PD(RSA, 0), }; +static struct meson_secure_pwrc_domain_desc s4_pwrc_domains[] = { + SEC_PD(S4_DOS_HEVC, 0), + SEC_PD(S4_DOS_VDEC, 0), + SEC_PD(S4_VPU_HDMI, GENPD_FLAG_ALWAYS_ON), + SEC_PD(S4_USB_COMB, GENPD_FLAG_ALWAYS_ON), + SEC_PD(S4_GE2D, 0), + SEC_PD(S4_ETH, GENPD_FLAG_ALWAYS_ON), + SEC_PD(S4_DEMOD, 0), + SEC_PD(S4_AUDIO, 0), +}; + static int meson_secure_pwrc_probe(struct platform_device *pdev) { int i; @@ -187,11 +199,20 @@ static struct meson_secure_pwrc_domain_data meson_secure_a1_pwrc_data = { .count = ARRAY_SIZE(a1_pwrc_domains), }; +static struct meson_secure_pwrc_domain_data meson_secure_s4_pwrc_data = { + .domains = s4_pwrc_domains, + .count = ARRAY_SIZE(s4_pwrc_domains), +}; + static const struct of_device_id meson_secure_pwrc_match_table[] = { { .compatible = "amlogic,meson-a1-pwrc", .data = &meson_secure_a1_pwrc_data, }, + { + .compatible = "amlogic,meson-s4-pwrc", + .data = &meson_secure_s4_pwrc_data, + }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, meson_secure_pwrc_match_table); -- 2.34.1