From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joonyoung Shim Subject: Re: [PATCH V3 2/2] video: drm: exynos: Add device tree support Date: Mon, 20 Aug 2012 10:44:55 +0900 Message-ID: <50319697.6040206@samsung.com> References: <1345111689-14601-1-git-send-email-l.krishna@samsung.com> <1345111689-14601-3-git-send-email-l.krishna@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-reply-to: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Leela Krishna Amudala Cc: kgene.kim@samsung.com, devicetree-discuss@lists.ozlabs.org, dri-devel@lists.freedesktop.org, laurent.pinchart@ideasonboard.com, m.szyprowski@samsung.com List-Id: devicetree@vger.kernel.org On 08/17/2012 06:37 PM, Leela Krishna Amudala wrote: > Hello, > > On Fri, Aug 17, 2012 at 6:55 AM, Joonyoung Shim wrote: >> Hi, >> >> 2012/8/16 Leela Krishna Amudala : >>> Add device tree based discovery support for DRM-FIMD driver. >>> >>> Signed-off-by: Leela Krishna Amudala >>> --- >>> Documentation/devicetree/bindings/fb/drm-fimd.txt | 80 +++++++++++++++++ >>> drivers/gpu/drm/exynos/exynos_drm_fimd.c | 95 ++++++++++++++++++++- >>> 2 files changed, 173 insertions(+), 2 deletions(-) >>> create mode 100644 Documentation/devicetree/bindings/fb/drm-fimd.txt >>> >>> diff --git a/Documentation/devicetree/bindings/fb/drm-fimd.txt b/Documentation/devicetree/bindings/fb/drm-fimd.txt >>> new file mode 100644 >>> index 0000000..8ad8814 >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/fb/drm-fimd.txt >>> @@ -0,0 +1,80 @@ >>> +* Samsung Display Controller using DRM frame work >>> + >>> +The display controller is used to transfer image data from memory to an >>> +external LCD driver interface. It supports various color formats such as >>> +rgb and yuv. >>> + >>> +Required properties: >>> + - compatible: Should be "samsung,exynos5-drm" for fimd using DRM frame work. >> Just use "samsung,exynos5-fb" and add to support exynos4-fb >> > In the first version of this patch set I used "samsung,exynos5-fb", > but as per Kyungmin Park's suggestion changed it to exynos5-drm. OK, but this doesn't mean drm device so it is right to use exynos5-fimd. Add "exynos5-fimd" compatible and also use exynos5-fb, it is used in s3c-fb driver. >>> + - reg: physical base address of the controller and length of memory >>> + mapped region. >>> + - interrupts: Three interrupts should be specified. The interrupts should be >>> + specified in the following order. >>> + - VSYNC interrupt >>> + - FIFO level interrupt >>> + - FIMD System Interrupt >>> + >>> + - samsung,fimd-display: This property should specify the phandle of the >>> + display device node which holds the video interface timing with the >>> + below mentioned properties. >>> + >>> + - lcd-htiming: Specifies the horizontal timing for the overlay. The >>> + horizontal timing includes four parameters in the following order. >>> + >>> + - horizontal back porch (in number of lcd clocks) >>> + - horizontal front porch (in number of lcd clocks) >>> + - hsync pulse width (in number of lcd clocks) >>> + - Display panels X resolution. >>> + >>> + - lcd-vtiming: Specifies the vertical timing for the overlay. The >>> + vertical timing includes four parameters in the following order. >>> + >>> + - vertical back porch (in number of lcd lines) >>> + - vertical front porch (in number of lcd lines) >>> + - vsync pulse width (in number of lcd clocks) >>> + - Display panels Y resolution. >>> + >>> + >>> + - samsung,default-window: Specifies the default window number of the fimd controller. >>> + >>> + - samsung,fimd-win-bpp: Specifies the bits per pixel. >>> + >>> +Optional properties: >>> + - supports-mipi-panel: Specifies the lcd is mipi panel type >> How is this property used? >> > As this driver can be interfaced through MIPI or eDP, Arch side code > will check whether this property is available or not, if it is > available then it assumes mipi panel is connected and certain clock > rate will be set to fimd clock, otherwise assumes other panel is > connected and other clock rate will be set at arch side. But it is not used currently in the driver. > >>> + - samsung,fimd-vidout-rgb: Video output format is RGB. >>> + - samsung,fimd-inv-vclk: invert video clock polarity. >>> + - samsung,fimd-frame-rate: Number of video frames per second. >>> + >>> +Example: >>> + >>> + The following is an example for the fimd controller is split into >>> + two portions. The SoC specific portion can be specified in the SoC >>> + specific dts file. The board specific portion can be specified in the >>> + board specific dts file. >>> + >>> + - SoC Specific portion >>> + >>> + fimd { >>> + compatible = "samsung,exynos5-drm"; >>> + interrupt-parent = <&combiner>; >>> + reg = <0x14400000 0x40000>; >>> + interrupts = <18 5>, <18 4>, <18 6>; >>> + }; >>> + >>> + - Board Specific portion >>> + >>> + lcd_fimd0: lcd_panel0 { >>> + lcd-htiming = <4 4 4 480>; >>> + lcd-vtiming = <4 4 4 320>; >>> + supports-mipi-panel; >>> + }; >>> + >>> + fimd { >>> + samsung,fimd-display = <&lcd_fimd0>; >>> + samsung,fimd-vidout-rgb; >>> + samsung,fimd-inv-vclk; >>> + samsung,fimd-frame-rate = <60>; >>> + samsung,default-window = <0>; >>> + samsung,fimd-win-bpp = <32>; >>> + }; >>> + >>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c >>> index 8379c59..1753846 100644 >>> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c >>> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c >>> @@ -18,6 +18,7 @@ >>> #include >>> #include >>> #include >>> +#include >>> >>> #include