Skip to contentSkip to conversation

imx8m: add regs used by GPMI

PATCH In review Ariel D'Alessandro 1 participant 3 messages Nov 3, 2021 – Nov 5, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 imx8m: add regs used by GPMI

From: Michael Trimarchi <[email protected]>

Add regs used by GPMI

---
 arch/arm/include/asm/arch-imx8m/imx-regs.h | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/include/asm/arch-imx8m/imx-regs.h +7 -0
index b800da13a1e..14955d10900 100644
@@ -58,6 +58,13 @@
 #define SRC_DDRC_RCR_ADDR	0x30391000
 #define SRC_DDRC2_RCR_ADDR	0x30391004
 
+#define APBH_DMA_ARB_BASE_ADDR	0x33000000
+#define APBH_DMA_ARB_END_ADDR	0x33007FFF
+#define MXS_APBH_BASE		APBH_DMA_ARB_BASE_ADDR
+
+#define MXS_GPMI_BASE		(APBH_DMA_ARB_BASE_ADDR + 0x02000)
+#define MXS_BCH_BASE		(APBH_DMA_ARB_BASE_ADDR + 0x04000)
+
 #define DDRC_DDR_SS_GPR0	0x3d000000
 #define DDRC_IPS_BASE_ADDR(X)	(0x3d400000 + ((X) * 0x2000000))
 #define DDR_CSD1_BASE_ADDR	0x40000000
Signature · 1 line
2.30.2
#1 lore raw

PATCH 2/2 bsh: imx8mn-smm-s2/pro: Add iMX8MN BSH SMM S2 boards

Introduce BSH SystemMaster (SMM) S2 board family, which consists of:
iMX8MN SMM S2 and iMX8MN SMM S2 PRO boards.

Add support for iMX8MN BSH SMM S2 board:

- 256 MiB DDR3 RAM
- 512MiB Nand
- USBOTG1 peripheral - fastboot.

Add support for iMX8MN BSH SMM S2 PRO board:

- 512 MiB DDR3 RAM
- 8 GiB eMMC
- USBOTG1 peripheral - fastboot.

---
 MAINTAINERS                                   |   9 +
 arch/arm/dts/Makefile                         |   2 +
 arch/arm/dts/imx8mn-bsh-smm-s2-common.dtsi    | 203 ++++
 .../dts/imx8mn-bsh-smm-s2-u-boot-common.dtsi  | 179 ++++
 arch/arm/dts/imx8mn-bsh-smm-s2-u-boot.dtsi    |  15 +
 arch/arm/dts/imx8mn-bsh-smm-s2.dts            |  48 +
 arch/arm/dts/imx8mn-bsh-smm-s2pro-u-boot.dtsi |  15 +
 arch/arm/dts/imx8mn-bsh-smm-s2pro.dts         |  75 ++
 arch/arm/mach-imx/imx8m/Kconfig               |  15 +
 board/bsh/imx8mn_smm_s2/Kconfig               |  38 +
 board/bsh/imx8mn_smm_s2/Makefile              |  13 +
 board/bsh/imx8mn_smm_s2/ddr3l_timing_256m.c   | 943 ++++++++++++++++++
 board/bsh/imx8mn_smm_s2/ddr3l_timing_512m.c   | 943 ++++++++++++++++++
 board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c       |  24 +
 board/bsh/imx8mn_smm_s2/imximage-8mn-ddr3.cfg |  12 +
 board/bsh/imx8mn_smm_s2/spl.c                 | 104 ++
 configs/imx8mn_bsh_smm_s2_defconfig           |  93 ++
 configs/imx8mn_bsh_smm_s2pro_defconfig        |  90 ++
 include/configs/imx8mn_bsh_smm_s2.h           |  56 ++
 include/configs/imx8mn_bsh_smm_s2_common.h    |  69 ++
 include/configs/imx8mn_bsh_smm_s2pro.h        |  42 +
 21 files changed, 2988 insertions(+)
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2-common.dtsi
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2-u-boot-common.dtsi
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2.dts
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2pro-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2pro.dts
 create mode 100644 board/bsh/imx8mn_smm_s2/Kconfig
 create mode 100644 board/bsh/imx8mn_smm_s2/Makefile
 create mode 100644 board/bsh/imx8mn_smm_s2/ddr3l_timing_256m.c
 create mode 100644 board/bsh/imx8mn_smm_s2/ddr3l_timing_512m.c
 create mode 100644 board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c
 create mode 100644 board/bsh/imx8mn_smm_s2/imximage-8mn-ddr3.cfg
 create mode 100644 board/bsh/imx8mn_smm_s2/spl.c
 create mode 100644 configs/imx8mn_bsh_smm_s2_defconfig
 create mode 100644 configs/imx8mn_bsh_smm_s2pro_defconfig
 create mode 100644 include/configs/imx8mn_bsh_smm_s2.h
 create mode 100644 include/configs/imx8mn_bsh_smm_s2_common.h
 create mode 100644 include/configs/imx8mn_bsh_smm_s2pro.h
MAINTAINERS +9 -0
index 9d8cba90280..82b9c1ff20b 100644
@@ -197,6 +197,15 @@ F:	doc/README.bcm7xxx
 F:	drivers/mmc/bcmstb_sdhci.c
 F:	drivers/spi/bcmstb_spi.c
 
+ARM BSH SMM S2 boards
+M: Ariel D'Alessandro <[email protected]>
+M: Michael Trimarchi <[email protected]>
+S:     Maintained
+F:     arch/arm/dts/imx8mn-bsh-smm-s2*
+F:     board/bsh/imx8mn_smm_s2/
+F:     configs/imx8mn_bsh_smm_s2*
+F:     include/configs/imx8mn_bsh_smm_s2*
+
 ARM CORTINA ACCESS CAxxxx
 M:	Alex Nemirovsky <[email protected]>
 S:	Supported
arch/arm/dts/Makefile +2 -0
index cc34da7bd83..7d21c32f62f 100644
@@ -898,6 +898,8 @@ dtb-$(CONFIG_ARCH_IMX8M) += \
 	imx8mm-venice-gw7902.dtb \
 	imx8mm-verdin.dtb \
 	phycore-imx8mm.dtb \
+	imx8mn-bsh-smm-s2.dtb \
+	imx8mn-bsh-smm-s2pro.dtb \
 	imx8mn-ddr4-evk.dtb \
 	imx8mq-cm.dtb \
 	imx8mn-evk.dtb \
arch/arm/dts/imx8mn-bsh-smm-s2-common.dtsi new file +203 -0

203 lines not on this page · raw message

arch/arm/dts/imx8mn-bsh-smm-s2-u-boot-common.dtsi new file +179 -0

179 lines not on this page · raw message

arch/arm/dts/imx8mn-bsh-smm-s2-u-boot.dtsi new file +15 -0
new file mode 100644
index 00000000000..bd4da7d34cf
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2021 Collabora Ltd.
+ * Copyright 2021 BSH Hausgeraete GmbH
+ */
+
+#include "imx8mn-bsh-smm-s2-u-boot-common.dtsi"
+
+&pinctrl_gpmi_nand {
+	u-boot,dm-spl;
+};
+
+&gpmi {
+	u-boot,dm-spl;
+};
arch/arm/dts/imx8mn-bsh-smm-s2.dts new file +48 -0

48 lines not on this page · raw message

arch/arm/dts/imx8mn-bsh-smm-s2pro-u-boot.dtsi new file +15 -0
new file mode 100644
index 00000000000..b8396a46b86
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2021 Collabora Ltd.
+ * Copyright 2021 BSH Hausgeraete GmbH
+ */
+
+#include "imx8mn-bsh-smm-s2-u-boot-common.dtsi"
+
+&pinctrl_usdhc1 {
+	u-boot,dm-spl;
+};
+
+&usdhc1 {
+	u-boot,dm-spl;
+};
arch/arm/dts/imx8mn-bsh-smm-s2pro.dts new file +75 -0

75 lines not on this page · raw message

arch/arm/mach-imx/imx8m/Kconfig +15 -0
index 276b8bd9742..c62f73f95f5 100644
@@ -75,6 +75,20 @@ config TARGET_IMX8MM_VENICE
 	select SUPPORT_SPL
 	select IMX8M_LPDDR4
 
+config TARGET_IMX8MN_BSH_SMM_S2
+	bool "imx8mn-bsh-smm-s2"
+	select BINMAN
+	select IMX8MN
+	select SUPPORT_SPL
+	select IMX8M_DDR3L
+
+config TARGET_IMX8MN_BSH_SMM_S2PRO
+	bool "imx8mn-bsh-smm-s2pro"
+	select BINMAN
+	select IMX8MN
+	select SUPPORT_SPL
+	select IMX8M_DDR3L
+
 config TARGET_KONTRON_MX8MM
 	bool "Kontron Electronics N80xx"
 	select BINMAN
@@ -158,6 +172,7 @@ endchoice
 
 source "board/beacon/imx8mm/Kconfig"
 source "board/beacon/imx8mn/Kconfig"
+source "board/bsh/imx8mn_smm_s2/Kconfig"
 source "board/compulab/imx8mm-cl-iot-gate/Kconfig"
 source "board/engicam/imx8mm/Kconfig"
 source "board/freescale/imx8mq_evk/Kconfig"
board/bsh/imx8mn_smm_s2/Kconfig new file +38 -0
new file mode 100644
index 00000000000..37fe723e290
@@ -0,0 +1,38 @@
+config BSH_SMM_S2_DDR3L_256
+	bool "BSH SMM S2 DDR3L 256 MiB RAM support"
+
+config BSH_SMM_S2_DDR3L_512
+	bool "BSH SMM S2 DDR3L 512 MiB RAM support"
+
+config SYS_BOARD
+	default "imx8mn_smm_s2"
+
+config SYS_VENDOR
+	default "bsh"
+
+config IMX_CONFIG
+	default "board/bsh/imx8mn_smm_s2/imximage-8mn-ddr3.cfg"
+
+if TARGET_IMX8MN_BSH_SMM_S2
+
+config SYS_CONFIG_NAME
+	default "imx8mn_bsh_smm_s2"
+
+config BOARD_SPECIFIC_OPTIONS # dummy
+	def_bool y
+	select BSH_SMM_S2_DDR3L_256
+
+endif
+
+if TARGET_IMX8MN_BSH_SMM_S2PRO
+
+config SYS_CONFIG_NAME
+	default "imx8mn_bsh_smm_s2pro"
+
+config BOARD_SPECIFIC_OPTIONS # dummy
+	def_bool y
+	select BSH_SMM_S2_DDR3L_512
+
+endif
+
+source "board/freescale/common/Kconfig"
board/bsh/imx8mn_smm_s2/Makefile new file +13 -0
new file mode 100644
index 00000000000..19d37a723ea
@@ -0,0 +1,13 @@
+#
+# Copyright 2021 Collabora Ltd.
+#
+# SPDX-License-Identifier:      GPL-2.0+
+#
+
+obj-y += imx8mn_smm_s2.o
+
+ifdef CONFIG_SPL_BUILD
+obj-y += spl.o
+obj-$(CONFIG_BSH_SMM_S2_DDR3L_256) += ddr3l_timing_256m.o
+obj-$(CONFIG_BSH_SMM_S2_DDR3L_512) += ddr3l_timing_512m.o
+endif
board/bsh/imx8mn_smm_s2/ddr3l_timing_256m.c new file +943 -0

943 lines not on this page · raw message

board/bsh/imx8mn_smm_s2/ddr3l_timing_512m.c new file +943 -0

943 lines not on this page · raw message

board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c new file +24 -0
new file mode 100644
index 00000000000..ad746b91f7b
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2021 Collabora Ltd.
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <common.h>
+#include <asm/arch/sys_proto.h>
+#include <env.h>
+
+int board_init(void)
+{
+	return 0;
+}
+
+int board_late_init(void)
+{
+	if (is_usb_boot()) {
+		env_set("bootcmd", "run bootcmd_mfg");
+		env_set("bootdelay", "0");
+	}
+
+	return 0;
+}
board/bsh/imx8mn_smm_s2/imximage-8mn-ddr3.cfg new file +12 -0
new file mode 100644
index 00000000000..ab727328634
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2021 Collabora Ltd.
+ */
+
+#define __ASSEMBLY__
+
+FIT
+ROM_VERSION	v2
+BOOT_FROM	sd
+LOADER		u-boot-spl-ddr.bin	0x912000
+SECOND_LOADER	u-boot.itb		0x40200000 0x60000
board/bsh/imx8mn_smm_s2/spl.c new file +104 -0

104 lines not on this page · raw message

configs/imx8mn_bsh_smm_s2_defconfig new file +93 -0

93 lines not on this page · raw message

configs/imx8mn_bsh_smm_s2pro_defconfig new file +90 -0

90 lines not on this page · raw message

include/configs/imx8mn_bsh_smm_s2.h new file +56 -0

56 lines not on this page · raw message

include/configs/imx8mn_bsh_smm_s2_common.h new file +69 -0

69 lines not on this page · raw message

include/configs/imx8mn_bsh_smm_s2pro.h new file +42 -0

30 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.30.2

Part of the diff is not shown here. View the raw message.

#2 lore raw

Re: [PATCH v1 2/2] bsh: imx8mn-smm-s2/pro: Add iMX8MN BSH SMM S2 boards

Hi all,

Quoted 58 lines · Ariel D'Alessandro

Introduce BSH SystemMaster (SMM) S2 board family, which consists of:
iMX8MN SMM S2 and iMX8MN SMM S2 PRO boards.

Add support for iMX8MN BSH SMM S2 board:

- 256 MiB DDR3 RAM
- 512MiB Nand
- USBOTG1 peripheral - fastboot.

Add support for iMX8MN BSH SMM S2 PRO board:

- 512 MiB DDR3 RAM
- 8 GiB eMMC
- USBOTG1 peripheral - fastboot.

---
 MAINTAINERS                                   |   9 +
 arch/arm/dts/Makefile                         |   2 +
 arch/arm/dts/imx8mn-bsh-smm-s2-common.dtsi    | 203 ++++
 .../dts/imx8mn-bsh-smm-s2-u-boot-common.dtsi  | 179 ++++
 arch/arm/dts/imx8mn-bsh-smm-s2-u-boot.dtsi    |  15 +
 arch/arm/dts/imx8mn-bsh-smm-s2.dts            |  48 +
 arch/arm/dts/imx8mn-bsh-smm-s2pro-u-boot.dtsi |  15 +
 arch/arm/dts/imx8mn-bsh-smm-s2pro.dts         |  75 ++
 arch/arm/mach-imx/imx8m/Kconfig               |  15 +
 board/bsh/imx8mn_smm_s2/Kconfig               |  38 +
 board/bsh/imx8mn_smm_s2/Makefile              |  13 +
 board/bsh/imx8mn_smm_s2/ddr3l_timing_256m.c   | 943 ++++++++++++++++++
 board/bsh/imx8mn_smm_s2/ddr3l_timing_512m.c   | 943 ++++++++++++++++++
 board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c       |  24 +
 board/bsh/imx8mn_smm_s2/imximage-8mn-ddr3.cfg |  12 +
 board/bsh/imx8mn_smm_s2/spl.c                 | 104 ++
 configs/imx8mn_bsh_smm_s2_defconfig           |  93 ++
 configs/imx8mn_bsh_smm_s2pro_defconfig        |  90 ++
 include/configs/imx8mn_bsh_smm_s2.h           |  56 ++
 include/configs/imx8mn_bsh_smm_s2_common.h    |  69 ++
 include/configs/imx8mn_bsh_smm_s2pro.h        |  42 +
 21 files changed, 2988 insertions(+)
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2-common.dtsi
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2-u-boot-common.dtsi
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2.dts
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2pro-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx8mn-bsh-smm-s2pro.dts
 create mode 100644 board/bsh/imx8mn_smm_s2/Kconfig
 create mode 100644 board/bsh/imx8mn_smm_s2/Makefile
 create mode 100644 board/bsh/imx8mn_smm_s2/ddr3l_timing_256m.c
 create mode 100644 board/bsh/imx8mn_smm_s2/ddr3l_timing_512m.c
 create mode 100644 board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c
 create mode 100644 board/bsh/imx8mn_smm_s2/imximage-8mn-ddr3.cfg
 create mode 100644 board/bsh/imx8mn_smm_s2/spl.c
 create mode 100644 configs/imx8mn_bsh_smm_s2_defconfig
 create mode 100644 configs/imx8mn_bsh_smm_s2pro_defconfig
 create mode 100644 include/configs/imx8mn_bsh_smm_s2.h
 create mode 100644 include/configs/imx8mn_bsh_smm_s2_common.h
 create mode 100644 include/configs/imx8mn_bsh_smm_s2pro.h

[snip]

Quoted 34 lines
board/bsh/imx8mn_smm_s2/Kconfig new file +28 -0
new file mode 100644
index 00000000000..37fe723e290
@@ -0,0 +1,38 @@
+config BSH_SMM_S2_DDR3L_256
+	bool "BSH SMM S2 DDR3L 256 MiB RAM support"
+
+config BSH_SMM_S2_DDR3L_512
+	bool "BSH SMM S2 DDR3L 512 MiB RAM support"
+
+config SYS_BOARD
+	default "imx8mn_smm_s2"
+
+config SYS_VENDOR
+	default "bsh"
+
+config IMX_CONFIG
+	default "board/bsh/imx8mn_smm_s2/imximage-8mn-ddr3.cfg"
+
+if TARGET_IMX8MN_BSH_SMM_S2
+
+config SYS_CONFIG_NAME
+	default "imx8mn_bsh_smm_s2"
+
+config BOARD_SPECIFIC_OPTIONS # dummy
+	def_bool y
+	select BSH_SMM_S2_DDR3L_256
+
+endif
+
+if TARGET_IMX8MN_BSH_SMM_S2PRO
+

board/bsh/imx8mn_smm_s2/Kconfig line 38

Quoted 10 lines
board/bsh/imx8mn_smm_s2/Kconfig new file +10 -0
+config SYS_CONFIG_NAME
+	default "imx8mn_bsh_smm_s2pro"
+
+config BOARD_SPECIFIC_OPTIONS # dummy
+	def_bool y
+	select BSH_SMM_S2_DDR3L_512
+
+endif
+
+source "board/freescale/common/Kconfig"

Please omit the above, as it's totally wrong. Will fix in v2 as follows:

config BSH_SMM_S2_DDR3L_256
bool "BSH SMM S2 DDR3L 256 MiB RAM support"

config BSH_SMM_S2_DDR3L_512
bool "BSH SMM S2 DDR3L 512 MiB RAM support"

if TARGET_IMX8MN_BSH_SMM_S2

config SYS_BOARD

	default "imx8mn_smm_s2"

config SYS_VENDOR
default "bsh"

config IMX_CONFIG

	default "board/bsh/imx8mn_smm_s2/imximage-8mn-ddr3.cfg"

config SYS_CONFIG_NAME

	default "imx8mn_bsh_smm_s2"

config BOARD_SPECIFIC_OPTIONS # dummy

	def_bool y
	select BSH_SMM_S2_DDR3L_256

source "board/freescale/common/Kconfig"

endif

if TARGET_IMX8MN_BSH_SMM_S2PRO

config SYS_BOARD

	default "imx8mn_smm_s2"

config SYS_VENDOR
default "bsh"

config IMX_CONFIG

	default "board/bsh/imx8mn_smm_s2/imximage-8mn-ddr3.cfg"

config SYS_CONFIG_NAME
default "imx8mn_bsh_smm_s2pro"

config BOARD_SPECIFIC_OPTIONS # dummy

	def_bool y
	select BSH_SMM_S2_DDR3L_512

source "board/freescale/common/Kconfig"

endif