From patchwork Thu May 30 16:00:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeffrey Hugo X-Patchwork-Id: 10969073 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1AA2C933 for ; Thu, 30 May 2019 16:46:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0BBA628B3D for ; Thu, 30 May 2019 16:46:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F3EBA28B5D; Thu, 30 May 2019 16:46:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id ADDC428B3D for ; Thu, 30 May 2019 16:46:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4DB386E3B8; Thu, 30 May 2019 16:46:46 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by gabe.freedesktop.org (Postfix) with ESMTPS id A9F956E162; Thu, 30 May 2019 16:01:01 +0000 (UTC) Received: by mail-pg1-x544.google.com with SMTP id f25so2260745pgv.10; Thu, 30 May 2019 09:01:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/AvVj2fkffyKJVVEwFKFUqPeBodRCzKUgwbdD9q/Jf8=; b=f3cOVhin3sPUqEXwGB1ZFagqHv6SutYp+gCzlQlYDZ7QoKQXiQDMdeCTGxTTuSjEii HlRUGyc0t98Lxp2k9j8UOgLwA1SqJOsVPxYVFUf8G8772b2cMPKTCdyUx9ODf0f938iw cAqYF5Vn23K6WQC26o/axcnYAHgL9OveEvqKjuqSLyLMe9tPnQbE6rcXaLFjp7ig+2Qg jpcOFA56nTn1e6ry324HxssIMyOZYTvK8MYyHHpfaIHvZmer6S4AiVGA9esHtim3nDCv dSMLUb5UJa1+NuYX+h9YCqdSA2g+WCZ0u46E2fNQZVzr1GiIc5Bo25NGPkizP/z5HMy1 a1DA== X-Gm-Message-State: APjAAAXJeQsSmSbT4pf+UO7cYsnrko27PcB0Q+77QCyXOB3oSZRT+6px MvnBzb1SLoBqRL6+hfsVHNg= X-Google-Smtp-Source: APXvYqxqMDv7lJX1pCMepVwjOk3m6ieg82K9QE0L8UaAoy7Qg4IpS/aWoSiApAu6sFckPzAk8O/8Eg== X-Received: by 2002:a63:1642:: with SMTP id 2mr4282237pgw.230.1559232061116; Thu, 30 May 2019 09:01:01 -0700 (PDT) Received: from aw-bldr-10.qualcomm.com (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id d20sm3135230pjs.24.2019.05.30.09.00.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 May 2019 09:01:00 -0700 (PDT) From: Jeffrey Hugo To: robdclark@gmail.com, sean@poorly.run, airlied@linux.ie, daniel@ffwll.ch Subject: [PATCH 4/4] drm/msm/dsi: Add support for MSM8998 DSI controller Date: Thu, 30 May 2019 09:00:59 -0700 Message-Id: <20190530160059.2929-1-jeffrey.l.hugo@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190530155909.2718-1-jeffrey.l.hugo@gmail.com> References: <20190530155909.2718-1-jeffrey.l.hugo@gmail.com> X-Mailman-Approved-At: Thu, 30 May 2019 16:46:45 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/AvVj2fkffyKJVVEwFKFUqPeBodRCzKUgwbdD9q/Jf8=; b=DwfznHmbKa3vatRv5uW8/u7C8ubKh0JIok9NCDOaOEufKHJNhUScZiMzcR18GcQhc/ e20r5jT7DNivThJH0fk7HthJ0ozkmkokKsbd/1+9NrWO9Lho9Ev/KBU5johMaDjgQOad W3CJFJm/R4NXw3zi1d4AwJ+m1kM+ZX6AWgLc6tCrKYaIVOzt1oAYiFakIk8c8qf/Nrx4 wEfQhMTtId1QLDVIb09CUYJ4mqiOisNjXRcARyb/n0ZU4QhSbhc+wXIi1bcecnsNj7f8 Z2dLND+mHm8heNcgiXOJ26jFOsrIWUzqy5N5MeduadtaB2Z+xqZ5AQkxfVXdS6D7jXWn 62nA== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, marc.w.gonzalez@free.fr, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, Jeffrey Hugo , linux-kernel@vger.kernel.org, abhinavk@codeaurora.org, bjorn.andersson@linaro.org, robh+dt@kernel.org, sibis@codeaurora.org, freedreno@lists.freedesktop.org, chandanu@codeaurora.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The DSI controller on the MSM8998 SoC is a 6G v2.0.0 controller which is very similar to the v2.0.1 of SDM845. Signed-off-by: Jeffrey Hugo --- drivers/gpu/drm/msm/dsi/dsi_cfg.c | 21 +++++++++++++++++++++ drivers/gpu/drm/msm/dsi/dsi_cfg.h | 1 + 2 files changed, 22 insertions(+) diff --git a/drivers/gpu/drm/msm/dsi/dsi_cfg.c b/drivers/gpu/drm/msm/dsi/dsi_cfg.c index dcdfb1bb54f9..7dd17b59c69d 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_cfg.c +++ b/drivers/gpu/drm/msm/dsi/dsi_cfg.c @@ -118,6 +118,25 @@ static const struct msm_dsi_config msm8996_dsi_cfg = { .num_dsi = 2, }; +static const char * const dsi_msm8998_bus_clk_names[] = { + "iface", "bus", "core", +}; + +static const struct msm_dsi_config msm8998_dsi_cfg = { + .io_offset = DSI_6G_REG_SHIFT, + .reg_cfg = { + .num = 2, + .regs = { + {"vdd", 367000, 16 }, /* 0.9 V */ + {"vdda", 62800, 2 }, /* 1.2 V */ + }, + }, + .bus_clk_names = dsi_msm8998_bus_clk_names, + .num_bus_clks = ARRAY_SIZE(dsi_msm8998_bus_clk_names), + .io_start = { 0xc994000, 0xc996000 }, + .num_dsi = 2, +}; + static const char * const dsi_sdm845_bus_clk_names[] = { "iface", "bus", }; @@ -186,6 +205,8 @@ static const struct msm_dsi_cfg_handler dsi_cfg_handlers[] = { &msm8916_dsi_cfg, &msm_dsi_6g_host_ops}, {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V1_4_1, &msm8996_dsi_cfg, &msm_dsi_6g_host_ops}, + {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_2_0, + &msm8998_dsi_cfg, &msm_dsi_6g_v2_host_ops}, {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_2_1, &sdm845_dsi_cfg, &msm_dsi_6g_v2_host_ops}, }; diff --git a/drivers/gpu/drm/msm/dsi/dsi_cfg.h b/drivers/gpu/drm/msm/dsi/dsi_cfg.h index 16c507911110..4f63b57b19dc 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_cfg.h +++ b/drivers/gpu/drm/msm/dsi/dsi_cfg.h @@ -25,6 +25,7 @@ #define MSM_DSI_6G_VER_MINOR_V1_3 0x10030000 #define MSM_DSI_6G_VER_MINOR_V1_3_1 0x10030001 #define MSM_DSI_6G_VER_MINOR_V1_4_1 0x10040001 +#define MSM_DSI_6G_VER_MINOR_V2_2_0 0x20000000 #define MSM_DSI_6G_VER_MINOR_V2_2_1 0x20020001 #define MSM_DSI_V2_VER_MINOR_8064 0x0