* [PATCH v2 2/5] pmic: pfuze100: Change error message level to debug
2020-04-17 12:27 [PATCH v2 1/5] wandboard: Fix version detection for mx6q/mx6dl revD1 Fabio Estevam
@ 2020-04-17 12:27 ` Fabio Estevam
2020-04-17 14:51 ` Heiko Schocher
2020-04-19 9:08 ` sbabic at denx.de
2020-04-17 12:27 ` [PATCH v2 3/5] wandboard: Do not print error when PMIC is not present Fabio Estevam
` (5 subsequent siblings)
6 siblings, 2 replies; 16+ messages in thread
From: Fabio Estevam @ 2020-04-17 12:27 UTC (permalink / raw)
To: u-boot
In some cases U-Boot runs the same binary on different board versions.
In wandboard, for example, there are versions with the PFUZE100 PMIC
populated and others without it.
When the PMIC is not present, it is not really useful to get PMIC error,
so change the error message level to debug instead.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
Changes since v1:
- Reworded the commit log for clarity
drivers/power/pmic/pfuze100.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/pmic/pfuze100.c b/drivers/power/pmic/pfuze100.c
index 6cf5f35f0f..db630f3ad0 100644
--- a/drivers/power/pmic/pfuze100.c
+++ b/drivers/power/pmic/pfuze100.c
@@ -41,7 +41,7 @@ static int pfuze100_write(struct udevice *dev, uint reg, const uint8_t *buff,
static int pfuze100_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
{
if (dm_i2c_read(dev, reg, buff, len)) {
- pr_err("read error from device: %p register: %#x!\n", dev, reg);
+ debug("read error from device: %p register: %#x!\n", dev, reg);
return -EIO;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH v2 2/5] pmic: pfuze100: Change error message level to debug
2020-04-17 12:27 ` [PATCH v2 2/5] pmic: pfuze100: Change error message level to debug Fabio Estevam
@ 2020-04-17 14:51 ` Heiko Schocher
2020-04-19 9:08 ` sbabic at denx.de
1 sibling, 0 replies; 16+ messages in thread
From: Heiko Schocher @ 2020-04-17 14:51 UTC (permalink / raw)
To: u-boot
Hello Fabio,
Am 17.04.2020 um 14:27 schrieb Fabio Estevam:
> In some cases U-Boot runs the same binary on different board versions.
>
> In wandboard, for example, there are versions with the PFUZE100 PMIC
> populated and others without it.
>
> When the PMIC is not present, it is not really useful to get PMIC error,
> so change the error message level to debug instead.
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> Changes since v1:
> - Reworded the commit log for clarity
>
> drivers/power/pmic/pfuze100.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Tested-by: Heiko Schocher <hs@denx.de>
Thanks!
bye,
Heiko
>
> diff --git a/drivers/power/pmic/pfuze100.c b/drivers/power/pmic/pfuze100.c
> index 6cf5f35f0f..db630f3ad0 100644
> --- a/drivers/power/pmic/pfuze100.c
> +++ b/drivers/power/pmic/pfuze100.c
> @@ -41,7 +41,7 @@ static int pfuze100_write(struct udevice *dev, uint reg, const uint8_t *buff,
> static int pfuze100_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
> {
> if (dm_i2c_read(dev, reg, buff, len)) {
> - pr_err("read error from device: %p register: %#x!\n", dev, reg);
> + debug("read error from device: %p register: %#x!\n", dev, reg);
> return -EIO;
> }
>
>
--
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] 16+ messages in thread* [PATCH v2 2/5] pmic: pfuze100: Change error message level to debug
2020-04-17 12:27 ` [PATCH v2 2/5] pmic: pfuze100: Change error message level to debug Fabio Estevam
2020-04-17 14:51 ` Heiko Schocher
@ 2020-04-19 9:08 ` sbabic at denx.de
1 sibling, 0 replies; 16+ messages in thread
From: sbabic at denx.de @ 2020-04-19 9:08 UTC (permalink / raw)
To: u-boot
> In some cases U-Boot runs the same binary on different board versions.
> In wandboard, for example, there are versions with the PFUZE100 PMIC
> populated and others without it.
> When the PMIC is not present, it is not really useful to get PMIC error,
> so change the error message level to debug instead.
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> Tested-by: Heiko Schocher <hs@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
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: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 3/5] wandboard: Do not print error when PMIC is not present
2020-04-17 12:27 [PATCH v2 1/5] wandboard: Fix version detection for mx6q/mx6dl revD1 Fabio Estevam
2020-04-17 12:27 ` [PATCH v2 2/5] pmic: pfuze100: Change error message level to debug Fabio Estevam
@ 2020-04-17 12:27 ` Fabio Estevam
2020-04-17 14:51 ` Heiko Schocher
2020-04-19 9:09 ` sbabic at denx.de
2020-04-17 12:27 ` [PATCH v2 4/5] wandboard: Remove CONFIG_DISPLAY_BOARDINFO_LATE Fabio Estevam
` (4 subsequent siblings)
6 siblings, 2 replies; 16+ messages in thread
From: Fabio Estevam @ 2020-04-17 12:27 UTC (permalink / raw)
To: u-boot
On wandboard variants prior to revD1, there is no PMIC populated, so
do not print an error when the reading of the device ID register fails.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
Changes since v1:
- None
board/wandboard/wandboard.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index 90957167b2..7fd60682a5 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -369,7 +369,7 @@ int power_init_board(void)
reg = pmic_reg_read(dev, PFUZE100_DEVICEID);
if (reg < 0) {
- printf("pmic_reg_read() ret %d\n", reg);
+ debug("pmic_reg_read() ret %d\n", reg);
return 0;
}
printf("PMIC: PFUZE100 ID=0x%02x\n", reg);
--
2.17.1
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH v2 3/5] wandboard: Do not print error when PMIC is not present
2020-04-17 12:27 ` [PATCH v2 3/5] wandboard: Do not print error when PMIC is not present Fabio Estevam
@ 2020-04-17 14:51 ` Heiko Schocher
2020-04-19 9:09 ` sbabic at denx.de
1 sibling, 0 replies; 16+ messages in thread
From: Heiko Schocher @ 2020-04-17 14:51 UTC (permalink / raw)
To: u-boot
Hello Fabio,
Am 17.04.2020 um 14:27 schrieb Fabio Estevam:
> On wandboard variants prior to revD1, there is no PMIC populated, so
> do not print an error when the reading of the device ID register fails.
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> Changes since v1:
> - None
>
> board/wandboard/wandboard.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Tested-by: Heiko Schocher <hs@denx.de>
Thanks!
bye,
Heiko
>
> diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
> index 90957167b2..7fd60682a5 100644
> --- a/board/wandboard/wandboard.c
> +++ b/board/wandboard/wandboard.c
> @@ -369,7 +369,7 @@ int power_init_board(void)
>
> reg = pmic_reg_read(dev, PFUZE100_DEVICEID);
> if (reg < 0) {
> - printf("pmic_reg_read() ret %d\n", reg);
> + debug("pmic_reg_read() ret %d\n", reg);
> return 0;
> }
> printf("PMIC: PFUZE100 ID=0x%02x\n", reg);
>
--
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] 16+ messages in thread* [PATCH v2 3/5] wandboard: Do not print error when PMIC is not present
2020-04-17 12:27 ` [PATCH v2 3/5] wandboard: Do not print error when PMIC is not present Fabio Estevam
2020-04-17 14:51 ` Heiko Schocher
@ 2020-04-19 9:09 ` sbabic at denx.de
1 sibling, 0 replies; 16+ messages in thread
From: sbabic at denx.de @ 2020-04-19 9:09 UTC (permalink / raw)
To: u-boot
> On wandboard variants prior to revD1, there is no PMIC populated, so
> do not print an error when the reading of the device ID register fails.
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> Tested-by: Heiko Schocher <hs@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
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: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 4/5] wandboard: Remove CONFIG_DISPLAY_BOARDINFO_LATE
2020-04-17 12:27 [PATCH v2 1/5] wandboard: Fix version detection for mx6q/mx6dl revD1 Fabio Estevam
2020-04-17 12:27 ` [PATCH v2 2/5] pmic: pfuze100: Change error message level to debug Fabio Estevam
2020-04-17 12:27 ` [PATCH v2 3/5] wandboard: Do not print error when PMIC is not present Fabio Estevam
@ 2020-04-17 12:27 ` Fabio Estevam
2020-04-17 14:51 ` Heiko Schocher
2020-04-19 9:09 ` sbabic at denx.de
2020-04-17 12:27 ` [PATCH v2 5/5] wandboard: Print the board version in board_late_init() Fabio Estevam
` (3 subsequent siblings)
6 siblings, 2 replies; 16+ messages in thread
From: Fabio Estevam @ 2020-04-17 12:27 UTC (permalink / raw)
To: u-boot
Since we are using revD1 device tree for all board revisions, the
following can be seen on a revB1 board:
Model: Wandboard i.MX6 Quad Board revD1
Board: Wandboard rev B1
To avoid such confusing messages, disable CONFIG_DISPLAY_BOARDINFO_LATE.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
Changes since v1:
- None
configs/wandboard_defconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/configs/wandboard_defconfig b/configs/wandboard_defconfig
index ee70758f3a..f9a5fe479b 100644
--- a/configs/wandboard_defconfig
+++ b/configs/wandboard_defconfig
@@ -29,7 +29,6 @@ CONFIG_BOOTCOMMAND="run findfdt; run finduuid; run distro_bootcmd"
CONFIG_SYS_CONSOLE_IS_IN_ENV=y
CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
# CONFIG_DISPLAY_BOARDINFO is not set
-CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_BOUNCE_BUFFER=y
CONFIG_BOARD_EARLY_INIT_F=y
CONFIG_SPL_SEPARATE_BSS=y
--
2.17.1
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH v2 4/5] wandboard: Remove CONFIG_DISPLAY_BOARDINFO_LATE
2020-04-17 12:27 ` [PATCH v2 4/5] wandboard: Remove CONFIG_DISPLAY_BOARDINFO_LATE Fabio Estevam
@ 2020-04-17 14:51 ` Heiko Schocher
2020-04-19 9:09 ` sbabic at denx.de
1 sibling, 0 replies; 16+ messages in thread
From: Heiko Schocher @ 2020-04-17 14:51 UTC (permalink / raw)
To: u-boot
Hello Fabio,
Am 17.04.2020 um 14:27 schrieb Fabio Estevam:
> Since we are using revD1 device tree for all board revisions, the
> following can be seen on a revB1 board:
>
> Model: Wandboard i.MX6 Quad Board revD1
> Board: Wandboard rev B1
>
> To avoid such confusing messages, disable CONFIG_DISPLAY_BOARDINFO_LATE.
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> Changes since v1:
> - None
>
> configs/wandboard_defconfig | 1 -
> 1 file changed, 1 deletion(-)
Tested-by: Heiko Schocher <hs@denx.de>
Thanks!
bye,
Heiko
>
> diff --git a/configs/wandboard_defconfig b/configs/wandboard_defconfig
> index ee70758f3a..f9a5fe479b 100644
> --- a/configs/wandboard_defconfig
> +++ b/configs/wandboard_defconfig
> @@ -29,7 +29,6 @@ CONFIG_BOOTCOMMAND="run findfdt; run finduuid; run distro_bootcmd"
> CONFIG_SYS_CONSOLE_IS_IN_ENV=y
> CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
> # CONFIG_DISPLAY_BOARDINFO is not set
> -CONFIG_DISPLAY_BOARDINFO_LATE=y
> CONFIG_BOUNCE_BUFFER=y
> CONFIG_BOARD_EARLY_INIT_F=y
> CONFIG_SPL_SEPARATE_BSS=y
>
--
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] 16+ messages in thread
* [PATCH v2 4/5] wandboard: Remove CONFIG_DISPLAY_BOARDINFO_LATE
2020-04-17 12:27 ` [PATCH v2 4/5] wandboard: Remove CONFIG_DISPLAY_BOARDINFO_LATE Fabio Estevam
2020-04-17 14:51 ` Heiko Schocher
@ 2020-04-19 9:09 ` sbabic at denx.de
1 sibling, 0 replies; 16+ messages in thread
From: sbabic at denx.de @ 2020-04-19 9:09 UTC (permalink / raw)
To: u-boot
> Since we are using revD1 device tree for all board revisions, the
> following can be seen on a revB1 board:
> Model: Wandboard i.MX6 Quad Board revD1
> Board: Wandboard rev B1
> To avoid such confusing messages, disable CONFIG_DISPLAY_BOARDINFO_LATE.
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> Tested-by: Heiko Schocher <hs@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
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: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 5/5] wandboard: Print the board version in board_late_init()
2020-04-17 12:27 [PATCH v2 1/5] wandboard: Fix version detection for mx6q/mx6dl revD1 Fabio Estevam
` (2 preceding siblings ...)
2020-04-17 12:27 ` [PATCH v2 4/5] wandboard: Remove CONFIG_DISPLAY_BOARDINFO_LATE Fabio Estevam
@ 2020-04-17 12:27 ` Fabio Estevam
2020-04-17 14:52 ` Heiko Schocher
2020-04-19 9:09 ` sbabic at denx.de
2020-04-17 14:51 ` [PATCH v2 1/5] wandboard: Fix version detection for mx6q/mx6dl revD1 Heiko Schocher
` (2 subsequent siblings)
6 siblings, 2 replies; 16+ messages in thread
From: Fabio Estevam @ 2020-04-17 12:27 UTC (permalink / raw)
To: u-boot
Since CONFIG_DISPLAY_BOARDINFO_LATE is no longer used, the checkboard()
function is no longer called.
As it is useful to print the board revision, print it inside
board_late_init() instead.
Also, to avoid GPIO errors related to using a GPIO without requesting it,
move the gpio_request(REV_DETECTION, "REV_DETECT") call prior to its
usage.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
Changes since v1:
- Still print the board revision, but on a different location now.
board/wandboard/wandboard.c | 23 +++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index 7fd60682a5..fb2f3c1fd2 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -404,6 +404,7 @@ static const struct boot_mode board_boot_modes[] = {
static bool is_revc1(void)
{
SETUP_IOMUX_PADS(rev_detection_pad);
+ gpio_request(REV_DETECTION, "REV_DETECT");
gpio_direction_input(REV_DETECTION);
if (gpio_get_value(REV_DETECTION))
@@ -442,6 +443,14 @@ int board_late_init(void)
env_set("board_name", "B1");
#endif
setup_iomux_enet();
+
+ if (is_revd1())
+ puts("Board: Wandboard rev D1\n");
+ else if (is_revc1())
+ puts("Board: Wandboard rev C1\n");
+ else
+ puts("Board: Wandboard rev B1\n");
+
return 0;
}
@@ -466,20 +475,6 @@ int board_init(void)
return 0;
}
-int checkboard(void)
-{
- gpio_request(REV_DETECTION, "REV_DETECT");
-
- if (is_revd1())
- puts("Board: Wandboard rev D1\n");
- else if (is_revc1())
- puts("Board: Wandboard rev C1\n");
- else
- puts("Board: Wandboard rev B1\n");
-
- return 0;
-}
-
#ifdef CONFIG_SPL_LOAD_FIT
int board_fit_config_name_match(const char *name)
{
--
2.17.1
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH v2 5/5] wandboard: Print the board version in board_late_init()
2020-04-17 12:27 ` [PATCH v2 5/5] wandboard: Print the board version in board_late_init() Fabio Estevam
@ 2020-04-17 14:52 ` Heiko Schocher
2020-04-19 9:09 ` sbabic at denx.de
1 sibling, 0 replies; 16+ messages in thread
From: Heiko Schocher @ 2020-04-17 14:52 UTC (permalink / raw)
To: u-boot
Hello Fabio,
Am 17.04.2020 um 14:27 schrieb Fabio Estevam:
> Since CONFIG_DISPLAY_BOARDINFO_LATE is no longer used, the checkboard()
> function is no longer called.
>
> As it is useful to print the board revision, print it inside
> board_late_init() instead.
>
> Also, to avoid GPIO errors related to using a GPIO without requesting it,
> move the gpio_request(REV_DETECTION, "REV_DETECT") call prior to its
> usage.
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> Changes since v1:
> - Still print the board revision, but on a different location now.
>
> board/wandboard/wandboard.c | 23 +++++++++--------------
> 1 file changed, 9 insertions(+), 14 deletions(-)
Tested-by: Heiko Schocher <hs@denx.de>
Thanks!
bye,
Heiko
>
> diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
> index 7fd60682a5..fb2f3c1fd2 100644
> --- a/board/wandboard/wandboard.c
> +++ b/board/wandboard/wandboard.c
> @@ -404,6 +404,7 @@ static const struct boot_mode board_boot_modes[] = {
> static bool is_revc1(void)
> {
> SETUP_IOMUX_PADS(rev_detection_pad);
> + gpio_request(REV_DETECTION, "REV_DETECT");
> gpio_direction_input(REV_DETECTION);
>
> if (gpio_get_value(REV_DETECTION))
> @@ -442,6 +443,14 @@ int board_late_init(void)
> env_set("board_name", "B1");
> #endif
> setup_iomux_enet();
> +
> + if (is_revd1())
> + puts("Board: Wandboard rev D1\n");
> + else if (is_revc1())
> + puts("Board: Wandboard rev C1\n");
> + else
> + puts("Board: Wandboard rev B1\n");
> +
> return 0;
> }
>
> @@ -466,20 +475,6 @@ int board_init(void)
> return 0;
> }
>
> -int checkboard(void)
> -{
> - gpio_request(REV_DETECTION, "REV_DETECT");
> -
> - if (is_revd1())
> - puts("Board: Wandboard rev D1\n");
> - else if (is_revc1())
> - puts("Board: Wandboard rev C1\n");
> - else
> - puts("Board: Wandboard rev B1\n");
> -
> - return 0;
> -}
> -
> #ifdef CONFIG_SPL_LOAD_FIT
> int board_fit_config_name_match(const char *name)
> {
>
--
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] 16+ messages in thread* [PATCH v2 5/5] wandboard: Print the board version in board_late_init()
2020-04-17 12:27 ` [PATCH v2 5/5] wandboard: Print the board version in board_late_init() Fabio Estevam
2020-04-17 14:52 ` Heiko Schocher
@ 2020-04-19 9:09 ` sbabic at denx.de
1 sibling, 0 replies; 16+ messages in thread
From: sbabic at denx.de @ 2020-04-19 9:09 UTC (permalink / raw)
To: u-boot
> Since CONFIG_DISPLAY_BOARDINFO_LATE is no longer used, the checkboard()
> function is no longer called.
> As it is useful to print the board revision, print it inside
> board_late_init() instead.
> Also, to avoid GPIO errors related to using a GPIO without requesting it,
> move the gpio_request(REV_DETECTION, "REV_DETECT") call prior to its
> usage.
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> Tested-by: Heiko Schocher <hs@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
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: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 1/5] wandboard: Fix version detection for mx6q/mx6dl revD1
2020-04-17 12:27 [PATCH v2 1/5] wandboard: Fix version detection for mx6q/mx6dl revD1 Fabio Estevam
` (3 preceding siblings ...)
2020-04-17 12:27 ` [PATCH v2 5/5] wandboard: Print the board version in board_late_init() Fabio Estevam
@ 2020-04-17 14:51 ` Heiko Schocher
2020-04-17 16:09 ` Peter Robinson
2020-04-19 9:08 ` sbabic at denx.de
6 siblings, 0 replies; 16+ messages in thread
From: Heiko Schocher @ 2020-04-17 14:51 UTC (permalink / raw)
To: u-boot
Hello Fabio,
Am 17.04.2020 um 14:27 schrieb Fabio Estevam:
> The detection of the revD1 version is based on the presence of the PMIC.
>
> Currently revb1 device trees are used for mx6q/mx6dl variants, which
> do not have the PMIC nodes.
>
> This causes revD1 boards to be incorrectly be detected as revB1.
>
> Fix this issue by using the revd1 device trees, so that the PMIC node can be
> found and then the PMIC can be detected by reading its register ID.
>
> Imported the revd1 device trees from mainline kernel version 5.7-rc1.
>
> Reported-by: Heiko Schocher <hs@denx.de>
> Reported-by: Derek Atkins <derek@ihtfp.com>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> Tested-by: Derek Atkins <derek@ihtfp.com>
> ---
> Changes since v1:
> - Also use the revd1 dtb's inside board_fit_config_name_match(), which
> fixes truncated console output on i.MX6DL wandboard as reported by Heiko.
> - Added Tested-by from Derek as he confirmed it works on a imx6q revd1.
>
> arch/arm/dts/Makefile | 4 ++--
> ...{imx6dl-wandboard-revb1.dts => imx6dl-wandboard-revd1.dts} | 4 ++--
> .../{imx6q-wandboard-revb1.dts => imx6q-wandboard-revd1.dts} | 4 ++--
> board/wandboard/wandboard.c | 4 ++--
> configs/wandboard_defconfig | 4 ++--
> 5 files changed, 10 insertions(+), 10 deletions(-)
> rename arch/arm/dts/{imx6dl-wandboard-revb1.dts => imx6dl-wandboard-revd1.dts} (78%)
> rename arch/arm/dts/{imx6q-wandboard-revb1.dts => imx6q-wandboard-revd1.dts} (80%)
Tested-by: Heiko Schocher <hs@denx.de>
Thanks!
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] 16+ messages in thread* [PATCH v2 1/5] wandboard: Fix version detection for mx6q/mx6dl revD1
2020-04-17 12:27 [PATCH v2 1/5] wandboard: Fix version detection for mx6q/mx6dl revD1 Fabio Estevam
` (4 preceding siblings ...)
2020-04-17 14:51 ` [PATCH v2 1/5] wandboard: Fix version detection for mx6q/mx6dl revD1 Heiko Schocher
@ 2020-04-17 16:09 ` Peter Robinson
2020-04-19 9:08 ` sbabic at denx.de
6 siblings, 0 replies; 16+ messages in thread
From: Peter Robinson @ 2020-04-17 16:09 UTC (permalink / raw)
To: u-boot
On Fri, Apr 17, 2020 at 1:32 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> The detection of the revD1 version is based on the presence of the PMIC.
>
> Currently revb1 device trees are used for mx6q/mx6dl variants, which
> do not have the PMIC nodes.
>
> This causes revD1 boards to be incorrectly be detected as revB1.
>
> Fix this issue by using the revd1 device trees, so that the PMIC node can be
> found and then the PMIC can be detected by reading its register ID.
>
> Imported the revd1 device trees from mainline kernel version 5.7-rc1.
>
> Reported-by: Heiko Schocher <hs@denx.de>
> Reported-by: Derek Atkins <derek@ihtfp.com>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> Tested-by: Derek Atkins <derek@ihtfp.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Series is tested on a B1 and a C1
> ---
> Changes since v1:
> - Also use the revd1 dtb's inside board_fit_config_name_match(), which
> fixes truncated console output on i.MX6DL wandboard as reported by Heiko.
> - Added Tested-by from Derek as he confirmed it works on a imx6q revd1.
>
> arch/arm/dts/Makefile | 4 ++--
> ...{imx6dl-wandboard-revb1.dts => imx6dl-wandboard-revd1.dts} | 4 ++--
> .../{imx6q-wandboard-revb1.dts => imx6q-wandboard-revd1.dts} | 4 ++--
> board/wandboard/wandboard.c | 4 ++--
> configs/wandboard_defconfig | 4 ++--
> 5 files changed, 10 insertions(+), 10 deletions(-)
> rename arch/arm/dts/{imx6dl-wandboard-revb1.dts => imx6dl-wandboard-revd1.dts} (78%)
> rename arch/arm/dts/{imx6q-wandboard-revb1.dts => imx6q-wandboard-revd1.dts} (80%)
>
> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> index 820ee9733a..2a71917c92 100644
> --- a/arch/arm/dts/Makefile
> +++ b/arch/arm/dts/Makefile
> @@ -622,7 +622,7 @@ dtb-y += \
> imx6dl-pico.dtb \
> imx6dl-sabreauto.dtb \
> imx6dl-sabresd.dtb \
> - imx6dl-wandboard-revb1.dtb \
> + imx6dl-wandboard-revd1.dtb \
>
> endif
>
> @@ -654,7 +654,7 @@ dtb-y += \
> imx6q-sabrelite.dtb \
> 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-revb1.dts b/arch/arm/dts/imx6dl-wandboard-revd1.dts
> similarity index 78%
> rename from arch/arm/dts/imx6dl-wandboard-revb1.dts
> rename to arch/arm/dts/imx6dl-wandboard-revd1.dts
> index c2946fbaa0..6d1d863c2e 100644
> --- a/arch/arm/dts/imx6dl-wandboard-revb1.dts
> +++ b/arch/arm/dts/imx6dl-wandboard-revd1.dts
> @@ -6,10 +6,10 @@
> */
> /dts-v1/;
> #include "imx6dl.dtsi"
> -#include "imx6qdl-wandboard-revb1.dtsi"
> +#include "imx6qdl-wandboard-revd1.dtsi"
>
> / {
> - model = "Wandboard i.MX6 Dual Lite Board rev B1";
> + model = "Wandboard i.MX6 Dual Lite Board revD1";
> compatible = "wand,imx6dl-wandboard", "fsl,imx6dl";
>
> memory at 10000000 {
> diff --git a/arch/arm/dts/imx6q-wandboard-revb1.dts b/arch/arm/dts/imx6q-wandboard-revd1.dts
> similarity index 80%
> rename from arch/arm/dts/imx6q-wandboard-revb1.dts
> rename to arch/arm/dts/imx6q-wandboard-revd1.dts
> index f6ccbecff9..55331021d8 100644
> --- a/arch/arm/dts/imx6q-wandboard-revb1.dts
> +++ b/arch/arm/dts/imx6q-wandboard-revd1.dts
> @@ -6,10 +6,10 @@
> */
> /dts-v1/;
> #include "imx6q.dtsi"
> -#include "imx6qdl-wandboard-revb1.dtsi"
> +#include "imx6qdl-wandboard-revd1.dtsi"
>
> / {
> - model = "Wandboard i.MX6 Quad Board rev B1";
> + model = "Wandboard i.MX6 Quad Board revD1";
> compatible = "wand,imx6q-wandboard", "fsl,imx6q";
>
> memory at 10000000 {
> diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
> index 5725c5816c..90957167b2 100644
> --- a/board/wandboard/wandboard.c
> +++ b/board/wandboard/wandboard.c
> @@ -484,13 +484,13 @@ int checkboard(void)
> int board_fit_config_name_match(const char *name)
> {
> if (is_mx6dq()) {
> - if (!strcmp(name, "imx6q-wandboard-revb1"))
> + if (!strcmp(name, "imx6q-wandboard-revd1"))
> 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"))
> + if (!strcmp(name, "imx6dl-wandboard-revd1"))
> return 0;
> }
>
> diff --git a/configs/wandboard_defconfig b/configs/wandboard_defconfig
> index 82e517b90f..ee70758f3a 100644
> --- a/configs/wandboard_defconfig
> +++ b/configs/wandboard_defconfig
> @@ -46,8 +46,8 @@ 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_OF_LIST="imx6q-wandboard-revb1 imx6qp-wandboard-revd1 imx6dl-wandboard-revb1"
> +CONFIG_DEFAULT_DEVICE_TREE="imx6dl-wandboard-revd1"
> +CONFIG_OF_LIST="imx6q-wandboard-revd1 imx6qp-wandboard-revd1 imx6dl-wandboard-revd1"
> CONFIG_MULTI_DTB_FIT=y
> CONFIG_ENV_IS_IN_MMC=y
> CONFIG_SYS_RELOC_GD_ENV_ADDR=y
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 16+ messages in thread* [PATCH v2 1/5] wandboard: Fix version detection for mx6q/mx6dl revD1
2020-04-17 12:27 [PATCH v2 1/5] wandboard: Fix version detection for mx6q/mx6dl revD1 Fabio Estevam
` (5 preceding siblings ...)
2020-04-17 16:09 ` Peter Robinson
@ 2020-04-19 9:08 ` sbabic at denx.de
6 siblings, 0 replies; 16+ messages in thread
From: sbabic at denx.de @ 2020-04-19 9:08 UTC (permalink / raw)
To: u-boot
> The detection of the revD1 version is based on the presence of the PMIC.
> Currently revb1 device trees are used for mx6q/mx6dl variants, which
> do not have the PMIC nodes.
> This causes revD1 boards to be incorrectly be detected as revB1.
> Fix this issue by using the revd1 device trees, so that the PMIC node can be
> found and then the PMIC can be detected by reading its register ID.
> Imported the revd1 device trees from mainline kernel version 5.7-rc1.
> Reported-by: Heiko Schocher <hs@denx.de>
> Reported-by: Derek Atkins <derek@ihtfp.com>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> Tested-by: Derek Atkins <derek@ihtfp.com>
> Tested-by: Heiko Schocher <hs@denx.de>
> Tested-by: Peter Robinson <pbrobinson@gmail.com>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
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: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 16+ messages in thread