u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/19] imx: kontron-sl-mx8mm: Improvements and OSM board support
@ 2022-08-24 13:52 Frieder Schrempf
  2022-08-24 13:52 ` [PATCH v3 01/19] imx: kontron-sl-mx8mm: Remove LVDS board type and devicetrees Frieder Schrempf
  2022-08-24 13:52 ` [PATCH v3 02/19] imx: kontron-sl-mx8mm: Add support for loading from SPI NOR in SPL Frieder Schrempf
  0 siblings, 2 replies; 5+ messages in thread
From: Frieder Schrempf @ 2022-08-24 13:52 UTC (permalink / raw)
  To: u-boot; +Cc: Frieder Schrempf, Fabio Estevam, Stefano Babic

From: Frieder Schrempf <frieder.schrempf@kontron.de>

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/20220822080357.24478-1-frieder@fris.de/

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

-- 
2.37.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v3 01/19] imx: kontron-sl-mx8mm: Remove LVDS board type and devicetrees
  2022-08-24 13:52 [PATCH v3 00/19] imx: kontron-sl-mx8mm: Improvements and OSM board support Frieder Schrempf
@ 2022-08-24 13:52 ` Frieder Schrempf
  2022-10-21 11:41   ` sbabic
  2022-08-24 13:52 ` [PATCH v3 02/19] imx: kontron-sl-mx8mm: Add support for loading from SPI NOR in SPL Frieder Schrempf
  1 sibling, 1 reply; 5+ messages in thread
From: Frieder Schrempf @ 2022-08-24 13:52 UTC (permalink / raw)
  To: Fabio Estevam, Frieder Schrempf, Stefano Babic, u-boot
  Cc: Fabio Estevam, Adam Ford, Andre Przywara, Christian Hewitt,
	Heiko Thiery, Marcel Ziswiler, Marek Vasut, NXP i.MX U-Boot Team,
	Peng Fan, Samuel Holland, Simon Glass, Ying-Chun Liu (PaulLiu)

From: Frieder Schrempf <frieder.schrempf@kontron.de>

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.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
---
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

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 48cb1f52b7a..75d0664cc01 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -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 \
diff --git a/arch/arm/dts/imx8mm-kontron-n801x-s-lvds-u-boot.dtsi b/arch/arm/dts/imx8mm-kontron-n801x-s-lvds-u-boot.dtsi
deleted file mode 100644
index 4bf75722bfb..00000000000
--- a/arch/arm/dts/imx8mm-kontron-n801x-s-lvds-u-boot.dtsi
+++ /dev/null
@@ -1,6 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright (C) 2019 Kontron Electronics GmbH
- */
-
-#include "imx8mm-kontron-n801x-u-boot.dtsi"
diff --git a/arch/arm/dts/imx8mm-kontron-n801x-s-lvds.dts b/arch/arm/dts/imx8mm-kontron-n801x-s-lvds.dts
deleted file mode 100644
index 40c14734e22..00000000000
--- a/arch/arm/dts/imx8mm-kontron-n801x-s-lvds.dts
+++ /dev/null
@@ -1,117 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Copyright (C) 2019 Kontron Electronics GmbH
- */
-
-#include "imx8mm-kontron-n801x-s.dts"
-
-/ {
-	model = "Kontron i.MX8MM N801X S LVDS";
-	compatible = "kontron,imx8mm-n801x-s-lvds", "fsl,imx8mm";
-
-	backlight: backlight {
-		compatible = "pwm-backlight";
-		pwms = <&pwm1 0 50000>; /* period = 5000000 ns => f = 200 Hz */
-		power-supply = <&reg_vdd_24v>;
-		brightness-levels = <0 100>;
-		num-interpolated-steps = <100>;
-		default-brightness-level = <100>;
-		status = "okay";
-	};
-
-	reg_panel_pwr: regpanel-pwr {
-		compatible = "regulator-fixed";
-		regulator-name = "reg_panel_pwr";
-		regulator-always-on;
-		gpio = <&gpio3 19 GPIO_ACTIVE_HIGH>;
-		enable-active-high;
-	};
-
-	reg_panel_rst: regpanel-rst {
-		compatible = "regulator-fixed";
-		regulator-name = "reg_panel_rst";
-		regulator-always-on;
-		gpio = <&gpio3 20 GPIO_ACTIVE_HIGH>;
-		enable-active-high;
-	};
-
-	reg_panel_stby: regpanel-stby {
-		compatible = "regulator-fixed";
-		regulator-name = "reg_panel_stby";
-		regulator-always-on;
-		gpio = <&gpio3 21 GPIO_ACTIVE_HIGH>;
-		enable-active-high;
-	};
-
-	reg_panel_hinv: regpanel-hinv {
-		compatible = "regulator-fixed";
-		regulator-name = "reg_panel_hinv";
-		regulator-always-on;
-		gpio = <&gpio3 24 GPIO_ACTIVE_HIGH>;
-		enable-active-high;
-	};
-
-	reg_panel_vinv: regpanel-vinv {
-		compatible = "regulator-fixed";
-		regulator-name = "reg_panel_vinv";
-		gpio = <&gpio3 25 GPIO_ACTIVE_HIGH>;
-		enable-active-high;
-	};
-
-	reg_vdd_24v: regulator-24v {
-		compatible = "regulator-fixed";
-		regulator-name = "reg-vdd-24v";
-		regulator-min-microvolt = <24000000>;
-		regulator-max-microvolt = <24000000>;
-		regulator-boot-on;
-		regulator-always-on;
-		status = "okay";
-	};
-};
-
-&i2c2 {
-	status = "okay";
-
-	gt911@5d {
-		compatible = "goodix,gt928";
-		reg = <0x5d>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&pinctrl_touch>;
-		interrupt-parent = <&gpio3>;
-		interrupts = <22 8>;
-		reset-gpios = <&gpio3 23 0>;
-		irq-gpios = <&gpio3 22 0>;
-	};
-};
-
-&pwm1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_pwm1>;
-	#pwm-cells = <2>;
-	status = "okay";
-};
-
-&iomuxc {
-	pinctrl_panel: panelgrp {
-		fsl,pins = <
-			MX8MM_IOMUXC_SAI5_RXFS_GPIO3_IO19	0x19 /* TFT-PWR - family */
-			MX8MM_IOMUXC_SAI5_RXC_GPIO3_IO20	0x19 /* RESET family */
-			MX8MM_IOMUXC_SAI5_RXD0_GPIO3_IO21	0x19 /* STBY family */
-			MX8MM_IOMUXC_SAI5_RXD3_GPIO3_IO24	0x19 /* HINV panel */
-			MX8MM_IOMUXC_SAI5_MCLK_GPIO3_IO25	0x19 /* VINV panel */
-		>;
-	};
-
-	pinctrl_pwm1: pwm1grp {
-		fsl,pins = <
-			MX8MM_IOMUXC_SPDIF_EXT_CLK_PWM1_OUT	0x6
-		>;
-	};
-
-	pinctrl_touch: touchgrp {
-		fsl,pins = <
-			MX8MM_IOMUXC_SAI5_RXD1_GPIO3_IO22	0x19 /* Touch Interrupt */
-			MX8MM_IOMUXC_SAI5_RXD2_GPIO3_IO23	0x19 /* Touch Reset */
-		>;
-	};
-};
diff --git a/arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi b/arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi
index 4bf75722bfb..2c62f05cec1 100644
--- a/arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi
+++ b/arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi
@@ -3,4 +3,142 @@
  * Copyright (C) 2019 Kontron Electronics GmbH
  */
 
-#include "imx8mm-kontron-n801x-u-boot.dtsi"
+#include "imx8mm-u-boot.dtsi"
+
+/ {
+	aliases {
+		usb0 = &usbotg1;
+		usb1 = &usbotg2;
+	};
+
+	wdt-reboot {
+		compatible = "wdt-reboot";
+		wdt = <&wdog1>;
+		u-boot,dm-spl;
+	};
+
+	firmware {
+		optee {
+			compatible = "linaro,optee-tz";
+			method = "smc";
+		};
+	};
+};
+
+&crypto {
+	u-boot,dm-spl;
+};
+
+&sec_jr0 {
+	u-boot,dm-spl;
+};
+
+&sec_jr1 {
+	u-boot,dm-spl;
+};
+
+&sec_jr2 {
+	u-boot,dm-spl;
+};
+
+&i2c1 {
+	u-boot,dm-spl;
+	u-boot,dm-pre-reloc;
+};
+
+&i2c2 {
+	status = "okay";
+	u-boot,dm-spl;
+	u-boot,dm-pre-reloc;
+};
+
+&pinctrl_ecspi1 {
+	u-boot,dm-spl;
+};
+
+&pinctrl_i2c1 {
+	u-boot,dm-spl;
+};
+
+&pinctrl_pmic {
+	u-boot,dm-spl;
+	fsl,pins = <
+		MX8MM_IOMUXC_GPIO1_IO00_GPIO1_IO0		0x141
+		/* Disable Pullup for SD_VSEL */
+		MX8MM_IOMUXC_GPIO1_IO04_GPIO1_IO4		0x41
+	>;
+};
+
+&pinctrl_uart3 {
+	u-boot,dm-spl;
+	u-boot,dm-pre-reloc;
+};
+
+&pinctrl_usdhc1 {
+	u-boot,dm-spl;
+};
+
+&pinctrl_usdhc1_100mhz {
+	u-boot,dm-spl;
+};
+
+&pinctrl_usdhc1_200mhz {
+	u-boot,dm-spl;
+};
+
+&pinctrl_usdhc2 {
+	u-boot,dm-spl;
+};
+
+&pca9450 {
+	u-boot,dm-spl;
+};
+
+&{/soc@0/bus@30800000/i2c@30a20000/pmic@25/regulators} {
+	u-boot,dm-spl;
+};
+
+&ecspi1 {
+	u-boot,dm-spl;
+};
+
+&gpio1 {
+	u-boot,dm-spl;
+};
+
+&gpio2 {
+	u-boot,dm-spl;
+};
+
+&gpio3 {
+	u-boot,dm-spl;
+};
+
+&gpio4 {
+	u-boot,dm-spl;
+};
+
+&gpio5 {
+	u-boot,dm-spl;
+};
+
+&uart3 {
+	u-boot,dm-spl;
+	u-boot,dm-pre-reloc;
+};
+
+&usdhc1 {
+	u-boot,dm-spl;
+};
+
+&usdhc2 {
+	u-boot,dm-spl;
+};
+
+&wdog1 {
+	u-boot,dm-spl;
+};
+
+&pinctrl_wdog {
+	u-boot,dm-spl;
+};
diff --git a/arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi b/arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi
deleted file mode 100644
index 955e5d2edf2..00000000000
--- a/arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi
+++ /dev/null
@@ -1,145 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright (C) 2019 Kontron Electronics GmbH
- */
-
-#include "imx8mm-u-boot.dtsi"
-
-/ {
-	aliases {
-		usb0 = &usbotg1;
-		usb1 = &usbotg2;
-	};
-
-	wdt-reboot {
-		compatible = "wdt-reboot";
-		wdt = <&wdog1>;
-		u-boot,dm-spl;
-	};
-
-	firmware {
-		optee {
-			compatible = "linaro,optee-tz";
-			method = "smc";
-		};
-	};
-};
-
-&crypto {
-	u-boot,dm-spl;
-};
-
-&sec_jr0 {
-	u-boot,dm-spl;
-};
-
-&sec_jr1 {
-	u-boot,dm-spl;
-};
-
-&sec_jr2 {
-	u-boot,dm-spl;
-};
-
-
-&i2c1 {
-	u-boot,dm-spl;
-	u-boot,dm-pre-reloc;
-};
-
-&i2c2 {
-	status = "okay";
-	u-boot,dm-spl;
-	u-boot,dm-pre-reloc;
-};
-
-&pinctrl_ecspi1 {
-	u-boot,dm-spl;
-};
-
-&pinctrl_i2c1 {
-	u-boot,dm-spl;
-};
-
-&pinctrl_pmic {
-	u-boot,dm-spl;
-	fsl,pins = <
-		MX8MM_IOMUXC_GPIO1_IO00_GPIO1_IO0		0x141
-		/* Disable Pullup for SD_VSEL */
-		MX8MM_IOMUXC_GPIO1_IO04_GPIO1_IO4		0x41
-	>;
-};
-
-&pinctrl_uart3 {
-	u-boot,dm-spl;
-	u-boot,dm-pre-reloc;
-};
-
-&pinctrl_usdhc1 {
-	u-boot,dm-spl;
-};
-
-&pinctrl_usdhc1_100mhz {
-	u-boot,dm-spl;
-};
-
-&pinctrl_usdhc1_200mhz {
-	u-boot,dm-spl;
-};
-
-&pinctrl_usdhc2 {
-	u-boot,dm-spl;
-};
-
-&pca9450 {
-	u-boot,dm-spl;
-};
-
-&{/soc@0/bus@30800000/i2c@30a20000/pmic@25/regulators} {
-	u-boot,dm-spl;
-};
-
-&ecspi1 {
-	u-boot,dm-spl;
-};
-
-&gpio1 {
-	u-boot,dm-spl;
-};
-
-&gpio2 {
-	u-boot,dm-spl;
-};
-
-&gpio3 {
-	u-boot,dm-spl;
-};
-
-&gpio4 {
-	u-boot,dm-spl;
-};
-
-&gpio5 {
-	u-boot,dm-spl;
-};
-
-&uart3 {
-	u-boot,dm-spl;
-	u-boot,dm-pre-reloc;
-};
-
-&usdhc1 {
-	u-boot,dm-spl;
-};
-
-&usdhc2 {
-	u-boot,dm-spl;
-};
-
-&wdog1 {
-	u-boot,dm-spl;
-};
-
-&pinctrl_wdog {
-	u-boot,dm-spl;
-};
diff --git a/board/kontron/sl-mx8mm/spl.c b/board/kontron/sl-mx8mm/spl.c
index 09f81351dd4..c379d37f1e8 100644
--- a/board/kontron/sl-mx8mm/spl.c
+++ b/board/kontron/sl-mx8mm/spl.c
@@ -29,15 +29,11 @@ DECLARE_GLOBAL_DATA_PTR;
 
 enum {
 	BOARD_TYPE_KTN_N801X,
-	BOARD_TYPE_KTN_N801X_LVDS,
 	BOARD_TYPE_MAX
 };
 
-#define GPIO_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
 #define I2C_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_HYS | PAD_CTL_PUE)
 
-#define TOUCH_RESET_GPIO	IMX_GPIO_NR(3, 23)
-
 static iomux_v3_cfg_t const i2c1_pads[] = {
 	IMX8MM_PAD_I2C1_SCL_I2C1_SCL | MUX_PAD_CTRL(I2C_PAD_CTRL) | MUX_MODE_SION,
 	IMX8MM_PAD_I2C1_SDA_I2C1_SDA | MUX_PAD_CTRL(I2C_PAD_CTRL) | MUX_MODE_SION
@@ -48,10 +44,6 @@ static iomux_v3_cfg_t const i2c2_pads[] = {
 	IMX8MM_PAD_I2C2_SDA_I2C2_SDA | MUX_PAD_CTRL(I2C_PAD_CTRL) | MUX_MODE_SION
 };
 
-static iomux_v3_cfg_t const touch_gpio[] = {
-	IMX8MM_PAD_SAI5_RXD2_GPIO3_IO23 | MUX_PAD_CTRL(GPIO_PAD_CTRL)
-};
-
 int spl_board_boot_device(enum boot_device boot_dev_spl)
 {
 	switch (boot_dev_spl) {
@@ -123,20 +115,6 @@ static void spl_dram_init(void)
 	writel(size, M4_BOOTROM_BASE_ADDR);
 }
 
-static void touch_reset(void)
-{
-	/*
-	 * Toggle the reset of the touch panel.
-	 */
-	imx_iomux_v3_setup_multiple_pads(touch_gpio, ARRAY_SIZE(touch_gpio));
-
-	gpio_request(TOUCH_RESET_GPIO, "touch_reset");
-	gpio_direction_output(TOUCH_RESET_GPIO, 0);
-	mdelay(20);
-	gpio_direction_output(TOUCH_RESET_GPIO, 1);
-	mdelay(20);
-}
-
 static int i2c_detect(u8 bus, u16 addr)
 {
 	struct udevice *udev;
@@ -155,19 +133,6 @@ static int i2c_detect(u8 bus, u16 addr)
 
 int do_board_detect(void)
 {
-	bool lvds = false;
-
-	/*
-	 * Check the I2C touch controller to detect a LVDS panel.
-	 */
-	imx_iomux_v3_setup_multiple_pads(i2c2_pads, ARRAY_SIZE(i2c2_pads));
-	touch_reset();
-
-	if (i2c_detect(1, 0x5d) == 0) {
-		printf("Touch controller detected, assuming LVDS panel...\n");
-		lvds = true;
-	}
-
 	/*
 	 * Check the I2C PMIC to detect the deprecated SoM with DA9063.
 	 */
@@ -175,24 +140,17 @@ int do_board_detect(void)
 
 	if (i2c_detect(0, 0x58) == 0) {
 		printf("### ATTENTION: DEPRECATED SOM REVISION (N8010 Rev0) DETECTED! ###\n");
-		printf("###  THIS HW IS NOT SUPPRTED AND BOOTING WILL PROBABLY FAIL   ###\n");
+		printf("###  THIS HW IS NOT SUPPORTED AND BOOTING WILL PROBABLY FAIL  ###\n");
 		printf("###             PLEASE UPGRADE TO LATEST MODULE               ###\n");
 	}
 
-	if (lvds)
-		gd->board_type = BOARD_TYPE_KTN_N801X_LVDS;
-	else
-		gd->board_type = BOARD_TYPE_KTN_N801X;
+	gd->board_type = BOARD_TYPE_KTN_N801X;
 
 	return 0;
 }
 
 int board_fit_config_name_match(const char *name)
 {
-	if (gd->board_type == BOARD_TYPE_KTN_N801X_LVDS && is_imx8mm() &&
-	    !strncmp(name, "imx8mm-kontron-n801x-s-lvds", 27))
-		return 0;
-
 	if (gd->board_type == BOARD_TYPE_KTN_N801X && is_imx8mm() &&
 	    !strncmp(name, "imx8mm-kontron-n801x-s", 22))
 		return 0;
diff --git a/configs/kontron-sl-mx8mm_defconfig b/configs/kontron-sl-mx8mm_defconfig
index f19dc7bc55e..954818adc0e 100644
--- a/configs/kontron-sl-mx8mm_defconfig
+++ b/configs/kontron-sl-mx8mm_defconfig
@@ -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
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v3 02/19] imx: kontron-sl-mx8mm: Add support for loading from SPI NOR in SPL
  2022-08-24 13:52 [PATCH v3 00/19] imx: kontron-sl-mx8mm: Improvements and OSM board support Frieder Schrempf
  2022-08-24 13:52 ` [PATCH v3 01/19] imx: kontron-sl-mx8mm: Remove LVDS board type and devicetrees Frieder Schrempf
@ 2022-08-24 13:52 ` Frieder Schrempf
  2022-10-21 11:41   ` sbabic
  1 sibling, 1 reply; 5+ messages in thread
From: Frieder Schrempf @ 2022-08-24 13:52 UTC (permalink / raw)
  To: Frieder Schrempf, u-boot; +Cc: Fabio Estevam, Simon Glass

From: Frieder Schrempf <frieder.schrempf@kontron.de>

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.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
---
Changes in v3:
* none

Changes in v2:
* new patch
---
 configs/kontron-sl-mx8mm_defconfig | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/configs/kontron-sl-mx8mm_defconfig b/configs/kontron-sl-mx8mm_defconfig
index 954818adc0e..3e71e786072 100644
--- a/configs/kontron-sl-mx8mm_defconfig
+++ b/configs/kontron-sl-mx8mm_defconfig
@@ -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
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v3 02/19] imx: kontron-sl-mx8mm: Add support for loading from SPI NOR in SPL
  2022-08-24 13:52 ` [PATCH v3 02/19] imx: kontron-sl-mx8mm: Add support for loading from SPI NOR in SPL Frieder Schrempf
@ 2022-10-21 11:41   ` sbabic
  0 siblings, 0 replies; 5+ messages in thread
From: sbabic @ 2022-10-21 11:41 UTC (permalink / raw)
  To: Frieder Schrempf, u-boot

> From: Frieder Schrempf <frieder.schrempf@kontron.de>
> 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.
> Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
> Reviewed-by: Fabio Estevam <festevam@denx.de>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
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: sbabic@denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v3 01/19] imx: kontron-sl-mx8mm: Remove LVDS board type and devicetrees
  2022-08-24 13:52 ` [PATCH v3 01/19] imx: kontron-sl-mx8mm: Remove LVDS board type and devicetrees Frieder Schrempf
@ 2022-10-21 11:41   ` sbabic
  0 siblings, 0 replies; 5+ messages in thread
From: sbabic @ 2022-10-21 11:41 UTC (permalink / raw)
  To: Frieder Schrempf, u-boot

> From: Frieder Schrempf <frieder.schrempf@kontron.de>
> 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.
> Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
> Reviewed-by: Fabio Estevam <festevam@denx.de>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
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: sbabic@denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-10-21 11:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-24 13:52 [PATCH v3 00/19] imx: kontron-sl-mx8mm: Improvements and OSM board support Frieder Schrempf
2022-08-24 13:52 ` [PATCH v3 01/19] imx: kontron-sl-mx8mm: Remove LVDS board type and devicetrees Frieder Schrempf
2022-10-21 11:41   ` sbabic
2022-08-24 13:52 ` [PATCH v3 02/19] imx: kontron-sl-mx8mm: Add support for loading from SPI NOR in SPL Frieder Schrempf
2022-10-21 11:41   ` sbabic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).