Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm: dts: vexpress-v2p-ca15_a7: disable NOR flash node by default

Accessing the NOR flash memory from the kernel will disrupt CPU sleep/
idles states and CPU hotplugging. We need to disable this DT node by
default. Setups that want to access the flash can modify this entry to
enable the flash again but also ensuring to disable CPU idle states and
CPU hotplug.

The platform firmware assumes the flash is always in read mode while
Linux kernel driver leaves NOR flash in "read id" mode after
initialization. If it gets used actively, it can be in some other state.

So far we had not seen this issue as the NOR flash drivers in kernel
were not enabled by default. However it was enable in multi_v7 config by
Commit 5f068190cc10 ("ARM: multi_v7_defconfig: Enable support for CFI NOR FLASH")

So, let's mark the NOR flash disabled so that the platform can boot
again. This based on:
Commit 980bbff018f6 ("ARM64: juno: disable NOR flash node by default")

Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>

+10 -1
+1 -1
arch/arm/boot/dts/vexpress-v2m-rs1.dtsi
··· 30 30 #interrupt-cells = <1>; 31 31 ranges; 32 32 33 - flash@0,00000000 { 33 + nor_flash: flash@0,00000000 { 34 34 compatible = "arm,vexpress-flash", "cfi-flash"; 35 35 reg = <0 0x00000000 0x04000000>, 36 36 <4 0x00000000 0x04000000>;
+9
arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts
··· 680 680 <0 3 &gic 0 39 4>; 681 681 }; 682 682 }; 683 + 684 + &nor_flash { 685 + /* 686 + * Unfortunately, accessing the flash disturbs the CPU idle states 687 + * (suspend) and CPU hotplug of this platform. For this reason, flash 688 + * hardware access is disabled by default on this platform alone. 689 + */ 690 + status = "disabled"; 691 + };