Hi Rogan,

On Fri, Jun 23, 2023 at 3:46 AM Rogan Dawes <ro...@dawes.za.net> wrote:
>
> Kernel source is available here: 
> https://github.com/winkapp/wink-hub-kernel-public

Ok, I assume that arch/arm/mach-mx28/mx28evk_pins.orig.c is the
original imx28-evk pinmux
and arch/arm/mach-mx28/mx28evk_pins.c contains the specific pinmux for
the imx28-wink-hub-v1 board.

The first thing I noticed is that the duart pins are different between
the two boards.

imx28-wink-hub-v1 uses the I2C0 pads for duart.

Can you try the attached two patches that I generated against 6.1.34?

It is a super minimal device tree for imx28-wink-hub-v1 and should
allow you to boot until it searches for the rootfs.

I am glad you managed to start seeing kernel console using a mainline kernel :-)
From b5554f5f53076985795a716a5208f58c1242de2d Mon Sep 17 00:00:00 2001
From: Fabio Estevam <feste...@gmail.com>
Date: Fri, 23 Jun 2023 09:11:49 -0300
Subject: [PATCH 1/2] ARM: dts: imx28: Add alternate DUART pinmuxing

MX28_PAD_I2C0_SCL and MX28_PAD_I2C0_SDA can be used as DUART pins.

Add such muxing possibility.

This muxing is used on the imx28 wink hub v1 board.

Signed-off-by: Fabio Estevam <feste...@gmail.com>
---
 arch/arm/boot/dts/imx28.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
index 291917b13834..24cd60cf5d4b 100644
--- a/arch/arm/boot/dts/imx28.dtsi
+++ b/arch/arm/boot/dts/imx28.dtsi
@@ -250,6 +250,17 @@ MX28_PAD_I2C0_SDA__DUART_TX
 					fsl,pull-up = <MXS_PULL_DISABLE>;
 				};
 
+				duart_pins_c: duart@2 {
+					reg = <2>;
+					fsl,pinmux-ids = <
+						MX28_PAD_I2C0_SCL__DUART_RX
+						MX28_PAD_I2C0_SDA__DUART_TX
+					>;
+					fsl,drive-strength = <MXS_DRIVE_8mA>;
+					fsl,voltage = <MXS_VOLTAGE_HIGH>;
+					fsl,pull-up = <MXS_PULL_DISABLE>;
+				};
+
 				duart_4pins_a: duart-4pins@0 {
 					reg = <0>;
 					fsl,pinmux-ids = <
-- 
2.34.1

From 2b883c66ec0b5709bd82dc766e164999884b0f09 Mon Sep 17 00:00:00 2001
From: Fabio Estevam <feste...@gmail.com>
Date: Fri, 23 Jun 2023 09:18:41 -0300
Subject: [PATCH 2/2] ARM: dts: imx28-wink-hub-v1: Add minimal support

Add a minimal devicetree support for the imx28-wink-hub-v1, so
that users can start using mainline kernel instead of the old
2.6.35 vendor kernel.

Signed-off-by: Fabio Estevam <feste...@gmail.com>
---
 arch/arm/boot/dts/Makefile              |  1 +
 arch/arm/boot/dts/imx28-wink-hub-v1.dts | 19 +++++++++++++++++++
 2 files changed, 20 insertions(+)
 create mode 100644 arch/arm/boot/dts/imx28-wink-hub-v1.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 6aa7dc4db2fc..82cf9f5c5543 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -843,6 +843,7 @@ dtb-$(CONFIG_ARCH_MXS) += \
 	imx28-sps1.dtb \
 	imx28-ts4600.dtb \
 	imx28-tx28.dtb \
+	imx28-wink-hub-v1.dtb \
 	imx28-xea.dtb
 dtb-$(CONFIG_ARCH_NOMADIK) += \
 	ste-nomadik-s8815.dtb \
diff --git a/arch/arm/boot/dts/imx28-wink-hub-v1.dts b/arch/arm/boot/dts/imx28-wink-hub-v1.dts
new file mode 100644
index 000000000000..7efe5006e75a
--- /dev/null
+++ b/arch/arm/boot/dts/imx28-wink-hub-v1.dts
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+#include "imx28.dtsi"
+/ {
+	model = "i.MX28 Wink Hub v1";
+	compatible = "wink,imx28-wink-hub-v1", "fsl,imx28";
+
+	memory@40000000 {
+		device_type = "memory";
+		reg = <0x40000000 0>; /* will be filled in by U-Boot */
+	};
+};
+
+&duart {
+	pinctrl-names = "default";
+	pinctrl-0 = <&duart_pins_c>;
+	status = "okay";
+};
-- 
2.34.1

Reply via email to