]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx: kontron-sl-mx8mm: Prepare for I2C display detection in environment script
authorFrieder Schrempf <frieder.schrempf@kontron.de>
Wed, 24 Aug 2022 13:59:20 +0000 (15:59 +0200)
committerStefano Babic <sbabic@denx.de>
Thu, 20 Oct 2022 15:35:51 +0000 (17:35 +0200)
Enable the I2C bus and set a env variable for the reset GPIO of the touch
controller. This allows us to probe the panel in a script.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
arch/arm/dts/imx8mm-kontron-bl-common-u-boot.dtsi
arch/arm/dts/imx8mm-kontron-bl-osm-s-u-boot.dtsi
arch/arm/dts/imx8mm-kontron-bl-u-boot.dtsi
board/kontron/sl-mx8mm/sl-mx8mm.c

index e7e900d4fa82f245601a2c42414d674341d38b74..5b8b472159ad296aea2108d1b75fc812c87d8d77 100644 (file)
 
 &i2c2 {
        status = "okay";
-       u-boot,dm-spl;
-       u-boot,dm-pre-reloc;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c2>;
+};
+
+&iomuxc {
+       pinctrl_i2c2: i2c2grp {
+               fsl,pins = <
+                       MX8MM_IOMUXC_I2C2_SCL_I2C2_SCL          0x400001c3
+                       MX8MM_IOMUXC_I2C2_SDA_I2C2_SDA          0x400001c3
+               >;
+       };
 };
 
 &pinctrl_ecspi1 {
index cd990b1672047ecfe067646b7bc5b97cf5af78af..fac24a21fbfcb05bc020c9e3fdab1324a94258af 100644 (file)
@@ -4,3 +4,11 @@
  */
 
 #include "imx8mm-kontron-bl-common-u-boot.dtsi"
+
+&iomuxc {
+       pinctrl_touch: touchgrp {
+               fsl,pins = <
+                       MX8MM_IOMUXC_SAI5_RXD2_GPIO3_IO23       0x19 /* Touch Reset */
+               >;
+       };
+};
index cd990b1672047ecfe067646b7bc5b97cf5af78af..e9fa8d7b2a1d12d826ba5ea3a30cf425e3741ba9 100644 (file)
@@ -4,3 +4,11 @@
  */
 
 #include "imx8mm-kontron-bl-common-u-boot.dtsi"
+
+&iomuxc {
+       pinctrl_touch: touchgrp {
+               fsl,pins = <
+                       MX8MM_IOMUXC_SAI1_TXD3_GPIO4_IO15       0x19 /* Touch Reset */
+               >;
+       };
+};
index 641130112aa64d22cedf86d391ce20bfde7dad24..4ac430b29a980bb07f5e56df566ac900be77a070 100644 (file)
@@ -126,8 +126,11 @@ int board_late_init(void)
        if (!fdt_node_check_compatible(gd->fdt_blob, 0, "kontron,imx8mm-n802x-som") ||
            !fdt_node_check_compatible(gd->fdt_blob, 0, "kontron,imx8mm-osm-s")) {
                env_set("som_type", "osm-s");
-       else
+               env_set("touch_rst_gpio", "111");
+       } else {
                env_set("som_type", "sl");
+               env_set("touch_rst_gpio", "87");
+       }
 
        return 0;
 }