Skip to contentSkip to conversation

mtd: spi-nor-ids: Add support for ESMT/EON EN25Q80B

PATCH Superseded Frieder Schrempf 3 participants 8 messages Feb 8, 2024 – Feb 13, 2024

Subsystems (4)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 mtd: spi-nor-ids: Add support for ESMT/EON EN25Q80B

From: Frieder Schrempf <[email protected]>

The datasheet can be found here:
https://www.esmt.com.tw/upload/pdf/ESMT/datasheets/EN25Q80B_Ver.E.pdf

---
 drivers/mtd/spi/spi-nor-ids.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mtd/spi/spi-nor-ids.c +1 -0
index 38a287487ed..4e83b8c94c9 100644
@@ -80,6 +80,7 @@ const struct flash_info spi_nor_ids[] = {
 #endif
 #ifdef CONFIG_SPI_FLASH_EON		/* EON */
 	/* EON -- en25xxx */
+	{ INFO("en25q80b",   0x1c3014, 0, 64 * 1024,   16, SECT_4K) },
 	{ INFO("en25q32b",   0x1c3016, 0, 64 * 1024,   64, 0) },
 	{ INFO("en25q64",    0x1c3017, 0, 64 * 1024,  128, SECT_4K) },
 	{ INFO("en25q128b",  0x1c3018, 0, 64 * 1024,  256, 0) },
Signature · 1 line
2.43.0
#1 lore raw

PATCH 2/3 board: Add support for Sielaff i.MX6 Solo board

From: Frieder Schrempf <[email protected]>

The Sielaff i.MX6 Solo board is a control and HMI board for vending machines. Add support for this board.

The devicetree files are taken from pending changes in the Linux kernel that are available from linux-next and will likely be part of Linux v6.9.

---
 arch/arm/dts/Makefile                         |   1 +
 arch/arm/dts/imx6dl-sielaff-u-boot.dtsi       |  33 ++
 arch/arm/dts/imx6dl-sielaff.dts               | 533 ++++++++++++++++++
 arch/arm/mach-imx/mx6/Kconfig                 |  10 +
 board/sielaff/imx6dl-sielaff/Kconfig          |  15 +
 board/sielaff/imx6dl-sielaff/Makefile         |   8 +
 board/sielaff/imx6dl-sielaff/imx6dl-sielaff.c | 111 ++++
 .../sielaff/imx6dl-sielaff/imx6dl-sielaff.env | 115 ++++
 board/sielaff/imx6dl-sielaff/spl.c            | 277 +++++++++
 configs/imx6dl_sielaff_defconfig              | 117 ++++
 include/configs/imx6dl-sielaff.h              |  25 +
 11 files changed, 1245 insertions(+)
 create mode 100644 arch/arm/dts/imx6dl-sielaff-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6dl-sielaff.dts
 create mode 100644 board/sielaff/imx6dl-sielaff/Kconfig
 create mode 100644 board/sielaff/imx6dl-sielaff/Makefile
 create mode 100644 board/sielaff/imx6dl-sielaff/imx6dl-sielaff.c
 create mode 100644 board/sielaff/imx6dl-sielaff/imx6dl-sielaff.env
 create mode 100644 board/sielaff/imx6dl-sielaff/spl.c
 create mode 100644 configs/imx6dl_sielaff_defconfig
 create mode 100644 include/configs/imx6dl-sielaff.h
arch/arm/dts/Makefile +1 -0
index 0fcae77cefe..d60fa1179af 100644
@@ -930,6 +930,7 @@ dtb-y += \
 	imx6dl-riotboard.dtb \
 	imx6dl-sabreauto.dtb \
 	imx6dl-sabresd.dtb \
+	imx6dl-sielaff.dtb \
 	imx6dl-wandboard-revd1.dtb \
 	imx6s-dhcom-drc02.dtb
 
arch/arm/dts/imx6dl-sielaff-u-boot.dtsi new file +33 -0
new file mode 100644
index 00000000000..47f4c499031
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * Copyright (C) 2022 Kontron Electronics GmbH
+ */
+
+#include "imx6qdl-u-boot.dtsi"
+
+/ {
+	binman: binman {
+		filename = "flash.bin";
+		pad-byte = <0x00>;
+
+		spl: blob-ext@1 {
+			offset = <0x0>;
+			filename = "SPL";
+		};
+
+		uboot: blob-ext@2 {
+			offset = <0x11000>;
+			filename = "u-boot.img";
+		};
+	};
+};
+
+&fec {
+	phy-mode = "rmii";
+	phy-reset-gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
+	phy-reset-duration = <100>;
+};
+
+&gpmi {
+	fsl,legacy-bch-geometry;
+};
arch/arm/dts/imx6dl-sielaff.dts new file +533 -0

533 lines not on this page · raw message

arch/arm/mach-imx/mx6/Kconfig +10 -0
index 114cce4d9b9..15ee2b933f6 100644
@@ -356,6 +356,15 @@ config TARGET_MX6Q_ACC
 	select DM_THERMAL
 	select SUPPORT_SPL
 
+config TARGET_MX6S_SIELAFF
+	bool "Sielaff i.MX6 Solo Board"
+	depends on MX6S
+	select BINMAN
+	select DM
+	select DM_THERMAL
+	select SUPPORT_SPL
+	imply CMD_DM
+
 config TARGET_MX6SABREAUTO
 	bool "mx6sabreauto"
 	depends on MX6QDL
@@ -708,6 +717,7 @@ source "board/softing/vining_2000/Kconfig"
 source "board/liebherr/display5/Kconfig"
 source "board/liebherr/mccmon6/Kconfig"
 source "board/logicpd/imx6/Kconfig"
+source "board/sielaff/imx6dl-sielaff/Kconfig"
 source "board/solidrun/mx6cuboxi/Kconfig"
 source "board/somlabs/visionsom-6ull/Kconfig"
 source "board/technexion/pico-imx6/Kconfig"
board/sielaff/imx6dl-sielaff/Kconfig new file +15 -0
new file mode 100644
index 00000000000..1b74a7d90ee
@@ -0,0 +1,15 @@
+if TARGET_MX6S_SIELAFF
+
+config SYS_BOARD
+	string
+	default "imx6dl-sielaff"
+
+config SYS_VENDOR
+	string
+	default "sielaff"
+
+config SYS_CONFIG_NAME
+	string
+	default "imx6dl-sielaff"
+
+endif
board/sielaff/imx6dl-sielaff/Makefile new file +8 -0
new file mode 100644
index 00000000000..65cecfe6f6c
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: GPL-2.0+
+# (C) Copyright 2022 Kontron Electronics GmbH
+
+ifdef CONFIG_SPL_BUILD
+obj-y := spl.o
+else
+obj-y := imx6dl-sielaff.o
+endif
board/sielaff/imx6dl-sielaff/imx6dl-sielaff.c new file +111 -0

111 lines not on this page · raw message

board/sielaff/imx6dl-sielaff/imx6dl-sielaff.env new file +115 -0

115 lines not on this page · raw message

board/sielaff/imx6dl-sielaff/spl.c new file +277 -0

277 lines not on this page · raw message

configs/imx6dl_sielaff_defconfig new file +117 -0

117 lines not on this page · raw message

include/configs/imx6dl-sielaff.h new file +25 -0
new file mode 100644
index 00000000000..df074135079
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2022 Kontron Electronics GmbH
+ */
+#ifndef __MX6SSIELAFF_CONFIG_H
+#define __MX6SSIELAFF_CONFIG_H
+
+#include <asm/arch/imx-regs.h>
+#include <linux/sizes.h>
+#include "mx6_common.h"
+
+#define CFG_MXC_UART_BASE		UART2_BASE
+
+#define PHYS_SDRAM_SIZE			SZ_512M
+#define PHYS_SDRAM			MMDC0_ARB_BASE_ADDR
+#define CFG_SYS_SDRAM_BASE		PHYS_SDRAM
+#define CFG_SYS_INIT_RAM_ADDR		IRAM_BASE_ADDR
+#define CFG_SYS_INIT_RAM_SIZE		IRAM_SIZE
+
+#define CFG_SYS_FSL_ESDHC_ADDR		USDHC3_BASE_ADDR
+#define CFG_SYS_FSL_USDHC_NUM		1
+
+#define CFG_SYS_NAND_BASE		0x40000000
+
+#endif /* __MX6SSIELAFF_CONFIG_H */
Signature · 1 line
2.43.0
reviewer
#2 lore raw

Re: [PATCH 2/3] board: Add support for Sielaff i.MX6 Solo board

Hi Frieder,

Quoted 5 lines · Frieder Schrempf
arch/arm/dts/imx6dl-sielaff-u-boot.dtsi new file +5 -0
+/ {
+       binman: binman {
+               filename = "flash.bin";
+               pad-byte = <0x00>;
+

arch/arm/dts/imx6dl-sielaff-u-boot.dtsi line 22

Quoted 10 lines
arch/arm/dts/imx6dl-sielaff-u-boot.dtsi new file +10 -0
+               spl: blob-ext@1 {
+                       offset = <0x0>;
+                       filename = "SPL";
+               };
+
+               uboot: blob-ext@2 {
+                       offset = <0x11000>;
+                       filename = "u-boot.img";
+               };
+       };

As mentioned in patch 3/3, please remove the binman entry and use u-boot-with-spl.imx instead.

arch/arm/mach-imx/mx6/Kconfig config TARGET_MX6Q_ACC · line 362

Quoted 4 lines
arch/arm/mach-imx/mx6/Kconfig +4 -0
+config TARGET_MX6S_SIELAFF
+       bool "Sielaff i.MX6 Solo Board"
+       depends on MX6S
+       select BINMAN

Please drop it.

board/sielaff/imx6dl-sielaff/imx6dl-sielaff.c line 16

Quoted 3 lines
board/sielaff/imx6dl-sielaff/imx6dl-sielaff.c new file +3 -0
+DECLARE_GLOBAL_DATA_PTR;
+
+iomux_v3_cfg_t nfc_pads[] = {

Make it static.

Quoted 6 lines
board/sielaff/imx6dl-sielaff/imx6dl-sielaff.env new file +3 -0
@@ -0,0 +1,115 @@
+blkloadfdt=fatload ${device} ${devnum}:${partnum} ${fdt_addr} ${load_fdt_file}
+blkloadimage=fatload ${device} ${devnum}:${partnum} ${loadaddr} ${load_image}
+boot_devices=usb mmc ubi

board/sielaff/imx6dl-sielaff/imx6dl-sielaff.env line 13

Quoted 10 lines
board/sielaff/imx6dl-sielaff/imx6dl-sielaff.env new file +10 -0
+bootargs_base=vt.global_cursor_default=0 consoleblank=0 cma=200M fbcon=rotate:1
+bootdelay=3
+bootdir=
+console=ttymxc1,115200
+ethact=FEC0
+fdt_addr=0x18000000
+fdt_file_legacy=imx6dl_sielaff.dtb
+fdt_file=imx6dl-sielaff.dtb
+fdt_high=0xffffffff
+hostname=mx6s-siline-hmi

Please remove it.

board/sielaff/imx6dl-sielaff/imx6dl-sielaff.env line 16

Quoted 3 lines
board/sielaff/imx6dl-sielaff/imx6dl-sielaff.env new file +3 -0
+void reset_cpu(void)
+{
+}

Is this needed?

Does the 'reset' command work on this board?

board/sielaff/imx6dl-sielaff/imx6dl-sielaff.env line 3

Quoted 5 lines
board/sielaff/imx6dl-sielaff/imx6dl-sielaff.env new file +4 -0
+++ b/configs/imx6dl_sielaff_defconfig
@@ -0,0 +1,117 @@
+CONFIG_ARM=y
+CONFIG_SPL_SYS_ICACHE_OFF=y
+CONFIG_SPL_SYS_DCACHE_OFF=y

These options should be dropped.

board/sielaff/imx6dl-sielaff/imx6dl-sielaff.env line 8

Quoted 5 lines
board/sielaff/imx6dl-sielaff/imx6dl-sielaff.env new file +5 -0
+#include <asm/arch/imx-regs.h>
+#include <linux/sizes.h>
+#include "mx6_common.h"
+
+#define CFG_MXC_UART_BASE              UART2_BASE

As you use DM_SERIAL, this can be dropped.

#3 lore raw

Re: [PATCH 2/3] board: Add support for Sielaff i.MX6 Solo board

Hi Fabio,

thanks for reviewing!

Quoted 14 lines · Fabio Estevam

Hi Frieder,

Quoted 10 lines · Frieder Schrempf
arch/arm/dts/imx6dl-sielaff-u-boot.dtsi new file +10 -0
+/ {
+       binman: binman {
+               filename = "flash.bin";
+               pad-byte = <0x00>;
+
+               spl: blob-ext@1 {
+                       offset = <0x0>;
+                       filename = "SPL";
+               };
+
Quoted 8 lines

arch/arm/dts/imx6dl-sielaff-u-boot.dtsi line 22

Quoted 5 lines
arch/arm/dts/imx6dl-sielaff-u-boot.dtsi new file +5 -0
+               uboot: blob-ext@2 {
+                       offset = <0x11000>;
+                       filename = "u-boot.img";
+               };
+       };

As mentioned in patch 3/3, please remove the binman entry and use u-boot-with-spl.imx instead.

I understand the reasoning and I can change that if you insist. But I'm not really happy about it as we already use the flash.bin as common name for the binary across all platforms downstream. Also in our upstream config for the i.MX6UL/ULL SoMs we already use this pattern (see [1]).

Quoted 6 lines

arch/arm/mach-imx/mx6/Kconfig config TARGET_MX6Q_ACC · line 362

Quoted 5 lines
arch/arm/mach-imx/mx6/Kconfig +4 -0
+config TARGET_MX6S_SIELAFF
+       bool "Sielaff i.MX6 Solo Board"
+       depends on MX6S
+       select BINMAN
Quoted 7 lines

Please drop it.

board/sielaff/imx6dl-sielaff/imx6dl-sielaff.c line 16

Quoted 3 lines
board/sielaff/imx6dl-sielaff/imx6dl-sielaff.c new file +3 -0
+DECLARE_GLOBAL_DATA_PTR;
+
+iomux_v3_cfg_t nfc_pads[] = {

Make it static.

OK

Quoted 11 lines
Quoted 11 lines
board/sielaff/imx6dl-sielaff/imx6dl-sielaff.env new file +7 -0
@@ -0,0 +1,115 @@
+blkloadfdt=fatload ${device} ${devnum}:${partnum} ${fdt_addr} ${load_fdt_file}
+blkloadimage=fatload ${device} ${devnum}:${partnum} ${loadaddr} ${load_image}
+boot_devices=usb mmc ubi
+bootargs_base=vt.global_cursor_default=0 consoleblank=0 cma=200M fbcon=rotate:1
+bootdelay=3
+bootdir=
+console=ttymxc1,115200
Quoted 8 lines

board/sielaff/imx6dl-sielaff/imx6dl-sielaff.env line 13

Quoted 6 lines
board/sielaff/imx6dl-sielaff/imx6dl-sielaff.env new file +6 -0
+ethact=FEC0
+fdt_addr=0x18000000
+fdt_file_legacy=imx6dl_sielaff.dtb
+fdt_file=imx6dl-sielaff.dtb
+fdt_high=0xffffffff
+hostname=mx6s-siline-hmi

Please remove it.

OK

Quoted 6 lines

board/sielaff/imx6dl-sielaff/imx6dl-sielaff.env line 16

Quoted 4 lines
board/sielaff/imx6dl-sielaff/imx6dl-sielaff.env new file +3 -0
+void reset_cpu(void)
+{
+}

Is this needed?

No, I will drop it.

Quoted 1 line

Does the 'reset' command work on this board?

No, I will fix it.

Quoted 7 lines

board/sielaff/imx6dl-sielaff/imx6dl-sielaff.env line 3

Quoted 5 lines
board/sielaff/imx6dl-sielaff/imx6dl-sielaff.env new file +4 -0
+++ b/configs/imx6dl_sielaff_defconfig
@@ -0,0 +1,117 @@
+CONFIG_ARM=y
+CONFIG_SPL_SYS_ICACHE_OFF=y
+CONFIG_SPL_SYS_DCACHE_OFF=y

These options should be dropped.

OK

Quoted 8 lines

board/sielaff/imx6dl-sielaff/imx6dl-sielaff.env line 8

Quoted 6 lines
board/sielaff/imx6dl-sielaff/imx6dl-sielaff.env new file +5 -0
+#include <asm/arch/imx-regs.h>
+#include <linux/sizes.h>
+#include "mx6_common.h"
+
+#define CFG_MXC_UART_BASE              UART2_BASE

As you use DM_SERIAL, this can be dropped.

This is still needed as SPL runs without DM due to internal RAM size constraints.

Thanks
Frieder

[1]
https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/dts/imx6ul-kontron-bl-common-u-boot.dtsi#L10

reviewer
#4 lore raw

Re: [PATCH 2/3] board: Add support for Sielaff i.MX6 Solo board

Hi Frieder,

Quoted 4 lines · Frieder Schrempf

I understand the reasoning and I can change that if you insist. But I'm not really happy about it as we already use the flash.bin as common name for the binary across all platforms downstream. Also in our upstream config for the i.MX6UL/ULL SoMs we already use this pattern (see [1]).

Ok, I just wanted to point out that there was an alternative, but if you prefer to go with the binman approach in your platforms, I am OK with that.

Quoted 3 lines
Quoted 1 line

Does the 'reset' command work on this board?

No, I will fix it.

Here is an example of how to fix it:
https://gitlab.com/u-boot/u-boot/-/commit/dbc4814515d37a3d1c4bb237f4e1c16d1f9e3736

#5 lore raw

PATCH 3/3 doc: board: Add minimal documentation for Sielaff i.MX6 Solo board

In reply to Frieder Schrempf

From: Frieder Schrempf <[email protected]>

Describe how to build and boot for the Sielaff i.MX6 Solo board.

---
 doc/board/sielaff/imx6dl-sielaff.rst | 32 ++++++++++++++++++++++++++++
 doc/board/sielaff/index.rst          |  9 ++++++++
 2 files changed, 41 insertions(+)
 create mode 100644 doc/board/sielaff/imx6dl-sielaff.rst
 create mode 100644 doc/board/sielaff/index.rst
doc/board/sielaff/imx6dl-sielaff.rst new file +32 -0
new file mode 100644
index 00000000000..24dd67ccaef
@@ -0,0 +1,32 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+Sielaff i.MX6 Solo Board
+========================
+
+The Sielaff i.MX6 Solo board is a control and HMI board for vending
+machines.
+
+Quick Start
+-----------
+
+- Build U-Boot
+- Boot
+
+Build U-Boot
+^^^^^^^^^^^^
+
+.. code-block:: bash
+
+   $ make imx6dl_sielaff_defconfig
+   $ make CROSS_COMPILE=arm-none-linux-gnueabihf-
+
+Burn the flash.bin to SD card at an offset of 1 KiB:
+
+.. code-block:: bash
+
+   $ dd if=flash.bin of=/dev/sd[x] bs=1K seek=1 conv=notrunc
+
+Boot
+^^^^
+
+Put the SD card in the slot on the board and apply power.
doc/board/sielaff/index.rst new file +9 -0
new file mode 100644
index 00000000000..a8376484d88
@@ -0,0 +1,9 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+Sielaff
+=======
+
+.. toctree::
+   :maxdepth: 2
+
+   imx6dl-sielaff
Signature · 1 line
2.43.0
reviewer
#6 lore raw

Re: [PATCH 3/3] doc: board: Add minimal documentation for Sielaff i.MX6 Solo board

Hi Frieder,

doc/board/sielaff/imx6dl-sielaff.rst line 27

Quoted 5 lines · Frieder Schrempf
doc/board/sielaff/imx6dl-sielaff.rst new file +5 -0
+Burn the flash.bin to SD card at an offset of 1 KiB:
+
+.. code-block:: bash
+
+   $ dd if=flash.bin of=/dev/sd[x] bs=1K seek=1 conv=notrunc

I see that you used binman to create the flash.bin file.

You could simply use the standard u-boot-with-spl.imx instead:

$ sha256sum flash.bin
a0a4536876f2957ef88776036f13c6604a9f7e7fd78a236e8ea7322c2ae3e4cf  flash.bin
$ sha256sum u-boot-with-spl.imx
a0a4536876f2957ef88776036f13c6604a9f7e7fd78a236e8ea7322c2ae3e4cf
u-boot-with-spl.imx

As you can see they have the same content.

I would suggest dropping the binman generation and just flash u-boot-with-spl.imx.