From e3f92093d71d12399d239d0e6321dfba7bd5fef7 Mon Sep 17 00:00:00 2001 From: Pali Rohár Date: Mon, 10 Jan 2022 11:47:18 +0100 Subject: arm: mvebu: turris_omnia: Fixup SATA or PCIe nodes at runtime in DT blob MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On of the MiniPCIe ports on Turris Omnia is also a mSATA port. Whether it works in SATA or PCIe mode is determined by a strapping pin, which value is read from the MCU. We already determine which type of card is connected when configuring SerDeses. But until now we left both SATA and PCIe port 0 nodes in device tree enabled, and so the SATA driver is probed in U-Boot / Linux even if we know there is no mSATA card, and similarly PCIe driver tries to link on port 0 even if we know there is mSATA card, not a PCIe card. Fixup device tree blob to disable SATA node if mSATA card is not present, and to disable PCIe port 0 node if mSATA card is present. Do this for U-Boot's DT blob before relocation and also for kernel DT blob before booting. This ensures that software does not try to use SATA or PCIe HW when corresponding PHY is not configured. Signed-off-by: Pali Rohár [ refactored and fixed some issues ] Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- configs/turris_omnia_defconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'configs') diff --git a/configs/turris_omnia_defconfig b/configs/turris_omnia_defconfig index 9d121b7982..d6f70caeaf 100644 --- a/configs/turris_omnia_defconfig +++ b/configs/turris_omnia_defconfig @@ -23,6 +23,7 @@ CONFIG_DEBUG_UART_BASE=0xd0012000 CONFIG_DEBUG_UART_CLOCK=250000000 CONFIG_DEBUG_UART=y CONFIG_AHCI=y +CONFIG_OF_BOARD_FIXUP=y CONFIG_DISTRO_DEFAULTS=y CONFIG_SYS_LOAD_ADDR=0x800000 CONFIG_FIT=y -- cgit v1.2.3