[U-Boot] [PATCH 0/2] No need for parade bridge on peach-pi

With current u-boot-samsung HEAD on a peach-pi the following error is printed: exynos_lcd_power_on: ps8625_init() failed
Which is not surprising given that chip does not exist on these boards.
Sjoerd Simons (2): exynos5420: fix compilation without parade video Exynos5800: The Peach-Pi board does not have a Parade video bridge
arch/arm/dts/exynos5800-peach-pi.dts | 5 ----- board/samsung/smdk5420/smdk5420.c | 4 ++++ include/configs/peach-pi.h | 2 -- 3 files changed, 4 insertions(+), 7 deletions(-)

Not all exynos 5420 based devices with an LCD also have a parade LVDS bridge. So make sure compilation doesn't break if CONFIG_LCD is enabled and CONFIG_VIDEO_PARADE is not.
Signed-off-by: Sjoerd Simons sjoerd.simons@collabora.co.uk --- board/samsung/smdk5420/smdk5420.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/board/samsung/smdk5420/smdk5420.c b/board/samsung/smdk5420/smdk5420.c index a691222..f8be401 100644 --- a/board/samsung/smdk5420/smdk5420.c +++ b/board/samsung/smdk5420/smdk5420.c @@ -43,6 +43,7 @@ int exynos_init(void) }
#ifdef CONFIG_LCD +#ifdef CONFIG_VIDEO_PARADE static int has_edp_bridge(void) { int node; @@ -56,6 +57,7 @@ static int has_edp_bridge(void) /* Default is with bridge ic */ return 1; } +#endif
void exynos_lcd_power_on(void) { @@ -83,9 +85,11 @@ void exynos_lcd_power_on(void) gpio_direction_input(EXYNOS5420_GPIO_X26); /* EDP_HPD */ gpio_set_pull(EXYNOS5420_GPIO_X26, S5P_GPIO_PULL_NONE);
+#ifdef CONFIG_VIDEO_PARADE if (has_edp_bridge()) if (parade_init(gd->fdt_blob)) printf("%s: ps8625_init() failed\n", __func__); +#endif }
void exynos_backlight_on(unsigned int onoff)

On Mon, Nov 24, 2014 at 8:45 PM, Sjoerd Simons sjoerd.simons@collabora.co.uk wrote:
Not all exynos 5420 based devices with an LCD also have a parade LVDS bridge. So make sure compilation doesn't break if CONFIG_LCD is enabled and CONFIG_VIDEO_PARADE is not.
Signed-off-by: Sjoerd Simons sjoerd.simons@collabora.co.uk
board/samsung/smdk5420/smdk5420.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/board/samsung/smdk5420/smdk5420.c b/board/samsung/smdk5420/smdk5420.c index a691222..f8be401 100644 --- a/board/samsung/smdk5420/smdk5420.c +++ b/board/samsung/smdk5420/smdk5420.c @@ -43,6 +43,7 @@ int exynos_init(void) }
#ifdef CONFIG_LCD +#ifdef CONFIG_VIDEO_PARADE
I think this is unnecessary.
static int has_edp_bridge(void) { int node; @@ -56,6 +57,7 @@ static int has_edp_bridge(void) /* Default is with bridge ic */ return 1; } +#endif
void exynos_lcd_power_on(void) { @@ -83,9 +85,11 @@ void exynos_lcd_power_on(void) gpio_direction_input(EXYNOS5420_GPIO_X26); /* EDP_HPD */ gpio_set_pull(EXYNOS5420_GPIO_X26, S5P_GPIO_PULL_NONE);
+#ifdef CONFIG_VIDEO_PARADE
How about moving this to some header and modify it like below: #ifdef CONFIG_VIDEO_PARADE int parade_init(const void *blob); #else static inline int parade_init(const void *blob) { return 0; } #endif
if (has_edp_bridge()) if (parade_init(gd->fdt_blob)) printf("%s: ps8625_init() failed\n", __func__);
+#endif }
void exynos_backlight_on(unsigned int onoff)
2.1.3
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Unlike the Peach-Pit board, there is no parade edp to lvds bridge on the Pi. So drop it from the board configuration & device-tree
Signed-off-by: Sjoerd Simons sjoerd.simons@collabora.co.uk --- arch/arm/dts/exynos5800-peach-pi.dts | 5 ----- include/configs/peach-pi.h | 2 -- 2 files changed, 7 deletions(-)
diff --git a/arch/arm/dts/exynos5800-peach-pi.dts b/arch/arm/dts/exynos5800-peach-pi.dts index 8aedf8e..2f9d2db 100644 --- a/arch/arm/dts/exynos5800-peach-pi.dts +++ b/arch/arm/dts/exynos5800-peach-pi.dts @@ -63,11 +63,6 @@ reg = <0x20>; compatible = "maxim,max98090-codec"; }; - - edp-lvds-bridge@48 { - compatible = "parade,ps8625"; - reg = <0x48>; - }; };
sound@3830000 { diff --git a/include/configs/peach-pi.h b/include/configs/peach-pi.h index 8a82402..ff31728 100644 --- a/include/configs/peach-pi.h +++ b/include/configs/peach-pi.h @@ -26,8 +26,6 @@ #define CONFIG_SYS_PROMPT "Peach-Pi # " #define CONFIG_IDENT_STRING " for Peach-Pi"
-#define CONFIG_VIDEO_PARADE - /* Display */ #define CONFIG_LCD #ifdef CONFIG_LCD

Hi Sjoerd,
On 24 November 2014 at 08:15, Sjoerd Simons sjoerd.simons@collabora.co.uk wrote:
Unlike the Peach-Pit board, there is no parade edp to lvds bridge on the Pi. So drop it from the board configuration & device-tree
Signed-off-by: Sjoerd Simons sjoerd.simons@collabora.co.uk
arch/arm/dts/exynos5800-peach-pi.dts | 5 ----- include/configs/peach-pi.h | 2 -- 2 files changed, 7 deletions(-)
diff --git a/arch/arm/dts/exynos5800-peach-pi.dts b/arch/arm/dts/exynos5800-peach-pi.dts index 8aedf8e..2f9d2db 100644 --- a/arch/arm/dts/exynos5800-peach-pi.dts +++ b/arch/arm/dts/exynos5800-peach-pi.dts @@ -63,11 +63,6 @@ reg = <0x20>; compatible = "maxim,max98090-codec"; };
edp-lvds-bridge@48 {
compatible = "parade,ps8625";
reg = <0x48>;
}; }; sound@3830000 {
diff --git a/include/configs/peach-pi.h b/include/configs/peach-pi.h index 8a82402..ff31728 100644 --- a/include/configs/peach-pi.h +++ b/include/configs/peach-pi.h @@ -26,8 +26,6 @@ #define CONFIG_SYS_PROMPT "Peach-Pi # " #define CONFIG_IDENT_STRING " for Peach-Pi"
-#define CONFIG_VIDEO_PARADE
/* Display */ #define CONFIG_LCD
#ifdef CONFIG_LCD
2.1.3
Does it fix the problem if you just remove it from the device tree?
Regards, Simon

On Mon, 2014-11-24 at 09:01 -0700, Simon Glass wrote:
Hi Sjoerd,
On 24 November 2014 at 08:15, Sjoerd Simons sjoerd.simons@collabora.co.uk wrote:
Unlike the Peach-Pit board, there is no parade edp to lvds bridge on the Pi. So drop it from the board configuration & device-tree
Signed-off-by: Sjoerd Simons sjoerd.simons@collabora.co.uk
arch/arm/dts/exynos5800-peach-pi.dts | 5 ----- include/configs/peach-pi.h | 2 -- 2 files changed, 7 deletions(-)
diff --git a/arch/arm/dts/exynos5800-peach-pi.dts b/arch/arm/dts/exynos5800-peach-pi.dts index 8aedf8e..2f9d2db 100644 --- a/arch/arm/dts/exynos5800-peach-pi.dts +++ b/arch/arm/dts/exynos5800-peach-pi.dts @@ -63,11 +63,6 @@ reg = <0x20>; compatible = "maxim,max98090-codec"; };
edp-lvds-bridge@48 {
compatible = "parade,ps8625";
reg = <0x48>;
}; }; sound@3830000 {
diff --git a/include/configs/peach-pi.h b/include/configs/peach-pi.h index 8a82402..ff31728 100644 --- a/include/configs/peach-pi.h +++ b/include/configs/peach-pi.h @@ -26,8 +26,6 @@ #define CONFIG_SYS_PROMPT "Peach-Pi # " #define CONFIG_IDENT_STRING " for Peach-Pi"
-#define CONFIG_VIDEO_PARADE
/* Display */ #define CONFIG_LCD
#ifdef CONFIG_LCD
2.1.3
Does it fix the problem if you just remove it from the device tree?
That should indeed work as well, but i haven't tested it thusfar.
Would you simply like to see that tested, or are you suggesting to keep CONFIG_VIDEO_PARADE around ?

Hi Sjoerd,
On 24 November 2014 at 09:21, Sjoerd Simons sjoerd.simons@collabora.co.uk wrote:
On Mon, 2014-11-24 at 09:01 -0700, Simon Glass wrote:
Hi Sjoerd,
On 24 November 2014 at 08:15, Sjoerd Simons sjoerd.simons@collabora.co.uk wrote:
Unlike the Peach-Pit board, there is no parade edp to lvds bridge on the Pi. So drop it from the board configuration & device-tree
Signed-off-by: Sjoerd Simons sjoerd.simons@collabora.co.uk
arch/arm/dts/exynos5800-peach-pi.dts | 5 ----- include/configs/peach-pi.h | 2 -- 2 files changed, 7 deletions(-)
diff --git a/arch/arm/dts/exynos5800-peach-pi.dts b/arch/arm/dts/exynos5800-peach-pi.dts index 8aedf8e..2f9d2db 100644 --- a/arch/arm/dts/exynos5800-peach-pi.dts +++ b/arch/arm/dts/exynos5800-peach-pi.dts @@ -63,11 +63,6 @@ reg = <0x20>; compatible = "maxim,max98090-codec"; };
edp-lvds-bridge@48 {
compatible = "parade,ps8625";
reg = <0x48>;
}; }; sound@3830000 {
diff --git a/include/configs/peach-pi.h b/include/configs/peach-pi.h index 8a82402..ff31728 100644 --- a/include/configs/peach-pi.h +++ b/include/configs/peach-pi.h @@ -26,8 +26,6 @@ #define CONFIG_SYS_PROMPT "Peach-Pi # " #define CONFIG_IDENT_STRING " for Peach-Pi"
-#define CONFIG_VIDEO_PARADE
/* Display */ #define CONFIG_LCD
#ifdef CONFIG_LCD
2.1.3
Does it fix the problem if you just remove it from the device tree?
That should indeed work as well, but i haven't tested it thusfar.
Would you simply like to see that tested, or are you suggesting to keep CONFIG_VIDEO_PARADE around ?
Some background - I'd like to have an exynos5-dt board config which is used by the various Chromebooks (and perhaps other boards to) where the only difference is the device tree. At present the peach-pi.h file is mostly identical to peach-pit.h, so then we can avoid #ifdefs in the code, etc.
For memory size we can specify it with device tree, although the patch for this has yet to land.
So in general I'm keen for this peach-pi.h file to go away and be replaced with a CONFIG_DEFAULT_DEVICE_TREE line in the defconfig. If all you need to change is the device tree then that is best.
Regards, Simon

On Mon, 2014-11-24 at 09:50 -0700, Simon Glass wrote:
Hi Sjoerd,
On 24 November 2014 at 09:21, Sjoerd Simons sjoerd.simons@collabora.co.uk wrote:
On Mon, 2014-11-24 at 09:01 -0700, Simon Glass wrote:
Does it fix the problem if you just remove it from the device tree?
That should indeed work as well, but i haven't tested it thusfar.
Would you simply like to see that tested, or are you suggesting to keep CONFIG_VIDEO_PARADE around ?
Some background - I'd like to have an exynos5-dt board config which is used by the various Chromebooks (and perhaps other boards to) where the only difference is the device tree. At present the peach-pi.h file is mostly identical to peach-pit.h, so then we can avoid #ifdefs in the code, etc.
That sounds great to me as a goal. However, having to #define CONFIG_VIDEO_PARADE in a board config for an 5420/5800 based device if you also define CONFIG_LCD seems somewhat awkward.
I'll happily admit that i'm not very familiar with u-boot. Is that something that's generally accepted and/or can we define such a dependency in the build system in some way?
For memory size we can specify it with device tree, although the patch for this has yet to land.
So in general I'm keen for this peach-pi.h file to go away and be replaced with a CONFIG_DEFAULT_DEVICE_TREE line in the defconfig. If all you need to change is the device tree then that is best.
I'll respin with just the device-tree change tomorrow (need to run out for the evening) and potentially add a patch which preemptively moves the non-peach-pi specific stuff into exynos5-dt so the pit/pi configs can be their minimal. Thanks for your background info & feedback!

Hi Sjoerd,
On 24 November 2014 at 16:13, Sjoerd Simons sjoerd.simons@collabora.co.uk wrote:
On Mon, 2014-11-24 at 09:50 -0700, Simon Glass wrote:
Hi Sjoerd,
On 24 November 2014 at 09:21, Sjoerd Simons sjoerd.simons@collabora.co.uk wrote:
On Mon, 2014-11-24 at 09:01 -0700, Simon Glass wrote:
Does it fix the problem if you just remove it from the device tree?
That should indeed work as well, but i haven't tested it thusfar.
Would you simply like to see that tested, or are you suggesting to keep CONFIG_VIDEO_PARADE around ?
Some background - I'd like to have an exynos5-dt board config which is used by the various Chromebooks (and perhaps other boards to) where the only difference is the device tree. At present the peach-pi.h file is mostly identical to peach-pit.h, so then we can avoid #ifdefs in the code, etc.
That sounds great to me as a goal. However, having to #define CONFIG_VIDEO_PARADE in a board config for an 5420/5800 based device if you also define CONFIG_LCD seems somewhat awkward.
I'll happily admit that i'm not very familiar with u-boot. Is that something that's generally accepted and/or can we define such a dependency in the build system in some way?
We have traditionally done what you did - i.e. fully specify everything. But I'd like to move to a model where the device tree controls what devices are available, and we have generic boards (like exynos5-dt) where we worry a bit less about image size, etc. It's great for getting people going quickly without having to mess with the code.
For memory size we can specify it with device tree, although the patch for this has yet to land.
So in general I'm keen for this peach-pi.h file to go away and be replaced with a CONFIG_DEFAULT_DEVICE_TREE line in the defconfig. If all you need to change is the device tree then that is best.
I'll respin with just the device-tree change tomorrow (need to run out for the evening) and potentially add a patch which preemptively moves the non-peach-pi specific stuff into exynos5-dt so the pit/pi configs can be their minimal. Thanks for your background info & feedback!
Sounds good. You can include exynos5-dt-common.h which was provided for that purpose. I just haven't got to it yet.
Regards, Simon
participants (3)
-
Ajay kumar
-
Simon Glass
-
Sjoerd Simons