From patchwork Tue May 11 04:20:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 434151 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp3460815jao; Mon, 10 May 2021 21:21:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAe612FMrMU2ahwVkgW6Vc/hUcLQOUC+ZuEaJLNYk2Gf6xU7NCGT1qM4AiJ10fkE/CBJXh X-Received: by 2002:a17:902:8bcb:b029:ec:a192:21cf with SMTP id r11-20020a1709028bcbb02900eca19221cfmr28251814plo.71.1620706865767; Mon, 10 May 2021 21:21:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620706865; cv=none; d=google.com; s=arc-20160816; b=RHWCmf73S659Pd6pDnguzk9A2Vym+scSihS5KfiMKcbWs3UlrAIyomLBZSM3Q9hHM3 B7DV3iQKEFDTjzzseGwYhcFItQOKSMC/saxkMUU+z/SFxLTw4cXEwROWQ5Rsgn5p1AwJ 6tEOuGjjO6k5O8LuIWoI3AtvQwmgSYWoyYtMHW0SbrCGPAjjOfWpqWL1emUGy/3AF2yT vzSh1e4hcCKHq4Vsn/ICePID6rpFkJ9teo/lwG9kavrJxn4SjDNYOVOdKw6qSz8ZqHdD thIlKHZaARUpTPCypaX4svv088WgB5NKDRNh0Bl8GJsqtYVtBW6+c3PEk2k6iLC3eIxc Rj0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=wgZFlNZfz9EYfzeQvg8JR3pWaua7Txo/La4Xs65mV68=; b=vBK0knIRcMhD7u76meGuV715zMl5mLKBBQ1y5caPma5yStXkMjT2LmzQ3tMNcXH8LT T+udnzb66zkjNy+zyBD80WxyxJDc2h8xRRtTeDW7wuyEzMDGDRqo3gpyjrbHf0t2+Q0Q iySWUg+M/jI/hZwjGQnxIPFpfVo/QyUCORxS+eMGAW8/s64TQPNgoFXZvrjIPqYrA4qc 54IfRr01OI6gfTJ7TI6LvJhLAXpxDMvVKj4h13qRYFtJL+rDPLKYZ7FsaDrFoJHnPsY8 3Eb3Yv/QgMGOkPBE2RW5EChKo+WZT2/VAokqAU4Do7+z4jQBgZzStOOR+eyD5BleWEyj sJpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=e8cVwtdf; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id lk7si1983733pjb.61.2021.05.10.21.21.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 May 2021 21:21:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=e8cVwtdf; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 52DA36E9BA; Tue, 11 May 2021 04:21:04 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) by gabe.freedesktop.org (Postfix) with ESMTPS id 499BB6E9B9 for ; Tue, 11 May 2021 04:21:01 +0000 (UTC) Received: by mail-ot1-x329.google.com with SMTP id n32-20020a9d1ea30000b02902a53d6ad4bdso16432899otn.3 for ; Mon, 10 May 2021 21:21:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wgZFlNZfz9EYfzeQvg8JR3pWaua7Txo/La4Xs65mV68=; b=e8cVwtdfQWxKumLU3L2sPcRRE88YwVxhHXUc4c3k7eqlRl0thGjwpqhW1we3uS9N7y nZ7umVU/j0VZplwCYa/Y2FS57EbEdKIWHRFcrctPTRdENRXjLBtk5jvAsErUM4Ho5QW7 NPOh4vQUr10l2STyNoCrunsl92Yy6+WF4CfvrgMzXgLUKK2Z2GzHpAK2+BS3z3DuAPG2 JDfFgYrw6md2QGmT7Ay26TE4qMmGL0eDzqR6x9BTLl+9VBzFE06GX0GTBMf1gMhEEXIt DO95hXL2HCB+vHI2f17IgDu6Fw2DtW4stke/2LQGfrnnDdy1i+fR8GWOzw6KU/7wwgti 0rOA== 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:mime-version:content-transfer-encoding; bh=wgZFlNZfz9EYfzeQvg8JR3pWaua7Txo/La4Xs65mV68=; b=jZW2x/Mt6svTAYI2G+4NMQWhbrgxKKOcOzOrGutK6R8Nj3HvPtPSMgLR7rWKn++DHh rzxSvSqXhzovpZTDc3B7HYDHEow0YgBPG19a92iZowhlqba4kuZBUFuKqR2sxAuDlTLG TzQNoO5jmKzj43B3O7HlDaEYS87DXLfB07qiEy8FXyXT6rIvr9FdCdrT7sN61BAPwzlA WD7Uh+ug5LbAlIaYp/HrA7N3jRNQt66Xqmv+g6Co6YFD62HrAXyhgmHGVBXRG3N2oJrz 4n326A0Xefq12zHAZ6M1tVOU5T044USE18YA+q4zNhU0fG/SbH3oymEg2oW3tz3qWmAe BzKQ== X-Gm-Message-State: AOAM532Mn8S3z8VdWdrkvrOZ4LpVPST51MTDfzUXn7MowaRae3TETkbP xJfSrbdruZyHOxMYXsEHTJdbtQ== X-Received: by 2002:a05:6830:70d:: with SMTP id y13mr3221908ots.191.1620706860591; Mon, 10 May 2021 21:21:00 -0700 (PDT) Received: from localhost.localdomain ([2607:fb90:e623:42c1:10df:adff:fec2:f1d]) by smtp.gmail.com with ESMTPSA id r124sm3042294oig.38.2021.05.10.21.20.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 May 2021 21:21:00 -0700 (PDT) From: Bjorn Andersson To: Rob Clark , Sean Paul , David Airlie , Daniel Vetter , Stephen Boyd , sbillaka@codeaurora.org Subject: [PATCH 4/4] drm/msm/dp: Add support for SC8180x eDP Date: Mon, 10 May 2021 23:20:43 -0500 Message-Id: <20210511042043.592802-5-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210511042043.592802-1-bjorn.andersson@linaro.org> References: <20210511042043.592802-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tanmay Shah , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Abhinav Kumar , Dmitry Baryshkov , freedreno@lists.freedesktop.org, Chandan Uddaraju Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The eDP controller found in SC8180x is at large compatible with the current implementation, but has its register blocks at slightly different offsets. Add the compatible and the new register layout. Signed-off-by: Bjorn Andersson --- drivers/gpu/drm/msm/dp/dp_display.c | 1 + drivers/gpu/drm/msm/dp/dp_parser.c | 28 ++++++++++++++++++++-------- 2 files changed, 21 insertions(+), 8 deletions(-) -- 2.29.2 diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index d1319b58e901..0be03bdc882c 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -121,6 +121,7 @@ struct dp_display_private { static const struct of_device_id dp_dt_match[] = { {.compatible = "qcom,sc7180-dp"}, + { .compatible = "qcom,sc8180x-edp" }, {} }; diff --git a/drivers/gpu/drm/msm/dp/dp_parser.c b/drivers/gpu/drm/msm/dp/dp_parser.c index 51ec85b4803b..47cf18bba4b2 100644 --- a/drivers/gpu/drm/msm/dp/dp_parser.c +++ b/drivers/gpu/drm/msm/dp/dp_parser.c @@ -251,6 +251,7 @@ static int dp_parser_clock(struct dp_parser *parser) static int dp_parser_parse(struct dp_parser *parser) { struct dss_io_data *io = &parser->io.dp_controller; + struct device *dev = &parser->pdev->dev; int rc = 0; if (!parser) { @@ -276,14 +277,25 @@ static int dp_parser_parse(struct dp_parser *parser) */ parser->regulator_cfg = &sdm845_dp_reg_cfg; - io->ahb = io->base + 0x0; - io->ahb_len = 0x200; - io->aux = io->base + 0x200; - io->aux_len = 0x200; - io->link = io->base + 0x400; - io->link_len = 0x600; - io->p0 = io->base + 0x1000; - io->p0_len = 0x400; + if (of_device_is_compatible(dev->of_node, "qcom,sc8180x-edp")) { + io->ahb = io->base + 0x0; + io->ahb_len = 0x200; + io->aux = io->base + 0x200; + io->aux_len = 0x200; + io->link = io->base + 0x400; + io->link_len = 0x600; + io->p0 = io->base + 0xa00; + io->p0_len = 0x400; + } else { + io->ahb = io->base + 0x0; + io->ahb_len = 0x200; + io->aux = io->base + 0x200; + io->aux_len = 0x200; + io->link = io->base + 0x400; + io->link_len = 0x600; + io->p0 = io->base + 0x1000; + io->p0_len = 0x400; + } return 0; }