Message ID | 20240206114745.1388491-4-quic_kriskura@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-54835-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1490872dyb; Tue, 6 Feb 2024 04:08:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IH0tJTlC+ykQUVtq+wDJC9PqQf4un+eT+5oobH6QECB2ub9Q4PuxkciBJN/1nU/S+kGHtVh X-Received: by 2002:a05:6a20:a28e:b0:19c:6877:9943 with SMTP id a14-20020a056a20a28e00b0019c68779943mr977672pzl.41.1707221324149; Tue, 06 Feb 2024 04:08:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707221324; cv=pass; d=google.com; s=arc-20160816; b=joC6nvmZTxDrMPOadGsgq7KqLMO4vuGV6v/GB+cSZyVrTrLZiSDX9fuL5L5Nqwyn46 H47lCRBBHql4F8C0gY/QLDsRHak1+tY8LQW+XaYvtMYFDG2pwOlPVA9cGuentmUUKpBv NyKmuZGzshkPxyKy1jAt0HVgZ0do1b/sZZ9M/hrdYXJIBPchkH9u6AGaNHElvVVcWYWb cttrVokZR5+9o56RRpx6ZrSTQ5CHyXQNVXZyL3iaUYlbCTHgnY7z9oKgPv3/k5ntly7/ 2g1MBKvdfdmBL1z5EnW7QDA/ykQKafOjlKMyPPLkBkbRV9rlxwoLpBivbbJ66i/02mdf zOhA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Cwas9GDCQhLs6GetbOYqxVtVesjr2/z+ggxAwZyD9BM=; fh=ZhSozsPslnr/5eNCCde0mbS5kUMYbGYAxsPAs4pgmjI=; b=aD34HwXoiTey7/tpDZHaO70MoFkjxsAXoA0aXGByD0XnEfN3GITPPwR94osBr3OS+q SsR2QodfV6lGACA35mnsxARHRTSLIVy/vldEoCdVuN3XDlEy6oDFCNwx4se4Qe8XF0pq U86pAPOCV3IFV2Chgi0+Dj+qauPgqduFgHpMmaLfXk/60EFlirG9HCy16tQcEtqPMqAH 33lMS/nCYAzpDFww7Rgi9CBE9hAjSmo4pWzW302JGXspU1v83XjAcK0KdHPFYBGpOjJq yBhDjLiGuz5Nt9WrjeiSuGCkdwxRPAlTzY/BnPp5kdAaJOSkeFldWviDaK4XDiAySt+d BtFA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=dHBWgFQs; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-54835-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54835-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com X-Forwarded-Encrypted: i=1; AJvYcCU8eBNnOf0OkPxL/LhZhlqBcqgcjnnDyjDBcSeF4mhAPyGvj1JbNNIRzG4l8ok/smID48kyIQeTFXX57BBViVF4jukFEw== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id x28-20020aa79a5c000000b006de204fa505si1511699pfj.384.2024.02.06.04.08.43 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 04:08:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54835-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=dHBWgFQs; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-54835-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54835-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 7F398B24F70 for <ouuuleilei@gmail.com>; Tue, 6 Feb 2024 12:04:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B7F05135415; Tue, 6 Feb 2024 11:48:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="dHBWgFQs" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 C14011350DD; Tue, 6 Feb 2024 11:48:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707220103; cv=none; b=Wk8y7fvBxpb/pD5RbzBuA9/amtdf92ch9DZk5NgWMdahb/8qcEzxT27uC2XpdrbdU6T90vkeoQ4Me2Nu4/Z8dGD93EKsFfl36HYQcrjVu+MiT1DM5TxBS8vwq9UKxCZ6MKkQjYvQfWjUyKkCFK+ZaHBq5pinwIs/kUMEldhcSbM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707220103; c=relaxed/simple; bh=mo1peyyhYxwfTesx8Zr64R9MnjTL6PGDJ7Iqv8jM3CU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=YsxSjZuq7r+cUCmNTUM6F/Pn+RaM43qGJUvw6jGOE+Fig5Cksuxn6dBy7q8bpT4IikRmCLGwrlVp5Wyo6ymEp6I72mYdDaGARWOcJbpuiQCvT1WXkYnlZ3LWphKfmfj3clhYCp9MANFlpQjdv3VTvdMpKQ9GyBEyONu6NPsTHec= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=dHBWgFQs; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4169ikWC011210; Tue, 6 Feb 2024 11:48:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= qcppdkim1; bh=Cwas9GDCQhLs6GetbOYqxVtVesjr2/z+ggxAwZyD9BM=; b=dH BWgFQszbhvs46yHrdZ7pkTv7WGtFgTKW30yaiE9PJCx9m+piajTQY5bC0omxwSbE 730n8xMYcEdLgvUis6EU/crJdI1mYryTA1T5oufVKVDmir/yOqHmZ27orkwHrWhH qMngpzWQ0qZynNOB4qaxXZ/Mm4Zx9Of6qFOkhdJnz/ZSD7wHOlypcVCvbNkTqC5D j7lRkNsFk5THE+OCUffgpPp2WNbpLZc5QkK/rA/xhn0jGdbCDiYsuZwSDTnoc7WG /cnUD+bt2PBVBy7IHQmEdp57bBj7DuK3wtoa+ASpYFjD57IThDWjJ53hXS45juRf GA0TIGn+1TbYddFX4JwQ== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3w3e7g0sau-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Feb 2024 11:48:15 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 416BmEOC022471 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 6 Feb 2024 11:48:14 GMT Received: from hu-kriskura-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Tue, 6 Feb 2024 03:48:10 -0800 From: Krishna Kurapati <quic_kriskura@quicinc.com> To: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Rob Herring <robh+dt@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Conor Dooley <conor+dt@kernel.org> CC: <linux-kernel@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>, <devicetree@vger.kernel.org>, <quic_ppratap@quicinc.com>, <quic_jackp@quicinc.com>, Andrew Halaney <ahalaney@redhat.com>, "Krishna Kurapati" <quic_kriskura@quicinc.com> Subject: [PATCH 3/3] arm64: dts: qcom: sa8540-ride: Enable first port of tertiary usb controller Date: Tue, 6 Feb 2024 17:17:45 +0530 Message-ID: <20240206114745.1388491-4-quic_kriskura@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240206114745.1388491-1-quic_kriskura@quicinc.com> References: <20240206114745.1388491-1-quic_kriskura@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 8s9CMTG--YGThm0e0lDKyxhvJLYFXkKj X-Proofpoint-ORIG-GUID: 8s9CMTG--YGThm0e0lDKyxhvJLYFXkKj X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-06_05,2024-01-31_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 adultscore=0 mlxscore=0 mlxlogscore=747 lowpriorityscore=0 bulkscore=0 spamscore=0 clxscore=1015 priorityscore=1501 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401310000 definitions=main-2402060083 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790151306883689073 X-GMAIL-MSGID: 1790151306883689073 |
Series |
Add DT support for Multiport controller on SC8280XP
|
|
Commit Message
Krishna Kurapati
Feb. 6, 2024, 11:47 a.m. UTC
From: Andrew Halaney <ahalaney@redhat.com> There is now support for the multiport USB controller this uses so enable it. The board only has a single port hooked up (despite it being wired up to the multiport IP on the SoC). There's also a USB 2.0 mux hooked up, which by default on boot is selected to mux properly. Grab the gpio controlling that and ensure it stays in the right position so USB 2.0 continues to be routed from the external port to the SoC. Signed-off-by: Andrew Halaney <ahalaney@redhat.com> Co-developed-by: Krishna Kurapati <quic_kriskura@quicinc.com> Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com> --- arch/arm64/boot/dts/qcom/sa8540p-ride.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
Comments
On 06/02/2024 12:47, Krishna Kurapati wrote: > From: Andrew Halaney <ahalaney@redhat.com> > > There is now support for the multiport USB controller this uses so > enable it. > > The board only has a single port hooked up (despite it being wired up to > the multiport IP on the SoC). There's also a USB 2.0 mux hooked up, > which by default on boot is selected to mux properly. Grab the gpio > controlling that and ensure it stays in the right position so USB 2.0 > continues to be routed from the external port to the SoC. > > Signed-off-by: Andrew Halaney <ahalaney@redhat.com> > Co-developed-by: Krishna Kurapati <quic_kriskura@quicinc.com> > Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com> > --- > arch/arm64/boot/dts/qcom/sa8540p-ride.dts | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > index b04f72ec097c..eed1ddc29bc1 100644 > --- a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > +++ b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > @@ -503,6 +503,18 @@ &usb_2_qmpphy0 { > status = "okay"; > }; > > +&usb_2 { > + pinctrl-0 = <&usb2_en>; > + pinctrl-names = "default"; > + > + status = "okay"; > +}; > + > +&usb_2_dwc3 { > + phy-names = "usb2-port0", "usb3-port0"; > + phys = <&usb_2_hsphy0>, <&usb_2_qmpphy0>; > +}; > + > &xo_board_clk { > clock-frequency = <38400000>; > }; > @@ -655,4 +667,13 @@ wake-pins { > bias-pull-up; > }; > }; > + > + usb2_en: usb2-en-state { > + /* TS3USB221A USB2.0 mux select */ > + pins = "gpio24"; > + function = "gpio"; > + drive-strength = <2>; > + bias-disable; > + output-low; > + }; > }; Isn't gpio-hog the preferred way to describe that ? Neil
On Tue, 6 Feb 2024 at 15:28, <neil.armstrong@linaro.org> wrote: > > On 06/02/2024 12:47, Krishna Kurapati wrote: > > From: Andrew Halaney <ahalaney@redhat.com> > > > > There is now support for the multiport USB controller this uses so > > enable it. > > > > The board only has a single port hooked up (despite it being wired up to > > the multiport IP on the SoC). There's also a USB 2.0 mux hooked up, > > which by default on boot is selected to mux properly. Grab the gpio > > controlling that and ensure it stays in the right position so USB 2.0 > > continues to be routed from the external port to the SoC. What is connected to the other port of the MUX? > > > > Signed-off-by: Andrew Halaney <ahalaney@redhat.com> > > Co-developed-by: Krishna Kurapati <quic_kriskura@quicinc.com> > > Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com> > > --- > > arch/arm64/boot/dts/qcom/sa8540p-ride.dts | 21 +++++++++++++++++++++ > > 1 file changed, 21 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > > index b04f72ec097c..eed1ddc29bc1 100644 > > --- a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > > +++ b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > > @@ -503,6 +503,18 @@ &usb_2_qmpphy0 { > > status = "okay"; > > }; > > > > +&usb_2 { > > + pinctrl-0 = <&usb2_en>; > > + pinctrl-names = "default"; > > + > > + status = "okay"; > > +}; > > + > > +&usb_2_dwc3 { > > + phy-names = "usb2-port0", "usb3-port0"; > > + phys = <&usb_2_hsphy0>, <&usb_2_qmpphy0>; > > +}; > > + > > &xo_board_clk { > > clock-frequency = <38400000>; > > }; > > @@ -655,4 +667,13 @@ wake-pins { > > bias-pull-up; > > }; > > }; > > + > > + usb2_en: usb2-en-state { > > + /* TS3USB221A USB2.0 mux select */ > > + pins = "gpio24"; > > + function = "gpio"; > > + drive-strength = <2>; > > + bias-disable; > > + output-low; > > + }; > > }; > > Isn't gpio-hog the preferred way to describe that ? That depends. As this pinctrl describes board configuration, I'd agree with Neil.
On Tue, Feb 06, 2024 at 03:30:32PM +0200, Dmitry Baryshkov wrote: > On Tue, 6 Feb 2024 at 15:28, <neil.armstrong@linaro.org> wrote: > > > > On 06/02/2024 12:47, Krishna Kurapati wrote: > > > From: Andrew Halaney <ahalaney@redhat.com> > > > > > > There is now support for the multiport USB controller this uses so > > > enable it. > > > > > > The board only has a single port hooked up (despite it being wired up to > > > the multiport IP on the SoC). There's also a USB 2.0 mux hooked up, > > > which by default on boot is selected to mux properly. Grab the gpio > > > controlling that and ensure it stays in the right position so USB 2.0 > > > continues to be routed from the external port to the SoC. > > What is connected to the other port of the MUX? /me blows off the dust on the schematic It's a 1:2 mux, and one option is the out the board, the other is a test point I believe if I'm reading things right, although its not labeled so I'm not sure anyone would actually find it on the board. > > > > > > > Signed-off-by: Andrew Halaney <ahalaney@redhat.com> > > > Co-developed-by: Krishna Kurapati <quic_kriskura@quicinc.com> > > > Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com> > > > --- > > > arch/arm64/boot/dts/qcom/sa8540p-ride.dts | 21 +++++++++++++++++++++ > > > 1 file changed, 21 insertions(+) > > > > > > diff --git a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > > > index b04f72ec097c..eed1ddc29bc1 100644 > > > --- a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > > > +++ b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > > > @@ -503,6 +503,18 @@ &usb_2_qmpphy0 { > > > status = "okay"; > > > }; > > > > > > +&usb_2 { > > > + pinctrl-0 = <&usb2_en>; > > > + pinctrl-names = "default"; > > > + > > > + status = "okay"; > > > +}; > > > + > > > +&usb_2_dwc3 { > > > + phy-names = "usb2-port0", "usb3-port0"; > > > + phys = <&usb_2_hsphy0>, <&usb_2_qmpphy0>; > > > +}; > > > + > > > &xo_board_clk { > > > clock-frequency = <38400000>; > > > }; > > > @@ -655,4 +667,13 @@ wake-pins { > > > bias-pull-up; > > > }; > > > }; > > > + > > > + usb2_en: usb2-en-state { > > > + /* TS3USB221A USB2.0 mux select */ > > > + pins = "gpio24"; > > > + function = "gpio"; > > > + drive-strength = <2>; > > > + bias-disable; > > > + output-low; > > > + }; > > > }; > > > > Isn't gpio-hog the preferred way to describe that ? > > That depends. As this pinctrl describes board configuration, I'd agree > with Neil. I unfortunately don't have the experience with gpio-hog to weigh in here, but wouldn't be opposed to Krishna switching it if that's what's recommended for this type of thing. > > > -- > With best wishes > Dmitry >
On Wed, 7 Feb 2024 at 02:10, Andrew Halaney <ahalaney@redhat.com> wrote: > > On Tue, Feb 06, 2024 at 03:30:32PM +0200, Dmitry Baryshkov wrote: > > On Tue, 6 Feb 2024 at 15:28, <neil.armstrong@linaro.org> wrote: > > > > > > On 06/02/2024 12:47, Krishna Kurapati wrote: > > > > From: Andrew Halaney <ahalaney@redhat.com> > > > > > > > > There is now support for the multiport USB controller this uses so > > > > enable it. > > > > > > > > The board only has a single port hooked up (despite it being wired up to > > > > the multiport IP on the SoC). There's also a USB 2.0 mux hooked up, > > > > which by default on boot is selected to mux properly. Grab the gpio > > > > controlling that and ensure it stays in the right position so USB 2.0 > > > > continues to be routed from the external port to the SoC. > > > > What is connected to the other port of the MUX? > > /me blows off the dust on the schematic > > It's a 1:2 mux, and one option is the out the board, the other > is a test point I believe if I'm reading things right, although its not > labeled so I'm not sure anyone would actually find it on the board. Ack, this definitely looks like a static configuration. > > > > > > > > > > > Signed-off-by: Andrew Halaney <ahalaney@redhat.com> > > > > Co-developed-by: Krishna Kurapati <quic_kriskura@quicinc.com> > > > > Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com> > > > > --- > > > > arch/arm64/boot/dts/qcom/sa8540p-ride.dts | 21 +++++++++++++++++++++ > > > > 1 file changed, 21 insertions(+) > > > > > > > > diff --git a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > > > > index b04f72ec097c..eed1ddc29bc1 100644 > > > > --- a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > > > > +++ b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > > > > @@ -503,6 +503,18 @@ &usb_2_qmpphy0 { > > > > status = "okay"; > > > > }; > > > > > > > > +&usb_2 { > > > > + pinctrl-0 = <&usb2_en>; > > > > + pinctrl-names = "default"; > > > > + > > > > + status = "okay"; > > > > +}; > > > > + > > > > +&usb_2_dwc3 { > > > > + phy-names = "usb2-port0", "usb3-port0"; > > > > + phys = <&usb_2_hsphy0>, <&usb_2_qmpphy0>; > > > > +}; > > > > + > > > > &xo_board_clk { > > > > clock-frequency = <38400000>; > > > > }; > > > > @@ -655,4 +667,13 @@ wake-pins { > > > > bias-pull-up; > > > > }; > > > > }; > > > > + > > > > + usb2_en: usb2-en-state { > > > > + /* TS3USB221A USB2.0 mux select */ > > > > + pins = "gpio24"; > > > > + function = "gpio"; > > > > + drive-strength = <2>; > > > > + bias-disable; > > > > + output-low; > > > > + }; > > > > }; > > > > > > Isn't gpio-hog the preferred way to describe that ? > > > > That depends. As this pinctrl describes board configuration, I'd agree > > with Neil. > > I unfortunately don't have the experience with gpio-hog to weigh in > here, but wouldn't be opposed to Krishna switching it if that's what's > recommended for this type of thing. Quoting gpio.txt: The GPIO chip may contain GPIO hog definitions. GPIO hogging is a mechanism providing automatic GPIO request and configuration as part of the gpio-controller's driver probe function. See sdm845-pinctrl.yaml for an example of the gpio-hog node. > > > > > > > -- > > With best wishes > > Dmitry > > >
On Wed, Feb 07, 2024 at 03:32:03AM +0200, Dmitry Baryshkov wrote: > On Wed, 7 Feb 2024 at 02:10, Andrew Halaney <ahalaney@redhat.com> wrote: > > > > On Tue, Feb 06, 2024 at 03:30:32PM +0200, Dmitry Baryshkov wrote: > > > On Tue, 6 Feb 2024 at 15:28, <neil.armstrong@linaro.org> wrote: > > > > > > > > On 06/02/2024 12:47, Krishna Kurapati wrote: > > > > > From: Andrew Halaney <ahalaney@redhat.com> > > > > > > > > > > There is now support for the multiport USB controller this uses so > > > > > enable it. > > > > > > > > > > The board only has a single port hooked up (despite it being wired up to > > > > > the multiport IP on the SoC). There's also a USB 2.0 mux hooked up, > > > > > which by default on boot is selected to mux properly. Grab the gpio > > > > > controlling that and ensure it stays in the right position so USB 2.0 > > > > > continues to be routed from the external port to the SoC. > > > > > > What is connected to the other port of the MUX? > > > > /me blows off the dust on the schematic > > > > It's a 1:2 mux, and one option is the out the board, the other > > is a test point I believe if I'm reading things right, although its not > > labeled so I'm not sure anyone would actually find it on the board. > > Ack, this definitely looks like a static configuration. Krishna, when you make v2 can you update the wording about the USB 2.0 mux? Maybe something like "which by default on boot is selected to mux to the external port on the board (with the other option being a test point)." instead of the wording I originally had? That way the information Dmitry requested here is easily accessible in the future. > > > > > > > > > > > > > > > > Signed-off-by: Andrew Halaney <ahalaney@redhat.com> > > > > > Co-developed-by: Krishna Kurapati <quic_kriskura@quicinc.com> > > > > > Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com> > > > > > --- > > > > > arch/arm64/boot/dts/qcom/sa8540p-ride.dts | 21 +++++++++++++++++++++ > > > > > 1 file changed, 21 insertions(+) > > > > > > > > > > diff --git a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > > > > > index b04f72ec097c..eed1ddc29bc1 100644 > > > > > --- a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > > > > > +++ b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > > > > > @@ -503,6 +503,18 @@ &usb_2_qmpphy0 { > > > > > status = "okay"; > > > > > }; > > > > > > > > > > +&usb_2 { > > > > > + pinctrl-0 = <&usb2_en>; > > > > > + pinctrl-names = "default"; > > > > > + > > > > > + status = "okay"; > > > > > +}; > > > > > + > > > > > +&usb_2_dwc3 { > > > > > + phy-names = "usb2-port0", "usb3-port0"; > > > > > + phys = <&usb_2_hsphy0>, <&usb_2_qmpphy0>; > > > > > +}; > > > > > + > > > > > &xo_board_clk { > > > > > clock-frequency = <38400000>; > > > > > }; > > > > > @@ -655,4 +667,13 @@ wake-pins { > > > > > bias-pull-up; > > > > > }; > > > > > }; > > > > > + > > > > > + usb2_en: usb2-en-state { > > > > > + /* TS3USB221A USB2.0 mux select */ > > > > > + pins = "gpio24"; > > > > > + function = "gpio"; > > > > > + drive-strength = <2>; > > > > > + bias-disable; > > > > > + output-low; > > > > > + }; > > > > > }; > > > > > > > > Isn't gpio-hog the preferred way to describe that ? > > > > > > That depends. As this pinctrl describes board configuration, I'd agree > > > with Neil. > > > > I unfortunately don't have the experience with gpio-hog to weigh in > > here, but wouldn't be opposed to Krishna switching it if that's what's > > recommended for this type of thing. > > Quoting gpio.txt: > > The GPIO chip may contain GPIO hog definitions. GPIO hogging is a mechanism > providing automatic GPIO request and configuration as part of the > gpio-controller's driver probe function. > > See sdm845-pinctrl.yaml for an example of the gpio-hog node. Thanks, that seems like the way to go. Krishna please take note of this for v2! > > > > > > > > > > > > -- > > > With best wishes > > > Dmitry > > > > > > > > -- > With best wishes > Dmitry >
> Krishna, when you make v2 can you update the wording about the USB 2.0 > mux? Maybe something like "which by default on boot is selected to mux > to the external port on the board (with the other option being a test > point)." instead of the wording I originally had? That way the > information Dmitry requested here is easily accessible in the future. > >> >>> [...] >>>>>> }; >>>>> >>>>> Isn't gpio-hog the preferred way to describe that ? >>>> >>>> That depends. As this pinctrl describes board configuration, I'd agree >>>> with Neil. >>> >>> I unfortunately don't have the experience with gpio-hog to weigh in >>> here, but wouldn't be opposed to Krishna switching it if that's what's >>> recommended for this type of thing. >> >> Quoting gpio.txt: >> >> The GPIO chip may contain GPIO hog definitions. GPIO hogging is a mechanism >> providing automatic GPIO request and configuration as part of the >> gpio-controller's driver probe function. >> >> See sdm845-pinctrl.yaml for an example of the gpio-hog node. > > Thanks, that seems like the way to go. Krishna please take note of this > for v2! > Hi Andrew, Can you help test the following patch. It is just an add-on to your original one. I don't have a SA8540P Ride at the moment and getting one might take time. Incase you can confirm this patch is working. I can push v2 of this series. diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,sc8280xp-tlmm.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,sc8280xp-tlmm.yaml index ed344deaf8b9..aa42ac5a3197 100644 --- a/Documentation/devicetree/bindings/pinctrl/qcom,sc8280xp-tlmm.yaml +++ b/Documentation/devicetree/bindings/pinctrl/qcom,sc8280xp-tlmm.yaml @@ -36,6 +36,10 @@ patternProperties: $ref: "#/$defs/qcom-sc8280xp-tlmm-state" additionalProperties: false + "-hog(-[0-9]+)?$": + required: + - gpio-hog + $defs: qcom-sc8280xp-tlmm-state: type: object diff --git a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts index b04f72ec097c..aa0cec0b4cc2 100644 --- a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts +++ b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts @@ -503,6 +503,18 @@ &usb_2_qmpphy0 { status = "okay"; }; +&usb_2 { + pinctrl-0 = <&usb2_en_state>; + pinctrl-names = "default"; + + status = "okay"; +}; + +&usb_2_dwc3 { + phy-names = "usb2-port0", "usb3-port0"; + phys = <&usb_2_hsphy0>, <&usb_2_qmpphy0>; +}; + &xo_board_clk { clock-frequency = <38400000>; }; @@ -655,4 +667,19 @@ wake-pins { bias-pull-up; }; }; + + usb2-en-hog { + gpio-hog; + gpios = <24 GPIO_ACTIVE_LOW>; + output-low; + }; + + usb2_en_state: usb2-en-state { + /* TS3USB221A USB2.0 mux select */ + pins = "gpio24"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + output-low; + }; Regards, Krishna,
On Sat, 10 Feb 2024 at 12:44, Krishna Kurapati PSSNV <quic_kriskura@quicinc.com> wrote: > > > Krishna, when you make v2 can you update the wording about the USB 2.0 > > mux? Maybe something like "which by default on boot is selected to mux > > to the external port on the board (with the other option being a test > > point)." instead of the wording I originally had? That way the > > information Dmitry requested here is easily accessible in the future. > > > >> > >>> > > [...] > > >>>>>> }; > >>>>> > >>>>> Isn't gpio-hog the preferred way to describe that ? > >>>> > >>>> That depends. As this pinctrl describes board configuration, I'd agree > >>>> with Neil. > >>> > >>> I unfortunately don't have the experience with gpio-hog to weigh in > >>> here, but wouldn't be opposed to Krishna switching it if that's what's > >>> recommended for this type of thing. > >> > >> Quoting gpio.txt: > >> > >> The GPIO chip may contain GPIO hog definitions. GPIO hogging is a mechanism > >> providing automatic GPIO request and configuration as part of the > >> gpio-controller's driver probe function. > >> > >> See sdm845-pinctrl.yaml for an example of the gpio-hog node. > > > > Thanks, that seems like the way to go. Krishna please take note of this > > for v2! > > > > Hi Andrew, > > Can you help test the following patch. It is just an add-on to your > original one. I don't have a SA8540P Ride at the moment and getting one > might take time. Incase you can confirm this patch is working. I can > push v2 of this series. > > > diff --git > a/Documentation/devicetree/bindings/pinctrl/qcom,sc8280xp-tlmm.yaml > b/Documentation/devicetree/bindings/pinctrl/qcom,sc8280xp-tlmm.yaml > index ed344deaf8b9..aa42ac5a3197 100644 > --- a/Documentation/devicetree/bindings/pinctrl/qcom,sc8280xp-tlmm.yaml > +++ b/Documentation/devicetree/bindings/pinctrl/qcom,sc8280xp-tlmm.yaml > @@ -36,6 +36,10 @@ patternProperties: > $ref: "#/$defs/qcom-sc8280xp-tlmm-state" > additionalProperties: false > > + "-hog(-[0-9]+)?$": > + required: > + - gpio-hog > + > $defs: > qcom-sc8280xp-tlmm-state: > type: object > diff --git a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > index b04f72ec097c..aa0cec0b4cc2 100644 > --- a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > +++ b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > @@ -503,6 +503,18 @@ &usb_2_qmpphy0 { > status = "okay"; > }; > > +&usb_2 { > + pinctrl-0 = <&usb2_en_state>; > + pinctrl-names = "default"; > + > + status = "okay"; > +}; > + > +&usb_2_dwc3 { > + phy-names = "usb2-port0", "usb3-port0"; > + phys = <&usb_2_hsphy0>, <&usb_2_qmpphy0>; > +}; > + > &xo_board_clk { > clock-frequency = <38400000>; > }; > @@ -655,4 +667,19 @@ wake-pins { > bias-pull-up; > }; > }; > + > + usb2-en-hog { > + gpio-hog; > + gpios = <24 GPIO_ACTIVE_LOW>; > + output-low; > + }; > + > + usb2_en_state: usb2-en-state { If you are using gpio-hog, you don't need this state. The pinctrl / gpio core will use the hog instead. > + /* TS3USB221A USB2.0 mux select */ > + pins = "gpio24"; > + function = "gpio"; > + drive-strength = <2>; > + bias-disable; > + output-low; > + }; > > > Regards, > Krishna,
On Sat, Feb 10, 2024 at 04:13:51PM +0530, Krishna Kurapati PSSNV wrote: > > Krishna, when you make v2 can you update the wording about the USB 2.0 > > mux? Maybe something like "which by default on boot is selected to mux > > to the external port on the board (with the other option being a test > > point)." instead of the wording I originally had? That way the > > information Dmitry requested here is easily accessible in the future. > > > > > > > > > > > [...] > > > > > > > > }; > > > > > > > > > > > > Isn't gpio-hog the preferred way to describe that ? > > > > > > > > > > That depends. As this pinctrl describes board configuration, I'd agree > > > > > with Neil. > > > > > > > > I unfortunately don't have the experience with gpio-hog to weigh in > > > > here, but wouldn't be opposed to Krishna switching it if that's what's > > > > recommended for this type of thing. > > > > > > Quoting gpio.txt: > > > > > > The GPIO chip may contain GPIO hog definitions. GPIO hogging is a mechanism > > > providing automatic GPIO request and configuration as part of the > > > gpio-controller's driver probe function. > > > > > > See sdm845-pinctrl.yaml for an example of the gpio-hog node. > > > > Thanks, that seems like the way to go. Krishna please take note of this > > for v2! > > > > Hi Andrew, > > Can you help test the following patch. It is just an add-on to your > original one. I don't have a SA8540P Ride at the moment and getting one > might take time. Incase you can confirm this patch is working. I can push v2 > of this series. I just realized that unfortunately I no longer have access to a sa8540p-ride, and I'm not sure if I'll regain access. So I would not be opposed to dropping this patch altogether and someone dealing with sa8540p-ride when they can test it :/ Sorry, Andrew > > > diff --git > a/Documentation/devicetree/bindings/pinctrl/qcom,sc8280xp-tlmm.yaml > b/Documentation/devicetree/bindings/pinctrl/qcom,sc8280xp-tlmm.yaml > index ed344deaf8b9..aa42ac5a3197 100644 > --- a/Documentation/devicetree/bindings/pinctrl/qcom,sc8280xp-tlmm.yaml > +++ b/Documentation/devicetree/bindings/pinctrl/qcom,sc8280xp-tlmm.yaml > @@ -36,6 +36,10 @@ patternProperties: > $ref: "#/$defs/qcom-sc8280xp-tlmm-state" > additionalProperties: false > > + "-hog(-[0-9]+)?$": > + required: > + - gpio-hog > + > $defs: > qcom-sc8280xp-tlmm-state: > type: object > diff --git a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > index b04f72ec097c..aa0cec0b4cc2 100644 > --- a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > +++ b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts > @@ -503,6 +503,18 @@ &usb_2_qmpphy0 { > status = "okay"; > }; > > +&usb_2 { > + pinctrl-0 = <&usb2_en_state>; > + pinctrl-names = "default"; > + > + status = "okay"; > +}; > + > +&usb_2_dwc3 { > + phy-names = "usb2-port0", "usb3-port0"; > + phys = <&usb_2_hsphy0>, <&usb_2_qmpphy0>; > +}; > + > &xo_board_clk { > clock-frequency = <38400000>; > }; > @@ -655,4 +667,19 @@ wake-pins { > bias-pull-up; > }; > }; > + > + usb2-en-hog { > + gpio-hog; > + gpios = <24 GPIO_ACTIVE_LOW>; > + output-low; > + }; > + > + usb2_en_state: usb2-en-state { > + /* TS3USB221A USB2.0 mux select */ > + pins = "gpio24"; > + function = "gpio"; > + drive-strength = <2>; > + bias-disable; > + output-low; > + }; > > > Regards, > Krishna, >
On 2/13/2024 12:47 AM, Andrew Halaney wrote: >> >> Hi Andrew, >> >> Can you help test the following patch. It is just an add-on to your >> original one. I don't have a SA8540P Ride at the moment and getting one >> might take time. Incase you can confirm this patch is working. I can push v2 >> of this series. > > I just realized that unfortunately I no longer have access to a > sa8540p-ride, and I'm not sure if I'll regain access. > > So I would not be opposed to dropping this patch altogether and someone > dealing with sa8540p-ride when they can test it :/ > Hi Andrew, It would take time for me to get my hands on one of them. I can take up this patch once I get access to hw. In the meantime I can push the first two and get this series with. Regards, Krishna,
diff --git a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts index b04f72ec097c..eed1ddc29bc1 100644 --- a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts +++ b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts @@ -503,6 +503,18 @@ &usb_2_qmpphy0 { status = "okay"; }; +&usb_2 { + pinctrl-0 = <&usb2_en>; + pinctrl-names = "default"; + + status = "okay"; +}; + +&usb_2_dwc3 { + phy-names = "usb2-port0", "usb3-port0"; + phys = <&usb_2_hsphy0>, <&usb_2_qmpphy0>; +}; + &xo_board_clk { clock-frequency = <38400000>; }; @@ -655,4 +667,13 @@ wake-pins { bias-pull-up; }; }; + + usb2_en: usb2-en-state { + /* TS3USB221A USB2.0 mux select */ + pins = "gpio24"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + output-low; + }; };