From patchwork Thu Mar 4 06:08:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Swapnil Kashinath Jakhade X-Patchwork-Id: 12117469 X-Patchwork-Delegate: kishon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E692C433E0 for ; Fri, 5 Mar 2021 04:00:00 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A58FE64EE1 for ; Fri, 5 Mar 2021 03:59:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A58FE64EE1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cadence.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=dbfwYeWjHhm3lglbsnrk3gEaCUQVF0fPaEPMehoQphY=; b=iDnllLMPJum0v3oWtKePcGOd7 9n62tp2O+f553TA/ihw+HRxpogsrl66G3TogXOXGUCl7QpKgA+fF9Z1D0liORpSNnppE/v6i4Jyhx d7SJSgBXcIncEOq7Un2dAin0CV7Wci08cvNoD3olX0dnGwsBFnbvKaZBwSoFIJZUAizyg9JvpFAWp EErLIJ9cE5FxpZ8wb0JAVF1nimj9TuTe/2Er9mLH4dWI/qnC3HTv4Qsxp4CrN/+bXboMYxk9H61oO nDzBOj8oxV7VJmYAG//qelbm6E1jr4YNLBRvP/53MZbVOz+a30eQ0apRiCvEoTK1mV1aWAagIcMC+ 0zh+rQd1A==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lI1d7-00CEf9-ID; Fri, 05 Mar 2021 03:59:57 +0000 Received: from mx0b-0014ca01.pphosted.com ([208.86.201.193] helo=mx0a-0014ca01.pphosted.com) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lHhAN-007spe-3L for linux-phy@lists.infradead.org; Thu, 04 Mar 2021 06:09:45 +0000 Received: from pps.filterd (m0042333.ppops.net [127.0.0.1]) by mx0b-0014ca01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 1245tXCA026048; Wed, 3 Mar 2021 22:08:28 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=proofpoint; bh=Ed/E38DVP6xDQFl5ZXwa+J3X/QlRabm7GeG1fY8OUv8=; b=bWDc3+ZCAlCmyyhQdIEclS0KLXgFU8ilivnn/hNc5Sbybs4nKEczP4LoOzZyo6MX4wS2 n3HiVfgcD/1y96UXF0EyWafredwQZHYhH+GZ580eCBUa6yF+/puLfXH7rYgbZF5s3AhA x+xN/Ii1Wk9LHB4jTKDZMMpidi/dZWl19Om4u42IFsLE2ieHEL1WsM4we4a8y2uH8qHB mJn59/Lz2enkLqsNWEkoXXGhvdN0mn5IUx5taIzzwkKHRn5AJEd8RgkUBdyQmdhKI3Ty kY7AjG9SnZqU5oRYOfqLB9GpwWIqZp2PhDCGDDm1SLmHGQ6QcV4hAzTTWP9xqDQHNtbH 5A== Received: from nam02-sn1-obe.outbound.protection.outlook.com (mail-sn1nam02lp2051.outbound.protection.outlook.com [104.47.36.51]) by mx0b-0014ca01.pphosted.com with ESMTP id 36yjj2r9en-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 03 Mar 2021 22:08:27 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bf0hJbo6QFWgirBQF0reDX5G16xalY4WygFZweWX2d05bkJMrT+FTJjic24Oswm44JZytMQ4nxlE1zMrfZ0033/xgyHRUhobxePaIvYb7DO3EWDJsJ+N6Z7Dec3FHZs1dJjv6qP47MX4NSMUy4ciujSyUMivWpStxixmhvHMnwZEy4VRXg20nlV9ljiSN761jXbQ85sb/97EBvtrJuZ58Kf56dXX6JL5AzctqxuU/E6sv/z+stRBfqvxswBV405HqNEVwd0ZsqL3746BhFk/eTZt5VpUTHre66PesXlfguPbwlnHiejjg8GBl1wRSxPffZoy8aKz/RbmejG7wzKwuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ed/E38DVP6xDQFl5ZXwa+J3X/QlRabm7GeG1fY8OUv8=; b=kZL7caNSnc6KbdNb+a5oIRAzW+e+cOUt4cXQe0qJbCmgSAsiuJiVHwmrt+NcPVdCD7w6+CvvCj9LN5AmudrS0b2w3AQ+nSJiEZNuTAElvcleE+NXhisPkChkDRz0BQe/yq3luYgNzdIizRTaW4Ky9D/jxO+oG4IsQntWmV2zjbV+PYs6nK3vf83/C0AecRWMU/av7wp0G+gyELf8ntN6L3mVYkT3iICb63A9aEAkzf7+mdaxe3rlpwllv6MjOJX167SQIqkhDRNytNv5ASL6yCyrehcZjS6uPYrap+ClhGE19GuVa9X2Ki7MuXViP5NUpA6g7KuTag1WdntrRHV6Aw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 64.207.220.244) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=cadence.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=cadence.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ed/E38DVP6xDQFl5ZXwa+J3X/QlRabm7GeG1fY8OUv8=; b=jmHKv/eFfjgQoSVHtEKq9VExbTHIctDVBsUNAHwmL883RV5I2TenCH/pqZcCoDWhjOcf3/yxAVU70x78SjQnVmlTS0lu9AA7SddxdOVltwHG+ccSt7JuCWGwHc7+qVTLdIlFjquaueHCrBHI+UBsaJCH/2oD8A1PJnofXR/BKa0= Received: from BN9PR03CA0348.namprd03.prod.outlook.com (2603:10b6:408:f6::23) by DM6PR07MB6348.namprd07.prod.outlook.com (2603:10b6:5:153::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.20; Thu, 4 Mar 2021 06:08:25 +0000 Received: from BN8NAM12FT023.eop-nam12.prod.protection.outlook.com (2603:10b6:408:f6:cafe::fd) by BN9PR03CA0348.outlook.office365.com (2603:10b6:408:f6::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17 via Frontend Transport; Thu, 4 Mar 2021 06:08:25 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 64.207.220.244) smtp.mailfrom=cadence.com; lists.infradead.org; dkim=none (message not signed) header.d=none;lists.infradead.org; dmarc=pass action=none header.from=cadence.com; Received-SPF: Pass (protection.outlook.com: domain of cadence.com designates 64.207.220.244 as permitted sender) receiver=protection.outlook.com; client-ip=64.207.220.244; helo=wcmailrelayl01.cadence.com; Received: from wcmailrelayl01.cadence.com (64.207.220.244) by BN8NAM12FT023.mail.protection.outlook.com (10.13.183.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.9 via Frontend Transport; Thu, 4 Mar 2021 06:08:24 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by wcmailrelayl01.cadence.com (8.14.7/8.14.4) with ESMTP id 12468Jjo067409 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=OK); Wed, 3 Mar 2021 22:08:23 -0800 X-CrossPremisesHeadersFilteredBySendConnector: maileu3.global.cadence.com Received: from maileu3.global.cadence.com (10.160.88.99) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 4 Mar 2021 07:08:18 +0100 Received: from vleu-orange.cadence.com (10.160.88.83) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 4 Mar 2021 07:08:18 +0100 Received: from vleu-orange.cadence.com (localhost.localdomain [127.0.0.1]) by vleu-orange.cadence.com (8.14.4/8.14.4) with ESMTP id 12468IoP032345; Thu, 4 Mar 2021 07:08:18 +0100 Received: (from sjakhade@localhost) by vleu-orange.cadence.com (8.14.4/8.14.4/Submit) id 12468IXD032344; Thu, 4 Mar 2021 07:08:18 +0100 From: Swapnil Jakhade To: , , , CC: , , , Subject: [PATCH 1/4] phy: cadence-torrent: Update PCIe + QSGMII config for correct PLL1 clock Date: Thu, 4 Mar 2021 07:08:13 +0100 Message-ID: <1614838096-32291-2-git-send-email-sjakhade@cadence.com> X-Mailer: git-send-email 2.4.5 In-Reply-To: <1614838096-32291-1-git-send-email-sjakhade@cadence.com> References: <1614838096-32291-1-git-send-email-sjakhade@cadence.com> MIME-Version: 1.0 X-OrganizationHeadersPreserved: maileu3.global.cadence.com X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 34b59c8e-25bf-4048-04de-08d8ded3ebac X-MS-TrafficTypeDiagnostic: DM6PR07MB6348: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:446; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2knfmheyYwut0oVhGMalXqPUckeXU0D0Kya2Xmb+luQmyp5ck9zv6UP83oZ5SOplgrrkTTWIg1qnGl3Y5kyluXu7KEBay/waNRFdbshOZwWDQcVFw/O7ugWJEkL5Oc6x2axQCpOiRsBBpI3ppAuxKl/CcOsggWW/AnWydqP62kRoFXlPZXf7Lw6vvVPiOYT/c1SHADOdhz+E6TFHHACZEQys7zplvfzymAPQTYFdFVTplO0PKvg37y24maLT7ovpvNAoZqVyV7ORoKfqBQvkUb55kHo/LioY8cpDd3EFAeegxN2aF4XNGLvjM1nghkEjexmxwz54/FW6/Lx1KxNgz2luQVX6yd6IpX2LDlBIkSn5pDXQ03O5e1L3O7ufx83ajg6H+IuxPzdJL8iTr5k2lh2fRHYlE6lrktvGfMxfzJ8h7tC0q8HGN/VrfLe9Pt52WgPjbbMDyI69Tu171s4AdbRN6SjwB4J3qD9Gd+2QFM5s/UpzACcZYg/XYOrWSUr7gzOVaS6lJhsOR4tlyps7JnM1/7lz13sLnTdfX4P3QgqEb4osv4Kdo6MWVIgx6KHORxinZYMDxBS5GHLnJp8gLkjZ1ZHWpAiwaeC/zKnYAB0zR6u3Krsy79DMBHvflc58vZN6hQjDWYnUL3efyH6rpYGK1g6EdO5YeGsRXckT3MeTZJMVOYaeWepaoyoxL6Qbeba7XDatQSLwvW4ToNTHjg== X-Forefront-Antispam-Report: CIP:64.207.220.244; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:wcmailrelayl01.cadence.com; PTR:ErrorRetry; CAT:NONE; SFS:(4636009)(346002)(376002)(136003)(396003)(39860400002)(36092001)(36840700001)(46966006)(42186006)(2906002)(26005)(86362001)(478600001)(81166007)(82310400003)(356005)(426003)(36756003)(2616005)(47076005)(4326008)(36860700001)(15650500001)(8676002)(36906005)(8936002)(336012)(6666004)(186003)(70586007)(5660300002)(83380400001)(70206006)(110136005)(82740400003)(54906003)(316002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2021 06:08:24.4830 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 34b59c8e-25bf-4048-04de-08d8ded3ebac X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[64.207.220.244]; Helo=[wcmailrelayl01.cadence.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM12FT023.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR07MB6348 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.761 definitions=2021-03-04_01:2021-03-03, 2021-03-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 bulkscore=0 clxscore=1011 adultscore=0 impostorscore=0 mlxlogscore=999 mlxscore=0 lowpriorityscore=0 spamscore=0 phishscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103040025 X-Mailman-Approved-At: Fri, 05 Mar 2021 03:59:53 +0000 X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org For PCIe + QSGMII configuration where QSGMII was using PLL1 and was expecting 10GHz clock, configuration was giving 8GHz clock. Update register sequences to get correct PLL1 configuration. Also, update single link PCIe and single link SGMII/QSGMII configurations with related changes. Signed-off-by: Swapnil Jakhade Signed-off-by: Kishon Vijay Abraham I --- drivers/phy/cadence/phy-cadence-torrent.c | 77 ++++++++++++++--------- 1 file changed, 49 insertions(+), 28 deletions(-) diff --git a/drivers/phy/cadence/phy-cadence-torrent.c b/drivers/phy/cadence/phy-cadence-torrent.c index 9a882bcfd7be..ae1cea2271be 100644 --- a/drivers/phy/cadence/phy-cadence-torrent.c +++ b/drivers/phy/cadence/phy-cadence-torrent.c @@ -126,6 +126,8 @@ #define CMN_PLL1_FRACDIVH_M0 0x00D2U #define CMN_PLL1_HIGH_THR_M0 0x00D3U #define CMN_PLL1_DSM_DIAG_M0 0x00D4U +#define CMN_PLL1_DSM_FBH_OVRD_M0 0x00D5U +#define CMN_PLL1_DSM_FBL_OVRD_M0 0x00D6U #define CMN_PLL1_SS_CTRL1_M0 0x00D8U #define CMN_PLL1_SS_CTRL2_M0 0x00D9U #define CMN_PLL1_SS_CTRL3_M0 0x00DAU @@ -167,6 +169,7 @@ #define TX_TXCC_CPOST_MULT_00 0x004CU #define TX_TXCC_CPOST_MULT_01 0x004DU #define TX_TXCC_MGNFS_MULT_000 0x0050U +#define TX_TXCC_MGNFS_MULT_100 0x0054U #define DRV_DIAG_TX_DRV 0x00C6U #define XCVR_DIAG_PLLDRC_CTRL 0x00E5U #define XCVR_DIAG_HSCLK_SEL 0x00E6U @@ -2841,12 +2844,22 @@ static struct cdns_torrent_vals sgmii_pcie_xcvr_diag_ln_vals = { }; /* SGMII 100 MHz Ref clk, no SSC */ -static struct cdns_reg_pairs sgmii_100_no_ssc_cmn_regs[] = { +static struct cdns_reg_pairs sl_sgmii_100_no_ssc_cmn_regs[] = { + {0x0028, CMN_PDIAG_PLL1_CP_PADJ_M0}, + {0x001E, CMN_PLL1_DSM_FBH_OVRD_M0}, + {0x000C, CMN_PLL1_DSM_FBL_OVRD_M0}, {0x0003, CMN_PLL0_VCOCAL_TCTRL}, - {0x0003, CMN_PLL1_VCOCAL_TCTRL}, - {0x3700, CMN_DIAG_BIAS_OVRD1}, - {0x0008, CMN_TXPUCAL_TUNE}, - {0x0008, CMN_TXPDCAL_TUNE} + {0x0003, CMN_PLL1_VCOCAL_TCTRL} +}; + +static struct cdns_torrent_vals sl_sgmii_100_no_ssc_cmn_vals = { + .reg_pairs = sl_sgmii_100_no_ssc_cmn_regs, + .num_regs = ARRAY_SIZE(sl_sgmii_100_no_ssc_cmn_regs), +}; + +static struct cdns_reg_pairs sgmii_100_no_ssc_cmn_regs[] = { + {0x007F, CMN_TXPUCAL_TUNE}, + {0x007F, CMN_TXPDCAL_TUNE} }; static struct cdns_reg_pairs sgmii_100_no_ssc_tx_ln_regs[] = { @@ -2932,17 +2945,14 @@ static struct cdns_reg_pairs sgmii_100_int_ssc_cmn_regs[] = { {0x0C5E, CMN_PLL1_VCOCAL_REFTIM_START}, {0x0C56, CMN_PLL0_VCOCAL_PLLCNT_START}, {0x0C56, CMN_PLL1_VCOCAL_PLLCNT_START}, - {0x0003, CMN_PLL0_VCOCAL_TCTRL}, - {0x0003, CMN_PLL1_VCOCAL_TCTRL}, {0x00C7, CMN_PLL0_LOCK_REFCNT_START}, {0x00C7, CMN_PLL1_LOCK_REFCNT_START}, {0x00C7, CMN_PLL0_LOCK_PLLCNT_START}, {0x00C7, CMN_PLL1_LOCK_PLLCNT_START}, {0x0005, CMN_PLL0_LOCK_PLLCNT_THR}, {0x0005, CMN_PLL1_LOCK_PLLCNT_THR}, - {0x3700, CMN_DIAG_BIAS_OVRD1}, - {0x0008, CMN_TXPUCAL_TUNE}, - {0x0008, CMN_TXPDCAL_TUNE} + {0x007F, CMN_TXPUCAL_TUNE}, + {0x007F, CMN_TXPDCAL_TUNE} }; static struct cdns_torrent_vals sgmii_100_int_ssc_cmn_vals = { @@ -2951,16 +2961,30 @@ static struct cdns_torrent_vals sgmii_100_int_ssc_cmn_vals = { }; /* QSGMII 100 MHz Ref clk, no SSC */ -static struct cdns_reg_pairs qsgmii_100_no_ssc_cmn_regs[] = { +static struct cdns_reg_pairs sl_qsgmii_100_no_ssc_cmn_regs[] = { + {0x0028, CMN_PDIAG_PLL1_CP_PADJ_M0}, + {0x001E, CMN_PLL1_DSM_FBH_OVRD_M0}, + {0x000C, CMN_PLL1_DSM_FBL_OVRD_M0}, {0x0003, CMN_PLL0_VCOCAL_TCTRL}, {0x0003, CMN_PLL1_VCOCAL_TCTRL} }; +static struct cdns_torrent_vals sl_qsgmii_100_no_ssc_cmn_vals = { + .reg_pairs = sl_qsgmii_100_no_ssc_cmn_regs, + .num_regs = ARRAY_SIZE(sl_qsgmii_100_no_ssc_cmn_regs), +}; + +static struct cdns_reg_pairs qsgmii_100_no_ssc_cmn_regs[] = { + {0x007F, CMN_TXPUCAL_TUNE}, + {0x007F, CMN_TXPDCAL_TUNE} +}; + static struct cdns_reg_pairs qsgmii_100_no_ssc_tx_ln_regs[] = { {0x00F3, TX_PSC_A0}, {0x04A2, TX_PSC_A2}, {0x04A2, TX_PSC_A3}, {0x0000, TX_TXCC_CPOST_MULT_00}, + {0x0011, TX_TXCC_MGNFS_MULT_100}, {0x0003, DRV_DIAG_TX_DRV} }; @@ -3039,14 +3063,14 @@ static struct cdns_reg_pairs qsgmii_100_int_ssc_cmn_regs[] = { {0x0C5E, CMN_PLL1_VCOCAL_REFTIM_START}, {0x0C56, CMN_PLL0_VCOCAL_PLLCNT_START}, {0x0C56, CMN_PLL1_VCOCAL_PLLCNT_START}, - {0x0003, CMN_PLL0_VCOCAL_TCTRL}, - {0x0003, CMN_PLL1_VCOCAL_TCTRL}, {0x00C7, CMN_PLL0_LOCK_REFCNT_START}, {0x00C7, CMN_PLL1_LOCK_REFCNT_START}, {0x00C7, CMN_PLL0_LOCK_PLLCNT_START}, {0x00C7, CMN_PLL1_LOCK_PLLCNT_START}, {0x0005, CMN_PLL0_LOCK_PLLCNT_THR}, - {0x0005, CMN_PLL1_LOCK_PLLCNT_THR} + {0x0005, CMN_PLL1_LOCK_PLLCNT_THR}, + {0x007F, CMN_TXPUCAL_TUNE}, + {0x007F, CMN_TXPDCAL_TUNE} }; static struct cdns_torrent_vals qsgmii_100_int_ssc_cmn_vals = { @@ -3118,8 +3142,6 @@ static struct cdns_reg_pairs pcie_100_int_ssc_cmn_regs[] = { {0x0C5E, CMN_PLL1_VCOCAL_REFTIM_START}, {0x0C56, CMN_PLL0_VCOCAL_PLLCNT_START}, {0x0C56, CMN_PLL1_VCOCAL_PLLCNT_START}, - {0x0003, CMN_PLL0_VCOCAL_TCTRL}, - {0x0003, CMN_PLL1_VCOCAL_TCTRL}, {0x00C7, CMN_PLL0_LOCK_REFCNT_START}, {0x00C7, CMN_PLL1_LOCK_REFCNT_START}, {0x00C7, CMN_PLL0_LOCK_PLLCNT_START}, @@ -3175,8 +3197,6 @@ static struct cdns_reg_pairs sl_pcie_100_int_ssc_cmn_regs[] = { {0x0C5E, CMN_PLL1_VCOCAL_REFTIM_START}, {0x0C56, CMN_PLL0_VCOCAL_PLLCNT_START}, {0x0C56, CMN_PLL1_VCOCAL_PLLCNT_START}, - {0x0003, CMN_PLL0_VCOCAL_TCTRL}, - {0x0003, CMN_PLL1_VCOCAL_TCTRL}, {0x00C7, CMN_PLL0_LOCK_REFCNT_START}, {0x00C7, CMN_PLL1_LOCK_REFCNT_START}, {0x00C7, CMN_PLL0_LOCK_PLLCNT_START}, @@ -3192,8 +3212,9 @@ static struct cdns_torrent_vals sl_pcie_100_int_ssc_cmn_vals = { /* PCIe, 100 MHz Ref clk, no SSC & external SSC */ static struct cdns_reg_pairs pcie_100_ext_no_ssc_cmn_regs[] = { - {0x0003, CMN_PLL0_VCOCAL_TCTRL}, - {0x0003, CMN_PLL1_VCOCAL_TCTRL} + {0x0028, CMN_PDIAG_PLL1_CP_PADJ_M0}, + {0x001E, CMN_PLL1_DSM_FBH_OVRD_M0}, + {0x000C, CMN_PLL1_DSM_FBL_OVRD_M0} }; static struct cdns_reg_pairs pcie_100_ext_no_ssc_rx_ln_regs[] = { @@ -3394,8 +3415,8 @@ static const struct cdns_torrent_data cdns_map_torrent = { .cmn_vals = { [TYPE_PCIE] = { [TYPE_NONE] = { - [NO_SSC] = &pcie_100_no_ssc_cmn_vals, - [EXTERNAL_SSC] = &pcie_100_no_ssc_cmn_vals, + [NO_SSC] = NULL, + [EXTERNAL_SSC] = NULL, [INTERNAL_SSC] = &sl_pcie_100_int_ssc_cmn_vals, }, [TYPE_SGMII] = { @@ -3416,7 +3437,7 @@ static const struct cdns_torrent_data cdns_map_torrent = { }, [TYPE_SGMII] = { [TYPE_NONE] = { - [NO_SSC] = &sgmii_100_no_ssc_cmn_vals, + [NO_SSC] = &sl_sgmii_100_no_ssc_cmn_vals, }, [TYPE_PCIE] = { [NO_SSC] = &sgmii_100_no_ssc_cmn_vals, @@ -3431,7 +3452,7 @@ static const struct cdns_torrent_data cdns_map_torrent = { }, [TYPE_QSGMII] = { [TYPE_NONE] = { - [NO_SSC] = &qsgmii_100_no_ssc_cmn_vals, + [NO_SSC] = &sl_qsgmii_100_no_ssc_cmn_vals, }, [TYPE_PCIE] = { [NO_SSC] = &qsgmii_100_no_ssc_cmn_vals, @@ -3803,8 +3824,8 @@ static const struct cdns_torrent_data ti_j721e_map_torrent = { .cmn_vals = { [TYPE_PCIE] = { [TYPE_NONE] = { - [NO_SSC] = &pcie_100_no_ssc_cmn_vals, - [EXTERNAL_SSC] = &pcie_100_no_ssc_cmn_vals, + [NO_SSC] = NULL, + [EXTERNAL_SSC] = NULL, [INTERNAL_SSC] = &sl_pcie_100_int_ssc_cmn_vals, }, [TYPE_SGMII] = { @@ -3825,7 +3846,7 @@ static const struct cdns_torrent_data ti_j721e_map_torrent = { }, [TYPE_SGMII] = { [TYPE_NONE] = { - [NO_SSC] = &sgmii_100_no_ssc_cmn_vals, + [NO_SSC] = &sl_sgmii_100_no_ssc_cmn_vals, }, [TYPE_PCIE] = { [NO_SSC] = &sgmii_100_no_ssc_cmn_vals, @@ -3840,7 +3861,7 @@ static const struct cdns_torrent_data ti_j721e_map_torrent = { }, [TYPE_QSGMII] = { [TYPE_NONE] = { - [NO_SSC] = &qsgmii_100_no_ssc_cmn_vals, + [NO_SSC] = &sl_qsgmii_100_no_ssc_cmn_vals, }, [TYPE_PCIE] = { [NO_SSC] = &qsgmii_100_no_ssc_cmn_vals, From patchwork Thu Mar 4 06:08:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Swapnil Kashinath Jakhade X-Patchwork-Id: 12117475 X-Patchwork-Delegate: kishon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CA2FC43381 for ; Fri, 5 Mar 2021 04:00:03 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 939A56500C for ; Fri, 5 Mar 2021 04:00:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 939A56500C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cadence.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TCOCsXnKjzcez0lxGcACHvjYR0fnJ6u0LE3Om7sT1TA=; b=YbySue6h84ikcDEzgRr2wdl9f rFhzYCv98KSy4g0VNj/UAJdgBor+QQH6If489Wuix/sk6YBBculhIp4K8jVGPjU4IQlG8LBMOeS5F ixJD7ZDDxECnSuyNValNNLhDsKc3kNG6K7B6I0KLLmieYpqxDkiWQ/Z0NWaPZPJ4ui/ZZcurQlu7N IWcK1LjZtH4ckJ95tEcJ7VE/92MmsZxgBuNU1qFegM3DMqTP5uByHleWZNpcjr80HyRyDbylBbWxd p14mQdL6R7SvByynMptR35RAY0rj+MMq+Fg0KVjemYONNLtxGLFsfKWLiWscWtpkGXTwtmtcv3RzZ yHu+PXi/Q==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lI1dA-00CEiH-SL; Fri, 05 Mar 2021 04:00:01 +0000 Received: from mx0b-0014ca01.pphosted.com ([208.86.201.193] helo=mx0a-0014ca01.pphosted.com) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lHhAN-007sph-CE for linux-phy@lists.infradead.org; Thu, 04 Mar 2021 06:09:45 +0000 Received: from pps.filterd (m0042333.ppops.net [127.0.0.1]) by mx0b-0014ca01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 1245tlu4026179; Wed, 3 Mar 2021 22:08:30 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=proofpoint; bh=H/HYDqvp99xauiCPwtqUeDogM5vAS8KWumCbXfeKsAA=; b=Xk20vxlnFqNmnrD3OfZQwlVdNRwzOAA5oqysPpoqqfpev0g6sP3SyESOcyP/Cq+/Skdr E2WuuL+Nd4HCCpLd/0YVy0nsZncF7Jcw2viLNIuj/Kges9wYFyWft1WMfSJl7HjSynCY Mqt1nDWvOTAIlTL2dF037JnC4oD7De/B5cZKDv31R+pWta9SG+j28BXTjX2UKiP6WPfG oz2FZhefrDvETJeF+OR6Zw85mdaPz7xgBAgWO3jz1yZ1ATFOwc7DofBVDSv3g9R5NYZ4 6MQpd0jThAQWbrEz9cLgnug0ZcaASn47fWVKTxvaWD3Ls7vS7wIZQI5Jrsx4QsdrTRMs fg== Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2176.outbound.protection.outlook.com [104.47.56.176]) by mx0b-0014ca01.pphosted.com with ESMTP id 36yjj2r9es-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 03 Mar 2021 22:08:29 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kOlpah9SVDRTnl1v+xIoWqCh7bRd7kvWIGxUPDlhRzyG6IeNY9Ofy3r7ckWOoXEwRuOvdXUqa0iz57rxofn3FGyKe6ae9lcDz+uLejY6p0e+HPsmDvV7WWvq7MitcdeqhGNbWpzhcTNPN23cF8YCD7htVhfSNcaExnvc2Ulc1nvgZvw6BsHHGVUJ9A3aR5vencCOg0hjiaXZJEnTwoa5H9zR9R8dPgeWP8iIw+t1NiNAIVDDjGflsr5KcHgo7BCo+cLVVCrEp1m7Pwqx91FjrOYSSswLViRkNuuuDM0tooP/dggHB/8/G3bipby/agBfKBOuh2YCxawaYmObIpfcaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=H/HYDqvp99xauiCPwtqUeDogM5vAS8KWumCbXfeKsAA=; b=km89+tcqGrbxFKVuYQZ1Qe2PnAp2Cb6IxnddJHOGno9qrE1Twf/W9hhfODkwX2EtxFJQgjHf8aU6ZmCgwXL14JYYWYy0848paJ+SgV9cpHGrN+adcg3bi0hAiev2Gy5qOAkpPLwhX7MOSjs2afBITCDddoQ+cRO3/YV50Q/WlUrGzSPkn+imDbA7A7RPlgMPbSMK99zW6shgZeCSM7/TEHZCblHgIh2KdTckDrMP0pR+WgQnJfWK/QqPfGRTRbjKo/VGRSTRgIiGC98tE2l0yTPMg23I8eTXD4yuXcspcSYO0MGBEp35ZWuSaCS18y4sZ6ktxuskMhmrpBtNzO2Yag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 64.207.220.244) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=cadence.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=cadence.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=H/HYDqvp99xauiCPwtqUeDogM5vAS8KWumCbXfeKsAA=; b=R+HmPAVfBPQU42KJp9cKrXQ/nRncTBK12TqFOJ4mK+CIeQmzZeEqKOkNyuTpUI2oObMBnr0c93VmuTSlBdvnSPJdMyYNMKYH4vvgibnicNl19+LWcyzpuWuiRuWqjWmt/406nXSDW6uijT+/6vB1IHAFZ4WNR4nVXGFVz87+s74= Received: from DS7PR03CA0276.namprd03.prod.outlook.com (2603:10b6:5:3ad::11) by MW2PR07MB3995.namprd07.prod.outlook.com (2603:10b6:907:a::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.23; Thu, 4 Mar 2021 06:08:27 +0000 Received: from DM6NAM12FT017.eop-nam12.prod.protection.outlook.com (2603:10b6:5:3ad:cafe::32) by DS7PR03CA0276.outlook.office365.com (2603:10b6:5:3ad::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17 via Frontend Transport; Thu, 4 Mar 2021 06:08:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 64.207.220.244) smtp.mailfrom=cadence.com; lists.infradead.org; dkim=none (message not signed) header.d=none;lists.infradead.org; dmarc=pass action=none header.from=cadence.com; Received-SPF: Pass (protection.outlook.com: domain of cadence.com designates 64.207.220.244 as permitted sender) receiver=protection.outlook.com; client-ip=64.207.220.244; helo=wcmailrelayl01.cadence.com; Received: from wcmailrelayl01.cadence.com (64.207.220.244) by DM6NAM12FT017.mail.protection.outlook.com (10.13.178.65) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.9 via Frontend Transport; Thu, 4 Mar 2021 06:08:24 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by wcmailrelayl01.cadence.com (8.14.7/8.14.4) with ESMTP id 12468Jjp067409 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=OK); Wed, 3 Mar 2021 22:08:23 -0800 X-CrossPremisesHeadersFilteredBySendConnector: maileu3.global.cadence.com Received: from maileu3.global.cadence.com (10.160.88.99) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 4 Mar 2021 07:08:18 +0100 Received: from vleu-orange.cadence.com (10.160.88.83) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 4 Mar 2021 07:08:18 +0100 Received: from vleu-orange.cadence.com (localhost.localdomain [127.0.0.1]) by vleu-orange.cadence.com (8.14.4/8.14.4) with ESMTP id 12468ItP032349; Thu, 4 Mar 2021 07:08:18 +0100 Received: (from sjakhade@localhost) by vleu-orange.cadence.com (8.14.4/8.14.4/Submit) id 12468IMM032348; Thu, 4 Mar 2021 07:08:18 +0100 From: Swapnil Jakhade To: , , , CC: , , , Subject: [PATCH 2/4] phy: ti: j721e-wiz: Add support for configuring QSGMII Date: Thu, 4 Mar 2021 07:08:14 +0100 Message-ID: <1614838096-32291-3-git-send-email-sjakhade@cadence.com> X-Mailer: git-send-email 2.4.5 In-Reply-To: <1614838096-32291-1-git-send-email-sjakhade@cadence.com> References: <1614838096-32291-1-git-send-email-sjakhade@cadence.com> MIME-Version: 1.0 X-OrganizationHeadersPreserved: maileu3.global.cadence.com X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 30dc8735-089f-42a0-aa07-08d8ded3ebeb X-MS-TrafficTypeDiagnostic: MW2PR07MB3995: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:854; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QPaFs/63tS4kHBZ+HnImnl3gSgI36vtC0fmH+UZzIxg0aV2/1fRRgdFew1uTMOJnRRUsNxn/DHCB6wkJx1hrGYb1CBj3+nESSGNbpZky9heSDiP6u7dHnTmMuXbayJCUZQjd3LpuIaMg4V9R8NPTtkqa//jsVAK1EOIU3vEKtXUt3WlbgTISw+SeqAuGXWD9fQKNZo8e/o1Ds7Si7qhqY/cn6C/yYU7lE5iumdjdHit9EwYThfQvQw9O4MEpHBbmSShhBPru831KeF2zRUiK5636sJGIHp7/vCCJVreSqpB4C1Lqa1oWj+lOkvnOBT47ly0GqrSivveWhZc2pcNMyleeMmQAIipynnOBhEfvROwDhXbyz+k9VdjEfrl3kUkVtxJWdt34eWQOKC7GDUYNbKF6Pjiz1/xGoh4qHXpGKFG0rqgsdZ5s77NUWReiUtfO65UIGu2wNxvZtQDWB8aLX+Tcwoe5yeaqZonTjcZxYxui3TXMgNUMju+GIjTZmxnMDg5Qk1NYkGUco5PqItCRSPAlcKE3qgHCIOLqGLbZ7l4lIvUP4ABi2apyEXgr0BHW6/VlzzyiF5mmXeAtqmf3seoAzXjJ2Wz1oZKLmnk9KtJtPbhHOX4SUVWzmUaLeDaqrqPgubC7QgZ6PejzZh6Rk4E2C7WYygRJpWhmLh2Seea0TkSN+oTddh8vCYVPaT5ifgxaIQ7Y23VYBeCj/fnFGA== X-Forefront-Antispam-Report: CIP:64.207.220.244; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:wcmailrelayl01.cadence.com; PTR:ErrorRetry; CAT:NONE; SFS:(4636009)(396003)(39860400002)(376002)(136003)(346002)(36092001)(46966006)(36840700001)(478600001)(316002)(70586007)(70206006)(81166007)(36906005)(4326008)(6666004)(8676002)(8936002)(356005)(186003)(54906003)(42186006)(36756003)(336012)(26005)(5660300002)(2616005)(110136005)(82740400003)(426003)(83380400001)(86362001)(47076005)(82310400003)(36860700001)(2906002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2021 06:08:24.9351 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 30dc8735-089f-42a0-aa07-08d8ded3ebeb X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[64.207.220.244]; Helo=[wcmailrelayl01.cadence.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM12FT017.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR07MB3995 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.761 definitions=2021-03-04_01:2021-03-03, 2021-03-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 bulkscore=0 clxscore=1015 adultscore=0 impostorscore=0 mlxlogscore=999 mlxscore=0 lowpriorityscore=0 spamscore=0 phishscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103040025 X-Mailman-Approved-At: Fri, 05 Mar 2021 03:59:54 +0000 X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org From: Kishon Vijay Abraham I Configure MAC clock dividers required for QSGMII to be functional. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Swapnil Jakhade --- drivers/phy/ti/phy-j721e-wiz.c | 64 ++++++++++++++++++++++++++++++++-- 1 file changed, 62 insertions(+), 2 deletions(-) diff --git a/drivers/phy/ti/phy-j721e-wiz.c b/drivers/phy/ti/phy-j721e-wiz.c index 03896240a5d5..995c7dbec77b 100644 --- a/drivers/phy/ti/phy-j721e-wiz.c +++ b/drivers/phy/ti/phy-j721e-wiz.c @@ -27,6 +27,7 @@ #define WIZ_SERDES_RST 0x40c #define WIZ_SERDES_TYPEC 0x410 #define WIZ_LANECTL(n) (0x480 + (0x40 * (n))) +#define WIZ_LANEDIV(n) (0x484 + (0x40 * (n))) #define WIZ_MAX_INPUT_CLOCKS 4 /* To include mux clocks, divider clocks and gate clocks */ @@ -127,6 +128,20 @@ static const struct reg_field p0_fullrt_div[WIZ_MAX_LANES] = { REG_FIELD(WIZ_LANECTL(3), 22, 23), }; +static const struct reg_field p_mac_div_sel0[WIZ_MAX_LANES] = { + REG_FIELD(WIZ_LANEDIV(0), 16, 22), + REG_FIELD(WIZ_LANEDIV(1), 16, 22), + REG_FIELD(WIZ_LANEDIV(2), 16, 22), + REG_FIELD(WIZ_LANEDIV(3), 16, 22), +}; + +static const struct reg_field p_mac_div_sel1[WIZ_MAX_LANES] = { + REG_FIELD(WIZ_LANEDIV(0), 0, 8), + REG_FIELD(WIZ_LANEDIV(1), 0, 8), + REG_FIELD(WIZ_LANEDIV(2), 0, 8), + REG_FIELD(WIZ_LANEDIV(3), 0, 8), +}; + static const struct reg_field typec_ln10_swap = REG_FIELD(WIZ_SERDES_TYPEC, 30, 30); @@ -252,6 +267,8 @@ struct wiz { struct regmap_field *p_align[WIZ_MAX_LANES]; struct regmap_field *p_raw_auto_start[WIZ_MAX_LANES]; struct regmap_field *p_standard_mode[WIZ_MAX_LANES]; + struct regmap_field *p_mac_div_sel0[WIZ_MAX_LANES]; + struct regmap_field *p_mac_div_sel1[WIZ_MAX_LANES]; struct regmap_field *p0_fullrt_div[WIZ_MAX_LANES]; struct regmap_field *pma_cmn_refclk_int_mode; struct regmap_field *pma_cmn_refclk_mode; @@ -290,6 +307,27 @@ static int wiz_reset(struct wiz *wiz) return 0; } +static int wiz_p_mac_div_sel(struct wiz *wiz) +{ + u32 num_lanes = wiz->num_lanes; + int ret; + int i; + + for (i = 0; i < num_lanes; i++) { + if (wiz->lane_phy_type[i] == PHY_TYPE_QSGMII) { + ret = regmap_field_write(wiz->p_mac_div_sel0[i], 1); + if (ret) + return ret; + + ret = regmap_field_write(wiz->p_mac_div_sel1[i], 2); + if (ret) + return ret; + } + } + + return 0; +} + static int wiz_mode_select(struct wiz *wiz) { u32 num_lanes = wiz->num_lanes; @@ -300,8 +338,8 @@ static int wiz_mode_select(struct wiz *wiz) for (i = 0; i < num_lanes; i++) { if (wiz->lane_phy_type[i] == PHY_TYPE_DP) mode = LANE_MODE_GEN1; - else - mode = LANE_MODE_GEN4; + else if (wiz->lane_phy_type[i] == PHY_TYPE_QSGMII) + mode = LANE_MODE_GEN2; ret = regmap_field_write(wiz->p_standard_mode[i], mode); if (ret) @@ -347,6 +385,12 @@ static int wiz_init(struct wiz *wiz) return ret; } + ret = wiz_p_mac_div_sel(wiz); + if (ret) { + dev_err(dev, "Configuring P0 MAC DIV SEL failed\n"); + return ret; + } + ret = wiz_init_raw_interface(wiz, true); if (ret) { dev_err(dev, "WIZ interface initialization failed\n"); @@ -471,6 +515,22 @@ static int wiz_regfield_init(struct wiz *wiz) dev_err(dev, "P%d_FULLRT_DIV reg field init failed\n", i); return PTR_ERR(wiz->p0_fullrt_div[i]); } + + wiz->p_mac_div_sel0[i] = + devm_regmap_field_alloc(dev, regmap, p_mac_div_sel0[i]); + if (IS_ERR(wiz->p_mac_div_sel0[i])) { + dev_err(dev, "P%d_MAC_DIV_SEL0 reg field init fail\n", + i); + return PTR_ERR(wiz->p_mac_div_sel0[i]); + } + + wiz->p_mac_div_sel1[i] = + devm_regmap_field_alloc(dev, regmap, p_mac_div_sel1[i]); + if (IS_ERR(wiz->p_mac_div_sel1[i])) { + dev_err(dev, "P%d_MAC_DIV_SEL1 reg field init fail\n", + i); + return PTR_ERR(wiz->p_mac_div_sel1[i]); + } } wiz->typec_ln10_swap = devm_regmap_field_alloc(dev, regmap, From patchwork Thu Mar 4 06:08:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Swapnil Kashinath Jakhade X-Patchwork-Id: 12117473 X-Patchwork-Delegate: kishon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16141C433E9 for ; Fri, 5 Mar 2021 04:00:02 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 862BE6500C for ; Fri, 5 Mar 2021 04:00:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 862BE6500C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cadence.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Cq6blVESZRAa9TCUHhr566rilLDIgsFCxX8ll3gKyKg=; b=lLGbaDHXjLax2Z7N2aC8LrFAw v5hhxfXJZlSHWEbeOFcHQUY+pPLRW8IPW9W6n7ewt0UQZ68SLFIXgKG0P+cgIprWWt+3fWfHKvY84 YdTOYRYwZi2BXUcG9XZQdd8x7VkjfXvZ5dJIixAKZUp6aPNmH73kOGgOMsGVOPIUJ5XgEmgs8UoZV AYoxgipuZTSwkNdifNUPvPWb8mz5Ujs2Q0XWyzgEcu0j/X8jO3hY5Jrgds71hmTfI+QmvfohlM3g1 IKraMbO2jcDfHk9A+wIG6CPQJet/fLWQQra/l+QswkDDHHVkEvTZuGn3hXeJ9Sf6UqlBwvHCA1NpC YgHyeKDYw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lI1d9-00CEgx-Vk; Fri, 05 Mar 2021 04:00:00 +0000 Received: from mx0b-0014ca01.pphosted.com ([208.86.201.193] helo=mx0a-0014ca01.pphosted.com) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lHhAM-007spi-OC for linux-phy@lists.infradead.org; Thu, 04 Mar 2021 06:09:45 +0000 Received: from pps.filterd (m0042333.ppops.net [127.0.0.1]) by mx0b-0014ca01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 1245tlu5026179; Wed, 3 Mar 2021 22:08:30 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=proofpoint; bh=M9ncY3Cpu7bZaAuiLYiP9xpq3D3Zo9BEZzWm9h1QZ54=; b=A+19PmfaRNPZpdtvLunMBtNzKvAFnaFaIji8kN4dCmB8Y0F0YS7URstM/voCNEQs2liC +jiih10/TL/YWRFHufMGBsLsmkplj0QrW43s/Yu8RIKuIJg47QGfHODH2/SfTfqRhvuD vulSlW4D6VJx35I/yESRks2LqPtJ24L74cxPBrq5h3bpiUdoW+ELuTw16H11uPV5987d KxazhaQj/8Qz6lc/DkSbd23yIZy/+b/EhWMVajSgEi+erWdpzgOln2VUYHNJQpEkIfAF kIVsTtVbaxnQlo1pAkIDV7ofo/ZtdYXK4QVYNgw64bJHbEyDVSji2UaGphfv7kQ7rDTB gA== Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2042.outbound.protection.outlook.com [104.47.66.42]) by mx0b-0014ca01.pphosted.com with ESMTP id 36yjj2r9et-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 03 Mar 2021 22:08:30 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GMmSxzIH8bpr6Cw8feH/4jAo76jebCZ+4mrupQvK4/M/9dR5b/v02jBihWZ65+7Kr+cNjKoUricbhY3+B7M7lrZsne+fblc33h5CLTjjFGboIqfk444HTX1/BFGi3nix45H5pj7+obTZuLT/hcYV4QA8fWhbY8M6XHE06DnV7ZPfEo1FHQbDlOa6oQoeE+kfNCSVOBi86kIepqei2s63b6W7jdDYqggkir6KGI7Nb/r9zt8a/4dhO8C1V3gpYxosPKtMBNas6AFx3FbL+PNAEErvxoT5pz/DVQZ1CoJV6/bSxFbROEilNZdBEIohWPOuheyXiruwn0LD73xK2sGX4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M9ncY3Cpu7bZaAuiLYiP9xpq3D3Zo9BEZzWm9h1QZ54=; b=lRhPzL6D+Mm9qwQbYph87TVax4r+03Q2QoVR2BLrqGvKZNlPM+hzWtRQJJvZW+4vBDLhEeMFfsjMOHDEhsKC5qfCV8N6ZTtbq+GVkeB2lLJoqJMaWeWDAfq+swdt7t8NCNDSfhlZC3oihKGw1mTBUi8pgu+uaaXN7VpswYUgvOY+yHVStkTRI3k+dZFby5vg7NFFhBOrftnNTsZhpqz42GlDdpmTTxLoE4S+XRZ8L91r1iWqa3lm5NBg12fxIhWh5xnb/JMpkwknQBuJfYcobFYjypJlKxr6tdXjxCCNMTDDS4USD8cPogqfl8gzdgoGP30uh86ZwqqJneIa3wS1sA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 64.207.220.244) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=cadence.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=cadence.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M9ncY3Cpu7bZaAuiLYiP9xpq3D3Zo9BEZzWm9h1QZ54=; b=tH/+H2c4+ED4Zb9rTeFwZFpq4pnweeXresg/upUTcsog/MDdEzj//MTrK6174EW3lEFgEkA5EvSLaIIsJ+RLd+cHN8gnGa/SFb8rj+P90B8lPldDl8Q1KsQVqnYSZPSrpiWs4vNLsoDesXbZ/k0DN98Vs2LxQvhc9jAQoVsgQCI= Received: from DM5PR04CA0043.namprd04.prod.outlook.com (2603:10b6:3:12b::29) by CY1PR07MB2652.namprd07.prod.outlook.com (2a01:111:e400:c637::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.23; Thu, 4 Mar 2021 06:08:27 +0000 Received: from DM6NAM12FT056.eop-nam12.prod.protection.outlook.com (2603:10b6:3:12b:cafe::cf) by DM5PR04CA0043.outlook.office365.com (2603:10b6:3:12b::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17 via Frontend Transport; Thu, 4 Mar 2021 06:08:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 64.207.220.244) smtp.mailfrom=cadence.com; lists.infradead.org; dkim=none (message not signed) header.d=none;lists.infradead.org; dmarc=pass action=none header.from=cadence.com; Received-SPF: Pass (protection.outlook.com: domain of cadence.com designates 64.207.220.244 as permitted sender) receiver=protection.outlook.com; client-ip=64.207.220.244; helo=wcmailrelayl01.cadence.com; Received: from wcmailrelayl01.cadence.com (64.207.220.244) by DM6NAM12FT056.mail.protection.outlook.com (10.13.179.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.9 via Frontend Transport; Thu, 4 Mar 2021 06:08:25 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by wcmailrelayl01.cadence.com (8.14.7/8.14.4) with ESMTP id 12468Jjq067409 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=OK); Wed, 3 Mar 2021 22:08:24 -0800 X-CrossPremisesHeadersFilteredBySendConnector: maileu3.global.cadence.com Received: from maileu3.global.cadence.com (10.160.88.99) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 4 Mar 2021 07:08:18 +0100 Received: from vleu-orange.cadence.com (10.160.88.83) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 4 Mar 2021 07:08:18 +0100 Received: from vleu-orange.cadence.com (localhost.localdomain [127.0.0.1]) by vleu-orange.cadence.com (8.14.4/8.14.4) with ESMTP id 12468I3d032353; Thu, 4 Mar 2021 07:08:18 +0100 Received: (from sjakhade@localhost) by vleu-orange.cadence.com (8.14.4/8.14.4/Submit) id 12468IBq032352; Thu, 4 Mar 2021 07:08:18 +0100 From: Swapnil Jakhade To: , , , CC: , , , Subject: [PATCH 3/4] phy: cadence-torrent: Update SGMII/QSGMII configuration specific to TI Date: Thu, 4 Mar 2021 07:08:15 +0100 Message-ID: <1614838096-32291-4-git-send-email-sjakhade@cadence.com> X-Mailer: git-send-email 2.4.5 In-Reply-To: <1614838096-32291-1-git-send-email-sjakhade@cadence.com> References: <1614838096-32291-1-git-send-email-sjakhade@cadence.com> MIME-Version: 1.0 X-OrganizationHeadersPreserved: maileu3.global.cadence.com X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a6d2c570-1c77-4d7a-6598-08d8ded3ec45 X-MS-TrafficTypeDiagnostic: CY1PR07MB2652: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:381; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: V1rgMl9NOjQ4llkJngUCVc9rAfKx5cVHQf00wp1pzBqBYEkGEdUtxdV+qy+CkH00ty92jI8Mou+8rBFVAORk9GGw9pt1lRoj3EMSS0RGNL82Fmrn0rhDaXQK3+KC5dZcjPQ3ydLgoFWfn6B/olCR7ZbEemGUdgxtMlaB+uQwabMpyb5j5Vp2+2Ke8+f6881wKCJVKO7QluFfa1k8hLiDzLiTr2u65dB/LCGa+1CnhtAVqMoL1fjsv5D93k9ByD6sQ9UPsIjBzxGFhYW0SgWcwTalbhEaqMQAlZHmdjwHieQ5SYx4Em/x7jL8IMSiyXoUO8Cf3VKwMkG95bPhUs2FmeQEc8v+3Jmk6U2R07r+YHCH7IVFd/eGzLoDg3Ytbgp0X45oDKCd0TboWIhi1Y8u6cAnwN73BxRq6W15NTNL9P6mXA7XhNy7l24NHCYk05WnMCFkSkDHnb8dKeyOVHuHwLlfZXr82C56A6QwDVdbFkRMCG/6F9fUwHP0t7o74Jq6yInYQ5YgBsYSEQchHTfXROwlQ5G+XPV56YHPEifCrXDCDaRScnZn395UND874rFPHopKqR1HX1ptLRdbOTGxm5FKlHuRLXOBnvN+hYHXPrmnSvL3KQNEpuKEHB4FS7XHWVHIHFpYc68+qYno+jrM1WCLs7OsSIrLjUt4ZTK3bsZq1MlnQuETEqnueO3lkKgTJNUXwGXV/asjK7xaD7DmGw== X-Forefront-Antispam-Report: CIP:64.207.220.244; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:wcmailrelayl01.cadence.com; PTR:ErrorRetry; CAT:NONE; SFS:(4636009)(136003)(396003)(39860400002)(346002)(376002)(36092001)(36840700001)(46966006)(2616005)(2906002)(316002)(82740400003)(54906003)(47076005)(426003)(70586007)(8936002)(478600001)(336012)(186003)(26005)(15650500001)(8676002)(36756003)(42186006)(81166007)(6666004)(4326008)(83380400001)(70206006)(86362001)(5660300002)(356005)(36906005)(110136005)(36860700001)(82310400003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2021 06:08:25.5302 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a6d2c570-1c77-4d7a-6598-08d8ded3ec45 X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[64.207.220.244]; Helo=[wcmailrelayl01.cadence.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM12FT056.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2652 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.761 definitions=2021-03-04_01:2021-03-03, 2021-03-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 bulkscore=0 clxscore=1015 adultscore=0 impostorscore=0 mlxlogscore=779 mlxscore=0 lowpriorityscore=0 spamscore=0 phishscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103040025 X-Mailman-Approved-At: Fri, 05 Mar 2021 03:59:54 +0000 X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org From: Kishon Vijay Abraham I Update SGMII/QSGMII configuration specific to TI. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Swapnil Jakhade --- drivers/phy/cadence/phy-cadence-torrent.c | 58 +++++++++++++++++------ 1 file changed, 44 insertions(+), 14 deletions(-) diff --git a/drivers/phy/cadence/phy-cadence-torrent.c b/drivers/phy/cadence/phy-cadence-torrent.c index ae1cea2271be..f78a6731c26a 100644 --- a/drivers/phy/cadence/phy-cadence-torrent.c +++ b/drivers/phy/cadence/phy-cadence-torrent.c @@ -174,6 +174,7 @@ #define XCVR_DIAG_PLLDRC_CTRL 0x00E5U #define XCVR_DIAG_HSCLK_SEL 0x00E6U #define XCVR_DIAG_HSCLK_DIV 0x00E7U +#define XCVR_DIAG_RXCLK_CTRL 0x00E9U #define XCVR_DIAG_BIDI_CTRL 0x00EAU #define XCVR_DIAG_PSC_OVRD 0x00EBU #define TX_PSC_A0 0x0100U @@ -2870,6 +2871,15 @@ static struct cdns_reg_pairs sgmii_100_no_ssc_tx_ln_regs[] = { {0x00B3, DRV_DIAG_TX_DRV} }; +static struct cdns_reg_pairs ti_sgmii_100_no_ssc_tx_ln_regs[] = { + {0x00F3, TX_PSC_A0}, + {0x04A2, TX_PSC_A2}, + {0x04A2, TX_PSC_A3}, + {0x0000, TX_TXCC_CPOST_MULT_00}, + {0x00B3, DRV_DIAG_TX_DRV}, + {0x4000, XCVR_DIAG_RXCLK_CTRL}, +}; + static struct cdns_reg_pairs sgmii_100_no_ssc_rx_ln_regs[] = { {0x091D, RX_PSC_A0}, {0x0900, RX_PSC_A2}, @@ -2898,6 +2908,11 @@ static struct cdns_torrent_vals sgmii_100_no_ssc_tx_ln_vals = { .num_regs = ARRAY_SIZE(sgmii_100_no_ssc_tx_ln_regs), }; +static struct cdns_torrent_vals ti_sgmii_100_no_ssc_tx_ln_vals = { + .reg_pairs = ti_sgmii_100_no_ssc_tx_ln_regs, + .num_regs = ARRAY_SIZE(ti_sgmii_100_no_ssc_tx_ln_regs), +}; + static struct cdns_torrent_vals sgmii_100_no_ssc_rx_ln_vals = { .reg_pairs = sgmii_100_no_ssc_rx_ln_regs, .num_regs = ARRAY_SIZE(sgmii_100_no_ssc_rx_ln_regs), @@ -2988,6 +3003,16 @@ static struct cdns_reg_pairs qsgmii_100_no_ssc_tx_ln_regs[] = { {0x0003, DRV_DIAG_TX_DRV} }; +static struct cdns_reg_pairs ti_qsgmii_100_no_ssc_tx_ln_regs[] = { + {0x00F3, TX_PSC_A0}, + {0x04A2, TX_PSC_A2}, + {0x04A2, TX_PSC_A3}, + {0x0000, TX_TXCC_CPOST_MULT_00}, + {0x0011, TX_TXCC_MGNFS_MULT_100}, + {0x0003, DRV_DIAG_TX_DRV}, + {0x4000, XCVR_DIAG_RXCLK_CTRL}, +}; + static struct cdns_reg_pairs qsgmii_100_no_ssc_rx_ln_regs[] = { {0x091D, RX_PSC_A0}, {0x0900, RX_PSC_A2}, @@ -3016,6 +3041,11 @@ static struct cdns_torrent_vals qsgmii_100_no_ssc_tx_ln_vals = { .num_regs = ARRAY_SIZE(qsgmii_100_no_ssc_tx_ln_regs), }; +static struct cdns_torrent_vals ti_qsgmii_100_no_ssc_tx_ln_vals = { + .reg_pairs = ti_qsgmii_100_no_ssc_tx_ln_regs, + .num_regs = ARRAY_SIZE(ti_qsgmii_100_no_ssc_tx_ln_regs), +}; + static struct cdns_torrent_vals qsgmii_100_no_ssc_rx_ln_vals = { .reg_pairs = qsgmii_100_no_ssc_rx_ln_regs, .num_regs = ARRAY_SIZE(qsgmii_100_no_ssc_rx_ln_regs), @@ -3922,32 +3952,32 @@ static const struct cdns_torrent_data ti_j721e_map_torrent = { }, [TYPE_SGMII] = { [TYPE_NONE] = { - [NO_SSC] = &sgmii_100_no_ssc_tx_ln_vals, + [NO_SSC] = &ti_sgmii_100_no_ssc_tx_ln_vals, }, [TYPE_PCIE] = { - [NO_SSC] = &sgmii_100_no_ssc_tx_ln_vals, - [EXTERNAL_SSC] = &sgmii_100_no_ssc_tx_ln_vals, - [INTERNAL_SSC] = &sgmii_100_no_ssc_tx_ln_vals, + [NO_SSC] = &ti_sgmii_100_no_ssc_tx_ln_vals, + [EXTERNAL_SSC] = &ti_sgmii_100_no_ssc_tx_ln_vals, + [INTERNAL_SSC] = &ti_sgmii_100_no_ssc_tx_ln_vals, }, [TYPE_USB] = { - [NO_SSC] = &sgmii_100_no_ssc_tx_ln_vals, - [EXTERNAL_SSC] = &sgmii_100_no_ssc_tx_ln_vals, - [INTERNAL_SSC] = &sgmii_100_no_ssc_tx_ln_vals, + [NO_SSC] = &ti_sgmii_100_no_ssc_tx_ln_vals, + [EXTERNAL_SSC] = &ti_sgmii_100_no_ssc_tx_ln_vals, + [INTERNAL_SSC] = &ti_sgmii_100_no_ssc_tx_ln_vals, }, }, [TYPE_QSGMII] = { [TYPE_NONE] = { - [NO_SSC] = &qsgmii_100_no_ssc_tx_ln_vals, + [NO_SSC] = &ti_qsgmii_100_no_ssc_tx_ln_vals, }, [TYPE_PCIE] = { - [NO_SSC] = &qsgmii_100_no_ssc_tx_ln_vals, - [EXTERNAL_SSC] = &qsgmii_100_no_ssc_tx_ln_vals, - [INTERNAL_SSC] = &qsgmii_100_no_ssc_tx_ln_vals, + [NO_SSC] = &ti_qsgmii_100_no_ssc_tx_ln_vals, + [EXTERNAL_SSC] = &ti_qsgmii_100_no_ssc_tx_ln_vals, + [INTERNAL_SSC] = &ti_qsgmii_100_no_ssc_tx_ln_vals, }, [TYPE_USB] = { - [NO_SSC] = &qsgmii_100_no_ssc_tx_ln_vals, - [EXTERNAL_SSC] = &qsgmii_100_no_ssc_tx_ln_vals, - [INTERNAL_SSC] = &qsgmii_100_no_ssc_tx_ln_vals, + [NO_SSC] = &ti_qsgmii_100_no_ssc_tx_ln_vals, + [EXTERNAL_SSC] = &ti_qsgmii_100_no_ssc_tx_ln_vals, + [INTERNAL_SSC] = &ti_qsgmii_100_no_ssc_tx_ln_vals, }, }, [TYPE_USB] = { From patchwork Thu Mar 4 06:08:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Swapnil Kashinath Jakhade X-Patchwork-Id: 12117467 X-Patchwork-Delegate: kishon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06BE3C433E6 for ; Fri, 5 Mar 2021 03:59:59 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7AC9464EE1 for ; Fri, 5 Mar 2021 03:59:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7AC9464EE1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cadence.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=1C9+rfe2TCn7kdO+9vSSI5ZiBvg7QzpqqMruYo7oB5U=; b=hYZohsAom0KrCOs93ciHaDcHU Gfvyp9LZ2vWWGXl4hn3/0By70JNzM/ZYaIZR9MDacimCDsivWCV6i1+jqUY4s9+w13xhoxm8nYCvC E5p+5kTwDGNkBn9EiK8VLG4plaRj8mzbBXzh9b6dnirw2wNKVPz4Bmn87Tl075hbhlO6/N9MsE7zO 9UfGcME2zcGWw3tL3p6xvkgg2X5UAVrLNmuiammVJmceQQA57Q63R1yjX2lutIwOPoq83ky9S/U9D 9hvc8iI1uVQausHNDsOOdCK7scTcQV+h7xGimspg1VDOtkRtynfWwill8rs9Kbe7aAo8snqU5lAcf oasw33u5g==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lI1d6-00CEer-QC; Fri, 05 Mar 2021 03:59:56 +0000 Received: from mx0b-0014ca01.pphosted.com ([208.86.201.193] helo=mx0a-0014ca01.pphosted.com) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lHhAO-007spg-7d for linux-phy@lists.infradead.org; Thu, 04 Mar 2021 06:09:45 +0000 Received: from pps.filterd (m0042333.ppops.net [127.0.0.1]) by mx0b-0014ca01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 1245tXCB026048; Wed, 3 Mar 2021 22:08:29 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=proofpoint; bh=d4G0tTY7ZRZaox9AmEqwSZzLcgpuwuLOFa+0YkZeYqQ=; b=Opp4oNGd5ERrAcJcRbkBxjv0eWVNaQhKaAI8iiRiCKL0bB5QPf/Y87ieg0TIx5Bo1/lQ CL2G0WHeJ8bKwEGQGpLsV8veRhSzq+dK2ZwNnfWYOPI+sIjacr0CsYKOsdx86LgRZL32 KMNp/gZr0S2hN7xbkiVj9IAk+nx6ngh1MOJT6l0h/qtwsHjGLJkr9QVgmH4QjupDg0i9 KTP8lDsV+PzsWFOR9okV5k9NkJCCmY5M38JaoDJ92Vq62YppqY/d8L8CLQAFmcWKDssf b8kQ7ETl7Md3z1oW4dRQDjesTG1BCtsPhbWAZbs2zCuIjbtA7s6oF9OOajcMMXPz1MFF 0w== Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2169.outbound.protection.outlook.com [104.47.55.169]) by mx0b-0014ca01.pphosted.com with ESMTP id 36yjj2r9er-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 03 Mar 2021 22:08:29 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V80pDCi2oPexORpodS4jScAEjeu0k1wHs9miczviRG7Ze0cAvv8Y5FhWMvRgmwMH7rFDc8SvEa07pBsLSZUdD32fhQVXACvw0rcbYfvCwsjXqHW7KRzwts+wwbSoZj8VH5/uEi9bvk6ZMBUiF/1Qw1dnmyOWizrHcDRoL1WLtFYdG3EavJZwnFcnwfeRUaRsKI6twH2dTL3W8BGu5JUkxM3DHF8kmjxmQokSOsox2J0wGVffnxeWPT+V1jA2XVsuOs1lloYYeqJpBOqSInRRkyi5jYLky9yPizBM6jlu+mco/kqVX/7nQA1QDsHI1MtpoQdjrvXTTuN2HUayTFvLnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=d4G0tTY7ZRZaox9AmEqwSZzLcgpuwuLOFa+0YkZeYqQ=; b=l1JOElnXZtxpWUF4WWu8PCUBa0iqYtjwbczOzgAPUCO2MWny/NuojkpgdRtHL+nmZDx+EDOeKB+bVs2pEsxFn+2xhWVcYpU4G1p7DuCikRMNIXTTbYHPeBdVzdAes34oZEJWgu1H2GSMIrh47k21zz4qUQdjg2ZDRrkMF4TBfsNfz5TYpACmx/j7f4ABHWv9KIcjvCnhRLoG3PbaNQhmcJHuwKuurbqRKrJJMUUvTl3whDNmQ4QhiukKqD+cTpCdecpuek0urYgeCpDlNn9O0Q12Yh3T74yQRpTEa70Coh7c454QKNAqNEKN5erRdM1aejHa6zEz9PNojPjhFkwsIQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 64.207.220.244) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=cadence.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=cadence.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=d4G0tTY7ZRZaox9AmEqwSZzLcgpuwuLOFa+0YkZeYqQ=; b=3mlOo/+YYPxMZKT2la4cwrBXD4aFYSxmIxoSM9W7w5NOcc5YSllReUGdanKxfZ/Qtg980V6L7Bm42N0i/Nm1asDl9l/NLSH6sSWpv8HJMjpkTiqibNZAPFA8YAf56veef0WSdefHlBK5M1rna6tJqOCF2aWDdznWuhgBamUVN8A= Received: from DM3PR11CA0008.namprd11.prod.outlook.com (2603:10b6:0:54::18) by BN3PR07MB2705.namprd07.prod.outlook.com (2a01:111:e400:7bb2::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17; Thu, 4 Mar 2021 06:08:27 +0000 Received: from DM6NAM12FT031.eop-nam12.prod.protection.outlook.com (2603:10b6:0:54:cafe::1e) by DM3PR11CA0008.outlook.office365.com (2603:10b6:0:54::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17 via Frontend Transport; Thu, 4 Mar 2021 06:08:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 64.207.220.244) smtp.mailfrom=cadence.com; lists.infradead.org; dkim=none (message not signed) header.d=none;lists.infradead.org; dmarc=pass action=none header.from=cadence.com; Received-SPF: Pass (protection.outlook.com: domain of cadence.com designates 64.207.220.244 as permitted sender) receiver=protection.outlook.com; client-ip=64.207.220.244; helo=wcmailrelayl01.cadence.com; Received: from wcmailrelayl01.cadence.com (64.207.220.244) by DM6NAM12FT031.mail.protection.outlook.com (10.13.179.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.9 via Frontend Transport; Thu, 4 Mar 2021 06:08:26 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by wcmailrelayl01.cadence.com (8.14.7/8.14.4) with ESMTP id 12468Jjr067409 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=OK); Wed, 3 Mar 2021 22:08:25 -0800 X-CrossPremisesHeadersFilteredBySendConnector: maileu3.global.cadence.com Received: from maileu3.global.cadence.com (10.160.88.99) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 4 Mar 2021 07:08:18 +0100 Received: from vleu-orange.cadence.com (10.160.88.83) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 4 Mar 2021 07:08:18 +0100 Received: from vleu-orange.cadence.com (localhost.localdomain [127.0.0.1]) by vleu-orange.cadence.com (8.14.4/8.14.4) with ESMTP id 12468IkC032357; Thu, 4 Mar 2021 07:08:18 +0100 Received: (from sjakhade@localhost) by vleu-orange.cadence.com (8.14.4/8.14.4/Submit) id 12468IcF032356; Thu, 4 Mar 2021 07:08:18 +0100 From: Swapnil Jakhade To: , , , CC: , , , Subject: [PATCH 4/4] phy: cadence-torrent: Update PCIe + USB config for correct PLL1 clock Date: Thu, 4 Mar 2021 07:08:16 +0100 Message-ID: <1614838096-32291-5-git-send-email-sjakhade@cadence.com> X-Mailer: git-send-email 2.4.5 In-Reply-To: <1614838096-32291-1-git-send-email-sjakhade@cadence.com> References: <1614838096-32291-1-git-send-email-sjakhade@cadence.com> MIME-Version: 1.0 X-OrganizationHeadersPreserved: maileu3.global.cadence.com X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2c9d4773-6afa-4883-4060-08d8ded3eca5 X-MS-TrafficTypeDiagnostic: BN3PR07MB2705: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1148; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GHS82TBMpzuLZDVmu3tROvzeN3HU3R1BzfGu54gbR+34aw4aA5DCkvvDVEPebOHDws5A0jJdTk94UzxtO9AQQfxCiIEmOhoj+ucMBAt25iDXc40j4ltM6X5BqWmCK9fSb8l9SGnMzJMYqKSF/3i32kZNiKkQ8IFFoa+VhO9Oz9V2/G/QF2CDws2Idzci9oPd/L0pR0jg3W2jku1wOIX01/Ef+EbOeQ97GVPaR3YgvesnSCJGYYDVzPi/zsWNMXnKUOMB4rsJ3zFrKxU0Q/7speMAk9sU7JxSsGi0SrCfbV68F3uoFNId1QVznCEohdQ/ezUOGUEruhnSmFnOKCZSAqSZ1zwgeEhcQGmUPr5w1o53PBmdbbqu1uvZpuAFOx+c2BhSCBTxgiwdVs3LB0rHfEpjOSjcrD9fNs85SKZUUqR3V8ovl7u6XtmspAU8PIX00pOyN8XfS0apzFub+iZlG1wKZGd8/+wKTVS19YD/lSdSeunAivYmk2kWOrngbx8Dz0hpsvO0rKekifctAGpdWQbkFoHy73PxC/45lahzevPxeXX531YNKnSZ8CQZKpo2FRStZB/VoKyOTiEwhuY+pn0xB9kOJ1q+xLrMVfp4oNUXEbZpCXk4zD3GTDPZNJOoNpRCqzfvpnvlR3eXM4hHOyNoTPTnKaG7TybSC4NCiz+eUNISFBpXknje8ktI6Y8xf6hk9WW+qXxkvab9hziRhQ== X-Forefront-Antispam-Report: CIP:64.207.220.244; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:wcmailrelayl01.cadence.com; PTR:ErrorRetry; CAT:NONE; SFS:(4636009)(346002)(376002)(39860400002)(136003)(396003)(36092001)(36840700001)(46966006)(82740400003)(2616005)(4326008)(82310400003)(110136005)(81166007)(26005)(36756003)(36906005)(70206006)(15650500001)(47076005)(42186006)(54906003)(426003)(8676002)(336012)(316002)(36860700001)(86362001)(8936002)(70586007)(5660300002)(2906002)(356005)(186003)(478600001)(83380400001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2021 06:08:26.1504 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2c9d4773-6afa-4883-4060-08d8ded3eca5 X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[64.207.220.244]; Helo=[wcmailrelayl01.cadence.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM12FT031.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR07MB2705 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.761 definitions=2021-03-04_01:2021-03-03, 2021-03-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 bulkscore=0 clxscore=1015 adultscore=0 impostorscore=0 mlxlogscore=999 mlxscore=0 lowpriorityscore=0 spamscore=0 phishscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103040025 X-Mailman-Approved-At: Fri, 05 Mar 2021 03:59:53 +0000 X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Update PCIe + USB register sequences for correct PLL1 clock configuration. Also, update sequences for other USB configurations with dependent changes. Signed-off-by: Swapnil Jakhade Signed-off-by: Kishon Vijay Abraham I --- drivers/phy/cadence/phy-cadence-torrent.c | 47 +++++++++++++++-------- 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/drivers/phy/cadence/phy-cadence-torrent.c b/drivers/phy/cadence/phy-cadence-torrent.c index f78a6731c26a..b371795e66a2 100644 --- a/drivers/phy/cadence/phy-cadence-torrent.c +++ b/drivers/phy/cadence/phy-cadence-torrent.c @@ -2655,8 +2655,6 @@ static struct cdns_reg_pairs usb_100_int_ssc_cmn_regs[] = { {0x0C5E, CMN_PLL1_VCOCAL_REFTIM_START}, {0x0C56, CMN_PLL0_VCOCAL_PLLCNT_START}, {0x0C56, CMN_PLL1_VCOCAL_PLLCNT_START}, - {0x0003, CMN_PLL0_VCOCAL_TCTRL}, - {0x0003, CMN_PLL1_VCOCAL_TCTRL}, {0x00C7, CMN_PLL0_LOCK_REFCNT_START}, {0x00C7, CMN_PLL1_LOCK_REFCNT_START}, {0x00C7, CMN_PLL0_LOCK_PLLCNT_START}, @@ -2664,7 +2662,9 @@ static struct cdns_reg_pairs usb_100_int_ssc_cmn_regs[] = { {0x0005, CMN_PLL0_LOCK_PLLCNT_THR}, {0x0005, CMN_PLL1_LOCK_PLLCNT_THR}, {0x8200, CMN_CDIAG_CDB_PWRI_OVRD}, - {0x8200, CMN_CDIAG_XCVRC_PWRI_OVRD} + {0x8200, CMN_CDIAG_XCVRC_PWRI_OVRD}, + {0x007F, CMN_TXPUCAL_TUNE}, + {0x007F, CMN_TXPDCAL_TUNE} }; static struct cdns_torrent_vals usb_100_int_ssc_cmn_vals = { @@ -2707,13 +2707,28 @@ static struct cdns_torrent_vals usb_phy_pcs_cmn_vals = { }; /* USB 100 MHz Ref clk, no SSC */ -static struct cdns_reg_pairs usb_100_no_ssc_cmn_regs[] = { +static struct cdns_reg_pairs sl_usb_100_no_ssc_cmn_regs[] = { + {0x0028, CMN_PDIAG_PLL1_CP_PADJ_M0}, + {0x001E, CMN_PLL1_DSM_FBH_OVRD_M0}, + {0x000C, CMN_PLL1_DSM_FBL_OVRD_M0}, {0x0003, CMN_PLL0_VCOCAL_TCTRL}, {0x0003, CMN_PLL1_VCOCAL_TCTRL}, {0x8200, CMN_CDIAG_CDB_PWRI_OVRD}, {0x8200, CMN_CDIAG_XCVRC_PWRI_OVRD} }; +static struct cdns_torrent_vals sl_usb_100_no_ssc_cmn_vals = { + .reg_pairs = sl_usb_100_no_ssc_cmn_regs, + .num_regs = ARRAY_SIZE(sl_usb_100_no_ssc_cmn_regs), +}; + +static struct cdns_reg_pairs usb_100_no_ssc_cmn_regs[] = { + {0x8200, CMN_CDIAG_CDB_PWRI_OVRD}, + {0x8200, CMN_CDIAG_XCVRC_PWRI_OVRD}, + {0x007F, CMN_TXPUCAL_TUNE}, + {0x007F, CMN_TXPDCAL_TUNE} +}; + static struct cdns_reg_pairs usb_100_no_ssc_tx_ln_regs[] = { {0x02FF, TX_PSC_A0}, {0x06AF, TX_PSC_A1}, @@ -3497,8 +3512,8 @@ static const struct cdns_torrent_data cdns_map_torrent = { }, [TYPE_USB] = { [TYPE_NONE] = { - [NO_SSC] = &usb_100_no_ssc_cmn_vals, - [EXTERNAL_SSC] = &usb_100_no_ssc_cmn_vals, + [NO_SSC] = &sl_usb_100_no_ssc_cmn_vals, + [EXTERNAL_SSC] = &sl_usb_100_no_ssc_cmn_vals, [INTERNAL_SSC] = &sl_usb_100_int_ssc_cmn_vals, }, [TYPE_PCIE] = { @@ -3507,13 +3522,13 @@ static const struct cdns_torrent_data cdns_map_torrent = { [INTERNAL_SSC] = &usb_100_int_ssc_cmn_vals, }, [TYPE_SGMII] = { - [NO_SSC] = &usb_100_no_ssc_cmn_vals, - [EXTERNAL_SSC] = &usb_100_no_ssc_cmn_vals, + [NO_SSC] = &sl_usb_100_no_ssc_cmn_vals, + [EXTERNAL_SSC] = &sl_usb_100_no_ssc_cmn_vals, [INTERNAL_SSC] = &sl_usb_100_int_ssc_cmn_vals, }, [TYPE_QSGMII] = { - [NO_SSC] = &usb_100_no_ssc_cmn_vals, - [EXTERNAL_SSC] = &usb_100_no_ssc_cmn_vals, + [NO_SSC] = &sl_usb_100_no_ssc_cmn_vals, + [EXTERNAL_SSC] = &sl_usb_100_no_ssc_cmn_vals, [INTERNAL_SSC] = &sl_usb_100_int_ssc_cmn_vals, }, }, @@ -3906,8 +3921,8 @@ static const struct cdns_torrent_data ti_j721e_map_torrent = { }, [TYPE_USB] = { [TYPE_NONE] = { - [NO_SSC] = &usb_100_no_ssc_cmn_vals, - [EXTERNAL_SSC] = &usb_100_no_ssc_cmn_vals, + [NO_SSC] = &sl_usb_100_no_ssc_cmn_vals, + [EXTERNAL_SSC] = &sl_usb_100_no_ssc_cmn_vals, [INTERNAL_SSC] = &sl_usb_100_int_ssc_cmn_vals, }, [TYPE_PCIE] = { @@ -3916,13 +3931,13 @@ static const struct cdns_torrent_data ti_j721e_map_torrent = { [INTERNAL_SSC] = &usb_100_int_ssc_cmn_vals, }, [TYPE_SGMII] = { - [NO_SSC] = &usb_100_no_ssc_cmn_vals, - [EXTERNAL_SSC] = &usb_100_no_ssc_cmn_vals, + [NO_SSC] = &sl_usb_100_no_ssc_cmn_vals, + [EXTERNAL_SSC] = &sl_usb_100_no_ssc_cmn_vals, [INTERNAL_SSC] = &sl_usb_100_int_ssc_cmn_vals, }, [TYPE_QSGMII] = { - [NO_SSC] = &usb_100_no_ssc_cmn_vals, - [EXTERNAL_SSC] = &usb_100_no_ssc_cmn_vals, + [NO_SSC] = &sl_usb_100_no_ssc_cmn_vals, + [EXTERNAL_SSC] = &sl_usb_100_no_ssc_cmn_vals, [INTERNAL_SSC] = &sl_usb_100_int_ssc_cmn_vals, }, },