From 33fc6fc105993f0ba3b19e93912ef2cc59e22cef Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Thu, 10 Dec 2020 06:40:10 +0100 Subject: [PATCH 1/3] arm: mvebu: Add armada-xp-gp-u-boot.dtsi for U-Boot properties Add some missing "u-boot,dm-pre-reloc;" properties to UART0, SPI controller and SPI NOR flash node to enable usage in SPL. Otherwise these devices will not be available. Signed-off-by: Stefan Roese Cc: Dennis Gilmore Tested-by: Dennis Gilmore --- arch/arm/dts/armada-xp-gp-u-boot.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 arch/arm/dts/armada-xp-gp-u-boot.dtsi diff --git a/arch/arm/dts/armada-xp-gp-u-boot.dtsi b/arch/arm/dts/armada-xp-gp-u-boot.dtsi new file mode 100644 index 0000000000..2422856616 --- /dev/null +++ b/arch/arm/dts/armada-xp-gp-u-boot.dtsi @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/ { + soc { + internal-regs { + serial@12000 { + u-boot,dm-pre-reloc; + }; + }; + }; +}; + +&spi0 { + u-boot,dm-pre-reloc; + + spi-flash@0 { + u-boot,dm-pre-reloc; + }; +}; From ce040932b569591f2907e246b771cd632eef52e7 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Fri, 11 Dec 2020 05:47:40 +0100 Subject: [PATCH 2/3] arm: mvebu: armada-xp-gp.dts: Add spi0 alias For correct spi bus detection the spi0 alias is needed in the DT. Otherwise this error will ocurr in U-Boot: Invalid bus 0 (err=-19) Failed to initialize SPI flash at 0:0 (error -19) Signed-off-by: Stefan Roese Cc: Dennis Gilmore Tested-by: Dennis Gilmore --- arch/arm/dts/armada-xp-gp.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/dts/armada-xp-gp.dts b/arch/arm/dts/armada-xp-gp.dts index 1139e9469a..d46475fe22 100644 --- a/arch/arm/dts/armada-xp-gp.dts +++ b/arch/arm/dts/armada-xp-gp.dts @@ -31,6 +31,10 @@ stdout-path = "serial0:115200n8"; }; + aliases { + spi0 = &spi0; + }; + memory@0 { device_type = "memory"; /* From 0eb0eb4ab225fd0ffb3f63429dba8d4fb82cb71c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Wed, 23 Dec 2020 16:07:08 +0100 Subject: [PATCH 3/3] Revert "arm64: a37xx: pci: Assert PERST# signal when unloading driver" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 828d32621686aec593076d16445d39b9b8d49c05. This change revers code which asserting PERST# signal when unloading driver. Driver's remove callback is still there as it is used for other functionality. Asserting PERST# signal prior booting kernel is causing that A3720 boards (Turris MOX and Espressobin) with stable Linux kernel versions 4.14 and 4.19 are not able to detect some PCIe cards (e.g. Compex WLE200 and WLE900) and anymore. When PERST# signal is not asserted these cards are detected correctly. As this is regression for existing stable Linux kernel versions revert this problematic change in U-Boot. To make cards working with OpenWRT 4.14 kernel it is needed to disable link training prior booting kernel, which is already done in driver's remove callback. Described issue is in Linux kernel pci aardvark driver which is (hopefully) fixed in latest upstream versions. Latest upstream versions should be able to initialize PCIe bus and detects cards independently of the link training and PERST# signal state. So with this change, U-Boot on A3720 boards should be able to boot OpenWRT 4.14 kernel, stable 4.14 and 4.19 kernels and also latest mainline kernels. Signed-off-by: Pali Rohár Reviewed-by: Stefan Roese --- drivers/pci/pci-aardvark.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c index babb84ca93..5c6e30e667 100644 --- a/drivers/pci/pci-aardvark.c +++ b/drivers/pci/pci-aardvark.c @@ -649,9 +649,6 @@ static int pcie_advk_remove(struct udevice *dev) struct pcie_advk *pcie = dev_get_priv(dev); u32 reg; - if (dm_gpio_is_valid(&pcie->reset_gpio)) - dm_gpio_set_value(&pcie->reset_gpio, 1); - reg = advk_readl(pcie, PCIE_CORE_CTRL0_REG); reg &= ~LINK_TRAINING_EN; advk_writel(pcie, reg, PCIE_CORE_CTRL0_REG);