From patchwork Thu Dec 16 14:13:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12681295 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 47C7CC433EF for ; Thu, 16 Dec 2021 14:11:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237757AbhLPOLa (ORCPT ); Thu, 16 Dec 2021 09:11:30 -0500 Received: from esa.microchip.iphmx.com ([68.232.153.233]:10939 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237754AbhLPOLa (ORCPT ); Thu, 16 Dec 2021 09:11:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1639663889; x=1671199889; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=Cn32FVsFXj7kfAuzJ2kdL23yH/APr88N4Syy5Ekn8OM=; b=eyeJFPQDyPJd3HHTMpXpD4QCGvBK+u86+KskR+rUTzuVn6hmvGIw5fJ4 Qr5o8TaK8hto5R0OfW1H2GqezReCutr7v9PWOnHTS6/Empb/cMEfsowKt +BEQbJTun/X5IAFsyPnH+eagOA8NK7KwkqRFqSbZSFoeXZXNpd00EOfZy ILwKbeVOZk/Ss3aOpb3dk/jDSQlHN6hRJahm8pcscoi9fghpfnJ+p638o Gl1Wx2PBWNlM/ogRBjG0O7GPZlFTDrItf4Xzh1I+vIbRDrweVYvGyfBGw B3C+PQPJsUdhpUFO35cRd7G3TFElWIMf9iJphC442nHbkubvVfjW1EwdU A==; IronPort-SDR: 6hpipkpsGy1eUV4LY0tRSeT+Vo5RQrrGtrB01+f9j4W8WkpaXasP9jEgVzJo9r/ZZL/r3StRWn bZNttU9TS2p6YGGj1BNkvJSkeXcQZHBRyLGGSS2vIcHQrosbR8i5tylctMkjYIaWIMbmKp3vn2 RLR19yArvbnW/+lBPtgj0zUs7/BHLownkqw6ukWWx0wWkiQ3Pu7XwNB03XA6OM7Shi4UHbhO+m wpJGDGP1i4kl7E2783ulH7p/Uj0FocybyfBTHHXP6D3fpL5/YS2tT6UrfLXnMnNMfbeJV5YVG2 9UuwZqMpRAgLaTl/PZBX/frA X-IronPort-AV: E=Sophos;i="5.88,211,1635231600"; d="scan'208";a="147461397" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 16 Dec 2021 07:11:28 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 16 Dec 2021 07:11:28 -0700 Received: from rob-dk-mpu02.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 16 Dec 2021 07:11:25 -0700 From: Claudiu Beznea To: , , , , , , CC: , , , Subject: [PATCH 1/8] ARM: at91: ddr: remove CONFIG_SOC_SAMA7 dependency Date: Thu, 16 Dec 2021 16:13:31 +0200 Message-ID: <20211216141338.35144-2-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211216141338.35144-1-claudiu.beznea@microchip.com> References: <20211216141338.35144-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Remove CONFIG_SOC_SAMA7 dependency to avoid having #ifdef preprocessor directives in driver code (arch/arm/mach-at91/pm.c). This prepares the code for next commits. Signed-off-by: Claudiu Beznea --- include/soc/at91/sama7-ddr.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/include/soc/at91/sama7-ddr.h b/include/soc/at91/sama7-ddr.h index f6542584ca13..13b47e26cdbe 100644 --- a/include/soc/at91/sama7-ddr.h +++ b/include/soc/at91/sama7-ddr.h @@ -11,8 +11,6 @@ #ifndef __SAMA7_DDR_H__ #define __SAMA7_DDR_H__ -#ifdef CONFIG_SOC_SAMA7 - /* DDR3PHY */ #define DDR3PHY_PIR (0x04) /* DDR3PHY PHY Initialization Register */ #define DDR3PHY_PIR_DLLBYP (1 << 17) /* DLL Bypass */ @@ -75,6 +73,4 @@ #define UDDRC_PCTRL_3 (0x6A0) /* UDDRC Port 3 Control Register */ #define UDDRC_PCTRL_4 (0x750) /* UDDRC Port 4 Control Register */ -#endif /* CONFIG_SOC_SAMA7 */ - #endif /* __SAMA7_DDR_H__ */ From patchwork Thu Dec 16 14:13:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12681297 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 6EDD2C433EF for ; Thu, 16 Dec 2021 14:11:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237767AbhLPOLd (ORCPT ); Thu, 16 Dec 2021 09:11:33 -0500 Received: from esa.microchip.iphmx.com ([68.232.154.123]:4013 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237766AbhLPOLc (ORCPT ); Thu, 16 Dec 2021 09:11:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1639663892; x=1671199892; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=DSaF+rce8x7D+Hdysx6zQcXry3snwSGAnsCyiWnFVNw=; b=a6vGTp6pPnMnaanHuprrsdi6mkZRKe6aAI0yGossFQ2IgLmAwxJ4vtbw 5pZ0Qa2Bz27UI1Kqv0MveKvvmQVByrZkKWGz/z4GCWTJ3PuA8G3Eklv/K 1ayxn2Fzf/eem5olaw2vEF8ntY08wpucx0axZaX+p6wtXXpZGsvMK0PT0 ZbJXJgp2Cl2oCYH2+4tJYDTZeFfPeRknzcoXcSiT6sq7x+VVz2eTocC9Z AyWWiXxtIFnbPCE72oyMN0fhSPPxXVG70s1IB7ICzpxC47ZWne2laWVHG hEOQ7FsS0MV4bPfLO8+pqiVTi4RCJZmEtItX/edNbdc1X2ltsl0gOWhrE g==; IronPort-SDR: 26KbRLjsFVEu7kzGesrBsmYP0+8JS1futd22WR8gy3aIoDjfTvn514C7cV398ehOzpCMwWI7Qm bu/46vEf5o/fxA2u0ncAi/2sgEA1uzEnSTKHHEzKdEWcwzS5Sr1s58b4U/FdflILpztc11apig /yIvXU2kcHMJtOicHwvzM6pD7/WTadoz2vYMoESl1e99e5+IMB3CUmgtPb40ED7y53iVKqHfHD d2Ez/S+LeCJ1j++O99msdShzqB9mqiHIX0AqLZcjPC9KfRMwU3y6AFX0m+MSO2vl+E91CplNlX P4MfJ70NiA9k7f3dEtwEg7wa X-IronPort-AV: E=Sophos;i="5.88,211,1635231600"; d="scan'208";a="142638372" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 16 Dec 2021 07:11:31 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 16 Dec 2021 07:11:30 -0700 Received: from rob-dk-mpu02.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 16 Dec 2021 07:11:28 -0700 From: Claudiu Beznea To: , , , , , , CC: , , , Subject: [PATCH 2/8] ARM: at91: ddr: align macro definitions Date: Thu, 16 Dec 2021 16:13:32 +0200 Message-ID: <20211216141338.35144-3-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211216141338.35144-1-claudiu.beznea@microchip.com> References: <20211216141338.35144-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Align all macro definitions. Signed-off-by: Claudiu Beznea --- include/soc/at91/sama7-ddr.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/soc/at91/sama7-ddr.h b/include/soc/at91/sama7-ddr.h index 13b47e26cdbe..817b360efbb8 100644 --- a/include/soc/at91/sama7-ddr.h +++ b/include/soc/at91/sama7-ddr.h @@ -13,11 +13,11 @@ /* DDR3PHY */ #define DDR3PHY_PIR (0x04) /* DDR3PHY PHY Initialization Register */ -#define DDR3PHY_PIR_DLLBYP (1 << 17) /* DLL Bypass */ +#define DDR3PHY_PIR_DLLBYP (1 << 17) /* DLL Bypass */ #define DDR3PHY_PIR_ITMSRST (1 << 4) /* Interface Timing Module Soft Reset */ -#define DDR3PHY_PIR_DLLLOCK (1 << 2) /* DLL Lock */ +#define DDR3PHY_PIR_DLLLOCK (1 << 2) /* DLL Lock */ #define DDR3PHY_PIR_DLLSRST (1 << 1) /* DLL Soft Rest */ -#define DDR3PHY_PIR_INIT (1 << 0) /* Initialization Trigger */ +#define DDR3PHY_PIR_INIT (1 << 0) /* Initialization Trigger */ #define DDR3PHY_PGCR (0x08) /* DDR3PHY PHY General Configuration Register */ #define DDR3PHY_PGCR_CKDV1 (1 << 13) /* CK# Disable Value */ @@ -65,7 +65,7 @@ #define UDDRC_SWSTAT_SW_DONE_ACK (1 << 0) /* Register programming done */ #define UDDRC_PSTAT (0x3FC) /* UDDRC Port Status Register */ -#define UDDRC_PSTAT_ALL_PORTS (0x1F001F) /* Read + writes outstanding transactions on all ports */ +#define UDDRC_PSTAT_ALL_PORTS (0x1F001F) /* Read + writes outstanding transactions on all ports */ #define UDDRC_PCTRL_0 (0x490) /* UDDRC Port 0 Control Register */ #define UDDRC_PCTRL_1 (0x540) /* UDDRC Port 1 Control Register */ From patchwork Thu Dec 16 14:13:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12681299 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 57585C433F5 for ; Thu, 16 Dec 2021 14:11:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237772AbhLPOLg (ORCPT ); Thu, 16 Dec 2021 09:11:36 -0500 Received: from esa.microchip.iphmx.com ([68.232.154.123]:4013 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237777AbhLPOLe (ORCPT ); Thu, 16 Dec 2021 09:11:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1639663895; x=1671199895; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=8B+mjGEHiWRvOo09WcjQMA43OD+N7/Tq2fPJzC7/86M=; b=Vqi+N2blEMlHyRuzZ+S741qfwkppwDCOQXCWNF+i41PaKTpJMkVz3Hcg KzFO2BT6oAb2wVApv+gXa4stfr6WLFCDT/lfF8oteN1DP03k57IfYgL+t Oy+u49xTOwcG5562sgOgIipcYzDbQlbOzv9oqI7gHjanzzz8rR6QnEalJ 9Ssf9qq/WDqHAJYP4wHgBsK+ZMJ5RqjwMRuaY4silsdZpu4dWfkv84MSQ FmaJG8hqqieV0/mhoDEbw0k6D5CIJMfeKGwYxsQs/M7eKdwR3FQlA1Pk9 Ld4jsV4Wfe8AQZZBJxEMgDqJ3zWzNtUtVsjqXAE4oRa2vtgF1q9fe16f1 g==; IronPort-SDR: Qyh4Z3CHOoL6ZV9VjvmkXdDjRb1Qx5zqIIxIcW5y+zEZ0vhT1K98c91Pjpg2hRsxOq4wDLbUpu IIsq5w3kM+/x0vp3xrEZN3TyJ53wP+1OIy2ZqFwrI0Jr91183Pg+78Zgytd6aHYARHSZdiTUnb AeT0N3RXbcRX1aLJPAG9WtUk544P8/w+X3src1zrbWYuO/gyZXs61uIzvx2cCLxIp2Xxuijt24 +0sut8B+0ZH7zFLD0FPir+FBC0sfslvmf0yRpK/QJ46PbZDCu6PJzHKQFeY0n2I/jwBizs9/O3 Ae1VK5vSc1oJ0rDFMpqQawP8 X-IronPort-AV: E=Sophos;i="5.88,211,1635231600"; d="scan'208";a="142638381" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 16 Dec 2021 07:11:34 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 16 Dec 2021 07:11:33 -0700 Received: from rob-dk-mpu02.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 16 Dec 2021 07:11:31 -0700 From: Claudiu Beznea To: , , , , , , CC: , , , Subject: [PATCH 3/8] ARM: at91: ddr: fix typo to align with datasheet naming Date: Thu, 16 Dec 2021 16:13:33 +0200 Message-ID: <20211216141338.35144-4-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211216141338.35144-1-claudiu.beznea@microchip.com> References: <20211216141338.35144-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Fix typo on UDDRC_PWRCTL.SELFREF_SW bitmask to align with datasheet naming. Signed-off-by: Claudiu Beznea --- arch/arm/mach-at91/pm_suspend.S | 4 ++-- include/soc/at91/sama7-ddr.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-at91/pm_suspend.S b/arch/arm/mach-at91/pm_suspend.S index fdb4f63ecde4..abe4ced33eda 100644 --- a/arch/arm/mach-at91/pm_suspend.S +++ b/arch/arm/mach-at91/pm_suspend.S @@ -159,7 +159,7 @@ sr_ena_1: /* Switch to self-refresh. */ ldr tmp1, [r2, #UDDRC_PWRCTL] - orr tmp1, tmp1, #UDDRC_PWRCTRL_SELFREF_SW + orr tmp1, tmp1, #UDDRC_PWRCTL_SELFREF_SW str tmp1, [r2, #UDDRC_PWRCTL] sr_ena_2: @@ -276,7 +276,7 @@ sr_dis_5: /* Trigger self-refresh exit. */ ldr tmp1, [r2, #UDDRC_PWRCTL] - bic tmp1, tmp1, #UDDRC_PWRCTRL_SELFREF_SW + bic tmp1, tmp1, #UDDRC_PWRCTL_SELFREF_SW str tmp1, [r2, #UDDRC_PWRCTL] sr_dis_6: diff --git a/include/soc/at91/sama7-ddr.h b/include/soc/at91/sama7-ddr.h index 817b360efbb8..fee1b11bddca 100644 --- a/include/soc/at91/sama7-ddr.h +++ b/include/soc/at91/sama7-ddr.h @@ -53,7 +53,7 @@ #define UDDRC_STAT_OPMODE_MSK (0x7 << 0) /* Operating mode mask */ #define UDDRC_PWRCTL (0x30) /* UDDRC Low Power Control Register */ -#define UDDRC_PWRCTRL_SELFREF_SW (1 << 5) /* Software self-refresh */ +#define UDDRC_PWRCTL_SELFREF_SW (1 << 5) /* Software self-refresh */ #define UDDRC_DFIMISC (0x1B0) /* UDDRC DFI Miscellaneous Control Register */ #define UDDRC_DFIMISC_DFI_INIT_COMPLETE_EN (1 << 0) /* PHY initialization complete enable signal */ From patchwork Thu Dec 16 14:13:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12681301 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 2A5F7C433EF for ; Thu, 16 Dec 2021 14:11:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237802AbhLPOLl (ORCPT ); Thu, 16 Dec 2021 09:11:41 -0500 Received: from esa.microchip.iphmx.com ([68.232.153.233]:10973 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237784AbhLPOLj (ORCPT ); Thu, 16 Dec 2021 09:11:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1639663899; x=1671199899; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=tdY/B8hRRCxkMeWlkMCdQd3n47eoyj1Pt6q/MH/LGRg=; b=CDQn4W+iVHCzGwtRV7JjXY7ebxEJ+KMJsFzsiIiIKw98vCZ5bsV3W0km jrM+oD6yNQZSxkcqR7XrzyrJ3O0cDSkcUQU7BYax20LRN7SaSH+/fda5g Lq9/vtwdb0MEJEMV6JHGOLU5vZwY8BuU7amYp0B7kAmMQsysyT1Xd5+m6 zkpbmmkpTmFyb1jCIifJTE6FVFrdGEHj7rVaFdSnIm4Qce/4tr5YL9iT1 CqiPJFV8z+HTNrpjCa+68tqMkcYlaL0vDG9cWuTVoswIifwdDuLBvvKU5 M4ENZnsjKmZNHSK4SaL3IbCppUQ1ORFD44QQAE97lrt9YTE1SBiSO1uEp g==; IronPort-SDR: D1+OaanKn564ObLRs5KR4ccJ+quoUtcoMr+IPSWsxCoD8Yhj+DJld1pOPyFs10mBhwh7tJdWEn EoCsIkba+L7sGtzr5NhnDqDRnIojo4toK7MM2bvhsIr88wDlT7PPMyAkagkYfvTMx17wqJ6jUy 6r1rx3LphRXMMCRdN38M11GLFqp20vDVP6YH0bjWZSaLSrE+G/uxtQfFcgM4qesUya99Vv86Kp CfrrHHoVpAvhs3nVhGnzz0oc8/JEA7nsiioTUCl6przIt4p+wduxB2x7x+j3boqokEM0WNi2Tu PDSuuMwbbA6FoijNYr/Uxx8i X-IronPort-AV: E=Sophos;i="5.88,211,1635231600"; d="scan'208";a="147461446" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 16 Dec 2021 07:11:38 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 16 Dec 2021 07:11:36 -0700 Received: from rob-dk-mpu02.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 16 Dec 2021 07:11:34 -0700 From: Claudiu Beznea To: , , , , , , CC: , , , Subject: [PATCH 4/8] ARM: at91: PM: add cpu idle support for sama7g5 Date: Thu, 16 Dec 2021 16:13:34 +0200 Message-ID: <20211216141338.35144-5-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211216141338.35144-1-claudiu.beznea@microchip.com> References: <20211216141338.35144-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Add CPU idle support for SAMA7G5. Support will make use of PMC_CPU_RATIO register to divide the CPU clock by 16 before switching it to idle and use automatic self-refresh option of DDR controller. Signed-off-by: Claudiu Beznea Acked-by: Stephen Boyd --- arch/arm/mach-at91/pm.c | 27 ++++++++++++++++++++++++++- include/linux/clk/at91_pmc.h | 4 ++++ include/soc/at91/sama7-ddr.h | 1 + 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index dd6f4ce3f766..0fd609e26615 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c @@ -605,6 +605,30 @@ static void at91sam9_sdram_standby(void) at91_ramc_write(1, AT91_SDRAMC_LPR, saved_lpr1); } +static void sama7g5_standby(void) +{ + int pwrtmg, ratio; + + pwrtmg = readl(soc_pm.data.ramc[0] + UDDRC_PWRCTL); + ratio = readl(soc_pm.data.pmc + AT91_PMC_RATIO); + + /* + * Place RAM into self-refresh after a maximum idle clocks. The maximum + * idle clocks is configured by bootloader in + * UDDRC_PWRMGT.SELFREF_TO_X32. + */ + writel(pwrtmg | UDDRC_PWRCTL_SELFREF_EN, + soc_pm.data.ramc[0] + UDDRC_PWRCTL); + /* Divide CPU clock by 16. */ + writel(ratio & ~AT91_PMC_RATIO_RATIO, soc_pm.data.pmc + AT91_PMC_RATIO); + + cpu_do_idle(); + + /* Restore previous configuration. */ + writel(ratio, soc_pm.data.pmc + AT91_PMC_RATIO); + writel(pwrtmg, soc_pm.data.ramc[0] + UDDRC_PWRCTL); +} + struct ramc_info { void (*idle)(void); unsigned int memctrl; @@ -615,6 +639,7 @@ static const struct ramc_info ramc_infos[] __initconst = { { .idle = at91sam9_sdram_standby, .memctrl = AT91_MEMCTRL_SDRAMC}, { .idle = at91_ddr_standby, .memctrl = AT91_MEMCTRL_DDRSDR}, { .idle = sama5d3_ddr_standby, .memctrl = AT91_MEMCTRL_DDRSDR}, + { .idle = sama7g5_standby, }, }; static const struct of_device_id ramc_ids[] __initconst = { @@ -622,7 +647,7 @@ static const struct of_device_id ramc_ids[] __initconst = { { .compatible = "atmel,at91sam9260-sdramc", .data = &ramc_infos[1] }, { .compatible = "atmel,at91sam9g45-ddramc", .data = &ramc_infos[2] }, { .compatible = "atmel,sama5d3-ddramc", .data = &ramc_infos[3] }, - { .compatible = "microchip,sama7g5-uddrc", }, + { .compatible = "microchip,sama7g5-uddrc", .data = &ramc_infos[4], }, { /*sentinel*/ } }; diff --git a/include/linux/clk/at91_pmc.h b/include/linux/clk/at91_pmc.h index ccb3f034bfa9..3484309b59bf 100644 --- a/include/linux/clk/at91_pmc.h +++ b/include/linux/clk/at91_pmc.h @@ -78,6 +78,10 @@ #define AT91_PMC_MAINRDY (1 << 16) /* Main Clock Ready */ #define AT91_CKGR_PLLAR 0x28 /* PLL A Register */ + +#define AT91_PMC_RATIO 0x2c /* Processor clock ratio register [SAMA7G5 only] */ +#define AT91_PMC_RATIO_RATIO (0xf) /* CPU clock ratio. */ + #define AT91_CKGR_PLLBR 0x2c /* PLL B Register */ #define AT91_PMC_DIV (0xff << 0) /* Divider */ #define AT91_PMC_PLLCOUNT (0x3f << 8) /* PLL Counter */ diff --git a/include/soc/at91/sama7-ddr.h b/include/soc/at91/sama7-ddr.h index fee1b11bddca..9e17247474fa 100644 --- a/include/soc/at91/sama7-ddr.h +++ b/include/soc/at91/sama7-ddr.h @@ -53,6 +53,7 @@ #define UDDRC_STAT_OPMODE_MSK (0x7 << 0) /* Operating mode mask */ #define UDDRC_PWRCTL (0x30) /* UDDRC Low Power Control Register */ +#define UDDRC_PWRCTL_SELFREF_EN (1 << 0) /* Automatic self-refresh */ #define UDDRC_PWRCTL_SELFREF_SW (1 << 5) /* Software self-refresh */ #define UDDRC_DFIMISC (0x1B0) /* UDDRC DFI Miscellaneous Control Register */ From patchwork Thu Dec 16 14:13:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12681303 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 B21C4C433EF for ; Thu, 16 Dec 2021 14:11:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237790AbhLPOLm (ORCPT ); Thu, 16 Dec 2021 09:11:42 -0500 Received: from esa.microchip.iphmx.com ([68.232.153.233]:10982 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237793AbhLPOLl (ORCPT ); Thu, 16 Dec 2021 09:11:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1639663900; x=1671199900; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=ETLnfefiwEYOdcgZaQpwwBczz13QcWsMBfwE7C7NDns=; b=pC8ekzu2hDt8EaATnQcgkTWv0xCp7WaOLtuXjfXU3lAby5oFMh6T5Vig 1KgyBtHVjH/ZGV4NqPkUa6vKpxpr9+AkL82oEyg6/jjNgcy7XVEhrcI3p 7UZ9eAsiryy5uM1sI8h4eUa+Cmy8q42eDx5onyHso5RQm7SCApQZNNxTz mScqqXbyRV0V+1dRucioesaM6tIFyPCDPG8WShJ0f4rDjJwq6PsttQ7ki anSA3OeyTuMEdRE0CkMzs/NKRUq4P2RaJwIlSEw9ebNPJHFG0JUkmx6+N 2w8fEhAbxPaa3PwwRy1lSFiQe6P5Z0q/ffQAQPfrhsh20G8I+UrUhJ4Wc A==; IronPort-SDR: srvkGP2fxoT2yxO7Jus8qyfLvgbgbOAGwDXtdZ0fXSYJCzi1YRcQTBIzFXxNtX04C/gtaYxrIM IIZEo9GJzS5qSpaCwmmh4Hylpr7qAiymgBM7Sqd6KC1msgub2MD/rbZzAlzKOUwwoEqJBcGvQq n1DkfcUBGfvbQmn1H9y90r60YvI1sWGP9wbBiZfu+0MMztUb0ZaruVeZ9HBVQ+MxyKoYgAHjqa Oa+kZp7ivwTGKqYEjNsDeewCQwZ1ftHKblxuxGRsYsRTOjXLV/RIVBE+HqIjDK43eSk8H+n82W A6vdBMOqjM94MMwLb3UQB+Cr X-IronPort-AV: E=Sophos;i="5.88,211,1635231600"; d="scan'208";a="147461459" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 16 Dec 2021 07:11:40 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 16 Dec 2021 07:11:39 -0700 Received: from rob-dk-mpu02.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 16 Dec 2021 07:11:37 -0700 From: Claudiu Beznea To: , , , , , , CC: , , , Subject: [PATCH 5/8] ARM: at91: Kconfig: select PM_OPP Date: Thu, 16 Dec 2021 16:13:35 +0200 Message-ID: <20211216141338.35144-6-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211216141338.35144-1-claudiu.beznea@microchip.com> References: <20211216141338.35144-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Select PM_OPP. This is requested for CPUFreq driver. Signed-off-by: Claudiu Beznea --- arch/arm/mach-at91/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 02f6b108fd5d..279810381256 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -63,6 +63,7 @@ config SOC_SAMA7G5 select HAVE_AT91_GENERATED_CLK select HAVE_AT91_SAM9X60_PLL select HAVE_AT91_UTMI + select PM_OPP select SOC_SAMA7 help Select this if you are using one of Microchip's SAMA7G5 family SoC. From patchwork Thu Dec 16 14:13:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12681305 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 13924C433FE for ; Thu, 16 Dec 2021 14:11:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237819AbhLPOLp (ORCPT ); Thu, 16 Dec 2021 09:11:45 -0500 Received: from esa.microchip.iphmx.com ([68.232.154.123]:4047 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237784AbhLPOLn (ORCPT ); Thu, 16 Dec 2021 09:11:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1639663904; x=1671199904; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=b86IW3HhpJSwbuz3dLx8QLN49UnEtkntajIQOuJgw18=; b=KNKRgoNYiMEbvJrErdDXRUc+Chg3NQG2c/HgKWPzHtyCQHto8Fimyeu+ 0Dml4ckGeUz4/QtoKzxNc7Hf/UFKgouM9Zt/lRTxaa44nI2rt+hBwZKqT P/TDbdi26G1GYD3HoX2Nd9L9U4x8BaePhNpNcZhGgfXhDROLHXJqqloKQ X0xPZSAbzbxi3/ezjXQw8a/Tiw25n5L1PTAV3CbRscdZRbUfrqZfpHLQB 2/bpFxIFTZn7LP/csUc2glJUJZrv35/VqLLHqK9rGQnJwdY/edU5B/vwG VtmLg/PSL/WiEkA/JSOwFwUlOo+FkcvlySDd/zWy2FGMKn20P6Of5MkIO w==; IronPort-SDR: 9ctn6o75rxKVBswj4J1ADDaZ7J4ktratHfBAsa3OzQUYv6sB3FD4P3BfMC0mWiv7HxoDTTQC/b Vg+QavkO9KgrlGbnO1QcXVs98Hr1l++1W19dHcV6OtSvKIdMr15x4307fenf5gHObVrOV2eeTU 2LUVJoJ4+VPN1aI48IKDsi16UCGrNNkLKUDktIJ6Xjya4YyifPlEa2F/NEgPwb/NOh8Y0zOrFC JBO3Kk7ae8olR803aeHfZc4o8R0dn2Gt82FOn39sifG+EYfvjhshbah4ini7Mka9bBfuEq1TmN 5Sf3d7L4Jtxg0fxY6gdiM7Zf X-IronPort-AV: E=Sophos;i="5.88,211,1635231600"; d="scan'208";a="142638405" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 16 Dec 2021 07:11:42 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 16 Dec 2021 07:11:42 -0700 Received: from rob-dk-mpu02.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 16 Dec 2021 07:11:39 -0700 From: Claudiu Beznea To: , , , , , , CC: , , , Subject: [PATCH 6/8] ARM: dts: at91: sama7g5: add opps Date: Thu, 16 Dec 2021 16:13:36 +0200 Message-ID: <20211216141338.35144-7-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211216141338.35144-1-claudiu.beznea@microchip.com> References: <20211216141338.35144-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Add OPPs for SAMA7G5 along with clock for CPU. Signed-off-by: Claudiu Beznea Acked-by: Nicolas Ferre --- arch/arm/boot/dts/sama7g5.dtsi | 37 ++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/arch/arm/boot/dts/sama7g5.dtsi b/arch/arm/boot/dts/sama7g5.dtsi index 7039311bf678..22352ef5bc72 100644 --- a/arch/arm/boot/dts/sama7g5.dtsi +++ b/arch/arm/boot/dts/sama7g5.dtsi @@ -30,6 +30,43 @@ cpu0: cpu@0 { device_type = "cpu"; compatible = "arm,cortex-a7"; reg = <0x0>; + clocks = <&pmc PMC_TYPE_CORE PMC_CPUPLL>; + clock-names = "cpu"; + operating-points-v2 = <&cpu_opp_table>; + }; + }; + + cpu_opp_table: opp-table { + compatible = "operating-points-v2"; + + opp-90000000 { + opp-hz = /bits/ 64 <90000000>; + opp-microvolt = <1050000 1050000 1225000>; + clock-latency-ns = <320000>; + }; + + opp-250000000 { + opp-hz = /bits/ 64 <250000000>; + opp-microvolt = <1050000 1050000 1225000>; + clock-latency-ns = <320000>; + }; + + opp-600000000 { + opp-hz = /bits/ 64 <600000000>; + opp-microvolt = <1050000 1050000 1225000>; + clock-latency-ns = <320000>; + }; + + opp-800000000 { + opp-hz = /bits/ 64 <800000000>; + opp-microvolt = <1150000 1125000 1225000>; + clock-latency-ns = <320000>; + }; + + opp-1000000002 { + opp-hz = /bits/ 64 <1000000002>; + opp-microvolt = <1250000 1225000 1300000>; + clock-latency-ns = <320000>; }; }; From patchwork Thu Dec 16 14:13:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12681307 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 A4C86C433F5 for ; Thu, 16 Dec 2021 14:11:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237795AbhLPOLt (ORCPT ); Thu, 16 Dec 2021 09:11:49 -0500 Received: from esa.microchip.iphmx.com ([68.232.154.123]:4047 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237813AbhLPOLq (ORCPT ); Thu, 16 Dec 2021 09:11:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1639663906; x=1671199906; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=bDlilDU1skIyaD7A5u8m29rcVwAwQx5M9HD/l01CDFo=; b=2h8IEagDuIP+YAmQBVuVuhoRVsPViN3wKoww4x24HkUpcV9ZlDJ7zqVE f5EgddEQZWgF//yOURevxVaDp17ahE7KxDzuTftA4iiHgheexIwPMHybR OcuD0/0vgHsdTGksV9QzTi+gd2ZQWFfgHJBjCjSN4oL/QZA3WHfGnCqIz k5l/iXA5II8gqdV+scTza5tZT7D3JniQZYDsJOAj6FLE7PGg0mLn/VaFY n7QYO+AdRyBher/HvA1W28e65ripyEpYsBfmePtEQd2eB8NNdGGe5tnOx yeiYWEgdI9eM6nLUd9Vlj+8B4NEHvHlPVxIaCoRF3osc74q81EgurACOw Q==; IronPort-SDR: eM/06ULGCldEpyhKxPqQqdAsZix0AjjC2Y3P5O+I+Y+qxDYacdBwZs3LutVsq1cGs/t4zKfcL/ UMvlAfe4qycGtFXYIGQu5usTBOtWlrh+plQtKfyL/1CV1E6RaE9pyp5nTWF7FpwycvpxWKHSYJ nkyXOteL/RBw7cKpdtgf9+4bIZnNBxaBqttbAhjuTc441zTRvbfAeD1kQJHttJV/3fWVse2FLO EpBcPk4mfXoxzYYLPmFFA4N4jMrxdRxwEDVApp6RmcUPStgmSYg2ValieLrnxc0kf8QHcdg83R HSkBvvqyJMbAsZpEEk0LU4Bz X-IronPort-AV: E=Sophos;i="5.88,211,1635231600"; d="scan'208";a="142638419" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 16 Dec 2021 07:11:45 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 16 Dec 2021 07:11:45 -0700 Received: from rob-dk-mpu02.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 16 Dec 2021 07:11:42 -0700 From: Claudiu Beznea To: , , , , , , CC: , , , Subject: [PATCH 7/8] ARM: configs: at91: sama7: enable cpu idle Date: Thu, 16 Dec 2021 16:13:37 +0200 Message-ID: <20211216141338.35144-8-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211216141338.35144-1-claudiu.beznea@microchip.com> References: <20211216141338.35144-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Enable CPU idle support for SAMA7 config. Signed-off-by: Claudiu Beznea --- arch/arm/configs/sama7_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/configs/sama7_defconfig b/arch/arm/configs/sama7_defconfig index 938aae4bd80b..95c2a7ed4816 100644 --- a/arch/arm/configs/sama7_defconfig +++ b/arch/arm/configs/sama7_defconfig @@ -26,6 +26,7 @@ CONFIG_FORCE_MAX_ZONEORDER=15 CONFIG_UACCESS_WITH_MEMCPY=y # CONFIG_ATAGS is not set CONFIG_CMDLINE="console=ttyS0,115200 earlyprintk ignore_loglevel" +CONFIG_CPU_IDLE=y CONFIG_VFP=y CONFIG_NEON=y CONFIG_KERNEL_MODE_NEON=y @@ -33,7 +34,6 @@ CONFIG_MODULES=y CONFIG_MODULE_FORCE_LOAD=y CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set CONFIG_PARTITION_ADVANCED=y # CONFIG_EFI_PARTITION is not set # CONFIG_COREDUMP is not set @@ -90,6 +90,7 @@ CONFIG_BLK_DEV_RAM_SIZE=8192 CONFIG_EEPROM_AT24=y CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y +# CONFIG_BLK_DEV_BSG is not set CONFIG_NETDEVICES=y CONFIG_MACB=y CONFIG_MICREL_PHY=y From patchwork Thu Dec 16 14:13:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12681309 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 C082DC433FE for ; Thu, 16 Dec 2021 14:12:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232342AbhLPOMu (ORCPT ); Thu, 16 Dec 2021 09:12:50 -0500 Received: from esa.microchip.iphmx.com ([68.232.153.233]:20899 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237854AbhLPOLt (ORCPT ); Thu, 16 Dec 2021 09:11:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1639663909; x=1671199909; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=lEArm4L3rzKNYcbWHVsHPV1Ug//Fk01TwtXeWoxZlLg=; b=ZTVxWEFsx5aTor5LjjViqCY+mrIjsWV2jNpKs6dHOJbgIlqTcOJS6Y+F iPf+0NNb//AI0xWeQnAtbhV60+6wI60u0XGJMJkSrUb5hmRZLBWZEyjSC X4KrPun4VGiU4XpZDneOkvCHdvz5LR4Z6gHCilKfxOpucJkC974Gx61un MsqP9H6YpBmjzI4v9gMuPQLSC5Ov8banScf0FtzCsWJzftkU1/vVPNH0m gxKmCrjqRv26V7McreMLrp+4P8hH6VrJ+EHSxNEXbiJxhpp4idGsOmdXg K1IN+dSg9GzMCxUySN+gyqiIEm+p61AMGysYDPylx8TBBkF+oKBw2NMWc w==; IronPort-SDR: nqZB61dQLUey6GePl0xOp+5+bV9UZEjJ1Ytzslfo3ZG3NCT9u7w57eT7Rj9UgzAhXv4hRovO/+ GmipbgXHXVyENecP5cvHl97jScRz4L5s1LArShujTQxbaqzlot7PuWRFGablpMXJyJj47aleah XKNR92zTenEdf0wG0vwfBGZeDQChS972MLvW91bF7m2UR6Y7hhPvin3N5uBVeztW+AzaVrao3p cFD1QujCPVo3fxWe3RneTH19QcVjeCXTwJpaRSLhE9kgKqPgiXYYXn8Qnopmr9OiLEpnOBiFSd MJ2nWjG6KYIYCEk2jXrE3xcY X-IronPort-AV: E=Sophos;i="5.88,211,1635231600"; d="scan'208";a="146894028" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 16 Dec 2021 07:11:49 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 16 Dec 2021 07:11:48 -0700 Received: from rob-dk-mpu02.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 16 Dec 2021 07:11:45 -0700 From: Claudiu Beznea To: , , , , , , CC: , , , Subject: [PATCH 8/8] ARM: configs: at91: sama7: add config for cpufreq Date: Thu, 16 Dec 2021 16:13:38 +0200 Message-ID: <20211216141338.35144-9-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211216141338.35144-1-claudiu.beznea@microchip.com> References: <20211216141338.35144-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Add config flags for CPUFreq. This includes enabling CPUFreq support, CPUFreq DT driver and governors, default one being the conservative governor. Signed-off-by: Claudiu Beznea --- arch/arm/configs/sama7_defconfig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/configs/sama7_defconfig b/arch/arm/configs/sama7_defconfig index 95c2a7ed4816..689e9afcb5b2 100644 --- a/arch/arm/configs/sama7_defconfig +++ b/arch/arm/configs/sama7_defconfig @@ -26,6 +26,12 @@ CONFIG_FORCE_MAX_ZONEORDER=15 CONFIG_UACCESS_WITH_MEMCPY=y # CONFIG_ATAGS is not set CONFIG_CMDLINE="console=ttyS0,115200 earlyprintk ignore_loglevel" +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPUFREQ_DT=y CONFIG_CPU_IDLE=y CONFIG_VFP=y CONFIG_NEON=y