From: Claudiu Beznea <claudiu.beznea@microchip.com>
To: <nicolas.ferre@microchip.com>, <alexandre.belloni@bootlin.com>,
<robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>,
<linux@armlinux.org.uk>, <arnd@arndb.de>
Cc: <linux-arm-kernel@lists.infradead.org>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Claudiu Beznea <claudiu.beznea@microchip.com>
Subject: [PATCH 01/11] ARM: at91: pm: avoid soft resetting AC DLL
Date: Wed, 26 Oct 2022 15:41:04 +0300 [thread overview]
Message-ID: <20221026124114.985876-2-claudiu.beznea@microchip.com> (raw)
In-Reply-To: <20221026124114.985876-1-claudiu.beznea@microchip.com>
Do not soft reset AC DLL as controller is buggy and this operation my
introduce glitches in the controller leading to undefined behavior.
Fixes: f0bbf17958e8 ("ARM: at91: pm: add self-refresh support for sama7g5")
Depends-on: a02875c4cbd6 ("ARM: at91: pm: fix self-refresh for sama7g5")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
arch/arm/mach-at91/pm_suspend.S | 7 ++++++-
include/soc/at91/sama7-ddr.h | 5 ++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-at91/pm_suspend.S b/arch/arm/mach-at91/pm_suspend.S
index ffed4d949042..e4904faf1753 100644
--- a/arch/arm/mach-at91/pm_suspend.S
+++ b/arch/arm/mach-at91/pm_suspend.S
@@ -169,10 +169,15 @@ sr_ena_2:
cmp tmp1, #UDDRC_STAT_SELFREF_TYPE_SW
bne sr_ena_2
- /* Put DDR PHY's DLL in bypass mode for non-backup modes. */
+ /* Disable DX DLLs for non-backup modes. */
cmp r7, #AT91_PM_BACKUP
beq sr_ena_3
+ /* Do not soft reset the AC DLL. */
+ ldr tmp1, [r3, DDR3PHY_ACDLLCR]
+ bic tmp1, tmp1, DDR3PHY_ACDLLCR_DLLSRST
+ str tmp1, [r3, DDR3PHY_ACDLLCR]
+
/* Disable DX DLLs. */
ldr tmp1, [r3, #DDR3PHY_DX0DLLCR]
orr tmp1, tmp1, #DDR3PHY_DXDLLCR_DLLDIS
diff --git a/include/soc/at91/sama7-ddr.h b/include/soc/at91/sama7-ddr.h
index 6ce3bd22f6c6..5ad7ac2e3a7c 100644
--- a/include/soc/at91/sama7-ddr.h
+++ b/include/soc/at91/sama7-ddr.h
@@ -26,7 +26,10 @@
#define DDR3PHY_PGSR (0x0C) /* DDR3PHY PHY General Status Register */
#define DDR3PHY_PGSR_IDONE (1 << 0) /* Initialization Done */
-#define DDR3PHY_ACIOCR (0x24) /* DDR3PHY AC I/O Configuration Register */
+#define DDR3PHY_ACDLLCR (0x14) /* DDR3PHY AC DLL Control Register */
+#define DDR3PHY_ACDLLCR_DLLSRST (1 << 30) /* DLL Soft Reset */
+
+#define DDR3PHY_ACIOCR (0x24) /* DDR3PHY AC I/O Configuration Register */
#define DDR3PHY_ACIOCR_CSPDD_CS0 (1 << 18) /* CS#[0] Power Down Driver */
#define DDR3PHY_ACIOCR_CKPDD_CK0 (1 << 8) /* CK[0] Power Down Driver */
#define DDR3PHY_ACIORC_ACPDD (1 << 3) /* AC Power Down Driver */
--
2.34.1
next prev parent reply other threads:[~2022-10-26 12:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-26 12:41 [PATCH 00/11] ARM: at91: fixes and enhancement Claudiu Beznea
2022-10-26 12:41 ` Claudiu Beznea [this message]
2022-10-26 12:41 ` [PATCH 02/11] ARM: dts: at91: sama7g5: add otpc node Claudiu Beznea
2022-10-26 12:41 ` [PATCH 03/11] ARM: dts: at91: sama7g5: add io-channel-cells to adc node Claudiu Beznea
2022-10-26 12:41 ` [PATCH 04/11] ARM: dts: at91: sama7g5: add cells for temperature calibration Claudiu Beznea
2022-10-26 12:41 ` [PATCH 05/11] ARM: dts: at91: sama7g5: add temperature sensor Claudiu Beznea
2022-10-26 12:41 ` [PATCH 06/11] ARM: dts: at91: sama7g5: add thermal zones node Claudiu Beznea
2022-10-26 12:41 ` [PATCH 07/11] ARM: configs: at91: sama7: use make savedefconfig Claudiu Beznea
2022-10-26 12:41 ` [PATCH 08/11] ARM: configs: at91: sama7: add config for microchip otpc Claudiu Beznea
2022-10-26 12:41 ` [PATCH 09/11] ARM: configs: at91: sama7: add config for thermal management Claudiu Beznea
2022-10-26 12:41 ` [PATCH 10/11] ARM: dts: at91: sama7g5: use generic name for securam Claudiu Beznea
2022-10-26 12:41 ` [PATCH 11/11] ARM: dts: at91: sam9x60ek: remove status = "okay" for regulators Claudiu Beznea
2022-11-01 15:09 ` [PATCH 00/11] ARM: at91: fixes and enhancement Claudiu.Beznea
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221026124114.985876-2-claudiu.beznea@microchip.com \
--to=claudiu.beznea@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=nicolas.ferre@microchip.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®