Re: [PATCH v4 3/3] arm64: dts: imx93: Add phyBOARD-Segin-i.MX93 support

From: Stefan Wahren
Date: Tue Jan 23 2024 - 02:42:47 EST


Hi Wadim,

Am 23.01.24 um 07:11 schrieb Wadim Egorov:
Hey Mathieu,

Am 22.01.24 um 10:53 schrieb Mathieu Othacehe:
Add basic support for phyBOARD-Segin-i.MX93.
Main features are:
* eMMC
* Ethernet
* SD-Card
* UART

Signed-off-by: Mathieu Othacehe <othacehe@xxxxxxx>
---
  arch/arm64/boot/dts/freescale/Makefile        |   1 +
  .../dts/freescale/imx93-phyboard-segin.dts    | 141 ++++++++++++++++++
  .../boot/dts/freescale/imx93-phycore-som.dtsi | 127 ++++++++++++++++
  3 files changed, 269 insertions(+)
  create mode 100644
arch/arm64/boot/dts/freescale/imx93-phyboard-segin.dts
  create mode 100644
arch/arm64/boot/dts/freescale/imx93-phycore-som.dtsi

diff --git a/arch/arm64/boot/dts/freescale/Makefile
b/arch/arm64/boot/dts/freescale/Makefile
index 2e027675d7bb..65db918c821c 100644
--- a/arch/arm64/boot/dts/freescale/Makefile
+++ b/arch/arm64/boot/dts/freescale/Makefile
@@ -201,6 +201,7 @@ dtb-$(CONFIG_ARCH_MXC) +=
imx8qxp-colibri-iris-v2.dtb
  dtb-$(CONFIG_ARCH_MXC) += imx8qxp-mek.dtb
  dtb-$(CONFIG_ARCH_MXC) += imx8ulp-evk.dtb
  dtb-$(CONFIG_ARCH_MXC) += imx93-11x11-evk.dtb
+dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin.dtb
  dtb-$(CONFIG_ARCH_MXC) += imx93-tqma9352-mba93xxca.dtb
  dtb-$(CONFIG_ARCH_MXC) += imx93-tqma9352-mba93xxla.dtb
  diff --git a/arch/arm64/boot/dts/freescale/imx93-phyboard-segin.dts
b/arch/arm64/boot/dts/freescale/imx93-phyboard-segin.dts
new file mode 100644
index 000000000000..5433c33d1322
--- /dev/null
+++ b/arch/arm64/boot/dts/freescale/imx93-phyboard-segin.dts
@@ -0,0 +1,141 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2023 PHYTEC Messtechnik GmbH
+ * Author: Wadim Egorov <w.egorov@xxxxxxxxx>, Christoph Stoidner
<c.stoidner@xxxxxxxxx>
+ * Copyright (C) 2024 Mathieu Othacehe <m.othacehe@xxxxxxxxx>
+ *
+ * Product homepage:
+ * phyBOARD-Segin carrier board is reused for the i.MX93 design.
+ *
https://www.phytec.de/produkte/single-board-computer/phyboard-segin-imx6ul/
+ */
+
+#include "imx93-phycore-som.dtsi"
+
+/{
+    model = "PHYTEC phyBOARD-Segin-i.MX93";
+    compatible = "phytec,imx93-phyboard-segin",
"phytec,imx93-phycore-som",
+             "fsl,imx93";
+
+    chosen {
+        stdout-path = &lpuart1;
+    };
+
+    reg_usdhc2_vmmc: regulator-usdhc2 {
+        compatible = "regulator-fixed";
+        enable-active-high;
+        gpio = <&gpio3 7 GPIO_ACTIVE_HIGH>;
+        pinctrl-names = "default";
+        pinctrl-0 = <&pinctrl_reg_usdhc2_vmmc>;
+        regulator-min-microvolt = <3300000>;
+        regulator-max-microvolt = <3300000>;
+        regulator-name = "VCC_SD";
+    };
+};
+
+/* GPIOs */
+&gpio1 {
+    pinctrl-names = "default";
+    pinctrl-0 = <&pinctrl_gpio1>;

You are doing more than you describing in your changes log.
Here you are forcing a gpio-only functionality for the X16 header. But
the pins we route down to the X16 expansion connector can be also used
differently.

i think the word "forcing" is little bit hard in this case. It doesn't
define a gpio-hog.

Typically we provide device tree overlays for different use cases on
this expansion connectors.

Can you please explain why the device tree overlays cannot overwrite the
pinmuxing?


Please drop the muxing.

Same applies for the gpio names.
What's the problem with defining gpio line names for user friendliness?
The Raspberry Pi has also an expansion header, all the pins can be muxed
to different functions but still have gpio line names.

Best regards