From patchwork Fri Jan 14 23:38:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 533145 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 42647C433F5 for ; Fri, 14 Jan 2022 23:39:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230151AbiANXj2 (ORCPT ); Fri, 14 Jan 2022 18:39:28 -0500 Received: from mail-am6eur05on2071.outbound.protection.outlook.com ([40.107.22.71]:20289 "EHLO EUR05-AM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230107AbiANXjY (ORCPT ); Fri, 14 Jan 2022 18:39:24 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YH5YaUEe5N91pFeCvP++5rmPY18ecb+CF0IfrFbOI1kMdcLcVWaXo+rx6KE52y/8feNXmIcDmN7OiRf5wl9Fn9Czb0vA06rzSqJsSxrpDSJeKlUEPhdHtvmRuduC9VfKqNuS6OnWesSfemHEvOgjJMexMLAev6Ohn1rLF1wZMkQyOLOdWhKmKYYoqIVhlXE602DG3jqlCRZLAo/j6GlqmhxLydDRY0L3UFINUQkV1aQ4l1Scjg86nHHDC8u52vRYhkELdSy72GJi0i53J/bKLizQeXVI6akcgcA0WoKblzTC12ZFLYy/tWMH6r0SAJ/7akXvUtOEQHQamtIsUr5lUw== 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=OzFKtk7WmwIQu1CerwD5a//H/DCnq5TlPY9N+JzgPn0=; b=nPdO1cSqMCYBJV7BaoeVptSushOrAK6Xh35t80uyMh5cUhSrcYhbVdgIUUW0MdPtQ/hAygoW03Z+Vma6kX+qUJDlRJZhTHrnRidjFClWs8LgyKaLXtrlVhhLg3p9aLfajIjismxbFYUXJhPrGQ2y4LSQ9ocA4A3EIuuol+FI8ScGtGkDTjLkwPCibFZQRANOBG6bUusCQ32wkVQeus5p/EUy+IvnUgiyQomQeV8RLfHUl9Hcr4Iq5jJN3B/FmqNWADLQr9ERNrhqXZxoHPB6EN3Y9BmJfeC6+Lj5T2CVhYrS4E2vG/q1QVT60Yw7w9S9VFy8oYpoYSVLg2VyYgvuaw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OzFKtk7WmwIQu1CerwD5a//H/DCnq5TlPY9N+JzgPn0=; b=YGQI1KsJNpJYBErcHZH3FqWh9+a6v4pYY2vtjLKT3ivbrildSUuhYdqxhHRtqSBSY6179cpckjYyni/Aeolgw2SfqYqu2u6YTm9rQUH36o3SdvUnnEZ08OgIEnIG7emVqSBzI9hOOhOrJUrO2kKmAu1yN5Ib1XsWLnyBPjrZa1E= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) by VI1PR03MB4336.eurprd03.prod.outlook.com (2603:10a6:803:5b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.11; Fri, 14 Jan 2022 23:39:20 +0000 Received: from DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::d47e:81b0:256:3005]) by DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::d47e:81b0:256:3005%4]) with mapi id 15.20.4888.012; Fri, 14 Jan 2022 23:39:20 +0000 From: Sean Anderson To: Greg Kroah-Hartman , linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Robert Hancock , Baruch Siach , Felipe Balbi , Balaji Prakash J , Sean Anderson , Rob Herring , devicetree@vger.kernel.org Subject: [PATCH 1/6] dt-bindings: usb: dwc3: Deprecate snps,ref-clock-period-ns Date: Fri, 14 Jan 2022 18:38:59 -0500 Message-Id: <20220114233904.907918-2-sean.anderson@seco.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220114233904.907918-1-sean.anderson@seco.com> References: <20220114233904.907918-1-sean.anderson@seco.com> X-ClientProxiedBy: MN2PR22CA0017.namprd22.prod.outlook.com (2603:10b6:208:238::22) To DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7a601351-1a85-4208-2b8f-08d9d7b715df X-MS-TrafficTypeDiagnostic: VI1PR03MB4336:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: imJvWpqPjHrjqamXLkGlJUQnbzKEft1Djzt1vroqje5RBYhUovMXLqIc7w3h3gvptCXQZ8AwrJGOWm617qsXTaO17T0kz4bn+Jx3CPl9+HqEnWykFFjNLCoG9SJ0jKDXu/SCopOCDK4RhAL4MVmfXovoI5M2Tg5eWiV2r+NjEWVW4aupQKxIEBKqNJRGxSYb7xpAiXWAmxx7y26c2d6qZTrPzbFPl6R+yr4c6wm5XODOydph7pyWbsD0pVBmIRGerxBtSt4KHmBa0gwemmt6PDOSDrU9QfXxXHwcslMnj4H/9Eva+EAryNYBnktzIRDB7j1Z3gdLLnhfMykdaU8ia6QuuZ7+jfx2/xqRQ0eU46y590nHX1dnl8f/5Yf+EBB2ulH0a7CdkgpCNZnTYj2JVIIItLvHtmpNLzs/jOBtX/aI+BYVe8HLfft7VJ2UK2+pU+2IAcH/3LxUk9UaanS2I/sfWN1MrC58prWPAgXfzCJyv98cqhhuJYUVy5DL9RyhhF+ch14OM4H3+nilYS6KF1VgKaSM75djlxrTtPSkMc4c5LnxuHX5+f7oQKq8hSvNt9q131Sxoi2beyhvQMA6OYIxyAuqQYMZtUq/quuKkSfgdGxnfvCPDT1gB/7viyPvxDHoUgh7DqQHSWdaFXU7/CqvTX2nAs/s/W13kdtjEmiUyENt2852u/ccj7HN5kazycjmH5vPayrsP5+Zcv0OLAsVcuqC1XUTRcr+U3G0NmpHJURrbaZ5mEkj+GLvO3ik7FTWioH+uqvLPVPfqCLT7EvzimXLSzKz2qsfryOaxyI= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB7PR03MB4523.eurprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(66556008)(8676002)(6486002)(44832011)(54906003)(83380400001)(38350700002)(66476007)(52116002)(2616005)(66946007)(6506007)(86362001)(38100700002)(186003)(6666004)(2906002)(36756003)(5660300002)(966005)(316002)(1076003)(508600001)(26005)(8936002)(4326008)(6512007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: OK1943Tn6mrUxafuh/t6cWC0vA7ywEAXLSmdOLs61q7LXpRMOIv/GHh7gh6qRJ3Wd7z2DKG4yf2QVGEaCNK3pGAMGljouNvGdKAUmTFb0VeIkQ2zl/cU9Ir5B6HsHh+4oRmBF5aW0mJfSkheHV9OPYwqWbTFY3VRzxGLXGhxubJUh9lskEZ2hbC+bYDlB/97mK0oxFB9DaFRzMJ0Rj0j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QJj3R+WVr5Ncfdds7vUAeKtGS6bsFvu1LGewcrfF5W+3CKb/FQYGqbv50n32Leh0Qt4hHCMMXKMm0VnaCA84FtyPzwyDwp+W9HsdCMPlnQ+UpI3hbaK+ubfN+AUPGt8UPvA3YYbbVAC9DhQrcUklZCKUn/yS65VQeLTATFurqPK1XW8IR1jFb5lZAbEpUzIAWYgdo4MVub7x99E8w5L8TqbWOPhGHoxTpNzPejETp+79L6pA38qTCmGaeU3vfXEd/J00fQzNK/YMNy0v/jjUhjdDNdq+L3GkXNxKsAABwhbHO6e6/RWwQMRVo0/wKx8b1nxpcCoi0ZzRgBO9hVaoME3lb2eif0= X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7a601351-1a85-4208-2b8f-08d9d7b715df X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4523.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jan 2022 23:39:20.2913 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5HCcYmVaclbs+PDZayj1q6JX5cqcc7aYEDAN89qF5OGGQn79Ty38TTaHUv9V70FLnC4vuZdi7HjdrT0+ke3/MQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR03MB4336 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org This property is redundant because we can determine the correct value for REFCLKPER based on the "ref" clock. Deprecate it, and encourage users to provide a clock instead. This also restricts the minimum and maximum to the values documented in the register reference [1]. [1] https://www.xilinx.com/html_docs/registers/ug1087/usb3_xhci___guctl.html Signed-off-by: Sean Anderson --- Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml index d29ffcd27472..4f2b0913ad9f 100644 --- a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml +++ b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml @@ -263,8 +263,11 @@ properties: Value for REFCLKPER field of GUCTL register for reference clock period in nanoseconds, when the hardware set default does not match the actual clock. - minimum: 1 - maximum: 0x3ff + + This binding is deprecated. Instead, provide an appropriate reference clock. + minimum: 8 + maximum: 62 + deprecated: true snps,rx-thr-num-pkt-prd: description: From patchwork Fri Jan 14 23:39:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 532195 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 E5DB6C433F5 for ; Fri, 14 Jan 2022 23:39:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230169AbiANXj3 (ORCPT ); Fri, 14 Jan 2022 18:39:29 -0500 Received: from mail-am6eur05on2071.outbound.protection.outlook.com ([40.107.22.71]:20289 "EHLO EUR05-AM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230136AbiANXjZ (ORCPT ); Fri, 14 Jan 2022 18:39:25 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mDjZAqf2orThVnY0bbELZ7T8XgOg9JS7XQKcuR/sk2k7OG54FF6Q1+0qeDFPl+YsNDzhQ0W2ChzFEXSjpzEpRBvP0KqKgsMpZT4X0rYkJXY2J9T1zYuqNzf0zsf7VPH6ljXoHElWtP9fyFoz/4ef7yqNX19TazmATqoYLslD4iNyNumYRdm/ePb0Nixj2w3YAWqyEzcMq/CxVhnquzFPmU490M5CrK1A4QvtOVSW8TCoeZ6zF1QrCgI60WKQR/vmEY6UiFvGlqtxtNAgFOMB8ncLXDfeHe8IoJGr7K+6BIC57X1vbsW+iNDk683gCn+CW5Eovf50IXD2xp6vPKHBwQ== 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=cLFhyChsJ4LImci8dwK5s99yueuJ8oXC7sm+P+C7M4I=; b=lYcerv8eQpeaXJd6XXGUqYcFft5u/Kes3BHPGhU3/BL8ksadts3kDkopcTD34/amzaOnHEMWjuoMD1fdZTApVkkRduI/uM38TfYw75w+DS1riJ7q9HJhQj+dlzepLR+PLNGz2Ahbh4DfI7J0wVOTH+XC0qKcgGwMxhfgFLD9gL+rEy2+EodA5ALKk4UxIICDyb/9DP3XyR1FTFrXCqMXc9qZ93/xApbZU7R2Xfp0OKasFDyyWQm7wlXeqR33ZS/515X/G6JmIcwss9CdlBTVkdxhq9URthnFlevUWLN6xvxV3fGXoxx5clx140ZAVI7+96v6Mk/1vb4nF+QtZnsvSw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cLFhyChsJ4LImci8dwK5s99yueuJ8oXC7sm+P+C7M4I=; b=gFLpXdTVDInbsmj77bt51LwswWK0wO2NAgDz3my/vyBy8FOLQi/fHhHI9P/BPJmx5QhJgvxh/vM8Il7p2Q1rZVFck42XSYwNUTlbbvzKNOrPB0osUo4BNr5pTQ/HUgosEiKZu52rOmgRD5QJXTdMwNkyZZIeuNw7+Lkt2NosKa4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) by VI1PR03MB4336.eurprd03.prod.outlook.com (2603:10a6:803:5b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.11; Fri, 14 Jan 2022 23:39:22 +0000 Received: from DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::d47e:81b0:256:3005]) by DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::d47e:81b0:256:3005%4]) with mapi id 15.20.4888.012; Fri, 14 Jan 2022 23:39:22 +0000 From: Sean Anderson To: Greg Kroah-Hartman , linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Robert Hancock , Baruch Siach , Felipe Balbi , Balaji Prakash J , Sean Anderson Subject: [PATCH 2/6] usb: dwc3: Get clocks individually Date: Fri, 14 Jan 2022 18:39:00 -0500 Message-Id: <20220114233904.907918-3-sean.anderson@seco.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220114233904.907918-1-sean.anderson@seco.com> References: <20220114233904.907918-1-sean.anderson@seco.com> X-ClientProxiedBy: MN2PR22CA0017.namprd22.prod.outlook.com (2603:10b6:208:238::22) To DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 04d737e4-ad8c-4d4d-b1a5-08d9d7b71750 X-MS-TrafficTypeDiagnostic: VI1PR03MB4336: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: 29RwWOqSC2mhZZLSXYkDwc4ESmylAO3S7K6Qt53IKzbPH0c0LNKCs3ywHIdLhroX7rmIP1juO6prIFecJqUb/LM7tPoLOPBeLTv5UH2MKC0SP9Nr91Gjjf27WaZGHcj9lVloe+CpjwJiNDfV6ShXcpOo0Mh7LJ06Z76QZy8X5qDDoIivekIGR2Lt+cbaWyIKsANZNTngAh7hdfMnnPeRSitDvXU2QNurnGiDDCzXKOSuZiL3Vnr1/Hxhm0opX4cXx5m2R02QfvLOOrarwPa5cPbM08Mr18NMHfGFbdU29VDurbNcDkOU+fqxjbeE7EpU1l3jOSIgBH+k7A1AGE9hmQNTPjDyWKr27wP6kswO3iLmyJNNEsizLeYIo9YJLFREu+2sz4fNwEQAnVRDb7Its18YD5ykBVTrU6v5KS/RQZPUV1tbGFlvgty9+aN5qHM+HruwVwxsMtqD7zu92AzOJ0DlBycHQeDmXkzB8PDjfKDYZ2MNA4zOWlDnCOdfq11bxNusqe9ywjGsiBnV6BHbiV09FvWqStNrM3Y3JptiSZX4nWe6QO/r56fvAvn+YR+1p+CC9Z//deSFjN7vT8QAB1cPQP8Z1mT5vkQkgqrVWvHjhswcT+nl+zC1ai4ryGsikf4+4AZUcMiR5t18121FjZcB7K2MSOALexc1QCHBqsC81gEBAWNVPsPRc3wrtNDhqyUffa7kq5G5EQwMqEorbw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB7PR03MB4523.eurprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(66556008)(8676002)(6486002)(44832011)(54906003)(83380400001)(38350700002)(66476007)(52116002)(2616005)(66946007)(6506007)(86362001)(107886003)(38100700002)(186003)(6666004)(2906002)(36756003)(5660300002)(316002)(1076003)(508600001)(26005)(8936002)(4326008)(6512007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: KOqec1q9FPfgXnZf4WrYipl9+J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uIHoHndHlxB76QNXydqVYKxtdn3DhYP+3YhAKhMmQblvSZXRcI1PtA6MEWjqHHMcLDHbEAz+pIbKBlA48C5gLU1z0T/PpV3F14Ogt/ChHPU8ec3sMkrJIyePhN7WXg6SOZy/Pe02ze9V9uLYqdhWV/E/1urvElfCw8Q+d0kfPYQ87U7TEpxoFxJxn6siOTzmZQ0lBfe23CyVkgdA5wt1+nLjnojxMHZktA0yER5fovxxajSocP6bYkw0JHYPEtSLov4Mc+pRiCDG/JM0mqIIJ87hQgXzsgRVTjpA60xwn0Ex9tHqWVQgkbrgVYhMGS3+s1LXf8io0On4oeB4pLrv87pb6rx8UhI7tZIukgZLwrLPxjSTnP13FyvdZxkwhjqk9dt7CX5SWN1DhGFH9U7wpZDQci3pYZWYxsGzunxt4PQfMq2ueadPNy64xY46Y4PsYEvIRddpOXGaiE8f8Gq0d6mdi80XEcWvfFJ2y0gKewK/ANNNvSYSxmdAyvSovz5vxczNLQMHJFF/2y96Sq1uB6laU4DjxmiWVxkU= X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: 04d737e4-ad8c-4d4d-b1a5-08d9d7b71750 X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4523.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jan 2022 23:39:22.1037 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZJXLYfZNzHB5CD+EXIp7osZyxMbALPfB5NBoClUWJvFRL58x3ptnXeE9N9Hd0iXLXo497ifikunKokzJ/9EXug== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR03MB4336 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Instead of grabbing all clocks in bulk, grab them individually. This will allow us to get the frequency or otherwise deal with discrete clocks. This may break some platforms if they use a clock which doesn't use one of the documented names. Signed-off-by: Sean Anderson --- drivers/usb/dwc3/core.c | 62 +++++++++++++++++++++++++++++++++-------- drivers/usb/dwc3/core.h | 5 ++-- 2 files changed, 53 insertions(+), 14 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index f4c09951b517..699ab9abdc47 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -745,6 +745,38 @@ static int dwc3_phy_setup(struct dwc3 *dwc) return 0; } +static int dwc3_clk_enable(struct dwc3 *dwc) +{ + int ret; + + ret = clk_prepare_enable(dwc->bus_clk); + if (ret) + return ret; + + ret = clk_prepare_enable(dwc->ref_clk); + if (ret) + goto disable_bus_clk; + + ret = clk_prepare_enable(dwc->susp_clk); + if (ret) + goto disable_ref_clk; + + return 0; + +disable_ref_clk: + clk_disable_unprepare(dwc->ref_clk); +disable_bus_clk: + clk_disable_unprepare(dwc->bus_clk); + return ret; +} + +static void dwc3_clk_disable(struct dwc3 *dwc) +{ + clk_disable_unprepare(dwc->susp_clk); + clk_disable_unprepare(dwc->ref_clk); + clk_disable_unprepare(dwc->bus_clk); +} + static void dwc3_core_exit(struct dwc3 *dwc) { dwc3_event_buffers_cleanup(dwc); @@ -758,7 +790,7 @@ static void dwc3_core_exit(struct dwc3 *dwc) usb_phy_set_suspend(dwc->usb3_phy, 1); phy_power_off(dwc->usb2_generic_phy); phy_power_off(dwc->usb3_generic_phy); - clk_bulk_disable_unprepare(dwc->num_clks, dwc->clks); + dwc3_clk_disable(dwc); reset_control_assert(dwc->reset); } @@ -1605,25 +1637,31 @@ static int dwc3_probe(struct platform_device *pdev) return PTR_ERR(dwc->reset); if (dev->of_node) { - ret = devm_clk_bulk_get_all(dev, &dwc->clks); - if (ret == -EPROBE_DEFER) - return ret; /* * Clocks are optional, but new DT platforms should support all * clocks as required by the DT-binding. */ - if (ret < 0) - dwc->num_clks = 0; - else - dwc->num_clks = ret; + dwc->bus_clk = devm_clk_get_optional(dev, "bus_early"); + if (IS_ERR(dwc->bus_clk)) + return dev_err_probe(dev, PTR_ERR(dwc->bus_clk), + "could not get bus clock\n"); + dwc->ref_clk = devm_clk_get_optional(dev, "ref"); + if (IS_ERR(dwc->ref_clk)) + return dev_err_probe(dev, PTR_ERR(dwc->ref_clk), + "could not get ref clock\n"); + + dwc->susp_clk = devm_clk_get_optional(dev, "suspend"); + if (IS_ERR(dwc->susp_clk)) + return dev_err_probe(dev, PTR_ERR(dwc->susp_clk), + "could not get suspend clock\n"); } ret = reset_control_deassert(dwc->reset); if (ret) return ret; - ret = clk_bulk_prepare_enable(dwc->num_clks, dwc->clks); + ret = dwc3_clk_enable(dwc); if (ret) goto assert_reset; @@ -1711,7 +1749,7 @@ static int dwc3_probe(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); disable_clks: - clk_bulk_disable_unprepare(dwc->num_clks, dwc->clks); + dwc3_clk_disable(dwc); assert_reset: reset_control_assert(dwc->reset); @@ -1755,7 +1793,7 @@ static int dwc3_core_init_for_resume(struct dwc3 *dwc) if (ret) return ret; - ret = clk_bulk_prepare_enable(dwc->num_clks, dwc->clks); + ret = dwc3_clk_enable(dwc); if (ret) goto assert_reset; @@ -1766,7 +1804,7 @@ static int dwc3_core_init_for_resume(struct dwc3 *dwc) return 0; disable_clks: - clk_bulk_disable_unprepare(dwc->num_clks, dwc->clks); + dwc3_clk_disable(dwc); assert_reset: reset_control_assert(dwc->reset); diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index e1cc3f7398fb..32dfcf3a83d5 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -1134,8 +1134,9 @@ struct dwc3 { struct usb_gadget *gadget; struct usb_gadget_driver *gadget_driver; - struct clk_bulk_data *clks; - int num_clks; + struct clk *bus_clk; + struct clk *ref_clk; + struct clk *susp_clk; struct reset_control *reset; From patchwork Fri Jan 14 23:39:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 533144 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 29CB3C4332F for ; Fri, 14 Jan 2022 23:39:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230202AbiANXja (ORCPT ); Fri, 14 Jan 2022 18:39:30 -0500 Received: from mail-am6eur05on2071.outbound.protection.outlook.com ([40.107.22.71]:20289 "EHLO EUR05-AM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230147AbiANXj0 (ORCPT ); Fri, 14 Jan 2022 18:39:26 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OFQkuwJIZewt2EGEG3TUdcRAZFJ/ykRDnVXOZ2EnEIG7KN1Rb6Y1BUjpC561s0lEIYq6e2ZrMJn33yUrAUoV5waFL/sO9c/HkTDJlSzLMC0+cHWf9IyuDWfh+yQLUUIaq0s6tkywaZPVNMGoYxcg4XhnQ7qfFcJm+lEonH9aXYnu1ynXHHAuNfj3bqlhDmbiOtJiOxY3biMVPTDTB5vWxKk0k8WSINziKbPd8/JJ2HeUfxPq2lqmElyj6iWpnnfwt1p9nHXqwsDGeBnfKpVitklYhc20oMHIJ4O77ClNC8PEIlfHSGciLarewBEPHzuCBb43+wMuR8FWMCDT5bL+7Q== 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=m/LLMNIxV6X/5Gez8Mt39JB0bJ0z9XpMgyvmp5QQ37g=; b=F2OQ6P6DTijlIWDYYeeT8aoL3KN6HjeVwfjywttVEng3iM/GIHk2kp0r3G/lVSqrzQxA/mo4oybJb2ag5a1P2nq+nLXt/90TS0+pPRwpIjiaNt7Z/lST8Ifjpv0TvoLMEFIaRXthpmVZApxUtTDdAMM0EA6YfOWaNvorh+u04dQwG+zQj+9TsMRvIv/gqtLDhLQ1r0x4CwIGKalSpcGfNBwGsEjXKEQhBoJ754Vi0w9TliKqPX5UNkiMrFTuPPIAvPRPjiPGBCND4VsWaAE4TcB+2Teqz3QNbezxGEAUsy5wDsn3b6TY5kgZy1DFsrpIV6v60pFXp3n00lZ56cuzWw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=m/LLMNIxV6X/5Gez8Mt39JB0bJ0z9XpMgyvmp5QQ37g=; b=i8AqYpS9/tG863oNNVOcrhV0R27M6BB0OD5JN1Kyt9e/XpRZ/Mw86J6F5DenlDl50TAWKWX6/NjliCTh8Sv6S5C29yAIOXUyqw3vvhmKgLXiofijQ2gBpnk5scRwfZ1ZwdKzSIIAVAPEuKy0HWdmPfgJUiMhbLxhDvKfOPwwkXE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) by VI1PR03MB4336.eurprd03.prod.outlook.com (2603:10a6:803:5b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.11; Fri, 14 Jan 2022 23:39:24 +0000 Received: from DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::d47e:81b0:256:3005]) by DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::d47e:81b0:256:3005%4]) with mapi id 15.20.4888.012; Fri, 14 Jan 2022 23:39:24 +0000 From: Sean Anderson To: Greg Kroah-Hartman , linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Robert Hancock , Baruch Siach , Felipe Balbi , Balaji Prakash J , Sean Anderson Subject: [PATCH 3/6] usb: dwc3: Calculate REFCLKPER based on reference clock Date: Fri, 14 Jan 2022 18:39:01 -0500 Message-Id: <20220114233904.907918-4-sean.anderson@seco.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220114233904.907918-1-sean.anderson@seco.com> References: <20220114233904.907918-1-sean.anderson@seco.com> X-ClientProxiedBy: MN2PR22CA0017.namprd22.prod.outlook.com (2603:10b6:208:238::22) To DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 738b4662-be89-45b5-8f6e-08d9d7b71835 X-MS-TrafficTypeDiagnostic: VI1PR03MB4336:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:655; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SbFzOpRoigsCLW9QBj0i4gDU4uDS5vRkbMT7BYSAK1zpQ9a+0gWp5xTbauJXcDJRjthzukG54gAS0MG3fD3yQOG1WNRe8/WjqethidF7jlvaO3j8epe+YqCj24meTzoFQbVdAl9ZYUaiXQzPwF9aqM4jtf619+EPSrgeyDkXP1tqb6c923UvOoEQ9F0I+7EfuHd+RIRQXwMJ6DdB/8Vl0VrKQ6cH7SuODuAodBzRYI5XiGAqJusQwUPVzFc7IUD5S39bZVx3/Cqivytz3M/3b51D+XE+tri27wwLUxLaNbDMPYm0CXGY8LFpkXJpsHijOW9d5ADCy6H9dtN0Yd0Jlcsw4waOXXHHZ9GUwQ2xesV1rT3N9+MFCbYLFOI9E9xMjzp6FU9MOiUo46fZbAn875Ha4V4GdB4Yu8+ndydh0LKmJ1mMpoBDDrAyEhH+JG7jxWk9dx1RxGeeifK6g4ckPEtX1MNvDCi2/aIkwNm5HI8JBvrfvGL1GqzqQnp+DZ2nu0FEapBz5uM3Om2K2sQfVz1hem4pe7O4i/HaX4NYDo2FOSVtU2J/ZT36aXCRBbb/yQ9+WFgAwdLeM6tIddaQdX3pxu4A6GEnMfkAguP6mnPoTAyV97wl8yCU5M1pmj5PotRMdV/YebSHjrNj6AR+Srw4vvUH4Y7dsqTbM+ygemGgoJAYLIOW2aAT9UP7dCOgbpXiQaei0cL/Adgi8pu6uA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB7PR03MB4523.eurprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(66556008)(8676002)(6486002)(44832011)(54906003)(83380400001)(38350700002)(66476007)(52116002)(2616005)(66946007)(6506007)(86362001)(107886003)(38100700002)(186003)(6666004)(2906002)(36756003)(5660300002)(316002)(1076003)(508600001)(26005)(8936002)(4326008)(6512007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QQYuKZfleJOoBdZzTwXPGyKd9s+ZrBOBpk3KQ6x7iXpVhU5m06OZSiiXZ8F/0kj+J+Jh7PKIWvkYGsNbb1RBMHp02dN8njsD9fzSvfx8MuHz7Ztj7FultHKfgUvQVv9EYwkoVz6x+pIf+evXRS/1kfPhRFx3LkUuwjrh1/E3IBs9v3ZeuioomZyEVmwNNUYtq2pd3pHrHVvcGPbzwxDf18Bbgq9t5GYejva5eRl2/klCEhsy/KromY5geNQTI5aRIP0uxRQv+hhD4G7Gk6plbGTM/vYunCIPMet3z/cGw/X4QK6JT75NE5C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uBP8qMg5n9rrJo04cFglNuFI8Oykmq7l62bI4OojQraJkLokM9cuikTiykEkq9YAze8wJt67qwb+SJhXbKvCSlv5OjJpu6Wh81fcB0DEe6G3qABCPiNOCFXQL40gTFeYlqburipCrZr2/Q91D5GHmqxiGiMu0o65/UALli/PtOyFubFblScPagJluDpRs2OZEE+/2xAtYWwqF8XpR5zGhC6VP34GaGEkawQIO72txKs4naIQPPOpY2yC/9oo= X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: 738b4662-be89-45b5-8f6e-08d9d7b71835 X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4523.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jan 2022 23:39:24.6972 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3QagXXdfAd6TCMZtEBhxGkpiZ5BtDAAIxxeolxm1FmJwbEipqaVwW4Jil4AVIfD7pK0uEREzcDwNbhDNWq2p8g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR03MB4336 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Instead of using a special property to determine the reference clock period, use the rate of the reference clock. When we have a legacy snps,ref-clock-period-ns property and no reference clock, use it instead. Fractional clocks are not currently supported, and will be dealt with in the next commit. Signed-off-by: Sean Anderson --- drivers/usb/dwc3/core.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 699ab9abdc47..5214daceda86 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -348,13 +348,22 @@ static void dwc3_frame_length_adjustment(struct dwc3 *dwc) static void dwc3_ref_clk_period(struct dwc3 *dwc) { u32 reg; + unsigned long rate, period; - if (dwc->ref_clk_per == 0) + if (dwc->ref_clk) { + rate = clk_get_rate(dwc->ref_clk); + if (!rate) + return; + period = NSEC_PER_SEC / rate; + } else if (dwc->ref_clk_per) { + period = dwc->ref_clk_per; + } else { return; + } reg = dwc3_readl(dwc->regs, DWC3_GUCTL); reg &= ~DWC3_GUCTL_REFCLKPER_MASK; - reg |= FIELD_PREP(DWC3_GUCTL_REFCLKPER_MASK, dwc->ref_clk_per); + reg |= FIELD_PREP(DWC3_GUCTL_REFCLKPER_MASK, period); dwc3_writel(dwc->regs, DWC3_GUCTL, reg); } From patchwork Fri Jan 14 23:39:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 532194 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 60C0DC4167B for ; Fri, 14 Jan 2022 23:39:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230268AbiANXjf (ORCPT ); Fri, 14 Jan 2022 18:39:35 -0500 Received: from mail-am6eur05on2070.outbound.protection.outlook.com ([40.107.22.70]:56193 "EHLO EUR05-AM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230152AbiANXj2 (ORCPT ); Fri, 14 Jan 2022 18:39:28 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Yv7CTnUBj3XJ4SYxiLR4/ElPZNzNZnlNWFsSQbpN48SJleiGUs9g7TCHP4vLgxsGQOrJL4YMO1huzzdtrMm9HMtR4a0KliVUS/nB0y3lwpu8FkcOUUwOPUfHfIkr1kJUZDx88dY2hlNhZnQlc2lE5V2TM6cbMJmAk8tILpTkW5uW/Kp+m+M8GEcRiRJkhZtIX63UkrYyO8QOBWQ9ptdJDN6/ZL899ZCplh7wbVV4CBap6Tl0STUrlFIpOpUt4G+mikoK9cDvyUtCIZJlq5heKGMADIbJz6zjD4WVLbbV5Vo+gAJ8sSDmSjTubogWnp3ysOisSSW38hGvsY+H09+F6A== 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=bV/fheH5CwCAyZ5SIj6Gl7gtdFwXX7BQIcP5gZ9Kb/U=; b=OE5LteTM5qNt0e2Co0pMvz4AySskSzHnxw/G7yMkhsbwHOJ3B3MX7hutB1/E9mpQC0zXnY8yuS7VgFr36gW9PzguSbVPeYskW3ajYK1Jyk3DtBzvGkXQ+EO7rsGGA10qMwJjvFZ1xVQdH2Pj2K8PXf8NSse8PG7l7/6CXTL0o+QRd55b+WqZ6nPEf9Yyok9K4Jq8dWaFBGz/08jl9qlmE60ZdX9Nl2fRiTFtd7ElAK31CR0W30lHL43uhyAlVZcJ6zWtD4uKkqSMYg3+aARhHMNNh1Kj8OCKRjoSZ4duq1p68ebXifi5L7+9VLBPxqk1qRXJ53Cd/5XWpIgJq5uq+w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bV/fheH5CwCAyZ5SIj6Gl7gtdFwXX7BQIcP5gZ9Kb/U=; b=DEhYWKdlBXoH1/7EXYq9sZawCpLSLajhn3Tnw4Ifoc54t9cjlbf/84YdVn5XexW+xTFC5/lrBDTKZ4fi840LIWfGWAq/EEZoI0nQ2SKgDRb+MsOd/gwcHe4hQi7LHno5bEfElrUbNh6eEmWso0g4DwWHgdlrZcyr8IcjVTY8RqE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) by VI1PR03MB4336.eurprd03.prod.outlook.com (2603:10a6:803:5b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.11; Fri, 14 Jan 2022 23:39:26 +0000 Received: from DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::d47e:81b0:256:3005]) by DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::d47e:81b0:256:3005%4]) with mapi id 15.20.4888.012; Fri, 14 Jan 2022 23:39:26 +0000 From: Sean Anderson To: Greg Kroah-Hartman , linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Robert Hancock , Baruch Siach , Felipe Balbi , Balaji Prakash J , Sean Anderson Subject: [PATCH 4/6] usb: dwc3: Handle fractional reference clocks Date: Fri, 14 Jan 2022 18:39:02 -0500 Message-Id: <20220114233904.907918-5-sean.anderson@seco.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220114233904.907918-1-sean.anderson@seco.com> References: <20220114233904.907918-1-sean.anderson@seco.com> X-ClientProxiedBy: MN2PR22CA0017.namprd22.prod.outlook.com (2603:10b6:208:238::22) To DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f7a03a77-f35d-411c-ec8b-08d9d7b719be X-MS-TrafficTypeDiagnostic: VI1PR03MB4336:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7vHRMOHIh73Bu9AXwjTTkYm3wkmBswyJb/LCvkhY6D0Qc23smh2vIzA1pj4S/wsGMuOBezlPxobHoc99swY+sTS9GG1CCilAAHr5rShspAY4ffoolSKNO1jjtHL7C62Xmf7Vi6vPvPBVKnYtBdYEp+RK6tY6OwknTXmY0MSVUt8ixF4E0e9+bA1S/Z9SrU89zD62nWbe4wf99F0AfqO9wKopxKt4UBnhKZzCLk/M1P+x2LsLRTrRCIN1ha9F6NcnCiDQ59kS5qCV1inSdK6voRupW50ffEVTCmOLB5yh8HvAzM3XgTHzlJ5az4L4xWsqDjQ9rGqHRMxJqO23ElrM62kwwNwuC+k825tP+6qRgvcnl1Slv27zmdhp5znEdSZuEozyylyZYmg7buFttmQI8ojpR4C9OzhRHToH32+FBzpqlgdpU8WAsekxGsT1cCa/DCdb/b5PuB4b7cMIx29wv7QnZ2NqBajaNLs79rITv3HKw1Of2nF/Uk/nAPi/CAdBkzYw0JP5NhwWYbQ6fwi9Ls4tfhzljxSOEwVKhz5BpIBVsAy1kHpaQWitXZGxmKAGWtNSdfqgQFXm6HMomKJSSdXZg790Zc3d02MV6nuWJ9kitzTSGQf+qrrTlY5eCd2zxwbNJL5O7VDffX20mGkE46w2njYRt8CpDKpB4zRMwkEONYdzL8DFuqNew18ASeAPmsFdRBClZ8tTnI8SPzS7oQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB7PR03MB4523.eurprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(66556008)(8676002)(6486002)(44832011)(54906003)(83380400001)(38350700002)(66476007)(52116002)(2616005)(66946007)(6506007)(86362001)(107886003)(38100700002)(186003)(6666004)(2906002)(36756003)(5660300002)(316002)(1076003)(508600001)(26005)(8936002)(4326008)(6512007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-Chun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kNXKkB9nwrjYthBEMroF5Zi2Z8W6LVpPJdeilG53cMBEAeyZIjQEzpFRwy2f2ALWvBblH159Kev2q5tCU+fpWwbjE8wUuI/TCrNEwAzKmOeLM25d/pdcSHTbxr9sSAeYkCl8+sxscemNsJiO9xyfTj41jd1pAaYOtLOIsf+nNId/PDJUatH4hM3IlInzZRBMgWChd+VbscpbH+UEGIhR7aOJF1TqSbj/SOQYeHd2Q27mRG2Yomzsgg3tMqtY+G4z5ejYMDPeO88fkrGNsqIl/qhnRzhts7FrWkcDQaTaeqrUCJd0Y3gwHJ/a7hCP80GFeKril1MGNIZjaQVW8bHK3H/lhya5AN6mNMmrBzTpgEFkm57+O55J9Jf4+0BLvVy33VuzkgFxYg+bso1Xc1+baOZBbmV4piYJ4lPsaatStbZo1LU60dw0/wEYdv7miN5kvfd8CTG7Vze6sVhZ5SGMmnwiG1U9EeQTfFBgvF9YwK4t1l6FubhnLE9TMc5i1Pj4Ry7FYP22Lc90+Nn24PnpEpeVsfTyzXNTnjzIfPbibmwXf5bIPIJQJuvdM7dkheV2ArfxVQgb6VQiU5jGukTgR2fns= X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: f7a03a77-f35d-411c-ec8b-08d9d7b719be X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4523.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jan 2022 23:39:26.1971 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /cFf9+CBM4d34WH7PGs45aR0j4l8lKlcoY29CxmJb8NUywxbvYf1XrnRBfsE6OL+MrAcqWNamhPIItEJHZqQFA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR03MB4336 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org GUCTL.REFCLKPER can only account for clock frequencies with integer periods. To address this, program REFCLK_FLADJ with the relative error caused by period truncation. The formula given in the register reference has been rearranged to allow calculation based on rate (instead of period), and to allow for fixed-point arithmetic. Signed-off-by: Sean Anderson --- drivers/usb/dwc3/core.c | 25 +++++++++++++++++++++++-- drivers/usb/dwc3/core.h | 1 + 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 5214daceda86..48bb3e42cdd0 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -348,7 +348,7 @@ static void dwc3_frame_length_adjustment(struct dwc3 *dwc) static void dwc3_ref_clk_period(struct dwc3 *dwc) { u32 reg; - unsigned long rate, period; + unsigned long fladj, rate, period; if (dwc->ref_clk) { rate = clk_get_rate(dwc->ref_clk); @@ -357,16 +357,37 @@ static void dwc3_ref_clk_period(struct dwc3 *dwc) period = NSEC_PER_SEC / rate; } else if (dwc->ref_clk_per) { period = dwc->ref_clk_per; + rate = NSEC_PER_SEC / period; } else { return; } + /* + * The calculation below is + * + * 125000 * (NSEC_PER_SEC / (rate * period) - 1) + * + * but rearranged for fixed-point arithmetic. + * + * Note that rate * period ~= NSEC_PER_SECOND, minus the number of + * nanoseconds of error caused by the truncation which happened during + * the division when calculating rate or period (whichever one was + * derived from the other). We first calculate the relative error, then + * scale it to units of 0.08%. + */ + fladj = div64_u64(125000ULL * NSEC_PER_SEC, (u64)rate * period); + fladj -= 125000; + reg = dwc3_readl(dwc->regs, DWC3_GUCTL); reg &= ~DWC3_GUCTL_REFCLKPER_MASK; reg |= FIELD_PREP(DWC3_GUCTL_REFCLKPER_MASK, period); dwc3_writel(dwc->regs, DWC3_GUCTL, reg); -} + reg = dwc3_readl(dwc->regs, DWC3_GFLADJ); + reg &= ~DWC3_GFLADJ_REFCLK_FLADJ_MASK; + reg |= FIELD_PREP(DWC3_GFLADJ_REFCLK_FLADJ_MASK, fladj); + dwc3_writel(dwc->regs, DWC3_GFLADJ, reg); +} /** * dwc3_free_one_event_buffer - Frees one event buffer diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 32dfcf3a83d5..50c094af131d 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 GENMASK(21, 8) /* Global User Control Register*/ #define DWC3_GUCTL_REFCLKPER_MASK 0xffc00000 From patchwork Fri Jan 14 23:39:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 533143 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 E3044C433FE for ; Fri, 14 Jan 2022 23:39:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230107AbiANXjp (ORCPT ); Fri, 14 Jan 2022 18:39:45 -0500 Received: from mail-am6eur05on2053.outbound.protection.outlook.com ([40.107.22.53]:47328 "EHLO EUR05-AM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230163AbiANXjp (ORCPT ); Fri, 14 Jan 2022 18:39:45 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fdcIvk84+ihOhkZTNWsPwmo29NDERAJpkfgeveb9380TIZDAzprtQ8EXTGKg0/c+TdeanJQu5QO/2Ew578Qv5L6HbyA+oodZqLmMhvfMlmxnjJXwTIhFzudGmHRFUfiZK2SSz6mXWqj6Vl+LZL3U1fbCClMfakaPEq2AC7114gabGVam7QDJsmuIq3soturVtHjB+9PxjtPz5HrqMvCuHQfSzodvBrUgCKb9zBImWervfbGfGJlKUOIFU0ZlnkaJfeLnvRqSGuGzg4S4mqMDV/rYHgrGqZ0SFX7KAw1lli28LnK8pX4grfMRq7RceMp0zJKbX9cFMbyKZ7vco8QBjA== 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=+rFItfKQiGHwl3FGbMA8IsLJFeRbOk9WecY6ahF9Ui0=; b=AovS1TQz1Up9Dsa9Skbb/DXdD8cjeX8+hh4OyEaUMR3djlCoF2Pr2xxKQ4R904M678g09gzevlpVglRFt5yB97rRdUht/FTIG01UakRHA+ekTnlNkjYWUaWQYqHF+DnguVX84HS2NGEqtRPI5i7tuvW5p+0aeT2HOfBXVQQNUBML7g82Co6tWkjMALSJblwSqNHCWbjQhW44ulmUyHNCklb+vRFBRduG7wt9oXwGQEE3B0bErJ5MG1eHg2idVzD1inXYf9Zc53ua/gL6Mh0aEaAFW5IbLHOcv/7IDi8TmFJ1ro4ywBPaPH8XbjR+4nmse0J3HHxsF/0JuC1KKD7lKQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+rFItfKQiGHwl3FGbMA8IsLJFeRbOk9WecY6ahF9Ui0=; b=KTt2zOwOW0UpZmu6gjyanF3oUhv8H+isy9GqOuMXTqnamNzliszoIhYssl1n2w++3wqvMhButq8hhTtKEg5Xq3EUx9Y7+AfOfvZl4YrxX7roLxY2pOyvQKMnsejhsVodmGkM6L1emv4lviZ0XG+vy4ln/QpDwBxg9M+hcti25SE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) by VI1PR03MB4336.eurprd03.prod.outlook.com (2603:10a6:803:5b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.11; Fri, 14 Jan 2022 23:39:42 +0000 Received: from DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::d47e:81b0:256:3005]) by DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::d47e:81b0:256:3005%4]) with mapi id 15.20.4888.012; Fri, 14 Jan 2022 23:39:42 +0000 From: Sean Anderson To: Greg Kroah-Hartman , linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Robert Hancock , Baruch Siach , Felipe Balbi , Balaji Prakash J , Sean Anderson , Michal Simek , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 5/6] arm64: dts: zynqmp: Move USB clocks to dwc3 node Date: Fri, 14 Jan 2022 18:39:03 -0500 Message-Id: <20220114233904.907918-6-sean.anderson@seco.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220114233904.907918-1-sean.anderson@seco.com> References: <20220114233904.907918-1-sean.anderson@seco.com> X-ClientProxiedBy: MN2PR22CA0017.namprd22.prod.outlook.com (2603:10b6:208:238::22) To DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b27e6774-8edf-455b-163e-08d9d7b71ad1 X-MS-TrafficTypeDiagnostic: VI1PR03MB4336:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1923; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0kyTYFUxjuQ1j/Mj2IA9sbwYBzA8bGN6NGI8gFjPAu/0HHc4cSE7jiVXB4HS2hXS27tTyC2ZvH3MGOmCmY7nIhdy9rHp9JbEqIB4j4YMpU5Tn9QcMT2S+GwuGFG/bsqsd5LAUmBOgBqFy1+sHkcyg/h1CDxRhSHIKviCgaWVTTdE5bXg+R/HFyXmdVL92z3G5TziX8fk/01FQ17db0u0HFHznl3DtaGbF0z38CUQmdhqls+ebaeu/tMM7pPg66bq/6WZxbC83BqFsVxc95r0+BXKmNU8ctbxlvLA6rgD8Ad1mkMNUia++3d5+elSWqFoyzBqa3vU7eS1CBJ2VtXjZnnRMPDnuMD+xJa7iEkkltikYjBXIL/lLHDHv+IJmDPXyqHpCeOltQ68R1hWJbPKq/w+SnZzXpbi2xexRwnUt9IX262i0BjuJlO11avkSDrknVqHr2zcb0AwFMByFn9fh+58c6xEcT6DhT6737w44rmIYtd8z88kq+PSK0BYr2NlNaDOEUrkFmkgunNEENGmPX7mfhvV679/Z8r4Z+H/NN0SOhQPSpCzgppI9ahAmeiE3XmWIAe9DpTZyemzpuu5XGGVkK+jm4cU7YT9LZDJ2D3rRf08LuEiv5Co3qYaTOKeMavx/z8DGPKr/1K2GqcnPxhncUExA6OcgzcG4hUO2qw1NrTmtB5BhiZOcXYO8Ymcn6pWcEU01RtQGwVzsentnA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB7PR03MB4523.eurprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(66556008)(8676002)(6486002)(44832011)(54906003)(83380400001)(38350700002)(66476007)(52116002)(2616005)(7416002)(66946007)(6506007)(86362001)(38100700002)(186003)(6666004)(2906002)(36756003)(5660300002)(316002)(1076003)(508600001)(26005)(8936002)(4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VD3N7d4d/PCfzOTAeHIjD+arViAJfEDRaTyvtkg3zwaQ3/OC62yjmh4yUZARremiYtjuIIE6qSomVZJGQHCjtNL/+hn1VygZEzaign52YTr93+2phUwRT1DJgURY6H43qy4BmAlZBP61c3AMoGrm9yQ6xra43BdVi0Aef+Pc34Z9AOdBdQeNUN4C/RoFTI/WaGtx53grsSjAf9H3qycEjpB9W5R1HsXgeEY02uV4Yem6z5k570SHluZ1ftaIXZ3K6pEL3bLv+rMVR4PdpEG/F0zQQL66W1BL7ElO8BHkCrnfFPE/zE7M8BpoGK6amVWXqiL83G9zIdy8LObaK9C8jCvUnOAYkfTCf1+v7sLhyaj1LhyanB5cN0W2aVvJEXgHPXXQQz7o4pa3w5/THBVJBk1QaJ5ifna/kDIhyd3iBbRkBUBJNBOCeluXI/r2qFVHRY0c+u/XV4DrF6E5N6JZDSGREp92lZOIKh5xb1MQor5107OPwVpt4blCq42k2YfRWzqOvfWSxnDUYRcbyITQGtdXlKxfm5lputTmnOIhQBaCJEmjmvUpEFY271U7MSIUvHFAAUm9CjuCAq7yFwMZ1j/w4Y1tu/9ABuQaoEY4WxJmO/0Bq0J+fTbsLTo3z50Bhs= X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: b27e6774-8edf-455b-163e-08d9d7b71ad1 X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4523.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jan 2022 23:39:42.4929 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: KIY230Ztc1oPV8PF12ebOdjq0sTb93xiKwpAUf7fgCzu+MvCwAD3R1gGhzZ1puYAxPjOpz0m7ZaOgSzt6YSVyQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR03MB4336 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org These clocks are not used by the dwc3-xilinx driver except to enable/disable them. Move them to the dwc3 node so its driver can use them to configure the reference clock period. Signed-off-by: Sean Anderson --- arch/arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi | 4 ++-- arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi b/arch/arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi index 1e0b1bca7c94..8493dd7d5f1f 100644 --- a/arch/arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi +++ b/arch/arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi @@ -223,11 +223,11 @@ &uart1 { clocks = <&zynqmp_clk UART1_REF>, <&zynqmp_clk LPD_LSBUS>; }; -&usb0 { +&dwc3_0 { clocks = <&zynqmp_clk USB0_BUS_REF>, <&zynqmp_clk USB3_DUAL_REF>; }; -&usb1 { +&dwc3_1 { clocks = <&zynqmp_clk USB1_BUS_REF>, <&zynqmp_clk USB3_DUAL_REF>; }; diff --git a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi index 74e66443e4ce..ba68fb8529ee 100644 --- a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi +++ b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi @@ -811,7 +811,6 @@ usb0: usb@ff9d0000 { status = "disabled"; compatible = "xlnx,zynqmp-dwc3"; reg = <0x0 0xff9d0000 0x0 0x100>; - clock-names = "bus_clk", "ref_clk"; power-domains = <&zynqmp_firmware PD_USB_0>; resets = <&zynqmp_reset ZYNQMP_RESET_USB0_CORERESET>, <&zynqmp_reset ZYNQMP_RESET_USB0_HIBERRESET>, @@ -825,6 +824,7 @@ dwc3_0: usb@fe200000 { interrupt-parent = <&gic>; interrupt-names = "dwc_usb3", "otg"; interrupts = <0 65 4>, <0 69 4>; + clock-names = "bus_early", "ref"; #stream-id-cells = <1>; iommus = <&smmu 0x860>; snps,quirk-frame-length-adjustment = <0x20>; @@ -838,7 +838,6 @@ usb1: usb@ff9e0000 { status = "disabled"; compatible = "xlnx,zynqmp-dwc3"; reg = <0x0 0xff9e0000 0x0 0x100>; - clock-names = "bus_clk", "ref_clk"; power-domains = <&zynqmp_firmware PD_USB_1>; resets = <&zynqmp_reset ZYNQMP_RESET_USB1_CORERESET>, <&zynqmp_reset ZYNQMP_RESET_USB1_HIBERRESET>, @@ -852,6 +851,7 @@ dwc3_1: usb@fe300000 { interrupt-parent = <&gic>; interrupt-names = "dwc_usb3", "otg"; interrupts = <0 70 4>, <0 74 4>; + clock-names = "bus_early", "ref"; #stream-id-cells = <1>; iommus = <&smmu 0x861>; snps,quirk-frame-length-adjustment = <0x20>; From patchwork Fri Jan 14 23:39:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 532193 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 CB645C433FE for ; Fri, 14 Jan 2022 23:39:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230312AbiANXjs (ORCPT ); Fri, 14 Jan 2022 18:39:48 -0500 Received: from mail-am6eur05on2040.outbound.protection.outlook.com ([40.107.22.40]:11872 "EHLO EUR05-AM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230186AbiANXjr (ORCPT ); Fri, 14 Jan 2022 18:39:47 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y8v7oaaRZTr/RPp4drhO5vqBaN2iYaLOykCUUeBmnc8bV+roO1IQSac5D+BYCyHSPYilwmBRGVYbxYhcYv6nsJs9j050uaQaOntaop7B1jVJv9DqwEB3a+RE6KDxwuKvJUwfvJzFU490TfM7ibSoNm/JvhUrqYs5RCH06xnQ5jifLkYFRwJ5TFHtY6meu1PT6NOOFkUZHijLe/yQ2sRfRgPubDSkLZFIxem7pU3Ia39+p1N+VT4+LUimPoD1FO8UvIBG2zzU/A20J/iKBV/pHSpu0X9wqDY840zsx9ziRgGOYaSpwOSEFQ6zDAcU+CSSBGHNMQ/AryWGAVt7cAHdYA== 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=YbewwoyQ4DCRu+Tclw2otCY4m5qz33JtZQJc5pz93yk=; b=K4k6ms3jYWoiq4tFYjWlU+WrTFyfpIs8Z7OZ4UWi3DQmWM9XvZQDiBSyb+pBW/ceJiyOkj7YlsBKKMJ+O8XHXIVvHTLA7WNEdXXvOUt8gXZpj/mQU163b4xFq4Iwj4ImJEj7EmZSotBiGa8dgHSfrYN+F93kyX17HhJobqyi7Gy02haFn8vNDt8X7mWvYVRmntcU0gNxrppuK1kM9iOL20QCTeJpBv1T3K1R36gCJz52g1zRaKGpadgkl52PHz1cE7bmgfNpWq4vBFrSwWo46QYGlXHuwQF3ri7leyL9IrRJKVJ+e+c59yFWs1YcOmEwGGJa1q2pqmVuRtHRYKntRA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YbewwoyQ4DCRu+Tclw2otCY4m5qz33JtZQJc5pz93yk=; b=hg0yMAWTD4c9nAwpMHVDnqRHjNpDjRHYNtFvqWUBp6Vk9hYV6s7u7XsyDHbG4Ns1CNbSfCANVHo4Ky1ptv4ZTfJ0vaftzE3Jnge3XlPhDTsY+pL850mFhZ2V1tGdtCodGRGCUh7WuzlfN31kaACBOhN594nWJ7opg3KhedY6PZI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) by VI1PR03MB4336.eurprd03.prod.outlook.com (2603:10a6:803:5b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.11; Fri, 14 Jan 2022 23:39:44 +0000 Received: from DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::d47e:81b0:256:3005]) by DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::d47e:81b0:256:3005%4]) with mapi id 15.20.4888.012; Fri, 14 Jan 2022 23:39:44 +0000 From: Sean Anderson To: Greg Kroah-Hartman , linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Robert Hancock , Baruch Siach , Felipe Balbi , Balaji Prakash J , Sean Anderson , Andy Gross , Bjorn Andersson , Rob Herring , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH 6/6] arm64: dts: ipq6018: Use reference clock to set dwc3 period Date: Fri, 14 Jan 2022 18:39:04 -0500 Message-Id: <20220114233904.907918-7-sean.anderson@seco.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220114233904.907918-1-sean.anderson@seco.com> References: <20220114233904.907918-1-sean.anderson@seco.com> X-ClientProxiedBy: MN2PR22CA0017.namprd22.prod.outlook.com (2603:10b6:208:238::22) To DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b95f44f8-ca17-41fd-7714-08d9d7b7249f X-MS-TrafficTypeDiagnostic: VI1PR03MB4336: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: 48lEyK/i5xmXQxvSBX+92y7XpX8sWD3OsFNcXgpMmICcAtNiPLwvbpPmND0JkUgg1HLgOqPPUasSzmzMP/I8prfhckYB5OaDh5ScODL13mNgaNNeb/E2jdccoD8U+ojQq2tY7XpGz9YWDHXiRnDeGwXOeaiJetvRcVIguTpUkbklVzbZClP34Ixnl55qsrCTIJE6mr+8SNrlEhpTnZF336ymcj93kSER+3TlMJVohSsLV/1NHOYj+QbvDhScY10/yNGP566MVNBfl5+rjyWJdm1YXCtuUEWrJ31d8COd6T7jTu54oI3wZIPNTxfSAmPpVg1B7buI/rucPG/fv10NgLP3QA2K4bnQh4jP7Z1zPeIdGWImLgcv+kdNpRc1uD7sH0vsMbW83RW0jqpr4FY1SNHt69ZiubC4jpyVbfp5WX8euI5j7QaFOuHTDlt/UgV7sexOTNptOTXj4+UVg/Z6N2ME+jfp9aDQuIsK7t+GhZYVL7yzCosoY4OLbRvL+pf79KV8DyatrCiTA7Nx0wfzoUwGnH+fLDdapHsLexjbhQRSa63GGSi0UPxMdslB+TJFTBo2hskR9XTLie/+4IJ6YlVUWuQSoIlzrRnkG+bze6ERv7/MOh0uU2o2qt9T3BIx/mbwuPL2MRsO1J8dFtZvgCGxyuZZ+lcQZEawLs1E/0QS9iWfnUKSU7esdy4WcQmMy7gv8ECR8WE62fsxxGLUTg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB7PR03MB4523.eurprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(66556008)(8676002)(6486002)(44832011)(54906003)(83380400001)(38350700002)(66476007)(52116002)(2616005)(7416002)(66946007)(6506007)(86362001)(38100700002)(186003)(6666004)(2906002)(36756003)(5660300002)(316002)(1076003)(508600001)(26005)(8936002)(4326008)(6512007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZaWFxlIXJo0ZowgzT/Lsa+8gbMvuTRMVqPee4+HbkDSznM1vT0jSpeHcENU/ZzHjIMLT+imZ0zgkpkIgxfo3+a43q9gTRc2zOOwwT8LRhLkeRGfUPbSaq3hZc241TKia5TQsGdN1RwdwMdUiCfVAfCDP09XDI4zyoIYy7Holusxn3+8K8y8uqenKT/B4vnWoGo1QtZF3rp5TUoa5Vg78opaE2Rp+x1gnBu32qnqXLRfQrdpZZAq4w8HCN1Zh4V3fqOFgHx51dmr9ipf9IysRQqByg/0K/H8yDhLXdcGNoR3RFDwrxQ37FSmTW9jzm/RP+UQxS3+p890A5gV382niMtTGluuBz0cn6lxnDEPL0Vqx6ILlBXtIcLSODP+Y9MxOZ0OFcT8Fbt14f3JtqgspvVLIqZMWI6DFCTlw+kLRRYdCNmgkknoPK3vsbRYdugL5P4ohaa6OxC74ME/uErtQGkDlCsCysPVuN78aHawFq0VESP+gJMosx6+sBdx1AwkGJL7KRodtyAfl3XIBoRxIpv7tE5xkGVZKwWVd+xWI41MCnqSaMPY2nNgZtKbiAS5P2CRniYPgWQ68p0Lm+GV/WJlsxGDz6DPq5aP6DvW2H4fnx+k4smV/r9HZW9U3+lya1RBCFAwuCRPoziEMU4RWosddx4MqHp5GOUbKIa701ime733cmYZmB0rawWEn3lC+l+wF7MobVXD5/WSIW0P/a/4Zd2vfTPG9zquGRfkCC4O6hKb4cNMm0mtP6QuTwNAbJcq+dxSLx7duUhA4cE9JqdV6sY3d8DcLWlAapCXst5f65hmbbA+MoFFwXKLIvEW6TKuobaGhgmxmJy/jyzL2IOaqQks2dzgONVRwYPVGspwcrbtQIwj+q1ZRl85xKqxPTLbskf27fiLcv+MLVmw1tHM8x8weYI7+Raaa+qaVwTFLaWwC7VDPo8CpV/3d0NjrAkXZ9WMIql4k45aGnGSeuVeOZK7GBvX2fuTv+P3dx7xOCYkOMtCXlstslLbUzpY8umQgrBwb1vNdG5gWloAQ0KFkH6go8G5BXpOtfdmXK8U4oJWoglyQ/WRrh5qp8IIpXfpZxUZb8hS/NUrvQJ5PqsItkoSM6a41n9M+Til73TDW7V36eaFKAkMuEa0UGISwdj8gJ1V66ynbs/SEPXWmsIbhvLRdy3wl4gROpKceo0vIuU4g6Cvog4BAwPAz1eVm8XCgNc9Izcfv+5pBAozO2AkMICyarbheFOTh5NgXJuWi3NXxCnneuBoQQYL4nr5HOPIRnhd7ac98X3fW8h/6OuROHMdjLaVlQOsLviciAM0EIHsoc2eBN2d4bZZK3MX6ivUlP2k7JnrgQ1tYTiX768WnHsQh5vGbMUHQW6Ey77KPcJleaI4kV6VrZemTRdQl97l+A1z+w8zik+IXVMVNG65Tje+GAKd9cl7xZFczcN4RKUmfJSlNsVSM9jJ5+lTCp2kSWUKmjjsVfeQGfp6kFiEd5GDgGhTrO0qEhJgLy3vo14VpTx0695Jz2VYSVr2uzo3JoWQZ2pEIVw/oGV966Yaj80qKJHsxTk8HI8eRC3x5tDOxGvMCZ15YMJTRUCopMkBZ03EjmdPXXZA+iQl0Lr4Bkne0i9DnG30poo1whTk= X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: b95f44f8-ca17-41fd-7714-08d9d7b7249f X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4523.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jan 2022 23:39:44.5865 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: AP99iGZSuyL/ZquGAy+CUFwSul+6DXR7ksA3E5H34vqND2Vo248VcQ6b5GWcR8wtleAmZTh3oxHFgVi1rZVFGw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR03MB4336 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Instead of manually setting snps,ref-clock-period-ns, we can let the driver calculate it automatically from the "ref" clock. I haven't reviewed this board's schematics, so please let me know if this is the wrong 24MHz clock to use. Signed-off-by: Sean Anderson --- arch/arm64/boot/dts/qcom/ipq6018.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi index 66ec5615651d..a614b9f73e2c 100644 --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi @@ -743,12 +743,13 @@ dwc_0: usb@8A00000 { interrupts = ; phys = <&qusb_phy_0>, <&usb0_ssphy>; phy-names = "usb2-phy", "usb3-phy"; + clocks = <&xo>; + clock-names = "ref"; tx-fifo-resize; snps,is-utmi-l1-suspend; snps,hird-threshold = /bits/ 8 <0x0>; snps,dis_u2_susphy_quirk; snps,dis_u3_susphy_quirk; - snps,ref-clock-period-ns = <0x32>; dr_mode = "host"; }; };