Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp926592imj; Sat, 9 Feb 2019 10:59:02 -0800 (PST) X-Google-Smtp-Source: AHgI3IYtODEqtJfcIWCM2CoteRNRkDTF3mqeYHdfj6/8bil5o4ApYRNdI4bOWgmWLA5vcpPXJlzF X-Received: by 2002:a17:902:14e:: with SMTP id 72mr29849290plb.287.1549738742378; Sat, 09 Feb 2019 10:59:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549738742; cv=none; d=google.com; s=arc-20160816; b=Bqb6HHtgwKnRB75BIQE2mxWyfeMkWxLXvviX/yWWZKOh3Q7CVWr4Qkw2fphEfSVxUX Rr+sC1uV4jjhNKE4gBYSIkOHhM966/4xu5uVyVSUGdUC+ipu/jO8K0UXJcZ6UvHoh1CW 1GO7fXQ1pKrYSv5E/ogqjPZ52hF3LrCXfOL6j/2hvoDSIGh6QBiikmFg6Qr3sRakZ2yC 4L4y3AcodK4avvDV2KQC4xJSg4onY304/ACUWwxeF8HpAxAwN23w9YD1cffzuYcrBBht hbzShufh0fAwySTV6tlGyZUSCUW6+YLOB/hhoITFazaxEhlsyjGQkjUAHdvE5xTK1tPM 1Htw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IxgiPirhGqIQewE9lsYt5AAkUp6QSnazW1NQ72m123c=; b=OHu23z17cAIVbwjk7gEGKF6hGI6AKnZv9myi2BCFgHvt/+RhE3V+w8q41xJNyZOZq5 y8sn1cX62GGlVYLDdUqLxfPl7t0SBYw8xmw93uzBiF215meTT0qgl0Yq+6PRf+VfSqsj N4sh3oDZ8k4M+NJcCvoYh/p/J0DGvF6JyH3tgCXMAsdd0GIthACO3/ipnyITz24AFqjK cSSB3fIHqY6EQM24VhqHQ80vxZaAIPVoC+LNn6asOe04zlsRyMdsYmT2c8+5bNPNxm8D maAd2Fqrd1Lw5tXh8cgYbzjK2NTUnhuDsWDxCYXrYhzER6rG/KbA//RYUl50/5OhVVZm apoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1GqN3qtX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b60si5936213plc.95.2019.02.09.10.58.46; Sat, 09 Feb 2019 10:59:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1GqN3qtX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727482AbfBISr5 (ORCPT + 99 others); Sat, 9 Feb 2019 13:47:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:60588 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727441AbfBISrx (ORCPT ); Sat, 9 Feb 2019 13:47:53 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ADA922192D; Sat, 9 Feb 2019 18:47:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549738072; bh=Kzj2qF6PejyI4uKCWP4oKeQSSAMvGqgOB29qTWwE1S8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1GqN3qtXMqVR1eplZSNPtn9U225pjMhKSha0kmLDGEUjnOdNm4QUFvHz8sXF5YVlX zSWThv7UYVzSi6Gn+aEvcmxGA/B5d1FFcZ8rxSiqeubu8qFhpv1f78Ez6qum+micGD hNt/sPvGsKJZTWB7Xc0/1iLY7qe6Y5B4FzZiT9nA= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tomi Valkeinen , Andrzej Hajda , Sasha Levin , dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 4.20 16/42] drm/bridge: tc358767: add defines for DP1_SRCCTRL & PHY_2LANE Date: Sat, 9 Feb 2019 13:47:08 -0500 Message-Id: <20190209184734.125935-16-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190209184734.125935-1-sashal@kernel.org> References: <20190209184734.125935-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tomi Valkeinen [ Upstream commit adf4109896bbee27fd2ac3b48d22d6a0062fe517 ] DP1_SRCCTRL register and PHY_2LANE field did not have matching defines. Add these. Signed-off-by: Tomi Valkeinen Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190103115954.12785-3-tomi.valkeinen@ti.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/bridge/tc358767.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index 29a7e33e8ae0..5f0a666db2fd 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -142,6 +142,8 @@ #define DP0_LTLOOPCTRL 0x06d8 #define DP0_SNKLTCTRL 0x06e4 +#define DP1_SRCCTRL 0x07a0 + /* PHY */ #define DP_PHY_CTRL 0x0800 #define DP_PHY_RST BIT(28) /* DP PHY Global Soft Reset */ @@ -150,6 +152,7 @@ #define PHY_M1_RST BIT(12) /* Reset PHY1 Main Channel */ #define PHY_RDY BIT(16) /* PHY Main Channels Ready */ #define PHY_M0_RST BIT(8) /* Reset PHY0 Main Channel */ +#define PHY_2LANE BIT(2) /* PHY Enable 2 lanes */ #define PHY_A0_EN BIT(1) /* PHY Aux Channel0 Enable */ #define PHY_M0_EN BIT(0) /* PHY Main Channel0 Enable */ @@ -564,7 +567,7 @@ static int tc_aux_link_setup(struct tc_data *tc) value |= SYSCLK_SEL_LSCLK | LSCLK_DIV_2; tc_write(SYS_PLLPARAM, value); - tc_write(DP_PHY_CTRL, BGREN | PWR_SW_EN | BIT(2) | PHY_A0_EN); + tc_write(DP_PHY_CTRL, BGREN | PWR_SW_EN | PHY_2LANE | PHY_A0_EN); /* * Initially PLLs are in bypass. Force PLL parameter update, @@ -834,7 +837,7 @@ static int tc_main_link_setup(struct tc_data *tc) DP0_SRCCTRL_LANESKEW | DP0_SRCCTRL_LANES_2 | DP0_SRCCTRL_BW27 | DP0_SRCCTRL_AUTOCORRECT); /* from excel file - DP1_SrcCtrl */ - tc_write(0x07a0, 0x00003083); + tc_write(DP1_SRCCTRL, 0x00003083); rate = clk_get_rate(tc->refclk); switch (rate) { @@ -855,8 +858,9 @@ static int tc_main_link_setup(struct tc_data *tc) } value |= SYSCLK_SEL_LSCLK | LSCLK_DIV_2; tc_write(SYS_PLLPARAM, value); + /* Setup Main Link */ - dp_phy_ctrl = BGREN | PWR_SW_EN | BIT(2) | PHY_A0_EN | PHY_M0_EN; + dp_phy_ctrl = BGREN | PWR_SW_EN | PHY_2LANE | PHY_A0_EN | PHY_M0_EN; tc_write(DP_PHY_CTRL, dp_phy_ctrl); msleep(100); -- 2.19.1