[PATCH 1/6] memory: tegra114-emc: Stop clearing EMC_AUTO_CAL_CONFIG
From: Patrick Fischer via B4 Relay
Date: Wed Nov 11 2026 - 05:17:13 EST
From: Patrick Fischer <admin@xxxxxxxxxxxxxxxxxx>
tegra114_emc_prepare_timing_change() masks the EMC_AUTO_CAL_CONFIG value
of the timing with AUTO_CAL_START before writing it, which leaves only
the self-clearing start bit. As last_timing starts out zeroed, the first
rate change already does this write. From then on AUTO_CAL_ENABLE is
off and, according to the Tegra 4 TRM, the pads no longer use the
pull-up and pull-down codes from the calibration logic but the static
settings from the pad control registers. On a Tegra Note 7 (P1640) the
bootloader leaves 0x20f10f0f in channel 0 and 0x28f10f0f in channel 1;
after the first rate change both read 0.
The full value cannot be written through the broadcast registers
either: channel 0 runs the calibration and channel 1 is its slave
(AUTO_CAL_SLAVE_MODE, bit 27), so a broadcast write would make both
channels masters. Leave the register alone, which keeps the calibration
the way the bootloader set it up. That value is not necessarily the one
in the timing tables: on the P1640 the bootloader uses the pull-up and
pull-down offsets that the tables only have at 792 MHz (0xf0f). A later
patch programs the table values per channel where the device tree
describes the channel registers.
Tested on a Tegra Note 7 (P1640) with this series but without the
channel registers in the device tree, which takes the path this patch
leaves for existing device trees: both channels keep the bootloader
values through rate changes between 204, 408 and 624 MHz, and a 10
minute memory test switching between 408 and 624 MHz ran without
errors.
Fixes: dce208b5405f ("memory: tegra: Add Tegra114 EMC driver")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Patrick Fischer <admin@xxxxxxxxxxxxxxxxxx>
---
drivers/memory/tegra/tegra114-emc.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/memory/tegra/tegra114-emc.c b/drivers/memory/tegra/tegra114-emc.c
index e50d71842d3a..eb1360627ece 100644
--- a/drivers/memory/tegra/tegra114-emc.c
+++ b/drivers/memory/tegra/tegra114-emc.c
@@ -609,12 +609,6 @@ static int tegra114_emc_prepare_timing_change(struct tegra_emc *emc,
emc_ccfifo_writel(emc, timing->emc_auto_cal_config3,
EMC_AUTO_CAL_CONFIG3);
- if (timing->emc_auto_cal_config != last->emc_auto_cal_config) {
- val = timing->emc_auto_cal_config;
- val &= EMC_AUTO_CAL_CONFIG_AUTO_CAL_START;
- emc_ccfifo_writel(emc, val, EMC_AUTO_CAL_CONFIG);
- }
-
/* DDR3: predict MRS long wait count */
if (emc->dram_type == DRAM_TYPE_DDR3 &&
dll_change == DLL_CHANGE_ON) {
--
2.56.0