Skip to contentSkip to conversation

arm: imx8m: imx8mm-cl-iot-gate: detect extension board

PATCH New Ying-Chun Liu 2 participants 5 messages Nov 5, 2021 – Feb 5, 2022

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

cover arm: imx8m: imx8mm-cl-iot-gate: detect extension board

From: "Ying-Chun Liu (PaulLiu)" <[email protected]>

Extension boards can be added to Compulab's iot-gate-imx8mm. We implement extension board manager for detecting the extension boards.

The following overlays are added:
- IED extension board
- CAN/TPM/ADC extension board on IED board.

Ying-Chun Liu (PaulLiu) (2):
arm: dts: imx8mm-cl-iot-gate: add Compulab's ied overlays
arm: imx8m: imx8mm-cl-iot-gate: detect extension board

 arch/arm/dts/Makefile                         |  20 +-
 arch/arm/dts/imx8mm-cl-iot-gate-ied-adc0.dts  |  30 ++
 arch/arm/dts/imx8mm-cl-iot-gate-ied-adc1.dts  |  30 ++
 arch/arm/dts/imx8mm-cl-iot-gate-ied-can0.dts  |  53 +++
 arch/arm/dts/imx8mm-cl-iot-gate-ied-can1.dts  |  53 +++
 arch/arm/dts/imx8mm-cl-iot-gate-ied-tpm0.dts  |  45 +++
 arch/arm/dts/imx8mm-cl-iot-gate-ied-tpm1.dts  |  45 +++
 arch/arm/dts/imx8mm-cl-iot-gate-ied.dts       |  85 +++++
 arch/arm/mach-imx/imx8m/Kconfig               |   2 +
 .../imx8mm-cl-iot-gate/imx8mm-cl-iot-gate.c   | 333 ++++++++++++++++++
 10 files changed, 693 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/dts/imx8mm-cl-iot-gate-ied-adc0.dts
 create mode 100644 arch/arm/dts/imx8mm-cl-iot-gate-ied-adc1.dts
 create mode 100644 arch/arm/dts/imx8mm-cl-iot-gate-ied-can0.dts
 create mode 100644 arch/arm/dts/imx8mm-cl-iot-gate-ied-can1.dts
 create mode 100644 arch/arm/dts/imx8mm-cl-iot-gate-ied-tpm0.dts
 create mode 100644 arch/arm/dts/imx8mm-cl-iot-gate-ied-tpm1.dts
 create mode 100644 arch/arm/dts/imx8mm-cl-iot-gate-ied.dts
Signature · 1 line
2.33.0
#1 lore raw

PATCH 1/2 arm: dts: imx8mm-cl-iot-gate: add Compulab's ied overlays

From: "Ying-Chun Liu (PaulLiu)" <[email protected]>

add the following overlays:
- IED extension board
- CAN/TPM/ADC extension board on IED board.

---
 arch/arm/dts/Makefile                        | 20 ++++-
 arch/arm/dts/imx8mm-cl-iot-gate-ied-adc0.dts | 30 +++++++
 arch/arm/dts/imx8mm-cl-iot-gate-ied-adc1.dts | 30 +++++++
 arch/arm/dts/imx8mm-cl-iot-gate-ied-can0.dts | 53 ++++++++++++
 arch/arm/dts/imx8mm-cl-iot-gate-ied-can1.dts | 53 ++++++++++++
 arch/arm/dts/imx8mm-cl-iot-gate-ied-tpm0.dts | 45 +++++++++++
 arch/arm/dts/imx8mm-cl-iot-gate-ied-tpm1.dts | 45 +++++++++++
 arch/arm/dts/imx8mm-cl-iot-gate-ied.dts      | 85 ++++++++++++++++++++
 8 files changed, 358 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/dts/imx8mm-cl-iot-gate-ied-adc0.dts
 create mode 100644 arch/arm/dts/imx8mm-cl-iot-gate-ied-adc1.dts
 create mode 100644 arch/arm/dts/imx8mm-cl-iot-gate-ied-can0.dts
 create mode 100644 arch/arm/dts/imx8mm-cl-iot-gate-ied-can1.dts
 create mode 100644 arch/arm/dts/imx8mm-cl-iot-gate-ied-tpm0.dts
 create mode 100644 arch/arm/dts/imx8mm-cl-iot-gate-ied-tpm1.dts
 create mode 100644 arch/arm/dts/imx8mm-cl-iot-gate-ied.dts
arch/arm/dts/Makefile +17 -3
index a88aecc5bd..c59a2f43ec 100644
@@ -1147,9 +1147,23 @@ dtb-$(CONFIG_TARGET_DURIAN) += phytium-durian.dtb
 
 dtb-$(CONFIG_TARGET_PRESIDIO_ASIC) += ca-presidio-engboard.dtb
 
-dtb-$(CONFIG_TARGET_IMX8MM_CL_IOT_GATE) += imx8mm-cl-iot-gate.dtb
-
-dtb-$(CONFIG_TARGET_IMX8MM_CL_IOT_GATE_OPTEE) += imx8mm-cl-iot-gate-optee.dtb
+dtb-$(CONFIG_TARGET_IMX8MM_CL_IOT_GATE) += imx8mm-cl-iot-gate.dtb \
+					imx8mm-cl-iot-gate-ied.dtbo \
+					imx8mm-cl-iot-gate-ied-adc0.dtbo \
+					imx8mm-cl-iot-gate-ied-adc1.dtbo \
+					imx8mm-cl-iot-gate-ied-can0.dtbo \
+					imx8mm-cl-iot-gate-ied-can1.dtbo \
+					imx8mm-cl-iot-gate-ied-tpm0.dtbo \
+					imx8mm-cl-iot-gate-ied-tpm1.dtbo
+
+dtb-$(CONFIG_TARGET_IMX8MM_CL_IOT_GATE_OPTEE) += imx8mm-cl-iot-gate-optee.dtb \
+					imx8mm-cl-iot-gate-ied.dtbo \
+					imx8mm-cl-iot-gate-ied-adc0.dtbo \
+					imx8mm-cl-iot-gate-ied-adc1.dtbo \
+					imx8mm-cl-iot-gate-ied-can0.dtbo \
+					imx8mm-cl-iot-gate-ied-can1.dtbo \
+					imx8mm-cl-iot-gate-ied-tpm0.dtbo \
+					imx8mm-cl-iot-gate-ied-tpm1.dtbo
 
 dtb-$(CONFIG_TARGET_EA_LPC3250DEVKITV2) += lpc3250-ea3250.dtb
 
arch/arm/dts/imx8mm-cl-iot-gate-ied-adc0.dts new file +30 -0
new file mode 100644
index 0000000000..3f2201e4ee
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2021 Linaro
+ */
+
+/dts-v1/;
+/plugin/;
+
+&{/} {
+	vref_adc: regulator-vref-adc {
+		compatible = "regulator-fixed";
+		regulator-name = "vref_adc";
+		regulator-min-microvolt = <2400000>;
+		regulator-max-microvolt = <2400000>;
+		regulator-always-on;
+	};
+};
+
+&ecspi2 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	adc0: adc@0 {
+		compatible = "maxim,max11108";
+		reg = <0>;
+		vref-supply = <&vref_adc>;
+		spi-max-frequency = <20000000>;
+		status = "okay";
+	};
+};
arch/arm/dts/imx8mm-cl-iot-gate-ied-adc1.dts new file +30 -0
new file mode 100644
index 0000000000..bb0f848718
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2021 Linaro
+ */
+
+/dts-v1/;
+/plugin/;
+
+&{/} {
+	vref_adc: regulator-vref-adc {
+		compatible = "regulator-fixed";
+		regulator-name = "vref_adc";
+		regulator-min-microvolt = <2400000>;
+		regulator-max-microvolt = <2400000>;
+		regulator-always-on;
+	};
+};
+
+&ecspi3 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	adc1: adc@0 {
+		compatible = "maxim,max11108";
+		reg = <0>;
+		vref-supply = <&vref_adc>;
+		spi-max-frequency = <20000000>;
+		status = "okay";
+	};
+};
arch/arm/dts/imx8mm-cl-iot-gate-ied-can0.dts new file +53 -0

53 lines not on this page · raw message

arch/arm/dts/imx8mm-cl-iot-gate-ied-can1.dts new file +53 -0

53 lines not on this page · raw message

arch/arm/dts/imx8mm-cl-iot-gate-ied-tpm0.dts new file +45 -0

45 lines not on this page · raw message

arch/arm/dts/imx8mm-cl-iot-gate-ied-tpm1.dts new file +45 -0

45 lines not on this page · raw message

arch/arm/dts/imx8mm-cl-iot-gate-ied.dts new file +85 -0

85 lines not on this page · raw message

Signature · 1 line
2.33.0
#2 lore raw

PATCH 1/2 arm: dts: imx8mm-cl-iot-gate: add Compulab's ied overlays

Quoted 7 lines

From: "Ying-Chun Liu (PaulLiu)" <[email protected]> add the following overlays:
- IED extension board
- CAN/TPM/ADC extension board on IED board.

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 2/2 arm: imx8m: imx8mm-cl-iot-gate: detect extension board

In reply to Ying-Chun Liu

From: "Ying-Chun Liu (PaulLiu)" <[email protected]>

Extension boards can be added to Compulab's iot-gate-imx8mm. We implement extension board manager for detecting the extension boards.

---
 arch/arm/mach-imx/imx8m/Kconfig               |   2 +
 .../imx8mm-cl-iot-gate/imx8mm-cl-iot-gate.c   | 333 ++++++++++++++++++
 2 files changed, 335 insertions(+)
arch/arm/mach-imx/imx8m/Kconfig +2 -0
index 276b8bd974..bd2a7d6820 100644
@@ -147,6 +147,7 @@ config TARGET_IMX8MM_CL_IOT_GATE
 	select IMX8MM
 	select SUPPORT_SPL
 	select IMX8M_LPDDR4
+	select SUPPORT_EXTENSION_SCAN
 
 config TARGET_IMX8MM_CL_IOT_GATE_OPTEE
 	bool "CompuLab iot-gate-imx8 with optee support"
@@ -154,6 +155,7 @@ config TARGET_IMX8MM_CL_IOT_GATE_OPTEE
 	select IMX8MM
 	select SUPPORT_SPL
 	select IMX8M_LPDDR4
+	select SUPPORT_EXTENSION_SCAN
 endchoice
 
 source "board/beacon/imx8mm/Kconfig"
board/compulab/imx8mm-cl-iot-gate/imx8mm-cl-iot-gate.c +333 -0

359 lines not on this page · raw message

Signature · 1 line
2.33.0
#4 lore raw

PATCH 2/2 arm: imx8m: imx8mm-cl-iot-gate: detect extension board

Quoted 7 lines

From: "Ying-Chun Liu (PaulLiu)" <[email protected]> Extension boards can be added to Compulab's iot-gate-imx8mm. We implement extension board manager for detecting the extension boards.

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]
=====================================================================