From patchwork Wed Feb 21 23:19:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 775280 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 D56B13B2B6; Wed, 21 Feb 2024 23:19:26 +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=1708557568; cv=none; b=dRFSoQf22ohuHl2VX1D9Szt//NurpJcO71aaGgJ/Too3Lm8PMjziWWXMDIxdQAZetfGhVKZaMrPFFLfQsGSlSmep4b+A+f5gVCPZcJ+KUzplffg5A1WeH5XVyw4WovFARiiRNNf6J1KbFmKU54OtmnQhh/7I97WavPVxt88ev7w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708557568; c=relaxed/simple; bh=jFVnUQDGDiwZHsd8qnGF9m4i8GwDQv+12K/5p4xdozs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=lBS3/6K5BXWZ1RSkrK+zAuakpkgka8C2nMgBsmRH7zlZs/HlzhdZ3w90ROcGgu52/9C23frb/p46Am8mFiXjUzVnqteh5PJN31MqJJUko+1fAqLzOSUL8U6CMHxHacXXXJUMYey9gLcm1Sp0aF/5hshq0z63GEKbvgnwmyfDdMU= 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=E4izZVFh; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="E4izZVFh" 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 41LJKGob012434; Wed, 21 Feb 2024 23:19:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:date:subject:mime-version:content-type :content-transfer-encoding:message-id:references:in-reply-to:to :cc; s=qcppdkim1; bh=AsnLIr8iyvoWi/SAEE30XrVqBQSBhBflVgnCniYLN+w =; b=E4izZVFhXYb3ndhnqoQ5eB5ta0dOdzBh56SQ30sTN4vf1Ui0v/Mty2wNZwv 9MQxSV63a3gcqzdcgA5Z3ZmzcQ/Y0U+XP1/kydV7kt8HnB6F/nSGjIP/Drehpf1t IRICKtM2rthPLbwRTe3N+iE1t8O2ymRgBJVpnZfWIeF5kPdFn+smnf32aTdLT8E8 WtUArMxV837k551TRiebukxe0uxN9Avk9PCB+7QJ+Ee2wb2KzuLAzsBILK5sCTU0 vmiTpcvh33lagdeVpzL8g/n2FsOKGdavD/Pj85LsRSJYKtV3E3O+qKAxqrMnQJDi PsuMQdASqa7BBTnac4YsZUPqWwQ== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wdpjn8hcw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Feb 2024 23:19:16 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41LNJFXw028462 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Feb 2024 23:19:15 GMT Received: from [169.254.0.1] (10.49.16.6) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 21 Feb 2024 15:19:15 -0800 From: Bjorn Andersson Date: Wed, 21 Feb 2024 15:19:14 -0800 Subject: [PATCH 6/9] arm64: dts: qcom: qcs6490-rb3gen2: Enable USB role switching Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <20240221-rb3gen2-dp-connector-v1-6-dc0964ef7d96@quicinc.com> References: <20240221-rb3gen2-dp-connector-v1-0-dc0964ef7d96@quicinc.com> In-Reply-To: <20240221-rb3gen2-dp-connector-v1-0-dc0964ef7d96@quicinc.com> To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter , , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: , , , , , Bjorn Andersson X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708557553; l=1847; i=quic_bjorande@quicinc.com; s=20230915; h=from:subject:message-id; bh=jFVnUQDGDiwZHsd8qnGF9m4i8GwDQv+12K/5p4xdozs=; b=L40shD0be2d1s//zwx8G4lUYqbZXpDEtZjSl4CMbjnLZ3HXaOCTtGNr3lHMKY9Y1W4HNFCHON mJfsYk8SJK1CGD7b3MDkn1408DE6b3XZvpzbDE+4SzxclpODHVuK3Sm X-Developer-Key: i=quic_bjorande@quicinc.com; a=ed25519; pk=VkhObtljigy9k0ZUIE1Mvr0Y+E1dgBEH9WoLQnUtbIM= X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: xQTB72I01Lw_2Ygww6wg-xQygk22DqFn X-Proofpoint-GUID: xQTB72I01Lw_2Ygww6wg-xQygk22DqFn 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-21_09,2024-02-21_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 suspectscore=0 spamscore=0 priorityscore=1501 impostorscore=0 lowpriorityscore=0 clxscore=1015 bulkscore=0 mlxlogscore=947 malwarescore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402210184 With the ADSP remoteproc loaded pmic_glink can be introduced and wired up to provide role and orientation switching signals. Signed-off-by: Bjorn Andersson --- arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 48 +++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts index ab498494caea..079bf43b14cc 100644 --- a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts +++ b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts @@ -121,6 +121,41 @@ debug_vm_mem: debug-vm@d0600000 { }; }; + pmic-glink { + compatible = "qcom,qcm6490-pmic-glink", "qcom,pmic-glink"; + + #address-cells = <1>; + #size-cells = <0>; + + connector@0 { + compatible = "usb-c-connector"; + reg = <0>; + power-role = "dual"; + data-role = "dual"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + pmic_glink_hs_in: endpoint { + remote-endpoint = <&usb_1_dwc3_hs>; + }; + }; + + port@1 { + reg = <1>; + + pmic_glink_ss_in: endpoint { + remote-endpoint = <&usb_1_dwc3_ss>; + }; + }; + }; + }; + }; + vph_pwr: vph-pwr-regulator { compatible = "regulator-fixed"; regulator-name = "vph_pwr"; @@ -476,7 +511,16 @@ &usb_1 { }; &usb_1_dwc3 { - dr_mode = "peripheral"; + dr_mode = "otg"; + usb-role-switch; +}; + +&usb_1_dwc3_hs { + remote-endpoint = <&pmic_glink_hs_in>; +}; + +&usb_1_dwc3_ss { + remote-endpoint = <&pmic_glink_ss_in>; }; &usb_1_hsphy { @@ -491,6 +535,8 @@ &usb_1_qmpphy { vdda-phy-supply = <&vreg_l6b_1p2>; vdda-pll-supply = <&vreg_l1b_0p912>; + orientation-switch; + status = "okay"; };