From patchwork Fri Jan 14 04:42:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Hancock X-Patchwork-Id: 533162 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F8CCC4332F for ; Fri, 14 Jan 2022 04:43:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231140AbiANEnc (ORCPT ); Thu, 13 Jan 2022 23:43:32 -0500 Received: from mx0d-0054df01.pphosted.com ([67.231.150.19]:11031 "EHLO mx0d-0054df01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229813AbiANEna (ORCPT ); Thu, 13 Jan 2022 23:43:30 -0500 Received: from pps.filterd (m0209000.ppops.net [127.0.0.1]) by mx0c-0054df01.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 20E4hQMg005072; Thu, 13 Jan 2022 23:43:26 -0500 Received: from can01-to1-obe.outbound.protection.outlook.com (mail-to1can01lp2051.outbound.protection.outlook.com [104.47.61.51]) by mx0c-0054df01.pphosted.com (PPS) with ESMTPS id 3dj2j2gvta-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Jan 2022 23:43:25 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X8kUOsLKTGttpMGxNehPNsbpOVpsPSPn2VjzyYp17T4anUJt+GC9GkZEPiT18nVp5FtiuywKAuNPXMGYgIgBUNIJ3cSSTnG/5HJQ6TfDWtRJmLkOYM2uBE+ql3N4Om1tjDVVooZWs3uJE74dZyHlstDaJxzk/N1WNDHzXZyo+o0/FoRO9v8OdFnP25C/oRLx4OB7XvnOdeBd7QNye1CkK2/mYknc8DnJ42Wv3M7mZBf1nKpb7VZKsNt05onR5xiX4HmAvuAjoXVRNofTBX9WHKrIUsXJrpH7yTg3N4CX7iZ2qyVgS6kPHK6aKvPya44/U8G6JAslKiCHqflZLUTaeg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+D3fgwE77//+LJ/u59LDGJ6v9aP+LrJdh8IqVspVkwI=; b=cSR1dxeOR6UO8C+LqrM/A91mphGHAFeGQWGxA5AeTQF6a2zG1q0RQ6TYvXfI9IcRnedqKYGd3EkfIro7mVzCYWAA3XnVc+zdvfckCY/3j/hDRxivB5Wt3andE5NYUc3WUAwENWmLEDDtsPnJuyAbiyPSlI6hKtL38Ojfy0EmkpKobuMgYzxh90oHtNAuT7eX8sJKZzv5AliH/wjwMMnTQpB1xuKwxRpaPjLVeCB0WEzpr66c8XaQjdsQHQm4A7Vn/dFyV4CdqYeUHGkDeXYZVkK/HUjj0ev8yJf0yrOy+xa498iMstQThT6+vj5SkmsSVay80B8AcD8uABTE8/c+Rg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=calian.com; dmarc=pass action=none header.from=calian.com; dkim=pass header.d=calian.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=calian.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+D3fgwE77//+LJ/u59LDGJ6v9aP+LrJdh8IqVspVkwI=; b=r2k0DaKbz8Aeu9Y566u+uMc40xqChA8TS/b2mY57boGq1rRXfGz+cPMf3/KZF01GolcuBNNR58Y3oe4ztusjeDh+Vuwh7g4jxRsPUmBiG7CkiiXohpSqsjneTu1s3+a55lqCMsEVn8VKtqeVQYQddteJiI2IAGPjnCP7AcI02xs= Received: from YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:4d::14) by YQBPR0101MB6341.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:38::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.10; Fri, 14 Jan 2022 04:43:24 +0000 Received: from YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM ([fe80::d51:8098:30cc:5bb6]) by YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM ([fe80::d51:8098:30cc:5bb6%3]) with mapi id 15.20.4888.011; Fri, 14 Jan 2022 04:43:24 +0000 From: Robert Hancock To: linux-usb@vger.kernel.org Cc: Thinh.Nguyen@synopsys.com, robh+dt@kernel.org, devicetree@vger.kernel.org, michal.simek@xilinx.com, balbi@kernel.org, gregkh@linuxfoundation.org, mounika.grace.akula@xilinx.com, manish.narani@xilinx.com, Robert Hancock Subject: [PATCH v4 1/5] usb: dwc3: xilinx: Fix PIPE clock selection for USB2.0 mode Date: Thu, 13 Jan 2022 22:42:26 -0600 Message-Id: <20220114044230.2677283-2-robert.hancock@calian.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220114044230.2677283-1-robert.hancock@calian.com> References: <20220114044230.2677283-1-robert.hancock@calian.com> X-ClientProxiedBy: MWHPR02CA0016.namprd02.prod.outlook.com (2603:10b6:300:4b::26) To YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:4d::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1534c7ae-095b-485e-74e2-08d9d7186651 X-MS-TrafficTypeDiagnostic: YQBPR0101MB6341:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uFy0x7eaJ0yGy0B7LAqU6Zh64QFhbYqMYtPtFn7+EE5VlnFpUxvx/U5HsUUMOmHq96kwJmnoP55hOEAXX7mQJ3LPcYPt0jZCYufrf0HztrGAMxa5geEAqN4nDFnpwPO2dQ5+1kvBmUyg75hMmgbXpqZZznPBcNHOaRaiQBDms4QZpOMdN8wvS0joJfhql8Eb6RVhekJQOcpr5HqRkfUFIVyoUNnR8GaaGWF6d6sCbrxcXbEs1E4ok1UXCVnIrxU0p+mnBGBMNsHIULynXtFU0k+8Cyo3s6xT5En/RMzQLyH4zrrCLHyNJpf9jyptKx2+4jWxLt6/AbUNOJ6ecJd3utzA78cIFOgHhnzEpG/CmbLDzNkTeBXEMUNhB+Ev43L044/G8etT6TS8Q0Q64++wHp8s8U2yv/DWHGUoWqBjkwMbgXWJcJIzo6yURHeiH2dY4S1MVL1IbN28NnxdWFkQEIQjuJXm5uvK9azSDxgCmP2T+y4pmHLdnpumVhkac/O++Bnt3FmN6ccmKJzVFBtsOdjy9gZyw2P+zN2jWnlfxmUYlJDIZIvYiGukTmtRKypf9w+bstgswdBR7xaspcCxli/+6oqIcEWPjBkaOtAI3WAh76khrmSEwNfaR1BwJlqEwvrzJ6velVbwadlvpQxGJfeiu3oMYXNuMXkCVObg0KeZ4Xfkk6j6emyelYmd3cl46/IXjDH7DoreJwcFUiB7IA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(4636009)(366004)(186003)(2906002)(6486002)(107886003)(8676002)(4326008)(2616005)(44832011)(5660300002)(1076003)(83380400001)(8936002)(86362001)(38350700002)(6916009)(36756003)(6506007)(6512007)(508600001)(66476007)(316002)(26005)(66556008)(52116002)(66946007)(38100700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LxF6twY9UAKsahEk/h6f8rNikHxWK+TIlXOR98oEGlHQuf07fKTOR62DTJoGMid7QNAu4JiwkP8QbGQPk65LLDNzDn83Sgfh8e/Qz5sGr9DwlW6gUxhDNK7PfsY0y+CCv1eHE6CSUOrFyJScPBzmE0dpM/uRz+aoIZoBGWV0IEcW+qna3qruRETr9bkh88n+XtHKXF9cjBIn43QhxbSTdYDOlj9sSFjWXmqqbBGN9qOVdcMiMlAOtsspVVBmI8ddy6rWlEOkwvm0ri62iTCiw69Di159p3Anm6EDNRyVRZaYse5queuAXZ7/t/r5689l+168TCi7aXyBM6V1vJk6lriVycHoHBysMB6X7ez+Fl5nTZUlIKhElaO8JxZ8GkbwajdmcHgQqFaBLVz3ZdvJAKpbRArzBu1GxVvcP95LDxwcdTnyKpd94qCMyFEEZaiNZ6YIbCOvkWHaG+D9eWm780VAAG3aTjH17PdzLs1D5S3xYMc7TdUZFEfqVMeZMSCJQRCl0hmXyqRfUgoJHrCywxGfI6S9GHLiowT1wf2XXFEkq5k+n11OBycpxie2MJOcTlSZzNfEcpWZrBOdbG3GtBz/30SvJz+zMpVEEj4gRoxqkqAJQnBUIYtrJYoI2fNxTB9XBAf7DJ3PiB/ZcYtF0NtKhgHjxIrpfw8Ae/TaOctdp4ohkOePH0HF0C3LuIoYEeYHClF82DikO7hodS0xCEypzJeGQ274pZF6j+4UhFzXAr0nm9I9wPHlfoP4Bn/o2IWHAh2V0kJ+dCzU5JVMw2WTfksnZqOCVhCiyBk1t1kp5n2mD3T6tSLHmaG8TAp4Jjsjz2lHeUsfufgPkj6jyJdrIdYXczenxsDMPasnerE1bNjt/FXU7IdiyGVbys0JeHMT5oGtam1A/HHzZOVV6Vc5dYGLaZafSYiCNYlHIvYGEM5b2lQKEavxWDKaqAMPoDR3EEcHXMMR+5SSPzSTxXueB3savBN08dcOmk17IH1q2agSC8VgU/tHHGDxKAMZMekanBU3U9rURhi2dU2HQCKo24rIXPoMIaSRAAy2q9l5Qhcw2UcvSGEHUKKJgwgEIgdUfaiL7zSl7+B3QzjKz1pMxwQTbGIoKxuzUr1tMpg59+GcusWSkrLr40i7BEHg4vRatBsXJ9lx7mosxapcTWkN5IV2QkFrPponhvbDFTsHsODRztFc0vXzc3kNwcKbrGQNIjpdc2GxGF3hq+GN+dnpLqpXchkNqP/4deIjxM6ODaYsuLy1hWPtTGApY5DbCj1nc4PiTbnOXBQmCMvQ6OVR8F6NVPLWeWj4W9mxViwUdPRSSZ9FFjCVNbsjlhCNyv7gkm7Rnqgy4bnE9EqC9Nz7doYFm6tVmYheBYo+v36AN0T4mESzIsM/nqUNt8UCSk/9AZhhiOcj7ZSgCv0MIa4YGGeyVqBzihFxV90uGLbyyufntBXp8qGEptq3S3qt89wBizI4tszrwnG9zDxMI9n8zyK8D6YYldiObh2tTd9YVmz0qtFQAMNl+rB4AS79T1/pfBr0JuTV+ijIHqcvvRkE+PzFYTw/vGhZLDK0ghO0AQNVyG5X59URy3rJ1AQtW3UOc7KEar7WfHyP7saCfA13oE2TUKUnhBfEIlpX+sQiCrueapRj/aRkM8CRqSlOSI0cyyM4pbyHEHL2vzHW5MktajF7i7cglZw0qdvZ1So= X-OriginatorOrg: calian.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1534c7ae-095b-485e-74e2-08d9d7186651 X-MS-Exchange-CrossTenant-AuthSource: YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jan 2022 04:43:24.7144 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 23b57807-562f-49ad-92c4-3bb0f07a1fdf X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: YNyBAkxQruoQHGrbsE9fiQzlma0cG9Z1TudjyvX+3zSxGNxkNYoI/gu5VevfX5QSsX0YM5cH2T/NzJJZ+ZQK2aLzBpRd72ZtZACsjNIrfuo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQBPR0101MB6341 X-Proofpoint-GUID: Usf_hIoyBjwojmEJkT8-Zpf5h5uqgP9h X-Proofpoint-ORIG-GUID: Usf_hIoyBjwojmEJkT8-Zpf5h5uqgP9h X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-14_01,2022-01-13_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 mlxlogscore=878 lowpriorityscore=0 spamscore=0 phishscore=0 adultscore=0 suspectscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201140030 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org It appears that the PIPE clock should not be selected when only USB 2.0 is being used in the design and no USB 3.0 reference clock is used. Fix to set the correct value depending on whether a USB3 PHY is present. Fixes: 84770f028fab ("usb: dwc3: Add driver for Xilinx platforms") Signed-off-by: Robert Hancock --- drivers/usb/dwc3/dwc3-xilinx.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-xilinx.c b/drivers/usb/dwc3/dwc3-xilinx.c index 9cc3ad701a29..3bc035376394 100644 --- a/drivers/usb/dwc3/dwc3-xilinx.c +++ b/drivers/usb/dwc3/dwc3-xilinx.c @@ -167,8 +167,11 @@ static int dwc3_xlnx_init_zynqmp(struct dwc3_xlnx *priv_data) /* Set PIPE Power Present signal in FPD Power Present Register*/ writel(FPD_POWER_PRSNT_OPTION, priv_data->regs + XLNX_USB_FPD_POWER_PRSNT); - /* Set the PIPE Clock Select bit in FPD PIPE Clock register */ - writel(PIPE_CLK_SELECT, priv_data->regs + XLNX_USB_FPD_PIPE_CLK); + /* Set the PIPE Clock Select bit in FPD PIPE Clock register if a USB3 + * PHY is in use, deselect otherwise + */ + writel(usb3_phy ? PIPE_CLK_SELECT : PIPE_CLK_DESELECT, + priv_data->regs + XLNX_USB_FPD_PIPE_CLK); ret = reset_control_deassert(crst); if (ret < 0) { From patchwork Fri Jan 14 04:42:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Hancock X-Patchwork-Id: 532210 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 136E9C433FE for ; Fri, 14 Jan 2022 04:43:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231206AbiANEne (ORCPT ); Thu, 13 Jan 2022 23:43:34 -0500 Received: from mx0d-0054df01.pphosted.com ([67.231.150.19]:11509 "EHLO mx0d-0054df01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230425AbiANEnc (ORCPT ); Thu, 13 Jan 2022 23:43:32 -0500 Received: from pps.filterd (m0209000.ppops.net [127.0.0.1]) by mx0c-0054df01.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 20E4cF69030962; Thu, 13 Jan 2022 23:43:27 -0500 Received: from can01-to1-obe.outbound.protection.outlook.com (mail-to1can01lp2053.outbound.protection.outlook.com [104.47.61.53]) by mx0c-0054df01.pphosted.com (PPS) with ESMTPS id 3dj2j2gvtc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Jan 2022 23:43:27 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MWphEKzlixJsZidtfoy7ZTuvinCTX8OkcqB9liZv02ZHzJTbu0zgn122MCTrZ8RTT/Kg1o7s45YNBsW7USMDDHAOZaO+dG/WPClN8BmlWwaV2GIw/mvpl6rgBbpWOvjaKH03Vt27kPOlG4V/qFifo/kUroQhl3m02X0NpDA6z6GZADF5YSpHDRihjcUVnx9MRLgyGpMjwt4kVFObyfMeCr+406Iu8klvlYSdAY69WC4na/uO3FA/fouyySrDr8IrEF/3QT2n+J8A2Jzgecd5OPpDxcO6470XvH82IdhQx4qIJachMqpT/L/6RgL7prrPNqVuAqMDsnuuOuiQ58+8Qg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/I/22Z2oVsG1IyKTu+TUts7zPyN/ZLXHjCb4USg+lXs=; b=KR/EXzWijRmygwRbsWf5jcaJZO1HdEheC2A2wngy14jvWYjWRNrsmqBoG/9eDHkJU5LycWIAo846sHFbGA7+fy0+YgNxv1y0e+EKThOwEn5G3LFyROQizuhccz+6P1pzE+l3XBHd/qTb1gaSxazY2u3lgmiueOYdYD1M+RWZBsVC/kHaRbYWU4+2noWQOLewpeX3b6aEB8sQ0RcHZH3jS8gZXD1HwBWUfp0pbpzgySlg0UhMYxauovN5vRh7EpJaOCKtxMt1GqsChkkJYUG7tSRwYdiQn3OzwUOGBae0PKIYWOlmPxwWites6Pbw2pSC04tPRTerwIW9yfyqvQpFpA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=calian.com; dmarc=pass action=none header.from=calian.com; dkim=pass header.d=calian.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=calian.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/I/22Z2oVsG1IyKTu+TUts7zPyN/ZLXHjCb4USg+lXs=; b=ZdgIHaqBONIPEA7ER1LZrm502X3gBTDQMdVllB0gMx20Q9Lix/Zg83Sx31t8nWTT/cy6vk7QjduBnXdz+hIQjhA1g8xhMsmi+/cPan/jyPrwyg+s0rsTFSjLp1qI40pWeH1Giv8AwDvp1/gjtsZi7KHNHEK7ICpS7RHHOqTLHX4= Received: from YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:4d::14) by YQBPR0101MB6341.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:38::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.10; Fri, 14 Jan 2022 04:43:26 +0000 Received: from YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM ([fe80::d51:8098:30cc:5bb6]) by YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM ([fe80::d51:8098:30cc:5bb6%3]) with mapi id 15.20.4888.011; Fri, 14 Jan 2022 04:43:26 +0000 From: Robert Hancock To: linux-usb@vger.kernel.org Cc: Thinh.Nguyen@synopsys.com, robh+dt@kernel.org, devicetree@vger.kernel.org, michal.simek@xilinx.com, balbi@kernel.org, gregkh@linuxfoundation.org, mounika.grace.akula@xilinx.com, manish.narani@xilinx.com, Robert Hancock Subject: [PATCH v4 2/5] usb: dwc3: xilinx: Fix error handling when getting USB3 PHY Date: Thu, 13 Jan 2022 22:42:27 -0600 Message-Id: <20220114044230.2677283-3-robert.hancock@calian.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220114044230.2677283-1-robert.hancock@calian.com> References: <20220114044230.2677283-1-robert.hancock@calian.com> X-ClientProxiedBy: MWHPR02CA0016.namprd02.prod.outlook.com (2603:10b6:300:4b::26) To YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:4d::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 50f48e16-ff88-4dc6-836d-08d9d7186738 X-MS-TrafficTypeDiagnostic: YQBPR0101MB6341:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1GAObHYGyTnDUZ9y/bVI8orkL59ulmCItKERFkjb2BIVqB/+HxWePqgeN6RMhTEuTl7S1PlsA3any61blBM5wJR89vcBFFRn0gK+Z3DNgcL5IJ2DF7lPt+R7AAEyOfbeUFOMrxc1AljhoIaL6QtGaCTorC1+r2xe0XqDTa5VuTLRjgwguC4PytblynqZxLMCSja+yCGJjiuQ6QEd+8roe1eNSkJUvWkVwetd4eGkDdoGLgcUu875ShwVZmpAAcvx752yJH3YXeTfGhwCPDTammM5vzR5qVXz/eZgbR/c92SM6cDlE5SJ5bS1qvLgHaU72R6jGUhZWzl6Arqph+2LnBM5bIvq+r6scaQ2kOunl5VXNtNW3vwnQ044ZuSbqKG2wohULnYceYnceRasHARtfqhTr3GXvaYJSH3uBN2NLjhb+PIxCiH8VNYEOg/G3jC9qakU5v8aLikZNWVrhi5XdtLhK1yZLxD5/KlAhWLMWnKrJnJTZura1tqqO/zNk6lpYlDkDc9xq+jgISNPKMsf/p9tE9nPwWQukKoxjuCUb3vfZelwtusdDgGNZT4rf135M+7exM3a0uViHhnAVKt3TBrS6xWLABUCIwLREB9opI9O0rZWcZuw+n3MJoOXmon1VCTaVPx3PuesaVoF4Oi57XRllYfQ7Mi8JcHT4n7qAnJuqNMn1uCRqC8OYPOBVp+rNKazgbO+n28msrH1neB+jA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(4636009)(366004)(186003)(2906002)(6486002)(107886003)(8676002)(4326008)(2616005)(44832011)(5660300002)(1076003)(83380400001)(8936002)(86362001)(38350700002)(6916009)(36756003)(6506007)(6512007)(508600001)(66476007)(316002)(26005)(66556008)(52116002)(66946007)(38100700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Ge/AKifrh2csS4oy/W0FWK9BYF/DoyJhiIAF+Va9XuzJuTXwXYHROkwyYRtMlvYfIGdgHk1y0O1itZ3cppcA/CIYxWsKNcenHqGqx/hg6YM97j14a5RAukF3GDgFYBZjbbWzwH2ThqUB2/NzWhPKC7EvlDwS2JDxJ1Q2h4jMAVStZsLLne6Wxs03vH6WL6C6SvDnKnO2dsLgl7x8DOfbvWenXBaLCLd/fV14JhiwX3YLxbZmlLDUKFCqMBI4RkNbGIubWaRd/32KP9M2nEu9ByAGi1WWHin1CaDXIU4jsUBi8B0mYeeR9MkkVF9L9YesdvykWxFHhg6Ghh1ol+ryvBpdwQ1OMwbjapuQZ/b6G2pywEM6WzXU5GxitBgh9ng7AthFPgICVSgQfEntqf+xF9jx8k6/98/Mi4BqNit+BoBD1hcWlV3l26lXfUxXh59hvSxjW+auVQg8ShDYTjHCsp+gWdLlCFQiBaxn7ArohC9Ub6EF9JBqEjU0GlfNlAhqCTYJ7Ap91/VeGgxaeLzkGgqXHcMhYb2GGM47Dth5mtX93wj4jfIoopr0QYDNBQCpia8kl3DkbtvhluD7Wj/T8TjVGL6RDb7VcZjpuYWn9fr1BvDYUGH1BZiZIT4yy9x5owrTQ97YrNfAEH91T0nZ0hVS7EE5UTOcddpuCn2xoZpnrNqFY5CGmRSERGUOxt45tpJRUZXk/fg+4lffSuwjzveM6b4n+K5DrvQoYB6yV8jBluCRtvRvyy7P5KNAEUnOAIiyq6sUfIvzztgGq2nR5fdNuTsqyHA7+bdCnimLURaXY9E6duirEMOF8h2h42rtPoHtcJ2eI1qU9do2eDrpIVPkM8QOmu/1ICmwLpspou/FoibgI60BzFLORjD8qSVsMisINHKfTPcqGMrrezD/6zwga+cSmdqgIWT7q28NdwIxOr9g9baUg5g2OmIfwiuuFFViFq6xe4R4GwCeEabgAd0kfzX0WMc3KtOT8KFYXKt1wGCQYSYyD8fSMDMr5pA1/RekqQYZIUXMN3QOy137Ubn1KOWVkMDp6MwsQefN2wr3GZbm33965pX1bYDajyztjlZzMCMR/Fnei1QGD+eTKMxcwHzUzpjoQOTCMQvASqa5pwmrMMI8bsDE7DMTKsMB9dk8xAEB2DZ8II3Zbuf429MBry1hJLHxRCtP+t0b1JWgUvRD3w0PsWzu1UBhKkoSzlRyiuCIgHS8u0s79nIstfT2IQoNM9p7aRqQtHNT0dh7nf+cTMAkjMKQJH/qGlpS+nIIa9YhgJ+I09W0a2dUU3kK16kj9l2h7iwZrwFb2UebcaeTCy1j1UpcORi+E+2PYRCPMyq2gMvEVejtvpT2SGgb1E18JbNNsppUpsTlP1jJDD78urthpX4gPA2XPiv/D8TxLOjtU0laKGClHpO5FpCH8WdWRdI5Zg3fcdd2wePeurMeMfgfutEZRmHvOjkkIai5ZMGkBhdKJ0cL5v2zcwpCOb3K6GhEVt0nqZLUXOq/IpU8yJfPiNEoc+KGfdE/L+XXhy2GytU2FO6hfUdnDGO33HfHpCM1hYJK+aCYGXSRdZS7X+8XXBiolBr+/sk5t2VLApoxpeZ8j5pzaWY6zqsHYhufobuqw+uJGBDEzyFvuoU8smx98EUTv18sVU7NAs2658zJ39HFGoNbkFCIOJSaIl9Q/1QhlbciFcCoeZ0= X-OriginatorOrg: calian.com X-MS-Exchange-CrossTenant-Network-Message-Id: 50f48e16-ff88-4dc6-836d-08d9d7186738 X-MS-Exchange-CrossTenant-AuthSource: YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jan 2022 04:43:26.2455 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 23b57807-562f-49ad-92c4-3bb0f07a1fdf X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: HrBH7WLZv+RRLhJeqHmbkhatWTeGZ+3Am6TEIgnPlEm4TkCbtrwtfOLGD1L0OHM53d4iCee7S7Pb/R/RzrTxrgsE0Wru9+LFU1Qcvypj7OU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQBPR0101MB6341 X-Proofpoint-GUID: -6ZN_kIb6QXonVePJ0c6DRrZqZnrb9CB X-Proofpoint-ORIG-GUID: -6ZN_kIb6QXonVePJ0c6DRrZqZnrb9CB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-14_01,2022-01-13_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 mlxlogscore=613 lowpriorityscore=0 spamscore=0 phishscore=0 adultscore=0 suspectscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201140030 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The code that looked up the USB3 PHY was ignoring all errors other than EPROBE_DEFER in an attempt to handle the PHY not being present. Fix and simplify the code by using devm_phy_optional_get and dev_err_probe so that a missing PHY is not treated as an error and unexpected errors are handled properly. Fixes: 84770f028fab ("usb: dwc3: Add driver for Xilinx platforms") Signed-off-by: Robert Hancock --- drivers/usb/dwc3/dwc3-xilinx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-xilinx.c b/drivers/usb/dwc3/dwc3-xilinx.c index 3bc035376394..3b16e7610009 100644 --- a/drivers/usb/dwc3/dwc3-xilinx.c +++ b/drivers/usb/dwc3/dwc3-xilinx.c @@ -102,12 +102,12 @@ static int dwc3_xlnx_init_zynqmp(struct dwc3_xlnx *priv_data) int ret; u32 reg; - usb3_phy = devm_phy_get(dev, "usb3-phy"); - if (PTR_ERR(usb3_phy) == -EPROBE_DEFER) { - ret = -EPROBE_DEFER; + usb3_phy = devm_phy_optional_get(dev, "usb3-phy"); + if (IS_ERR(usb3_phy)) { + ret = PTR_ERR(usb3_phy); + dev_err_probe(dev, ret, + "failed to get USB3 PHY\n"); goto err; - } else if (IS_ERR(usb3_phy)) { - usb3_phy = NULL; } crst = devm_reset_control_get_exclusive(dev, "usb_crst"); From patchwork Fri Jan 14 04:42:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Hancock X-Patchwork-Id: 533161 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28330C43219 for ; Fri, 14 Jan 2022 04:43:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231585AbiANEnf (ORCPT ); Thu, 13 Jan 2022 23:43:35 -0500 Received: from mx0d-0054df01.pphosted.com ([67.231.150.19]:47232 "EHLO mx0d-0054df01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229628AbiANEnd (ORCPT ); Thu, 13 Jan 2022 23:43:33 -0500 Received: from pps.filterd (m0209000.ppops.net [127.0.0.1]) by mx0c-0054df01.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 20E4hQMh005072; Thu, 13 Jan 2022 23:43:28 -0500 Received: from can01-to1-obe.outbound.protection.outlook.com (mail-to1can01lp2050.outbound.protection.outlook.com [104.47.61.50]) by mx0c-0054df01.pphosted.com (PPS) with ESMTPS id 3dj2j2gvtd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Jan 2022 23:43:28 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fyej3qhieHf3xBwWxUDo6VvM9NKpnsn0Xh93uJysCC7lvHQlzRHNL6leBs5Ux7i1a8PTiOK8jntSXKvhcEiNpkX7b3e41boRhnrSjsy+sZoxDy+kgAXJHLyn+9+ibzDBa05D0NBN1RVK2HE5ftL9sQ8s1yQkazI1q0ECrfgwDbQ9IZcz2eP0jYvm8ODI3aN5/Dz0ifizTLs3XoX/QL/MEU6v/7PH8lroZnr3y2JTCoQRdU1Rb/4ysGSlj/SQFfQ+WT7cFIyuPyyhgcHMvdRSep3FDO4RKKP8mn41ielq/11+QwiTD3ISJxASS32r3VTjxuc9ckyQYCafpk/MPYZQVw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oKNqoDCoSOvgmBQFp9M090KUxj/iw9Th5LFC0AkrUtc=; b=kPEOFjxPspfi9maM0PebpDBQpQFKeOLc3iURYIAkq7uGmc+S2Awj7WUOEkgrQpvovOv3aUKH1uexwmWsf7bUOHFZE4JMGAAYbL9U+sXwJOsxTFtCDI2axrzvrA2AIWKNYjWARrrELcJHXJ9LLEUJc+XHGOS1HEwL67R4juKEbOf97RcE7/OO4MeOgEvF1Ik3L4nWvGMxf+NrEhK4extqu3rCB/ta4CxtRisZ67G+2aMe/QnKgQ+okNDoF5mhXj5PEUASNgWw2kIjfxy8byj5RQHNZzfgy7vvkB0oZS9wQ1SoExI0Qs7ucu0BHz9vuAEy07g62QUKFdYyJQCwKw9VVw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=calian.com; dmarc=pass action=none header.from=calian.com; dkim=pass header.d=calian.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=calian.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oKNqoDCoSOvgmBQFp9M090KUxj/iw9Th5LFC0AkrUtc=; b=r3aK6Jzrp6aPGhqXwZE6u7XbRxp8eSrg1hpanLtYE+v8CUiL3Qx0zdVZl98IuCwwEENxDTdIRBEobWF1IZxRFCqNeEoybp/0GCzmsRXvqPboqq1G3oEFy/aXl4cWbnF4eWQjbUbJbMpQacicNrtl/g858iyB50gGYT6sS1/s8CY= Received: from YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:4d::14) by YQBPR0101MB6341.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:38::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.10; Fri, 14 Jan 2022 04:43:27 +0000 Received: from YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM ([fe80::d51:8098:30cc:5bb6]) by YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM ([fe80::d51:8098:30cc:5bb6%3]) with mapi id 15.20.4888.011; Fri, 14 Jan 2022 04:43:27 +0000 From: Robert Hancock To: linux-usb@vger.kernel.org Cc: Thinh.Nguyen@synopsys.com, robh+dt@kernel.org, devicetree@vger.kernel.org, michal.simek@xilinx.com, balbi@kernel.org, gregkh@linuxfoundation.org, mounika.grace.akula@xilinx.com, manish.narani@xilinx.com, Robert Hancock Subject: [PATCH v4 3/5] dt-bindings: usb: dwc3: add reference clock period fractional adjustment Date: Thu, 13 Jan 2022 22:42:28 -0600 Message-Id: <20220114044230.2677283-4-robert.hancock@calian.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220114044230.2677283-1-robert.hancock@calian.com> References: <20220114044230.2677283-1-robert.hancock@calian.com> X-ClientProxiedBy: MWHPR02CA0016.namprd02.prod.outlook.com (2603:10b6:300:4b::26) To YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:4d::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b5a78aa2-bac2-46dc-7626-08d9d718681b X-MS-TrafficTypeDiagnostic: YQBPR0101MB6341:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yEd7EsOwqltyBVtIuhSFzZ/qqMPzXwKtFbwTQm/pQyAJy5Leq72CGWU8dStJWAfojKUKavzOhw8kAjslWZowS6uUVbxUYPKf8BSfI6sk6Y4wLFDe8KZz2mFc3SxbkRsK09i/zcThXX62sVWo/+mvvrg3XTBfy74ynKsTQdRvCxqoxrUJRUW4hiHAT8F1WONQftCaPb2SsglwaJnMsv5PRsXXzvbliHbi8CaHpmpvJmMFlFy7mULWUwu4Hmge3yyxhQ1zQpwCP+chDUxx1F62x02eIIp69U5SPGauhIMtRgDgZFx1bbcuh/6uPatFwn0gToLWWpxNsMv4cQyFtOSAk4Gb3TEGR7ioHzqwu3Vrfi5VEXJ/A+12gMqQqzrw2/guB1ncAfU2Dt+S6UwSsVebieuvUOysdj5Ts9t+FaCVFSyWgt4/9x0BXV2jUywFRgGTkxG+Wfq0cG48rwD7/cdP5V/orvW/gb1iyD/uO5nnT2gJhOqSomHRKOBAH+2J/gCNN9BZmXppaqq8LRnyRbkQPASCxG5MNcXq3EzyqOqFGum70k+KzepqFnD1lusMEXNo+v46wlbGClnKNa32gq9jBynSYBL9FdWXU7Lvl9KKtoXeXq3iK6tR+6uqLlMGY3TlKpu6qwJvZvF3+RGMmXRrACvnSDQ/CX/ec5dYsyS9/f92bSxm7uAiy2LS86eVS5VSnfOu9ZFQr4sIUV72jGN3zQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(4636009)(366004)(186003)(2906002)(6486002)(107886003)(8676002)(4326008)(2616005)(44832011)(5660300002)(1076003)(83380400001)(8936002)(86362001)(38350700002)(6916009)(36756003)(6506007)(6512007)(508600001)(66476007)(316002)(26005)(66556008)(52116002)(66946007)(38100700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: H+ZvSwCTD77isLfTdywwfwQj+tq7u0qpMGgsK7pYqepsSqFyXRpb1/IpSwgOYIbIAbteYZ4ptGCxXZtIaDbMZjmD3035Xfjna9KfnVdJlq4cNlv5xlHG8DbjQ4Gj8T7UIVRqYJ/rz8vLwBwyoA3Gy2nNTE5V8ZQWdBAl7jykSgUf7BZKn72CoadsbVNFuxADf+x0mNPlpfuF3XI5m2iLixvqvrg7+mrynMbrrpaY53QFAKbe6khrLnmDJOwI91qxSp53Ls6TIpyIK/iiv8BxMqRKlxKPyxV12jP4CuguaAEpPkCWPRHRu0pYOr5gBLETs8Kzz9y3Tbo6dvZzEs+tpuH+Eg0tUsDrNjwbSSzwCABUsfNBJCUJ+Tjy0hStuWZPgFBgLf7T5Sv1ibc2bLThohtpaWR1sQuHAI3anfIIKfhymkiSKa7sT0uG+sRIAd6SrgrC6X3SpQj4B8Cs9rUbZ3w663XCL1c23tpeuf3l3XXrEcYsnSozw79sOlI8JHB5leCUBtDaTFZZeji/fxn1qL7v0X9DzC743VxjDcaJiLZoE6sf4+8e1dYFMUCcx9e4DFelZ1XIIAJmdBrsB3POg3YZbT1jkTTukCY0nWaLAtcz8bY+u8md+yxr0Pl0Rnddb1XHjtuo49mxyU+3egLnPMwajbdQBuE3aIm+3nncJfwzyxfGzely8sUMQqvhXUWrvjfzR2Cx+1HOqHKuHKKpLKm3jjDyky8ru9VpHxBxRwvpz3le5whQaH20uAZoqzmgIfkkUWyByNqEall4VDr3yIop1oiD+CpSvkby3RIjiqCrsHnWKnZdgJvyEaCM/oiirfp6FqrIrjnUr4up/vbf5KNQwGVoIRGKVpzKT4TAviodCHiYGnX1wjd9DLPDbH8F7qzGbGcg9nByQemdmPG867TM48gS0kvJ5jCrutaYOdu8CQWb0xacaUjcONTn6d86UJq4KTmQ5sXNDSc6hM88lOLgj1u3xHV9oIM3I6+d8qEVYWoMcGKp6qX3KNmUNeFzw7HBdTkmBUDmCJHyy+GxQ379BGLOtolFjMS165u+05+pE+JkOEGgyrPFm03XxF7CiPu9oWSdgUYD8BIzq/Uwj5xcOwAWxdf6D+J6FGWKQ7CxuAhvZp6xE7b/3pRLm8f9kXhce3vZKx2kCVJnoa1CEcBmoW/SvBTSDAFfcetkE8mrgNjrTf20DcSfDWZvMQ6sRFnbWIUug9+mrV9HE8bzjuennUVXjvF01XO/kedNOYG1xn4FbKMZuL0ZYEVO5dp7M6udWzOYYCEhotJF4EJuBl4tCOe0lc1erm5FA3/XWQActVSXGrnP1cNMxxUrpI7rADZkhrORlVVqqgMA0C6aJ23bMreuyohbtbug/u9fqtesmFUQtevNc4sv72NAqQxmpnad0Vkx6e1lQFShM1/vu6zUnm3TPLxYu8RZbjxwIc84Y39c09ktg48UjUCnlU9Aw1i4wrmI+art8qu4nvmL1VIy19XjQAC/Kk/LJk4ZCCKnbo3U8Rh7NzcaNzpLie+vgMCM/NIyD0tl3ugIl92ujSkFw3NXXPzFx+CYMeQOPJRv7cZK/DTW3qZbMKsw0XV4dqNx/2U/7vLkJ6sXTitmz1tuPOGNGo/r00DMP/QaUJsEj8ZfwtuD7xHg5QMl3LRmWBBpRhRhlLtvRApgiII9NtZa7B0N+sEJ27yJSK9YTkc= X-OriginatorOrg: calian.com X-MS-Exchange-CrossTenant-Network-Message-Id: b5a78aa2-bac2-46dc-7626-08d9d718681b X-MS-Exchange-CrossTenant-AuthSource: YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jan 2022 04:43:27.6390 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 23b57807-562f-49ad-92c4-3bb0f07a1fdf X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ip1wp4yl3Ah/F46v722lo9Rb8jF5WyDjJD+e0fiQ+Av0CC379Zne/RyxyWSeu81rqZcYg++utGlEkLyw9+vRYI4a4BFtEfXRvICuOC61SU4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQBPR0101MB6341 X-Proofpoint-GUID: VLBFIBDbAiC6A3XUqHWouPW8orQO1CHo X-Proofpoint-ORIG-GUID: VLBFIBDbAiC6A3XUqHWouPW8orQO1CHo X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-14_01,2022-01-13_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 mlxlogscore=753 lowpriorityscore=0 spamscore=0 phishscore=0 adultscore=0 suspectscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201140030 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Document the new snps,ref-clock-fladj property which can be used to set the fractional portion of the reference clock period. Signed-off-by: Robert Hancock --- .../devicetree/bindings/usb/snps,dwc3.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml index d29ffcd27472..5872a4470b16 100644 --- a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml +++ b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml @@ -266,6 +266,19 @@ properties: minimum: 1 maximum: 0x3ff + snps,ref-clock-fladj: + description: + Value for GFLADJ_REFCLK_FLADJ field of GFLADJ register for the + fractional portion of the reference clock period in nanoseconds, + when the hardware set default does not match the actual + clock. Calculated via + ((125000/ref_clk_period_integer)-(125000/ref_clk_period)) * ref_clk_period + where ref_clk_period_integer is the period specified in GUCTL_REFCLKPER and + ref_clk_period is the period including fractional value. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 124999 + snps,rx-thr-num-pkt-prd: description: Periodic ESS RX packet threshold count (host mode only). Set this and From patchwork Fri Jan 14 04:42:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Hancock X-Patchwork-Id: 532209 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95C28C43217 for ; Fri, 14 Jan 2022 04:43:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231347AbiANEnh (ORCPT ); Thu, 13 Jan 2022 23:43:37 -0500 Received: from mx0d-0054df01.pphosted.com ([67.231.150.19]:47972 "EHLO mx0d-0054df01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231243AbiANEnf (ORCPT ); Thu, 13 Jan 2022 23:43:35 -0500 Received: from pps.filterd (m0209000.ppops.net [127.0.0.1]) by mx0c-0054df01.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 20E4NEdb009827; Thu, 13 Jan 2022 23:43:30 -0500 Received: from can01-to1-obe.outbound.protection.outlook.com (mail-to1can01lp2051.outbound.protection.outlook.com [104.47.61.51]) by mx0c-0054df01.pphosted.com (PPS) with ESMTPS id 3dj2j2gvte-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Jan 2022 23:43:30 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OaEOI5/PXtNKPVG4fj/cZaume+yR/L6A0VPpBoDWQ8RAqkK2vcHus14JwAYARTtEaHt5uBgzg4aK3BVK1LhWFapXRUS16Yo41cEAgrGEsNF1flSOfto7g1yffT1SOllOXY3RRux+qnKBpXzr0dbnE5HUbuX7fmcztI1M3V33Zmz3hjiF92nWZGnyjHq/q+Mzxrdpl8oh3YR27j9xHimBzBO03rFpFhRYEjPXfPUkNTGw0lI7U6Pz7YvmQ0d4c2eRm9Ol1biA6k17/9l+PyFjWCXwMO8gwe1imroR2djNjOG1pg6aN2uRnm502ZdQX4acRd3Ia8KdMACfrIjbaeVIFA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=m2oSdv8ZwMs+Yx8qie9OGhqE7xAfK9vyzTGeqvD5adI=; b=LGMnU8bT4ZRzMEgUQqbHbbkXQOrl7nXWeH9fHWJBK980G17wIdl/DbZs+/6iiM2GVBiod8iTlUYkWmoErxlR4ccK27lkKS3u4kenlpwXyXp3/XQpfQBe9QWfv2OXh335xwVy73eUQ0ClQ7RdjG68SrBxYCeWfeQ3bDdfpzg6ujb99XY6SIlTe2ohRfy4a4XPH+EkRijuIsThg2jteqyKMJAFkRV0iShy6ppx4/q3c9QVzVRTmFQh0JdgsDD+gNLZ131w4LYGd1j3tsBy/NsAcfno3DFOXjDZzvgn4yX5aUouxjIvWhG1+VsqVK1VE47E/mJ49iJv/7GIgCjh6E7shQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=calian.com; dmarc=pass action=none header.from=calian.com; dkim=pass header.d=calian.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=calian.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=m2oSdv8ZwMs+Yx8qie9OGhqE7xAfK9vyzTGeqvD5adI=; b=gtx9SGOYWBkrt5zaGG4cGD13L+h0fOesfouVEnK3lf8xDUV+HMgYVxB0Ibl5BCjkOlvpKsQdrIrG8eg7EfmqT3IWiWyNB/Fj+lFZD2fWJo3+UisvP4La3lzBfLhLqwTFfp/LmmJioSGZISbBDLgXSTfvxBSjZKWop8TGQc9NzHk= Received: from YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:4d::14) by YQBPR0101MB6341.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:38::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.10; Fri, 14 Jan 2022 04:43:29 +0000 Received: from YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM ([fe80::d51:8098:30cc:5bb6]) by YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM ([fe80::d51:8098:30cc:5bb6%3]) with mapi id 15.20.4888.011; Fri, 14 Jan 2022 04:43:29 +0000 From: Robert Hancock To: linux-usb@vger.kernel.org Cc: Thinh.Nguyen@synopsys.com, robh+dt@kernel.org, devicetree@vger.kernel.org, michal.simek@xilinx.com, balbi@kernel.org, gregkh@linuxfoundation.org, mounika.grace.akula@xilinx.com, manish.narani@xilinx.com, Robert Hancock Subject: [PATCH v4 4/5] usb: dwc3: add reference clock FLADJ configuration Date: Thu, 13 Jan 2022 22:42:29 -0600 Message-Id: <20220114044230.2677283-5-robert.hancock@calian.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220114044230.2677283-1-robert.hancock@calian.com> References: <20220114044230.2677283-1-robert.hancock@calian.com> X-ClientProxiedBy: MWHPR02CA0016.namprd02.prod.outlook.com (2603:10b6:300:4b::26) To YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:4d::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 395af504-f966-46c0-304b-08d9d71868f2 X-MS-TrafficTypeDiagnostic: YQBPR0101MB6341:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: N6ig3OdG8XmVSPCwWE7O+UvS75CUdJTO18lmvA/1u7wpozenKVkOHn/AvKJ5lor4/WoHWAOC5hY2uN6hqvCuxCB+kSAUXMQJ9oCAi6d98+wWzIvJNOfWGm0Ui1RTm9yTo55yQlgM9TJAgtv2qyONL8NUELK9677LZjXf8Bq8+llAfb/d9CS6CFNTQ8mb8lnI76n7qtC4GUN4vHBHpAyVfmkX3Qzkj1UTEl564xD7werz7x7DzFKzO02tMupOgdfZ3dJV0jdsgndLg1oantDQR989uRfeqzyQOc+1sTTYD43RDYOOW08ZjnMDWlSCUcpTg7v23QKnxaX4vVVzGQh11RHNCdl/xos+wuKcorcC1vITCOydZvmE+/7wZJ3ehvenRpYjCjXDyq2iu/HHxgB+Nh6Fs5YpWLch9GO28xAvEpiL69TItN3t5ZC/wVjcimkKoW/KVG4fuBSoV6ELt8lz010y6oYo/Q7JvwY60F2V5jPXdF0PRpqrBdxeL9ON2R8g+1JmxwOUiT2g5LP43AXaSpLSZBJwjaY2jScXE5GWFCMa+M9Tuodn6Wu+UtONcT1BjPPnre093COIFMECRYdmTdZ/FqFF8l9Kh/YIYN8vccR+gpwdf9+TvF0haEI3dytZr0z7p3eRe8ppl1ShMCsgCsuGVOlETW8fOlrVUnyLAW8jWrJYCl3k9VZKflE9ydAMqopdXYgtgkpoCnZOxMVweQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(4636009)(366004)(186003)(2906002)(6486002)(107886003)(8676002)(4326008)(2616005)(44832011)(5660300002)(1076003)(83380400001)(8936002)(86362001)(38350700002)(6916009)(36756003)(6506007)(6512007)(508600001)(66476007)(316002)(26005)(66556008)(52116002)(66946007)(38100700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: P6vxLkVZLlhdAZf1DgN7zirPL4JbGJa7a10sykiuOComUzZwDX8tjtoPGxiQ4UmToXrobZw52qEhw/6Ob+8kdRdYpmCfHTKvoyzkoZP50dcX7pZkiF3cbiCW5Grq2Kl5KwJASSAMOZoOs/1Xw8fU/b0ZjO21BHyPAdIqu2ox3SoF+l4L8keoy8BEDFiisI9WQNKDmRTxia6V0A1YjOf7y82Ad/Nrx6H2z4O1oT3zPojLCgWb6TU8y3A0mLlvyqZjKqbqxdYT0CfvHl1FZiskcrRaUMYVGx5L87B2x3B1oA7yIzMMs3GwE7nS1Q3Dbnuh7ONVzS37x1PlAL8gAFt4Qf2IyFLPNU0qbxlW5sP1UoqfPaBocoMElOKC3gUf18AnzWIKyTI9LLUa1YwXr+y7spLzweu6OcZXwLKrHTV0aiaMfCTUdans1PSqbcluqMpsc2Kqym7uVCSzciItefx759d5jEXb6obL1CI5Z2o3L/34xK2JmZzeZKHe+UBvDgJ2DgukJgq/3KtFvr2xdLToFWx4ya+q/8ZBiSHch8px9Bj6lMmg0ykXf8vj6dvTQ0hxOqmlEznGvspc8e90wYpkCfbaEOt6136+mPgjLYelJB+At+/Shs9lAJ0kpHCT5ukbeQYxhc3CXPB7sgRCVhxvUdVFwBS3NxWUPOsmByD/RF+zvSy17RF+FsHi0TN4y1Uiow/SnH+3i/eU8yHEzrHCcdnTtyZOj+DPcLUal+saemhhWTE5qWK6iLUQ5zGhrWovk48+NiODbkgLMmi/HecWYzb4asDo0s9syY3jiWywz7oNsoKydVfGuhkA34aJqj0ovGfonApI/Fk5TP1aPbGryUKOM+LAnBrlzvVCXwlclEiSM+/JiIinnl4W4vOThFYNaW4FlaO0RwOG2WLcLFR/RDBm76CJLKy53v9yI0EDtfPLCw74ELEK3oWlqZRSZhV4cvBI/k0Lzmxr1K1rKtGjCCeKhiZNm69vl3iyQdAZPjpsOZbBAg3cXNMuQr+tWYJNDU2UWKyJ945yzzwNpu+eQixZ+t83OqmOKDDzh7QyqqKTjg1hwDK7WjKezx2o0hq0pSX1VE8zztEU+UXtD4mk+ipi3ydhvv1zSaPJe2+vflT114eBcWoYt9oA2F1/AwhlQBSRaPK6oxPx2ufWts3fSticGgZS1tm8rD/PJBsiNVy3upusTqR11FfEItkDUqK78DE9Xtlcuba8G2rB9anKw57QauDrPUXSU41EeHw0RtnpWHQ954DlXxGHS6RRLO6ayMd9XpekRD+PrHO4SocJlxOWVbAwFX0YpoHt6RM9cT67DcEXwBl7/dqjepoZtZCmRGO0hTLf0oFeVAsY82KZYOrG3XgHwCc4Oq11vH1NE2+ahaJ7MnT9kWTubBE5ehxUg+dxcuMrkTJzziJKYfwKXfVvYVA61ysqQ9Z/jGWCdrLhT3732MEEvVKG+g5TLptIqLA56gCfG8Qj61alhuImN9fREWkLTGJ8k3vWB9Ih7Ur0BBkbXeEQBPB1lvR2n/KHtT9eM1BumH1a7ruFCOMkWcrMRqJQURYS4FMgByFam0sAVlETNeMqcu9dDv6YhhSeZNHxZ67M0r0IX3X6H+6GyrM5UzC+e8kBTa1Juxj0t1rGQ8XZKBbOn3JHP6e4uo5qACedEqQI8+cnDdbIE8wjKRyGOytrcHI0m9Ssq4RAJn0= X-OriginatorOrg: calian.com X-MS-Exchange-CrossTenant-Network-Message-Id: 395af504-f966-46c0-304b-08d9d71868f2 X-MS-Exchange-CrossTenant-AuthSource: YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jan 2022 04:43:29.0462 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 23b57807-562f-49ad-92c4-3bb0f07a1fdf X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: buTR2T6oohaRlWnMos+tybV4KnKz02+oeWgXJqbdtBfF4MbaTbaEwmJmmOtPwmnnkuFur3MBIxLj/NkxofIl1C28MXkjKemjIly/CrrW+xg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQBPR0101MB6341 X-Proofpoint-GUID: KAuR9_0nM3_F5p5gLRNF1pV7qhcyY2cH X-Proofpoint-ORIG-GUID: KAuR9_0nM3_F5p5gLRNF1pV7qhcyY2cH X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-14_01,2022-01-13_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 mlxlogscore=999 lowpriorityscore=0 spamscore=0 phishscore=0 adultscore=0 suspectscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201140030 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Previously a device tree property was added to allow overriding the reference clock period parameter if the default value used was incorrect. However, there is another register field, GFLADJ_REFCLK_FLADJ, which reflects the fractional nanosecond portion of the reference clock period. Add a snps,ref-clock-fladj property to allow configuring this as well. On the Xilinx ZynqMP platform, the reference clock appears to always be 20 MHz, giving a clock period of 50 ns. However, the default value of GFLADJ_REFCLK_FLADJ was 1008 rather than 0 as it should have been, which prevented many USB devices from functioning properly. The psu_init code run by the Xilinx first-stage boot loader sets this value to 0, however when the controller is reset by the dwc3-xilinx layer, the incorrect default value is restored. This configuration property allows ensuring that the correct value is always used. Reviewed-by: Thinh Nguyen Signed-off-by: Robert Hancock --- drivers/usb/dwc3/core.c | 35 +++++++++++++++++++++++++++++++++++ drivers/usb/dwc3/core.h | 5 +++++ 2 files changed, 40 insertions(+) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index f4c09951b517..ad224fb8088e 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -359,6 +359,37 @@ static void dwc3_ref_clk_period(struct dwc3 *dwc) } +/** + * dwc3_ref_clk_fladj - Reference clock period adjustment configuration + * @dwc: Pointer to our controller context structure + * + * GFLADJ_REFCLK_FLADJ should be set based on the fractional portion of the + * reference clock period, where the integer portion is set in GUCTL_REFCLKPER. + * Calculated as: ((125000/ref_clk_period_integer)-(125000/ref_clk_period)) * ref_clk_period + * where ref_clk_period_integer is the period specified in GUCTL_REFCLKPER and + * ref_clk_period is the period including fractional value. + * This value can be specified in the device tree if the default value is incorrect. + * Note that 0 is a valid value. + */ +static void dwc3_ref_clk_fladj(struct dwc3 *dwc) +{ + u32 reg; + u32 reg_new; + + if (DWC3_VER_IS_PRIOR(DWC3, 250A)) + return; + + if (!dwc->ref_clk_fladj_set) + return; + + reg = dwc3_readl(dwc->regs, DWC3_GFLADJ); + reg_new = reg & ~DWC3_GFLADJ_REFCLK_FLADJ_MASK; + reg_new |= FIELD_PREP(DWC3_GFLADJ_REFCLK_FLADJ_MASK, dwc->ref_clk_fladj); + if (reg_new != reg) + dwc3_writel(dwc->regs, DWC3_GFLADJ, reg_new); +} + + /** * dwc3_free_one_event_buffer - Frees one event buffer * @dwc: Pointer to our controller context structure @@ -1033,6 +1064,7 @@ static int dwc3_core_init(struct dwc3 *dwc) /* Adjust Reference Clock Period */ dwc3_ref_clk_period(dwc); + dwc3_ref_clk_fladj(dwc); dwc3_set_incr_burst_type(dwc); @@ -1418,6 +1450,9 @@ static void dwc3_get_properties(struct dwc3 *dwc) &dwc->fladj); device_property_read_u32(dev, "snps,ref-clock-period-ns", &dwc->ref_clk_per); + if (!device_property_read_u32(dev, "snps,ref-clock-fladj", + &dwc->ref_clk_fladj)) + dwc->ref_clk_fladj_set = true; dwc->dis_metastability_quirk = device_property_read_bool(dev, "snps,dis_metastability_quirk"); diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index e1cc3f7398fb..5011296786de 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -388,6 +388,7 @@ /* Global Frame Length Adjustment Register */ #define DWC3_GFLADJ_30MHZ_SDBND_SEL BIT(7) #define DWC3_GFLADJ_30MHZ_MASK 0x3f +#define DWC3_GFLADJ_REFCLK_FLADJ_MASK 0x3fff00 /* Global User Control Register*/ #define DWC3_GUCTL_REFCLKPER_MASK 0xffc00000 @@ -985,6 +986,8 @@ struct dwc3_scratchpad_array { * @regs_size: address space size * @fladj: frame length adjustment * @ref_clk_per: reference clock period configuration + * @ref_clk_fladj_set: whether ref_clk_fladj value is set/valid + * @ref_clk_fladj: reference clock period fractional adjustment * @irq_gadget: peripheral controller's IRQ number * @otg_irq: IRQ number for OTG IRQs * @current_otg_role: current role of operation while using the OTG block @@ -1166,6 +1169,8 @@ struct dwc3 { u32 fladj; u32 ref_clk_per; + bool ref_clk_fladj_set; + u32 ref_clk_fladj; u32 irq_gadget; u32 otg_irq; u32 current_otg_role; From patchwork Fri Jan 14 04:42:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Hancock X-Patchwork-Id: 533160 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4081EC433FE for ; Fri, 14 Jan 2022 04:43:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232102AbiANEni (ORCPT ); Thu, 13 Jan 2022 23:43:38 -0500 Received: from mx0d-0054df01.pphosted.com ([67.231.150.19]:13135 "EHLO mx0d-0054df01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231605AbiANEng (ORCPT ); Thu, 13 Jan 2022 23:43:36 -0500 Received: from pps.filterd (m0209000.ppops.net [127.0.0.1]) by mx0c-0054df01.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 20E4NEdc009827; Thu, 13 Jan 2022 23:43:32 -0500 Received: from can01-to1-obe.outbound.protection.outlook.com (mail-to1can01lp2054.outbound.protection.outlook.com [104.47.61.54]) by mx0c-0054df01.pphosted.com (PPS) with ESMTPS id 3dj2j2gvtf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Jan 2022 23:43:31 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mXY0+DyAjtIrJUcUWk6peY9l8sZiITT7wT/y1Pi2pTGdMAe3TQUz/m9EoJ0kSlP1rjbGwthWDyDEgJsfeLo2uliwTrILbnWOsyoRXTTmi1hNCsXHjFp8U50+f/qbpEWPLjBy4CnHSBJ1O7UxB4ueom1N4cc3TBrtd7bKfTonDVcvvCrw/VcAS4TijEMU070ETHlI4P0lXWR6YpdY6tMxcTBxIXek+Tf5iRzWtoID06C5YTQzDKaNqL4WaKKpxLL2/ERlWrWpVoKr3ubQQ/TFHUCnyDwo4p42brTT7eD0wfKYd0V/yQfPA3QC8KsMAI5okJGRLl3sc4cuxjitOqN6ug== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vLTgKFxQQFOOy+E7S9FTcPXGVQ3kkUJW5eSGLKqOVUw=; b=RZjm26kxg2qzcrpXSxJBslM3wbx+zbDoeA6n+GDcHoKKxXaGX/MN/2H6elrsnWIUipYNsENmRZPRd1pNfgs4p34c7FBSijaQmmhw8A1AX7b5TVRDltjPCsDPPG9SkM0c/DdlmYbBqr1RE0fShUk0gzf9Sdh9f7TjWn20eR1OfFt6lNEWy5wp/qGQLghsQiyVXO1YmiDCysQtvIAiSrND1S0bY6vFMFTjx2BLqdEYhqxBLkZrkW6CyfdDQWfJzA3luj610AjZ9c3fK4eHG3i1c34kkbS041BGCi86iRjPJNTwnd0mTvedx93KF899uWqFoPoFef8F5xYCsMfeJG0Y3Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=calian.com; dmarc=pass action=none header.from=calian.com; dkim=pass header.d=calian.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=calian.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vLTgKFxQQFOOy+E7S9FTcPXGVQ3kkUJW5eSGLKqOVUw=; b=GApRA0dC3XuySCSniGsWqKszli2qXcuwCQMq8V7pKY/mUfp0Sok7015RHcFFmtpysA8HlDA0N4OVP9Mv1M2egvewJe41sC/Rbq7PadnzSqlkGTfebaCqnu/uwJ8KxNGWf+a8jAKvkJMnq2QpzuUSQCdz9hC3R+1A0/lhGqagaC0= Received: from YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:4d::14) by YQBPR0101MB6341.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:38::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.10; Fri, 14 Jan 2022 04:43:30 +0000 Received: from YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM ([fe80::d51:8098:30cc:5bb6]) by YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM ([fe80::d51:8098:30cc:5bb6%3]) with mapi id 15.20.4888.011; Fri, 14 Jan 2022 04:43:30 +0000 From: Robert Hancock To: linux-usb@vger.kernel.org Cc: Thinh.Nguyen@synopsys.com, robh+dt@kernel.org, devicetree@vger.kernel.org, michal.simek@xilinx.com, balbi@kernel.org, gregkh@linuxfoundation.org, mounika.grace.akula@xilinx.com, manish.narani@xilinx.com, Robert Hancock Subject: [PATCH v4 5/5] arm64: dts: zynqmp: Add DWC3 USB reference clock period configuration Date: Thu, 13 Jan 2022 22:42:30 -0600 Message-Id: <20220114044230.2677283-6-robert.hancock@calian.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220114044230.2677283-1-robert.hancock@calian.com> References: <20220114044230.2677283-1-robert.hancock@calian.com> X-ClientProxiedBy: MWHPR02CA0016.namprd02.prod.outlook.com (2603:10b6:300:4b::26) To YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:4d::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d020cdb3-9865-4e0b-eb05-08d9d71869ca X-MS-TrafficTypeDiagnostic: YQBPR0101MB6341:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4303; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Sr6l+Sb+j2jb4cC7aluNShog75CQ6HcI18t/WOHLP1C/wzwR42K9IJq6qDFAwgp7RdvXPK9/rn15jIgm8V9HceOEqK4Rl6AQJ3GGe2KKZX8knRMCIDX8NqwitYtN5wTypJPJ2nuH7HxWYFw8XryfXJN7WcyHO+P9ENt76mQFrcVlvUgYsX/GATCwkY/NkBDcbw5Mbb2qfxuoFDq92Q/a1nzKHKyWAeFnEfmF5IU1q9sH/jr7cCQul6PVTWJRzqHW4J90a/Am3pJdCg0vSeYsFdQFCTHJIj1b9MXgAN+z0WiTGnooXOviMbW0VqNfVci7T1FpEOGI45A2OX0vMkRn0magadCMEYG2urYHGZ6NMXKHmq37eFT6F+08+wy2S8/ULFS4G101eSFEA78gvSEGV8ZIbmMStTYE+vjXt5f5J085DXszEJvEXX+Pg8QiRSVe4EMPgS15SxKO35y1nZxwQi7wVDolbJBcfBIrZtGAimbW5sDSUAQfDVCSyp/ZoGmoQhjAK0T7MbkCapdcOKmIla6CNg2OlX5OXOlbL1aY24bSIvbR9t7Skymk4N2XHUfQoAcV5rAENogSr4oMXSONp/A8B271P7yWHhnSDg92SDW7l5+aTQV7UH2IIurzCXccxFJT71dd5ALcv/lHVrzeBeQoiavp4aaYK69CF20cbqcrp4Q3VP9wBdX1l3Ny7AnZdceZoQ1QCz7QwZDSk+gghg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(4636009)(366004)(186003)(2906002)(6486002)(107886003)(8676002)(4326008)(2616005)(44832011)(5660300002)(1076003)(83380400001)(8936002)(86362001)(38350700002)(6916009)(36756003)(6506007)(6512007)(4744005)(508600001)(66476007)(316002)(26005)(66556008)(52116002)(66946007)(38100700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uWirOt3DlFyaruBEeVqN45sYj9kIDQAAkFlGA2KpSCrwHjuTcoC0u5L7U2rK0murdXjcDe5YJ8Vm8lHGQPGvFcaAjrrE8Zm3IU5o1WqUr+9tWCQd/95TUZItlLu0r/fhCH8Q4xaVhCL3JnQPQg+cjBt8ZMI2N1fUdhTInqEca30zvEbGbTbaaYMrkE06Ej24RL7aJZmjilCWekodiT9ph2HL6t0LlaUXf7WJwyhME9hC80SdbOkssGvlAr02pVAme0AYG8GiJaDd5g59Aeas9fDl48Xi7+CRTYFxl0YX4wKiVAVawvGNqlVAMZWyAAk1xdgSWukxGM4KdHPLPJVPROewo5C9tQhzR5bFHnyUpMC2DqCx+p9f2pJt9m96I1jJJyE5huM8La7uL5xi8CpqsXDdlI9Zl0VFy3H1RbLOzWNrciIIzbtDPn+5f+P1zVtaXU7qaKDsa8bjSRce0LmAAD9+395x+SezqahwzAl7CoYvERzCFPj9Bcvh4X+HYBBWgCvD7JPP5+1EH2cijTSqbCGJcc6uKbshRBb1E74CQWCTJIVPX5Zpa9gwGcZ1xVGM2P7d5NyPfW/pvCzATzM7cZJDfcI38E052WPaDx5UVlDloSZCMe9MMwDEWZPbgC6mmnLRHqzYsG3gTm8neaSPCFLOsnpp4sLbqcpuVcC7yGWfhCdzSqBJ/RPfwlB+RmP3cj37i82GrL0q6hKTR9VmEO3R+eOm+6JR1LzV8yblRzLzmb/C+p3kP7bS7AWW/P9uBkC2it8bAtSZPoX97XtLOdLPPXz+dnQrfkjhAeKvC4xKUFFqj3W7iEsJiFPhgYGzcCVd/WmPmhNN+rpFRpQpqYrCGHkttxEh6vHrJ9XlArBtTsPrwJe1kOUzf9kj+U/xzpbcI++WEeJzXc/mnbwDX5HBKPAzktUfJS1Dux9uwbpYV3U+42pXy4IwRx3ixQy7ciQAKUnnwPIVWtQgMGV/FJ7LW8NoP5CMibJ3hnFkpSlLJxsMVYARmjoJ90QkwVWkZt/Ai0xesvmfgSkwKJibUuNYjyCyPnTyS1Vq3rqWTY7Zrf2r1tgvaebPQm+cgVdas9U90JmVkqhvM/0Qkqz6G/f5LWmU6kcFPSDqZth8JefYqoGlrHzclZ9kURgg+K8qcHtJ85TSxU41TApK0PCrDaeNyuK+ruklg9wsfsH0i6l7pBj7wR7t2M1A7fhlNMfuruMuUben2gFPAdhePCTa7djU3R9d4TCG34QoQFlWfnNUDRm8/THxIIVBsY37bvvme6/hpLmiH0cbR/5kf+dCWplvJi5kc7omV3B2xSlFbbjt7v5uJ3gkyvekK+vil6uFJewF7v9tu1hbK5SlICvCryW5hQYrOt3JVVewSIe3QWM/6Cacs0dUMs8dzefdiPONFdEU/inKPwLjedkQEDY3pNTeWTNXcBcxslw9uvK7XY0xRHwLWKsG81W+y7z2U0WxnRi7Bo5xNTdvZq5Jadeo5DNWSJdJp9rZss041ciu+KhBavS8s3cXTCI7vlsXqBdaC8ZIXvnNrd3XaCyZ5G1q5NZTMz36UrrvIFVUge8b1kDWBcTiWZaD4/Fde3Rc3bDzz5ee2AjEO3te20Uh+ekFAY0dhz8vpH4IiQbd8Y6wKJs6BD2WwjNPtior4v7ucKfsnm+rl7xE2ivVUoS/LVp+O2PO7vVVKkBU93jKWIz/X10= X-OriginatorOrg: calian.com X-MS-Exchange-CrossTenant-Network-Message-Id: d020cdb3-9865-4e0b-eb05-08d9d71869ca X-MS-Exchange-CrossTenant-AuthSource: YT2PR01MB6270.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jan 2022 04:43:30.5459 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 23b57807-562f-49ad-92c4-3bb0f07a1fdf X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: A6KPsnnvUxwLnV3iEpV73gxJCagWXPPc7F3VvG8oeJeCEPgX4aEY31/FSZQEXZJ8+iquw1U1/z0FBzgzeAOb5C5SUO5vKNYlDSdQeaFxrB8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQBPR0101MB6341 X-Proofpoint-GUID: I-Wp1CONEA85UCEwZvZsuWNb2YZT_OOJ X-Proofpoint-ORIG-GUID: I-Wp1CONEA85UCEwZvZsuWNb2YZT_OOJ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-14_01,2022-01-13_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 mlxlogscore=510 lowpriorityscore=0 spamscore=0 phishscore=0 adultscore=0 suspectscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201140030 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Set the reference clock period and FLADJ fields in the DWC3 USB driver to 50ns with no fractional portion to match the ZynqMP configuration. Signed-off-by: Robert Hancock --- arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi index 74e66443e4ce..2f531707d5d4 100644 --- a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi +++ b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi @@ -828,6 +828,8 @@ dwc3_0: usb@fe200000 { #stream-id-cells = <1>; iommus = <&smmu 0x860>; snps,quirk-frame-length-adjustment = <0x20>; + snps,ref-clock-period-ns = <50>; + snps,ref-clock-fladj = <0>; /* dma-coherent; */ }; }; @@ -855,6 +857,8 @@ dwc3_1: usb@fe300000 { #stream-id-cells = <1>; iommus = <&smmu 0x861>; snps,quirk-frame-length-adjustment = <0x20>; + snps,ref-clock-period-ns = <50>; + snps,ref-clock-fladj = <0>; /* dma-coherent; */ }; };