From patchwork Tue Jan 23 17:02:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 765361 Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on2058.outbound.protection.outlook.com [40.107.14.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 47BD67FBCB; Tue, 23 Jan 2024 17:02:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.14.58 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706029350; cv=fail; b=s6mou2ZCZvGN3L9rZukn7iU7DNHhiGrw11wJdLuyNIhmp/IlviMp68NEbwhifrGaiP6iSu/EU9X8Md2G3Q/y/UAObKGw2DZ/PRHXxTT/SzgVknVpGpyc6dRZVw7sOq1+Wf9Xz0HpKbN48v1zJU2eYomA09QablmiLE/ZpCs4UQ8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706029350; c=relaxed/simple; bh=vFGaPAcNUmPRh7akb95viCLjYpWW/0SORK33tKVln+k=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=kpebtAXCdpY0i8zyMd/8EiClbtMHYopyOAb1aBBfLL/2cJPQLtj6yDfGb79EHhVIHRYr7N6H10GZC6Xrkkh+KPFd5U1EL+CqrCanFY76J7qSDgqLcUdRmrcqjC+fx5lDgbZv4LjoWUYI043JFxUzcoUhMsgIcnxYB9GCd9iUQKc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=lIAY/hpf; arc=fail smtp.client-ip=40.107.14.58 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="lIAY/hpf" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X1MLjOPkQ98Nbq8isI5txiw+zGD/rGRTYa0B6sWUYnDYhiS79xO/B8uAM+5SetFIZj/zNHDvfmSC/2Yh9VPnO7ZZbIEqHvOyog3SLwi/A2VmZHhIeqAYm5VOAEyxIAQJGT/oUOl50QjLf/1bPZ25vcIWWClPXN7zJ/8T9g2H/2iAedi/PfsdezKyBk35P+IF0rs5yPa5IW7H37yij8IzKCB/Dy3ULTt2I0J16Z3r0V7GO1Px6IvIzVj6bVYQL4MTZuN1J/Vav8EIGEO/HURgFPTozTCJTIvV0Lo+BHe8izgc+WbS8Ea3PGZ85g3R6TTZsbe0T60borLz7yGsQzG9Zg== 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=wzwFcTGpdJQ4kRlVNglsmMd3+dSjCH6FHmCQEDxfGqE=; b=W7YpnHyorUMZQv1rqDbvB/u3BNBNfPFGnhnzeM4x/ZiW7ugjA/y/KSuX39yKEXJPers1lj+BqZ2N0tIslwgFTTdmrW+mxUlP2X1UnlXtvRJ2HwzsgfFZd2/8IppEHI0RbitDJ4GJXFh/CBsmNmN4SKLeD6fATcEVLPJQSc9nZgQCo4et9jnQYjBvPB3gE1VsOBKsLvFdmm0GwkIBSs1F1Sr42BgbalcFSgiCZTQJYf2wmt/pLuxotre4yT9mhyvXvoGJFlDvGMNhZWqwWCOh+pab9Xt9Ijfrr0/oBdQk3/JWg78/FxJureYkh8n/Drm+K8Gz7qBUayGeouqgJF6ZmA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wzwFcTGpdJQ4kRlVNglsmMd3+dSjCH6FHmCQEDxfGqE=; b=lIAY/hpf66je/Z9P+k7+854NZPWQ9ra5UUhWb9dS1T7SYOLLr5+iVwguYfbHbWxwpee/uJnhTStYpgUYIXHZE/8OzFS0eicnCWqRT67THkbioja2jV+tS/hS01ojdR618y+J0OXmAKufk2qQoX4Z3ARrEXGPUaYIkmW9W/Kpa/E= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by VI1PR04MB6992.eurprd04.prod.outlook.com (2603:10a6:803:139::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.37; Tue, 23 Jan 2024 17:02:25 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::c8b4:5648:8948:e85c]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::c8b4:5648:8948:e85c%3]) with mapi id 15.20.7202.035; Tue, 23 Jan 2024 17:02:25 +0000 From: Frank Li To: thinh.nguyen@synopsys.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Cc: Frank.Li@nxp.com, balbi@kernel.org, devicetree@vger.kernel.org, gregkh@linuxfoundation.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, mark.rutland@arm.com, mathias.nyman@intel.com, pku.leo@gmail.com, sergei.shtylyov@cogentembedded.com Subject: [PATCH 1/2] dt-bindings: usb: dwc3: Add system bus request info Date: Tue, 23 Jan 2024 12:02:05 -0500 Message-Id: <20240123170206.3702413-1-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SJ0PR13CA0198.namprd13.prod.outlook.com (2603:10b6:a03:2c3::23) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|VI1PR04MB6992:EE_ X-MS-Office365-Filtering-Correlation-Id: 24f4ff8b-409c-4995-05fb-08dc1c351280 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MyrWCc3b3mmzaUNY/EAfdLYtz2BXH8CY7uUzCNNSeqnbP0ZxgtETIu03UcJAU3iBeJopKznCrC+zAwDz5dr5AXERfZR20rzOAcQfOt5xdQ5pCntsz9obbFKxzNoG0KqvMavxMEoQkYPm6aS4JesX+/azqEVr0i/SP5OuAc9WwZW1waaWbTR49uOYPxqZdCxCEbKX1oWEyIVwDxrKHaIWXeOk8mDq67MgJRhfWxVCHZubheaijaOuAiczisbpwo0o2v6ENNrBxDlaQ7b1RE5HruIPK8xrWWD8CQTIzyAIIR/Z7P9ROQGrBiv+AGLp2UQ4yswXFWJIbWRTrBSJaDg5zYai0PYfW6gPX/wQQBQkDftrupntPmUjFPDGSgvYkMqhQOfNumD7OUCpIBZiuHS8POxFg6NAao7lldOyGxb4rafgeJ6sLjCmAuy9Y+zmNgTpq50YedbmvYi53NfZC8edlAsmuRbit5Q+Hr9UDcEnqblVMN8fmcCOOMgfSmXJXdIvG02vQvxmjY0yA73XvS67KGQNzrcewDLJStrvv1xTVIUdaFubUVVnYzyr39xxuGWZsnH/kU7uwvwOwqkjqWSMgHw/3WbZJJqoMOPgL9ewfi7ml1XF3wXKtFwkjzIClb8y X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB9642.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366004)(396003)(39860400002)(376002)(136003)(346002)(230922051799003)(1800799012)(64100799003)(186009)(451199024)(38100700002)(2906002)(5660300002)(7416002)(36756003)(38350700005)(4326008)(6506007)(6512007)(6486002)(86362001)(52116002)(478600001)(2616005)(1076003)(6666004)(26005)(8676002)(8936002)(66946007)(316002)(66556008)(66476007)(41300700001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hIsfS7ScJ+LFABtRAS10wDMerIQZe7prITjjdXjbpaR1nM0hf5C9MOyXUCspYnD+bCrhIRquhHYDYq2FAcdQaGNnxo4eLVYPvJT5nuDrnGSZRIpwRjWJjUJ1wIkaNuannEXxNkvrCfLxtP1Jhf24r3vrLZXVeSV56KStMPbvfh7FUoIzlJcQ9nz0TawiFyu8WOxqBfnDWDymxPXk5X1n5vizXOH9dAltJGH4TrCvedTTnSVCNYBAKxZMBznxNY6MlUPrU5FQWfZBLtTWFBVG/ChXKpRNpfxFgp7/JjV9hTcms+xVtqPUkPhMwqrei5XTAvFAvzUVp+2tNk/9IBNnA/ANEQnDUNVm5YA0RnVNMaBljpEN2d3+ln/CYqjyOgEOv66z22G9BXC976+IUAQnIPCbH0PPFsDyDS9Pv3El9Mzc0r/5tLILZXJSq7pbi6BVfrgmIDMborDP+JY09FrJCHH3yKnv67p0T1X2U++2MBuxuFMiRh7NDiVpo37djehJ4JzQRf9i7yOAO8aNRf0WKJOhpMJ9TUPr4IlO88qiUOaRqpA6NQv7g+SS508UFCIZb5DzOG+/ghF+HqmmIUirZKTNAHl7za66ym4WfncGWVkklnzTLDq1SMZgNdcsmn6xMD0NjDGE3wJfwa5R/D3GDgzqQPty9HEuhtNm+FpB40PRRE3KNBrzg9u5j9IfLP2e/CeM5KC1guhaCg1j4RYsaVuPL43CmnObUcL2k9T7Ks/QdgyS5kqpui9S8TIYsq4/1kqpMLjt1fs0iaAXCeONDViERkpNbM8Vnmoe246s0EOP7gqfGiKGZVpnG/5MHmNV1uebp35tjucV8Nc52jTckhKaQw0hLcUHIsZn6zBuXJ9KlF9ToLNDG2XR0ej7wSXhmwR+lMB6nc867N+boQH+E3bdhKUBpm9279qT3HdOOgPhX3kO/Az1KxXBNAJ6Tg2qknF5FOIUdJVc7hDpeY33Ynoj2ZDpPlrWE52iDPNcrPAaqHI8hPagM7EH4cL8/m+j7wplgN0mvjgcNtnimYq+Q8i9uNbuuCe1j7xXCRK1fI8dcLYlkkRdbwWALyV6p9FF4XB1tqDOtOie6DPY/YRV2rl9AO3cvX+hGyZql2t/QYTq/qb/t2tfYV+7kwo/81rBrljKpYmROlt1OmaN6Mk+eBjcombMEBcZi0OHseySaQ4TnW1SASvT6mlQgBTwD8gz4q0/1Ffbv8Jh97/M2CjUzZClI2Ej9JYsM9pT3cgtv2KYHfLuW/AYa8GzmASluHj68bOUh/ukhcppkkQT70nC2SbnIJgyXOn31AOC4+7cEj01mEgBB8Dwqm+xVLEkWr4QM79e+KWIwAONdK+B9HaWZR0vsaqXw1sqMHKOPLqqWcZsbcv9/TYJnQqUZTRdQGRCgj2nwJjxMiKyKch628Ul9SUaqnNYJwXJR+CSp2cbBFBNZ5FrC5zDfyQhcsz3gavx/lNGRIlE1WoMBAKx5rmUve5/2fCBsi23C+d+yGixMov5H13OKSMGZ5p7aWrTWwRsXn1TJPk86ZmpXMDKXsSaBiKHpDzgyYoeknM3ooYq11C/couvnlqrNmibWbJx5cTl X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 24f4ff8b-409c-4995-05fb-08dc1c351280 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 17:02:25.0405 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Oh22ZGI5omvhQNrjNCYXV1XhctFLJjH73rzbzH8gdj/32zHF1jsFzEWgKFas1ZYLvFcJgLBPimBXskm87ukf5w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6992 Add device tree binding allow platform overwrite default value of *REQIN in GSBUSCFG0. Signed-off-by: Frank Li --- .../devicetree/bindings/usb/snps,dwc3.yaml | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml index 8f5d250070c78..43e7fea3f6798 100644 --- a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml +++ b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml @@ -439,6 +439,42 @@ properties: items: enum: [1, 4, 8, 16, 32, 64, 128, 256] + snps,des-wr-reqinfo: + description: Value for DESEWRREQIN of GSBUSCFG0 register. + ---------------------------------------------------------------- + MBUS_TYPE| bit[3] |bit[2] |bit[1] |bit[0] + ---------------------------------------------------------------- + AHB |Cacheable |Bufferable |Privilegge |Data + AXI3 |Write Allocate|Read Allocate|Cacheable |Bufferable + AXI4 |Allocate Other|Allocate |Modifiable |Bufferable + AXI4 |Other Allocate|Allocate |Modifiable |Bufferable + Native |Same as AXI |Same as AXI |Same as AXI|Same as AXI + ---------------------------------------------------------------- + The AHB, AXI3, AXI4, and PCIe busses use different names for certain + signals, which have the same meaning: + Bufferable = Posted + Cacheable = Modifiable = Snoop (negation of No Snoop) + $ref: /schemas/types.yaml#/definitions/uint8 + maxItem: 15 + + snps,des-rd-reqinfo: + description: Value for DESRDREQIN of GSBUSCFG0 register. ref + snps,des-wr-reqinfo + $ref: /schemas/types.yaml#/definitions/uint8 + maxItem: 15 + + snps,dat-wr-reqinfo: + description: Value for DATWRREQIN of GSBUSCFG0 register. ref + snps,des-wr-reqinfo + $ref: /schemas/types.yaml#/definitions/uint8 + maxItem: 15 + + snps,des-wr-reqinfo: + description: Value for DATWRREQIN of GSBUSCFG0 register. ref + snps,des-wr-reqinfo + $ref: /schemas/types.yaml#/definitions/uint8 + maxItem: 15 + num-hc-interrupters: maximum: 8 default: 1 From patchwork Tue Jan 23 17:02:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 765796 Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on2083.outbound.protection.outlook.com [40.107.14.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C39880046; Tue, 23 Jan 2024 17:02:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.14.83 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706029355; cv=fail; b=P1uOmSRJUFDQ69wBXwJdYQdg6Ra2kNLLrPRMUN9jyXnViKOpj9FXuoyqeYns9temea5AhhtUk5jIstO0tDHTdWz++gSxBbfijxdUckKG38s9SobqVa0dGS/fkSnMiUM2/oWPtrtnsh4AY6pEVKEoC7Y7jPMejofjnkpUnTKk3uo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706029355; c=relaxed/simple; bh=G68x1yCEGD8Ou/tEMi5ZEhk5PQ9a4F9jl71aQCxqlqM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=UumOtpgymt240qaBjUa50UFuc9uJ1R8AswUuOxZQhuN49p1/bQ0Mhca/z1MeYHrCmagLwHf77XEm0qM0EKv8tAKC0ECJ/gAJkmao7HQQxE7uBlT2C8UCfIE1bY/5zUfD+2XFQjbx5Yt4Nzohn13kn7aP3cCk5oC+XMgn9LstS10= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=hqRzNiV7; arc=fail smtp.client-ip=40.107.14.83 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="hqRzNiV7" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gaDtjGKV7cXPM74Gjf8+8yLFiLbsJ4s0okNK8Og6V3fZldT0H8gGN5vXQkyLKVG4fu+nE39cdIWZpdg5dyniAdSqaE77cofzdUI8oeSFh/DrVa0vhxqE8aKXvM7NXbntc0pVEgfbmSievssfx4M07iecl5ZjDvR4MZGlka9OHK4E8PEYHWICF0uxiv7zQoruYnFTJtbGDqKmjk1JJuzGp38VmTteu1cSHCPu5fv3dO3BRg8U3qtQNzu5zSwAXwGwpco43HoI/cLb9LfCeUrYyaeGmd3fXvQkBaM79MV6cSKHKkvfT1zbCX8cpxMNPtUZt3B/u08BlYqp0lKUq7Cr2A== 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=K6fKhxf57NRZOyaYmHUg4O8Z/T8SxsBFi1v1cuJskSc=; b=Icb/Vh3VdIcZSThljb2gzN1B6BTaaSWZRJl3c+vDaHcGEsC79Q9a+ibdqeevAmS0Nzs4BxvhAisNaI6JOlguihRbb+d6xWlGYBZu4nx/Y5M0XOktCQmDEjO94bBYwuOuEqvj/oyxheKBl1yR8WWKaVzDs+oqzJrwh2PbMP8NamLzB0QzAt357JqEXy8Kmn4p90qmmIh8dgrtUEfW4rp6bhEk3Fu91Yd36IV5dqAlUYVkO5WM0YCV0ZPUyhvu2o/ehz5sGxzAakQsixpZSxQl4vuEcB+lZsGcuiWgv3fRJPg7MNIrSb/h2FWL1AJHN9Hhi/2vxyxgE8T/BXe4ih6B6Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=K6fKhxf57NRZOyaYmHUg4O8Z/T8SxsBFi1v1cuJskSc=; b=hqRzNiV7LbvOCetCpWjQK6MN2WMFSsT4w06erSfclHJvapU6goP/YJwmSuR/l7H0bRj1BYOj9GRU0YSEaW4ny/WPTVXeWE+ckIP2yTnm4TMhaskldVGYrRPJvcE6LZEAE+p3O85Zu7sLcF1WqFCGHgM5XxKohmlgsh0wFcMtNg0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by VI1PR04MB6992.eurprd04.prod.outlook.com (2603:10a6:803:139::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.37; Tue, 23 Jan 2024 17:02:29 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::c8b4:5648:8948:e85c]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::c8b4:5648:8948:e85c%3]) with mapi id 15.20.7202.035; Tue, 23 Jan 2024 17:02:29 +0000 From: Frank Li To: thinh.nguyen@synopsys.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Cc: Frank.Li@nxp.com, balbi@kernel.org, devicetree@vger.kernel.org, gregkh@linuxfoundation.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, mark.rutland@arm.com, mathias.nyman@intel.com, pku.leo@gmail.com, sergei.shtylyov@cogentembedded.com Subject: [PATCH 2/2] usb: dwc3: core: allow overwrite reqinfo in GSBUSCFG0 by dts Date: Tue, 23 Jan 2024 12:02:06 -0500 Message-Id: <20240123170206.3702413-2-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240123170206.3702413-1-Frank.Li@nxp.com> References: <20240123170206.3702413-1-Frank.Li@nxp.com> X-ClientProxiedBy: SJ0PR13CA0198.namprd13.prod.outlook.com (2603:10b6:a03:2c3::23) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|VI1PR04MB6992:EE_ X-MS-Office365-Filtering-Correlation-Id: d2029f49-8c83-42b1-2c52-08dc1c3514f7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rjP5BTONu5FfijvJy8o4YwMSLvglsTRn0GBtSS1dl6abw7zEC9Xzm3RgHnFiaauir7kNGpcNNmygWz4HiWuz/qdBRPH0R75tJaIlmDUXG/XZBUgfmahWJFwaV+gGPIGTT4PRgyJI4gIWVAhu/j2irJvT6WKYJesQbu5N6vVFW4WNkodvp/btNp3dY4Ui/prvslIx2bQgB72Gu+s6cYcPaqNmGDW6IYIv6/mRuZ5IASXTKDD9ErI0c6FkvVbFCHscbQl+R8Nk7TQwMo5o7ZURE7A3AqltYivN1RKIPooGf4iG9Z5Fcq1piid+N+A63OCVlLsuJbFx9Th4QSFY94jYacBPwScY+o31BZE8nBmRD4j26VoH79dlj2/OwNVZYhueycq16NqSCSXtD8dDlsCP1+cNINyVX0HE77wEOrzUeP+qBBGEwm2K5apvj3eWdzyTcB52e1VXzYpdnVOjFrmoR/iBG0XT95nWOYLGsN+UcM75puA90FfHQ1Xu4Y+aAUXOz2ZgD0tzmGk5VxQvedH8ut1uLUQ2PQDx1NZ37Q6HD+PUy4p48CrxPY/JAfgkuRiQbYR8ZFJ8hHqpM2hKnW3cV6W5Igg7OCu/lechGU1AJlXq/pDtRhaLU3JfCoffj5GR X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB9642.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366004)(396003)(39860400002)(376002)(136003)(346002)(230922051799003)(1800799012)(64100799003)(186009)(451199024)(38100700002)(2906002)(5660300002)(7416002)(36756003)(38350700005)(4326008)(6506007)(6512007)(6486002)(86362001)(52116002)(478600001)(83380400001)(2616005)(1076003)(6666004)(26005)(8676002)(8936002)(66946007)(316002)(66556008)(66476007)(41300700001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: EGjOQb9I9Plh+BMy1rSIku3lPHRj8RG25vBf0k/bNkTp6bLpigjnzaVixUo2pebEIjtF/tQK+Em8YZDRatSbr1b7zJLE4YLeZUM97yjZrtt+E5MEUN2WhhpQaABhri/KUZ3DAB56aIplM+PkDDZysDkQ3nr61K+2tABVr+dB0nxJ1HhYwlgB4uQd+IjlnMsk7RKmCn9rW+EhHGrUbnlO0V0QCRD2X6KNCqi1T/EtFSUqitgZLbNct8Bib/enpE6ueIjaYC9ngW8wSZqbuyJBe1qkcIWCxu4T3Y5/9yIZjK1XoSogU4qw3NC5EaGVd0ZeLYIBEf+vV4gqTAzsqJ4ycHR7yq0mOnn3w1mJaWGFXWOuCP2IvEbxe0DMl13gdkA/RI4LKml1K1NNowy8cE7b8XCuZPBVUWoow0HspvGL5eyz4olYEprig4r6r4vhLB+Sl9KbIOSe/x5BbH5kfiOVYLZMXXbV9qkLBTpFBtIYKqC2H0gSUZyFDjI5vZlYPKb+Ar5S/TQRMWclh8hddvYZdorbWYcIbVoqR5/uRXvOpGCFWDZLLGds2RlATGEYDpxmz6JE/c4VyzAgaOMLo7Br18SE0DjyA8eVe70EralZbL9sMh6SA1uyiAoyQq70wfBOtaGT6xYlr2CZr2veG14OxYrHQ8FSDyho79cp+ItFSytWcMTwI9k8fT4y44r2E1hGQlwwYkLfVQuYwwpZ3F9Jh8L8lm7zxooNbvOQzbdX8LCTkRCtuvPZTslp+Hf60hO/ZObjNA2euLulXYw7gFSTzmSEVgMg6CSBlx/cj23txwSVVIlP0TGaTaN/QwpHiGZ3J8a4vFnUH+3QqUbShKRygkc3pKQ5Pa5BfV4ATLjkJRhDzLQL+D+Tp1Hw9XWCSAcbrnDS+OsnhdNGqwz8PQw/Gr5OexWDCsUPj6AhIqDYMJ9AWrGM1KIgapo7YeIadhMLzOw6MWlmpVR6BriUb+8y0WsNHuEOg6Qhd2lX9w8k/Ii+KG3gSiXaFH1q+mOluGixCkWaC+lnRZ8FYkzJm55Z9IAoPA5H5Tc7q0Lu+Ee+Twyf32XNuS4ZkzwDaW5UX0omdO8RBFyMiyNySJTv1SmKuMFMLw6zXKzSNvKVH+Wrl4oCU25zw8rR07PmWL9HwICN1+loa7bBcZkC5yCJJ/qez0fZ5Vp14jWWE993lrUzXDC0D8FXKIlYkx4Jom8EKdL/ihxdzA28ZZ4LJxbo4p7wHH1dhJiT6glq4kPG7nb5/xrofVPOvek7joNBmm/Cr9gotMPQDpaTQzx2sRCEBxKxyA8Yy6pdr2tHnLGW4R8/Rf/mbd5zPvyDARozXYQ1/UPEGLUqFs1MMBRcJfDRUwIjjT1bZVHQN4FfwBqCfeGfylTSm5cWW3keeU19LMBlr14cGwzB4ckhW8xuvMz5w5xyaQpVFlLhCUdewDNLw+yBcNKeN2IWIvu7aIOGtT1Hr+/p+DoneJ3uZI3+5c1JVAy1V3lHNENwuB2ZrDl9JdmgUG44tWJ0W1FyE6d/Bor2nO99R2VLHTOnhJPt1JRnLWJF8q+G35KXMt2cHcjKXi7p+TQ5C1VsZhnXLNMU4G52vG15 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d2029f49-8c83-42b1-2c52-08dc1c3514f7 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 17:02:29.2343 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Zvgsgm/Zq5iyvx+lrydW8JRERcAYHh5HuC4xbVcwvrH3KpyiaYYGAFgZe1Fqd4RY6SSeBCUf8sd0JqXQ7f5FUg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6992 Add function dwc3_set_bus_req_info() to allow dts overwrite bus request info in GSBUSCFG0. Some platform (such as Layerscape) require correct setting for dma-coherent. But default value is wrong in chips. Signed-off-by: Frank Li --- drivers/usb/dwc3/core.c | 33 +++++++++++++++++++++++++++++++++ drivers/usb/dwc3/core.h | 4 ++++ 2 files changed, 37 insertions(+) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 3b68e8e45b8b9..c72929b122014 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -948,6 +948,37 @@ static void dwc3_core_setup_global_control(struct dwc3 *dwc) static int dwc3_core_get_phy(struct dwc3 *dwc); static int dwc3_core_ulpi_init(struct dwc3 *dwc); +static void dwc3_set_bus_req_info(struct dwc3 *dwc) +{ + struct device *dev = dwc->dev; + u32 cfg; + u8 val; + + cfg = dwc3_readl(dwc->regs, DWC3_GSBUSCFG0); + + if (!device_property_read_u8(dev, "snps,des-wr-reqinfo", &val)) { + cfg &= ~DWC3_GSBUSCFG0_DESWRREQINFO_MASK; + cfg |= FIELD_PREP(DWC3_GSBUSCFG0_DESWRREQINFO_MASK, val); + } + + if (!device_property_read_u8(dev, "snps,des-rd-reqinfo", &val)) { + cfg &= ~DWC3_GSBUSCFG0_DESRDREQINFO_MASK; + cfg |= FIELD_PREP(DWC3_GSBUSCFG0_DESRDREQINFO_MASK, val); + } + + if (!device_property_read_u8(dev, "snps,dat-wr-reqinfo", &val)) { + cfg &= ~DWC3_GSBUSCFG0_DATWRREQINFO_MASK; + cfg |= FIELD_PREP(DWC3_GSBUSCFG0_DATWRREQINFO_MASK, val); + } + + if (!device_property_read_u8(dev, "snps,dat-rd-reqinfo", &val)) { + cfg &= ~DWC3_GSBUSCFG0_DATRDREQINFO_MASK; + cfg |= FIELD_PREP(DWC3_GSBUSCFG0_DATRDREQINFO_MASK, val); + } + + dwc3_writel(dwc->regs, DWC3_GSBUSCFG0, cfg); +} + /* set global incr burst type configuration registers */ static void dwc3_set_incr_burst_type(struct dwc3 *dwc) { @@ -1256,6 +1287,8 @@ static int dwc3_core_init(struct dwc3 *dwc) dwc3_set_incr_burst_type(dwc); + dwc3_set_bus_req_info(dwc); + ret = dwc3_phy_power_on(dwc); if (ret) goto err_exit_phy; diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index df544ec730d22..cf64cfc0f208a 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -186,6 +186,10 @@ #define DWC3_GSBUSCFG0_INCR4BRSTENA (1 << 1) /* INCR4 burst */ #define DWC3_GSBUSCFG0_INCRBRSTENA (1 << 0) /* undefined length enable */ #define DWC3_GSBUSCFG0_INCRBRST_MASK 0xff +#define DWC3_GSBUSCFG0_DESWRREQINFO_MASK GENMASK(19, 16) +#define DWC3_GSBUSCFG0_DATWRREQINFO_MASK GENMASK(23, 20) +#define DWC3_GSBUSCFG0_DESRDREQINFO_MASK GENMASK(27, 24) +#define DWC3_GSBUSCFG0_DATRDREQINFO_MASK GENMASK(31, 28) /* Global Debug LSP MUX Select */ #define DWC3_GDBGLSPMUX_ENDBC BIT(15) /* Host only */