[PATCH v2 19/19] imx: kontron-sl-mx8mm: Prepare for I2C display detection in environment script
Frieder Schrempf
frieder at fris.de
Mon Aug 1 12:30:21 CEST 2022
From: Frieder Schrempf <frieder.schrempf at kontron.de>
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 at kontron.de>
---
Changes in v2:
* new patch
---
arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi | 7 +++++++
arch/arm/dts/imx8mm-kontron-n802x-s-u-boot.dtsi | 8 ++++++++
arch/arm/dts/imx8mm-kontron-n80xx-s-u-boot.dtsi | 13 +++++++++++--
board/kontron/sl-mx8mm/sl-mx8mm.c | 7 +++++--
4 files changed, 31 insertions(+), 4 deletions(-)
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 e2a5a883256..a00033c8865 100644
--- a/arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi
+++ b/arch/arm/dts/imx8mm-kontron-n801x-s-u-boot.dtsi
@@ -5,3 +5,10 @@
#include "imx8mm-kontron-n80xx-s-u-boot.dtsi"
+&iomuxc {
+ pinctrl_touch: touchgrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SAI5_RXD2_GPIO3_IO23 0x19 /* Touch Reset */
+ >;
+ };
+};
diff --git a/arch/arm/dts/imx8mm-kontron-n802x-s-u-boot.dtsi b/arch/arm/dts/imx8mm-kontron-n802x-s-u-boot.dtsi
index 115c4a3d87c..51045e3590c 100644
--- a/arch/arm/dts/imx8mm-kontron-n802x-s-u-boot.dtsi
+++ b/arch/arm/dts/imx8mm-kontron-n802x-s-u-boot.dtsi
@@ -4,3 +4,11 @@
*/
#include "imx8mm-kontron-n80xx-s-u-boot.dtsi"
+
+&iomuxc {
+ pinctrl_touch: touchgrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SAI1_TXD3_GPIO4_IO15 0x19 /* Touch Reset */
+ >;
+ };
+};
diff --git a/arch/arm/dts/imx8mm-kontron-n80xx-s-u-boot.dtsi b/arch/arm/dts/imx8mm-kontron-n80xx-s-u-boot.dtsi
index e7e900d4fa8..5b8b472159a 100644
--- a/arch/arm/dts/imx8mm-kontron-n80xx-s-u-boot.dtsi
+++ b/arch/arm/dts/imx8mm-kontron-n80xx-s-u-boot.dtsi
@@ -48,8 +48,17 @@
&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 {
diff --git a/board/kontron/sl-mx8mm/sl-mx8mm.c b/board/kontron/sl-mx8mm/sl-mx8mm.c
index c576c58adc0..df9e19f232f 100644
--- a/board/kontron/sl-mx8mm/sl-mx8mm.c
+++ b/board/kontron/sl-mx8mm/sl-mx8mm.c
@@ -123,10 +123,13 @@ int board_init(void)
int board_late_init(void)
{
- if (!fdt_node_check_compatible(gd->fdt_blob, 0, "kontron,imx8mm-n802x-som"))
+ if (!fdt_node_check_compatible(gd->fdt_blob, 0, "kontron,imx8mm-n802x-som")) {
env_set("som_type", "n802x");
- else
+ env_set("touch_rst_gpio", "111");
+ } else {
env_set("som_type", "n801x");
+ env_set("touch_rst_gpio", "87");
+ }
return 0;
}
--
2.37.1
More information about the U-Boot
mailing list