From patchwork Sat Jan 30 14:11:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 8171301 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B418DBEEED for ; Sat, 30 Jan 2016 14:12:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CDE0C20374 for ; Sat, 30 Jan 2016 14:12:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3162620398 for ; Sat, 30 Jan 2016 14:12:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754382AbcA3OMC (ORCPT ); Sat, 30 Jan 2016 09:12:02 -0500 Received: from mail-pf0-f169.google.com ([209.85.192.169]:36532 "EHLO mail-pf0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754213AbcA3OMB (ORCPT ); Sat, 30 Jan 2016 09:12:01 -0500 Received: by mail-pf0-f169.google.com with SMTP id n128so57467069pfn.3 for ; Sat, 30 Jan 2016 06:12:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=ZMXbgkc4KBM7EiTsPlDt16jgY86sEbHs3Ax32mGpsRU=; b=IspKvE4C0N/GroZ+6cR+wretJ6mTCcMF8EDC5WrnWWcdleMFdNcEhx9td+0oGSpBxI YJAimhpdXkJClQxUNmmp0PbFNpcOzSbcpNEvbgOQnW3x69CU2g4oeZocGTTZtnjaVaip iLbpsyLl6NM03Y5YXTmJBy/rJacVrlAwST2HM3I4p/voJSjTl0DcEK1l3lTsp0ueTNMj /3tTQ5U8yWgsmBBvjrqFz8FScdQHuAv0UnyRHmQHz6ZimcfQUyO6Rk9JzdDp1chyfJK+ 9biCgvPrqZwMu4M6mNkMIszrjspu0fb4A8HKrA6KznYPAaucXc75URt6teoSZPnZhGg+ U7KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ZMXbgkc4KBM7EiTsPlDt16jgY86sEbHs3Ax32mGpsRU=; b=gz2mehNszzFtMS5z5cM4TpPGP4B/tivj7jJfoewqFrEY/qiYKyeODJYYuf9uEcAHcB elONulW+XWURuxrGzK4OYQ8XsvVEM7tbmFwuZhTF9Cb4xM2DDuZe0ksYHOx0mGR+0G4r Cp5VrUe1bTAo5DVbYzDr+O2G2k6VaaERNShrYo5cphQNNtINDThn2Dvgqr4eIa9CelQA iP9hiPaQcOTjZ34kZA1ivRcNsnnNxfQy0NjeFp3wR/IZyNV9qbv9JUqyAtb3aSwDnQNE brCzgn5LPWmgV6rU4YVHFxYd/kKkvFecl+pyCIijaf6Uw4MgLOFsp0QIohUBm80p8rX0 EYCg== X-Gm-Message-State: AG10YORF+nmO17JZ8QwMq4/t6R0855q+r0s9YbJf3EcwbEOSxgyThPlH2pCdMuKzeChrFg== X-Received: by 10.98.18.203 with SMTP id 72mr22257613pfs.94.1454163120610; Sat, 30 Jan 2016 06:12:00 -0800 (PST) Received: from localhost.localdomain ([182.225.40.2]) by smtp.gmail.com with ESMTPSA id 75sm30883432pfj.20.2016.01.30.06.11.57 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 30 Jan 2016 06:12:00 -0800 (PST) From: Chanho Park To: inki.dae@samsung.com Cc: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, Chanho Park , Joonyoung Shim , Seung-Woo Kim Subject: [PATCH] drm/exynos: support exynos5422 mipi-dsi Date: Sat, 30 Jan 2016 23:11:50 +0900 Message-Id: <1454163110-20103-1-git-send-email-parkch98@gmail.com> X-Mailer: git-send-email 2.5.0 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Chanho Park This patch supports mipi dsi for exynos5422. The dsi register offsets of the exynos5422 are similar with exynos5433. However, the values of the registers are quite different from the exynos5433. For example, the exynos5422 uses sw reset like previous chips. Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Signed-off-by: Chanho Park Reviewed-by: Andrzej Hajda --- .../bindings/display/exynos/exynos_dsim.txt | 1 + drivers/gpu/drm/exynos/exynos_drm_dsi.c | 31 ++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/Documentation/devicetree/bindings/display/exynos/exynos_dsim.txt b/Documentation/devicetree/bindings/display/exynos/exynos_dsim.txt index 0e6f0c0..22756b3 100644 --- a/Documentation/devicetree/bindings/display/exynos/exynos_dsim.txt +++ b/Documentation/devicetree/bindings/display/exynos/exynos_dsim.txt @@ -6,6 +6,7 @@ Required properties: "samsung,exynos4210-mipi-dsi" /* for Exynos4 SoCs */ "samsung,exynos4415-mipi-dsi" /* for Exynos4415 SoC */ "samsung,exynos5410-mipi-dsi" /* for Exynos5410/5420/5440 SoCs */ + "samsung,exynos5422-mipi-dsi" /* for Exynos5422/5800 SoCs */ "samsung,exynos5433-mipi-dsi" /* for Exynos5433 SoCs */ - reg: physical base address and length of the registers set for the device - interrupts: should contain DSI interrupt diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index d84a498..3eff6bf 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -408,6 +408,24 @@ static unsigned int reg_values[] = { [PHYTIMING_HS_TRAIL] = DSIM_PHYTIMING2_HS_TRAIL(0x0b), }; +static unsigned int exynos5422_reg_values[] = { + [RESET_TYPE] = DSIM_SWRST, + [PLL_TIMER] = 500, + [STOP_STATE_CNT] = 0xf, + [PHYCTRL_ULPS_EXIT] = DSIM_PHYCTRL_ULPS_EXIT(0xaf), + [PHYCTRL_VREG_LP] = 0, + [PHYCTRL_SLEW_UP] = 0, + [PHYTIMING_LPX] = DSIM_PHYTIMING_LPX(0x08), + [PHYTIMING_HS_EXIT] = DSIM_PHYTIMING_HS_EXIT(0x0d), + [PHYTIMING_CLK_PREPARE] = DSIM_PHYTIMING1_CLK_PREPARE(0x09), + [PHYTIMING_CLK_ZERO] = DSIM_PHYTIMING1_CLK_ZERO(0x30), + [PHYTIMING_CLK_POST] = DSIM_PHYTIMING1_CLK_POST(0x0e), + [PHYTIMING_CLK_TRAIL] = DSIM_PHYTIMING1_CLK_TRAIL(0x0a), + [PHYTIMING_HS_PREPARE] = DSIM_PHYTIMING2_HS_PREPARE(0x0c), + [PHYTIMING_HS_ZERO] = DSIM_PHYTIMING2_HS_ZERO(0x11), + [PHYTIMING_HS_TRAIL] = DSIM_PHYTIMING2_HS_TRAIL(0x0d), +}; + static unsigned int exynos5433_reg_values[] = { [RESET_TYPE] = DSIM_FUNCRST, [PLL_TIMER] = 22200, @@ -482,6 +500,17 @@ static struct exynos_dsi_driver_data exynos5433_dsi_driver_data = { .reg_values = exynos5433_reg_values, }; +static struct exynos_dsi_driver_data exynos5422_dsi_driver_data = { + .reg_ofs = exynos5433_reg_ofs, + .plltmr_reg = 0xa0, + .has_clklane_stop = 1, + .num_clks = 2, + .max_freq = 1500, + .wait_for_reset = 1, + .num_bits_resol = 12, + .reg_values = exynos5422_reg_values, +}; + static struct of_device_id exynos_dsi_of_match[] = { { .compatible = "samsung,exynos3250-mipi-dsi", .data = &exynos3_dsi_driver_data }, @@ -491,6 +520,8 @@ static struct of_device_id exynos_dsi_of_match[] = { .data = &exynos4415_dsi_driver_data }, { .compatible = "samsung,exynos5410-mipi-dsi", .data = &exynos5_dsi_driver_data }, + { .compatible = "samsung,exynos5422-mipi-dsi", + .data = &exynos5422_dsi_driver_data }, { .compatible = "samsung,exynos5433-mipi-dsi", .data = &exynos5433_dsi_driver_data }, { }