Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3938608pxb; Tue, 2 Nov 2021 00:51:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy47oQ1KowJgPZLDwgMeE6JjE7ry/RDq9JZxKUZufqf7FhqeMWeTBYMb9fzRNt61VuMDRyb X-Received: by 2002:a05:6402:1c1c:: with SMTP id ck28mr38622791edb.300.1635839509571; Tue, 02 Nov 2021 00:51:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635839509; cv=none; d=google.com; s=arc-20160816; b=AoOdpi7D7x760kbGvY5PkOA0QNEy8zGsXQOFuROTCcUsR3dmhA7GWBllcBhzV9mEhJ 6iY0sWv1CWtrzubIaFZtn4w5VWv0ScmZEXOH4/tbtsKdxqo3CmP4bFgi4N2TdCOIjPvo WAVQLTd4wlh2tpQavr27C0ow7V7HlkHflKi7IWSAmSvbXIpgiVAa4NoSGYwkdt/joikc zeCSid6tMvv9RIbZTch0Z7QBSqE+bTJoztUUiVJCThFlDVpyg0pnFhJqIp1EmaVzLvRW 7hGm45HweCcioAuLEjcuXnbPt1O4KjzCWzlaV6x/S3+rcXRzfxjRsUa5o7J7Ge5le3Yv 0RPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=t/5kmuNFU7C+OHFcd+0xjbwL9B0azkBbIpq2UE7wMug=; b=ZS+0VqhIvBCMm2+DiI5tCXiRB6hQi0+wX/IQI04qDd5nljByMXeJL1XNfM5WFOqMZg IetbBq5q1OoxfXS0ZwwFfAaGgZqcUDRogwsP2Xx61p8fFZTnCnHRhsHvOdoItTnvQgl+ UADtTojX5bQNZR2t+JF25JDlMIYBn7yIk/0uaBjCXqndkdZmdXuXRKOFWiLSQHdiz+Uu +CXW8qnNVuHn5HO/KtgHhojly92zfxKfFAU08K7GnOI8zXbrFmdBa98PcpZwbCQZP7m4 HiU3yWcwMDHzna4yrJ5HufgoeGhSw39CnEIvt42bY4w2dKc3d2gVUcFlhJs/biQR9Fou AT+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=elKrrOQY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h19si9196463edb.399.2021.11.02.00.51.25; Tue, 02 Nov 2021 00:51:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=elKrrOQY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231189AbhKBHwF (ORCPT + 99 others); Tue, 2 Nov 2021 03:52:05 -0400 Received: from alexa-out-sd-01.qualcomm.com ([199.106.114.38]:65164 "EHLO alexa-out-sd-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230005AbhKBHwA (ORCPT ); Tue, 2 Nov 2021 03:52:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1635839366; x=1667375366; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=t/5kmuNFU7C+OHFcd+0xjbwL9B0azkBbIpq2UE7wMug=; b=elKrrOQYzhZy7IPYeOawq8amIOYPy0tGJOiqZB0IlDkgs5pV8UgSNnui rdgLCw6I24/bKwk4LFNmZOHBfVtUW9vigtSSNJwyVAy46SfV9yM3SLz85 C8vHkPdaALrsI1KlxLPqSxN+PDAK8qJ4g2t74oMmoPENx2tNriMLhX9Y3 M=; Received: from unknown (HELO ironmsg-SD-alpha.qualcomm.com) ([10.53.140.30]) by alexa-out-sd-01.qualcomm.com with ESMTP; 02 Nov 2021 00:49:26 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg-SD-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 00:49:26 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.7; Tue, 2 Nov 2021 00:49:25 -0700 Received: from sbillaka-linux.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.7; Tue, 2 Nov 2021 00:49:21 -0700 From: Sankeerth Billakanti To: , , , CC: Sankeerth Billakanti , , , , , , , , Subject: [PATCH v4 2/5] drm/msm/dp: Add DP controllers for sc7280 Date: Tue, 2 Nov 2021 13:18:42 +0530 Message-ID: <1635839325-401-3-git-send-email-quic_sbillaka@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1635839325-401-1-git-send-email-quic_sbillaka@quicinc.com> References: <1635839325-401-1-git-send-email-quic_sbillaka@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The eDP controller on SC7280 is similar to the eDP/DP controllers supported by the current driver implementation. SC7280 supports one EDP and one DP controller which can operate concurrently. This change adds the support for eDP and DP controller on sc7280. Signed-off-by: Sankeerth Billakanti changes in v3: - Split into patches according to function (Dmitry Baryshkov) - Use DP_CONTROLLER_1 for eDP controller intf (Dmitry Baryshkov) - Use DP_CONTROLLER_0 for sc7280-dp (Dmitry Baryshkov) - Add macro in drm_helper.h for checking ssc capability (Stephen Boyd) - Use existing macro to check assr capability (Stephen Boyd) - Add comment for HPD_INIT_SETUP delay (Stephen Boyd) changes in v2: - Don't initialize variables to 0 (Stephen Boyd) - Use const for read-only dpcd (Stephen Boyd) - Remove zero pixel clock check (Stephen Boyd) - Sort compatible strings alphabetically (Stephen Boyd) - Use pwm_bl.c for backlight instead of gpio (Stephen Boyd) - Change return type for functions returning always 0 (Matthias Kaehlcke) Reviewed-by: Stephen Boyd --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 4 ++-- drivers/gpu/drm/msm/dp/dp_display.c | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c index ce6f32a..2b4dc9d 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c @@ -856,9 +856,9 @@ static const struct dpu_intf_cfg sm8150_intf[] = { }; static const struct dpu_intf_cfg sc7280_intf[] = { - INTF_BLK("intf_0", INTF_0, 0x34000, INTF_DP, 0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 24, 25), + INTF_BLK("intf_0", INTF_0, 0x34000, INTF_DP, MSM_DP_CONTROLLER_0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 24, 25), INTF_BLK("intf_1", INTF_1, 0x35000, INTF_DSI, 0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 26, 27), - INTF_BLK("intf_5", INTF_5, 0x39000, INTF_EDP, 0, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 22, 23), + INTF_BLK("intf_5", INTF_5, 0x39000, INTF_DP, MSM_DP_CONTROLLER_1, 24, INTF_SC7280_MASK, MDP_SSPP_TOP0_INTR, 22, 23), }; /************************************************************* diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index aba8aa4..61385d6 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -135,8 +135,17 @@ static const struct msm_dp_config sc7180_dp_cfg = { .num_descs = 1, }; +static const struct msm_dp_config sc7280_dp_cfg = { + .descs = (const struct msm_dp_desc[]) { + [MSM_DP_CONTROLLER_0] = { .io_start = 0x0ae90000, .connector_type = DRM_MODE_CONNECTOR_DisplayPort }, + [MSM_DP_CONTROLLER_1] = { .io_start = 0x0aea0000, .connector_type = DRM_MODE_CONNECTOR_eDP }, + }, + .num_descs = 2, +}; + static const struct of_device_id dp_dt_match[] = { { .compatible = "qcom,sc7180-dp", .data = &sc7180_dp_cfg }, + { .compatible = "qcom,sc7280-edp", .data = &sc7280_dp_cfg }, {} }; -- 2.7.4