From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 D178FC48BF6 for ; Sun, 3 Mar 2024 12:20:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VLri/ysUACuuoKs9AIbn4p1wSZNxih1dIAXlq9RRGpE=; b=JFQBR+tn4IEsNo 6qVh1CkmFYmX9sjkATr6SCzNXcEI6ASOB2qe2uchgjzxaDQIcmRrLT9fLsSxbaKj0Q6WkUKt7k51U aikPcFyxCRxv20MfCP+pQj6pp6GW+NAK+noCBbsGJqisGg6Fa2nEH17FguRRo1NyYq/o3quPVp84j 561OISfUjq4zkcELw8QWTfIOwLAG2qL8/1FxWiYmmLpr/XHvFk2ZlEMvB04QvcYPOP1QXAy75PsIh G9OMzTcEeOLb9bHeZRHIdnV2LE04/6AAhKNmA0woIwFkgcGuVnsdCkYjHSPItJpySdeW7VoWKHO03 +zPgzJsqWZdFbc+3fOJg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rgkpZ-00000005qvD-3qZo; Sun, 03 Mar 2024 12:20:37 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rgkpX-00000005qtJ-2qYI for linux-arm-kernel@lists.infradead.org; Sun, 03 Mar 2024 12:20:36 +0000 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-33d36736d4eso2221549f8f.1 for ; Sun, 03 Mar 2024 04:20:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1709468427; x=1710073227; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=6hGP8nPJ4zBlr5ATaqe7TvqsCYAUH4huvCOpVwZCWko=; b=BDZQozuWFif/EnPBwUbGd5sOCYrTy+JARfBm+I8A2CVAXmJ7O1OLhryOqA7lFXoQaL MmpMXl+/y70COyB3UPv97dnqpe53hJOxlzay90+TUH9wGRqy9e7i4viCVvjHBjchFrcO pcCj1k4lLAEsrTSR+ggjPQWxd8OctLjr9hadZpWmkggEA0iFX8Ug3fBw1+JR3P0IMRfO grr57DZUA86MP/Y1Cd9AOIqTqgUX0xuH/8waoNzLZL5Iguoc9wONL2J7Wko+VtRwnCJd jEaRtBFA+K11t9N8z3E5Ulg6aAET1LO/yOWCZrMMJqCSh1rbej4NIqOyIsXMuyIjgsOe g+yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709468427; x=1710073227; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6hGP8nPJ4zBlr5ATaqe7TvqsCYAUH4huvCOpVwZCWko=; b=vu3XPBUETqEiUDgmP6kJL88T+AbrtQZPsoe7Vc45hr6gArREFMJsFs9UShzldP75wC aoCT6lug4+hm4a+7mlOa293ixtgfM7oFIiyXAhcwwZAImm6ilZZyBD6L/53QorRRosbK 9MMRBKnLef0XU0gHH8aiSAeXB00Fn5nFmprMOejaEEHnoIh+trksEsuizwr6I/ZU+g3y ZSbLIOTXRRAnegcw4sezbEEl2nmREkUvAyX/sL5/JrU8E+pGFyxhfWkLX5j7OqmdZCNB ndzFuUEvqR8qwUA/TLWF3L/yhgeFyoetiTzmkiN2Dvxmu257A7UXEdAANAWHFeZPnhGL +vhA== X-Forwarded-Encrypted: i=1; AJvYcCWATk1gYaKvfBu0ioqDM7FKg5ein8u18e9S0NKrqlz05YkijoMGdV2mDMi+AhSKpXG8qKQeRt/gEO/XqED3vyMlWRZ9akqVzGcButo/KlF6lQvbExY= X-Gm-Message-State: AOJu0YykNf6SFpyZY6377jyIJ7Jwz/gjUDFGNtxZH4mNE4AkNy0totkN Wpenv26URQ4b+Uge+URYODM2QppJVsfnD8dHlObUI+JHIURZkMl2Xe4b/HIauEk= X-Google-Smtp-Source: AGHT+IHxUFsWj6NHWvt5Qu275Mx9UvgIpyd38HOLY97zj3s/XedWNG5rR47TQkP8/pApTLAr30bO7A== X-Received: by 2002:a5d:4fcd:0:b0:33e:656:1175 with SMTP id h13-20020a5d4fcd000000b0033e06561175mr4595946wrw.63.1709468426921; Sun, 03 Mar 2024 04:20:26 -0800 (PST) Received: from [192.168.50.4] ([82.78.167.38]) by smtp.gmail.com with ESMTPSA id dw2-20020a0560000dc200b0033ddfba0c67sm9477927wrb.41.2024.03.03.04.20.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 03 Mar 2024 04:20:26 -0800 (PST) Message-ID: <024581f9-b5b7-42c2-8f6f-687dc76abe23@tuxon.dev> Date: Sun, 3 Mar 2024 14:20:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 18/39] ARM: at91: pm: add support for sam9x7 SoC family To: Varshini Rajendran , linux@armlinux.org.uk, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Claudiu Beznea References: <20240223171342.669133-1-varshini.rajendran@microchip.com> <20240223172705.672488-1-varshini.rajendran@microchip.com> From: claudiu beznea Content-Language: en-US In-Reply-To: <20240223172705.672488-1-varshini.rajendran@microchip.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240303_042035_780493_DD5A74CF X-CRM114-Status: GOOD ( 21.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, Varshini, On 23.02.2024 19:27, Varshini Rajendran wrote: > Add support and pm init config for sam9x7 SoC. > > Signed-off-by: Varshini Rajendran > Reviewed-by: Claudiu Beznea > --- > arch/arm/mach-at91/generic.h | 2 ++ > arch/arm/mach-at91/pm.c | 35 +++++++++++++++++++++++++++++++++++ > 2 files changed, 37 insertions(+) > > diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h > index 0c3960a8b3eb..acf0b3c82a30 100644 > --- a/arch/arm/mach-at91/generic.h > +++ b/arch/arm/mach-at91/generic.h > @@ -12,6 +12,7 @@ > extern void __init at91rm9200_pm_init(void); > extern void __init at91sam9_pm_init(void); > extern void __init sam9x60_pm_init(void); > +extern void __init sam9x7_pm_init(void); > extern void __init sama5_pm_init(void); > extern void __init sama5d2_pm_init(void); > extern void __init sama7_pm_init(void); > @@ -19,6 +20,7 @@ extern void __init sama7_pm_init(void); > static inline void __init at91rm9200_pm_init(void) { } > static inline void __init at91sam9_pm_init(void) { } > static inline void __init sam9x60_pm_init(void) { } > +static inline void __init sam9x7_pm_init(void) { } > static inline void __init sama5_pm_init(void) { } > static inline void __init sama5d2_pm_init(void) { } > static inline void __init sama7_pm_init(void) { } > diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c > index 345b91dc6627..b81556387aa3 100644 > --- a/arch/arm/mach-at91/pm.c > +++ b/arch/arm/mach-at91/pm.c > @@ -233,6 +233,17 @@ static const struct of_device_id sama7g5_ws_ids[] = { > { /* sentinel */ } > }; > > +static const struct of_device_id sam9x7_ws_ids[] = { > + { .compatible = "microchip,sam9x60-rtc", .data = &ws_info[1] }, microchip,sam9x7-rtc > + { .compatible = "atmel,at91rm9200-ohci", .data = &ws_info[2] }, > + { .compatible = "usb-ohci", .data = &ws_info[2] }, > + { .compatible = "atmel,at91sam9g45-ehci", .data = &ws_info[2] }, > + { .compatible = "usb-ehci", .data = &ws_info[2] }, These 4 are not present in the sam9x7 dtsi. > + { .compatible = "microchip,sam9x60-rtt", .data = &ws_info[4] }, microchip,sam9x7-rtt > + { .compatible = "microchip,sam9x7-gem", .data = &ws_info[5] }, > + { /* sentinel */ } > +}; > + > static int at91_pm_config_ws(unsigned int pm_mode, bool set) > { > const struct wakeup_source_info *wsi; > @@ -1135,6 +1146,7 @@ static const struct of_device_id gmac_ids[] __initconst = { > { .compatible = "atmel,sama5d2-gem" }, > { .compatible = "atmel,sama5d29-gem" }, > { .compatible = "microchip,sama7g5-gem" }, > + { .compatible = "microchip,sam9x7-gem" }, AT91_PM_IOMAP(ETHC) is not in the list of any PM mode iomaps, thus, this is not used at the moment. You can remove it and add (proper compatibles) when needed, if any. > { }, > }; > > @@ -1362,6 +1374,7 @@ static const struct of_device_id atmel_pmc_ids[] __initconst = { > { .compatible = "atmel,sama5d2-pmc", .data = &pmc_infos[1] }, > { .compatible = "microchip,sam9x60-pmc", .data = &pmc_infos[4] }, > { .compatible = "microchip,sama7g5-pmc", .data = &pmc_infos[5] }, > + { .compatible = "microchip,sam9x7-pmc", .data = &pmc_infos[4] }, > { /* sentinel */ }, > }; > > @@ -1499,6 +1512,28 @@ void __init sam9x60_pm_init(void) > soc_pm.config_pmc_ws = at91_sam9x60_config_pmc_ws; > } > > +void __init sam9x7_pm_init(void) > +{ > + static const int modes[] __initconst = { > + AT91_PM_STANDBY, AT91_PM_ULP0, > + }; > + You can remove this blank line. > + int ret; > + > + if (!IS_ENABLED(CONFIG_SOC_SAM9X7)) > + return; > + > + at91_pm_modes_validate(modes, ARRAY_SIZE(modes)); > + ret = at91_dt_ramc(false); > + if (ret) > + return; > + > + at91_pm_init(NULL); > + > + soc_pm.ws_ids = sam9x7_ws_ids; > + soc_pm.config_pmc_ws = at91_sam9x60_config_pmc_ws; > +} > + > void __init at91sam9_pm_init(void) > { > int ret; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel