Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp24871pxb; Wed, 30 Mar 2022 21:52:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWRZLBkqMg+HXujqwnhbAHyP2XMsbUNDwlEdTtqKYXGVjkG94qWOe/YP08jZs38CKUrTEP X-Received: by 2002:a17:90b:1642:b0:1c7:2497:3807 with SMTP id il2-20020a17090b164200b001c724973807mr4036459pjb.176.1648702344516; Wed, 30 Mar 2022 21:52:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648702344; cv=none; d=google.com; s=arc-20160816; b=EZY8JWTIy10hZsGWQNR6hworNWehgb9evBCjiE/CerkGfB8HASTPojJ+VCDLaVI8MJ m3HLSpM4AAO9gsjv1k5xkLRVi1B5NMUVysFBc85DV/ppiLWI3CIFpUD0b1CO+vUwwCzr 0EtJ0nMdh1xFe/hU3mtItfw+u0Kp2Op0NcZScxsWYxTl9DwzSN/bujKGGNQLjeELNnEQ g3CnmnaJ9Cw3fEsAEb0yqCmE4ZCaSD8QqUSHbM0XdK/kWDMkh20mpsPlGqQTp2o779yT Dvy2I4fyR5LlEGhMWC0dPOW76oSMOCfNCfcAojn/seiesd0WzZC1Yc0KNzPj9kiiRYI3 JSXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Ph+DJmySTVnCueq7y0elmi8YWqWsk1ZHnb9P8HZcO0s=; b=C5womce7aTzIinmvh1Nw/dDG2ddVWsd/6gdqK04shKyuw1sT9zDqq8mP3Tnt0FY+03 GMXe/n3eOwF3rmbFNm+Ljtst0pb9RaYDL0vXAijMF4SCtiJadegD1gE3RKtH/SCnGVoz x2FOFI7odZ2StqJsvg7Nrbyo1QllGtD7DRUKwx10Gs29j9VhwhfkKsWcIpXv1+25XmPF rLGf7d5LoYyv5w9YTaheBR5xELr6pfeoSr/rGWyWZW9DR4FgegAzIzRDQt3wN10iEla3 SMAWBoLsujJCMvLphT+2Tsdiho+ISNKOEpsnLAOO/KxPKq1+ygiNVlJQW28NdbRqiAnQ pRJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=VOAsdyv3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id y10-20020a056a00190a00b004fa3a8dffc0si25109785pfi.119.2022.03.30.21.52.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 21:52:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=VOAsdyv3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 23327CEC; Wed, 30 Mar 2022 20:31:57 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343675AbiC3Lgf (ORCPT + 99 others); Wed, 30 Mar 2022 07:36:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235330AbiC3Lge (ORCPT ); Wed, 30 Mar 2022 07:36:34 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C55EE1DB3FB; Wed, 30 Mar 2022 04:34:48 -0700 (PDT) Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id C84172223B; Wed, 30 Mar 2022 13:34:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1648640086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Ph+DJmySTVnCueq7y0elmi8YWqWsk1ZHnb9P8HZcO0s=; b=VOAsdyv3D/mIs0Y3TMWCQDse9A+nwd9W/DIiDoqBbah6UNFoslTueYRFCANVRjf4htRrP1 T1c83hgKkM2IkbGlD7KiRhDSJzwUkPR+bMg+pSrUZhtAc0PAw1K86RJZjfuqNMfyWFRH8/ 2NmPH+5zXkGcJaBRAk+li0u2lOJh+sw= From: Michael Walle To: Shawn Guo , Li Yang , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Walle Subject: [PATCH] arm64: dts: ls1028a: default to OTG mode for USB Date: Wed, 30 Mar 2022 13:34:42 +0200 Message-Id: <20220330113442.3402940-1-michael@walle.cc> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At the moment, the dtsi will force the dr_mode to host. This is problematic because it will always turn on the Vbus voltage regardless if the port is host or device. This might lead to a "shortcut" between the two USB endpoints because both might have their Vbus supplies enabled. Therefore, the default should be "otg" for any ports which aren't host only (from a SoC point of view) and have a user of the dtsi file overwrite that explicitly. Move the 'dr_mode = "host";' into the board dts. Now that the dtsi doesn't set the dr_mode anymore, we can also drop the 'dr_mode = "otg";' in the board dts because that is the default value if dr_mode is not set. Signed-off-by: Michael Walle --- arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28.dts | 1 + arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts | 2 ++ arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts | 2 +- arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 2 -- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28.dts index fef1bb585dce..68d11a9c67f3 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28.dts @@ -341,5 +341,6 @@ &usb0 { }; &usb1 { + dr_mode = "host"; status = "okay"; }; diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts index 19d3952dbffe..5baf060acf93 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts @@ -382,9 +382,11 @@ &sata { }; &usb0 { + dr_mode = "host"; status = "okay"; }; &usb1 { + dr_mode = "host"; status = "okay"; }; diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts index 68c31cb8eead..e0cd1516d05b 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts @@ -299,10 +299,10 @@ &sata { }; &usb0 { + dr_mode = "host"; status = "okay"; }; &usb1 { - dr_mode = "otg"; status = "okay"; }; diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi index 088271d49139..92465f777603 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi @@ -599,7 +599,6 @@ usb0: usb@3100000 { compatible = "fsl,ls1028a-dwc3", "snps,dwc3"; reg = <0x0 0x3100000 0x0 0x10000>; interrupts = ; - dr_mode = "host"; snps,dis_rxdet_inp3_quirk; snps,quirk-frame-length-adjustment = <0x20>; snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; @@ -610,7 +609,6 @@ usb1: usb@3110000 { compatible = "fsl,ls1028a-dwc3", "snps,dwc3"; reg = <0x0 0x3110000 0x0 0x10000>; interrupts = ; - dr_mode = "host"; snps,dis_rxdet_inp3_quirk; snps,quirk-frame-length-adjustment = <0x20>; snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>; -- 2.30.2