From nobody Fri Nov 29 04:30:12 2024 Received: from mail11.truemail.it (mail11.truemail.it [217.194.8.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 159D2154C0E; Tue, 24 Sep 2024 11:40:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.194.8.81 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727178061; cv=none; b=JoqubDc+8Z2n8B+NPik17Y+FyMdHdKxpbbLkeq/AZTzHD02rxpG8dpNWmRMFCtVPRvhWAYNsur8RG4GSMQk0dOqNQg1OhASErkdbmOCZp1o7zUcsBda1DI78bFOYBvaSbnNXBoQw/cljghLZa64oR68Pc28aWAp4jHj5nbKRoqc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727178061; c=relaxed/simple; bh=pM19rn2HeJo3jteCfwus4X9bbS79/Zs6RBwgmzIjx4Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=io4tiBPD6OM6X3a6qDOc8UIiGGc0Bcx5xQDk0K/FzWEu9SSfOZ/LieWVBb4NZTecA/Ytq2KIy3BnKPxONi3L4YdF23NDfWO1Q5OSbRxzBw3V07FBM004K503HSndYqEmHAb/8kt0dC2hjDqllpc1clIQ9Tu4/+kJE4Ad2TWoKDM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dolcini.it; spf=pass smtp.mailfrom=dolcini.it; dkim=pass (2048-bit key) header.d=dolcini.it header.i=@dolcini.it header.b=QLK+OCrg; arc=none smtp.client-ip=217.194.8.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dolcini.it Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dolcini.it Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dolcini.it header.i=@dolcini.it header.b="QLK+OCrg" Received: from francesco-nb.pivistrello.it (93-49-2-63.ip317.fastwebnet.it [93.49.2.63]) by mail11.truemail.it (Postfix) with ESMTPA id F2CDE1FA77; Tue, 24 Sep 2024 13:40:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dolcini.it; s=default; t=1727178058; bh=z2p++X4y/QMUmYwO6u5MfaLXhITN3ZVhMINRc4eZg+4=; h=From:To:Subject; b=QLK+OCrgz012ZgzfdDn1Igv07wj8JNZRy9DVe3sg9uSDmnjOwknHt6gPXUL7Bz3rT PN+hdnp/zh5kXOQ0CwhQahkL/Wf9/E3q5vOinV+1v7xDlFdupnw22H5+f/WAsaODTP 70wrDpIAc0o4/jRCNVq0iobFhGXIvZG1QPIMSppTeZ6+SIzSpOINRVBOB3LnHvH+04 fsIKXzCzyitX9NmJ3UgMZdgABsoIuVD+oaSVOzkTk3g4fgMJH+Y5SPhGModEHMyXc1 XNiWJtFnkprTT/i+1AOGY+dGl+lPPlF/cjVhlSzqFhOwLcP5lqC5Cfh0rRgVe9W0Vt 3Z4oyn2Hw+3vA== From: Francesco Dolcini To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo Cc: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Gon=C3=A7alves?= , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Francesco Dolcini Subject: [PATCH v1 1/3] dt-bindings: arm: freescale: Add verdin imx8mp ivy board Date: Tue, 24 Sep 2024 13:40:51 +0200 Message-Id: <20240924114053.127737-2-francesco@dolcini.it> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20240924114053.127737-1-francesco@dolcini.it> References: <20240924114053.127737-1-francesco@dolcini.it> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Jo=C3=A3o Paulo Gon=C3=A7alves Add Toradex Verdin Ivy carrier board support. https://www.toradex.com/products/carrier-board/ivy-carrier-board Signed-off-by: Jo=C3=A3o Paulo Gon=C3=A7alves Signed-off-by: Francesco Dolcini Acked-by: Conor Dooley --- Documentation/devicetree/bindings/arm/fsl.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml b/Documentation= /devicetree/bindings/arm/fsl.yaml index b39a7e031177..7413759ed240 100644 --- a/Documentation/devicetree/bindings/arm/fsl.yaml +++ b/Documentation/devicetree/bindings/arm/fsl.yaml @@ -1137,6 +1137,7 @@ properties: - enum: - toradex,verdin-imx8mp-nonwifi-dahlia # Verdin iMX8M Plus M= odule on Dahlia - toradex,verdin-imx8mp-nonwifi-dev # Verdin iMX8M Plus M= odule on Verdin Development Board + - toradex,verdin-imx8mp-nonwifi-ivy # Verdin iMX8M Plus M= odule on Ivy - toradex,verdin-imx8mp-nonwifi-mallow # Verdin iMX8M Plus M= odule on Mallow - toradex,verdin-imx8mp-nonwifi-yavia # Verdin iMX8M Plus M= odule on Yavia - const: toradex,verdin-imx8mp-nonwifi # Verdin iMX8M Plus M= odule without Wi-Fi / BT @@ -1148,6 +1149,7 @@ properties: - enum: - toradex,verdin-imx8mp-wifi-dahlia # Verdin iMX8M Plus Wi-F= i / BT Module on Dahlia - toradex,verdin-imx8mp-wifi-dev # Verdin iMX8M Plus Wi-F= i / BT M. on Verdin Development B. + - toradex,verdin-imx8mp-wifi-ivy # Verdin iMX8M Plus Wi-F= i / BT Module on Ivy - toradex,verdin-imx8mp-wifi-mallow # Verdin iMX8M Plus Wi-F= i / BT Module on Mallow - toradex,verdin-imx8mp-wifi-yavia # Verdin iMX8M Plus Wi-F= i / BT Module on Yavia - const: toradex,verdin-imx8mp-wifi # Verdin iMX8M Plus Wi-F= i / BT Module --=20 2.39.5 From nobody Fri Nov 29 04:30:12 2024 Received: from mail11.truemail.it (mail11.truemail.it [217.194.8.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ABE6219B3DD; Tue, 24 Sep 2024 11:41:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.194.8.81 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727178062; cv=none; b=t9lrGSdsgx4pWLqFkrAafUR8y/IAaGM7Pqd5hPFX9iZA6GPggaDo6nOw1yAX51qHcoD0Tyn9kYD2jMF+5L9LvT1kFQUO+dUUIBc9JhhpMm2FI3v/HxSfl98+79HikcaPAWaouzHXBExQKnJbN2weFBsfHDjXhrBqn8zqthYNzFU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727178062; c=relaxed/simple; bh=xIrP9KTp/tTBA4UAZUSLdwvUr9Weoz2sW9UrXOmTEaM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=MwFEONeYUbZUXbCbZ6kfCa1gdiW0neUcTuvcOfTitXIQDrggWOuOUhsz3t35RLKALXJuZIN5cy2bGr7suaP5eM+vMXPw2/ajptb3AWtLHAjcdp0ur+G9lBKauDQHeoyY25pvWeVm4+QGc00FteSsEgaQUUaIZO0bMNDdd0NG07M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dolcini.it; spf=pass smtp.mailfrom=dolcini.it; dkim=pass (2048-bit key) header.d=dolcini.it header.i=@dolcini.it header.b=C+0R/Rcd; arc=none smtp.client-ip=217.194.8.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dolcini.it Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dolcini.it Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dolcini.it header.i=@dolcini.it header.b="C+0R/Rcd" Received: from francesco-nb.pivistrello.it (93-49-2-63.ip317.fastwebnet.it [93.49.2.63]) by mail11.truemail.it (Postfix) with ESMTPA id 7AC7A1FA9A; Tue, 24 Sep 2024 13:40:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dolcini.it; s=default; t=1727178059; bh=CTYJLKQj5+4WSe5KzEb0nne31FHRsw+we6LP7/uQrgI=; h=From:To:Subject; b=C+0R/RcdqxOnhnMoCUqI2gbAVolLnfjnCxEFtYAp0nU6sMXarlFQEDxxDWXT3qoBq 55xMmdtQp3xPCXb7Vs+AaRdKPShoFI79xs3mz6FnECIsfzZChg93atfUv/HlW2ux1q ISl5BhvRclJL4T5CHgBFMF1fJsZLPvzubDbScpr5rAv3zkLbV8nEEJSUk7gOziO0wq rGY6I4pbdljjm1jjgAfND0h8OXMSMSsKeJBfMcRhUo1wfSWo1HqKvMqrknBNQpeup/ sChMRoh3pRn4NWidAcVfgD6kBaz0yP+MJp0TWJY0bTAAgiPDGJqnB9u3BqhOAMJ4+S /cSITVr2uv2IQ== From: Francesco Dolcini To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Gon=C3=A7alves?= , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Francesco Dolcini Subject: [PATCH v1 2/3] arm64: dts: freescale: imx8mp-verdin: add labels to som nodes Date: Tue, 24 Sep 2024 13:40:52 +0200 Message-Id: <20240924114053.127737-3-francesco@dolcini.it> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20240924114053.127737-1-francesco@dolcini.it> References: <20240924114053.127737-1-francesco@dolcini.it> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Jo=C3=A3o Paulo Gon=C3=A7alves Add labels to ti-ads1015 and fec ethernet mdio node to make it easier to reference them from other nodes. Signed-off-by: Jo=C3=A3o Paulo Gon=C3=A7alves Signed-off-by: Francesco Dolcini --- arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi b/arch/arm64/= boot/dts/freescale/imx8mp-verdin.dtsi index a19ad5ee7f79..e9518b7c7aa8 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi @@ -320,7 +320,7 @@ &fec { pinctrl-0 =3D <&pinctrl_fec>; pinctrl-1 =3D <&pinctrl_fec_sleep>; =20 - mdio { + verdin_eth2_mdio: mdio { #address-cells =3D <1>; #size-cells =3D <0>; =20 @@ -591,11 +591,12 @@ hwmon_temp_module: sensor@48 { vs-supply =3D <®_vdd_1v8>; }; =20 - adc@49 { + verdin_som_adc: adc@49 { compatible =3D "ti,ads1015"; reg =3D <0x49>; #address-cells =3D <1>; #size-cells =3D <0>; + #io-channel-cells =3D <1>; =20 /* Verdin I2C_1 (ADC_4 - ADC_3) */ channel@0 { --=20 2.39.5 From nobody Fri Nov 29 04:30:12 2024 Received: from mail11.truemail.it (mail11.truemail.it [217.194.8.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 811641A4F2E; Tue, 24 Sep 2024 11:41:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.194.8.81 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727178063; cv=none; b=KtdNVWKqCobVm6T8jHPzF/9DM1bz88NHFj+3yrhfcXeXHG1eRr9VZwU+WfhZtlPj95AsSxjAu/8SH4Jw/I2IgrHrTFwucCZu6YXTASJMTVJd5Pto/iuS4yNBYgRqt9pE/aS3T84u4VqnrMYRK3cciPBPO9/6fZLDSCUtqj8Cflw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727178063; c=relaxed/simple; bh=Z7GXB1hY9yuFlRj//hULDFZ3X0jhxOLu1qz2jpKJkBM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=pnKSk5afdBjGzDT0zm30syGlD9VZsiW4Wo5pyzhZLR8n/+TrMVpQZkJYLoA6a5pcO7ztppyv8dLPeGN+vsvk6aQp9qQflireLwWoIicHOH0GvlH39h0eaHz/ZKqJn2bIOgDC5ZgPKXP2M4mWBWxshVgW4re3/KEdWl72U0iC2Ew= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dolcini.it; spf=pass smtp.mailfrom=dolcini.it; dkim=pass (2048-bit key) header.d=dolcini.it header.i=@dolcini.it header.b=Z6yekC4H; arc=none smtp.client-ip=217.194.8.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dolcini.it Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dolcini.it Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dolcini.it header.i=@dolcini.it header.b="Z6yekC4H" Received: from francesco-nb.pivistrello.it (93-49-2-63.ip317.fastwebnet.it [93.49.2.63]) by mail11.truemail.it (Postfix) with ESMTPA id 363D21FAA3; Tue, 24 Sep 2024 13:40:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dolcini.it; s=default; t=1727178059; bh=zQ63Mq2IZ4t8UXdTtqZXmEF+p6OTi0tAeDBrubJaU9M=; h=From:To:Subject; b=Z6yekC4HJWhnan1BakOXtRuOxd4velaQwpgd6sIF8W+HleBoVHVo0lLE1+h/Mbzgj h72nhWemp2meHJi3cju7+y9HJ/VZ2Txoq5cS5VdG6rOlQctD0fa9MZMa8Bk9vOkPlg RlbbCEgLx8R7BeypbjW+6NTKqVvrunbmu9vKAV8zn/EXnOl0ejeA3xf2ZApoY/CfvO E+dvLjXX9aMge7eWFFXNVOhostZ5+kNvBLSd+cuxZsy/IOBdKlq3Pu/hq+b9Wn8pDD 9tGrs7NL3YmzymW/tpHGCBmi+RNA/9Gr+kvnN79fIdK2vPv+p/t3TG2wNYymx4ebAc 32RW46tCbO/Dg== From: Francesco Dolcini To: Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Gon=C3=A7alves?= , imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Francesco Dolcini Subject: [PATCH v1 3/3] arm64: dts: freescale: imx8mp-verdin: Add Ivy carrier board Date: Tue, 24 Sep 2024 13:40:53 +0200 Message-Id: <20240924114053.127737-4-francesco@dolcini.it> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20240924114053.127737-1-francesco@dolcini.it> References: <20240924114053.127737-1-francesco@dolcini.it> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Jo=C3=A3o Paulo Gon=C3=A7alves Add Toradex Verdin Ivy carrier board support. One notable feature of Ivy is the analog inputs. These inputs are multiplexed, allowing the same input to measure either voltage or current. For current measurements, a GPIO switch enables or disables the shunt resistor. This process is automatically managed by the Linux kernel using the IIO and MUX subsystems. Voltage measurement is always enabled, but the voltage measured by the ADC is scaled by a cascade voltage divider. In the device tree, the equivalent gain of the voltage divider is used, which can be calculated as follows: ------------ + | .-. R1=3D30K | | | | '-' |------------------- Analog Input (AIN) | | .-. .-. R2=3D10K | | R3=3D30K | | | | | | '-' '-' | | | |-------- | .-. + | R4=3D10K | | | | | ADC Input (Channels 0 = and 1) | '-' - | | - -----------| |-------- =3D=3D=3D =3D=3D=3D GND GND Vin =3D Analog Input (AIN) Vout =3D ADC Input Rth =3D Thevenin Equiv. Resistance Vth =3D Thevenin Equiv. Voltage RL =3D Load Resistor R1 =3D 30K, R2 =3D 10K, R3 =3D 30K, R4 =3D 10K RL =3D R4 =3D 10K Rth =3D (R1 // R2) + R3 =3D 37500 Ohms Vth =3D (Vin * R2) / (R1 + R2) =3D Vin/4; Vout =3D (Vth * RL)/ (Rth + RL) =3D Vth/4.75 =3D Vin/19 Gain =3D Vout/Vin =3D 1/19 https://www.toradex.com/products/carrier-board/ivy-carrier-board Signed-off-by: Jo=C3=A3o Paulo Gon=C3=A7alves Signed-off-by: Francesco Dolcini --- arch/arm64/boot/dts/freescale/Makefile | 2 + .../boot/dts/freescale/imx8mp-verdin-ivy.dtsi | 512 ++++++++++++++++++ .../freescale/imx8mp-verdin-nonwifi-ivy.dts | 18 + .../dts/freescale/imx8mp-verdin-wifi-ivy.dts | 18 + 4 files changed, 550 insertions(+) create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-verdin-ivy.dtsi create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-verdin-nonwifi-ivy= .dts create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-verdin-wifi-ivy.dts diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/f= reescale/Makefile index 9d3df8b218a2..349ff1af0361 100644 --- a/arch/arm64/boot/dts/freescale/Makefile +++ b/arch/arm64/boot/dts/freescale/Makefile @@ -189,10 +189,12 @@ dtb-$(CONFIG_ARCH_MXC) +=3D imx8mp-venice-gw74xx.dtb dtb-$(CONFIG_ARCH_MXC) +=3D imx8mp-venice-gw75xx-2x.dtb dtb-$(CONFIG_ARCH_MXC) +=3D imx8mp-verdin-nonwifi-dahlia.dtb dtb-$(CONFIG_ARCH_MXC) +=3D imx8mp-verdin-nonwifi-dev.dtb +dtb-$(CONFIG_ARCH_MXC) +=3D imx8mp-verdin-nonwifi-ivy.dtb dtb-$(CONFIG_ARCH_MXC) +=3D imx8mp-verdin-nonwifi-mallow.dtb dtb-$(CONFIG_ARCH_MXC) +=3D imx8mp-verdin-nonwifi-yavia.dtb dtb-$(CONFIG_ARCH_MXC) +=3D imx8mp-verdin-wifi-dahlia.dtb dtb-$(CONFIG_ARCH_MXC) +=3D imx8mp-verdin-wifi-dev.dtb +dtb-$(CONFIG_ARCH_MXC) +=3D imx8mp-verdin-wifi-ivy.dtb dtb-$(CONFIG_ARCH_MXC) +=3D imx8mp-verdin-wifi-mallow.dtb dtb-$(CONFIG_ARCH_MXC) +=3D imx8mp-verdin-wifi-yavia.dtb =20 diff --git a/arch/arm64/boot/dts/freescale/imx8mp-verdin-ivy.dtsi b/arch/ar= m64/boot/dts/freescale/imx8mp-verdin-ivy.dtsi new file mode 100644 index 000000000000..db1b4ee7728c --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8mp-verdin-ivy.dtsi @@ -0,0 +1,512 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2024 Toradex + * + * Common dtsi for Verdin IMX8MP SoM on Ivy carrier board + * + * https://www.toradex.com/computer-on-modules/verdin-arm-family/nxp-imx-8= m-plus + * https://www.toradex.com/products/carrier-board/ivy-carrier-board + */ + +#include +#include +#include + +/ { + /* AIN1 Voltage w/o AIN1_MODE gpio control */ + ain1_voltage_unmanaged: voltage-divider-ain1 { + compatible =3D "voltage-divider"; + #io-channel-cells =3D <1>; + io-channels =3D <&ivy_adc1 0>; + full-ohms =3D <19>; + output-ohms =3D <1>; + }; + + /* AIN1 Current w/o AIN1_MODE gpio control */ + ain1_current_unmanaged: current-sense-shunt-ain1 { + compatible =3D "current-sense-shunt"; + #io-channel-cells =3D <0>; + io-channels =3D <&ivy_adc1 1>; + shunt-resistor-micro-ohms =3D <100000000>; + }; + + /* AIN1_MODE - SODIMM 216 */ + ain1_mode_mux_ctrl: mux-controller-0 { + compatible =3D "gpio-mux"; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_gpio5>; + #mux-control-cells =3D <0>; + mux-gpios =3D <&gpio1 7 GPIO_ACTIVE_HIGH>; + }; + + ain1-voltage { + compatible =3D "io-channel-mux"; + channels =3D "ain1_voltage", ""; + io-channels =3D <&ain1_voltage_unmanaged 0>; + io-channel-names =3D "parent"; + mux-controls =3D <&ain1_mode_mux_ctrl>; + settle-time-us =3D <1000>; + }; + + ain1-current { + compatible =3D "io-channel-mux"; + channels =3D "", "ain1_current"; + io-channels =3D <&ain1_current_unmanaged>; + io-channel-names =3D "parent"; + mux-controls =3D <&ain1_mode_mux_ctrl>; + settle-time-us =3D <1000>; + }; + + /* AIN2 Voltage w/o AIN2_MODE gpio control */ + ain2_voltage_unmanaged: voltage-divider-ain2 { + compatible =3D "voltage-divider"; + #io-channel-cells =3D <1>; + io-channels =3D <&ivy_adc2 0>; + full-ohms =3D <19>; + output-ohms =3D <1>; + }; + + /* AIN2 Current w/o AIN2_MODE gpio control */ + ain2_current_unmanaged: current-sense-shunt-ain2 { + compatible =3D "current-sense-shunt"; + #io-channel-cells =3D <0>; + io-channels =3D <&ivy_adc2 1>; + shunt-resistor-micro-ohms =3D <100000000>; + }; + + /* AIN2_MODE - SODIMM 218 */ + ain2_mode_mux_ctrl: mux-controller-1 { + compatible =3D "gpio-mux"; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_gpio6>; + #mux-control-cells =3D <0>; + mux-gpios =3D <&gpio1 8 GPIO_ACTIVE_HIGH>; + }; + + ain2-voltage { + compatible =3D "io-channel-mux"; + channels =3D "ain2_voltage", ""; + io-channels =3D <&ain2_voltage_unmanaged 0>; + io-channel-names =3D "parent"; + mux-controls =3D <&ain2_mode_mux_ctrl>; + settle-time-us =3D <1000>; + }; + + ain2-current { + compatible =3D "io-channel-mux"; + channels =3D "", "ain2_current"; + io-channels =3D <&ain2_current_unmanaged>; + io-channel-names =3D "parent"; + mux-controls =3D <&ain2_mode_mux_ctrl>; + settle-time-us =3D <1000>; + }; + + leds { + compatible =3D "gpio-leds"; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_ivy_leds>; + + /* D7 Blue - SODIMM 30 - LEDs.GPIO1 */ + led-0 { + color =3D ; + default-state =3D "off"; + function =3D LED_FUNCTION_STATUS; + function-enumerator =3D <1>; + gpios =3D <&gpio3 25 GPIO_ACTIVE_HIGH>; + }; + + /* D7 Green - SODIMM 32 - LEDs.GPIO2 */ + led-1 { + color =3D ; + default-state =3D "off"; + function =3D LED_FUNCTION_STATUS; + function-enumerator =3D <1>; + gpios =3D <&gpio3 22 GPIO_ACTIVE_HIGH>; + }; + + /* D7 Red - SODIMM 34 - LEDs.GPIO3 */ + led-2 { + color =3D ; + default-state =3D "off"; + function =3D LED_FUNCTION_STATUS; + function-enumerator =3D <1>; + gpios =3D <&gpio3 19 GPIO_ACTIVE_HIGH>; + }; + + /* D8 Blue - SODIMM 36 - LEDs.GPIO4 */ + led-3 { + color =3D ; + default-state =3D "off"; + function =3D LED_FUNCTION_STATUS; + function-enumerator =3D <2>; + gpios =3D <&gpio4 2 GPIO_ACTIVE_HIGH>; + }; + + /* D8 Green - SODIMM 54 - LEDs.GPIO5 */ + led-4 { + color =3D ; + default-state =3D "off"; + function =3D LED_FUNCTION_STATUS; + function-enumerator =3D <2>; + gpios =3D <&gpio3 1 GPIO_ACTIVE_HIGH>; + }; + + /* D8 Red - SODIMM 44 - LEDs.GPIO6 */ + led-5 { + color =3D ; + default-state =3D "off"; + function =3D LED_FUNCTION_STATUS; + function-enumerator =3D <2>; + gpios =3D <&gpio4 31 GPIO_ACTIVE_HIGH>; + }; + + /* D9 Blue - SODIMM 46 - LEDs.GPIO7 */ + led-6 { + color =3D ; + default-state =3D "off"; + function =3D LED_FUNCTION_STATUS; + function-enumerator =3D <3>; + gpios =3D <&gpio5 01 GPIO_ACTIVE_HIGH>; + }; + + /* D9 Red - SODIMM 48 - LEDs.GPIO8 */ + led-7 { + color =3D ; + default-state =3D "off"; + function =3D LED_FUNCTION_STATUS; + function-enumerator =3D <3>; + gpios =3D <&gpio4 30 GPIO_ACTIVE_HIGH>; + }; + }; + + reg_3v2_ain1: regulator-3v2-ain1 { + compatible =3D "regulator-fixed"; + regulator-max-microvolt =3D <3200000>; + regulator-min-microvolt =3D <3200000>; + regulator-name =3D "+3V2_AIN1"; + }; + + reg_3v2_ain2: regulator-3v2-ain2 { + compatible =3D "regulator-fixed"; + regulator-max-microvolt =3D <3200000>; + regulator-min-microvolt =3D <3200000>; + regulator-name =3D "+3V2_AIN2"; + }; + + /* Ivy Power Supply Input Voltage */ + ivy-input-voltage { + compatible =3D "voltage-divider"; + /* Verdin ADC_1 */ + io-channels =3D <&verdin_som_adc 7>; + full-ohms =3D <204700>; /* 200k + 4.7k */ + output-ohms =3D <4700>; + }; + + ivy-5v-voltage { + compatible =3D "voltage-divider"; + /* Verdin ADC_2 */ + io-channels =3D <&verdin_som_adc 6>; + full-ohms =3D <39000>; /* 27k + 12k */ + output-ohms =3D <12000>; + }; + + ivy-3v3-voltage { + compatible =3D "voltage-divider"; + /* Verdin ADC_3 */ + io-channels =3D <&verdin_som_adc 5>; + full-ohms =3D <54000>; /* 27k + 27k */ + output-ohms =3D <27000>; + }; + + ivy-1v8-voltage { + compatible =3D "voltage-divider"; + /* Verdin ADC_4 */ + io-channels =3D <&verdin_som_adc 4>; + full-ohms =3D <39000>; /* 12k + 27k */ + output-ohms =3D <27000>; + }; +}; + +/* Verdin SPI_1 */ +&ecspi1 { + pinctrl-0 =3D <&pinctrl_ecspi1>, + <&pinctrl_gpio1>, + <&pinctrl_gpio4>; + cs-gpios =3D <&gpio5 9 GPIO_ACTIVE_LOW>, + <&gpio1 0 GPIO_ACTIVE_LOW>, + <&gpio1 6 GPIO_ACTIVE_LOW>; + status =3D "okay"; + + tpm@1 { + compatible =3D "infineon,slb9670", "tcg,tpm_tis-spi"; + reg =3D <1>; + spi-max-frequency =3D <18500000>; + }; + + fram@2 { + compatible =3D "fujitsu,mb85rs256", "atmel,at25"; + reg =3D <2>; + address-width =3D <16>; + size =3D <32768>; + spi-max-frequency =3D <33000000>; + pagesize =3D <1>; + }; +}; + +/* EEPROM on Ivy */ +&eeprom_carrier_board { + status =3D "okay"; +}; + +/* Verdin ETH_1 */ +&eqos { + status =3D "okay"; +}; + +/* Verdin ETH_2 */ +&fec { + phy-handle =3D <ðphy2>; + phy-mode =3D "rgmii-id"; + status =3D "okay"; +}; + +&verdin_eth2_mdio { + ethphy2: ethernet-phy@2 { + reg =3D <2>; + interrupt-parent =3D <&gpio4>; + interrupts =3D <18 IRQ_TYPE_LEVEL_LOW>; + ti,rx-internal-delay =3D ; + ti,tx-internal-delay =3D ; + }; +}; + +/* Verdin CAN_1 */ +&flexcan1 { + status =3D "okay"; +}; + +/* Verdin CAN_2 */ +&flexcan2 { + status =3D "okay"; +}; + +&gpio1 { + gpio-line-names =3D + "", /* 0 */ + "GPIO2", /* Verdin GPIO_2 - SODIMM 208 */ + "", + "", + "", + "GPIO3", /* Verdin GPIO_3 - SODIMM 210 */ + "", + "", + "", + "", + "", + "", /* 10 */ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", /* 20 */ + "", + "", + "", + "", + "", + "", + "", + "", + ""; +}; + +&gpio3 { + gpio-line-names =3D + "", /* 0 */ + "", + "", + "", + "", + "", + "DIG_1", /* SODIMM 56 */ + "DIG_2", /* SODIMM 58 */ + "REL1", /* SODIMM 60 */ + "REL2", /* SODIMM 62 */ + "", /* 10 */ + "", + "", + "", + "REL4", /* SODIMM 66 */ + "", + "REL3", /* SODIMM 64 */ + "", + "", + "", + "", /* 20 */ + "", + "", + "", + "", + "", + "", + "", + "", + ""; +}; + +/* Temperature sensor on Ivy */ +&hwmon_temp { + compatible =3D "ti,tmp1075"; + status =3D "okay"; +}; + +/* Verdin I2C_4 CSI */ +&i2c3 { + status =3D "okay"; + + ivy_adc1: adc@40 { + compatible =3D "ti,ads1119"; + reg =3D <0x40>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_gpio7>; + interrupt-parent =3D <&gpio4>; + interrupts =3D <3 IRQ_TYPE_EDGE_FALLING>; + avdd-supply =3D <®_3v2_ain1>; + dvdd-supply =3D <®_3v2_ain1>; + vref-supply =3D <®_3v2_ain1>; + #address-cells =3D <1>; + #io-channel-cells =3D <1>; + #size-cells =3D <0>; + + /* AIN1 0-33V Voltage Input */ + channel@0 { + reg =3D <0>; + diff-channels =3D <0 1>; + }; + + /* AIN1 0-20mA Current Input */ + channel@1 { + reg =3D <1>; + diff-channels =3D <2 3>; + }; + }; + + ivy_adc2: adc@41 { + compatible =3D "ti,ads1119"; + reg =3D <0x41>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_gpio8>; + interrupt-parent =3D <&gpio4>; + interrupts =3D <1 IRQ_TYPE_EDGE_FALLING>; + avdd-supply =3D <®_3v2_ain2>; + dvdd-supply =3D <®_3v2_ain2>; + vref-supply =3D <®_3v2_ain2>; + #address-cells =3D <1>; + #io-channel-cells =3D <1>; + #size-cells =3D <0>; + + /* AIN2 0-33V Voltage Input */ + channel@0 { + reg =3D <0>; + diff-channels =3D <0 1>; + }; + + /* AIN2 0-20mA Current Input */ + channel@1 { + reg =3D <1>; + diff-channels =3D <2 3>; + }; + }; +}; + +/* Verdin I2C_1 */ +&i2c4 { + status =3D "okay"; +}; + +/* Verdin PCIE_1 */ +&pcie { + status =3D "okay"; +}; + +&pcie_phy { + status =3D "okay"; +}; + +/* Verdin UART_1 */ +&uart1 { + status =3D "okay"; +}; + +/* Verdin UART_2 */ +&uart2 { + linux,rs485-enabled-at-boot-time; + rs485-rx-during-tx; + status =3D "okay"; +}; + +/* Verdin UART_3 */ +&uart3 { + status =3D "okay"; +}; + +/* Verdin USB_1 */ +&usb3_0 { + status =3D "okay"; +}; + +&usb3_phy0 { + status =3D "okay"; +}; + +/* Verdin USB_2 */ +&usb3_1 { + status =3D "okay"; +}; + +&usb3_phy1 { + status =3D "okay"; +}; + +/* Verdin SD_1 */ +&usdhc2 { + status =3D "okay"; +}; + +&iomuxc { + + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pinctrl_gpio2>, <&pinctrl_gpio3>, + <&pinctrl_ivy_dig_inputs>, <&pinctrl_ivy_relays>; + + pinctrl_ivy_dig_inputs: ivydiginputsgrp { + fsl,pins =3D + , /* SODIMM 56 */ + ; /* SODIMM 58 */ + }; + + pinctrl_ivy_leds: ivyledsgrp { + fsl,pins =3D + , /* SODIMM 30 */ + , /* SODIMM 32 */ + , /* SODIMM 34 */ + , /* SODIMM 36 */ + , /* SODIMM 44 */ + , /* SODIMM 46 */ + , /* SODIMM 48 */ + ; /* SODIMM 54 */ + }; + + pinctrl_ivy_relays: ivyrelaysgrp { + fsl,pins =3D + , /* SODIMM 60 */ + , /* SODIMM 62 */ + , /* SODIMM 64 */ + ; /* SODIMM 66 */ + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8mp-verdin-nonwifi-ivy.dts b/= arch/arm64/boot/dts/freescale/imx8mp-verdin-nonwifi-ivy.dts new file mode 100644 index 000000000000..cb49690050ff --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8mp-verdin-nonwifi-ivy.dts @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2024 Toradex + */ + +/dts-v1/; + +#include "imx8mp-verdin.dtsi" +#include "imx8mp-verdin-nonwifi.dtsi" +#include "imx8mp-verdin-ivy.dtsi" + +/ { + model =3D "Toradex Verdin iMX8M Plus on Ivy"; + compatible =3D "toradex,verdin-imx8mp-nonwifi-ivy", + "toradex,verdin-imx8mp-nonwifi", + "toradex,verdin-imx8mp", + "fsl,imx8mp"; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8mp-verdin-wifi-ivy.dts b/arc= h/arm64/boot/dts/freescale/imx8mp-verdin-wifi-ivy.dts new file mode 100644 index 000000000000..22b8fe70b36d --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8mp-verdin-wifi-ivy.dts @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2024 Toradex + */ + +/dts-v1/; + +#include "imx8mp-verdin.dtsi" +#include "imx8mp-verdin-wifi.dtsi" +#include "imx8mp-verdin-ivy.dtsi" + +/ { + model =3D "Toradex Verdin iMX8M Plus WB on Ivy"; + compatible =3D "toradex,verdin-imx8mp-wifi-ivy", + "toradex,verdin-imx8mp-wifi", + "toradex,verdin-imx8mp", + "fsl,imx8mp"; +}; --=20 2.39.5