From d46d40474a7e77b1640acd040223af8574ebe5ac Mon Sep 17 00:00:00 2001 From: Philipp Tomsich Date: Wed, 31 May 2017 17:59:30 +0200 Subject: rockchip: video: refactor rk_vop and split RK3288-specific code off To prepare for adding the RK3399 VOP driver (which shares most of its registers and config logic with the RK3228 VOP), this change refactors the driver and splits the RK3288-specific driver off. The changes in detail are: - introduces a data-structure for chip-specific drivers to register features/callbacks with the common driver: at this time, this is limited to a callback for setting the pin polarities (between the VOP and the encoder modules) and a flag to signal 10bit RGB capability - refactors the probing of regulators into a helper function that can take a list of regulator names to probe and autoset - moves the priv data-structure into a (common) header file to be used by the chip-specific drivers to provide base addresses to the common driver - uses a callback into the chip-specific driver to set pin polarities (replacing the direct register accesses previously used) - splits enabling the output (towards an encoder) into a separate help function withint the common driver Signed-off-by: Philipp Tomsich Reviewed-by: Simon Glass --- drivers/video/rockchip/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/video/rockchip/Makefile') diff --git a/drivers/video/rockchip/Makefile b/drivers/video/rockchip/Makefile index cd54b12a4e..9477ad06a0 100644 --- a/drivers/video/rockchip/Makefile +++ b/drivers/video/rockchip/Makefile @@ -7,6 +7,7 @@ ifdef CONFIG_VIDEO_ROCKCHIP obj-y += rk_vop.o +obj-$(CONFIG_ROCKCHIP_RK3288) += rk3288_vop.o obj-$(CONFIG_DISPLAY_ROCKCHIP_EDP) += rk_edp.o obj-$(CONFIG_DISPLAY_ROCKCHIP_LVDS) += rk_lvds.o obj-$(CONFIG_DISPLAY_ROCKCHIP_HDMI) += rk_hdmi.o -- cgit From cc75afc5d75a686b73e8cd5f9fba56f4b087517b Mon Sep 17 00:00:00 2001 From: Philipp Tomsich Date: Wed, 31 May 2017 17:59:31 +0200 Subject: rockchip: video: rk3399: enable HDMI output (from the rk_vop) for the RK3399 This commit adds a driver for the RK3399 VOPs capable and all the necessary plumbing to feed the HDMI encoder. For the VOP-big, this correctly tracks the ability to feed 10bit RGB data to the encoder. Signed-off-by: Philipp Tomsich Reviewed-by: Simon Glass --- drivers/video/rockchip/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/video/rockchip/Makefile') diff --git a/drivers/video/rockchip/Makefile b/drivers/video/rockchip/Makefile index 9477ad06a0..495d5f70fd 100644 --- a/drivers/video/rockchip/Makefile +++ b/drivers/video/rockchip/Makefile @@ -8,6 +8,7 @@ ifdef CONFIG_VIDEO_ROCKCHIP obj-y += rk_vop.o obj-$(CONFIG_ROCKCHIP_RK3288) += rk3288_vop.o +obj-$(CONFIG_ROCKCHIP_RK3399) += rk3399_vop.o obj-$(CONFIG_DISPLAY_ROCKCHIP_EDP) += rk_edp.o obj-$(CONFIG_DISPLAY_ROCKCHIP_LVDS) += rk_lvds.o obj-$(CONFIG_DISPLAY_ROCKCHIP_HDMI) += rk_hdmi.o -- cgit From 147fd3ac5a226e5ff882cdac7687d2352c66b115 Mon Sep 17 00:00:00 2001 From: Philipp Tomsich Date: Wed, 31 May 2017 17:59:33 +0200 Subject: rockchip: video: split RK3288-specific part off from rk_hdmi To prepare for the addition of RK3399 HDMI support, the HDMI driver is refactored and broken into a chip-specific and a generic part. This change adds the internal interfaces, makes common/reusable functions externally visible and splits the RK3288 driver into a separate file. For the probing of regulators, we reuse the infrastructure created during the VOP refactoring... i.e. we simply call into the helper function defined for the VOP. Signed-off-by: Philipp Tomsich Reviewed-by: Simon Glass --- drivers/video/rockchip/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/video/rockchip/Makefile') diff --git a/drivers/video/rockchip/Makefile b/drivers/video/rockchip/Makefile index 495d5f70fd..65d0ed64b8 100644 --- a/drivers/video/rockchip/Makefile +++ b/drivers/video/rockchip/Makefile @@ -11,6 +11,7 @@ obj-$(CONFIG_ROCKCHIP_RK3288) += rk3288_vop.o obj-$(CONFIG_ROCKCHIP_RK3399) += rk3399_vop.o obj-$(CONFIG_DISPLAY_ROCKCHIP_EDP) += rk_edp.o obj-$(CONFIG_DISPLAY_ROCKCHIP_LVDS) += rk_lvds.o -obj-$(CONFIG_DISPLAY_ROCKCHIP_HDMI) += rk_hdmi.o +obj-hdmi-$(CONFIG_ROCKCHIP_RK3288) += rk3288_hdmi.o +obj-$(CONFIG_DISPLAY_ROCKCHIP_HDMI) += rk_hdmi.o $(obj-hdmi-y) obj-$(CONFIG_DISPLAY_ROCKCHIP_MIPI) += rk_mipi.o endif -- cgit From ca562b630e97c1c2fe710aab3d6f98cd47adce96 Mon Sep 17 00:00:00 2001 From: Philipp Tomsich Date: Wed, 31 May 2017 17:59:34 +0200 Subject: rockchip: video: rk3399: add HDMI TX support on the RK3399 This commit enables the RK3399 HDMI TX, which is very similar to the one found on the RK3288. As requested by Simon, this splits the HDMI driver into a SOC-specific portion (rk3399_hdmi.c, rk3288_hdmi.c) and a common portion (rk_hdmi.c). Note that the I2C communication for reading the EDID works well with the default settings, but does not with the alternate settings used on the RK3288... this configuration aspect is reflected by the driverdata for the RK3399 driver. Having some sort of DTS-based configuration for the regulator dependencies would be nice for the future, but for now we simply use lists of regulator names (also via driverdata) that we probe. Signed-off-by: Philipp Tomsich Reviewed-by: Simon Glass --- drivers/video/rockchip/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/video/rockchip/Makefile') diff --git a/drivers/video/rockchip/Makefile b/drivers/video/rockchip/Makefile index 65d0ed64b8..872dc0f653 100644 --- a/drivers/video/rockchip/Makefile +++ b/drivers/video/rockchip/Makefile @@ -12,6 +12,7 @@ obj-$(CONFIG_ROCKCHIP_RK3399) += rk3399_vop.o obj-$(CONFIG_DISPLAY_ROCKCHIP_EDP) += rk_edp.o obj-$(CONFIG_DISPLAY_ROCKCHIP_LVDS) += rk_lvds.o obj-hdmi-$(CONFIG_ROCKCHIP_RK3288) += rk3288_hdmi.o +obj-hdmi-$(CONFIG_ROCKCHIP_RK3399) += rk3399_hdmi.o obj-$(CONFIG_DISPLAY_ROCKCHIP_HDMI) += rk_hdmi.o $(obj-hdmi-y) obj-$(CONFIG_DISPLAY_ROCKCHIP_MIPI) += rk_mipi.o endif -- cgit