From f889491d57ea14dfe57dd74a23a6393e3aad5e5c Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Wed, 17 Jan 2024 13:21:39 +0530 Subject: video: dw_hdmi: Add Vendor PHY handling DW HDMI support Vendor PHY like Rockchip RK3328 Inno HDMI PHY. Extend the vendor phy handling by adding platform phy hooks. Signed-off-by: Jagan Teki Reviewed-by: Neil Armstrong --- include/dw_hdmi.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/dw_hdmi.h b/include/dw_hdmi.h index 8acae3839fb..17bdd2dbf9e 100644 --- a/include/dw_hdmi.h +++ b/include/dw_hdmi.h @@ -534,6 +534,12 @@ struct hdmi_data_info { struct hdmi_vmode video_mode; }; +struct dw_hdmi; + +struct dw_hdmi_phy_ops { + int (*phy_set)(struct dw_hdmi *hdmi, uint mpixelclock); +}; + struct dw_hdmi { ulong ioaddr; const struct hdmi_mpll_config *mpll_cfg; @@ -543,8 +549,8 @@ struct dw_hdmi { u8 reg_io_width; struct hdmi_data_info hdmi_data; struct udevice *ddc_bus; + const struct dw_hdmi_phy_ops *ops; - int (*phy_set)(struct dw_hdmi *hdmi, uint mpixelclock); void (*write_reg)(struct dw_hdmi *hdmi, u8 val, int offset); u8 (*read_reg)(struct dw_hdmi *hdmi, int offset); }; -- cgit v1.2.3 From 5eacb920710364d4c9134886725c3879d89972b1 Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Wed, 17 Jan 2024 13:21:40 +0530 Subject: video: dw_hdmi: Extend the HPD detection HPD detection on some DW HDMI designed SoC's would need to read and setup the HPD status explicitly. So, extend the HPD detection code by adding the dw_hdmi_detect_hpd function and move the default detection code caller there. The new read and setup hdp will integrate the same function in later patches. Signed-off-by: Jagan Teki Reviewed-by: Neil Armstrong --- include/dw_hdmi.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/dw_hdmi.h b/include/dw_hdmi.h index 17bdd2dbf9e..ba2ce5ea7fe 100644 --- a/include/dw_hdmi.h +++ b/include/dw_hdmi.h @@ -562,5 +562,6 @@ void dw_hdmi_phy_init(struct dw_hdmi *hdmi); int dw_hdmi_enable(struct dw_hdmi *hdmi, const struct display_timing *edid); int dw_hdmi_read_edid(struct dw_hdmi *hdmi, u8 *buf, int buf_size); void dw_hdmi_init(struct dw_hdmi *hdmi); +int dw_hdmi_detect_hpd(struct dw_hdmi *hdmi); #endif -- cgit v1.2.3 From 054a0ca8c16a229c76de033b9d3c7375b1e0ed0f Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Wed, 17 Jan 2024 13:21:41 +0530 Subject: video: dw_hdmi: Add read_hpd hook Add support for DW HDMI Read HPD status. Signed-off-by: Jagan Teki Reviewed-by: Neil Armstrong --- include/dw_hdmi.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/dw_hdmi.h b/include/dw_hdmi.h index ba2ce5ea7fe..a1f0e64507d 100644 --- a/include/dw_hdmi.h +++ b/include/dw_hdmi.h @@ -538,6 +538,7 @@ struct dw_hdmi; struct dw_hdmi_phy_ops { int (*phy_set)(struct dw_hdmi *hdmi, uint mpixelclock); + void (*read_hpd)(struct dw_hdmi *hdmi, bool hdp_status); }; struct dw_hdmi { -- cgit v1.2.3 From 25353b5b8b2be4402ec449946235b07670217666 Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Wed, 17 Jan 2024 13:21:42 +0530 Subject: video: dw_hdmi: Add setup_hpd hook Add support for DW HDMI Setup HPD status. Signed-off-by: Jagan Teki Reviewed-by: Neil Armstrong --- include/dw_hdmi.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/dw_hdmi.h b/include/dw_hdmi.h index a1f0e64507d..f4d66edacee 100644 --- a/include/dw_hdmi.h +++ b/include/dw_hdmi.h @@ -539,6 +539,7 @@ struct dw_hdmi; struct dw_hdmi_phy_ops { int (*phy_set)(struct dw_hdmi *hdmi, uint mpixelclock); void (*read_hpd)(struct dw_hdmi *hdmi, bool hdp_status); + void (*setup_hpd)(struct dw_hdmi *hdmi); }; struct dw_hdmi { -- cgit v1.2.3 From cd0b42da7b051210be744fc204af127867cc03cd Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Wed, 17 Jan 2024 13:21:53 +0530 Subject: configs: evb-rk3328: Enable vidconsole for rk3328 Enable video console for Rockchip RK3328. Signed-off-by: Jagan Teki --- include/configs/evb_rk3328.h | 5 +++++ include/configs/rk3328_common.h | 1 + 2 files changed, 6 insertions(+) (limited to 'include') diff --git a/include/configs/evb_rk3328.h b/include/configs/evb_rk3328.h index d10e5b1d2e0..c985080f7b3 100644 --- a/include/configs/evb_rk3328.h +++ b/include/configs/evb_rk3328.h @@ -6,6 +6,11 @@ #ifndef __EVB_RK3328_H #define __EVB_RK3328_H +#define ROCKCHIP_DEVICE_SETTINGS \ + "stdin=serial,usbkbd\0" \ + "stdout=serial,vidconsole\0" \ + "stderr=serial,vidconsole\0" + #include #endif diff --git a/include/configs/rk3328_common.h b/include/configs/rk3328_common.h index e920ec7e5dd..2c40674b224 100644 --- a/include/configs/rk3328_common.h +++ b/include/configs/rk3328_common.h @@ -26,6 +26,7 @@ ENV_MEM_LAYOUT_SETTINGS \ "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ "partitions=" PARTS_DEFAULT \ + ROCKCHIP_DEVICE_SETTINGS \ "boot_targets=" BOOT_TARGETS "\0" #endif -- cgit v1.2.3 From efe1ceec7ef0c2ce2344dbe066fca0d389a0b4f3 Mon Sep 17 00:00:00 2001 From: Devarsh Thakkar Date: Thu, 22 Feb 2024 18:38:10 +0530 Subject: boot: Move framebuffer reservation to separate helper Create separate helper for just reserving framebuffer region without creating or enabling simple-framebuffer node. This is useful for scenarios where user want to preserve the bootloader splash screen till OS boots up and display server gets started without displaying anything else in between and thus not requiring simple-framebuffer. Signed-off-by: Devarsh Thakkar Reviewed-by: Nikhil M Jain --- include/fdt_support.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/fdt_support.h b/include/fdt_support.h index 25600d62f29..4b71b8948d9 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -423,6 +423,8 @@ int arch_fixup_memory_node(void *blob); int fdt_setup_simplefb_node(void *fdt, int node, u64 base_address, u32 width, u32 height, u32 stride, const char *format); +int fdt_add_fb_mem_rsv(void *blob); + int fdt_overlay_apply_verbose(void *fdt, void *fdto); int fdt_valid(struct fdt_header **blobp); -- cgit v1.2.3