imx: kontron-sl-mx8mm: Remove LVDS board type and devicetrees
authorFrieder Schrempf <frieder.schrempf@kontron.de>
Wed, 24 Aug 2022 13:52:23 +0000 (15:52 +0200)
committerStefano Babic <sbabic@denx.de>
Thu, 20 Oct 2022 15:35:51 +0000 (17:35 +0200)
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>
arch/arm/dts/Makefile
arch/arm/dts/imx8mm-kontron-n801x-s-lvds-u-boot.dtsi [deleted file]
arch/arm/dts/imx8mm-kontron-n801x-s-lvds.dts [deleted file]
arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi
arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi [deleted file]
board/kontron/sl-mx8mm/spl.c
configs/kontron-sl-mx8mm_defconfig

index 8a577ac..0459be1 100644 (file)
@@ -948,7 +948,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 (file)
index 4bf7572..0000000
+++ /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 (file)
index 40c1473..0000000
+++ /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 */
-               >;
-       };
-};
index 4bf7572..2c62f05 100644 (file)
@@ -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 (file)
index 955e5d2..0000000
+++ /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;
-};
index 09f8135..c379d37 100644 (file)
@@ -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;
index f8589b0..f6ebfaf 100644 (file)
@@ -65,7 +65,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