From patchwork Fri May 5 16:32:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Xiwen X-Patchwork-Id: 679614 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 A0C17C77B7C for ; Fri, 5 May 2023 16:33:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232944AbjEEQdK (ORCPT ); Fri, 5 May 2023 12:33:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232583AbjEEQdJ (ORCPT ); Fri, 5 May 2023 12:33:09 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01olkn2075.outbound.protection.outlook.com [40.92.52.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3B2614E60; Fri, 5 May 2023 09:33:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PhZVkgy2sajp3ToDjkIjFRcJpsGvObnxOcFzo57e3TmJxFSFd1Qz4nXTk/bv8qJTnOkdhbeG0JIPD3xxOsV63FVrgjBurwEfCj33h394sB0tTiUpdhnk3S/pE7cW/4HYIQuZdy11UoyYmp6cpUQ3YrVV642jy48rC7jmxCI9Db9NkBY26m0/J6T4fpuUsJZGDQ/ec8rh3i6MTFfkmrqpoSTXLjc1QGfmZXXIXBdsTXfiotwjsHbtsQkHiDyioGGx1NuVjxb9fAMqmzZpyubRhzFivxiJUp56h9sPx6ccAUi0wTc2Bs47iWaQi4BaadM5c3yeQ65MTbb04F7S7t9iBQ== 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=FmmJlFEHkMywz6UToheMMZe15STn7UpGGw4Hfy2dtEw=; b=DuZ1xr6VFamizh+m/VJkyvVp7U8fuaFWLUNJJutVIGgerSnWeoDjfVpxKS9y3dj8ay1OM0nW7dTqo6fjHkAaCEwhhXO/LA6fSLdAc4aZQ+UoWoSFeYcDJh0FGB03N6P7sMbAbkQFhPewVkDPhIODiNpBWTotvXGlc1jgmXKJRwHF7RELq34o//kv6+1+swuUdhNK+Z7gutVX8MyKmrCQL7Oo8r7OW/EJpbgMfCbC0EnmXGMt7al17xtcLVnDdTsE+zI3rxnZDo4XYaOUA7UiPhVO4UXSIJCYXfz7Uvj/d7AUgpCPOkdxSLYSmxcFkjZ+QhFuV1C4HzI4/vOajPxBhg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FmmJlFEHkMywz6UToheMMZe15STn7UpGGw4Hfy2dtEw=; b=M5g6urH4IgRf9CWTKWX+3HWRZQwxNqYR4FgnWipvDm8b9rCA2ebFvacMZfPQpkG63477Kmlv/2WUhD6Xn+qvP0RC3Lw4+8FkN7OvuujWg8ceQTjCPMrYlLjhsIlqfKhHktUZp8sNWxlFvu0SRsyVCc/KOGD1QGds1bPx/RlM2HC/rALG3dM3Dqb3ehM3y5cUC3GLEZPGvUJH7xAjjGe30xF5Ldh0T08yBtYOyG3ZnDZmbkOjDDbsLFOATqND3ed68fx5u6eJcrD3C8achx8cJBZ6Lsu/ji53ZQ/g7HavReG4GTT8VNraa9Bz+CreiV4PNrrxhFX/neNPkUYSpZz78g== Received: from TYZPR04MB6321.apcprd04.prod.outlook.com (2603:1096:400:28a::14) by TYZPR04MB6150.apcprd04.prod.outlook.com (2603:1096:400:25c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.21; Fri, 5 May 2023 16:33:00 +0000 Received: from TYZPR04MB6321.apcprd04.prod.outlook.com ([fe80::4705:d219:7cf0:46f4]) by TYZPR04MB6321.apcprd04.prod.outlook.com ([fe80::4705:d219:7cf0:46f4%3]) with mapi id 15.20.6363.027; Fri, 5 May 2023 16:33:00 +0000 Message-ID: Date: Sat, 6 May 2023 00:32:51 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US From: Yang Xiwen Subject: [PATCH] arm64: dts: qcom: msm8916-ufi: make UDC dual mode To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: Nikita Travkin , ~postmarketos/upstreaming@lists.sr.ht, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org X-TMN: [Mu4cyeDXvI424nx6WbXR1VAq42WJTvme1cxIQT9Mw3oq+agK60s5Y/HX5Fsha9NM] X-ClientProxiedBy: SJ0PR13CA0123.namprd13.prod.outlook.com (2603:10b6:a03:2c6::8) To TYZPR04MB6321.apcprd04.prod.outlook.com (2603:1096:400:28a::14) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR04MB6321:EE_|TYZPR04MB6150:EE_ X-MS-Office365-Filtering-Correlation-Id: 1e9e391f-ad4c-4022-f8af-08db4d8663d1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Qknd/WSK+nvp0PYn/fsDE4S3gAF8kPPrzzt0tS495i/y8zBEwtps/VHlF8rK8rcKScfB/h++/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exchange-CrossTenant-Network-Message-Id: 1e9e391f-ad4c-4022-f8af-08db4d8663d1 X-MS-Exchange-CrossTenant-AuthSource: TYZPR04MB6321.apcprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2023 16:33:00.2909 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR04MB6150 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org It's possible to use this device with a (non-standard) hub to get USB working in host mode, but dr_mode="peripheral" prevents the UDC to do so. Remove dr_mode="peripheral" and add usb-role-switch so that it defaults to otg mode and can be switched to host mode in userspace. Signed-off-by: Yang Xiwen --- arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi index 50bae6f214f1f..08ecd901c1af6 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi @@ -109,7 +109,7 @@ &sdhc_1 { &usb { extcon = <&pm8916_usbin>; - dr_mode = "peripheral"; + usb-role-switch; status = "okay"; };