From patchwork Thu Aug 27 13:28:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Swapnil Jakhade X-Patchwork-Id: 253304 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=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham 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 D0263C433E1 for ; Thu, 27 Aug 2020 14:51:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 642092054F for ; Thu, 27 Aug 2020 14:51:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cadence.com header.i=@cadence.com header.b="kUQ3ihZr"; dkim=pass (1024-bit key) header.d=cadence.com header.i=@cadence.com header.b="GBcfbw+c" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728048AbgH0OvA (ORCPT ); Thu, 27 Aug 2020 10:51:00 -0400 Received: from mx0a-0014ca01.pphosted.com ([208.84.65.235]:5846 "EHLO mx0a-0014ca01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728089AbgH0N3M (ORCPT ); Thu, 27 Aug 2020 09:29:12 -0400 Received: from pps.filterd (m0042385.ppops.net [127.0.0.1]) by mx0a-0014ca01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07RDSBPH004858; Thu, 27 Aug 2020 06:29:05 -0700 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=sUfAFaQ91xEwa/9obC3b/GtBipGtqjQo+T11D+eD0l0=; b=kUQ3ihZr3WCG0nd/r1RcCVS0+ij6AM3ADtUPT8QgkMFbDyu3KLv3noxganj+pLJYWoNb kznTYTKBzvU1dUwBh+f1XXp9XcuPt0P9cgE0A05EEJrqylilGKscSk1/w35d0bgkEaUU G1n8t/eAMjlKSxv42nqCIEShZVpA9yEQrTPxV4BQILMCkUyiq6XXfXgzX2q9FiYCgvbk Ax8J9kt78Arl/3OBgtgc1fYDQ0T+GKzAYdDp5D/rRPIyaj6ND9HhEEXQ3i0wCx8ODWxl v0b9NPh1dEWXFZudAFmLnBXCre0RgglRV3MZLG8So2sbLkfX3UFP0ZCSECQwYJ+KwQaW fw== Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2168.outbound.protection.outlook.com [104.47.57.168]) by mx0a-0014ca01.pphosted.com with ESMTP id 332yww45dn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Aug 2020 06:29:04 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FP/PFe7Sb9C7Cw24Gu2n+3TdDGvO8BLcVlcLZavTwPphWM85EZ5lUEq+e/cntuQxx27rEBCa4Q/pqtxscP1yto0uwmRHAb9WVhBKgwwyQOcdeW+KiLgTTZP0KSCIhSkxI59LVy6sZ7H8+qn91Hsv9Kj7o4gxkqV8+a5LqQEaUVnEtYy7H8QiAUhuu1dkkdK2FVXUGP+4rERyVbJS8+nba1YaoKkL4j/68bdB5ZOe2RyEgO5kknlN/r84OeZxhUnpP6oECBTGiAxKBwVGeKJNZWHdQREfwxzk13o9F6n4zgfzu33LzJWhKKDf1ll1D+bdmr9O5ytcffVILNo0Xeh59w== 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=sUfAFaQ91xEwa/9obC3b/GtBipGtqjQo+T11D+eD0l0=; b=SfZWusht8jBrCGzJyaz8X13YPUzPyIbxwwKk0lMroAQ0F2ufIYQF+vYVIsIXE5E6djGYLN5+RGUoth2bIOlLFhifIWg5lgtmEFXyVb7QJLJfHvHZ4MESnqRi/TNYKhj6k1S//txJvhX/7F8ttHk0S72VjmwfmI+WoWBBN56LFql0I0ji0HK6sT744eQzfzW8/tzGP9UVXLEw+o2RVWiyQtKZQv2f/B/rffyra4Nf4p/xi/q4Cu+lQqrGyl6kZMmbd+C847AZKyEG7Tf8d9KBibSNzRoNy4Cvzump+e+0STSSS/LqeSOpSFv7GOOaUz/zRGofpkwqGWDjPwkvAIhjnQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 199.43.4.23) smtp.rcpttodomain=kernel.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=sUfAFaQ91xEwa/9obC3b/GtBipGtqjQo+T11D+eD0l0=; b=GBcfbw+cq9uvn8vISUUbbifrI0FQn7VS9lVGo0i0A/w7wdB9QO6JFOJSMnz8TYMT5WqUqTsK5RXocu6eJjoPG9cQFKwdj1SkEchGUhIqdTE7kpPdWBdQjFtPPrybLW8Jdmc05sa4xtoavCVk1j1tKcfBawELN0CtjgBv/QGr8ig= Received: from BN8PR03CA0019.namprd03.prod.outlook.com (2603:10b6:408:94::32) by BYAPR07MB4536.namprd07.prod.outlook.com (2603:10b6:a02:c3::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.26; Thu, 27 Aug 2020 13:29:02 +0000 Received: from BN8NAM12FT059.eop-nam12.prod.protection.outlook.com (2603:10b6:408:94:cafe::d3) by BN8PR03CA0019.outlook.office365.com (2603:10b6:408:94::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3326.19 via Frontend Transport; Thu, 27 Aug 2020 13:29:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 199.43.4.23) smtp.mailfrom=cadence.com; kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=pass action=none header.from=cadence.com; Received-SPF: Pass (protection.outlook.com: domain of cadence.com designates 199.43.4.23 as permitted sender) receiver=protection.outlook.com; client-ip=199.43.4.23; helo=rmmaillnx1.cadence.com; Received: from rmmaillnx1.cadence.com (199.43.4.23) by BN8NAM12FT059.mail.protection.outlook.com (10.13.183.55) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3326.19 via Frontend Transport; Thu, 27 Aug 2020 13:29:00 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by rmmaillnx1.cadence.com (8.14.4/8.14.4) with ESMTP id 07RDSrRj001550 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK); Thu, 27 Aug 2020 09:28:59 -0400 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, 27 Aug 2020 15:28:54 +0200 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, 27 Aug 2020 15:28:54 +0200 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 07RDSrdA018750; Thu, 27 Aug 2020 15:28:53 +0200 Received: (from sjakhade@localhost) by vleu-orange.cadence.com (8.14.4/8.14.4/Submit) id 07RDSrYk018749; Thu, 27 Aug 2020 15:28:53 +0200 From: Swapnil Jakhade To: , , , , CC: , , , , , Subject: [PATCH v2 3/7] phy: cadence-torrent: Enable support for multiple subnodes Date: Thu, 27 Aug 2020 15:28:48 +0200 Message-ID: <1598534932-18693-4-git-send-email-sjakhade@cadence.com> X-Mailer: git-send-email 2.4.5 In-Reply-To: <1598534932-18693-1-git-send-email-sjakhade@cadence.com> References: <1598534932-18693-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: 2daeb98b-3ffa-4fc6-6cb0-08d84a8d28d1 X-MS-TrafficTypeDiagnostic: BYAPR07MB4536: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:131; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VPoU+156xpC9X5XatjPNzb/GUWxxC8Qgt4889pJFoePAqulvI8ifawcXI3bcHcAyMXoADwrsEnWEr+OxDOMOK10wUUw7O3NzHpko4QiGHYdGRRFOaJgMBzIldpQTPr6eBP8RAh8IEzRDw7kHdE7rMe5MFEoX1W1uYcIcXFFChLrzfEdSq5BmG9YTJwE+6L8qx6naO2IboF2DcR/eNOm2bj1tFa3fCntygHdoY3MCnaOANrsjv99MeznPefPwsHtmpyLpO7TVvvprkNFAkpULz3EUly4E0bSEV5EjPweZTJMrE2k/tIq0hVg8O6ptuyIKGwAS6/miTKS6G4h/WTChVCEhmjyFjhV0AazyAZp2jqIZuzkZn/VVOM2ITi10BtzxvkcHVX9Cq8RA4TgA8Z4ZZ1ZWMeO/PtenF/6ol42Kdmg= X-Forefront-Antispam-Report: CIP:199.43.4.23; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:rmmaillnx1.cadence.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(4636009)(376002)(136003)(346002)(396003)(39860400002)(36092001)(46966005)(42186006)(316002)(70206006)(336012)(70586007)(82740400003)(2906002)(36756003)(8676002)(86362001)(4326008)(83380400001)(8936002)(426003)(81166007)(110136005)(54906003)(82310400002)(5660300002)(6666004)(47076004)(186003)(26005)(2616005)(478600001)(356005); DIR:OUT; SFP:1101; X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Aug 2020 13:29:00.8312 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2daeb98b-3ffa-4fc6-6cb0-08d84a8d28d1 X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[199.43.4.23]; Helo=[rmmaillnx1.cadence.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM12FT059.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4536 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-08-27_07:2020-08-27,2020-08-27 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 phishscore=0 bulkscore=0 mlxlogscore=843 spamscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 lowpriorityscore=0 clxscore=1015 adultscore=0 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008270102 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Enable support for multiple subnodes in torrent PHY to include multi-link combinations. Signed-off-by: Swapnil Jakhade --- drivers/phy/cadence/phy-cadence-torrent.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/drivers/phy/cadence/phy-cadence-torrent.c b/drivers/phy/cadence/phy-cadence-torrent.c index 566edf0e7937..ee633c8bf2d8 100644 --- a/drivers/phy/cadence/phy-cadence-torrent.c +++ b/drivers/phy/cadence/phy-cadence-torrent.c @@ -1747,9 +1747,6 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev) if (subnodes == 0) { dev_err(dev, "No available link subnodes found\n"); return -EINVAL; - } else if (subnodes != 1) { - dev_err(dev, "Driver supports only one link subnode.\n"); - return -EINVAL; } for_each_available_child_of_node(dev->of_node, child) { @@ -1772,14 +1769,6 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev) goto put_child; } - if (cdns_phy->phys[node].mlane != 0) { - dev_err(dev, - "%s: Driver supports only lane-0 as master lane.\n", - child->full_name); - ret = -EINVAL; - goto put_child; - } - if (of_property_read_u32(child, "cdns,phy-type", &cdns_phy->phys[node].phy_type)) { dev_err(dev, "%s: No \"cdns,phy-type\"-property.\n", @@ -1852,10 +1841,6 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev) torrent_attr.mode = PHY_MODE_DP; phy_set_attrs(gphy, &torrent_attr); - } else { - dev_err(dev, "Driver supports only PHY_TYPE_DP\n"); - ret = -ENOTSUPP; - goto put_child; } cdns_phy->phys[node].phy = gphy; phy_set_drvdata(gphy, &cdns_phy->phys[node]); From patchwork Thu Aug 27 13:28:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Swapnil Jakhade X-Patchwork-Id: 253306 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=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham 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 25D8BC433DF for ; Thu, 27 Aug 2020 13:40:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EA555207CD for ; Thu, 27 Aug 2020 13:40:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cadence.com header.i=@cadence.com header.b="LXvQRaAV"; dkim=pass (1024-bit key) header.d=cadence.com header.i=@cadence.com header.b="KYaOlXYU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727980AbgH0Nkk (ORCPT ); Thu, 27 Aug 2020 09:40:40 -0400 Received: from mx0b-0014ca01.pphosted.com ([208.86.201.193]:39338 "EHLO mx0a-0014ca01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728121AbgH0N3N (ORCPT ); Thu, 27 Aug 2020 09:29:13 -0400 Received: from pps.filterd (m0042333.ppops.net [127.0.0.1]) by mx0b-0014ca01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07RDJwaK014981; Thu, 27 Aug 2020 06:29:07 -0700 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=PJoe71sNd60E5t116wHLyiojgVE3e8mA9NRrDbwS8YI=; b=LXvQRaAVR/9KWRXk/NWdUS0BxjAoGMp/4HzveTDVeOK5kEunh+I37A7NVcxr3tbKBNQn V4AfsvlJ0bu7yOoNV8zPZgSLtSa7+NnE02Mk1seZcklh+Wr2GvV8hKpra8mNeXUItkWe GuUhV+57XLKR4RuxRLvn9CdKtxgRT0DvrCIfcXvj3dUpfTzEgK8HTXu3KTTH+mZCbDAW DaSkt2UM8tVimcrQa+RRU1kTUlvR85B73ujlapKrWaJgxazOjOfmKma217Mv3UYLv6GY XnAL4ZBbcP/q1VVFiPROh9P7wRgVyeNGkHWXLfZbq6Eehu7ii+kX4qlIZXg1ybk4fIz1 8w== Received: from nam04-co1-obe.outbound.protection.outlook.com (mail-co1nam04lp2051.outbound.protection.outlook.com [104.47.45.51]) by mx0b-0014ca01.pphosted.com with ESMTP id 332xxxcnrj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Aug 2020 06:29:07 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eJMQ2aKwygETGm3dAIcoyy58a4pZvIzL9vQQU19HhgBntSXCQCe1tPcvY7ttqEPqveu/O5uITS0HL397xksv+nq0fVlPT+NuJGwLukC4LOlVo1ulrPeOoVHgaORXFv51ber7cYTBTUokTLNqX3cL/q1W8aQbVinUNkfcAq7OlzvUOKIsixTGV/e3JNFKQy9j+yEMIPslrBPWB1t3fivoxzuJOq/jouMv6x3kCE0Sa71apBpfB7hLhZMQuDhieDr7LE7P2boKpIR/RJJfDz6oAAXLX/Dj5Qo0EftHQQ0Rk6wSDkq4bI/sfsK9niV1H36Wx2XEu4vRzPT22dzVaWyu1w== 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=PJoe71sNd60E5t116wHLyiojgVE3e8mA9NRrDbwS8YI=; b=WjIA+Agwojbsm0xKZ4eEaFdd4+TJoXtT+YXyrHfMfaeV9+8U1KeSPcRjlw3zVAaGbfkFfpgDxeZE4UvDI8m4mym/3hflDXZNxR6M36lA6c2elfS+EBWSYr1tfLt1lV240nK17MYFiKwmhYNvj5eFVs4kPcI84shhUO6fltndtshk3qTwly6drs2K5zR0mS5Akgj8DEUSYlxVyMcaMBu3J60xo1dSTqHNvu2E4nJXMuLdoIExSrZVJOMZmc/ttYHLTyWVRBiFpuZ70Kt/hxkkZymdLNBBx0Tl4ZDdqjXpZKMvDZ4rY+lrLus92guuArwsytL0zcHFagKbTbGyJ6zkjA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 199.43.4.23) smtp.rcpttodomain=kernel.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=PJoe71sNd60E5t116wHLyiojgVE3e8mA9NRrDbwS8YI=; b=KYaOlXYU4F5+fpE1MzXrtBwWXRlEa5bzwvPc74dNtYPUjZEdlaLFvZpBw7PdbTbGKXfVl4/vSvUdCcAeZ8CIrc5bUOXl4zCRBLjL3Mj1KYMyWxr76zqLSsIdXpRh9Vk3qBMfCyjm8zl4UVuGIC6C6LguLWhuuSqUgkA8frtwgPM= Received: from DM5PR1401CA0001.namprd14.prod.outlook.com (2603:10b6:4:4a::11) by BN8PR07MB6051.namprd07.prod.outlook.com (2603:10b6:408:9e::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.24; Thu, 27 Aug 2020 13:29:04 +0000 Received: from DM6NAM12FT065.eop-nam12.prod.protection.outlook.com (2603:10b6:4:4a:cafe::7b) by DM5PR1401CA0001.outlook.office365.com (2603:10b6:4:4a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3326.19 via Frontend Transport; Thu, 27 Aug 2020 13:29:04 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 199.43.4.23) smtp.mailfrom=cadence.com; kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=pass action=none header.from=cadence.com; Received-SPF: Pass (protection.outlook.com: domain of cadence.com designates 199.43.4.23 as permitted sender) receiver=protection.outlook.com; client-ip=199.43.4.23; helo=rmmaillnx1.cadence.com; Received: from rmmaillnx1.cadence.com (199.43.4.23) by DM6NAM12FT065.mail.protection.outlook.com (10.13.179.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3326.19 via Frontend Transport; Thu, 27 Aug 2020 13:29:02 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by rmmaillnx1.cadence.com (8.14.4/8.14.4) with ESMTP id 07RDSrRl001550 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK); Thu, 27 Aug 2020 09:29:01 -0400 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, 27 Aug 2020 15:28:54 +0200 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, 27 Aug 2020 15:28:54 +0200 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 07RDSrIn018758; Thu, 27 Aug 2020 15:28:53 +0200 Received: (from sjakhade@localhost) by vleu-orange.cadence.com (8.14.4/8.14.4/Submit) id 07RDSrXR018757; Thu, 27 Aug 2020 15:28:53 +0200 From: Swapnil Jakhade To: , , , , CC: , , , , , Subject: [PATCH v2 5/7] phy: cadence-torrent: Check total lane count for all subnodes is within limit Date: Thu, 27 Aug 2020 15:28:50 +0200 Message-ID: <1598534932-18693-6-git-send-email-sjakhade@cadence.com> X-Mailer: git-send-email 2.4.5 In-Reply-To: <1598534932-18693-1-git-send-email-sjakhade@cadence.com> References: <1598534932-18693-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: 3f44ba98-ce17-41b9-c9f7-08d84a8d29dd X-MS-TrafficTypeDiagnostic: BN8PR07MB6051: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:115; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NyDrkjeqkHaNGuMi9dcZXWn7wC++3uXhXw/4ozcv8PnhKwwuAYmy3lIM6QvEE/9d4t8JI6gNAzfWb4e9wNmAHcNWrrFt/boqYZfFCSxT/gRxg5JrUwpOQhsyQtBK2x2SeUvS1n6k48R63bF2Avo9MMrcdXwNCUKo+3b6mtch2NvVCt0PsSmcNk5ysQLrXGkpal4NbYzIGmxmfFKdOcR+WORd2QwifybngkhimBLB0S6km16hzuUZ55r1mm3s82UsRO4/B76GGuESlK95TgS365FDIDyDyv5b+ZDHJnxv1qpvV2DN/Nt7ZfAenSf14gILb69iL8uxgJXQiANA8GOjdaIUA9a22ML5CeYMeBCjy27Vpsa47evzMlBZehn13tFF/9QD6POzCalYzjk5SAmzLl73YdDAMvAPGsarb1jF7Ow= X-Forefront-Antispam-Report: CIP:199.43.4.23; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:rmmaillnx1.cadence.com; PTR:ErrorRetry; CAT:NONE; SFS:(4636009)(376002)(396003)(136003)(39860400002)(346002)(36092001)(46966005)(83380400001)(110136005)(42186006)(54906003)(81166007)(26005)(2906002)(47076004)(5660300002)(186003)(86362001)(82740400003)(82310400002)(356005)(426003)(336012)(8676002)(2616005)(36906005)(8936002)(70586007)(4326008)(70206006)(316002)(36756003)(478600001); DIR:OUT; SFP:1101; X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Aug 2020 13:29:02.5510 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3f44ba98-ce17-41b9-c9f7-08d84a8d29dd X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[199.43.4.23]; Helo=[rmmaillnx1.cadence.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM12FT065.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR07MB6051 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-08-27_07:2020-08-27,2020-08-27 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 lowpriorityscore=0 mlxlogscore=999 spamscore=0 clxscore=1015 mlxscore=0 suspectscore=0 malwarescore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008270101 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add checking if total number of lanes for all subnodes is not greater than number of lanes supported by PHY. Signed-off-by: Swapnil Jakhade --- drivers/phy/cadence/phy-cadence-torrent.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/phy/cadence/phy-cadence-torrent.c b/drivers/phy/cadence/phy-cadence-torrent.c index 66ae5b749385..ed2140691077 100644 --- a/drivers/phy/cadence/phy-cadence-torrent.c +++ b/drivers/phy/cadence/phy-cadence-torrent.c @@ -25,7 +25,6 @@ #define REF_CLK_19_2MHz 19200000 #define REF_CLK_25MHz 25000000 -#define DEFAULT_NUM_LANES 4 #define MAX_NUM_LANES 4 #define DEFAULT_MAX_BIT_RATE 8100 /* in Mbps */ @@ -1735,6 +1734,7 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev) const struct cdns_torrent_data *data; struct device_node *child; int ret, subnodes, node = 0, i; + u32 total_num_lanes = 0; u8 init_dp_regmap = 0; /* Get init data for this PHY */ @@ -1809,9 +1809,15 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev) goto put_child; } - cdns_phy->phys[node].num_lanes = DEFAULT_NUM_LANES; - of_property_read_u32(child, "cdns,num-lanes", - &cdns_phy->phys[node].num_lanes); + if (of_property_read_u32(child, "cdns,num-lanes", + &cdns_phy->phys[node].num_lanes)) { + dev_err(dev, "%s: No \"cdns,num-lanes\"-property.\n", + child->full_name); + ret = -EINVAL; + goto put_child; + } + + total_num_lanes += cdns_phy->phys[node].num_lanes; if (cdns_phy->phys[node].phy_type == PHY_TYPE_DP) { switch (cdns_phy->phys[node].num_lanes) { @@ -1893,6 +1899,11 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev) } cdns_phy->nsubnodes = node; + if (total_num_lanes > MAX_NUM_LANES) { + dev_err(dev, "Invalid lane configuration\n"); + goto put_lnk_rst; + } + phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate); if (IS_ERR(phy_provider)) { ret = PTR_ERR(phy_provider); From patchwork Thu Aug 27 13:28:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Swapnil Jakhade X-Patchwork-Id: 253303 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=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham 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 698D0C433E1 for ; Thu, 27 Aug 2020 14:51:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3F12D2054F for ; Thu, 27 Aug 2020 14:51:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cadence.com header.i=@cadence.com header.b="frIpTeIo"; dkim=pass (1024-bit key) header.d=cadence.com header.i=@cadence.com header.b="tUPp/Cvc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726876AbgH0OvW (ORCPT ); Thu, 27 Aug 2020 10:51:22 -0400 Received: from mx0a-0014ca01.pphosted.com ([208.84.65.235]:36870 "EHLO mx0a-0014ca01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728117AbgH0N3M (ORCPT ); Thu, 27 Aug 2020 09:29:12 -0400 Received: from pps.filterd (m0042385.ppops.net [127.0.0.1]) by mx0a-0014ca01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07RDS8g7004810; Thu, 27 Aug 2020 06:29:07 -0700 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=K6qOnJN6usSCAfPPATIMyYfgLkcxVTCLrAjaeLhc8tA=; b=frIpTeIo8WunaY9mrSnvAos5Zi/+KnAgxlj75+CqOe313LnsF/hy4+e5JWm/fTM9z6/E JYS062expZblA6FEnGTtYlJxRf89ZgGG6L0Pwu+XWn4TuZjQ6fzR8OlZ92TtE1xl0w9s kFhiDCobib6KtWkSagI8bfcIb8kuW6U61f3e5IanzZLsMj92mdw7t3cAIAoCABDoPTPP bKBzd/NB5uzrhOkhoZrC3DyxIVCfjBTiDnoN7ZKzWtMMGVMPWn/9zNcMwVCAS30xXB7z rRo/wEpO8cQyqOk3dMeT1apdsOsYeozf5BPJW+tNvl2mXe4PusUwWkhfrVv44ihZ9N/U mg== Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2169.outbound.protection.outlook.com [104.47.58.169]) by mx0a-0014ca01.pphosted.com with ESMTP id 332yww45du-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Aug 2020 06:29:07 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Yc+KFcif1nAxunSvDyJsUJNM0m/OhwnFKMghQcYE9CTEU8GQPq58sPkN4hwf5vAf8uYib0il67VO7Tfz8spLASqhMAtWCIkJuvcI+ZVFWxV8qP4Fr0999wIM1MMLVQ1F7izdG3cmNGuzVXl8+Zb3KLV9xdAwuupA2d/oiEpNzWD2JlY0doohvHfxWTIl1XX3rvknN/QgCiKz6ajZFrjgyY2dmu7A1Fdpdd/FB55gpISkq/C6dAj5OJ7Ymjd5PyvHTOUbQk50fs2OD+junQVqSWQdAQmJ3BKufKmrYx0txa49dsPVfOIpAY4Gso2b9ln7C0qQ+Uw4OFGNMm7cpGW93Q== 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=K6qOnJN6usSCAfPPATIMyYfgLkcxVTCLrAjaeLhc8tA=; b=IWfc96kR656krnMOLWRKZs9yhzsnaAUlBkAnNXwSvRJnGqieX6ATIvouZCuFy7yT3K4MQzY8yfsIx09j6nIIviANGmo1xejPyOyKjgnKI3k4pII5O6qx+YP2Tp8GfzV41uVXKE9lCXWx/qgRAY2ggzMAl7ETkSLrG1re3J0kI4mfm98juP34nadYUbzP8pXxmmom4uIJ4digWNmyVvMJNi2Yy7sypg4pPpT/wU5/i3b9wvYBMh0f5ClJrNZY5xCvFY/aFTdjrppkDqTbFUmOHHUIj3Lv4JwlwLyEBc4w8OCA/R2GIOpzbyY9/kj3w0oyzs/Tj2X24TKmDcW3c6I3hA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 199.43.4.23) smtp.rcpttodomain=kernel.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=K6qOnJN6usSCAfPPATIMyYfgLkcxVTCLrAjaeLhc8tA=; b=tUPp/CvciF2IJIY8jOZY/c1fEkYkT0Lnr/p0+mMANFftO63aAiahL1UTcGRwjZkToS8Rxawy4Yus9vSHfr/IwDO9dsiYlfAhmXvaIrtjuIdy/RMWzNFQnIR11fkPzlcSzQlgXmOQe9qBXWj/RB3p/baNQqHkVQFysc9gdH35C2M= Received: from BN6PR17CA0052.namprd17.prod.outlook.com (2603:10b6:405:75::41) by BY5PR07MB7236.namprd07.prod.outlook.com (2603:10b6:a03:20b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.25; Thu, 27 Aug 2020 13:29:04 +0000 Received: from BN8NAM12FT061.eop-nam12.prod.protection.outlook.com (2603:10b6:405:75:cafe::d0) by BN6PR17CA0052.outlook.office365.com (2603:10b6:405:75::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3326.19 via Frontend Transport; Thu, 27 Aug 2020 13:29:04 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 199.43.4.23) smtp.mailfrom=cadence.com; kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=pass action=none header.from=cadence.com; Received-SPF: Pass (protection.outlook.com: domain of cadence.com designates 199.43.4.23 as permitted sender) receiver=protection.outlook.com; client-ip=199.43.4.23; helo=rmmaillnx1.cadence.com; Received: from rmmaillnx1.cadence.com (199.43.4.23) by BN8NAM12FT061.mail.protection.outlook.com (10.13.182.175) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3326.19 via Frontend Transport; Thu, 27 Aug 2020 13:29:04 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by rmmaillnx1.cadence.com (8.14.4/8.14.4) with ESMTP id 07RDSrRm001550 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK); Thu, 27 Aug 2020 09:29:02 -0400 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, 27 Aug 2020 15:28:54 +0200 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, 27 Aug 2020 15:28:54 +0200 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 07RDSsde018762; Thu, 27 Aug 2020 15:28:54 +0200 Received: (from sjakhade@localhost) by vleu-orange.cadence.com (8.14.4/8.14.4/Submit) id 07RDSr00018761; Thu, 27 Aug 2020 15:28:53 +0200 From: Swapnil Jakhade To: , , , , CC: , , , , , Subject: [PATCH v2 6/7] dt-bindings: phy: cadence-torrent: Add binding to specify SSC mode Date: Thu, 27 Aug 2020 15:28:51 +0200 Message-ID: <1598534932-18693-7-git-send-email-sjakhade@cadence.com> X-Mailer: git-send-email 2.4.5 In-Reply-To: <1598534932-18693-1-git-send-email-sjakhade@cadence.com> References: <1598534932-18693-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: a6fb141e-ea8f-4572-9f3b-08d84a8d2ab7 X-MS-TrafficTypeDiagnostic: BY5PR07MB7236: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 10IxYQIX7fjcyUGW5ns+6qwFLtjUdWJCGxCvPSOGd+NIlDJt39syiGO53eXqHR7NqUUl7g8vEthvNYYMzVCwV7HC6W/xxM5pDhuzdX//7ktCkxHf3eET1Ts6t9XhOwDPix8Oh0sqMhP95Xao+DNehOStOgIFe/2JZ+348j8SYKXXd5DgLUIIG4XWIx7/wi1g5d5KhNjPEiWD4nm3VBUZbjlKa5odsC8Va1e2qOTQ6vnDRM4nm2kqxisvi0Z6XYGdtlAZHsazrvZOofV04O8WeLdegI7y6hr2A3lZpjBnjl9YTV8D8ujnk4Ikvv/iQAoH/IQK0opFhLlRix9LEGDF1EdqQCO9wFnTBYYmQbTerXv232BoPNqC65MLrHtkzFGvfW3iPdE2CIfhApKxnYDPsybLHjkXiFjr42cTUbj7VUA= X-Forefront-Antispam-Report: CIP:199.43.4.23; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:rmmaillnx1.cadence.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(4636009)(376002)(136003)(346002)(39860400002)(396003)(36092001)(46966005)(478600001)(8676002)(54906003)(47076004)(426003)(316002)(70586007)(110136005)(2616005)(70206006)(82740400003)(186003)(42186006)(36756003)(4326008)(8936002)(83380400001)(2906002)(336012)(5660300002)(356005)(81166007)(26005)(86362001)(82310400002); DIR:OUT; SFP:1101; X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Aug 2020 13:29:04.0176 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a6fb141e-ea8f-4572-9f3b-08d84a8d2ab7 X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[199.43.4.23]; Helo=[rmmaillnx1.cadence.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM12FT061.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR07MB7236 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-08-27_07:2020-08-27,2020-08-27 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 phishscore=0 bulkscore=0 mlxlogscore=934 spamscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 lowpriorityscore=0 clxscore=1015 adultscore=0 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008270102 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add binding to specify Spread Spectrum Clocking mode used. Signed-off-by: Swapnil Jakhade Reviewed-by: Rob Herring --- .../bindings/phy/phy-cadence-torrent.yaml | 9 +++++++++ include/dt-bindings/phy/phy-cadence-torrent.h | 13 +++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 include/dt-bindings/phy/phy-cadence-torrent.h diff --git a/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml b/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml index 4071438be2ba..a7ee19d27c19 100644 --- a/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml +++ b/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml @@ -87,6 +87,15 @@ patternProperties: enum: [1, 2, 4] default: 4 + cdns,ssc-mode: + description: + Specifies the Spread Spectrum Clocking mode used. It can be NO_SSC, + EXTERNAL_SSC or INTERNAL_SSC. + Refer include/dt-bindings/phy/phy-cadence-torrent.h for the constants to be used. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1, 2] + default: 0 + cdns,max-bit-rate: description: Maximum DisplayPort link bit rate to use, in Mbps diff --git a/include/dt-bindings/phy/phy-cadence-torrent.h b/include/dt-bindings/phy/phy-cadence-torrent.h new file mode 100644 index 000000000000..e387b6a95741 --- /dev/null +++ b/include/dt-bindings/phy/phy-cadence-torrent.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * This header provides constants for Cadence Torrent SERDES. + */ + +#ifndef _DT_BINDINGS_TORRENT_SERDES_H +#define _DT_BINDINGS_TORRENT_SERDES_H + +#define TORRENT_SERDES_NO_SSC 0 +#define TORRENT_SERDES_EXTERNAL_SSC 1 +#define TORRENT_SERDES_INTERNAL_SSC 2 + +#endif /* _DT_BINDINGS_TORRENT_SERDES_H */ From patchwork Thu Aug 27 13:28:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Swapnil Jakhade X-Patchwork-Id: 253307 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=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham 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 EA17AC433E1 for ; Thu, 27 Aug 2020 13:39:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B87C322B40 for ; Thu, 27 Aug 2020 13:39:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cadence.com header.i=@cadence.com header.b="oCQzKRPO"; dkim=pass (1024-bit key) header.d=cadence.com header.i=@cadence.com header.b="VK4hMYwt" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726894AbgH0Njg (ORCPT ); Thu, 27 Aug 2020 09:39:36 -0400 Received: from mx0a-0014ca01.pphosted.com ([208.84.65.235]:52738 "EHLO mx0a-0014ca01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727849AbgH0N3Q (ORCPT ); Thu, 27 Aug 2020 09:29:16 -0400 Received: from pps.filterd (m0042385.ppops.net [127.0.0.1]) by mx0a-0014ca01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07RDS7t9004807; Thu, 27 Aug 2020 06:29:10 -0700 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=miwka1d2j2ZjmazIKD563V3VQqO6F8hQyfmmLTH4uqM=; b=oCQzKRPOUq5b7iHRgOyoU0oLLPHzZ67tmJh5uQV3k6Q24WfgbhtjVzKrRo9JDk2WI2fO Dhx4BeQOhPdbDrJsusGJpQ6yJyby2DI0N3J9bAdRKLpWhqbsgK+c/Q1AMcNr6GTxaDCa g4hcdGIJynqA3UORoC7lz8lsIzUDCzwi18RpC6P9U3un4BLp+rj9RyTQJpBcB66H/iFd Htfh1X9RbZm3nDBdXDVsRjz2jxJwMF0bdYrS3ePx4uR39RBorsCAAXLW6Az3T7p0lpZ3 zmFjOEd9dID1s14qO+iAMxw2E+CHsEcfvFPa+yeRZJPKWGgCMxISeIonwqwYS7Tmb+eK CQ== Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by mx0a-0014ca01.pphosted.com with ESMTP id 332yww45e2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Aug 2020 06:29:10 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J8Yxg9/IyXfhoj2ALv/rFx0ajuGgMPeyDZ0hVNya5sz1xTYNAaEJsZWBfKQByHhU7xy5b6IO8wwQhBnwWTJT865TsfhuQ8OyixY/XT4WtSDuNWtplbyk+Yqp4u8SpkbMvolD/DUqtvW0J5R4K5wXsKt3K3o/UdU9NekycUgFs5IdZ1Jd1PUawj/p8Mjo79EEuUuYH4vMcO+vySzUHL5WNgoTbPXwExzW6GIzaXXBZNAmEXR01zpOb9TtLdFrTih6e7ii35CWgqLR6FRgpXXKnFJKDX/lOu1TvXvM02wpFa7kmgZPZjbZ+lRnJRGpKLQ5TKKjzZvPjb1eiZsx+5MSOw== 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=miwka1d2j2ZjmazIKD563V3VQqO6F8hQyfmmLTH4uqM=; b=UnNKflFB/wjJgdJdNXfRM/QfLZkZHrLUTgjNw3nPIhpPTkpHP1BNQw3jaSOLG1aS2hvih2/exnTSJKZI4+HwR0OulNPjbvDzg1lHkB2l/4loxxIyQ0JDhE53T3ApEM/sZ9KThwhNJyoiSu2WL+AJRjgeoO4h5AH3FU9YoGSyDWr4WDMHuQbFQsV3E32nhmu8kJQKt6MoUn82R2JECFYAAwma++CO5Qmcp/S70NQTcr634xvOv6ZUx1xrVGB/yExQD5ww8hOfkcj5NZSCbmLLTwe9K8G8KlUkgaJ0SuzFgAOuzq0X2zjTKlE5VnO2NUoBmuItMy/4I5j2YJLY79jjUw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 199.43.4.23) smtp.rcpttodomain=kernel.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=miwka1d2j2ZjmazIKD563V3VQqO6F8hQyfmmLTH4uqM=; b=VK4hMYwtKRYIj5mbAzlaNznSaHT3WMg7LXIPbOCInd3df1xR1ahnNWY1ZbSIBRdbGOqSOT1cfA4cMVg00mQGE8eBL8kPAMlq5ypPJxTs5rTYDfvWDCshR1s1Yt64crkx8R/XwkM+HWMTfezfij0FHTEbrz4jm/Fu/XjKDd7cSWo= Received: from DM5PR18CA0064.namprd18.prod.outlook.com (2603:10b6:3:22::26) by BL0PR07MB5043.namprd07.prod.outlook.com (2603:10b6:208:4c::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.26; Thu, 27 Aug 2020 13:29:07 +0000 Received: from DM6NAM12FT053.eop-nam12.prod.protection.outlook.com (2603:10b6:3:22:cafe::96) by DM5PR18CA0064.outlook.office365.com (2603:10b6:3:22::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3326.20 via Frontend Transport; Thu, 27 Aug 2020 13:29:07 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 199.43.4.23) smtp.mailfrom=cadence.com; kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=pass action=none header.from=cadence.com; Received-SPF: Pass (protection.outlook.com: domain of cadence.com designates 199.43.4.23 as permitted sender) receiver=protection.outlook.com; client-ip=199.43.4.23; helo=rmmaillnx1.cadence.com; Received: from rmmaillnx1.cadence.com (199.43.4.23) by DM6NAM12FT053.mail.protection.outlook.com (10.13.179.125) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3326.19 via Frontend Transport; Thu, 27 Aug 2020 13:29:05 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by rmmaillnx1.cadence.com (8.14.4/8.14.4) with ESMTP id 07RDSrRn001550 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK); Thu, 27 Aug 2020 09:29:03 -0400 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, 27 Aug 2020 15:28:54 +0200 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, 27 Aug 2020 15:28:54 +0200 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 07RDSsHn018766; Thu, 27 Aug 2020 15:28:54 +0200 Received: (from sjakhade@localhost) by vleu-orange.cadence.com (8.14.4/8.14.4/Submit) id 07RDSsND018765; Thu, 27 Aug 2020 15:28:54 +0200 From: Swapnil Jakhade To: , , , , CC: , , , , , Subject: [PATCH v2 7/7] dt-bindings: phy: cadence-torrent: Update Torrent PHY bindings for generic use Date: Thu, 27 Aug 2020 15:28:52 +0200 Message-ID: <1598534932-18693-8-git-send-email-sjakhade@cadence.com> X-Mailer: git-send-email 2.4.5 In-Reply-To: <1598534932-18693-1-git-send-email-sjakhade@cadence.com> References: <1598534932-18693-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: ce2f86e9-4431-4696-5bd9-08d84a8d2b88 X-MS-TrafficTypeDiagnostic: BL0PR07MB5043: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NeFb/JCM87A0zGMnW4amVR0j8/jfm1UtiFO9t7Oc61GqUUCzmJEGXh1AU80lSugRCI+kmBfr313XIP+P/PWirFXHKvSoNk51PGrE5yJvOtYt43U2bjzN9VvRvz6pUqKdq1moCEe4wprUQoTSlXj42ru1nDXhGlns1OG+XClZxwiCWFKra84rP8+/6MK5o0Z/MYMja6zkrH6x134WtAfSUidNuufG2sFDGrXYHfaqs+fUeDoPTo7WeS/PPrCIWdJIK1bsuzSk6Cz99ncYmObZqCVtAd87SZXz4XejKD97J4K6ZUYnMxam5iukh8AqL0LkCBmP6f5LPv5Lr2UeyFzDiR4KzbUmccvICeHFwZUT4rJi8tU6q1aBf4si5AdmgqnkJmvp6ADM0yrcDgj8pYndqdRZFFu9XqWgL5MgCMmixWpuKh/vw53AnUVtS/Z6VRlaXAxa2wvoaMbAho5tn1t4JAEy0pExPiQd7KPngCXdwzayxJhuSbpSHz0bdqE6liEOqUL+9CSIuTAr6MYfv6z0Ag== X-Forefront-Antispam-Report: CIP:199.43.4.23; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:rmmaillnx1.cadence.com; PTR:ErrorRetry; CAT:NONE; SFS:(4636009)(346002)(39860400002)(376002)(136003)(396003)(36092001)(46966005)(70206006)(4326008)(316002)(356005)(42186006)(70586007)(82310400002)(8676002)(54906003)(110136005)(83380400001)(2906002)(8936002)(26005)(426003)(82740400003)(86362001)(186003)(15650500001)(2616005)(36756003)(336012)(5660300002)(478600001)(81166007)(47076004)(41533002); DIR:OUT; SFP:1101; X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Aug 2020 13:29:05.3456 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ce2f86e9-4431-4696-5bd9-08d84a8d2b88 X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[199.43.4.23]; Helo=[rmmaillnx1.cadence.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM12FT053.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR07MB5043 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-08-27_07:2020-08-27,2020-08-27 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 phishscore=0 bulkscore=0 mlxlogscore=989 spamscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 lowpriorityscore=0 clxscore=1015 adultscore=0 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008270102 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Torrent PHY can be used in different multi-link multi-protocol configurations including protocols other than DisplayPort also, such as PCIe, USB, SGMII, QSGMII etc. Update the bindings to have support for these configurations. Signed-off-by: Swapnil Jakhade --- .../bindings/phy/phy-cadence-torrent.yaml | 76 ++++++++++++++----- 1 file changed, 58 insertions(+), 18 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml b/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml index a7ee19d27c19..1b9e1231f8d8 100644 --- a/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml +++ b/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml @@ -4,11 +4,13 @@ $id: "http://devicetree.org/schemas/phy/phy-cadence-torrent.yaml#" $schema: "http://devicetree.org/meta-schemas/core.yaml#" -title: Cadence Torrent SD0801 PHY binding for DisplayPort +title: Cadence Torrent SD0801 PHY binding description: This binding describes the Cadence SD0801 PHY (also known as Torrent PHY) - hardware included with the Cadence MHDP DisplayPort controller. + hardware included with the Cadence MHDP DisplayPort controller. Torrent + PHY also supports multilink multiprotocol combinations including protocols + such as PCIe, USB, SGMII, QSGMII etc. maintainers: - Swapnil Jakhade @@ -49,13 +51,14 @@ properties: - const: dptx_phy resets: - maxItems: 1 - description: - Torrent PHY reset. - See Documentation/devicetree/bindings/reset/reset.txt + minItems: 1 + maxItems: 2 + items: + - description: Torrent PHY reset. + - description: Torrent APB reset. This is optional. patternProperties: - '^phy@[0-7]+$': + '^link@[0-7]+$': type: object description: Each group of PHY lanes with a single master lane should be represented as a sub-node. @@ -78,13 +81,13 @@ patternProperties: Specifies the type of PHY for which the group of PHY lanes is used. Refer include/dt-bindings/phy/phy.h. Constants from the header should be used. $ref: /schemas/types.yaml#/definitions/uint32 - enum: [1, 2, 3, 4, 5, 6] + enum: [1, 2, 3, 4, 5, 6, 7, 8, 9] cdns,num-lanes: description: - Number of DisplayPort lanes. + Number of lanes. $ref: /schemas/types.yaml#/definitions/uint32 - enum: [1, 2, 4] + enum: [1, 2, 3, 4] default: 4 cdns,ssc-mode: @@ -108,6 +111,7 @@ patternProperties: - resets - "#phy-cells" - cdns,phy-type + - cdns,num-lanes additionalProperties: false @@ -141,14 +145,50 @@ examples: clock-names = "refclk"; #address-cells = <1>; #size-cells = <0>; - phy@0 { - reg = <0>; - resets = <&phyrst 1>, <&phyrst 2>, - <&phyrst 3>, <&phyrst 4>; - #phy-cells = <0>; - cdns,phy-type = ; - cdns,num-lanes = <4>; - cdns,max-bit-rate = <8100>; + link@0 { + reg = <0>; + resets = <&phyrst 1>, <&phyrst 2>, + <&phyrst 3>, <&phyrst 4>; + #phy-cells = <0>; + cdns,phy-type = ; + cdns,num-lanes = <4>; + cdns,max-bit-rate = <8100>; + }; + }; + }; + - | + #include + #include + + bus { + #address-cells = <2>; + #size-cells = <2>; + + torrent-phy@f0fb500000 { + compatible = "cdns,torrent-phy"; + reg = <0xf0 0xfb500000 0x0 0x00100000>; + reg-names = "torrent_phy"; + resets = <&phyrst 0>, <&phyrst 1>; + clocks = <&ref_clk>; + clock-names = "refclk"; + #address-cells = <1>; + #size-cells = <0>; + link@0 { + reg = <0>; + resets = <&phyrst 2>, <&phyrst 3>; + #phy-cells = <0>; + cdns,phy-type = ; + cdns,num-lanes = <2>; + cdns,ssc-mode = ; + }; + + link@2 { + reg = <2>; + resets = <&phyrst 4>; + #phy-cells = <0>; + cdns,phy-type = ; + cdns,num-lanes = <1>; + cdns,ssc-mode = ; }; }; };