Add mipi dsi support for rk3288
Subsystems (5)
v7 cover Add mipi dsi support for rk3288
The rk3288 MIPI DSI is a Synopsys DesignWare MIPI DSI host controller IP. This series adds support for a Synopsys DesignWare MIPI DSI host controller DRM driver.
The MIPI DSI feature is tested on rk3288 evb board, backport them to chrome os kernel chrome_v3.14, and it can display normally.
This patchset is base on the patchset from Ying.liu at freescale.com.
<http://www.spinics.net/lists/dri-devel/msg77181.html>
According to the suggestion from Thierry, I have get rid of the bridge, and register the encoder & connecter in drm/rockchip/dw-mipi-dsi.c.
After backport below patches from linux-next, I can merge this serial into Dave's drm-next branch.
94d5d6a0fbf3 clk: rockchip: add an id for rk3288 crypto clk c6d49fbcfcc4 clk: rockchip: add id for mipidsi sclk on rk3288 a2f4c560f18e clk: rockchip: add mipidsi clock on rk3288 69c923743640 ARM: dts: rockchip: correct the name of REG8 for rk3288-evb-act8846 662513a14c9d ARM: dts: rockchip: add 2 regulators for rk3288-evb-act8846 b04061e6599b ARM: dts: rockchip: move the public part to rk3288-evb common
Changes in v7:
- modify the config to tristate for modules build (Mark Yao)
- Pass NULL 'name' to drm_encoder_init() to fix compile err (Mark Yao)
- Move the lcd_en control to act8846 dts
Changes in v6:
- update the document, since the bridge device has been deleted.
- move the mipi_en gate to ockchip_drm_crtc_mode_config
- Remove the atomic feature check (Mark Yao)
- Add atomic API support (Heiko St?bne)
- Do not use bridge driver (Thierry Reding)
- Optimization the phy init sequence
Changes in v5:
- modify the clk name to SCLK_MIPIDSI_24M
- add a blank line befor lcd_en
Changes in v4:
- use clk_round_rate to check the clock rate in vop_crtc_mode_fixup
Changes in v3:
- move dw_mipi_dsi_rockchip.txt to bindings/display/rockchip/
Chris Zhong (5):
drm/rockchip: return a true clock rate to adjusted_mode
Documentation: dt-bindings: Add bindings for rk3288 DW MIPI DSI driver
drm: rockchip: Support Synopsys DW MIPI DSI
ARM: dts: rockchip: add rk3288 mipi_dsi nodes
ARM: dts: rockchip: add support mipi panel tv080wum-nl0
.../display/rockchip/dw_mipi_dsi_rockchip.txt | 60 + arch/arm/boot/dts/rk3288-evb-act8846.dts | 2 + arch/arm/boot/dts/rk3288-evb.dtsi | 12 +- arch/arm/boot/dts/rk3288.dtsi | 39 + drivers/gpu/drm/rockchip/Kconfig | 10 + drivers/gpu/drm/rockchip/Makefile | 1 + drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 1196 ++++++++++++++++++++ drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 8 + 8 files changed, 1327 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt create mode 100644 drivers/gpu/drm/rockchip/dw-mipi-dsi.c
Signature · 1 line
2.6.3
PATCH v7 1/5 drm/rockchip: return a true clock rate to adjusted_mode
Since the mipi dsi driver need to use the clock of vop to make the calculation of Blanking. But sometimes the clock driver can not set a accurate clock_rate for vop, get it by clk_round_rate before mode_set, so we can get the true value.
---
Changes in v7: None
Changes in v6: None
Changes in v5: None
Changes in v4:
- use clk_round_rate to check the clock rate in vop_crtc_mode_fixup
Changes in v3: None
drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/rockchip/rockchip_drm_vop.c +5 -0
@@ -878,9 +878,14 @@ static bool vop_crtc_mode_fixup(struct drm_crtc *crtc,const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) { + struct vop *vop = to_vop(crtc); +if (adjusted_mode->htotal ==0 || adjusted_mode->vtotal ==0 )return false; + adjusted_mode->clock = +clk_round_rate (vop->dclk, mode->clock *1000 ) /1000 ; +return true; }
Signature · 1 line
2.6.3
PATCH v7 2/5 Documentation: dt-bindings: Add bindings for rk3288 DW MIPI DSI driver
In reply to Chris Zhongadd device tree bindings for rk3288 specific Synopsys DW MIPI DSI driver
---
Changes in v7: None
Changes in v6:
- update the document, since the bridge device has been deleted.
Changes in v5: None
Changes in v4: None
Changes in v3:
- move dw_mipi_dsi_rockchip.txt to bindings/display/rockchip/
.../display/rockchip/dw_mipi_dsi_rockchip.txt | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt
Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt new file +60 -0
@@ -0,0 +1,60 @@ +Rockchip specific extensions to the Synopsys Designware MIPI DSI +================================ + +Required properties: +- #address-cells: Should be <1>. +- #size-cells: Should be <0>. +- compatible: "rockchip,rk3288-mipi-dsi", "snps,dw-mipi-dsi". +- reg: Represent the physical address range of the controller. +- interrupts: Represent the controller's interrupt to the CPU(s). +- clocks, clock-names: Phandles to the controller's pll reference + clock(ref) and APB clock(pclk), as described in [1]. +- rockchip,grf: this soc should set GRF regs to mux vopl/vopb. +- ports: contain a port node with endpoint definitions as defined in [2]. + For vopb,set the reg = <0> and set the reg = <1> for vopl. + +[1] Documentation/devicetree/bindings/clock/clock-bindings.txt +[2] Documentation/devicetree/bindings/media/video-interfaces.txt + +Example: + mipi_dsi: mipi at ff960000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "rockchip,rk3288-mipi-dsi", "snps,dw-mipi-dsi"; + reg = <0xff960000 0x4000>; + interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cru SCLK_MIPI_24M>, <&cru PCLK_MIPI_DSI0>; + clock-names = "ref", "pclk"; + rockchip,grf = <&grf>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + + mipi_in: port { + #address-cells = <1>; + #size-cells = <0>; + mipi_in_vopb: endpoint at 0 { + reg = <0>; + remote-endpoint = <&vopb_out_mipi>; + }; + mipi_in_vopl: endpoint at 1 { + reg = <1>; + remote-endpoint = <&vopl_out_mipi>; + }; + }; + }; + + panel { + compatible ="boe,tv080wum-nl0"; + reg = <0>; + + enable-gpios = <&gpio7 3 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&lcd_en>; + backlight = <&backlight>; + status = "okay"; + }; + };
Signature · 1 line
2.6.3
PATCH v7 3/5 drm: rockchip: Support Synopsys DW MIPI DSI
In reply to Chris ZhongAdd support for Synopsys DesignWare MIPI DSI controller which is embedded in the rk3288 SoCs.
---
Changes in v7:
- modify the config to tristate for modules build (Mark Yao)
- Pass NULL 'name' to drm_encoder_init() to fix compile err (Mark Yao)
Changes in v6:
- move the mipi_en gate to ockchip_drm_crtc_mode_config
- Remove the atomic feature check (Mark Yao)
- Add atomic API support (Heiko St?bne)
- Do not use bridge driver (Thierry Reding)
- Optimization the phy init sequence
Changes in v5: None
Changes in v4: None
Changes in v3: None
drivers/gpu/drm/rockchip/Kconfig | 10 + drivers/gpu/drm/rockchip/Makefile | 1 + drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 1196 +++++++++++++++++++++++++++ drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 3 + 4 files changed, 1210 insertions(+) create mode 100644 drivers/gpu/drm/rockchip/dw-mipi-dsi.c
drivers/gpu/drm/rockchip/Kconfig +10 -0
@@ -25,3 +25,13 @@ config ROCKCHIP_DW_HDMI for the Synopsys DesignWare HDMI driver. If you want to enable HDMI on RK3288 based SoC, you should selet this option. + +config ROCKCHIP_DW_MIPI_DSI + tristate "Rockchip specific extensions for Synopsys DW MIPI DSI" + depends on DRM_ROCKCHIP + select DRM_MIPI_DSI + help + This selects support for Rockchip SoC specific extensions + for the Synopsys DesignWare HDMI driver. If you want to + enable MIPI DSI on RK3288 based SoC, you should selet this + option.
drivers/gpu/drm/rockchip/Makefile +1 -0
@@ -6,6 +6,7 @@ rockchipdrm-y := rockchip_drm_drv.o rockchip_drm_fb.o rockchip_drm_fbdev.o \ rockchip_drm_gem.o obj-$(CONFIG_ROCKCHIP_DW_HDMI) += dw_hdmi-rockchip.o +obj-$(CONFIG_ROCKCHIP_DW_MIPI_DSI) += dw-mipi-dsi.o obj-$(CONFIG_DRM_ROCKCHIP) += rockchipdrm.o rockchip_drm_vop.o \ rockchip_vop_reg.o
drivers/gpu/drm/rockchip/dw-mipi-dsi.c new file +1196 -0
1,196 lines not on this page · raw message
drivers/gpu/drm/rockchip/rockchip_drm_vop.c +3 -0
@@ -818,6 +818,9 @@ int rockchip_drm_crtc_mode_config(struct drm_crtc *crtc,case DRM_MODE_CONNECTOR_HDMIA :VOP_CTRL_SET (vop, hdmi_en,1 );break ; +case DRM_MODE_CONNECTOR_DSI : +VOP_CTRL_SET (vop, mipi_en,1 ); +break ;default :DRM_ERROR ("unsupport connector_type[%d]\n" , connector_type);return -EINVAL ;
Signature · 1 line
2.6.3
PATCH v7 4/5 ARM: dts: rockchip: add rk3288 mipi_dsi nodes
In reply to Chris ZhongAdd a mipi_dsi node, and also add mipi_dsi endpoints to vopb and vopl output port nodes.
---
Changes in v7: None
Changes in v6: None
Changes in v5:
- modify the clk name to SCLK_MIPIDSI_24M
Changes in v4: None
Changes in v3: None
arch/arm/boot/dts/rk3288.dtsi | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+)
arch/arm/boot/dts/rk3288.dtsi +39 -0
@@ -800,6 +800,10 @@ reg = <0>; remote-endpoint = <&hdmi_in_vopb>; }; + vopb_out_mipi: endpoint at 2 { + reg = <2>; + remote-endpoint = <&mipi_in_vopb>; + }; }; };
@@ -833,6 +837,10 @@ reg = <0>; remote-endpoint = <&hdmi_in_vopl>; }; + vopl_out_mipi: endpoint at 2 { + reg = <2>; + remote-endpoint = <&mipi_in_vopl>; + }; }; };
@@ -873,6 +881,37 @@ }; }; + mipi_dsi: mipi at ff960000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "rockchip,rk3288-mipi-dsi", "snps,dw-mipi-dsi"; + reg = <0xff960000 0x4000>; + interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cru SCLK_MIPIDSI_24M>, <&cru PCLK_MIPI_DSI0>; + clock-names = "ref", "pclk"; + rockchip,grf = <&grf>; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + + mipi_in: port { + #address-cells = <1>; + #size-cells = <0>; + mipi_in_vopb: endpoint at 0 { + reg = <0>; + remote-endpoint = <&vopb_out_mipi>; + }; + mipi_in_vopl: endpoint at 1 { + reg = <1>; + remote-endpoint = <&vopl_out_mipi>; + }; + }; + }; + }; + gic: interrupt-controller at ffc01000 { compatible = "arm,gic-400"; interrupt-controller;
Signature · 1 line
2.6.3
PATCH v7 5/5 ARM: dts: rockchip: add support mipi panel tv080wum-nl0
In reply to Chris ZhongThis tv080wum-nl0 panel is a mipi panel, it can use in MIPI_TX socket of rk3288 evb board.
---
Changes in v7:
- Move the lcd_en control to act8846 dts
Changes in v6: None
Changes in v5:
- add a blank line befor lcd_en
Changes in v4: None
Changes in v3: None
arch/arm/boot/dts/rk3288-evb-act8846.dts | 2 ++ arch/arm/boot/dts/rk3288-evb.dtsi | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-)
arch/arm/boot/dts/rk3288-evb-act8846.dts +2 -0
@@ -50,6 +50,8 @@ gpio = <&gpio7 3 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&lcd_en>; + regulator-always-on; + regulator-boot-on; regulator-name = "vcc_lcd"; vin-supply = <&vcc_io>; };
arch/arm/boot/dts/rk3288-evb.dtsi +11 -1
@@ -47,7 +47,7 @@ reg = <0x0 0x80000000>; }; - backlight { + backlight: backlight { compatible = "pwm-backlight"; brightness-levels = < 0 1 2 3 4 5 6 7
@@ -183,6 +183,16 @@ status = "okay"; }; +&mipi_dsi { + status = "okay"; + panel { + compatible ="boe,tv080wum-nl0"; + reg = <0>; + backlight = <&backlight>; + status = "okay"; + }; +}; + &sdmmc { bus-width = <4>; cap-mmc-highspeed;
Signature · 1 line
2.6.3
Re: [PATCH v7 3/5] drm: rockchip: Support Synopsys DW MIPI DSI
In reply to Chris ZhongHi Chris
Looks good for me except some tiny issues.
Quoted 12 lines · Chris Zhong
drivers/gpu/drm/rockchip/dw-mipi-dsi.c new file +12
-0+struct dw_mipi_dsi { +struct drm_encoder encoder; +struct drm_connector connector; +struct mipi_dsi_host dsi_host; +struct drm_panel *panel; +struct device *dev; +struct regmap *grf_regmap; +void __iomem *base; + +struct clk *pllref_clk; +struct clk *pclk; +
drivers/gpu/drm/rockchip/dw-mipi-dsi.c line 292
Quoted 10 lines
drivers/gpu/drm/rockchip/dw-mipi-dsi.c new file +10
-0+unsigned int lane_mbps;/* per lane */ +u32 channel; +u32 lanes; +u32 format; +u16 input_div; +u16 feedback_div; +struct drm_display_mode *mode; + +const struct dw_mipi_dsi_plat_data *pdata; +
remove this blank line.
Quoted 2 lines
(quoted diff) +2
-0+}; +
[...]
Quoted 21 lines
drivers/gpu/drm/rockchip/dw-mipi-dsi.c new file +21
-0+static void dw_mipi_dsi_encoder_mode_set (struct drm_encoder *encoder, +struct drm_display_mode *mode, +struct drm_display_mode *adjusted_mode) +{ +struct dw_mipi_dsi *dsi =encoder_to_dsi (encoder); +int ret; + + dsi->mode = adjusted_mode; + + ret =dw_mipi_dsi_get_lane_bps (dsi); +if (ret <0 ) +return ; + +if (clk_prepare_enable (dsi->pclk)) { +dev_err (dsi->dev,"%s: Failed to enable pclk\n" , __func__); +return ; + } + +dw_mipi_dsi_init (dsi); +dw_mipi_dsi_dpi_config (dsi, mode); +dw_mipi_dsi_packet_handler_config (dsi);
drivers/gpu/drm/rockchip/dw-mipi-dsi.c line 847
Quoted 10 lines
drivers/gpu/drm/rockchip/dw-mipi-dsi.c new file +10
-0+dw_mipi_dsi_video_mode_config (dsi); +dw_mipi_dsi_video_packet_config (dsi, mode); +dw_mipi_dsi_command_mode_config (dsi); +dw_mipi_dsi_line_timer_config (dsi); +dw_mipi_dsi_vertical_timing_config (dsi); +dw_mipi_dsi_dphy_timing_config (dsi); +dw_mipi_dsi_dphy_interface_config (dsi); +dw_mipi_dsi_clear_err (dsi); +if (drm_panel_prepare (dsi->panel)) { +dev_err (dsi->dev,"failed to prepare panel\n" );
Don't forget doing clk_disable_unprepare when run into error path.
Quoted 5 lines
drivers/gpu/drm/rockchip/dw-mipi-dsi.c new file +5
-0+return ; + } +clk_disable_unprepare (dsi->pclk); +} +
Signature · 1 line
?ark Yao
PATCH v7 3/5 drm: rockchip: Support Synopsys DW MIPI DSI
Add support for Synopsys DesignWare MIPI DSI controller which is embedded in the rk3288 SoCs.
---
Changes in v7.1:
- make sure disable clk when drm_panel_prepare err (Mark Yao)
Changes in v7:
- modify the config to tristate for modules build (Mark Yao)
- Pass NULL 'name' to drm_encoder_init() to fix compile err (Mark Yao)
Changes in v6:
- move the mipi_en gate to ockchip_drm_crtc_mode_config
- Remove the atomic feature check (Mark Yao)
- Add atomic API support (Heiko St?bne)
- Do not use bridge driver (Thierry Reding)
- Optimization the phy init sequence
Changes in v5: None
Changes in v4: None
Changes in v3: None
drivers/gpu/drm/rockchip/Kconfig | 10 + drivers/gpu/drm/rockchip/Makefile | 1 + drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 1197 +++++++++++++++++++++++++++ drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 3 + 4 files changed, 1211 insertions(+) create mode 100644 drivers/gpu/drm/rockchip/dw-mipi-dsi.c
drivers/gpu/drm/rockchip/Kconfig +10 -0
@@ -25,3 +25,13 @@ config ROCKCHIP_DW_HDMI for the Synopsys DesignWare HDMI driver. If you want to enable HDMI on RK3288 based SoC, you should selet this option. + +config ROCKCHIP_DW_MIPI_DSI + tristate "Rockchip specific extensions for Synopsys DW MIPI DSI" + depends on DRM_ROCKCHIP + select DRM_MIPI_DSI + help + This selects support for Rockchip SoC specific extensions + for the Synopsys DesignWare HDMI driver. If you want to + enable MIPI DSI on RK3288 based SoC, you should selet this + option.
drivers/gpu/drm/rockchip/Makefile +1 -0
@@ -6,6 +6,7 @@ rockchipdrm-y := rockchip_drm_drv.o rockchip_drm_fb.o rockchip_drm_fbdev.o \ rockchip_drm_gem.o obj-$(CONFIG_ROCKCHIP_DW_HDMI) += dw_hdmi-rockchip.o +obj-$(CONFIG_ROCKCHIP_DW_MIPI_DSI) += dw-mipi-dsi.o obj-$(CONFIG_DRM_ROCKCHIP) += rockchipdrm.o rockchip_drm_vop.o \ rockchip_vop_reg.o
drivers/gpu/drm/rockchip/dw-mipi-dsi.c new file +1197 -0
1,197 lines not on this page · raw message
drivers/gpu/drm/rockchip/rockchip_drm_vop.c +3 -0
@@ -818,6 +818,9 @@ int rockchip_drm_crtc_mode_config(struct drm_crtc *crtc,case DRM_MODE_CONNECTOR_HDMIA :VOP_CTRL_SET (vop, hdmi_en,1 );break ; +case DRM_MODE_CONNECTOR_DSI : +VOP_CTRL_SET (vop, mipi_en,1 ); +break ;default :DRM_ERROR ("unsupport connector_type[%d]\n" , connector_type);return -EINVAL ;
Signature · 1 line
2.6.3
PATCH v7 3/5 drm: rockchip: Support Synopsys DW MIPI DSI
In reply to Mark yaoAdd support for Synopsys DesignWare MIPI DSI controller which is embedded in the rk3288 SoCs.
---
Changes in v7.2:
- make sure disable clk when drm_panel_prepare err (Mark Yao)
Changes in v7:
- modify the config to tristate for modules build (Mark Yao)
- Pass NULL 'name' to drm_encoder_init() to fix compile err (Mark Yao)
Changes in v6:
- move the mipi_en gate to ockchip_drm_crtc_mode_config
- Remove the atomic feature check (Mark Yao)
- Add atomic API support (Heiko St?bne)
- Do not use bridge driver (Thierry Reding)
- Optimization the phy init sequence
Changes in v5: None
Changes in v4: None
Changes in v3: None
drivers/gpu/drm/rockchip/Kconfig | 10 + drivers/gpu/drm/rockchip/Makefile | 1 + drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 1194 +++++++++++++++++++++++++++ drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 3 + 4 files changed, 1208 insertions(+) create mode 100644 drivers/gpu/drm/rockchip/dw-mipi-dsi.c
drivers/gpu/drm/rockchip/Kconfig +10 -0
@@ -25,3 +25,13 @@ config ROCKCHIP_DW_HDMI for the Synopsys DesignWare HDMI driver. If you want to enable HDMI on RK3288 based SoC, you should selet this option. + +config ROCKCHIP_DW_MIPI_DSI + tristate "Rockchip specific extensions for Synopsys DW MIPI DSI" + depends on DRM_ROCKCHIP + select DRM_MIPI_DSI + help + This selects support for Rockchip SoC specific extensions + for the Synopsys DesignWare HDMI driver. If you want to + enable MIPI DSI on RK3288 based SoC, you should selet this + option.
drivers/gpu/drm/rockchip/Makefile +1 -0
@@ -6,6 +6,7 @@ rockchipdrm-y := rockchip_drm_drv.o rockchip_drm_fb.o rockchip_drm_fbdev.o \ rockchip_drm_gem.o obj-$(CONFIG_ROCKCHIP_DW_HDMI) += dw_hdmi-rockchip.o +obj-$(CONFIG_ROCKCHIP_DW_MIPI_DSI) += dw-mipi-dsi.o obj-$(CONFIG_DRM_ROCKCHIP) += rockchipdrm.o rockchip_drm_vop.o \ rockchip_vop_reg.o
drivers/gpu/drm/rockchip/dw-mipi-dsi.c new file +1194 -0
1,194 lines not on this page · raw message
drivers/gpu/drm/rockchip/rockchip_drm_vop.c +3 -0
@@ -818,6 +818,9 @@ int rockchip_drm_crtc_mode_config(struct drm_crtc *crtc,case DRM_MODE_CONNECTOR_HDMIA :VOP_CTRL_SET (vop, hdmi_en,1 );break ; +case DRM_MODE_CONNECTOR_DSI : +VOP_CTRL_SET (vop, mipi_en,1 ); +break ;default :DRM_ERROR ("unsupport connector_type[%d]\n" , connector_type);return -EINVAL ;
Signature · 1 line
2.6.3
Quoted 16 lines · Chris Zhong
The rk3288 MIPI DSI is a Synopsys DesignWare MIPI DSI host controller IP. This series adds support for a Synopsys DesignWare MIPI DSI host controller DRM driver.
The MIPI DSI feature is tested on rk3288 evb board, backport them to chrome os kernel chrome_v3.14, and it can display normally.
This patchset is base on the patchset from Ying.liu at freescale.com.
<http://www.spinics.net/lists/dri-devel/msg77181.html>According to the suggestion from Thierry, I have get rid of the bridge, and register the encoder & connecter in
drm/rockchip/dw-mipi-dsi.c.After backport below patches from linux-next, I can merge this serial into Dave's drm-next branch.
Quoted 9 lines
94d5d6a0fbf3clk: rockchip: add an id for rk3288 crypto clkc6d49fbcfcc4clk: rockchip: add id for mipidsi sclk on rk3288a2f4c560f18eclk: rockchip: add mipidsi clock on rk328869c923743640ARM: dts: rockchip: correct the name of REG8 for rk3288-evb-act8846662513a14c9dARM: dts: rockchip: add 2 regulators for rk3288-evb-act8846b04061e6599bARM: dts: rockchip: move the public part to rk3288-evb common
Hi Chris
I had picked following three patches and send a pull-request to Dave
[PATCH v7 1/5] drm/rockchip: return a true clock rate toadjusted_mode
[PATCH v7 2/5] Documentation: dt-bindings: Add bindings for
rk3288 DW MIPI DSI driver
[PATCH v7.2 3/5] drm: rockchip: Support Synopsys DW MIPI DSI
Thanks.
Signature · 1 line
?ark Yao
Re: [PATCH v7 4/5] ARM: dts: rockchip: add rk3288 mipi_dsi nodes
In reply to Chris ZhongAm Mittwoch, 6. Januar 2016, 12:03:56 schrieb Chris Zhong:
Quoted 4 lines
Add a
mipi_dsinode, and also addmipi_dsiendpoints to vopb and vopl output port nodes.Signed-off-by Chris Zhong <[email protected]>
applied to my dts32 branch for 4.6
after moving it to the correct position.
Please make sure to sort nodes by their register addresses in the future.
Thanks
Heiko
Heiko Stuebner
maintainerRe: [PATCH v7 5/5] ARM: dts: rockchip: add support mipi panel tv080wum-nl0
In reply to Chris ZhongHi Chris,
Am Mittwoch, 6. Januar 2016, 12:03:57 schrieb Chris Zhong:
Quoted 4 lines
This tv080wum-nl0 panel is a mipi panel, it can use in
MIPI_TXsocket of rk3288 evb board.Signed-off-by Chris Zhong <[email protected]>
[...]
arch/arm/boot/dts/rk3288-evb-act8846.dts line 54
Quoted 10 lines
(quoted diff) +0
-0
b/arch/arm/boot/dts/rk3288-evb-act8846.dtsindex e662147..7d5475b 100644arch/arm/boot/dts/rk3288-evb-act8846.dts +2
-0@@ -50,6 +50,8 @@ gpio = <&gpio7 3 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&lcd_en>; + regulator-always-on; + regulator-boot-on;
Is this only needed for the panel itself and can you try to get the panel supplies set up correctly instead in that case please?
Quoted 17 lines
arch/arm/boot/dts/rk3288-evb-act8846.dts +0
-0regulator-name = "vcc_lcd"; vin-supply = <&vcc_io>; };(quoted diff) +0
-0
b/arch/arm/boot/dts/rk3288-evb.dtsiindex 4faabdb..0c91858 100644arch/arm/boot/dts/rk3288-evb.dtsi +1
-1@@ -47,7 +47,7 @@ reg = <0x0 0x80000000>; }; - backlight { + backlight: backlight { compatible = "pwm-backlight"; brightness-levels = < 0 1 2 3 4 5 6 7
arch/arm/boot/dts/rk3288-evb.dtsi line 192
Quoted 10 lines
arch/arm/boot/dts/rk3288-evb.dtsi +7
-0@@ -183,6 +183,16 @@ status = "okay"; }; +&mipi_dsi { + status = "okay"; + panel { + compatible ="boe,tv080wum-nl0"; + reg = <0>; + backlight = <&backlight>; + status = "okay";
in the evb-schematics I see, vcc_lcd as supply for the panel.
So I'd think the panel node here should have a
power-supply = <&vcc_lcd>;
instead of having the always-on above?
Thanks
Heiko
Quoted 6 lines
arch/arm/boot/dts/rk3288-evb.dtsi +3
-0+ }; +}; + &sdmmc { bus-width = <4>; cap-mmc-highspeed;
Re: [PATCH v7 4/5] ARM: dts: rockchip: add rk3288 mipi_dsi nodes
In reply to Heiko StuebnerHi Heiko
Quoted 9 lines · Heiko Stuebner
Am Mittwoch, 6. Januar 2016, 12:03:56 schrieb Chris Zhong:
Quoted 4 lines
Add a
mipi_dsinode, and also addmipi_dsiendpoints to vopb and vopl output port nodes.Signed-off-by Chris Zhong <[email protected]>applied to my dts32 branch for 4.6
after moving it to the correct position.
Please make sure to sort nodes by their register addresses in the future.
Thanks Heiko. Next time I will pay attention.
Quoted 7 lines
Thanks
Heiko
Re: [PATCH v7 5/5] ARM: dts: rockchip: add support mipi panel tv080wum-nl0
In reply to Heiko StuebnerHi Heiko
Quoted 9 lines · Heiko Stuebner
Hi Chris,
Am Mittwoch, 6. Januar 2016, 12:03:57 schrieb Chris Zhong:
Quoted 4 lines
This tv080wum-nl0 panel is a mipi panel, it can use in
MIPI_TXsocket of rk3288 evb board.Signed-off-by Chris Zhong <[email protected]>[...]
Quoted 12 lines
arch/arm/boot/dts/rk3288-evb-act8846.dts line 54
Quoted 10 lines
(quoted diff) +0
-0
b/arch/arm/boot/dts/rk3288-evb-act8846.dtsindex e662147..7d5475b 100644arch/arm/boot/dts/rk3288-evb-act8846.dts +2
-0@@ -50,6 +50,8 @@ gpio = <&gpio7 3 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&lcd_en>; + regulator-always-on; + regulator-boot-on;Is this only needed for the panel itself and can you try to get the panel supplies set up correctly instead in that case please?
It is not only for panel, LCDC_VDD need this supply too. And rk3288-evb-rk808.dts has set this regulator to always on, so I do the same thing in here.
Quoted 48 lines
Quoted 19 lines
arch/arm/boot/dts/rk3288-evb-act8846.dts +0
-0regulator-name = "vcc_lcd"; vin-supply = <&vcc_io>; };(quoted diff) +0
-0
b/arch/arm/boot/dts/rk3288-evb.dtsiindex 4faabdb..0c91858 100644arch/arm/boot/dts/rk3288-evb.dtsi +1
-1@@ -47,7 +47,7 @@ reg = <0x0 0x80000000>; }; - backlight { + backlight: backlight { compatible = "pwm-backlight"; brightness-levels = < 0 1 2 3 4 5 6 7arch/arm/boot/dts/rk3288-evb.dtsi line 192
Quoted 10 lines
arch/arm/boot/dts/rk3288-evb.dtsi +7
-0@@ -183,6 +183,16 @@ status = "okay"; }; +&mipi_dsi { + status = "okay"; + panel { + compatible ="boe,tv080wum-nl0"; + reg = <0>; + backlight = <&backlight>; + status = "okay";in the evb-schematics I see,
vcc_lcdas supply for the panel.So I'd think the panel node here should have a
power-supply = <&vcc_lcd>;instead of having the always-on above?
Thanks
HeikoQuoted 6 lines
arch/arm/boot/dts/rk3288-evb.dtsi +3
-0+ }; +}; + &sdmmc { bus-width = <4>; cap-mmc-highspeed;
Heiko Stuebner
maintainerRe: [PATCH v7 5/5] ARM: dts: rockchip: add support mipi panel tv080wum-nl0
Am Mittwoch, 20. Januar 2016, 09:09:03 schrieb Chris Zhong:
Quoted 31 lines
Hi Heiko
Quoted 21 lines · Heiko Stuebner
Hi Chris,
Am Mittwoch, 6. Januar 2016, 12:03:57 schrieb Chris Zhong:
Quoted 4 lines
This tv080wum-nl0 panel is a mipi panel, it can use in
MIPI_TXsocket of rk3288 evb board.Signed-off-by Chris Zhong <[email protected]>[...]
Quoted 11 lines
(quoted diff) +0
-0
b/arch/arm/boot/dts/rk3288-evb-act8846.dtsindex e662147..7d5475b 100644arch/arm/boot/dts/rk3288-evb-act8846.dts +0
-0@@ -50,6 +50,8 @@ gpio = <&gpio7 3 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&lcd_en>;Quoted 6 lines
arch/arm/boot/dts/rk3288-evb-act8846.dts line 54
Quoted 2 lines
arch/arm/boot/dts/rk3288-evb-act8846.dts +2
-0+ regulator-always-on; + regulator-boot-on;Is this only needed for the panel itself and can you try to get the panel
supplies set up correctly instead in that case please?
Quoted 3 lines
It is not only for panel,
LCDC_VDDneed this supply too. Andrk3288-evb-rk808.dtshas set this regulator to always on, so I do the same thing in here.
ok, so we keep the regulator-always-on for now, but could probably still add the supply to the panel as well? That way once vcc_lcd handling is complete in the future, we don't get surprises :-)
I guess I can add that power-supply property myself when applying.
Heiko
Quoted 58 lines
Quoted 58 lines
Quoted 27 lines
arch/arm/boot/dts/rk3288-evb-act8846.dts +0
-0regulator-name = "vcc_lcd";vin-supply = <&vcc_io>; };(quoted diff) +0
-0
b/arch/arm/boot/dts/rk3288-evb.dtsiindex 4faabdb..0c91858 100644arch/arm/boot/dts/rk3288-evb.dtsi +1
-1@@ -47,7 +47,7 @@ reg = <0x0 0x80000000>; }; - backlight { + backlight: backlight {compatible = "pwm-backlight"; brightness-levels = <0 1 2 3 4 5 6 7
arch/arm/boot/dts/rk3288-evb.dtsi +0
-0@@ -183,6 +183,16 @@ status = "okay";arch/arm/boot/dts/rk3288-evb.dtsi line 194
Quoted 10 lines
arch/arm/boot/dts/rk3288-evb.dtsi +7
-0}; +&mipi_dsi { + status = "okay"; + panel { + compatible ="boe,tv080wum-nl0"; + reg = <0>; + backlight = <&backlight>; + status = "okay";in the evb-schematics I see,
vcc_lcdas supply for the panel.So I'd think the panel node here should have a
power-supply = <&vcc_lcd>;instead of having the always-on above?
Thanks
HeikoQuoted 8 lines
arch/arm/boot/dts/rk3288-evb.dtsi +3
-0+ }; +}; +&sdmmc { bus-width = <4>; cap-mmc-highspeed;
Hi,
Quoted 5 lines · Chris Zhong
The rk3288 MIPI DSI is a Synopsys DesignWare MIPI DSI host controller IP. This series adds support for a Synopsys DesignWare MIPI DSI host controller DRM driver.
Quoted 8 lines
The MIPI DSI feature is tested on rk3288 evb board, backport them to chrome os kernel chrome_v3.14, and it can display normally.
This patchset is base on the patchset from Ying.liu at freescale.com.
<http://www.spinics.net/lists/dri-devel/msg77181.html>According to the suggestion from Thierry, I have get rid of the bridge, and register the encoder & connecter in
drm/rockchip/dw-mipi-dsi.c.
I've raised this question too late, but what was the reason to not implement the DSI block as a bridge driver?
The drm/hisilicon IP seems to use a very similar DSI Designware IP (the register offsets seems to be the same). There is a good potential of re-use here by different kms drivers here the way it's already done for DW HDMI and the analogix DP driver that's in review process.
Archit
Quoted 53 lines
After backport below patches from linux-next, I can merge this serial into Dave's drm-next branch.
94d5d6a0fbf3clk: rockchip: add an id for rk3288 crypto clkc6d49fbcfcc4clk: rockchip: add id for mipidsi sclk on rk3288a2f4c560f18eclk: rockchip: add mipidsi clock on rk328869c923743640ARM: dts: rockchip: correct the name of REG8 for rk3288-evb-act8846662513a14c9dARM: dts: rockchip: add 2 regulators for rk3288-evb-act8846b04061e6599bARM: dts: rockchip: move the public part to rk3288-evb commonChanges in v7:
- modify the config to tristate for modules build (Mark Yao)
- Pass NULL 'name' todrm_encoder_init()to fix compile err (Mark Yao)
- Move thelcd_encontrol to act8846 dtsChanges in v6:
- update the document, since the bridge device has been deleted.
- move themipi_engate toockchip_drm_crtc_mode_config
- Remove the atomic feature check (Mark Yao)
- Add atomic API support (Heiko St?bne)
- Do not use bridge driver (Thierry Reding)
- Optimization the phy init sequenceChanges in v5:
- modify the clk name toSCLK_MIPIDSI_24M
- add a blank line beforlcd_enChanges in v4:
- useclk_round_rateto check the clock rate invop_crtc_mode_fixupChanges in v3:
- move dw_mipi_dsi_rockchip.txt to bindings/display/rockchip/Chris Zhong (5):
drm/rockchip: return a true clock rate toadjusted_mode
Documentation: dt-bindings: Add bindings for rk3288 DW MIPI DSI driver
drm: rockchip: Support Synopsys DW MIPI DSI
ARM: dts: rockchip: add rk3288mipi_dsinodes
ARM: dts: rockchip: add support mipi panel tv080wum-nl0.../display/rockchip/dw_mipi_dsi_rockchip.txt | 60 + arch/arm/boot/dts/rk3288-evb-act8846.dts | 2 + arch/arm/boot/dts/rk3288-evb.dtsi | 12 +- arch/arm/boot/dts/rk3288.dtsi | 39 + drivers/gpu/drm/rockchip/Kconfig | 10 + drivers/gpu/drm/rockchip/Makefile | 1 + drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 1196 ++++++++++++++++++++ drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 8 + 8 files changed, 1327 insertions(+), 1 deletion(-)create mode 100644
Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txtcreate mode 100644drivers/gpu/drm/rockchip/dw-mipi-dsi.c
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation
Heiko Stuebner
maintainerHi Archit,
Am Montag, 8. Februar 2016, 15:42:04 schrieb Archit Taneja:
Quoted 8 lines · Chris Zhong
Quoted 7 lines
The rk3288 MIPI DSI is a Synopsys DesignWare MIPI DSI host controller IP. This series adds support for a Synopsys DesignWare MIPI DSI host controller DRM driver.
The MIPI DSI feature is tested on rk3288 evb board, backport them to chrome os kernel chrome_v3.14, and it can display normally.
Quoted 8 lines
Quoted 5 lines
This patchset is base on the patchset from Ying.liu at freescale.com.
<http://www.spinics.net/lists/dri-devel/msg77181.html>According to the suggestion from Thierry, I have get rid of the bridge, and register the encoder & connecter in
drm/rockchip/dw-mipi-dsi.c.I've raised this question too late, but what was the reason to not implement the DSI block as a bridge driver?
There seems to always be some sort of contention about those being bridge drivers - I think I remember Thierry speaking up about that. But I don't remember if any different solution was suggested.
Also as we have seen with current shared IPs (dw-hdmi + analogix-dp) there are always implementation-specific parts and deciding which needs to land where is difficult without the secondary user present.
The first iterations where using a bridge-driver-base for it but I guess it was to much hassle without seeing another user on the horizon.
Quoted 4 lines
The drm/hisilicon IP seems to use a very similar DSI Designware IP (the register offsets seems to be the same). There is a good potential of re-use here by different kms drivers here the way it's already done for DW HDMI and the analogix DP driver that's in review process.
I guess, the second user now gets to do the generalization ;-)
Heiko
Quoted 17 lines · Heiko Stuebner
Hi Archit,
Am Montag, 8. Februar 2016, 15:42:04 schrieb Archit Taneja:
Quoted 14 lines · Chris Zhong
Quoted 12 lines
The rk3288 MIPI DSI is a Synopsys DesignWare MIPI DSI host controller IP. This series adds support for a Synopsys DesignWare MIPI DSI host controller DRM driver.
The MIPI DSI feature is tested on rk3288 evb board, backport them to chrome os kernel chrome_v3.14, and it can display normally.
This patchset is base on the patchset from Ying.liu at freescale.com.
<http://www.spinics.net/lists/dri-devel/msg77181.html>According to the suggestion from Thierry, I have get rid of the bridge, and register the encoder & connecter in
drm/rockchip/dw-mipi-dsi.c.
Quoted 6 lines
Quoted 2 lines
I've raised this question too late, but what was the reason to not implement the DSI block as a bridge driver?
There seems to always be some sort of contention about those being bridge drivers - I think I remember Thierry speaking up about that. But I don't remember if any different solution was suggested.
Well, yeah, these can be considered as encoders too. I guess it's just not very common to have encoder drivers outside of the kms driver, in comparison to bridges.
The advantage of having such shared IPs as bridges is that they can be used by kms drivers that already implement an encoder in the display chain.
Quoted 4 lines
Also as we have seen with current shared IPs (dw-hdmi + analogix-dp) there are always implementation-specific parts and deciding which needs to land where is difficult without the secondary user present.
Yeah, I can imagine it being hard to separate out the implementation specific and core parts.
Quoted 11 lines
The first iterations where using a bridge-driver-base for it but I guess it was to much hassle without seeing another user on the horizon.
Quoted 4 lines
The drm/hisilicon IP seems to use a very similar DSI Designware IP (the register offsets seems to be the same). There is a good potential of re-use here by different kms drivers here the way it's already done for DW HDMI and the analogix DP driver that's in review process.
I guess, the second user now gets to do the generalization ;-)
If not the generalization, then at least an assessment if it's worth the effort or not :)
Archit
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation
Quoted 19 lines · Archit Taneja
Hi,
Quoted 6 lines · Chris Zhong
The rk3288 MIPI DSI is a Synopsys DesignWare MIPI DSI host controller IP. This series adds support for a Synopsys DesignWare MIPI DSI host controller DRM driver.
Quoted 8 lines
The MIPI DSI feature is tested on rk3288 evb board, backport them to chrome os kernel chrome_v3.14, and it can display normally.
This patchset is base on the patchset from [email protected]
<http://www.spinics.net/lists/dri-devel/msg77181.html>According to the suggestion from Thierry, I have get rid of the bridge, and register the encoder & connecter in
drm/rockchip/dw-mipi-dsi.c.
Quoted 7 lines
I've raised this question too late, but what was the reason to not implement the DSI block as a bridge driver?
The drm/hisilicon IP seems to use a very similar DSI Designware IP (the register offsets seems to be the same). There is a good potential of re-use here by different kms drivers here the way it's already done for DW HDMI and the analogix DP driver that's in review process.
yes, Hisilicon's hi6220 SoC use a Designware DSI Controller IP similar to rockchip.
Maybe the version number is different.
I notice this recently when I am doing the upstream of hi6220's DRM driver.
And I have a look at Ying liu's original patches. It seems that it is implemented in bridge.
His patches were sent in the early of last year, I can't get all the background easily.
I wonder why his patches was not accecpted? What's the problem? And why Thierry suggested get rid of bridge?
Thanks,
-xinliang
Quoted 61 lines
Archit
Quoted 52 lines
After backport below patches from linux-next, I can merge this serial into Dave's drm-next branch.
94d5d6a0fbf3clk: rockchip: add an id for rk3288 crypto clkc6d49fbcfcc4clk: rockchip: add id for mipidsi sclk on rk3288a2f4c560f18eclk: rockchip: add mipidsi clock on rk328869c923743640ARM: dts: rockchip: correct the name of REG8 for rk3288-evb-act8846662513a14c9dARM: dts: rockchip: add 2 regulators for rk3288-evb-act8846b04061e6599bARM: dts: rockchip: move the public part to rk3288-evb commonChanges in v7:
- modify the config to tristate for modules build (Mark Yao)
- Pass NULL 'name' todrm_encoder_init()to fix compile err (Mark Yao)
- Move thelcd_encontrol to act8846 dtsChanges in v6:
- update the document, since the bridge device has been deleted.
- move themipi_engate toockchip_drm_crtc_mode_config
- Remove the atomic feature check (Mark Yao)
- Add atomic API support (Heiko Stübne)
- Do not use bridge driver (Thierry Reding)
- Optimization the phy init sequenceChanges in v5:
- modify the clk name toSCLK_MIPIDSI_24M
- add a blank line beforlcd_enChanges in v4:
- useclk_round_rateto check the clock rate invop_crtc_mode_fixupChanges in v3:
- move dw_mipi_dsi_rockchip.txt to bindings/display/rockchip/Chris Zhong (5):
drm/rockchip: return a true clock rate toadjusted_mode
Documentation: dt-bindings: Add bindings for rk3288 DW MIPI DSI driver
drm: rockchip: Support Synopsys DW MIPI DSI
ARM: dts: rockchip: add rk3288mipi_dsinodes
ARM: dts: rockchip: add support mipi panel tv080wum-nl0.../display/rockchip/dw_mipi_dsi_rockchip.txt | 60 + arch/arm/boot/dts/rk3288-evb-act8846.dts | 2 + arch/arm/boot/dts/rk3288-evb.dtsi | 12 +- arch/arm/boot/dts/rk3288.dtsi | 39 + drivers/gpu/drm/rockchip/Kconfig | 10 + drivers/gpu/drm/rockchip/Makefile | 1 + drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 1196 ++++++++++++++++++++ drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 8 + 8 files changed, 1327 insertions(+), 1 deletion(-)Quoted 4 lines
create mode 100644
Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt
create mode 100644drivers/gpu/drm/rockchip/dw-mipi-dsi.c
Quoted 3 lines
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html