From patchwork Tue Dec 3 10:13:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuti Amonkar X-Patchwork-Id: 11271183 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 736DB1892 for ; Tue, 3 Dec 2019 12:48:44 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 5B7FA20684 for ; Tue, 3 Dec 2019 12:48:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5B7FA20684 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cadence.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C534D6E4D2; Tue, 3 Dec 2019 12:48:29 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mx0a-0014ca01.pphosted.com (mx0a-0014ca01.pphosted.com [208.84.65.235]) by gabe.freedesktop.org (Postfix) with ESMTPS id A80986E03F for ; Tue, 3 Dec 2019 10:36:45 +0000 (UTC) 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 xB3ACDbJ020547; Tue, 3 Dec 2019 02:14:14 -0800 Received: from nam04-sn1-obe.outbound.protection.outlook.com (mail-sn1nam04lp2058.outbound.protection.outlook.com [104.47.44.58]) by mx0a-0014ca01.pphosted.com with ESMTP id 2wknv0uk84-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 03 Dec 2019 02:14:14 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nIvzBuVbUB1UY102S/VA5dpuXwl++DPg56pZfepkxrvCOqUlZcxp+SCbAkK59baqrMJu+nf6N5l8d4uPHu4f0QXQ5aRhHRE9HQXifK0/Mh9gNnsfm6cjIDugt5v2w4wXIaog/SSV3pUDqgC2WyI4tzHoG5+2oyd21GeBSa/AX9n9NQYwm3DxjHxduPA0VjdLhv2358+Awp7ljZm/WkVXr9yV8xQByXaRpp33BXWZVUbOQeyGLe4gRezvG+pwkJc+9EBLEjrliUiEIk8g97YxhHldt26ntmGShK2G7Jgx1OZ2jVE3IsBESZvWN4fjx52E5q0sca8RFYUgLLj+CHKqjQ== 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=B5xA/nTwe/jVio7WBGPqz1t6adufCD9Cdvmd8FLl/YI=; b=MW56XYeM6bwAhgodJApj4i+cFUMg2KQuvuPSTaBDK/r0hokhqG8wZ0fDxSKnP3vc5aIWjBGz1m4w241XDSFwlbFw/6AnR+fPMAAM1BMMUm2O15xeHC5RMrlFUI/sHiTjJBL7CggsScnHLOZBto4T4zMjvmee8YQotNRXJMrmxSPXsgqXTQLOJW6ONpWv/Y7Oh1vaHCj8Rx4DLSQt+cJSaZ7rNCiTsbyfNxUNj6XcOn2MuXqRx4KdRN8HTiHnPtYQZ1L7738y4nwJMdZhZFYX/+KpnVBXmCzogNpjp44PL7/F//l2Yu3Rq2y3PFTRLMI/b1Yy6R665opBagskr8uiew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 158.140.1.28) smtp.rcpttodomain=ti.com smtp.mailfrom=cadence.com; dmarc=fail (p=none sp=none pct=100) action=none header.from=cadence.com; dkim=none (message not signed); arc=none Received: from DM6PR07CA0060.namprd07.prod.outlook.com (2603:10b6:5:74::37) by BYAPR07MB4661.namprd07.prod.outlook.com (2603:10b6:a02:fe::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.20; Tue, 3 Dec 2019 10:14:11 +0000 Received: from DM6NAM12FT055.eop-nam12.prod.protection.outlook.com (2a01:111:f400:fe59::200) by DM6PR07CA0060.outlook.office365.com (2603:10b6:5:74::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.18 via Frontend Transport; Tue, 3 Dec 2019 10:14:11 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning cadence.com discourages use of 158.140.1.28 as permitted sender) Received: from sjmaillnx2.cadence.com (158.140.1.28) by DM6NAM12FT055.mail.protection.outlook.com (10.13.179.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.18 via Frontend Transport; Tue, 3 Dec 2019 10:14:11 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by sjmaillnx2.cadence.com (8.14.4/8.14.4) with ESMTP id xB3AE7sn027708 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK); Tue, 3 Dec 2019 02:14:09 -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; Tue, 3 Dec 2019 11:14:06 +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; Tue, 3 Dec 2019 11:14:06 +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 xB3AE6rp030871; Tue, 3 Dec 2019 11:14:06 +0100 Received: (from yamonkar@localhost) by vleu-orange.cadence.com (8.14.4/8.14.4/Submit) id xB3AE5fq030847; Tue, 3 Dec 2019 11:14:05 +0100 From: Yuti Amonkar To: Subject: [PATCH v1 00/15] PHY: Update Cadence Torrent PHY driver with reconfiguration Date: Tue, 3 Dec 2019 11:13:10 +0100 Message-ID: <1575368005-29797-1-git-send-email-yamonkar@cadence.com> X-Mailer: git-send-email 2.4.5 MIME-Version: 1.0 X-OrganizationHeadersPreserved: maileu3.global.cadence.com X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:158.140.1.28; IPV:CAL; SCL:-1; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(136003)(396003)(39860400002)(346002)(376002)(36092001)(189003)(199004)(14444005)(50226002)(8936002)(107886003)(5660300002)(6916009)(8676002)(86362001)(246002)(48376002)(2351001)(336012)(2616005)(4326008)(50466002)(426003)(76130400001)(2906002)(4743002)(54906003)(316002)(26005)(42186006)(51416003)(15650500001)(16586007)(186003)(19627235002)(305945005)(70586007)(70206006)(478600001)(6666004)(356004)(36756003)(26826003)(7636002)(87636003); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB4661; H:sjmaillnx2.cadence.com; FPR:; SPF:SoftFail; LANG:en; PTR:corp.cadence.com; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 67ef5ec8-4b11-49df-043c-08d777d98ae0 X-MS-TrafficTypeDiagnostic: BYAPR07MB4661: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-Forefront-PRVS: 02408926C4 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: e5HHJy6q/foPRQ++r1DmdAomSr/i2qUHT93JzkAiLtHRNnxBhiTKpCNi3cvWYcdn3NmrBe2HxPQKYcgYnOhmF4TSz5xojVF180CdYWuMYOoR5GL6Bf0e5yjLBRflJlFdWpvXIKhv6fB01eyIsy1OstQi34Q2Gtz7+Zi/dmV7gptHlrph4Lbsfxd7jCrs90d0d33lm8kYS+YhyW/xRqNhE1zTdeig8dAQLcUbImrbnNVOFU5Mp8wNpGs3VukMojlI9mQ6IxY18QhCuWZkS+5kAQafPdW2wMV6ZeN8Ymo7r8aepR+rtvVfTeMLZQeSJ4yeEoy2gJCGhYpavVclyocBnZPb0gOuqcsk2ERf1YSrfBxc6c8V99hAsXFN/Y6K9T6csxGRlr2SfDB5T2jo7oj155sVOrMjhSViTMfTNeq/RMKIcf7d2x3z9a22QTx/Pq7EeHbFs0nMqWpOW0Rv9KPP50oINuL+2SG3c4lNnrIwwotliy2Sml36ywYpE3G+Mpxn X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2019 10:14:11.6699 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 67ef5ec8-4b11-49df-043c-08d777d98ae0 X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[158.140.1.28]; Helo=[sjmaillnx2.cadence.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4661 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-03_02:2019-11-29,2019-12-03 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 adultscore=0 spamscore=0 suspectscore=1 clxscore=1011 mlxlogscore=999 phishscore=0 impostorscore=0 malwarescore=0 bulkscore=0 lowpriorityscore=0 priorityscore=1501 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912030082 X-Mailman-Approved-At: Tue, 03 Dec 2019 12:48:27 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=proofpoint; bh=B5xA/nTwe/jVio7WBGPqz1t6adufCD9Cdvmd8FLl/YI=; b=d8TqnvpooF0ICtkZltDe6IGzjciOhVOyPJuPLW4n/ozG72l8pbmjw7/JMA3gwyQ7Ku7e vmWQtBx5Q266phToukSG5jrpXcFwIDwDm0D9N+dCJRPM7aKJ8pg403LWZa/EEATFFQzc IPdoPiCJWnEINteYcgl/h9wa6ifaogRRvHx83JnkTdzb5QdaE0JyQr3h2H/hVBUvrdbu 3RCGEoG1yLIuOXjfJfCiQ1fRYgmDBXlIvcKCY+qewb/9zgZoD9KlvjQqti9LDWHga2Qw 5yPNZmioO03YQbIvEgBkcFGAt5XtcNZAvD32H6BQ8J3bhWayxhhUswOQ94GsXYBlLImm Ig== X-Mailman-Original-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=B5xA/nTwe/jVio7WBGPqz1t6adufCD9Cdvmd8FLl/YI=; b=UvhCzLTjS7jSE4Y5AnFsIBXAQS7k66ZAACc9F6yePbV5Suo+hZEJtIUoY/2+9coC0asL21qhDz7zPrjZIAMq75WoMUUc4op9UZiVFvAH9bEgPDmwv0vV3TImgQ+U3GnNnYyr1nRGjKCbtVafCAgvYNrQW82MMA9h1hpDQVaMSgI= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mparab@cadence.com, yamonkar@cadence.com, praneeth@ti.com, dkangude@cadence.com, jsarha@ti.com, kishon@ti.com, tomi.valkeinen@ti.com, sjakhade@cadence.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This patch series applies to the Cadence SD0801 PHY driver. Cadence SD0801 PHY driver is Torrent PHY driver for Display Port.Torrent PHY is a multiprotocol PHY supporting PHY configurations including Display Port,USB and PCIe. This patch series first adds display port configuration then updates the driver to make it a generic Torrent driver and finally adds SoC platform dependent initialization. The patch series has 15 patches which applies the changes in the below sequence 1. 001-phy-cadance-dp-Add-DisplayPort-configuration-options This patch adds generic DisplayPort API for configuring PHY.The parameters configured are link rate, number of lanes, voltage swing and pre-emphasis. 2. 002-dt-bindings-phy-Convert-Cadence-MHDP-PHY-bindings-to-YAML This patch converts the MHDP PHY device tree bindings to yaml schemas 3. 003-phy-cadence-dp-Rename-to-phy-Cadence-Torrent Rename Cadence DP PHY driver from phy-cadence-dp to phy-cadence-torrent 4. 004-phy-cadence-torrent-Adopt-Torrent-nomenclature Update private data structures, module descriptions and functions prefix to Torrent 5. 005-phy-cadence-torrent-Add-wrapper-for-PHY-register-access Add a wrapper function to write Torrent PHY registers to improve code readability. 6. 006-phy-cadence-torrent-Add-wrapper-for-DPTX-register-access Add wrapper functions to read, write DisplayPort specific PHY registers to improve code readability. 7. 007-phy-cadence-torrent-Refactor-code-for-reusability Add separate function to set different power state values. Use of uniform polling timeout value. Check return values of functions for error handling. 8. 008-phy-cadence-torrent-Add clock bindings Add Torrent PHY reference clock bindings. 9. 009-phy-cadence-torrent-Add-19.2-MHz-reference-clock-support Add configuration functions for 19.2 MHz reference clock support.Add register configurations for SSC support. 10. 010-phy-cadence-torrent-Add-phy-lane-reset-support Add reset support for PHY lane group. 11. 011-phy-cadence-torrent-Implement-phy-configure-APIs Add PHY configuration APIs for link rate, number of lanes, voltage swing and pre-emphasis values. 12. 012-phy-cadence-torrent-Use-regmap Use regmap for accessing Torrent PHY registers. Update register offsets. Abstract address calculation using regmap APIs. 13. 013-phy: cadence-torrent-Use-regmap-to-read-and-write-DPTX-PHY-registers Use regmap to read and write DPTX specific PHY registers. 14. 014-dt-bindings-phy-phy-cadence-torrent-Add-platform-dependent-compatible-string Add a new compatible string used for TI SoCs using Torrent PHY. 15. 015-phy-cadence-torrent-Add-platform-dependent-initialization-structure Add platform dependent initialization data for Torrent PHY used in TI's J721E SoC. Swapnil Jakhade (8): phy: cadence-torrent: Adopt Torrent nomenclature phy: cadence-torrent: Add wrapper for PHY register access phy: cadence-torrent: Add wrapper for DPTX register access phy: cadence-torrent: Refactor code for reusability phy: cadence-torrent: Add 19.2 MHz reference clock support phy: cadence-torrent: Add PHY lane reset support phy: cadence-torrent: Implement PHY configure APIs phy: cadence-torrent: Use regmap to read and write DPTX PHY registers Yuti Amonkar (7): phy: Add DisplayPort configuration options dt-bindings:phy: Convert Cadence MHDP PHY bindings to YAML. phy: cadence-dp: Rename to phy-cadence-torrent dt-bindings: phy: phy-cadence-torrent: Add clock bindings phy: cadence-torrent: Use regmap to read and write Torrent PHY registers dt-bindings: phy: phy-cadence-torrent: Add platform dependent compatible string phy: cadence-torrent: Add platform dependent initialization structure .../devicetree/bindings/phy/phy-cadence-dp.txt | 30 - .../bindings/phy/phy-cadence-torrent.yaml | 66 + drivers/phy/cadence/Kconfig | 6 +- drivers/phy/cadence/Makefile | 2 +- drivers/phy/cadence/phy-cadence-dp.c | 541 ------ drivers/phy/cadence/phy-cadence-torrent.c | 1824 ++++++++++++++++++++ include/linux/phy/phy-dp.h | 95 + include/linux/phy/phy.h | 4 + 8 files changed, 1993 insertions(+), 575 deletions(-) delete mode 100644 Documentation/devicetree/bindings/phy/phy-cadence-dp.txt create mode 100644 Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml delete mode 100644 drivers/phy/cadence/phy-cadence-dp.c create mode 100644 drivers/phy/cadence/phy-cadence-torrent.c create mode 100644 include/linux/phy/phy-dp.h