All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC WIP PATCH v1 0/7] wandboard: add imx6dl rev d1 support
@ 2020-01-14  6:13 Heiko Schocher
  2020-01-14  6:13 ` [RFC WIP PATCH v1 1/7] wandboard: Import the dts files for the other revd1 variants Heiko Schocher
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Heiko Schocher @ 2020-01-14  6:13 UTC (permalink / raw)
  To: u-boot

This series is a RFC for adding support for the wandboard
revision d1 imx6dl boards. The first patch add the Device
tree from linux, the second add the detection for the
wandboard d1 imx6dl and imx6q versions. Both patches
are from Fabio.

Unfortunately this does not work out of the box, as for
the detection of D1 revisions in SPL only the PMIC can be
used. But we have no DM support in SPL on wandboard and adding
it would explod the size of SPL.

Solution:

- reorder board_fit_config_name_match to work correctly
  may can be merged with Fabios 2. patch

- enable CONFIG_DTB_RESELECT so we can detect revision in
  U-Boot before relocation and can reselect the correct
  devicetree.

- set imx6dl-wandboard-revd1 as default devicetree, so we
  have a devicetree which contains the PMIC.

- add u-boot specific devicetree, so i2c and pmic can
  be detected before relocation.

- use in SPL only revision D1 DTB

With this patchset, U-Boot boots on imx6dl revision D1 board
after a soft reset. On hardreset, the PMIC does not respond
on i2c bus ... and rev d1 gets not detected ... this needs
more investigation.

@Fabio (or others): please test, if this patchset does not
  break other board revisions!

Hack: If you need working current U-Boot on imx6dl rev d1
      board, you can use the first 2 patches from this
      patchset and change configuration to:

CONFIG_DEFAULT_DEVICE_TREE="imx6dl-wandboard-revd1"
CONFIG_OF_LIST="imx6dl-wandboard-revd1"

But this works only on imx6dl revision d1 boards.


Fabio Estevam (2):
  wandboard: Import the dts files for the other revd1 variants
  wandboard: Handle the imx6dl and imx6q revd1 boards

Heiko Schocher (5):
  wandboard: reorder board_fit_config_name_match
  wandboard: enable CONFIG_DTB_RESELECT
  wandboard: use imx6dl-wandboard-revd1 as default DTB
  wandboard: add u-boot specific *wandboard-revd1-u-boot.dtsi
  wandboard: in SPL use only D1 DTB

 arch/arm/dts/Makefile                         |  2 +
 .../dts/imx6dl-wandboard-revd1-u-boot.dtsi    | 11 ++++
 arch/arm/dts/imx6dl-wandboard-revd1.dts       | 19 +++++++
 .../arm/dts/imx6q-wandboard-revd1-u-boot.dtsi | 11 ++++
 arch/arm/dts/imx6q-wandboard-revd1.dts        | 23 ++++++++
 board/wandboard/wandboard.c                   | 53 ++++++++++++++++---
 configs/wandboard_defconfig                   |  5 +-
 7 files changed, 115 insertions(+), 9 deletions(-)
 create mode 100644 arch/arm/dts/imx6dl-wandboard-revd1-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6dl-wandboard-revd1.dts
 create mode 100644 arch/arm/dts/imx6q-wandboard-revd1-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6q-wandboard-revd1.dts

-- 
2.24.1

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [RFC WIP PATCH v1 1/7] wandboard: Import the dts files for the other revd1 variants
  2020-01-14  6:13 [RFC WIP PATCH v1 0/7] wandboard: add imx6dl rev d1 support Heiko Schocher
@ 2020-01-14  6:13 ` Heiko Schocher
  2020-01-14  6:13 ` [RFC WIP PATCH v1 2/7] wandboard: Handle the imx6dl and imx6q revd1 boards Heiko Schocher
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Heiko Schocher @ 2020-01-14  6:13 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <festevam@gmail.com>

Import the imx6dl-wandboard-revd1.dts and imx6q-wandboard-revd1.dts
from kernel 5.4.8 so that these variants can also be supported.

Signed-off-by: Fabio Estevam <festevam@gmail.com>

Signed-off-by: Heiko Schocher <hs@denx.de>
---

 arch/arm/dts/Makefile                   |  2 ++
 arch/arm/dts/imx6dl-wandboard-revd1.dts | 19 +++++++++++++++++++
 arch/arm/dts/imx6q-wandboard-revd1.dts  | 23 +++++++++++++++++++++++
 3 files changed, 44 insertions(+)
 create mode 100644 arch/arm/dts/imx6dl-wandboard-revd1.dts
 create mode 100644 arch/arm/dts/imx6q-wandboard-revd1.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 983e235f442..a60e23242fe 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -609,6 +609,7 @@ dtb-y += \
 	imx6dl-sabreauto.dtb \
 	imx6dl-sabresd.dtb \
 	imx6dl-wandboard-revb1.dtb \
+	imx6dl-wandboard-revd1.dtb \
 
 endif
 
@@ -641,6 +642,7 @@ dtb-y += \
 	imx6q-sabresd.dtb \
 	imx6q-tbs2910.dtb \
 	imx6q-wandboard-revb1.dtb \
+	imx6q-wandboard-revd1.dtb \
 	imx6qp-sabreauto.dtb \
 	imx6qp-sabresd.dtb \
 	imx6qp-wandboard-revd1.dtb \
diff --git a/arch/arm/dts/imx6dl-wandboard-revd1.dts b/arch/arm/dts/imx6dl-wandboard-revd1.dts
new file mode 100644
index 00000000000..6d1d863c2e3
--- /dev/null
+++ b/arch/arm/dts/imx6dl-wandboard-revd1.dts
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * Author: Fabio Estevam <fabio.estevam@freescale.com>
+ */
+/dts-v1/;
+#include "imx6dl.dtsi"
+#include "imx6qdl-wandboard-revd1.dtsi"
+
+/ {
+	model = "Wandboard i.MX6 Dual Lite Board revD1";
+	compatible = "wand,imx6dl-wandboard", "fsl,imx6dl";
+
+	memory at 10000000 {
+		device_type = "memory";
+		reg = <0x10000000 0x40000000>;
+	};
+};
diff --git a/arch/arm/dts/imx6q-wandboard-revd1.dts b/arch/arm/dts/imx6q-wandboard-revd1.dts
new file mode 100644
index 00000000000..55331021d80
--- /dev/null
+++ b/arch/arm/dts/imx6q-wandboard-revd1.dts
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * Author: Fabio Estevam <fabio.estevam@freescale.com>
+ */
+/dts-v1/;
+#include "imx6q.dtsi"
+#include "imx6qdl-wandboard-revd1.dtsi"
+
+/ {
+	model = "Wandboard i.MX6 Quad Board revD1";
+	compatible = "wand,imx6q-wandboard", "fsl,imx6q";
+
+	memory at 10000000 {
+		device_type = "memory";
+		reg = <0x10000000 0x80000000>;
+	};
+};
+
+&sata {
+	status = "okay";
+};
-- 
2.24.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [RFC WIP PATCH v1 2/7] wandboard: Handle the imx6dl and imx6q revd1 boards
  2020-01-14  6:13 [RFC WIP PATCH v1 0/7] wandboard: add imx6dl rev d1 support Heiko Schocher
  2020-01-14  6:13 ` [RFC WIP PATCH v1 1/7] wandboard: Import the dts files for the other revd1 variants Heiko Schocher
@ 2020-01-14  6:13 ` Heiko Schocher
  2020-01-14  6:13 ` [RFC WIP PATCH v1 3/7] wandboard: reorder board_fit_config_name_match Heiko Schocher
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Heiko Schocher @ 2020-01-14  6:13 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <festevam@gmail.com>

Currently the only supported revd1 variant is imx6qp.

Add logic for supporting imx6dl and imx6q revd1 boards as well.

Reported-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
---

 board/wandboard/wandboard.c | 16 +++++++++++++---
 configs/wandboard_defconfig |  2 +-
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index f4534dd3dc6..05f36b7f5d5 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -483,12 +483,22 @@ int checkboard(void)
 #ifdef CONFIG_SPL_LOAD_FIT
 int board_fit_config_name_match(const char *name)
 {
+	/* imx6qp wandboard only comes in revd1 flavor */
+	if (is_mx6dqp()) {
+		if (!strcmp(name, "imx6qp-wandboard-revd1"))
+			return 0;
+	}
+
+	if (is_mx6dq() && is_revd1()) {
+		if (!strcmp(name, "imx6q-wandboard-revd1"))
+			return 0;
+	} else if ((is_mx6dl() || is_mx6solo()) && is_revd1()) {
+		if (!strcmp(name, "imx6dl-wandboard-revd1"))
+			return 0;
+	}
 	if (is_mx6dq()) {
 		if (!strcmp(name, "imx6q-wandboard-revb1"))
 			return 0;
-	} else if (is_mx6dqp()) {
-		if (!strcmp(name, "imx6qp-wandboard-revd1"))
-			return 0;
 	} else if (is_mx6dl() || is_mx6solo()) {
 		if (!strcmp(name, "imx6dl-wandboard-revb1"))
 			return 0;
diff --git a/configs/wandboard_defconfig b/configs/wandboard_defconfig
index ca564c59b80..d6bde4bf28b 100644
--- a/configs/wandboard_defconfig
+++ b/configs/wandboard_defconfig
@@ -43,7 +43,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="imx6dl-wandboard-revb1"
-CONFIG_OF_LIST="imx6q-wandboard-revb1 imx6qp-wandboard-revd1 imx6dl-wandboard-revb1"
+CONFIG_OF_LIST="imx6q-wandboard-revb1 imx6qp-wandboard-revd1 imx6dl-wandboard-revb1 imx6q-wandboard-revd1 imx6dl-wandboard-revd1"
 CONFIG_MULTI_DTB_FIT=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-- 
2.24.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [RFC WIP PATCH v1 3/7] wandboard: reorder board_fit_config_name_match
  2020-01-14  6:13 [RFC WIP PATCH v1 0/7] wandboard: add imx6dl rev d1 support Heiko Schocher
  2020-01-14  6:13 ` [RFC WIP PATCH v1 1/7] wandboard: Import the dts files for the other revd1 variants Heiko Schocher
  2020-01-14  6:13 ` [RFC WIP PATCH v1 2/7] wandboard: Handle the imx6dl and imx6q revd1 boards Heiko Schocher
@ 2020-01-14  6:13 ` Heiko Schocher
  2020-01-14  6:13 ` [RFC WIP PATCH v1 4/7] wandboard: enable CONFIG_DTB_RESELECT Heiko Schocher
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Heiko Schocher @ 2020-01-14  6:13 UTC (permalink / raw)
  To: u-boot

handle different board revisions in one if path.

Without this change if "imx6dl-wandboard-revb1" is passed
before "imx6dl-wandboard-revd1" to this function,
"imx6dl-wandboard-revb1" is detected as the correct version,
on revd1 boards, as "imx6dl-wandboard-revb1" is not dependend
on is_revd1().

Signed-off-by: Heiko Schocher <hs@denx.de>
---

 board/wandboard/wandboard.c | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index 05f36b7f5d5..4cb9bf6f8c2 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -489,19 +489,22 @@ int board_fit_config_name_match(const char *name)
 			return 0;
 	}
 
-	if (is_mx6dq() && is_revd1()) {
-		if (!strcmp(name, "imx6q-wandboard-revd1"))
-			return 0;
-	} else if ((is_mx6dl() || is_mx6solo()) && is_revd1()) {
-		if (!strcmp(name, "imx6dl-wandboard-revd1"))
-			return 0;
-	}
-	if (is_mx6dq()) {
-		if (!strcmp(name, "imx6q-wandboard-revb1"))
-			return 0;
-	} else if (is_mx6dl() || is_mx6solo()) {
-		if (!strcmp(name, "imx6dl-wandboard-revb1"))
-			return 0;
+	if (is_revd1()) {
+		if (is_mx6dq()) {
+			if (!strcmp(name, "imx6q-wandboard-revd1"))
+				return 0;
+		} else if (is_mx6dl() || is_mx6solo()) {
+			if (!strcmp(name, "imx6dl-wandboard-revd1"))
+				return 0;
+		}
+	} else {
+		if (is_mx6dq()) {
+			if (!strcmp(name, "imx6q-wandboard-revb1"))
+				return 0;
+		} else if (is_mx6dl() || is_mx6solo()) {
+			if (!strcmp(name, "imx6dl-wandboard-revb1"))
+				return 0;
+		}
 	}
 
 	return -EINVAL;
-- 
2.24.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [RFC WIP PATCH v1 4/7] wandboard: enable CONFIG_DTB_RESELECT
  2020-01-14  6:13 [RFC WIP PATCH v1 0/7] wandboard: add imx6dl rev d1 support Heiko Schocher
                   ` (2 preceding siblings ...)
  2020-01-14  6:13 ` [RFC WIP PATCH v1 3/7] wandboard: reorder board_fit_config_name_match Heiko Schocher
@ 2020-01-14  6:13 ` Heiko Schocher
  2020-01-14  6:13 ` [RFC WIP PATCH v1 5/7] wandboard: use imx6dl-wandboard-revd1 as default DTB Heiko Schocher
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Heiko Schocher @ 2020-01-14  6:13 UTC (permalink / raw)
  To: u-boot

we have to reselect the DTB, as we need to start
with DTB for revision D1 boards, as there is
a PMIC which is not on other board revisions.
If we do not find the PMIC, we are not on D1
revision board.

Signed-off-by: Heiko Schocher <hs@denx.de>
---

 board/wandboard/wandboard.c | 21 +++++++++++++++++++++
 configs/wandboard_defconfig |  1 +
 2 files changed, 22 insertions(+)

diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index 4cb9bf6f8c2..ae4ad765a83 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -510,3 +510,24 @@ int board_fit_config_name_match(const char *name)
 	return -EINVAL;
 }
 #endif
+
+#if !defined(CONFIG_SPL_BUILD)
+#ifdef CONFIG_DTB_RESELECT
+/*
+ * we have to reselect the DTB, as we need to start
+ * with DTB for revision D1 boards, as there is
+ * a PMIC which is not on other board revisions.
+ * If we do not find the PMIC, we are not on D1
+ * revision board.
+ */
+int embedded_dtb_select(void)
+{
+	int rescan;
+
+	power_init_board();
+	fdtdec_resetup(&rescan);
+
+	return 0;
+}
+#endif
+#endif
diff --git a/configs/wandboard_defconfig b/configs/wandboard_defconfig
index d6bde4bf28b..b8ed143ee99 100644
--- a/configs/wandboard_defconfig
+++ b/configs/wandboard_defconfig
@@ -44,6 +44,7 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="imx6dl-wandboard-revb1"
 CONFIG_OF_LIST="imx6q-wandboard-revb1 imx6qp-wandboard-revd1 imx6dl-wandboard-revb1 imx6q-wandboard-revd1 imx6dl-wandboard-revd1"
+CONFIG_DTB_RESELECT=y
 CONFIG_MULTI_DTB_FIT=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-- 
2.24.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [RFC WIP PATCH v1 5/7] wandboard: use imx6dl-wandboard-revd1 as default DTB
  2020-01-14  6:13 [RFC WIP PATCH v1 0/7] wandboard: add imx6dl rev d1 support Heiko Schocher
                   ` (3 preceding siblings ...)
  2020-01-14  6:13 ` [RFC WIP PATCH v1 4/7] wandboard: enable CONFIG_DTB_RESELECT Heiko Schocher
@ 2020-01-14  6:13 ` Heiko Schocher
  2020-01-14  6:13 ` [RFC WIP PATCH v1 6/7] wandboard: add u-boot specific *wandboard-revd1-u-boot.dtsi Heiko Schocher
  2020-01-14  6:13 ` [RFC WIP PATCH v1 7/7] wandboard: in SPL use only D1 DTB Heiko Schocher
  6 siblings, 0 replies; 13+ messages in thread
From: Heiko Schocher @ 2020-01-14  6:13 UTC (permalink / raw)
  To: u-boot

we detect revision D1 board by searching for pmic,
as revision D1 only has a pmic on board. For this
we need to have pmic in DTB, so use

imx6dl-wandboard-revd1

as default device tree, not imx6dl-wandboard-revb1

Signed-off-by: Heiko Schocher <hs@denx.de>
---

 configs/wandboard_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configs/wandboard_defconfig b/configs/wandboard_defconfig
index b8ed143ee99..6f3d413f66a 100644
--- a/configs/wandboard_defconfig
+++ b/configs/wandboard_defconfig
@@ -42,7 +42,7 @@ CONFIG_CMD_BMP=y
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_OF_CONTROL=y
-CONFIG_DEFAULT_DEVICE_TREE="imx6dl-wandboard-revb1"
+CONFIG_DEFAULT_DEVICE_TREE="imx6dl-wandboard-revd1"
 CONFIG_OF_LIST="imx6q-wandboard-revb1 imx6qp-wandboard-revd1 imx6dl-wandboard-revb1 imx6q-wandboard-revd1 imx6dl-wandboard-revd1"
 CONFIG_DTB_RESELECT=y
 CONFIG_MULTI_DTB_FIT=y
-- 
2.24.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [RFC WIP PATCH v1 6/7] wandboard: add u-boot specific *wandboard-revd1-u-boot.dtsi
  2020-01-14  6:13 [RFC WIP PATCH v1 0/7] wandboard: add imx6dl rev d1 support Heiko Schocher
                   ` (4 preceding siblings ...)
  2020-01-14  6:13 ` [RFC WIP PATCH v1 5/7] wandboard: use imx6dl-wandboard-revd1 as default DTB Heiko Schocher
@ 2020-01-14  6:13 ` Heiko Schocher
  2020-01-15 19:52   ` Fabio Estevam
  2020-01-14  6:13 ` [RFC WIP PATCH v1 7/7] wandboard: in SPL use only D1 DTB Heiko Schocher
  6 siblings, 1 reply; 13+ messages in thread
From: Heiko Schocher @ 2020-01-14  6:13 UTC (permalink / raw)
  To: u-boot

we want to access PMIC before relocation, so we need
to add u-boot specific "u-boot,dm-pre-reloc" properties.

Signed-off-by: Heiko Schocher <hs@denx.de>
---

 arch/arm/dts/imx6dl-wandboard-revd1-u-boot.dtsi | 11 +++++++++++
 arch/arm/dts/imx6q-wandboard-revd1-u-boot.dtsi  | 11 +++++++++++
 2 files changed, 22 insertions(+)
 create mode 100644 arch/arm/dts/imx6dl-wandboard-revd1-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6q-wandboard-revd1-u-boot.dtsi

diff --git a/arch/arm/dts/imx6dl-wandboard-revd1-u-boot.dtsi b/arch/arm/dts/imx6dl-wandboard-revd1-u-boot.dtsi
new file mode 100644
index 00000000000..93e88fa1148
--- /dev/null
+++ b/arch/arm/dts/imx6dl-wandboard-revd1-u-boot.dtsi
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0
+//
+// Copyright (C) 2020 Heiko Schocher <hs@denx.de>
+
+&i2c3 {
+	u-boot,dm-pre-reloc;
+};
+
+&pmic {
+	u-boot,dm-pre-reloc;
+};
diff --git a/arch/arm/dts/imx6q-wandboard-revd1-u-boot.dtsi b/arch/arm/dts/imx6q-wandboard-revd1-u-boot.dtsi
new file mode 100644
index 00000000000..93e88fa1148
--- /dev/null
+++ b/arch/arm/dts/imx6q-wandboard-revd1-u-boot.dtsi
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0
+//
+// Copyright (C) 2020 Heiko Schocher <hs@denx.de>
+
+&i2c3 {
+	u-boot,dm-pre-reloc;
+};
+
+&pmic {
+	u-boot,dm-pre-reloc;
+};
-- 
2.24.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [RFC WIP PATCH v1 7/7] wandboard: in SPL use only D1 DTB
  2020-01-14  6:13 [RFC WIP PATCH v1 0/7] wandboard: add imx6dl rev d1 support Heiko Schocher
                   ` (5 preceding siblings ...)
  2020-01-14  6:13 ` [RFC WIP PATCH v1 6/7] wandboard: add u-boot specific *wandboard-revd1-u-boot.dtsi Heiko Schocher
@ 2020-01-14  6:13 ` Heiko Schocher
  2020-01-15 19:54   ` Fabio Estevam
  6 siblings, 1 reply; 13+ messages in thread
From: Heiko Schocher @ 2020-01-14  6:13 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Heiko Schocher <hs@denx.de>
---

 board/wandboard/wandboard.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index ae4ad765a83..6b7210c0992 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -489,7 +489,12 @@ int board_fit_config_name_match(const char *name)
 			return 0;
 	}
 
+#if defined(CONFIG_SPL_BUILD)
+	/* in SPL we use only revision D1 DTB */
+	if (1) {
+#else
 	if (is_revd1()) {
+#endif
 		if (is_mx6dq()) {
 			if (!strcmp(name, "imx6q-wandboard-revd1"))
 				return 0;
-- 
2.24.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [RFC WIP PATCH v1 6/7] wandboard: add u-boot specific *wandboard-revd1-u-boot.dtsi
  2020-01-14  6:13 ` [RFC WIP PATCH v1 6/7] wandboard: add u-boot specific *wandboard-revd1-u-boot.dtsi Heiko Schocher
@ 2020-01-15 19:52   ` Fabio Estevam
  2020-01-16  6:18     ` Heiko Schocher
  0 siblings, 1 reply; 13+ messages in thread
From: Fabio Estevam @ 2020-01-15 19:52 UTC (permalink / raw)
  To: u-boot

Hi Heiko,

On Tue, Jan 14, 2020 at 3:14 AM Heiko Schocher <hs@denx.de> wrote:
>
> we want to access PMIC before relocation, so we need
> to add u-boot specific "u-boot,dm-pre-reloc" properties.
>
> Signed-off-by: Heiko Schocher <hs@denx.de>
> ---
>
>  arch/arm/dts/imx6dl-wandboard-revd1-u-boot.dtsi | 11 +++++++++++
>  arch/arm/dts/imx6q-wandboard-revd1-u-boot.dtsi  | 11 +++++++++++
>  2 files changed, 22 insertions(+)
>  create mode 100644 arch/arm/dts/imx6dl-wandboard-revd1-u-boot.dtsi
>  create mode 100644 arch/arm/dts/imx6q-wandboard-revd1-u-boot.dtsi

The imx6q-wandboard-revd1-u-boot.dtsi is missing.

Thanks

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [RFC WIP PATCH v1 7/7] wandboard: in SPL use only D1 DTB
  2020-01-14  6:13 ` [RFC WIP PATCH v1 7/7] wandboard: in SPL use only D1 DTB Heiko Schocher
@ 2020-01-15 19:54   ` Fabio Estevam
  2020-01-16  6:20     ` Heiko Schocher
  0 siblings, 1 reply; 13+ messages in thread
From: Fabio Estevam @ 2020-01-15 19:54 UTC (permalink / raw)
  To: u-boot

Hi Heiko,

On Tue, Jan 14, 2020 at 3:14 AM Heiko Schocher <hs@denx.de> wrote:

> +#if defined(CONFIG_SPL_BUILD)
> +       /* in SPL we use only revision D1 DTB */
> +       if (1) {
> +#else
>         if (is_revd1()) {
> +#endif

Is there a way to improve is_revd1() so that it can call i2c_probe()
and detect whether the PMIC is present or not?

Thanks

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [RFC WIP PATCH v1 6/7] wandboard: add u-boot specific *wandboard-revd1-u-boot.dtsi
  2020-01-15 19:52   ` Fabio Estevam
@ 2020-01-16  6:18     ` Heiko Schocher
  2020-01-17 22:52       ` Fabio Estevam
  0 siblings, 1 reply; 13+ messages in thread
From: Heiko Schocher @ 2020-01-16  6:18 UTC (permalink / raw)
  To: u-boot

Hello Fabio,

Am 15.01.2020 um 20:52 schrieb Fabio Estevam:
> Hi Heiko,
> 
> On Tue, Jan 14, 2020 at 3:14 AM Heiko Schocher <hs@denx.de> wrote:
>>
>> we want to access PMIC before relocation, so we need
>> to add u-boot specific "u-boot,dm-pre-reloc" properties.
>>
>> Signed-off-by: Heiko Schocher <hs@denx.de>
>> ---
>>
>>   arch/arm/dts/imx6dl-wandboard-revd1-u-boot.dtsi | 11 +++++++++++
>>   arch/arm/dts/imx6q-wandboard-revd1-u-boot.dtsi  | 11 +++++++++++
>>   2 files changed, 22 insertions(+)
>>   create mode 100644 arch/arm/dts/imx6dl-wandboard-revd1-u-boot.dtsi
>>   create mode 100644 arch/arm/dts/imx6q-wandboard-revd1-u-boot.dtsi
> 
> The imx6q-wandboard-revd1-u-boot.dtsi is missing.

Ah, ok, I can add it ... wait for your testing results.

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [RFC WIP PATCH v1 7/7] wandboard: in SPL use only D1 DTB
  2020-01-15 19:54   ` Fabio Estevam
@ 2020-01-16  6:20     ` Heiko Schocher
  0 siblings, 0 replies; 13+ messages in thread
From: Heiko Schocher @ 2020-01-16  6:20 UTC (permalink / raw)
  To: u-boot

Hello Fabio,

Am 15.01.2020 um 20:54 schrieb Fabio Estevam:
> Hi Heiko,
> 
> On Tue, Jan 14, 2020 at 3:14 AM Heiko Schocher <hs@denx.de> wrote:
> 
>> +#if defined(CONFIG_SPL_BUILD)
>> +       /* in SPL we use only revision D1 DTB */
>> +       if (1) {
>> +#else
>>          if (is_revd1()) {
>> +#endif
> 
> Is there a way to improve is_revd1() so that it can call i2c_probe()
> and detect whether the PMIC is present or not?

It is WIP so maybe yes ;-)

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [RFC WIP PATCH v1 6/7] wandboard: add u-boot specific *wandboard-revd1-u-boot.dtsi
  2020-01-16  6:18     ` Heiko Schocher
@ 2020-01-17 22:52       ` Fabio Estevam
  0 siblings, 0 replies; 13+ messages in thread
From: Fabio Estevam @ 2020-01-17 22:52 UTC (permalink / raw)
  To: u-boot

Hi Heiko,

On Thu, Jan 16, 2020 at 3:18 AM Heiko Schocher <hs@denx.de> wrote:

> Ah, ok, I can add it ... wait for your testing results.

I haven't had a chance to test this series, sorry, but after thinking
more about it I would prefer to test an improved version of this
series because:

1. is_revd1() needs to be done in SPL (if we manage to fix this, it
seems we would not need some of the patches of this current series)

2. This series still causes issues on your board: "On hardreset, the
PMIC does not respond
on i2c bus"

Thanks

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-01-17 22:52 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-14  6:13 [RFC WIP PATCH v1 0/7] wandboard: add imx6dl rev d1 support Heiko Schocher
2020-01-14  6:13 ` [RFC WIP PATCH v1 1/7] wandboard: Import the dts files for the other revd1 variants Heiko Schocher
2020-01-14  6:13 ` [RFC WIP PATCH v1 2/7] wandboard: Handle the imx6dl and imx6q revd1 boards Heiko Schocher
2020-01-14  6:13 ` [RFC WIP PATCH v1 3/7] wandboard: reorder board_fit_config_name_match Heiko Schocher
2020-01-14  6:13 ` [RFC WIP PATCH v1 4/7] wandboard: enable CONFIG_DTB_RESELECT Heiko Schocher
2020-01-14  6:13 ` [RFC WIP PATCH v1 5/7] wandboard: use imx6dl-wandboard-revd1 as default DTB Heiko Schocher
2020-01-14  6:13 ` [RFC WIP PATCH v1 6/7] wandboard: add u-boot specific *wandboard-revd1-u-boot.dtsi Heiko Schocher
2020-01-15 19:52   ` Fabio Estevam
2020-01-16  6:18     ` Heiko Schocher
2020-01-17 22:52       ` Fabio Estevam
2020-01-14  6:13 ` [RFC WIP PATCH v1 7/7] wandboard: in SPL use only D1 DTB Heiko Schocher
2020-01-15 19:54   ` Fabio Estevam
2020-01-16  6:20     ` Heiko Schocher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.