[PATCHv2 13/23] ARM: dts: socfpga: add Enclustra boot-mode dtsi

Lothar Rubusch posted 23 patches 1 month ago
There is a newer version of this series
[PATCHv2 13/23] ARM: dts: socfpga: add Enclustra boot-mode dtsi
Posted by Lothar Rubusch 1 month ago
Add generic boot-mode support to Enclustra Arria10 and Cyclone5 boards.
Some Enclustra carrier boards need hardware adjustments specific to the
selected boot-mode.

Signed-off-by: Andreas Buerkler <andreas.buerkler@enclustra.com>
Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
---
 .../socfpga_enclustra_mercury_bootmode_emmc.dtsi     | 12 ++++++++++++
 .../socfpga_enclustra_mercury_bootmode_qspi.dtsi     |  8 ++++++++
 .../socfpga_enclustra_mercury_bootmode_sdmmc.dtsi    |  8 ++++++++
 3 files changed, 28 insertions(+)
 create mode 100644 arch/arm/boot/dts/intel/socfpga/socfpga_enclustra_mercury_bootmode_emmc.dtsi
 create mode 100644 arch/arm/boot/dts/intel/socfpga/socfpga_enclustra_mercury_bootmode_qspi.dtsi
 create mode 100644 arch/arm/boot/dts/intel/socfpga/socfpga_enclustra_mercury_bootmode_sdmmc.dtsi

diff --git a/arch/arm/boot/dts/intel/socfpga/socfpga_enclustra_mercury_bootmode_emmc.dtsi b/arch/arm/boot/dts/intel/socfpga/socfpga_enclustra_mercury_bootmode_emmc.dtsi
new file mode 100644
index 000000000..d79cb64da
--- /dev/null
+++ b/arch/arm/boot/dts/intel/socfpga/socfpga_enclustra_mercury_bootmode_emmc.dtsi
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * Copyright (C) 2024 Enclustra GmbH - https://www.enclustra.com
+ */
+
+&qspi {
+	status = "disabled";
+};
+
+&mmc {
+	bus-width = <8>;
+};
diff --git a/arch/arm/boot/dts/intel/socfpga/socfpga_enclustra_mercury_bootmode_qspi.dtsi b/arch/arm/boot/dts/intel/socfpga/socfpga_enclustra_mercury_bootmode_qspi.dtsi
new file mode 100644
index 000000000..5ba21dd8f
--- /dev/null
+++ b/arch/arm/boot/dts/intel/socfpga/socfpga_enclustra_mercury_bootmode_qspi.dtsi
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * Copyright (C) 2024 Enclustra GmbH - https://www.enclustra.com
+ */
+
+&mmc {
+	status = "disabled";
+};
diff --git a/arch/arm/boot/dts/intel/socfpga/socfpga_enclustra_mercury_bootmode_sdmmc.dtsi b/arch/arm/boot/dts/intel/socfpga/socfpga_enclustra_mercury_bootmode_sdmmc.dtsi
new file mode 100644
index 000000000..2b102e0b6
--- /dev/null
+++ b/arch/arm/boot/dts/intel/socfpga/socfpga_enclustra_mercury_bootmode_sdmmc.dtsi
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * Copyright (C) 2024 Enclustra GmbH - https://www.enclustra.com
+ */
+
+&qspi {
+	status = "disabled";
+};
-- 
2.25.1
Re: [PATCHv2 13/23] ARM: dts: socfpga: add Enclustra boot-mode dtsi
Posted by Ahmad Fatoum 1 month ago
Hello Lothar,

On 20.10.24 21:40, Lothar Rubusch wrote:
> Add generic boot-mode support to Enclustra Arria10 and Cyclone5 boards.
> Some Enclustra carrier boards need hardware adjustments specific to the
> selected boot-mode.

Can you elaborate more on these hardware adjustments?

Do the different boot media e.g. share pins and can't be active at the same
time?

Thanks,
Ahmad

> 
> Signed-off-by: Andreas Buerkler <andreas.buerkler@enclustra.com>
> Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
> ---
>  .../socfpga_enclustra_mercury_bootmode_emmc.dtsi     | 12 ++++++++++++
>  .../socfpga_enclustra_mercury_bootmode_qspi.dtsi     |  8 ++++++++
>  .../socfpga_enclustra_mercury_bootmode_sdmmc.dtsi    |  8 ++++++++
>  3 files changed, 28 insertions(+)
>  create mode 100644 arch/arm/boot/dts/intel/socfpga/socfpga_enclustra_mercury_bootmode_emmc.dtsi
>  create mode 100644 arch/arm/boot/dts/intel/socfpga/socfpga_enclustra_mercury_bootmode_qspi.dtsi
>  create mode 100644 arch/arm/boot/dts/intel/socfpga/socfpga_enclustra_mercury_bootmode_sdmmc.dtsi
> 
> diff --git a/arch/arm/boot/dts/intel/socfpga/socfpga_enclustra_mercury_bootmode_emmc.dtsi b/arch/arm/boot/dts/intel/socfpga/socfpga_enclustra_mercury_bootmode_emmc.dtsi
> new file mode 100644
> index 000000000..d79cb64da
> --- /dev/null
> +++ b/arch/arm/boot/dts/intel/socfpga/socfpga_enclustra_mercury_bootmode_emmc.dtsi
> @@ -0,0 +1,12 @@
> +// SPDX-License-Identifier: GPL-2.0+ OR MIT
> +/*
> + * Copyright (C) 2024 Enclustra GmbH - https://www.enclustra.com
> + */
> +
> +&qspi {
> +	status = "disabled";
> +};
> +
> +&mmc {
> +	bus-width = <8>;
> +};
> diff --git a/arch/arm/boot/dts/intel/socfpga/socfpga_enclustra_mercury_bootmode_qspi.dtsi b/arch/arm/boot/dts/intel/socfpga/socfpga_enclustra_mercury_bootmode_qspi.dtsi
> new file mode 100644
> index 000000000..5ba21dd8f
> --- /dev/null
> +++ b/arch/arm/boot/dts/intel/socfpga/socfpga_enclustra_mercury_bootmode_qspi.dtsi
> @@ -0,0 +1,8 @@
> +// SPDX-License-Identifier: GPL-2.0+ OR MIT
> +/*
> + * Copyright (C) 2024 Enclustra GmbH - https://www.enclustra.com
> + */
> +
> +&mmc {
> +	status = "disabled";
> +};
> diff --git a/arch/arm/boot/dts/intel/socfpga/socfpga_enclustra_mercury_bootmode_sdmmc.dtsi b/arch/arm/boot/dts/intel/socfpga/socfpga_enclustra_mercury_bootmode_sdmmc.dtsi
> new file mode 100644
> index 000000000..2b102e0b6
> --- /dev/null
> +++ b/arch/arm/boot/dts/intel/socfpga/socfpga_enclustra_mercury_bootmode_sdmmc.dtsi
> @@ -0,0 +1,8 @@
> +// SPDX-License-Identifier: GPL-2.0+ OR MIT
> +/*
> + * Copyright (C) 2024 Enclustra GmbH - https://www.enclustra.com
> + */
> +
> +&qspi {
> +	status = "disabled";
> +};


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
Re: [PATCHv2 13/23] ARM: dts: socfpga: add Enclustra boot-mode dtsi
Posted by Lothar Rubusch 1 month ago
On Wed, Oct 23, 2024 at 7:20 PM Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:
>
> Hello Lothar,
>
> On 20.10.24 21:40, Lothar Rubusch wrote:
> > Add generic boot-mode support to Enclustra Arria10 and Cyclone5 boards.
> > Some Enclustra carrier boards need hardware adjustments specific to the
> > selected boot-mode.
>
> Can you elaborate more on these hardware adjustments?
>
> Do the different boot media e.g. share pins and can't be active at the same
> time?

Exactly. Example, for booting from emmc, qspi needs to be turned off.
For reaching SD card or eMMC the boot mode pins need to be mux'd
accordingly. That's also why for e.g. flashing QSPI from off u-boot
Enclustra implemented a GPIO based boot mode switch. Same for
switching the MMCs.