Skip to contentSkip to conversation

imx: kontron-sl-mx8mm: Improvements and OSM board support

PATCH In review Frieder Schrempf 2 participants 5 messages Aug 24, 2022 – Oct 21, 2022

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

v3 cover imx: kontron-sl-mx8mm: Improvements and OSM board support

From: Frieder Schrempf <[email protected]>

This set contains several improvements for the kontron-sl-mx8mm board configuration (patches 1-17, 19) and support for a new SoM (patch 18, including baseboard) that complies to the Open Standard Module (OSM) 1.0 hardware specification, size S (https://sget.org/standards/osm).

This also syncs the devicetrees with the pending changes in Linux (see [1]).

Changes in v3:
* add Fabio's R-b tags (Thanks!)
* fix OSM-S SoM name to match official name
* fix docs to match official board names
* adjust devicetree names and compatibles
* fix printing of RAM size
* add missing Makefile entry for new dtb
* fix hex numbers and unit addresses in SPI NOR partitions

Changes in v2:
* rebase on u-boot-imx/master
* new patches 2-5, 19
* fix printf warning in board/kontron/sl-mx8mm/spl.c
* remove unused pinmux definitions in board/kontron/sl-mx8mm/spl.c
* describe SPI NOR partitions in devicetree
* move environment to end of SPI NOR
* Add tags

[1] https://patchwork.kernel.org/project/linux-arm-kernel/cover/[email protected]/

Frieder Schrempf (19):
imx: kontron-sl-mx8mm: Remove LVDS board type and devicetrees
imx: kontron-sl-mx8mm: Add support for loading from SPI NOR in SPL
imx: kontron-sl-mx8mm: Remove custom board_boot_order() workaround
imx: kontron-sl-mx8mm: Increase CONFIG_SYS_CBSIZE to 2K
imx: kontron-sl-mx8mm: Enable MTD command
imx: kontron-sl-mx8mm: Add redundant environment and SPI NOR
partitions
imx: kontron-sl-mx8mm: Enable environment in MMC
imx: kontron-sl-mx8mm: Migrate to use CONFIG_EXTRA_ENV_TEXT
imx: kontron-sl-mx8mm: Enable bootaux command
imx: kontron-sl-mx8mm: lpddr4_timing.c: Add spaces for proper
alignment
imx: kontron-sl-mx8mm: Remove 100mt DDR setpoint
imx: kontron-sl-mx8mm: Use new LPDDR4 config parameters
imx: kontron-sl-mx8mm: Prepare for other i.MX8MM SoM types
imx: kontron-sl-mx8mm: Adjust devicetree names, compatibles and model
strings
imx: kontron-sl-mx8mm: Use the VSELECT signal to switch SD card IO
voltage
imx: kontron-sl-mx8mm: Use voltage rail names from schematic for PMIC
regulator-names
imx: kontron-sl-mx8mm: Simplify code in spl.c
imx: kontron-sl-mx8mm: Add support for Kontron Electronics SoM SL
i.MX8MM OSM-S
imx: kontron-sl-mx8mm: Prepare for I2C display detection in
environment script

 arch/arm/dts/Makefile                         |    4 +-
 ...i => imx8mm-kontron-bl-common-u-boot.dtsi} |   21 +-
 .../dts/imx8mm-kontron-bl-osm-s-u-boot.dtsi   |   14 +
 arch/arm/dts/imx8mm-kontron-bl-osm-s.dts      |  376 ++++
 arch/arm/dts/imx8mm-kontron-bl-u-boot.dtsi    |   14 +
 ...tron-n801x-s.dts => imx8mm-kontron-bl.dts} |    9 +-
 .../imx8mm-kontron-n801x-s-lvds-u-boot.dtsi   |    6 -
 arch/arm/dts/imx8mm-kontron-n801x-s-lvds.dts  |  117 -
 .../dts/imx8mm-kontron-n801x-s-u-boot.dtsi    |    6 -
 arch/arm/dts/imx8mm-kontron-osm-s.dtsi        |  330 +++
 ...-n801x-som.dtsi => imx8mm-kontron-sl.dtsi} |   53 +-
 board/kontron/sl-mx8mm/MAINTAINERS            |    2 +-
 board/kontron/sl-mx8mm/lpddr4_timing.c        | 1969 ++++++++---------
 board/kontron/sl-mx8mm/sl-mx8mm.c             |   45 +
 board/kontron/sl-mx8mm/sl-mx8mm.env           |    7 +
 board/kontron/sl-mx8mm/spl.c                  |  115 +-
 configs/kontron-sl-mx8mm_defconfig            |   19 +-
 doc/board/kontron/sl-mx8mm.rst                |   13 +-
 include/configs/kontron-sl-mx8mm.h            |   16 +-
 19 files changed, 1810 insertions(+), 1326 deletions(-)
 rename arch/arm/dts/{imx8mm-kontron-n801x-u-boot.dtsi => imx8mm-kontron-bl-common-u-boot.dtsi} (83%)
 create mode 100644 arch/arm/dts/imx8mm-kontron-bl-osm-s-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx8mm-kontron-bl-osm-s.dts
 create mode 100644 arch/arm/dts/imx8mm-kontron-bl-u-boot.dtsi
 rename arch/arm/dts/{imx8mm-kontron-n801x-s.dts => imx8mm-kontron-bl.dts} (96%)
 delete mode 100644 arch/arm/dts/imx8mm-kontron-n801x-s-lvds-u-boot.dtsi
 delete mode 100644 arch/arm/dts/imx8mm-kontron-n801x-s-lvds.dts
 delete mode 100644 arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx8mm-kontron-osm-s.dtsi
 rename arch/arm/dts/{imx8mm-kontron-n801x-som.dtsi => imx8mm-kontron-sl.dtsi} (87%)
 create mode 100644 board/kontron/sl-mx8mm/sl-mx8mm.env
Signature · 1 line
2.37.2
#1 lore raw

PATCH v3 1/19 imx: kontron-sl-mx8mm: Remove LVDS board type and devicetrees

From: Frieder Schrempf <[email protected]>

The display isn't and won't be used in U-Boot. Also the display setup is not yet supported in mainline Linux, so even for cases where the U-Boot devicetree is passed to the kernel there is currently no use for this configuration.

Selecting the proper configuration in the kernel FIT image automatically depending on the detected hardware can be handled by a script in the environment.

---
Changes in v3:
* none

Changes in v2:
* rebase on u-boot-imx/master

---
 arch/arm/dts/Makefile                         |   1 -
 .../imx8mm-kontron-n801x-s-lvds-u-boot.dtsi   |   6 -
 arch/arm/dts/imx8mm-kontron-n801x-s-lvds.dts  | 117 --------------
 .../dts/imx8mm-kontron-n801x-s-u-boot.dtsi    | 140 ++++++++++++++++-
 arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi | 145 ------------------
 board/kontron/sl-mx8mm/spl.c                  |  46 +-----
 configs/kontron-sl-mx8mm_defconfig            |   1 -
 7 files changed, 141 insertions(+), 315 deletions(-)
 delete mode 100644 arch/arm/dts/imx8mm-kontron-n801x-s-lvds-u-boot.dtsi
 delete mode 100644 arch/arm/dts/imx8mm-kontron-n801x-s-lvds.dts
 delete mode 100644 arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi
arch/arm/dts/Makefile +0 -1
index 48cb1f52b7a..75d0664cc01 100644
@@ -940,7 +940,6 @@ dtb-$(CONFIG_ARCH_IMX8M) += \
 	imx8mm-icore-mx8mm-ctouch2.dtb \
 	imx8mm-icore-mx8mm-edimm2.2.dtb \
 	imx8mm-kontron-n801x-s.dtb \
-	imx8mm-kontron-n801x-s-lvds.dtb \
 	imx8mm-mx8menlo.dtb \
 	imx8mm-venice.dtb \
 	imx8mm-venice-gw71xx-0x.dtb \
arch/arm/dts/imx8mm-kontron-n801x-s-lvds-u-boot.dtsi deleted +0 -6
deleted file mode 100644
index 4bf75722bfb..00000000000
@@ -1,6 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright (C) 2019 Kontron Electronics GmbH
- */
-
-#include "imx8mm-kontron-n801x-u-boot.dtsi"
arch/arm/dts/imx8mm-kontron-n801x-s-lvds.dts deleted +0 -117

117 lines not on this page · raw message

arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi +139 -1

143 lines not on this page · raw message

arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi deleted +0 -145

145 lines not on this page · raw message

board/kontron/sl-mx8mm/spl.c +2 -44

90 lines not on this page · raw message

configs/kontron-sl-mx8mm_defconfig +0 -1
index f19dc7bc55e..954818adc0e 100644
@@ -66,7 +66,6 @@ CONFIG_CMD_REGULATOR=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_LIST="imx8mm-kontron-n801x-s imx8mm-kontron-n801x-s-lvds"
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_NET_RANDOM_ETHADDR=y
Signature · 1 line
2.37.2
#2 lore raw

PATCH v3 1/19 imx: kontron-sl-mx8mm: Remove LVDS board type and devicetrees

Quoted 10 lines

From: Frieder Schrempf <[email protected]>
The display isn't and won't be used in U-Boot. Also the display setup is not yet supported in mainline Linux, so even for cases where the U-Boot devicetree is passed to the kernel there is currently no use for this configuration.
Selecting the proper configuration in the kernel FIT image automatically depending on the detected hardware can be handled by a script in the environment.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================
#3 lore raw

PATCH v3 2/19 imx: kontron-sl-mx8mm: Add support for loading from SPI NOR in SPL

In reply to Frieder Schrempf

From: Frieder Schrempf <[email protected]>

This was initially enabled, but got accidentally dropped while migrating Kconfig options and resyncing the defconfig in:

commit 9802154a94d6 ("configs: Resync with savedefconfig")

Let's enable this again to be able to boot from SPI NOR.

---
Changes in v3:
* none

Changes in v2:
* new patch

---
 configs/kontron-sl-mx8mm_defconfig | 4 ++++
 1 file changed, 4 insertions(+)
configs/kontron-sl-mx8mm_defconfig +4 -0
index 954818adc0e..3e71e786072 100644
@@ -19,6 +19,8 @@ CONFIG_SPL_SERIAL=y
 CONFIG_SPL_DRIVERS_MISC=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_SPL=y
+CONFIG_SPL_SPI_FLASH_SUPPORT=y
+CONFIG_SPL_SPI=y
 CONFIG_SYS_LOAD_ADDR=0x42000000
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
@@ -43,6 +45,8 @@ CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300
 CONFIG_SPL_I2C=y
 CONFIG_SPL_DM_SPI_FLASH=y
 CONFIG_SPL_POWER=y
+CONFIG_SPL_SPI_LOAD=y
+CONFIG_SYS_SPI_U_BOOT_OFFS=0x58000
 CONFIG_SPL_WATCHDOG=y
 CONFIG_SPL_ATF=y
 CONFIG_SYS_CBSIZE=256
Signature · 1 line
2.37.2
#4 lore raw

PATCH v3 2/19 imx: kontron-sl-mx8mm: Add support for loading from SPI NOR in SPL

Quoted 7 lines

From: Frieder Schrempf <[email protected]> This was initially enabled, but got accidentally dropped while migrating Kconfig options and resyncing the defconfig in:
commit 9802154a94d6 ("configs: Resync with savedefconfig") Let's enable this again to be able to boot from SPI NOR.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================