From patchwork Fri Mar 11 12:09:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Neumann, Bastian" X-Patchwork-Id: 550905 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 6049BC433F5 for ; Fri, 11 Mar 2022 12:09:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239223AbiCKMKt (ORCPT ); Fri, 11 Mar 2022 07:10:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230104AbiCKMKs (ORCPT ); Fri, 11 Mar 2022 07:10:48 -0500 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2126.outbound.protection.outlook.com [40.107.93.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BE17CA71A for ; Fri, 11 Mar 2022 04:09:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QJ1hCegx07XG8C7B8eDzLVOA3+j8wzrnPfU7ikgyPmUnmHYTTt4VTU8rW/JVMeVcL/q6Ov6KGVbOB1NRFOHWq+JC+q5HvJw8lMQdci6r+IMnC0aJoDdd0t3jrDVCmi1gk30Fyq0uUj/OEp+u7mB6TUOrbfTaXyI2+Kj8ssocHtaWxKj8uYwJpMgXwQx9qGSz9Z1FxtgKF5Ci5T+rKzp8ktHfqxRfyoR6hd+mhwOqAzg74omwSCBd+d0a1SlWtb6CgUDkKoYGbNEusHV9M7pqXGOobAsVsgpYIBRdnetru9h1nprgkC/luXpqTDvQVAqstZDp0TOZ6NYT7lTxzmjH+A== 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=1+mDQHC6paS+wXN3/TyFE+RoPfTiGwyZLX2P3ZrWVd0=; b=PD02AB1jgO7QvtXSQHs29BnFHRQ25lDEFB8y75KguZ0xw4FQtcUbR0WjjNIlfv0OfEYvh2Psp0ktuoYjS81fRbJB+o4t5roCLbgvbYQCB8QXiV3PL5M4orqflIk3o1tgaNL8qFriYyTUu8XIAjYsVlaYiUP8KdM3pABaQvD/h0rrS3nf+7rZxqbakfKhuRhYkJ/00zta9peGdy+ArfOglHsw+QgkAugSTGTVeNSnE76xdm85q4bigX8RlruXkX93nXrkkEon6AbNzeCWYQ58cagF8n075+hrvvTsZPKmW7i8+Gf7C4BS6H7o8pj/J5LRTf1dzB3v/+PKXN1zGuIWLg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=dentsplysirona.com; dmarc=pass action=none header.from=dentsplysirona.com; dkim=pass header.d=dentsplysirona.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dentsplysirona.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1+mDQHC6paS+wXN3/TyFE+RoPfTiGwyZLX2P3ZrWVd0=; b=G+yPrFAHSrx9fjXLrfXMHWVQL/cDkZaccb0WMILdUkUbfVXu+h4PIf18D/Pj1orIYxRFL0lMrSS6tqg12YkqwFnOMC9npMeU/WfR/tLT8xXcDyybFdWTwSDJLDV7gi4Ra8m/BzlKKNazTD1WQK57tKf9D7MhTKZUBbC3bbrM1DA= Received: from PH0PR17MB4848.namprd17.prod.outlook.com (2603:10b6:510:8d::12) by DM6PR17MB3532.namprd17.prod.outlook.com (2603:10b6:5:1db::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5061.22; Fri, 11 Mar 2022 12:09:40 +0000 Received: from PH0PR17MB4848.namprd17.prod.outlook.com ([fe80::6860:7a7f:9314:1f3c]) by PH0PR17MB4848.namprd17.prod.outlook.com ([fe80::6860:7a7f:9314:1f3c%5]) with mapi id 15.20.5038.027; Fri, 11 Mar 2022 12:09:40 +0000 From: "Neumann, Bastian" To: "linux-usb@vger.kernel.org" CC: Richard Leitner Subject: [PATCH 1/2] usb: usb251xb: Set boost value for up- and downstream ports Thread-Topic: [PATCH 1/2] usb: usb251xb: Set boost value for up- and downstream ports Thread-Index: Adg1P3+d1mdMJerkSO6Pc5AovAZ8QA== Date: Fri, 11 Mar 2022 12:09:40 +0000 Message-ID: Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=dentsplysirona.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2702e2b9-5473-4a28-084c-08da03580548 x-ms-traffictypediagnostic: DM6PR17MB3532:EE_ x-microsoft-antispam-prvs: x-disclaimer: Applied x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: j6MKaua5vx3slPpHJoMYc+nNMXtT55BmJxOaaayJbMxO96skrOc1zS1sG8H5MyLt76r7Pdec6Qmf41JW89Vc3/Oe4+4Xkx8i9jKZELpPBUt6S0kkKnvV1u2flkFmCA1HV9bxiDD2KE/s1rXXsGe6ei+MT5eJDCdvnr2Bi09IjAVoeLTRqtgJdWdtIezij6H3YkgQ0BMJ9TiTO3AOy3MwTHKz4+otNU1Pfs2fW5+KyAzncyAoCudn1QMVZIFTNxqccA8+B7rRafS51Nt2FJ9puUTUCO+wmYRYZzVr8ovCFL55lXWFH+e3RB4qtUWv6WzxlT3ohfIwjfs0DVEEW8y8Rb1qPBqcBCBrCZ/c9PY2Zb/FhTOPUk1t7gEcrugHW5RMdcbIW4dgJ8N1ayD8PyvQ/QqVz+UJb7QafriDsA69uIwkY4LbOLZhHp0yB59kkc769696CRKiW/qv1YREXq2NVefMdjebXqJDdeWNBHD7P87CSCyPfDMfT5j5KJWy37+R9WCx77Fxk4/PSvlJW1bOpYtKMWKydNTd9aLfx6rGeRF6pJaYlxrUe/P/AWIPi7T41N+QDLEVzJ5xFsUAHLfgKzSKG+s/Zp9UjLXckLCDAK62DRYiQnfFtjsrRszqX6bqC5/l948QqFt69jVcIvqjgo2ALJz3F6hW8or8+l3TCjKxenbiVlo7hE8uRk4oIG+dJtvvKoQ0wDJkftq5DFs0tA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR17MB4848.namprd17.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(66946007)(508600001)(38070700005)(76116006)(71200400001)(66556008)(66476007)(66446008)(86362001)(8676002)(4326008)(6916009)(316002)(66574015)(64756008)(26005)(186003)(9686003)(6506007)(122000001)(38100700002)(7696005)(83380400001)(2906002)(33656002)(8936002)(55016003)(5660300002)(52536014); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?ES4kob2k2w767sCkpimRm1cqojyH?= =?utf-8?q?DMQrWqJx+n3V9/fcXvqbzyHyB+0JOYjMh+tffX0Vu45bMV1d7eguAGQCmZX+xjyGJ?= =?utf-8?q?rX1RpxEct6xThXLAZ7Prcm17+AGZpnqfbmO/3I53tsbD7X596F1BjNGFNM72jiwND?= =?utf-8?q?O0N5lNojYts9l5ESS+W2JIlljnAxecqx6UwzlXqQ0PTKCUXbJBKdN0dYRRe8vDlrN?= =?utf-8?q?J0Vu5OgrUmznNh7jfDvqamHTZvYymGH+K/uMU/h9vGQIm7btMFPhijzN0U2+XDQjC?= =?utf-8?q?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dHBOcCSOK/GhC+IrqvyiuuK+Tg6ul4QDBrbrtGdKt5hZzoEIATix2bayxDV?= =?utf-8?q?fMcfVVlI1ioVWqSCPsxj3tSLAcLz5irWQyoxfknr5hwB0kjTconQ/3xD9fojYCuhS?= =?utf-8?q?O0dqvMyyQzGwhTbVcSPsLONU+HJLqTPr+EsXxKQn/A/NDPz2e4nXTPzmQwcaXyqYE?= =?utf-8?q?OFfmnnA3PtzxU3FTnFM4jblI31LfjdwdCaH5TXVTq6HeMR8mnht4W6WXmJogEfKru?= =?utf-8?q?bXMiiar+eKnfqpXRK+Zdvb/ldw2b2uNL7LfodfoiefCDu7ntYor0Ivnr0=3D?= MIME-Version: 1.0 X-OriginatorOrg: dentsplysirona.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR17MB4848.namprd17.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2702e2b9-5473-4a28-084c-08da03580548 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Mar 2022 12:09:40.5552 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: bc74e59c-5fa3-4157-9c37-6e5063d11a62 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: sL90zVK5T1ZDjxHdKb1Oi9Ls7gGI8Xq6pFBfwAh5ghipcfvpqNOYE/A9F/A8507nXyK/3h5Z4FEWMK8Opp+FSWkY+arrTpABoXxoruD/Ff6r6Rm3thPs5IN0uSsLVqx5 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR17MB3532 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org This patch adds devicetree properties to enable signal boosting on USB ports. Signed-off-by: Bastian Neumann --- drivers/usb/misc/usb251xb.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) -- 2.30.2 ----------------------------------------------------------------------------------------------------------- Sirona Dental Systems GmbH Sitz der Gesellschaft / registered address: Fabrikstraße 31, 64625 Bensheim Registergericht / court of registry: Amtsgericht Darmstadt, HRB 24948 Geschäftsführer / Managing Director: Dr. Cord Stähler, Jan Siefert, Rainer Raschke Aufsichtsratsvorsitzender / Chairman of the Supervisory Board: Dr. Alexander Voelcker ----------------------------------------------------------------------------------------------------------- Diese E-Mail ist ausschliesslich fuer den angesprochenen Adressaten bestimmt und kann vertrauliche Informationen beinhalten. -- This e-mail is intended only for the designated recipient(s). It may contain confidential or proprietary information. ------------------------------------------------------------------------------------------------------------ diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c index 04c4e3fed094..625106343d12 100644 --- a/drivers/usb/misc/usb251xb.c +++ b/drivers/usb/misc/usb251xb.c @@ -575,6 +575,36 @@ static int usb251xb_get_ofdata(struct usb251xb *hub, (wchar_t *)hub->serial, USB251XB_STRING_BUFSIZE); + hub->boost_up = USB251XB_DEF_BOOST_UP; + if (!of_property_read_u32(np, "boost-up", + &property_u32)) + hub->boost_up |= (property_u32 << 0); + + hub->boost_14 = USB251XB_DEF_BOOST_14; + if (!of_property_read_u32(np, "boost-1", + &property_u32)) + hub->boost_14 |= (property_u32 << 0); + if (!of_property_read_u32(np, "boost-2", + &property_u32)) + hub->boost_14 |= (property_u32 << 2); + if (!of_property_read_u32(np, "boost-3", + &property_u32)) + hub->boost_14 |= (property_u32 << 4); + if (!of_property_read_u32(np, "boost-4", + &property_u32)) + hub->boost_14 |= (property_u32 << 6); + hub->boost_57 = USB251XB_DEF_BOOST_57; + if (!of_property_read_u32(np, "boost-5", + &property_u32)) + hub->boost_57 |= (property_u32 << 0); + if (!of_property_read_u32(np, "boost-6", + &property_u32)) + hub->boost_57 |= (property_u32 << 2); + if (!of_property_read_u32(np, "boost-7", + &property_u32)) + hub->boost_57 |= (property_u32 << 4); + + /* * The datasheet documents the register as 'Port Swap' but in real the * register controls the USB DP/DM signal swapping for each port. @@ -587,8 +617,6 @@ static int usb251xb_get_ofdata(struct usb251xb *hub, * may be as soon as needed. */ hub->bat_charge_en = USB251XB_DEF_BATTERY_CHARGING_ENABLE; - hub->boost_57 = USB251XB_DEF_BOOST_57; - hub->boost_14 = USB251XB_DEF_BOOST_14; hub->port_map12 = USB251XB_DEF_PORT_MAP_12; hub->port_map34 = USB251XB_DEF_PORT_MAP_34; hub->port_map56 = USB251XB_DEF_PORT_MAP_56;