Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2428573imj; Mon, 18 Feb 2019 05:57:27 -0800 (PST) X-Google-Smtp-Source: AHgI3IY2kcgvUkSq4rgnZe6CjXvtIe9AInf2XzIoRPbVNCREvxW0Uo7zJuQQNw/t1mSgXvyD4Eqa X-Received: by 2002:a17:902:bd0a:: with SMTP id p10mr24853396pls.322.1550498247456; Mon, 18 Feb 2019 05:57:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550498247; cv=none; d=google.com; s=arc-20160816; b=fKxA/cw87lr5mA9l2gGSP3d5daj0MPiIv5lKq1mPhIbAz3NS8Izsp0S6eP9Htd75R/ ZnyHhmmXpXV9pAGYeah/77d1/CmUg5IeavIXmdFC8se1EBNG8ZgxeI4kY+Xi90jedmnn AtSE6QHrgZlogslSgSjino5nLnaCL+mhjiGsTa31LhALu4t90lZIAv+f992ElKyEGovA 794CdL/bHdCT9TZN9cWJ7nPKPOeigJQ8J7PP2++cgW6H6tQapFDXLvPOB3SMXoAwtyf5 CuZRYN49JHrKeBNmV0J8hcR0ArsV+sPfesSiZPeseNoEGrNfTOwBgCCy1IDWF9TVyoVV wBfg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+BKAu0h/RAFVCJviQZglNgSswZj12N8ZsrTzpIq1exE=; b=BxhfitGNQ8aCvAftLdedYKK9kdYNoLFLJ7OdMrsotQhoeeNmkmvw+oIpygJc1ihEoZ CnDmLcq4fOf1wuRe6Do/YSV/XC0VaF4BFGlTG1bqQj5Plz/ptDhq34KbqLEHjtwvvufB 9LywtlnGPxWqkPesg0GMYiDg4IkSe1mB1aGzrbeNrQyLhZMVyr9SSunudtSxI6SY6bTZ Fc9gGw0R5XKU57jgvjvIvlrmLnUP1+NpC1OJQ9Gitx5SF/HZ4EiDt31FHpnK5bjIzHQv MiK5o4ukyo54ZWZUBzZ2prXh1VYt6nprYx84u5WF6Nh5ZhyD4aaqIKF3It0xpyTcixtt DxlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BNshSJI3; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c4si2389861pfn.83.2019.02.18.05.57.12; Mon, 18 Feb 2019 05:57:27 -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=BNshSJI3; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387761AbfBRN4V (ORCPT + 99 others); Mon, 18 Feb 2019 08:56:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:36466 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387662AbfBRN4R (ORCPT ); Mon, 18 Feb 2019 08:56:17 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 607642077B; Mon, 18 Feb 2019 13:56:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550498176; bh=N3YORAeTjpitFbr58bZ41zJFdXxu9o23+fEC6L5Y070=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BNshSJI3dij/OHUhfRxHvpQV/jLdBUxE54Pa+dINAdS3IRaSw2JHF6szoxAAb//Zf wkADpnb+qZqEgKQi111vDaVnpVYRub7lGBRdfx9TNd4/uPUZrFdPwyHYumpESNiVxs v61ALN1iXRUw9qfLLELjTUnAMxK+Xn8wIGtUBkRs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tomi Valkeinen , Andrzej Hajda , Sasha Levin Subject: [PATCH 4.14 27/62] drm/bridge: tc358767: add defines for DP1_SRCCTRL & PHY_2LANE Date: Mon, 18 Feb 2019 14:43:33 +0100 Message-Id: <20190218133508.311207028@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190218133505.801423074@linuxfoundation.org> References: <20190218133505.801423074@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ [ 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 8636e7eeb731..e697c7c6ca52 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -140,6 +140,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 */ @@ -148,6 +150,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 */ @@ -562,7 +565,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, @@ -832,7 +835,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) { @@ -853,8 +856,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