Re: [PATCH 0/6] memory: tegra114-emc: Fix bus width and pad auto-calibration

From: Krzysztof Kozlowski

Date: Fri Nov 20 2026 - 08:47:16 EST


> On a Tegra Note 7 (Tegra114, P1640) I had kernel panics, bit errors and
> WLAN firmware hangs under load, and two kernel panics on EMC rate
> changes from pll_p to 624 MHz on pll_c. Looking at the EMC I
> found three problems in the Tegra114 EMC driver:
>
> 1. EMC_AUTO_CAL_CONFIG is masked down to the self-clearing start bit
> before it is written, which clears AUTO_CAL_ENABLE on the first rate
> change. The bootloader leaves calibration enabled, with channel 0 as
> master and channel 1 as slave. Patch 1 stops clearing the register.
> Programming the table values needs the channel registers, which
> patches 4 to 6 describe and use.
> 2. emc_icc_set() assumes a 32-bit DRAM bus, but Tegra114 has two 32-bit
> channels. Every interconnect request asks for twice the EMC rate, so
> actmon at 312 MHz moves the EMC to 624 MHz (patch 2).
> 3. Pad auto-calibration is disabled for every clock change, but the
> interval is only restored if EMC_CTT_TERM_CTRL changes, so it stays
> off after the first change (patch 3).
>
> Patches 1 to 3 are small, do not depend on the device tree change and
> are marked for stable. Patch 1 comes first on purpose: patch 2 and the
> clk patch mentioned below make the EMC run at a real 624 MHz on pll_c
> more often, and both panics I saw on a change to that rate were with
> the calibration cleared. Patches 4 to 6 are not marked: they need the
> binding and the device tree. Patches 1 to 5 are for the memory
> controller tree, patch 6 for the Tegra tree. The driver has been there
> since v7.2, but the first in-tree Tegra114 device tree with EMC timings
> (TF701T) came with v7.4-rc1, so the stable tags matter for v7.4 and for
> out-of-tree device trees.

A bit confusing. This clearly suggests dependency on DTS, thus ABI
break, but code does not look like that.

Best regards,
Krzysztof

--
Krzysztof Kozlowski <krzk@xxxxxxxxxx>