Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2503870lqb; Tue, 28 May 2024 01:42:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVbyliGmjYaCgs2+3Z97MyxZzPTSR0XKLi6O+QHgazIqWsjuQ3NK8cUISBZbtmTi1LRJXP7gQg3DAwvqm25AoGKX6QPEZXRKZSRaXpT8A== X-Google-Smtp-Source: AGHT+IFjfjhzmTNfMmJ5F7G19jXxOv8M6EM9S32YFeJZDDGojtmAMygDB97f4wtWZCZ3USA3UA1P X-Received: by 2002:a17:906:c94b:b0:a62:c5f:e34a with SMTP id a640c23a62f3a-a62643ecd57mr705020566b.39.1716885730887; Tue, 28 May 2024 01:42:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716885730; cv=pass; d=google.com; s=arc-20160816; b=BX41Xvo3lmH6YLE/gJA5wE7LcIPnoRJmXUZX4WpyO3CU0t7GwyBGB4pKmbwsujqPIG n58jbgeetWejhtLsTtYI4QErwKREuCWlzKlOkg1LYuh0hPXvTS3WSNNSswUE49eN+cBy uZaImO2aTMhb0ZigZXHcT/XBo0j32R6dl6T8AmkWAzAOsYD6yn229RVSf0PdoUts5b1r iWeldRXsf64bHfelr+OewPUIH2a6PgoZhQlayGb4XXrrR0oG8FJ/ZP1L/U2OR+MQ9Ymk munxyTEqihI1HeHfx/R2i211ScS9MVZN2m/xHYGnJafmk0rpShFXRPVJjLi0SPWIO0Pq fdXA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :date:message-id:dkim-signature; bh=kQM6HYhZbxPatU25g9nxoYtgAi0elYZKvX9/9nM9Kkg=; fh=1vuT08zp8vAIlA46IQPlX67sD9t5uSZU0xmT1PP3uKM=; b=CVGoU6cmNzezEvI7Qcq3Z2zUJMSyZ4gx244PahmpDyJndOgZilJCzyev+O9o5rJDtG Ias0Vj8zK3XAZI5ZUXfp/o93KVIPw2T/8xwVxCSatxYqydj5Z4Gm5dFIf9uJ0YQLHHjI lsHrp6PrKDUf3TeHyy8nIV3AUzLR+xGcBegcoeVD+rYltzWrGvOe42n/3VBvrDOSlgsS tBdqiMC+A4FFzNX7S8mFBVYOTFX9nhUJ5cdCtKSsCWLNcvkJQm/kD5E8Eh/heDkVTzlQ fJZxC1PNog5Erybk+57QaytczJFDPFYtjiXw0exsMh8d4BG5yOaVQVrwIBksi/8Cn69e dTzg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GCs2QOAY; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-191950-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191950-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a626cdd15a7si489520566b.926.2024.05.28.01.42.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 01:42:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191950-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GCs2QOAY; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-191950-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191950-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 73F2A1F2151E for ; Tue, 28 May 2024 08:42:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A8B4A13C9AF; Tue, 28 May 2024 08:42:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="GCs2QOAY" Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (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 629796D1A6 for ; Tue, 28 May 2024 08:41:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716885721; cv=none; b=McxfD5IAaqNhpk2pqFgyIekkrAazwFoJD9de2bLnFvHMEyZgdi8ly7EKIh1H0EzQADaQiNbqsCgjkwsEtPb+rKi9m1kvas9obT4uEIT1Vml1ll/XsL6+4/7GCuO0RU5hkD5DxLsT56cyrJlnRXdL3OSRaoxoCAYYLbTiOEQT8Wo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716885721; c=relaxed/simple; bh=iXf/xBSZbXbRyTAieBsxS0pwSufFB+gzmegcfsajFxY=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=hX0LlNDk38FYB+M+CMW3K3d+Z9R0bhTStVJlF52wh/TiA2TUX4Cfrn7uP0D0AhXsW96zYjjhQ4p6obkmr0bLp5gputoH7JKMpKq40/JHD+9rzdLCroXaMz5ES4AabFYicvFBe0Dcgw3zlLeMH4Vui/TPHBmX9MFFSWrRAVXhoks= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=GCs2QOAY; arc=none smtp.client-ip=209.85.167.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-529b79609cbso952874e87.3 for ; Tue, 28 May 2024 01:41:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716885717; x=1717490517; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=kQM6HYhZbxPatU25g9nxoYtgAi0elYZKvX9/9nM9Kkg=; b=GCs2QOAYwI/cNnGULvv2DzlwG3xdNzoktih0xQXBcgeBi59ZSwQEf0Rzx1QKOFnsI2 v6DPhkN+vrPBIJvCIk7GafZyAhrEN0NSfIZSlKP9C4wreG3u5PIQIhq5EnM6uPCI3oTB m3itAyus5HS9GOCXmueqxjZDYWr4MCjKz2B57L8h/Z4mLsvA88OL5pPj9OcgWqfN2cml M/ALOd1T0zFU/GbEhkVIzyk36sJYR4NxLezOpA0npHmaK0wUG0RbASl6yXlhuVQkstfO p7bJWKgeKtpyNS97OOcrHhRIphOlgyK6aUHOhF+L7xyjEvVpRcxFo7jvhza065Np0IQD Usvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716885717; x=1717490517; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=kQM6HYhZbxPatU25g9nxoYtgAi0elYZKvX9/9nM9Kkg=; b=dpwAOmErJ/lctJbEgsrFqEuxT9iJQx3gkeU49Nn+JGVCSz2D8cn7bQPU0wkrRBbPYi tVvxw5ounFwP7jAwJqNR9WHW5iHR/RZKe9/eYnqczpu4npdv5HpYIDQrdpw8qQci3k9P XEjsTfV1N2ubQRbEzVcsx850PounVaO7pa03HBRCGjTwZyr2rCusJcIa0O0o8wWYuKRo 9Ay3ifmiDAl7Jot3FaXpIWqdfbOnAGao/xshCo1xW2dzKpETcryeiN527NGQmuL81We2 YO3Jv7qwkIZYSWJ0doBACHDHrJoVIq2obk6PZ3of4q/WEDAVLAWQGkBxhJ8lbacEQR+C dFiw== X-Forwarded-Encrypted: i=1; AJvYcCUSPqV4IIXCJm/Qn/UY+Ho7376DDPOsIvGw9DD5x83AyKt6fzy4oCF+y9jnlhWf3AIq5sfhlCHfypIqWofDYsLHH7lc+VXKUX4GHGiG X-Gm-Message-State: AOJu0YxA9eHNsXtgCnuj9LNZMLXWDPWrU1QOef0VcyOhfx0urltf9iSn 57Jd17A756JQ4OniZnNBjn5JESkBkZtqrmHMJhAI31RiEoHktbIqihHpExOeDPc= X-Received: by 2002:a05:6512:3e13:b0:524:43b2:d326 with SMTP id 2adb3069b0e04-52964ca75d5mr8748177e87.37.1716885717433; Tue, 28 May 2024 01:41:57 -0700 (PDT) Received: from ?IPV6:2a01:e0a:982:cbb0:8f19:f965:3f93:6385? ([2a01:e0a:982:cbb0:8f19:f965:3f93:6385]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4210896676bsm135394835e9.4.2024.05.28.01.41.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 May 2024 01:41:57 -0700 (PDT) Message-ID: <2f074d47-3021-4d81-93cd-c8e4593f0b0f@linaro.org> Date: Tue, 28 May 2024 10:41:56 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Neil Armstrong Reply-To: neil.armstrong@linaro.org Subject: Re: [PATCH 2/3] pmdomain: amlogic: Add support for A4 power domains controller To: xianwei.zhao@amlogic.com, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Jianxin Pan , Ulf Hansson Cc: 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 References: <20240528-a4_secpowerdomain-v1-0-2a9d7df9b128@amlogic.com> <20240528-a4_secpowerdomain-v1-2-2a9d7df9b128@amlogic.com> Content-Language: en-US, fr Autocrypt: addr=neil.armstrong@linaro.org; keydata= xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik 80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB AAHNKk5laWwgQXJtc3Ryb25nIDxuZWlsLmFybXN0cm9uZ0BsaW5hcm8ub3JnPsLAkQQTAQoA OwIbIwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgBYhBInsPQWERiF0UPIoSBaat7Gkz/iuBQJk Q5wSAhkBAAoJEBaat7Gkz/iuy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u7uZFAcmp6h8g Organization: Linaro In-Reply-To: <20240528-a4_secpowerdomain-v1-2-2a9d7df9b128@amlogic.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 28/05/2024 10:39, Xianwei Zhao via B4 Relay wrote: > From: Xianwei Zhao > > Add support for A4 power controller. A4 power control > registers are in secure domain, and should be accessed by SMC. > > Signed-off-by: Xianwei Zhao > --- > drivers/pmdomain/amlogic/meson-secure-pwrc.c | 28 ++++++++++++++++++++++++++++ > 1 file changed, 28 insertions(+) > > diff --git a/drivers/pmdomain/amlogic/meson-secure-pwrc.c b/drivers/pmdomain/amlogic/meson-secure-pwrc.c > index 4d5bda0d60fc..3a84d8a74a5e 100644 > --- a/drivers/pmdomain/amlogic/meson-secure-pwrc.c > +++ b/drivers/pmdomain/amlogic/meson-secure-pwrc.c > @@ -14,6 +14,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -136,6 +137,24 @@ static struct meson_secure_pwrc_domain_desc a1_pwrc_domains[] = { > SEC_PD(RSA, 0), > }; > > +static struct meson_secure_pwrc_domain_desc a4_pwrc_domains[] = { > + SEC_PD(A4_AUDIO, 0), > + SEC_PD(A4_SDIOA, 0), > + SEC_PD(A4_EMMC, 0), > + SEC_PD(A4_USB_COMB, 0), > + SEC_PD(A4_ETH, 0), > + SEC_PD(A4_VOUT, 0), > + SEC_PD(A4_AUDIO_PDM, 0), > + /* DMC is for DDR PHY ana/dig and DMC, and should be always on */ > + SEC_PD(A4_DMC, GENPD_FLAG_ALWAYS_ON), > + /* WRAP is secure_top, a lot of modules are included, and should be always on */ > + SEC_PD(A4_SYS_WRAP, GENPD_FLAG_ALWAYS_ON), > + SEC_PD(A4_AO_I2C_S, 0), > + SEC_PD(A4_AO_UART, 0), > + /* IR is wake up trigger source, and should be always on */ > + SEC_PD(A4_AO_IR, GENPD_FLAG_ALWAYS_ON), > +}; > + > static struct meson_secure_pwrc_domain_desc c3_pwrc_domains[] = { > SEC_PD(C3_NNA, 0), > SEC_PD(C3_AUDIO, 0), > @@ -311,6 +330,11 @@ 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 amlogic_secure_a4_pwrc_data = { > + .domains = a4_pwrc_domains, > + .count = ARRAY_SIZE(a4_pwrc_domains), > +}; > + > static struct meson_secure_pwrc_domain_data amlogic_secure_c3_pwrc_data = { > .domains = c3_pwrc_domains, > .count = ARRAY_SIZE(c3_pwrc_domains), > @@ -331,6 +355,10 @@ static const struct of_device_id meson_secure_pwrc_match_table[] = { > .compatible = "amlogic,meson-a1-pwrc", > .data = &meson_secure_a1_pwrc_data, > }, > + { > + .compatible = "amlogic,a4-pwrc", > + .data = &amlogic_secure_a4_pwrc_data, > + }, > { > .compatible = "amlogic,c3-pwrc", > .data = &amlogic_secure_c3_pwrc_data, > Reviewed-by: Neil Armstrong