devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/6] Add mipi dsi support for rk3288
@ 2015-12-16 10:10 Chris Zhong
  2015-12-16 10:10 ` [PATCH v6 3/6] Documentation: dt-bindings: Add bindings for rk3288 DW MIPI DSI driver Chris Zhong
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Chris Zhong @ 2015-12-16 10:10 UTC (permalink / raw)
  To: heiko, linux-rockchip, mark.yao, treding
  Cc: Mark Rutland, devicetree, Russell King, Pawel Moll, Ian Campbell,
	linux-kernel, dri-devel, Rob Herring, Kumar Gala, Chris Zhong,
	linux-arm-kernel


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@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.


Changes in v6:
- update the document, since the bridge device has been deleted.
- 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

Liu Ying (1):
  drm/dsi: Add a helper to get bits per pixel of MIPI DSI pixel format

 .../display/rockchip/dw_mipi_dsi_rockchip.txt      |   60 +
 arch/arm/boot/dts/rk3288-evb.dtsi                  |   20 +-
 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             | 1200 ++++++++++++++++++++
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c        |    8 +
 include/drm/drm_mipi_dsi.h                         |   14 +
 8 files changed, 1351 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

-- 
2.6.3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v6 3/6] Documentation: dt-bindings: Add bindings for rk3288 DW MIPI DSI driver
  2015-12-16 10:10 [PATCH v6 0/6] Add mipi dsi support for rk3288 Chris Zhong
@ 2015-12-16 10:10 ` Chris Zhong
       [not found] ` <1450260616-21160-1-git-send-email-zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Chris Zhong @ 2015-12-16 10:10 UTC (permalink / raw)
  To: heiko, linux-rockchip, mark.yao, treding
  Cc: Chris Zhong, devicetree, Kumar Gala, linux-kernel, Ian Campbell,
	Rob Herring, Pawel Moll, Mark Rutland, linux-arm-kernel

add device tree bindings for rk3288 specific Synopsys DW MIPI DSI driver

Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Acked-by: Rob Herring <robh@kernel.org>

---

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

diff --git a/Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt b/Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt
new file mode 100644
index 0000000..1753f0c
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt
@@ -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@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@0 {
+					reg = <0>;
+					remote-endpoint = <&vopb_out_mipi>;
+				};
+				mipi_in_vopl: endpoint@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";
+		};
+	};
-- 
2.6.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v6 5/6] ARM: dts: rockchip: add rk3288 mipi_dsi nodes
       [not found] ` <1450260616-21160-1-git-send-email-zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2015-12-16 10:10   ` Chris Zhong
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Zhong @ 2015-12-16 10:10 UTC (permalink / raw)
  To: heiko-4mtYJXux2i+zQB+pC5nmwQ,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	mark.yao-TNX95d0MmH7DzftRWevZcw, treding-DDmLM1+adcrQT0dZR+AlfA
  Cc: Chris Zhong, Russell King, devicetree-u79uwXL29TY76Z2rM5mHXA,
	Kumar Gala, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Ian Campbell,
	Rob Herring, Pawel Moll, Mark Rutland,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Add a mipi_dsi node, and also add mipi_dsi endpoints to vopb and vopl
output port nodes.

Signed-off-by: Chris Zhong <zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>

---

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(+)

diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index a9270f7..1086761 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -817,6 +817,10 @@
 				reg = <1>;
 				remote-endpoint = <&hdmi_in_vopb>;
 			};
+			vopb_out_mipi: endpoint@2 {
+				reg = <2>;
+				remote-endpoint = <&mipi_in_vopb>;
+			};
 		};
 	};
 
@@ -853,6 +857,10 @@
 				reg = <1>;
 				remote-endpoint = <&hdmi_in_vopl>;
 			};
+			vopl_out_mipi: endpoint@2 {
+				reg = <2>;
+				remote-endpoint = <&mipi_in_vopl>;
+			};
 		};
 	};
 
@@ -954,6 +962,37 @@
 		status = "disabled";
 	};
 
+	mipi_dsi: mipi@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@0 {
+					reg = <0>;
+					remote-endpoint = <&vopb_out_mipi>;
+				};
+				mipi_in_vopl: endpoint@1 {
+					reg = <1>;
+					remote-endpoint = <&vopl_out_mipi>;
+				};
+			};
+		};
+	};
+
 	gic: interrupt-controller@ffc01000 {
 		compatible = "arm,gic-400";
 		interrupt-controller;
-- 
2.6.3

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v6 6/6] ARM: dts: rockchip: add support mipi panel tv080wum-nl0
  2015-12-16 10:10 [PATCH v6 0/6] Add mipi dsi support for rk3288 Chris Zhong
  2015-12-16 10:10 ` [PATCH v6 3/6] Documentation: dt-bindings: Add bindings for rk3288 DW MIPI DSI driver Chris Zhong
       [not found] ` <1450260616-21160-1-git-send-email-zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2015-12-16 10:10 ` Chris Zhong
  2015-12-17  9:29 ` [PATCH v6 0/6] Add mipi dsi support for rk3288 Heiko Stübner
  3 siblings, 0 replies; 6+ messages in thread
From: Chris Zhong @ 2015-12-16 10:10 UTC (permalink / raw)
  To: heiko, linux-rockchip, mark.yao, treding
  Cc: Chris Zhong, Russell King, devicetree, Kumar Gala, linux-kernel,
	Ian Campbell, Rob Herring, Pawel Moll, Mark Rutland,
	linux-arm-kernel

This tv080wum-nl0 panel is a mipi panel, it can use in MIPI_TX socket
of rk3288 evb board.

Signed-off-by: Chris Zhong <zyw@rock-chips.com>

---

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.dtsi | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/rk3288-evb.dtsi b/arch/arm/boot/dts/rk3288-evb.dtsi
index f6d2e78..2014992 100644
--- a/arch/arm/boot/dts/rk3288-evb.dtsi
+++ b/arch/arm/boot/dts/rk3288-evb.dtsi
@@ -47,7 +47,7 @@
 		reg = <0x0 0x80000000>;
 	};
 
-	backlight {
+	backlight: backlight {
 		compatible = "pwm-backlight";
 		brightness-levels = <
 			  0   1   2   3   4   5   6   7
@@ -177,6 +177,20 @@
 	status = "okay";
 };
 
+&mipi_dsi {
+	status = "okay";
+	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";
+	};
+};
+
 &sdmmc {
 	bus-width = <4>;
 	cap-mmc-highspeed;
@@ -247,6 +261,10 @@
 		bl_en: bl-en {
 			rockchip,pins = <7 2 RK_FUNC_GPIO &pcfg_pull_none>;
 		};
+
+		lcd_en: lcd-en {
+			rockchip,pins = <7 3 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
 	};
 
 	buttons {
-- 
2.6.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v6 0/6] Add mipi dsi support for rk3288
  2015-12-16 10:10 [PATCH v6 0/6] Add mipi dsi support for rk3288 Chris Zhong
                   ` (2 preceding siblings ...)
  2015-12-16 10:10 ` [PATCH v6 6/6] ARM: dts: rockchip: add support mipi panel tv080wum-nl0 Chris Zhong
@ 2015-12-17  9:29 ` Heiko Stübner
  2015-12-18  9:54   ` Chris Zhong
  3 siblings, 1 reply; 6+ messages in thread
From: Heiko Stübner @ 2015-12-17  9:29 UTC (permalink / raw)
  To: Chris Zhong
  Cc: Mark Rutland, devicetree, Russell King, Pawel Moll, Ian Campbell,
	linux-kernel, dri-devel, linux-rockchip, Rob Herring, Kumar Gala,
	treding, linux-arm-kernel

Hi Chris,

Am Mittwoch, 16. Dezember 2015, 18:10:10 schrieb 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@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.

from my point it looks good (although I cannot really speak on the drm-related 
internals).

But I do think we'll be doing atomic modesetting conversion first (last 
version posted from Mark today), so you should probably make sure your dsi 
driver still works after that conversion and make changes if needed.


Heiko

> 
> 
> Changes in v6:
> - update the document, since the bridge device has been deleted.
> - 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
> 
> Liu Ying (1):
>   drm/dsi: Add a helper to get bits per pixel of MIPI DSI pixel format
> 
>  .../display/rockchip/dw_mipi_dsi_rockchip.txt      |   60 +
>  arch/arm/boot/dts/rk3288-evb.dtsi                  |   20 +-
>  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             | 1200
> ++++++++++++++++++++ drivers/gpu/drm/rockchip/rockchip_drm_vop.c        |  
>  8 +
>  include/drm/drm_mipi_dsi.h                         |   14 +
>  8 files changed, 1351 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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v6 0/6] Add mipi dsi support for rk3288
  2015-12-17  9:29 ` [PATCH v6 0/6] Add mipi dsi support for rk3288 Heiko Stübner
@ 2015-12-18  9:54   ` Chris Zhong
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Zhong @ 2015-12-18  9:54 UTC (permalink / raw)
  To: Heiko Stübner
  Cc: Mark Rutland, devicetree, Russell King, Pawel Moll, Ian Campbell,
	linux-kernel, dri-devel, linux-rockchip, Rob Herring, Kumar Gala,
	treding, linux-arm-kernel

Hi Heiko

Thanks for your reminder.
I have post the v6.1 mipi patch with the atomic support.
<https://patchwork.kernel.org/patch/7881781/>

On 12/17/2015 05:29 PM, Heiko Stübner wrote:
> Hi Chris,
>
> Am Mittwoch, 16. Dezember 2015, 18:10:10 schrieb 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@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.
> from my point it looks good (although I cannot really speak on the drm-related
> internals).
>
> But I do think we'll be doing atomic modesetting conversion first (last
> version posted from Mark today), so you should probably make sure your dsi
> driver still works after that conversion and make changes if needed.
>
>
> Heiko
>
>>
>> Changes in v6:
>> - update the document, since the bridge device has been deleted.
>> - 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
>>
>> Liu Ying (1):
>>    drm/dsi: Add a helper to get bits per pixel of MIPI DSI pixel format
>>
>>   .../display/rockchip/dw_mipi_dsi_rockchip.txt      |   60 +
>>   arch/arm/boot/dts/rk3288-evb.dtsi                  |   20 +-
>>   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             | 1200
>> ++++++++++++++++++++ drivers/gpu/drm/rockchip/rockchip_drm_vop.c        |
>>   8 +
>>   include/drm/drm_mipi_dsi.h                         |   14 +
>>   8 files changed, 1351 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
>
>
>


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-12-18  9:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-16 10:10 [PATCH v6 0/6] Add mipi dsi support for rk3288 Chris Zhong
2015-12-16 10:10 ` [PATCH v6 3/6] Documentation: dt-bindings: Add bindings for rk3288 DW MIPI DSI driver Chris Zhong
     [not found] ` <1450260616-21160-1-git-send-email-zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2015-12-16 10:10   ` [PATCH v6 5/6] ARM: dts: rockchip: add rk3288 mipi_dsi nodes Chris Zhong
2015-12-16 10:10 ` [PATCH v6 6/6] ARM: dts: rockchip: add support mipi panel tv080wum-nl0 Chris Zhong
2015-12-17  9:29 ` [PATCH v6 0/6] Add mipi dsi support for rk3288 Heiko Stübner
2015-12-18  9:54   ` Chris Zhong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).