From patchwork Mon Jun 24 12:23:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 13709421 Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F8CC13B58C for ; Mon, 24 Jun 2024 12:23:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719231830; cv=none; b=c6d+Vad9T1xT7AC53ZiBTXW8/Iz4l8a/7KOdClGtFPM7XMJee133EncKMKhOcOcICdsFqG6sRP58OX7KW4hOKwx9wN8mhEWCRANafTkRw7129tf5R2H49rO8FWJFrm9yjKE9aFJaJY/uSyAdOgLDb7XtyY2hCF+Uqn52bFPmIbo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719231830; c=relaxed/simple; bh=0JLcBlxBF1CQ5EouiC1Dz7k1uVMBWlZ5X6xh42cSKM4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fCbEN3KJhvGYl4f3AaOfN7Ijo2KbjsgBjJI3r+H01Y1GGtETQRuoh+JP2BcJ8TZYje27rAa2a4sUj19csNxbAnZY1Hagw6ZaCkE438sk8IPGp9XmthFpGmaisZAlMkvG820nh452imcYgeN1XvAs9GP6aArg2+NtGaW3BrCy3vE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=A+dboVAt; arc=none smtp.client-ip=209.85.208.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="A+dboVAt" Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-57cc1c00ba6so5142075a12.1 for ; Mon, 24 Jun 2024 05:23:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719231827; x=1719836627; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Odx0fLzh+4FMy3cnjjmB3Hy+zkRCziihVyVwsUQEb5w=; b=A+dboVAtG+42HQlYWI/SmnVNZwJ1gkm4dTfmsaTPpLonD+2p7XheJpfy4pzqf9YP56 P1B+3uERrRxdZCAUdvr+8QOPR2GSiVUY7Qy924Qw+dHEUJEodPzOazkcxbrLSzFtrn2y UtfkvzSoox9+Hawj8a+euu2d1RUKcPdhUMb78pczBVaPwob8hPpwY6ByOqRaBZqtuXf9 S1F/04gd5Sr4Idsey9ZUv7rB8a4HUryt7LBhXHU58qMC4cdLnVmdYUPiMEhVEktnEtaq 8ZWFtMXYa1Dpr8eW2naWaxuD/KsGn7T2EmGeNBdcAgGI1ysARvGwrgEkfzsL4eNEVsQh Zrlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719231827; x=1719836627; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Odx0fLzh+4FMy3cnjjmB3Hy+zkRCziihVyVwsUQEb5w=; b=VrDsUkpZu0Se+qiymzBMwSVeJqErF9/8F7m77kJZFcmuanErMnBXLeCu6fyE/AFGcE IdxjIuxcCIe/n1uyt+/DEPonylKWXonx19vrXLX9n3Lmw82UuTcJuUwbNHLFo+JbHyDe MLxtu/sN1Ki5HulfUTs5yy7Llt9oeTiLEvKPAJMWPHRecxdy6Vr9YpwNqBCt3J+wrxvY bVyPsa+rXRFgX/xGzPUMBdXBD7NVbTcokRqVY1Yqx/9FoePr4Tzs5oAqsZgJ1mLce+8g Qvf4hw+ry5nHHQoGD1bZRgFRoT7xqms1hvma2FF6kotXqlDFZl2FzDnQtQS5JT9dN0IE SkQQ== X-Gm-Message-State: AOJu0Yw5Dwgt0R0/UQlc3TnKGkMnfDCz+N8e/IGHpp93mLIVwLxPXCai Iyh4j19WolraJ6/urCSWr6FjwI5JJ995ZJKNEOZgutabQs48NyXjSTCwY6icuaA= X-Google-Smtp-Source: AGHT+IGxlFHDX1ADf1sDQI9KjtUXLyAsqamQKZLJTTUq7sQxeUmjX75UnGfM5wS3MaK8MLjowVWIew== X-Received: by 2002:a50:9b42:0:b0:57d:10d2:23ef with SMTP id 4fb4d7f45d1cf-57d4bdd96aamr2171763a12.42.1719231826709; Mon, 24 Jun 2024 05:23:46 -0700 (PDT) Received: from [192.168.0.113] ([2a02:8109:aa0d:be00::52af]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57d45496336sm2946824a12.22.2024.06.24.05.23.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 05:23:46 -0700 (PDT) From: Caleb Connolly Date: Mon, 24 Jun 2024 14:23:42 +0200 Subject: [PATCH 1/3] arm64: dts: qcom: sm8650: move usb-role-switch to sm8650.dtsi Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240624-b4-rb2-fixes-v1-1-8d763ee4e42e@linaro.org> References: <20240624-b4-rb2-fixes-v1-0-8d763ee4e42e@linaro.org> In-Reply-To: <20240624-b4-rb2-fixes-v1-0-8d763ee4e42e@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Dmitry Baryshkov Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Caleb Connolly X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=2264; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=0JLcBlxBF1CQ5EouiC1Dz7k1uVMBWlZ5X6xh42cSKM4=; b=owEBbQKS/ZANAwAIAQWDMSsZX2S2AcsmYgBmeWVQtP4Ui74DzyiwuAGnvGLYnpA/uUISm/YAt jIZHx3GjO6JAjMEAAEIAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZnllUAAKCRAFgzErGV9k tuoZD/9TJnnMm4mxFnjTTahkjMfFYZI/4q94ZJ+htE6JvKySoVFp/fODw5NV+Lecy+7UBAvSmVh b+zUKk3Bdb72AbLHmrTNEzPPROG3LqwuE+g4GW8PvA+8QELzTmp994LT+5HB/zmlNq8bpUGZw1D tbSmPk7JciMBzGxdDZxYElLXIRF1l5otwuCd0u4ysU5Gqwwa1Fs0lytzK+hYHP4RpW0CGuWTGzA ZhdQ+EFVyE/uIxdJvAgRPZ4TNo8WW9lefGojHgXI3KPXnpVooIBCcIaYAjqZWLOfX4MCtMfGrOC L5IRNgI9NBpg+Aj1twV4ogR6fRTUO7pKhkbDWzFK0mvdZp7/8dKCh6dMV23rgEMy6fkKNrXXS5F phy2evxNtTGyoPN3KomZWQwrdq69WDHTud4A91X4kd/9JwnaTp2L/+ZlQHsTr76r1xH3KtNbg5I cuk4lp8mwbUkxmJ1UJuvT3XHSJwjHfwqOyXrRvVs8ZOOVkRtCQaLNFkXnCzTEiPo76P4NDkX1yd wHcpr7XQtpcpDL7dcs/KWYChRRG7v5umLPcsctn5A9Gavn+R2JljmrQkNBZ6+DJ9cn7AWrgMtOE FPcefPjNLWBdPkHd/GOXige1TxAUxY3oeivvJEtbaZ7qDteSnsIA9bFZMXJDdj0qE0P4r8dOayi xZ32dbDDOWW7u9w== X-Developer-Key: i=caleb.connolly@linaro.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 All sm8650 boards have role switching capabilities, set it in the soc dtsi to deduplicate things. And drop the explicit dr_mode = "otg" since it's the default. Signed-off-by: Caleb Connolly Reviewed-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sm8650-hdk.dts | 5 ----- arch/arm64/boot/dts/qcom/sm8650-mtp.dts | 5 ----- arch/arm64/boot/dts/qcom/sm8650-qrd.dts | 5 ----- arch/arm64/boot/dts/qcom/sm8650.dtsi | 1 + 4 files changed, 1 insertion(+), 15 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8650-hdk.dts b/arch/arm64/boot/dts/qcom/sm8650-hdk.dts index eb2f910b4f58..092b78fd8a3b 100644 --- a/arch/arm64/boot/dts/qcom/sm8650-hdk.dts +++ b/arch/arm64/boot/dts/qcom/sm8650-hdk.dts @@ -1300,13 +1300,8 @@ &ufs_mem_phy { &usb_1 { status = "okay"; }; -&usb_1_dwc3 { - dr_mode = "otg"; - usb-role-switch; -}; - &usb_1_dwc3_hs { remote-endpoint = <&pmic_glink_hs_in>; }; diff --git a/arch/arm64/boot/dts/qcom/sm8650-mtp.dts b/arch/arm64/boot/dts/qcom/sm8650-mtp.dts index fa6c3b397f2d..d6f91580ba8d 100644 --- a/arch/arm64/boot/dts/qcom/sm8650-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sm8650-mtp.dts @@ -839,13 +839,8 @@ &ufs_mem_phy { &usb_1 { status = "okay"; }; -&usb_1_dwc3 { - dr_mode = "otg"; - usb-role-switch; -}; - &usb_1_dwc3_hs { remote-endpoint = <&pmic_glink_hs_in>; }; diff --git a/arch/arm64/boot/dts/qcom/sm8650-qrd.dts b/arch/arm64/boot/dts/qcom/sm8650-qrd.dts index 6e3c4d8dcc19..bd60c2770da2 100644 --- a/arch/arm64/boot/dts/qcom/sm8650-qrd.dts +++ b/arch/arm64/boot/dts/qcom/sm8650-qrd.dts @@ -1285,13 +1285,8 @@ &ufs_mem_phy { &usb_1 { status = "okay"; }; -&usb_1_dwc3 { - dr_mode = "otg"; - usb-role-switch; -}; - &usb_1_dwc3_hs { remote-endpoint = <&pmic_glink_hs_in>; }; diff --git a/arch/arm64/boot/dts/qcom/sm8650.dtsi b/arch/arm64/boot/dts/qcom/sm8650.dtsi index 8af151d924f9..8647ca314506 100644 --- a/arch/arm64/boot/dts/qcom/sm8650.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8650.dtsi @@ -3857,8 +3857,9 @@ usb_1_dwc3: usb@a600000 { snps,usb3_lpm_capable; snps,usb2-lpm-disable; snps,has-lpm-erratum; tx-fifo-resize; + usb-role-switch; dma-coherent; ports { From patchwork Mon Jun 24 12:23:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 13709422 Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AFF3B13BC25 for ; Mon, 24 Jun 2024 12:23:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719231831; cv=none; b=i7al87eJkuun6+ijYRmzujmbW7dwYVVDIT/5zQvPgDcLgayYiNpgkusSle+cDkOC4GjCHfBCmb25xbRUliFptbDKynXHHhPyQzxz4kT1yVYc63QokRB748tYIPF2O7Btz/+iNcBcaL865c8F3mgHwHZ31XhEUwhsXQqPqSgmgKg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719231831; c=relaxed/simple; bh=Q03S+m8RREtYznOYyYSMwUZft3i7SsFb0QK4NZsB+iE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QqgJVPDO6W275zmoS0wNz2+pFkLTaOyj4JtEw65BBd7tp94duTHBwX0yIJJGqbcI7YkUeT4/W7GAp0aJzkKyTc7QLsAkLJ6e0/Gu/Slgub44Z29B5KYGuxFlxSlOIRkEqa4A1MLq0uO4fIe57HAAoKCWsSmo7zXeHS+4IjY6hBY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=wJf4fspc; arc=none smtp.client-ip=209.85.208.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="wJf4fspc" Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2ec50d4e47bso27171241fa.2 for ; Mon, 24 Jun 2024 05:23:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719231828; x=1719836628; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=zCh+p1yiDwBiqYBJf5orPgY8K+j5IOBZYYgEaZUM/ww=; b=wJf4fspcpHR/7SNRAoEcfyvf72ELEQkeqsXUbm3BvpEYPDLhrgqGPBXhGjqEiI6OTW 4WTi1wrfmGC3T+9qBPWI2FZWBKcGN86C8GCxR2unHMER8oXY7WVee1CtlciAHSE9oNlK 8zQrnIzKQn4uvEQnorLdS8COV8wgV5vNFMn+jB9ngSqI5SNzlCj7YokEOXX/dQf7qUAn n2ug+q31BT+itcR8ITl36MFiuzTZxTFLrJ59DHBRaCaTtFrtJP24RV1OulDX1HK0MpxS wnnUyg9aMLNOx5MN4rETcXOM958zQenzn4pabdba6Pk4bllboB+P2Pz0KVCkMP3aoLEM Liag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719231828; x=1719836628; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zCh+p1yiDwBiqYBJf5orPgY8K+j5IOBZYYgEaZUM/ww=; b=Xtt0N1+kzgfzu8ScRVcReck0IwfSoAO6C9U+qC/Cs6l9UiawqAFp6RLCpKcqlE0QhY hBZ2EwNa2cc+EdSFr3BfUxiSqpJx93KefGjrVHe1LiveT7gYrs/NbxeREJI6YVS19D7z M7wKEuEHsAFHN2H96txU+xudTKUMnggEwAmBme8KDdhMwFB+5E/+coGIWW0wbTjAX2VU xdia2NwoPdmpDtf8alZZSj/pelFODyXVo51kw5jE90bp7oqicJbpfA/+4v0W8gPhMK68 Dl80Sp5nGltbccxhMUikE/QM1Yu5TyV0LN43S9gEq/u4YfP4LqU02rNi6Iwa8vAC3v+h Q0+w== X-Gm-Message-State: AOJu0Yz9G6Rq5lFMzM8qLM/xBE3aUZr3ybLSCEkabERmmlzJ9ZdOAkm3 RnS438p7x2OUXshKWd/l25mmW1t5RkqDnxhk2s6Xdhf22VFa6+zplyxiB8CGJvQ= X-Google-Smtp-Source: AGHT+IHrG2Sg+YPJRuZW4mgcoM4ro6znp/Zs2eSnC/pBThrvu1K2iEA59wvYd2ssrg8DmrNqDb6wKQ== X-Received: by 2002:a2e:6808:0:b0:2ec:588d:7ecc with SMTP id 38308e7fff4ca-2ec5b27a875mr27938121fa.12.1719231827755; Mon, 24 Jun 2024 05:23:47 -0700 (PDT) Received: from [192.168.0.113] ([2a02:8109:aa0d:be00::52af]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57d45496336sm2946824a12.22.2024.06.24.05.23.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 05:23:47 -0700 (PDT) From: Caleb Connolly Date: Mon, 24 Jun 2024 14:23:43 +0200 Subject: [PATCH 2/3] arm64: dts: qcom: sm8350: move usb-role-switch to sm8350.dtsi Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240624-b4-rb2-fixes-v1-2-8d763ee4e42e@linaro.org> References: <20240624-b4-rb2-fixes-v1-0-8d763ee4e42e@linaro.org> In-Reply-To: <20240624-b4-rb2-fixes-v1-0-8d763ee4e42e@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Dmitry Baryshkov Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Caleb Connolly X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1390; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=Q03S+m8RREtYznOYyYSMwUZft3i7SsFb0QK4NZsB+iE=; b=owEBbQKS/ZANAwAIAQWDMSsZX2S2AcsmYgBmeWVQjnq1mBovb8HvYoPh0vuVwKpVjlYkad2q2 7XiYgj/mdGJAjMEAAEIAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZnllUAAKCRAFgzErGV9k tuZpD/9p9oRi+Khry2hCP71AqHez5aVglyBE95sleeJpmijhWh2mCh5Knz6Jdx+PsLxliQrL/Lj T/rESTC6rHSvE+GG6SsEBpYi3vs+sje05P59PkwEnuVJs/yLVlK+dLGCf/CkFPlLayErx8a+fw9 I13j0y4qQRdpyqswB50/ZZWRjZJz7ZDQOV+JfbP2jwj9zkcKBI647jVpyylDtRcqENx1Z/HIkOj n4uerO6l7TC2WnLYg3FCw/YXCGNikn4oot4B8e9CCq4SNsHPOFjzFI9Sn+RfV6YA2mr7fFnH9Lo pILmCTuKnGUsGxwMZ/cfb/2JEr2vI0Rw0jZv+l0pUJgQmWXbHaU7SoSPAKvfi3PqlmV8ZnuMei7 A6FquGzLQXvNbzGJb+ak7OtzLcR3ELibxN4zpZkn/6f+5MRbfz/BFw0mC7p7e2DRgrybJgH/m7H oP28ID8kmaR3BohtPAoUpznmSL/RWlEVGUABoVv/MamlXHOLQZA0P8K7lUAeeMlCv+8VROJxjuG +WNd5U2ozYFcd32Dl6mBMtNJfQToJO48a2GOWMbjNBLh8HDFzluD2wAQQ8ouybdspMJ9gq+EzOK 3UsMNf01HdA3pVVJY1pNKA79vYfo/XduG+xVDZRwapj/WVfzvvHO5HR+LxEGE+Ycf2tc302nqKH egRNeuQF2bApiOA== X-Developer-Key: i=caleb.connolly@linaro.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 Since all boards with this soc are capable of role switching, move the usb-role-switch property to the soc dtsi and stop explicitly setting dr_mode to OTG since it's the default. Signed-off-by: Caleb Connolly Reviewed-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 5 ----- arch/arm64/boot/dts/qcom/sm8350.dtsi | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8350-hdk.dts b/arch/arm64/boot/dts/qcom/sm8350-hdk.dts index 895adce59e75..e031ad4c19f4 100644 --- a/arch/arm64/boot/dts/qcom/sm8350-hdk.dts +++ b/arch/arm64/boot/dts/qcom/sm8350-hdk.dts @@ -847,13 +847,8 @@ &ufs_mem_phy { &usb_1 { status = "okay"; }; -&usb_1_dwc3 { - dr_mode = "otg"; - usb-role-switch; -}; - &usb_1_dwc3_hs { remote-endpoint = <&pmic_glink_hs_in>; }; diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi index 38ee0850c335..f88c4d66164b 100644 --- a/arch/arm64/boot/dts/qcom/sm8350.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi @@ -2404,8 +2404,9 @@ usb_1_dwc3: usb@a600000 { snps,dis_u2_susphy_quirk; snps,dis_enblslpm_quirk; phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; phy-names = "usb2-phy", "usb3-phy"; + usb-role-switch; ports { #address-cells = <1>; #size-cells = <0>; From patchwork Mon Jun 24 12:23:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 13709423 Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6FF2613C67C for ; Mon, 24 Jun 2024 12:23:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719231832; cv=none; b=VAkBEg51kxhA+E9S6e06QQxznCtsAaVuVXGneMiVLjsggmmiuzq9gs0HnpIfAeVrXjt2co3nZYq9Cug/WYXcr3d5kNWf3mlkxedVujKFP9Y+ngg1eZHL54f32HEjdgCZMFjTf5nlKVXifnRdbTA2NTOzSMk7dUkg8d2EiiRHQF8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719231832; c=relaxed/simple; bh=3P8gYlNAClgbprmMg7XMB/2nB2eKKzV9UYXy4nreZKg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=dvXaGiIGOSjbFEerEGlFmNwMGew/u6n1XEM8ustHbKYfFDn9eb6n4PhjoqjASlLrJl028PO0tFDt5xvxTz17rq/qOoO3C8xWDt2TiatWPTS8N2lCJt+cYOtOonwWjsFPJHlCxWtwWTzI3fGoFEv/i2Jrmc8WCdHf4pEIpUaH1Vg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=IlgeV9F6; arc=none smtp.client-ip=209.85.208.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="IlgeV9F6" Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-57d10354955so4634230a12.1 for ; Mon, 24 Jun 2024 05:23:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719231829; x=1719836629; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=DrT6eNksAV7hwwmsFoCoNHV7DjcD+Yxh2uFSWLxZw+8=; b=IlgeV9F6NoeWTcnctEzXBL7iBuQj+KduHJ1O4wyKMIdThR+az+6jloFGUxR6ZE7jyJ 8sQxUZ21cwFK2yVM1kWk7wlVrttKroji8B75RHwj1qht2Nj4n47576pb2V9aJ/ioCnHv /3qVO9Lfkuq5RY8vRgBvkwWookfnJgQe88nnc0FYmOVUJf9PyX7wZ/P8FTMHnfMOMLSd qy9U6bx+wZ1u4MaOPn7nqelSDYkICnKyFYRab20HobM48HAKdow7/oT9S4HPmPeUf68s FeVqwO6iS6N1I6zYEr+X6rUZKtrJNJa2C4lf7aronaQ1akVBbRJrDj8YNIaUcO3RCliy tkhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719231829; x=1719836629; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DrT6eNksAV7hwwmsFoCoNHV7DjcD+Yxh2uFSWLxZw+8=; b=MhJ8TeC9w4poh5nWAm/DQH3n2+nHO3mEAAcen+PbeLOB1FJ9Y04s0SnGebyzYeEk2I h/3xrp2Lt0hW7wwjbV/gH6dWgEVctB/fHD1RcL1QQrEczEFUJlYLu2CFoMP+saoueCwe Z1w9pb0/TSlDFG62c7dO5K9FSkBKh1TRD9N6wd0OR88uGBHNdoDf+KTa3Fzi6OrNFkN8 qdqEqifwUvUdAbygMCBW+Cfmqx/F+S7FXVLDSrBDc+zt3YhMrY0qWBUolFsBzQtzte6t TS1umYj0GtA59vHpXb2lS1KHVX01aHaIcSNMHI/EOIz2FSLo4uogIxuid9A8sdcV7psY rpdQ== X-Gm-Message-State: AOJu0Yxqffzv02GQsgw9Z55C3sWa2zZACDfQc2oyGYlOqreTsIKCjUyE 7fm39sN/XmFQ+tNNmYhOSib9fcIs87nRnOccxDQaye7aIrluprDKzICltuyozhw= X-Google-Smtp-Source: AGHT+IFRF4+gGX2ujhcoBI8Qr9CNCSpMJffiq3hJzsagpkhMHxxDNntyqjtPdYKojyKWr4kFVBPeBA== X-Received: by 2002:a50:f688:0:b0:57c:5eeb:b543 with SMTP id 4fb4d7f45d1cf-57d49cb2c07mr2803452a12.13.1719231828719; Mon, 24 Jun 2024 05:23:48 -0700 (PDT) Received: from [192.168.0.113] ([2a02:8109:aa0d:be00::52af]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57d45496336sm2946824a12.22.2024.06.24.05.23.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 05:23:48 -0700 (PDT) From: Caleb Connolly Date: Mon, 24 Jun 2024 14:23:44 +0200 Subject: [PATCH 3/3] arm64: dts: qcom: prefer host mode on dev boards Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240624-b4-rb2-fixes-v1-3-8d763ee4e42e@linaro.org> References: <20240624-b4-rb2-fixes-v1-0-8d763ee4e42e@linaro.org> In-Reply-To: <20240624-b4-rb2-fixes-v1-0-8d763ee4e42e@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Dmitry Baryshkov Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Caleb Connolly X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=6259; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=3P8gYlNAClgbprmMg7XMB/2nB2eKKzV9UYXy4nreZKg=; b=owEBbQKS/ZANAwAIAQWDMSsZX2S2AcsmYgBmeWVQftNDCSt+WdedR4ZtNrBJJjByFVE+E75j8 bz5BT985WeJAjMEAAEIAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZnllUAAKCRAFgzErGV9k tja8D/9Irjg0w9L+A3Dz/lQpgtfcVxho1vQzGwqIg39LTN0jC/xySUdjLqtLiXmEvHvkZR3OcUY ULHr+7k7Zrndphm6wf8j/YftpqqdzOjjBHrW++Eli1YsTdo1XSRXZHdVfxWfz7WTgTQ7POGHrjX CuF/VquP9IcW26mwEgK8/xXS5+wE3RBXq16whYBVYk8hex/NSwu0XZ3o1SjMW1j5J0CLTcthPzD 8YpAKetHHcOyR9xtmHH7iIsMR1wqNTTtfJ2brn9ymvooXNqDownJglCs/n/1Af0x5TSBNkkTdUC 2TKGkfUg+3YGkY8phtJvZXAo3zwqHybXbaED/YOXl7EwL9mbDRnVQOSfMZuoyTLBMOSy+xifdUH /1Fd/jVMbJo0r9xak3Us7tcOKefuH6Kc69VuyR9+ncujf4cRWZ5RyIE3CtTwL5xFuOOS8mHOW6W 9SMlntLiipTJ8dEEpoAZ41sgBYB9z8eExbNjSErK1d+uDXZ0+apJv9TueNJZ3WoEH1GmsPfpbbH XVR+wphMa79ug9wXxmAoBt5hbLozSnGSKpnMFBvkPi1eTQLT7DRtgQexPFOUzbWK1gA/gAIbVAl 1lrB9rES4jIIp/eAlLvAVBsfYLgNr3lirMTj2ZatuCXQ1RzwmkGFcNvH6T5RDoebwE9I1syi8tW +xichjl99Ib5roA== X-Developer-Key: i=caleb.connolly@linaro.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 Generally, when given the choice these boards should prefer host mode since they're SBCs. When attached to a laptop (which is host-only) they should still fall back to peripheral mode. Suggested-by: Dmitry Baryshkov Signed-off-by: Caleb Connolly --- arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 1 + arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 4 ++++ arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 4 ++++ arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 1 + arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 4 ++++ arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 1 + arch/arm64/boot/dts/qcom/sm8550-hdk.dts | 4 ++++ arch/arm64/boot/dts/qcom/sm8550-mtp.dts | 4 ++++ arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 4 ++++ arch/arm64/boot/dts/qcom/sm8650-hdk.dts | 4 ++++ arch/arm64/boot/dts/qcom/sm8650-mtp.dts | 4 ++++ arch/arm64/boot/dts/qcom/sm8650-qrd.dts | 4 ++++ 12 files changed, 39 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts index c4cde4328e3d..bac4ed5874b6 100644 --- a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts +++ b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts @@ -657,8 +657,9 @@ &usb_1 { &usb_1_dwc3 { dr_mode = "otg"; usb-role-switch; + role-switch-default-mode = "host"; }; &usb_1_dwc3_hs { remote-endpoint = <&pmic_glink_hs_in>; diff --git a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts index e19790464a11..bece4896ca23 100644 --- a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts +++ b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts @@ -593,8 +593,12 @@ &uart4 { &usb { status = "okay"; }; +&usb_dwc3 { + role-switch-default-mode = "host"; +}; + &usb_dwc3_hs { remote-endpoint = <&pm4125_hs_in>; }; diff --git a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts index 1c7de7f2db79..17d36f0ef5ab 100644 --- a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts +++ b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts @@ -661,8 +661,12 @@ &uart4 { &usb { status = "okay"; }; +&usb_dwc3 { + role-switch-default-mode = "host"; +}; + &usb_dwc3_hs { remote-endpoint = <&pmi632_hs_in>; }; diff --git a/arch/arm64/boot/dts/qcom/sm8150-hdk.dts b/arch/arm64/boot/dts/qcom/sm8150-hdk.dts index bac08f00b303..fe548d795490 100644 --- a/arch/arm64/boot/dts/qcom/sm8150-hdk.dts +++ b/arch/arm64/boot/dts/qcom/sm8150-hdk.dts @@ -695,8 +695,9 @@ &usb_2 { &usb_1_dwc3 { dr_mode = "otg"; usb-role-switch; + role-switch-default-mode = "host"; }; &usb_1_dwc3_hs { remote-endpoint = <&pm8150b_hs_in>; diff --git a/arch/arm64/boot/dts/qcom/sm8350-hdk.dts b/arch/arm64/boot/dts/qcom/sm8350-hdk.dts index e031ad4c19f4..20d5c54cfcf9 100644 --- a/arch/arm64/boot/dts/qcom/sm8350-hdk.dts +++ b/arch/arm64/boot/dts/qcom/sm8350-hdk.dts @@ -847,8 +847,12 @@ &ufs_mem_phy { &usb_1 { status = "okay"; }; +&usb_1_dwc3 { + role-switch-default-mode = "host"; +}; + &usb_1_dwc3_hs { remote-endpoint = <&pmic_glink_hs_in>; }; diff --git a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts index a754b8fe9167..ebafcbe6859e 100644 --- a/arch/arm64/boot/dts/qcom/sm8450-hdk.dts +++ b/arch/arm64/boot/dts/qcom/sm8450-hdk.dts @@ -1098,8 +1098,9 @@ &usb_1 { &usb_1_dwc3 { dr_mode = "otg"; usb-role-switch; + role-switch-default-mode = "host"; }; &usb_1_dwc3_hs { remote-endpoint = <&pmic_glink_hs_in>; diff --git a/arch/arm64/boot/dts/qcom/sm8550-hdk.dts b/arch/arm64/boot/dts/qcom/sm8550-hdk.dts index e0dc03a97771..1efda478b7b9 100644 --- a/arch/arm64/boot/dts/qcom/sm8550-hdk.dts +++ b/arch/arm64/boot/dts/qcom/sm8550-hdk.dts @@ -1252,8 +1252,12 @@ &ufs_mem_phy { &usb_1 { status = "okay"; }; +&usb_1_dwc3 { + role-switch-default-mode = "host"; +}; + &usb_1_dwc3_hs { remote-endpoint = <&pmic_glink_hs_in>; }; diff --git a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts index 26dfca0c3e05..7b05932f9c36 100644 --- a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts @@ -945,8 +945,12 @@ &ufs_mem_phy { &usb_1 { status = "okay"; }; +&usb_1_dwc3 { + role-switch-default-mode = "host"; +}; + &usb_1_dwc3_hs { remote-endpoint = <&pmic_glink_hs_in>; }; diff --git a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts index 361b0792db4f..744bdc846e70 100644 --- a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts +++ b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts @@ -1211,8 +1211,12 @@ &ufs_mem_phy { &usb_1 { status = "okay"; }; +&usb_1_dwc3 { + role-switch-default-mode = "host"; +}; + &usb_1_dwc3_hs { remote-endpoint = <&pmic_glink_hs_in>; }; diff --git a/arch/arm64/boot/dts/qcom/sm8650-hdk.dts b/arch/arm64/boot/dts/qcom/sm8650-hdk.dts index 092b78fd8a3b..f07a56583e7d 100644 --- a/arch/arm64/boot/dts/qcom/sm8650-hdk.dts +++ b/arch/arm64/boot/dts/qcom/sm8650-hdk.dts @@ -1300,8 +1300,12 @@ &ufs_mem_phy { &usb_1 { status = "okay"; }; +&usb_1_dwc3 { + role-switch-default-mode = "host"; +}; + &usb_1_dwc3_hs { remote-endpoint = <&pmic_glink_hs_in>; }; diff --git a/arch/arm64/boot/dts/qcom/sm8650-mtp.dts b/arch/arm64/boot/dts/qcom/sm8650-mtp.dts index d6f91580ba8d..1a9a31423af4 100644 --- a/arch/arm64/boot/dts/qcom/sm8650-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sm8650-mtp.dts @@ -839,8 +839,12 @@ &ufs_mem_phy { &usb_1 { status = "okay"; }; +&usb_1_dwc3 { + role-switch-default-mode = "host"; +}; + &usb_1_dwc3_hs { remote-endpoint = <&pmic_glink_hs_in>; }; diff --git a/arch/arm64/boot/dts/qcom/sm8650-qrd.dts b/arch/arm64/boot/dts/qcom/sm8650-qrd.dts index bd60c2770da2..031b7ada8eb1 100644 --- a/arch/arm64/boot/dts/qcom/sm8650-qrd.dts +++ b/arch/arm64/boot/dts/qcom/sm8650-qrd.dts @@ -1285,8 +1285,12 @@ &ufs_mem_phy { &usb_1 { status = "okay"; }; +&usb_1_dwc3 { + role-switch-default-mode = "host"; +}; + &usb_1_dwc3_hs { remote-endpoint = <&pmic_glink_hs_in>; };