From patchwork Fri Aug 26 08:39:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12955649 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 722A1ECAAD2 for ; Fri, 26 Aug 2022 08:38:33 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bDmQnuz5JJanVtdtEOOX4xaoH2YCO9akq2cu2PhC9tc=; b=viiC7bag/lDF+E faAWBU+k6E8xkoXdNAKmLaYqj02NupUEhR8Ua/4+/BAvqDjHkudcAmgjPLaYZt5hJPrFqa0wH7OiI fvU3fODCpe0EWOVQyAebPzqkrYDMpYk7sQC9SBryzEcrkMCwKYIuxvoR7HCYnOren40FllsVlDj4M PM/MWVrk79yoMu0DtozDM1TsRnCyKUQ7vIieMfdfK0qa6OKO1JPna6JuYmdN3Z82YuNi3VPN8wxkh rELVaEsnNyw0XPFTDKVVIf3LR4YlvRm145rSbXSxeDlsLAQtFBWJxRxSad6HybnSU3rLluA9WUSQZ KlOrXaQcQAQIHRpSaLTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRUqG-00HDPL-Kr; Fri, 26 Aug 2022 08:37:28 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRUq3-00HCxo-Ln for linux-arm-kernel@lists.infradead.org; Fri, 26 Aug 2022 08:37:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1661503035; x=1693039035; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Vdr3+Nsguq4PGVOxtmLngGRI+Gao0SjewAh2bRon6EQ=; b=aoTzHgHlcaCnRXRy54POeZDa33rH01idWAUiJi4Rz5lopHkYlNc1xNVQ rOHqMQYpV1Fd1T+EVf5Pkrz+wwgcxzIuJY6f8omH2oiscPikeaHp/k3F1 ld4cCQPHhf9Rb9Yg47YJP3wTQiyh+GX00MV8BL/C3UjhApx09Da/v3okY 4m0WFNGSwt7sTnaYjEnU+XfEJNpBGRRsbmtAeTYS3BlPfBKHmkT66omvJ 1exAYmdML7+GMK1JWEpryyqVsggJiSLpCd6ZAntHrk84Foc3fC+PIFGF0 /FIQ0VgODni+SQWXsdsOqKbhYg2h/iESHIprQA69P979JU+6MVN7O26UZ Q==; X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="174284213" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 26 Aug 2022 01:37:12 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) 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.2507.12; Fri, 26 Aug 2022 01:37:10 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Fri, 26 Aug 2022 01:37:08 -0700 From: Claudiu Beznea To: , , , , , , CC: , , , Subject: [PATCH 1/9] ARM: configs: at91: remove CONFIG_MICROCHIP_PIT64B Date: Fri, 26 Aug 2022 11:39:19 +0300 Message-ID: <20220826083927.3107272-2-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220826083927.3107272-1-claudiu.beznea@microchip.com> References: <20220826083927.3107272-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220826_013715_852455_B9A8EBA3 X-CRM114-Status: UNSURE ( 8.59 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since commit f611af4c3bfa ("ARM: at91: Kconfig: implement PIT64B selection") there is no need to explicitly select PIT64B. Fixes: f611af4c3bfa ("ARM: at91: Kconfig: implement PIT64B selection") Signed-off-by: Claudiu Beznea --- This is based on patch at [1]. [1] https://lore.kernel.org/all/20220818135522.3143514-2-arnd@kernel.org/ arch/arm/configs/at91_dt_defconfig | 1 - arch/arm/configs/sama7_defconfig | 1 - 2 files changed, 2 deletions(-) diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig index 5cc72266eaff..9ea08337b174 100644 --- a/arch/arm/configs/at91_dt_defconfig +++ b/arch/arm/configs/at91_dt_defconfig @@ -196,7 +196,6 @@ CONFIG_RTC_DRV_AT91SAM9=y CONFIG_DMADEVICES=y CONFIG_AT_HDMAC=y CONFIG_AT_XDMAC=y -CONFIG_MICROCHIP_PIT64B=y # CONFIG_IOMMU_SUPPORT is not set CONFIG_IIO=y CONFIG_AT91_ADC=y diff --git a/arch/arm/configs/sama7_defconfig b/arch/arm/configs/sama7_defconfig index 8803536854c6..72af50d9e48a 100644 --- a/arch/arm/configs/sama7_defconfig +++ b/arch/arm/configs/sama7_defconfig @@ -188,7 +188,6 @@ CONFIG_RTC_DRV_AT91SAM9=y CONFIG_DMADEVICES=y CONFIG_AT_XDMAC=y CONFIG_STAGING=y -CONFIG_MICROCHIP_PIT64B=y # CONFIG_IOMMU_SUPPORT is not set CONFIG_IIO=y CONFIG_IIO_SW_TRIGGER=y From patchwork Fri Aug 26 08:39:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12955650 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 DC8D2ECAAA3 for ; Fri, 26 Aug 2022 08:38:47 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Q8vmjIamtdI+ixyyp5Hq+uw1qEmF0XLMdIpHSores5s=; b=08S6Mt/XOy4Het DnoOqwkhCFQgc7CNjTCHTVF/mizVp0urrqeAuOvWPMSR5JzD60RhrD3a1gFE6OH9C5wwOmBid1ukG zoO/2DwdRQk8bN5sHJpYTzhzd/9BxNeOiZsTNKKAnm1iBn+oXI1lwMk1t0jAHrAFicY60T+AfVMN8 f+5Fqb/CgN69c8+h2zKIeCPF7POd9NukTKIGjzmJHz+4y1FT04tm/upx8X02/3wOt1lwxDZEe0wB1 8PoCSReBGHTALY2peewI7ffzxZcJ4wgnqifR/Ym+tkYs+76NW/hvFKp8ok0Tkm9+d3W2ucVw8EvHT 22/kMPQfdFPKBrQbzQWA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRUqV-00HDfb-JG; Fri, 26 Aug 2022 08:37:43 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRUq3-00HD8B-U6 for linux-arm-kernel@lists.infradead.org; Fri, 26 Aug 2022 08:37:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1661503035; x=1693039035; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=R+ZXodYH0NjgQV+jNwarfE1Vs8mAKES25AbetN8LplY=; b=2LkRQ/vcglasjXx+CsFkoM/wGiX2wbJci3BvNuvCVo3aQOr1eZqTq/MR 2bqt6UHjzMZnkBdQ4MKcTVXxVQCyAJ9xr04eTfJuol3gJuxyK8Ktb/awg EGB9Llrlz5Gcz5qbECKbTpMIYfs6hVa06hDzI5vhddtbfLo8QwqFg1nDW fB0jYY3a9Er70L9vwtgbYVk8abmmGceXHIjVjdQoqHUk/hHzLoqpF2gqr MPPjWox4AxMmUzE7bT7aa8U3YiU0SsfFtfKYxnrTP7ULRg13k7fSIheth AfyCVWb8lIdWlc7eqIyCEO/Oxk+SHKpNaGnA6kOkmm8mF7bZlyIOzxY7i A==; X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="174284217" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 26 Aug 2022 01:37:15 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Fri, 26 Aug 2022 01:37:13 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Fri, 26 Aug 2022 01:37:11 -0700 From: Claudiu Beznea To: , , , , , , CC: , , , , "Frederic Schumacher" Subject: [PATCH 2/9] ARM: at91: pm: fix self-refresh for sama7g5 Date: Fri, 26 Aug 2022 11:39:20 +0300 Message-ID: <20220826083927.3107272-3-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220826083927.3107272-1-claudiu.beznea@microchip.com> References: <20220826083927.3107272-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220826_013716_053695_BD649CDA X-CRM114-Status: GOOD ( 10.92 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org It has been discovered that on some parts, from time to time, self-refresh procedure doesn't work as expected. Debugging and investigating it proved that disabling AC DLL introduce glitches in RAM controllers which leads to unexpected behavior. This is confirmed as a hardware bug. DLL bypass disables 3 DLLs: 2 DX DLLs and AC DLL. Thus, keep only DX DLLs disabled. This introduce 6mA extra current consumption on VDDCORE when switching ot any ULP mode or standby mode but the self-refresh procedure still works. Fixes: f0bbf17958e8 ("ARM: at91: pm: add self-refresh support for sama7g5") Suggested-by: Frederic Schumacher Signed-off-by: Claudiu Beznea Tested-by: Cristian Birsan --- arch/arm/mach-at91/pm_suspend.S | 24 +++++++++++++++++------- include/soc/at91/sama7-ddr.h | 4 ++++ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-at91/pm_suspend.S b/arch/arm/mach-at91/pm_suspend.S index abe4ced33eda..ffed4d949042 100644 --- a/arch/arm/mach-at91/pm_suspend.S +++ b/arch/arm/mach-at91/pm_suspend.S @@ -172,9 +172,15 @@ sr_ena_2: /* Put DDR PHY's DLL in bypass mode for non-backup modes. */ cmp r7, #AT91_PM_BACKUP beq sr_ena_3 - ldr tmp1, [r3, #DDR3PHY_PIR] - orr tmp1, tmp1, #DDR3PHY_PIR_DLLBYP - str tmp1, [r3, #DDR3PHY_PIR] + + /* Disable DX DLLs. */ + ldr tmp1, [r3, #DDR3PHY_DX0DLLCR] + orr tmp1, tmp1, #DDR3PHY_DXDLLCR_DLLDIS + str tmp1, [r3, #DDR3PHY_DX0DLLCR] + + ldr tmp1, [r3, #DDR3PHY_DX1DLLCR] + orr tmp1, tmp1, #DDR3PHY_DXDLLCR_DLLDIS + str tmp1, [r3, #DDR3PHY_DX1DLLCR] sr_ena_3: /* Power down DDR PHY data receivers. */ @@ -221,10 +227,14 @@ sr_ena_3: bic tmp1, tmp1, #DDR3PHY_DSGCR_ODTPDD_ODT0 str tmp1, [r3, #DDR3PHY_DSGCR] - /* Take DDR PHY's DLL out of bypass mode. */ - ldr tmp1, [r3, #DDR3PHY_PIR] - bic tmp1, tmp1, #DDR3PHY_PIR_DLLBYP - str tmp1, [r3, #DDR3PHY_PIR] + /* Enable DX DLLs. */ + ldr tmp1, [r3, #DDR3PHY_DX0DLLCR] + bic tmp1, tmp1, #DDR3PHY_DXDLLCR_DLLDIS + str tmp1, [r3, #DDR3PHY_DX0DLLCR] + + ldr tmp1, [r3, #DDR3PHY_DX1DLLCR] + bic tmp1, tmp1, #DDR3PHY_DXDLLCR_DLLDIS + str tmp1, [r3, #DDR3PHY_DX1DLLCR] /* Enable quasi-dynamic programming. */ mov tmp1, #0 diff --git a/include/soc/at91/sama7-ddr.h b/include/soc/at91/sama7-ddr.h index 9e17247474fa..2706bc48c076 100644 --- a/include/soc/at91/sama7-ddr.h +++ b/include/soc/at91/sama7-ddr.h @@ -39,6 +39,10 @@ #define DDR3PHY_ZQ0SR0 (0x188) /* ZQ status register 0 */ +#define DDR3PHY_DX0DLLCR (0x1CC) /* DDR3PHY DATX8 DLL Control Register */ +#define DDR3PHY_DX1DLLCR (0x20C) /* DDR3PHY DATX8 DLL Control Register */ +#define DDR3PHY_DXDLLCR_DLLDIS (1 << 31) /* DLL Disable */ + /* UDDRC */ #define UDDRC_STAT (0x04) /* UDDRC Operating Mode Status Register */ #define UDDRC_STAT_SELFREF_TYPE_DIS (0x0 << 4) /* SDRAM is not in Self-refresh */ From patchwork Fri Aug 26 08:39:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12955655 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 86B81ECAAA3 for ; Fri, 26 Aug 2022 08:40:53 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=q2vrP6d7jBPVvs3E/KbYsowrwfIg/GqxqzSzuFTZQ/E=; b=xVOKiPehzJkSMi NKkidRZmVKkq+XQG6mTE9r+MfoZG6SlNJc6UglEK3Ta/zjw/7t1DWZuphnEKB1xRrtMNdR6UcUcdR 8PStTmakGhTc/SAVnYZIZzBxcnepPuk1BKwGQNFzR4YqWXDIaZF7WF3o0rk0hwwAE0/MNhez5mu+T 6q7biEHA76/BMlichz/O+pYmsuhbwpfmiJd4vA0poV7yW8YAR3fiJYjQmZvDmO43AMOT+5z7p4qAY JVw8zUwQCjTsrr8WnlfmCLRLnJnXqgCobec9Sy7k7TlxWj6U2y/cMGoWVhmriSmwDxoyspazp7iiZ yj99Qrnk3ewExvxyRyHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRUsS-00HFeS-0Y; Fri, 26 Aug 2022 08:39:44 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRUqH-00HDNR-6L for linux-arm-kernel@lists.infradead.org; Fri, 26 Aug 2022 08:37:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1661503049; x=1693039049; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=msDgI3aMcCtjyIcnn6jZJTKEB7TrIShLE/Zcmhh9CBU=; b=RDCzKXqFlK23k/mQsaYunuawY7ubdxRBI8YhiKAmr8XXV1UcKjknAlvG nQLl0pmHOPT7JpAt0qAN8Osc7LOCG8MmLUicL/CQOXtt1v/upl3Z3M7EH LQpQ/UjfJeYGIZ26/Vs5RYBXZxWJA/3U0gCKWFhUyuqj9JcfvhsoMP8k9 pZxkuXwGFLNoEf6MsWgZq74sKMQBGTzbqvcBSgixdi+AVK6eOhuHV3GPk tMnkATU8CB95d8bwUBmdbhylGCQY8/onm3NyYP9ug4kVR8U+F89rDf9Pk K07Z2TKIft50a/qz1NiMtGjTgJJVMzSMneM0XA+6D5BWOR9k4ywqvsR8p Q==; X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="177981552" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 26 Aug 2022 01:37:17 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) 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.2507.12; Fri, 26 Aug 2022 01:37:16 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Fri, 26 Aug 2022 01:37:14 -0700 From: Claudiu Beznea To: , , , , , , CC: , , , , "Frederic Schumacher" Subject: [PATCH 3/9] ARM: at91: pm: fix DDR recalibration when resuming from backup and self-refresh Date: Fri, 26 Aug 2022 11:39:21 +0300 Message-ID: <20220826083927.3107272-4-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220826083927.3107272-1-claudiu.beznea@microchip.com> References: <20220826083927.3107272-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220826_013729_328059_5D5F0039 X-CRM114-Status: GOOD ( 16.78 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On SAMA7G5, when resuming from backup and self-refresh, the bootloader performs DDR PHY recalibration by restoring the value of ZQ0SR0 (stored in RAM by Linux before going to backup and self-refresh). It has been discovered that the current procedure doesn't work for all possible values that might go to ZQ0SR0 due to hardware bug. The workaround to this is to avoid storing some values in ZQ0SR0. Thus Linux will read the ZQ0SR0 register and cache its value in RAM after processing it (using modified_gray_code array). The bootloader will restore the processed value. Fixes: d2d4716d8384 ("ARM: at91: pm: save ddr phy calibration data to securam") Suggested-by: Frederic Schumacher Signed-off-by: Claudiu Beznea --- arch/arm/mach-at91/pm.c | 36 ++++++++++++++++++++++++++++++++---- include/soc/at91/sama7-ddr.h | 4 ++++ 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index df6d673e83d5..f4501dea98b0 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c @@ -541,9 +541,41 @@ extern u32 at91_pm_suspend_in_sram_sz; static int at91_suspend_finish(unsigned long val) { + unsigned char modified_gray_code[] = { + 0x00, 0x01, 0x02, 0x03, 0x06, 0x07, 0x04, 0x05, 0x0c, 0x0d, + 0x0e, 0x0f, 0x0a, 0x0b, 0x08, 0x09, 0x18, 0x19, 0x1a, 0x1b, + 0x1e, 0x1f, 0x1c, 0x1d, 0x14, 0x15, 0x16, 0x17, 0x12, 0x13, + 0x10, 0x11, + }; + unsigned int tmp, index; int i; if (soc_pm.data.mode == AT91_PM_BACKUP && soc_pm.data.ramc_phy) { + /* + * Bootloader will perform DDR recalibration and will try to + * restore the ZQ0SR0 with the value saved here. But the + * calibration is buggy and restoring some values from ZQ0SR0 + * is forbidden and risky thus we need to provide processed + * values for these (modified gray code values). + */ + tmp = readl(soc_pm.data.ramc_phy + DDR3PHY_ZQ0SR0); + + /* Store pull-down output impedance select. */ + index = (tmp >> DDR3PHY_ZQ0SR0_PDO_OFF) & 0x1f; + soc_pm.bu->ddr_phy_calibration[0] = modified_gray_code[index]; + + /* Store pull-up output impedance select. */ + index = (tmp >> DDR3PHY_ZQ0SR0_PUO_OFF) & 0x1f; + soc_pm.bu->ddr_phy_calibration[0] |= modified_gray_code[index]; + + /* Store pull-down on-die termination impedance select. */ + index = (tmp >> DDR3PHY_ZQ0SR0_PDODT_OFF) & 0x1f; + soc_pm.bu->ddr_phy_calibration[0] |= modified_gray_code[index]; + + /* Store pull-up on-die termination impedance select. */ + index = (tmp >> DDR3PHY_ZQ0SRO_PUODT_OFF) & 0x1f; + soc_pm.bu->ddr_phy_calibration[0] |= modified_gray_code[index]; + /* * The 1st 8 words of memory might get corrupted in the process * of DDR PHY recalibration; it is saved here in securam and it @@ -1066,10 +1098,6 @@ static int __init at91_pm_backup_init(void) of_scan_flat_dt(at91_pm_backup_scan_memcs, &located); if (!located) goto securam_fail; - - /* DDR3PHY_ZQ0SR0 */ - soc_pm.bu->ddr_phy_calibration[0] = readl(soc_pm.data.ramc_phy + - 0x188); } return 0; diff --git a/include/soc/at91/sama7-ddr.h b/include/soc/at91/sama7-ddr.h index 2706bc48c076..6ce3bd22f6c6 100644 --- a/include/soc/at91/sama7-ddr.h +++ b/include/soc/at91/sama7-ddr.h @@ -38,6 +38,10 @@ #define DDR3PHY_DSGCR_ODTPDD_ODT0 (1 << 20) /* ODT[0] Power Down Driver */ #define DDR3PHY_ZQ0SR0 (0x188) /* ZQ status register 0 */ +#define DDR3PHY_ZQ0SR0_PDO_OFF (0) /* Pull-down output impedance select offset */ +#define DDR3PHY_ZQ0SR0_PUO_OFF (5) /* Pull-up output impedance select offset */ +#define DDR3PHY_ZQ0SR0_PDODT_OFF (10) /* Pull-down on-die termination impedance select offset */ +#define DDR3PHY_ZQ0SRO_PUODT_OFF (15) /* Pull-up on-die termination impedance select offset */ #define DDR3PHY_DX0DLLCR (0x1CC) /* DDR3PHY DATX8 DLL Control Register */ #define DDR3PHY_DX1DLLCR (0x20C) /* DDR3PHY DATX8 DLL Control Register */ From patchwork Fri Aug 26 08:39:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12955651 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 30DA6ECAAA3 for ; Fri, 26 Aug 2022 08:39:10 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FmqJYAsPAshVsBMBt8GyitjA1p/+vJkWpX9i6+CwuE0=; b=PAF8L/jYCRDy5f TcWXhWute20AwRNI8K+YU4KKYH5D44TNXX0XKBwJ+yqTkjRqIDmgpge9jDAbgi0z2jvhvAn9/SCDs onkLK4F66s1CiZRWqaUm7Lnpnzmp2afXFVvQ+ZiOwJupdZzcR6p3M5O+Ln4xgwacccKw/v2VS9hC5 IcvkqfoUQIb7IApF33Pm2QHFJyA54UxxUTeTCNKG+dElCfFe3TUDWOIB0aTuqLuJIViqziyEbZCve mfJrQYqBC0YxT1HpdHfGc+NjFqEHtway3/UT9pfB5EJrilCYCSWHzn0pnT4cl2ZYaoGj7++3FaIvT EHLOyA6es5Y2BtbJy0Pg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRUqs-00HE5j-DM; Fri, 26 Aug 2022 08:38:06 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRUqC-00HDJr-Be for linux-arm-kernel@lists.infradead.org; Fri, 26 Aug 2022 08:37:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1661503045; x=1693039045; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=K/P6g0z1JGf/ROJm+c80WS5FiI62rI1DdtOdiWRQSxs=; b=T9Jriy21M/yZQHwLLGaGsDZHpReN6+DYofB13ltgEi9HzWUEZAuYHIF/ 3Qkhz4Q0csKdhTD7v2nTK6UpoQb7afJfBaB3A4olVret9WcV4S58j34cE aAmEy//G4qc/k4JTyD8LdIw7M9gl78OQVt2UmFC0U2cg00Bl0WXAzS8Hq k69i0XmOak1OEFSYFta4yqgOPzrqP5nEFKpHsEiEcgkZ8nqfLWmGgwQs0 qS9MNvivNbD7jPWSw10opPsYwrtPR4nzjLchcOqNnj62Z1fAZbPz8iC48 LcPsIDUHdSTKKb3lK8Aj1bJHgoiP3n2oFL6yWdN9hJQRJZAwYqeAmLQCE A==; X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="171082251" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 26 Aug 2022 01:37:22 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) 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.2507.12; Fri, 26 Aug 2022 01:37:19 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Fri, 26 Aug 2022 01:37:16 -0700 From: Claudiu Beznea To: , , , , , , CC: , , , Subject: [PATCH 4/9] ARM: dts: at91: sama5d27_wlsom1: specify proper regulator output ranges Date: Fri, 26 Aug 2022 11:39:22 +0300 Message-ID: <20220826083927.3107272-5-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220826083927.3107272-1-claudiu.beznea@microchip.com> References: <20220826083927.3107272-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220826_013724_548287_D45EB773 X-CRM114-Status: UNSURE ( 8.40 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Min and max output ranges of regulators need to satisfy board requirements not PMIC requirements. Thus adjust device tree to cope with this. Fixes: 5d4c3cfb63fe ("ARM: dts: at91: sama5d27_wlsom1: add SAMA5D27 wlsom1 and wlsom1-ek") Signed-off-by: Claudiu Beznea --- arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi b/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi index 76b2025c67b4..342fcfd974d7 100644 --- a/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi +++ b/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi @@ -76,8 +76,8 @@ mcp16502@5b { regulators { vdd_3v3: VDD_IO { regulator-name = "VDD_IO"; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <3700000>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; regulator-initial-mode = <2>; regulator-allowed-modes = <2>, <4>; regulator-always-on; @@ -95,8 +95,8 @@ regulator-state-mem { vddio_ddr: VDD_DDR { regulator-name = "VDD_DDR"; - regulator-min-microvolt = <600000>; - regulator-max-microvolt = <1850000>; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; regulator-initial-mode = <2>; regulator-allowed-modes = <2>, <4>; regulator-always-on; @@ -118,8 +118,8 @@ regulator-state-mem { vdd_core: VDD_CORE { regulator-name = "VDD_CORE"; - regulator-min-microvolt = <600000>; - regulator-max-microvolt = <1850000>; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1250000>; regulator-initial-mode = <2>; regulator-allowed-modes = <2>, <4>; regulator-always-on; @@ -160,8 +160,8 @@ regulator-state-mem { LDO1 { regulator-name = "LDO1"; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <3700000>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; regulator-always-on; regulator-state-standby { @@ -175,8 +175,8 @@ regulator-state-mem { LDO2 { regulator-name = "LDO2"; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <3700000>; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; regulator-always-on; regulator-state-standby { From patchwork Fri Aug 26 08:39:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12955652 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 079A9ECAAA3 for ; Fri, 26 Aug 2022 08:39:44 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pdhKfSepn2LuNv+SXVgZISq6IeU7vRAd3OPggOMW5QA=; b=NXnmLg/Yku+ZW5 oRtPgmMiRjfCetPU1D+bD0boDQ7XDlTlAnnLscLZbdOKJ+wNJ1PyHTMzWXmuozXwXiRtTVtWhyYM6 Uq5nlMBzU4MmwbZ+S9TmT8ElxWAqoWjRrAzeFWaoprD3gZNR0GNDbsXYIf6J97RoyfeOmaSEMvsDh xTuwodTVw7o49EceuqVsQsFsKFWqzay2JEa8B4WGxTSx1LEW/AxlTTxLzM/tkV4RGuqoR8gjyksmN tj/ijsgqm6ncJ+Dgirci1HqDcptqynCYkh444LR3NROt5jiR+jkEdKmUta6MvOkuhGml4vMY/4143 IHeHsLTQoeK+B7UQEKnw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRUrO-00HEXS-NB; Fri, 26 Aug 2022 08:38:38 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRUqE-00HDJr-1B for linux-arm-kernel@lists.infradead.org; Fri, 26 Aug 2022 08:37:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1661503046; x=1693039046; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+r0teR5Z05cLjaJ2Oi+EBrUZGdwZdyE4dwfYDD+PJTE=; b=2dbgJgc0ke1p1Sz3D7v1PJtQ8kSoLJttlVmx/4EKSvcMOW5Ak6OypVal 02BLOGDfYEH0tUdmqN9zAnl2i/SLRo8vkNJMQ5kUtrB1U/Txku3uoBT5k Lrz5DLxnJnW4tgC9SEhs19Nr1XLuOhimYXJ01NpLX6X2MFy/MH2CCBa8R Ci9/dz77LdWoTELB9+972SG9thOqJ3QbXapS4mi4kTbzkZoHZFse9SHKG KpZByhtxYxZ28MwMwB9Aaj7mrgi/Rj4kJmZqh/0F8gt+MkDS5CEpDw4cx 39Bo/20dZzoOB+MGljJgcQhDwgFJxvYPAHYtxxdEa09q4o27BntcDDl0n A==; X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="171082261" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 26 Aug 2022 01:37:23 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) 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.2507.12; Fri, 26 Aug 2022 01:37:22 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Fri, 26 Aug 2022 01:37:19 -0700 From: Claudiu Beznea To: , , , , , , CC: , , , Subject: [PATCH 5/9] ARM: dts: at91: sama5d2_icp: specify proper regulator output ranges Date: Fri, 26 Aug 2022 11:39:23 +0300 Message-ID: <20220826083927.3107272-6-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220826083927.3107272-1-claudiu.beznea@microchip.com> References: <20220826083927.3107272-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220826_013726_164872_840DDB42 X-CRM114-Status: UNSURE ( 8.52 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Min and max output ranges of regulators need to satisfy board requirements not PMIC requirements. Thus adjust device tree to cope with this. Fixes: 68a95ef72cef ("ARM: dts: at91: sama5d2-icp: add SAMA5D2-ICP") Signed-off-by: Claudiu Beznea --- arch/arm/boot/dts/at91-sama5d2_icp.dts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/arm/boot/dts/at91-sama5d2_icp.dts b/arch/arm/boot/dts/at91-sama5d2_icp.dts index 6865be8d7787..6296e3ffd303 100644 --- a/arch/arm/boot/dts/at91-sama5d2_icp.dts +++ b/arch/arm/boot/dts/at91-sama5d2_icp.dts @@ -196,8 +196,8 @@ mcp16502@5b { regulators { vdd_io_reg: VDD_IO { regulator-name = "VDD_IO"; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <3700000>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; regulator-initial-mode = <2>; regulator-allowed-modes = <2>, <4>; regulator-always-on; @@ -215,8 +215,8 @@ regulator-state-mem { VDD_DDR { regulator-name = "VDD_DDR"; - regulator-min-microvolt = <600000>; - regulator-max-microvolt = <1850000>; + regulator-min-microvolt = <1350000>; + regulator-max-microvolt = <1350000>; regulator-initial-mode = <2>; regulator-allowed-modes = <2>, <4>; regulator-always-on; @@ -234,8 +234,8 @@ regulator-state-mem { VDD_CORE { regulator-name = "VDD_CORE"; - regulator-min-microvolt = <600000>; - regulator-max-microvolt = <1850000>; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1250000>; regulator-initial-mode = <2>; regulator-allowed-modes = <2>, <4>; regulator-always-on; @@ -272,8 +272,8 @@ regulator-state-mem { LDO1 { regulator-name = "LDO1"; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <3700000>; + regulator-min-microvolt = <2500000>; + regulator-max-microvolt = <2500000>; regulator-always-on; regulator-state-standby { @@ -287,8 +287,8 @@ regulator-state-mem { LDO2 { regulator-name = "LDO2"; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <3700000>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; regulator-always-on; regulator-state-standby { From patchwork Fri Aug 26 08:39:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12955654 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 82101ECAAA3 for ; Fri, 26 Aug 2022 08:40:30 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gRAwS7a3jk0fcT7vWedMo2m+kkRoiENc7DENDMMw4WM=; b=C8Ysbv6yb8lWMK c712Pwub6k3fyqdumH3hMYq0FA2i/Oz3cEwxaOV3al+jtx+s9Gt88OKO/iK0DFPU4bQW5R4k6cqvw KHtl5i7CtzC+CrlDKGMikcyVgzH/E/Lg2Y/ht2o/ZWiOGzmhiXoH3o4OPZyPD8HIVbwwQUPQX0IHH 1FSvcbRm/ZO+6/Wht5vQachvy2QNhPBf89yccFKX9LbasFJwlYARb0HsucjJjwUSBl50eYcZ9XThX IMPgsVrS81/gWhwv0178FvVyMHsn5eqxk4bvlyaXB9PqL0CYJ5pdjvP/YVPxQbLJhbU+hL8Ao8apC VpIU+4UhHPqAhKtw9prQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRUrx-00HFFk-GF; Fri, 26 Aug 2022 08:39:13 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRUqH-00HDMW-5A for linux-arm-kernel@lists.infradead.org; Fri, 26 Aug 2022 08:37:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1661503048; x=1693039048; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6WB5xv8fShPUTYldpC0cO1DPSAbcvBwlaP8AS0LK/Y8=; b=PBQuiHkJznB1ccPbcY3uZBHi/VkEnYTlE9JXAsvz2libl+iR+MrOIF+0 S0XS5UR34bop/lknkj2nKhlyv7MK5m/RhfBrkhjGbE75UXHajpOR1jK3t iLEfJC/P+6cw1stl0JKcO2hVHg5gpZ41e7Qy3OnZaGPm88UNJvg+hAuZO C0SoBUxeX88Gg4ISVob6TBbz9UaNBDboCcIoNesFRzK1X8PKmBLCjKGf5 xBtmQQf08cfCSZpkRDmlfh97p8jXP296boH42URxnddF+daRAkZeNPeJ/ U0sEJWzrrgX6HHH2mA3Bk+MfMqRKo1TcWCLiBaP5IK154f1D521Gfrt4u A==; X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="188164706" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 26 Aug 2022 01:37:24 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) 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.2507.12; Fri, 26 Aug 2022 01:37:24 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Fri, 26 Aug 2022 01:37:22 -0700 From: Claudiu Beznea To: , , , , , , CC: , , , Subject: [PATCH 6/9] ARM: dts: at91: sama7g5ek: specify proper regulator output ranges Date: Fri, 26 Aug 2022 11:39:24 +0300 Message-ID: <20220826083927.3107272-7-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220826083927.3107272-1-claudiu.beznea@microchip.com> References: <20220826083927.3107272-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220826_013729_233185_BFB3B038 X-CRM114-Status: UNSURE ( 8.22 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Min and max output ranges of regulators need to satisfy board requirements not PMIC requirements. Thus adjust device tree to cope with this. Fixes: 7540629e2fc7 ("ARM: dts: at91: add sama7g5 SoC DT and sama7g5-ek") Signed-off-by: Claudiu Beznea --- arch/arm/boot/dts/at91-sama7g5ek.dts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/arm/boot/dts/at91-sama7g5ek.dts b/arch/arm/boot/dts/at91-sama7g5ek.dts index de44da2e4aae..3b25c67795dd 100644 --- a/arch/arm/boot/dts/at91-sama7g5ek.dts +++ b/arch/arm/boot/dts/at91-sama7g5ek.dts @@ -244,8 +244,8 @@ mcp16502@5b { regulators { vdd_3v3: VDD_IO { regulator-name = "VDD_IO"; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <3700000>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; regulator-initial-mode = <2>; regulator-allowed-modes = <2>, <4>; regulator-always-on; @@ -264,8 +264,8 @@ regulator-state-mem { vddioddr: VDD_DDR { regulator-name = "VDD_DDR"; - regulator-min-microvolt = <1300000>; - regulator-max-microvolt = <1450000>; + regulator-min-microvolt = <1350000>; + regulator-max-microvolt = <1350000>; regulator-initial-mode = <2>; regulator-allowed-modes = <2>, <4>; regulator-always-on; @@ -285,8 +285,8 @@ regulator-state-mem { vddcore: VDD_CORE { regulator-name = "VDD_CORE"; - regulator-min-microvolt = <1100000>; - regulator-max-microvolt = <1850000>; + regulator-min-microvolt = <1150000>; + regulator-max-microvolt = <1150000>; regulator-initial-mode = <2>; regulator-allowed-modes = <2>, <4>; regulator-always-on; @@ -306,7 +306,7 @@ regulator-state-mem { vddcpu: VDD_OTHER { regulator-name = "VDD_OTHER"; regulator-min-microvolt = <1050000>; - regulator-max-microvolt = <1850000>; + regulator-max-microvolt = <1250000>; regulator-initial-mode = <2>; regulator-allowed-modes = <2>, <4>; regulator-ramp-delay = <3125>; @@ -326,8 +326,8 @@ regulator-state-mem { vldo1: LDO1 { regulator-name = "LDO1"; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <3700000>; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; regulator-always-on; regulator-state-standby { From patchwork Fri Aug 26 08:39:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12955653 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 323ECECAAA3 for ; Fri, 26 Aug 2022 08:40:15 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QSOw2rYmESQdAEzd4Yb14Wx16WkhN7ojn0r3sE65iOs=; b=kuVmhLgCDbdeJ5 CJSmOKtWLNgxKTHScOYdQaCjiIRf9Gxi+QlQHU80D+Qr1YhCTOPwj2MeKUNfIuvMTVezUAVt5fIM4 MlUtp7nLGYttSxb/PXE4x3lYhSdOb57YRNHDHCJX/ArU97/bvVSMr6Sk/FCnJma3h/4tArsLC83jc TusRkVDOMYSGMysXnGtFQT1syRu8IRbZelQUPjbantL6X/fohaVfioE9p2Xs2Pkl8VGh5tBvr+V7x Tk9iS8fuBjbu8iEwymQn7uS5XeBlFopXKaoeFOFbJOAAGm9pGAEJ8fFP1zSCnT6pP12i258C1t3Zc 8ipk8mvAN9nSA1eW/4Ww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRUre-00HEwa-GO; Fri, 26 Aug 2022 08:38:54 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRUqH-00HDPh-59 for linux-arm-kernel@lists.infradead.org; Fri, 26 Aug 2022 08:37:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1661503048; x=1693039048; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=v4zsensQQvholXim790vjmpC9/l/eE/p7Tv+g5+KkXg=; b=WNwwA196fP1+tSlJ/W+Nl1XjeLs1dxq2S+PRFdKXo+bWzlYxQPeIwLBr XUh9ynFy8VXHUWZFxfHqnh4Ke8pZQngt30c+z+LFT00Gau/FBUnas6/FG DTJDRmHaS5GKi6Oz5G9MQYcb8UCWYNe/pw/9rz8ZLA5WbhZr4kmSdi06B JuBvq4+rNTc8LQBoeQVhXLk+nlhS3RY+7luMI0lkMNDC4souFJEUfJY1h r3dChjvZwMCBaFpoKT8TugSKgO1tWpfgE2Y0NFGm3LG4R107EalWTCtMX M5uOxV6t2iNNuYW2VNL7qAEXpdPzea2bL6w1Ko+iMp5JNuCJQ80COoATE A==; X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="188164712" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 26 Aug 2022 01:37:27 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) 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.2507.12; Fri, 26 Aug 2022 01:37:27 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Fri, 26 Aug 2022 01:37:25 -0700 From: Claudiu Beznea To: , , , , , , CC: , , , Subject: [PATCH 7/9] ARM: dts: at91: sama5d27_wlsom1: don't keep ldo2 enabled all the time Date: Fri, 26 Aug 2022 11:39:25 +0300 Message-ID: <20220826083927.3107272-8-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220826083927.3107272-1-claudiu.beznea@microchip.com> References: <20220826083927.3107272-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220826_013729_236692_13AD5EEC X-CRM114-Status: UNSURE ( 9.31 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org ldo2 is not used by any consumer on sama5d27_wlsom1 board, thus don't keep it enabled all the time. Fixes: 5d4c3cfb63fe ("ARM: dts: at91: sama5d27_wlsom1: add SAMA5D27 wlsom1 and wlsom1-ek") Signed-off-by: Claudiu Beznea --- arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi b/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi index 342fcfd974d7..83bcf9fe0152 100644 --- a/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi +++ b/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi @@ -177,7 +177,6 @@ LDO2 { regulator-name = "LDO2"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <3300000>; - regulator-always-on; regulator-state-standby { regulator-on-in-suspend; From patchwork Fri Aug 26 08:39:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12955656 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 0AC74ECAAD7 for ; Fri, 26 Aug 2022 08:41:35 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=q29IbUc1HaZwTXlmq57zhBP5wH95vzxBYz7EIafXqTY=; b=H9toNfJhb264dl 5PN6FOMCu/7uxa+tfhguMrUJveHmt17TYcEewtSGTE1tCtJ5hv5WAoziMx4W2L2LtmfccwwDaCA47 J3GiH5t78eitKlEAlWRLA7iyLrbttPR0DHyzPHuDYyxCOyCYflIYbq21Nt/tqecvGLDfi/84QgUAM 0V3alv62Qi/GSA6MXtH89kZG9+Ts2evRyd3s/4dRb5SOjuHMUbCqyBdH+8HpT7OedZ4LQlBPrZ9qw urV1pep8sseSGnpFC+a28CMjGt/c0SdU5rb3H0HFYZxNNzUvnT1Q19idFYWtXck4XrlNrRcEXQIfp a1sP5y5WYs1K7eEo7dvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRUtF-00HGGv-O8; Fri, 26 Aug 2022 08:40:33 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRUqL-00HDRH-04 for linux-arm-kernel@lists.infradead.org; Fri, 26 Aug 2022 08:37:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1661503052; x=1693039052; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NhTYybz8cFKXvPDczCL3sDgZh+OWnjOmY+XsBCIQazs=; b=dz3bGmMHvCzh1UO4U+PzOThni5f13jYBdJ6lKoFJXvldCk91T3vhjrw+ cqZ3jlx5/LC3NXqU7F9ui2m3sbnLjoTf4qLEyfiYnEGR5S4er3HTyw005 SL+7gGU+esV2TbVOndsPcPOvpXXU1XHniBoUx8YoAlSlAHmklFywSBoyZ UDoYn73TWLSkk3fzHo3Gd74k83tLyIsEPpPa453gwe4h4tDCtJaTBuXFk h7tBN8t9JBuSZjWhaChZzDRGw0VZWnDEOMd7cgkBrZeDWWqckK416vWq2 GQALTCfS4aLl5uFQUpzhzYng7blFm5ryWSP26pN9J6zsvcqo4tx4X7ld/ w==; X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="188164732" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 26 Aug 2022 01:37:32 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) 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.2507.12; Fri, 26 Aug 2022 01:37:30 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Fri, 26 Aug 2022 01:37:27 -0700 From: Claudiu Beznea To: , , , , , , CC: , , , Subject: [PATCH 8/9] ARM: dts: at91: sama5d2_icp: don't keep vdd_other enabled all the time Date: Fri, 26 Aug 2022 11:39:26 +0300 Message-ID: <20220826083927.3107272-9-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220826083927.3107272-1-claudiu.beznea@microchip.com> References: <20220826083927.3107272-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220826_013733_384724_BD28494B X-CRM114-Status: UNSURE ( 8.87 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org VDD_OTHER is not connected to any on board consumer thus it is not needed to keep it enabled all the time. Fixes: 68a95ef72cef ("ARM: dts: at91: sama5d2-icp: add SAMA5D2-ICP") Signed-off-by: Claudiu Beznea --- arch/arm/boot/dts/at91-sama5d2_icp.dts | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/boot/dts/at91-sama5d2_icp.dts b/arch/arm/boot/dts/at91-sama5d2_icp.dts index 6296e3ffd303..dd1dec9d4e07 100644 --- a/arch/arm/boot/dts/at91-sama5d2_icp.dts +++ b/arch/arm/boot/dts/at91-sama5d2_icp.dts @@ -257,7 +257,6 @@ VDD_OTHER { regulator-max-microvolt = <1850000>; regulator-initial-mode = <2>; regulator-allowed-modes = <2>, <4>; - regulator-always-on; regulator-state-standby { regulator-on-in-suspend; From patchwork Fri Aug 26 08:39:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12955657 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 48278ECAAD2 for ; Fri, 26 Aug 2022 08:42:02 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7y7H+1fwJGSgRqJcmfN146dwY78ApmxALqT1TT5HsZI=; b=dzMPnPIrU5wBRV UHxEAvFbcFu98uLURLbS1EsfwUegeIvuikZboeIMGVBqH5c8VFIJncb+YQFEhIJ7C9iDi7neulMUu Nmm7rdU8TliGf4y0GjzmzNsdcmu4HCebQfTzrjcKzUBTIh5Ptdyq9n5YmFHVPLiLZHrvIPO/+RlwY IJYav+n2Oe6DrWdVHIC+0jU/v+5+wmO7o4vizgmLoZ5xDWocD9K8dVSirPGvhSEItYiz+7QdqlQAD dJ798a1c64sjeQBjyPLAvyE6j90RgZHxNaVD3tv12WZTgzxASRqYlL4SEAuLASarY5niU6TedW78t Byl7fZwvSBZMRkwAVj/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRUtY-00HGYB-SA; Fri, 26 Aug 2022 08:40:53 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRUqN-00HDRH-Th for linux-arm-kernel@lists.infradead.org; Fri, 26 Aug 2022 08:37:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1661503055; x=1693039055; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=v/GMC8+uXpbJ05sehOG56CNutF0wXIfUIa6mE5Vt65Y=; b=TxI+cMVp5ukPGQL3PA799DKFn2swhJZzKltyUDpXKkfrIMb2sD5xSHge 5osp6UpQz47bqS9bNlInGhVoHoOP1JuiUTMGfVnShVh5MPkPUZTOL++57 OElfi0YRrW8UR9k9usFMI/WKfzPjKwrVNN5RVLmEyEA4ATN+E0PVLBudU 5cWVkNDJVZcnwHhUw7r/zrouoE8E14ii36doha1Utk0Yjk00QZUSQgP6E F1A49Pfd4cac3VXsCKpcItu7/65dMnlAlmGajYKngd/yFijrZ434cVMwm 4fz09sNDm/9dEkz7u7zKKXbIOg2qqw5YbbNcNNeftxaCQ6QeotKd0U6x4 g==; X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="188164749" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 26 Aug 2022 01:37:35 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) 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.2507.12; Fri, 26 Aug 2022 01:37:33 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Fri, 26 Aug 2022 01:37:30 -0700 From: Claudiu Beznea To: , , , , , , CC: , , , Subject: [PATCH 9/9] ARM: dts: at91: sam9x60ek: remove simple-bus for regulators Date: Fri, 26 Aug 2022 11:39:27 +0300 Message-ID: <20220826083927.3107272-10-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220826083927.3107272-1-claudiu.beznea@microchip.com> References: <20220826083927.3107272-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220826_013736_013034_89005350 X-CRM114-Status: GOOD ( 10.54 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Keep regulators as individual devices. There is no need to have them under simple bus. This will throw compilation warnings like: - unnecessary #address-cells/#size-cells without "ranges" or child "reg" property. - node has a unit name, but no reg or ranges property. While at it move it down a bit in the file to keep entries sorted alphabetically. Signed-off-by: Claudiu Beznea --- arch/arm/boot/dts/at91-sam9x60ek.dts | 78 +++++++++++++--------------- 1 file changed, 36 insertions(+), 42 deletions(-) diff --git a/arch/arm/boot/dts/at91-sam9x60ek.dts b/arch/arm/boot/dts/at91-sam9x60ek.dts index 81c38e101f58..7ade9979e1c6 100644 --- a/arch/arm/boot/dts/at91-sam9x60ek.dts +++ b/arch/arm/boot/dts/at91-sam9x60ek.dts @@ -34,48 +34,6 @@ main_xtal { }; }; - regulators: regulators { - compatible = "simple-bus"; - #address-cells = <1>; - #size-cells = <0>; - - vdd_1v8: fixed-regulator-vdd_1v8@0 { - compatible = "regulator-fixed"; - regulator-name = "VDD_1V8"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-always-on; - status = "okay"; - }; - - vdd_1v15: fixed-regulator-vdd_1v15@1 { - compatible = "regulator-fixed"; - regulator-name = "VDD_1V15"; - regulator-min-microvolt = <1150000>; - regulator-max-microvolt = <1150000>; - regulator-always-on; - status = "okay"; - }; - - vdd1_3v3: fixed-regulator-vdd1_3v3@2 { - compatible = "regulator-fixed"; - regulator-name = "VDD1_3V3"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - status = "okay"; - }; - - vdd2_3v3: regulator-fixed-vdd2_3v3@3 { - compatible = "regulator-fixed"; - regulator-name = "VDD2_3V3"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - status = "okay"; - }; - }; - gpio-keys { compatible = "gpio-keys"; pinctrl-names = "default"; @@ -111,6 +69,42 @@ blue { linux,default-trigger = "heartbeat"; }; }; + + vdd_1v8: fixed-regulator-vdd_1v8 { + compatible = "regulator-fixed"; + regulator-name = "VDD_1V8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + status = "okay"; + }; + + vdd_1v15: fixed-regulator-vdd_1v15 { + compatible = "regulator-fixed"; + regulator-name = "VDD_1V15"; + regulator-min-microvolt = <1150000>; + regulator-max-microvolt = <1150000>; + regulator-always-on; + status = "okay"; + }; + + vdd1_3v3: fixed-regulator-vdd1_3v3 { + compatible = "regulator-fixed"; + regulator-name = "VDD1_3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + status = "okay"; + }; + + vdd2_3v3: regulator-fixed-vdd2_3v3 { + compatible = "regulator-fixed"; + regulator-name = "VDD2_3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + status = "okay"; + }; }; &adc {