From patchwork Mon Jun 12 22:14:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 106942 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp183155vqr; Mon, 12 Jun 2023 16:04:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6PmPOHhgqxabrp9E6y6fBWwkN6NCnKgHnEJS/HRL5Z+Nt+lgb+8lwsWzOOM1FlHz4Gorb8 X-Received: by 2002:a17:907:7fab:b0:978:9380:bc0b with SMTP id qk43-20020a1709077fab00b009789380bc0bmr12923301ejc.75.1686611072256; Mon, 12 Jun 2023 16:04:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686611072; cv=none; d=google.com; s=arc-20160816; b=bA2W+JNWKKCXpErSpztTwstXefTsn8/3A8BzTHG3P8NB2ocBy1pmdXpie1s22WoVBr ncfpkLj0y+kNNA0xHqdRQsFSKGpvvsMdxzrYxi7+r09BXnRSW/UHRaEjkqaUuK3UsyRI ZKegOTVc0jBTgrVp7+PMJMS1gzHFu0h3sRSnbNfnvVTNmbHdRIMXIOvSnD3GfVJHGfoC 8cH7XTrjRqPqpQKxM0F9kiK4ldq7y9CdnNHHxyNtJwnqYsMnVXy6YVyDH1WxtmWNiUE3 Wlhmi5xl/zDdKpT0TP2a9VQReZJDtOQCLP4w1KizXNVneLPvCYeI7QFkZphQYCR0QeFa oq9w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pWQlAePSun4cHdtgRWnOJ27ATGh4e0qJ2DgAMGNTqEc=; b=YthkA+54tojdT/kaRsm4qAyW8Im2dgGPtKNlSbSSypfypAHChJAIt/LMRgC5rqDzsO ORwKNpcmHV7OhlO5dmTJDhBNzvEhDYWEfN5liAgVWr+DkoXLL1jZo/o3UJUhv8+ArhA4 n3SnMlY3zBN+BGOlxsMEbxVaqfGofJQp3QR6PZ5tLCvdQEbP8Ywim+aBc/o53efNq15y IBCnOrITAtgC6997aUf3KbTOwDFYgkaM9G80oXr0atOJOis7o82Cv1+1/V5zK3gSKQ88 phg2SxXTwoTSqRRJpb6zx4bJjwyuhvTIEH/APXvhQe7CuNjV16t0YvkpSgSGK/dVXlVg vSDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Vv6nvSy7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j17-20020a17090686d100b00977cb42a33bsi2712591ejy.860.2023.06.12.16.04.07; Mon, 12 Jun 2023 16:04:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Vv6nvSy7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238845AbjFLWPR (ORCPT + 99 others); Mon, 12 Jun 2023 18:15:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235078AbjFLWPI (ORCPT ); Mon, 12 Jun 2023 18:15:08 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A49E310C6; Mon, 12 Jun 2023 15:15:07 -0700 (PDT) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35CLZcMV023342; Mon, 12 Jun 2023 22:15:03 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=pWQlAePSun4cHdtgRWnOJ27ATGh4e0qJ2DgAMGNTqEc=; b=Vv6nvSy7A/GA8Zg4FA85m2pNdy0hCfh6XVqfiCftIthG7p/lEr1xjFqB7S3cvrTAv6IW 8MvcO42OIxhubngSK+Qrcz/c5uCpL71hXJ04fD0oQEKA2760rFqVXDl1mzwv6Y/ZZ5fr qfWrpaDLHrTvdOA+4k4C7R3Oz224VQm1fo4n7woz3pTIXQIVw+K2LLdATuOWYRMC/W+m h3c8eM1/Po1L4FCLTBZ70GbWfesLl+cfUOoFBBEC7poL2Lox8Bbsg+5TMnxTkZ5QCWvP NRc2+gCbCN1muu8Rjb0a/UkUjggFL0cAnWOPjG5jZ1cZZEOQyacysLh6fWKAsG/0cFky eg== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3r690q095w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 12 Jun 2023 22:15:03 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 35CMF23V018481 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 12 Jun 2023 22:15:02 GMT Received: from hu-bjorande-lv.qualcomm.com (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.986.42; Mon, 12 Jun 2023 15:15:02 -0700 From: Bjorn Andersson To: Bjorn Andersson , Konrad Dybcio , Vinod Koul CC: Rob Herring , Krzysztof Kozlowski , Conor Dooley , , , Subject: [PATCH 1/3] arm64: dts: qcom: sc8180x: Add USB Type-C of_graph anchors Date: Mon, 12 Jun 2023 15:14:54 -0700 Message-ID: <20230612221456.1887533-2-quic_bjorande@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230612221456.1887533-1-quic_bjorande@quicinc.com> References: <20230612221456.1887533-1-quic_bjorande@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] 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: yizOnE78zHJdZw8dTEZQrnt9lyBQ9H-e X-Proofpoint-GUID: yizOnE78zHJdZw8dTEZQrnt9lyBQ9H-e X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-12_16,2023-06-12_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxlogscore=859 priorityscore=1501 spamscore=0 lowpriorityscore=0 suspectscore=0 clxscore=1015 bulkscore=0 adultscore=0 phishscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306120191 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768539891763152953?= X-GMAIL-MSGID: =?utf-8?q?1768539891763152953?= Define anchors for wiring up the USB Type-C graph in the board files. Signed-off-by: Bjorn Andersson Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sc8180x.dtsi | 48 +++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc8180x.dtsi b/arch/arm64/boot/dts/qcom/sc8180x.dtsi index a7668f9e68d6..4144beb70cb4 100644 --- a/arch/arm64/boot/dts/qcom/sc8180x.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8180x.dtsi @@ -2464,6 +2464,23 @@ usb_prim_qmpphy: phy@88e9000 { status = "disabled"; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + usb_prim_qmpphy_out: endpoint {}; + }; + + port@2 { + reg = <2>; + + usb_prim_qmpphy_dp_in: endpoint {}; + }; + }; + usb_prim_ssphy: usb3-phy@88e9200 { reg = <0 0x088e9200 0 0x200>, <0 0x088e9400 0 0x200>, @@ -2513,6 +2530,23 @@ usb_sec_qmpphy: phy@88ee000 { status = "disabled"; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + usb_sec_qmpphy_out: endpoint {}; + }; + + port@2 { + reg = <2>; + + usb_sec_qmpphy_dp_in: endpoint {}; + }; + }; + usb_sec_ssphy: usb3-phy@88e9200 { reg = <0 0x088ee200 0 0x200>, <0 0x088ee400 0 0x200>, @@ -2607,6 +2641,11 @@ usb_prim_dwc3: usb@a600000 { snps,dis_enblslpm_quirk; phys = <&usb_prim_hsphy>, <&usb_prim_ssphy>; phy-names = "usb2-phy", "usb3-phy"; + + port { + usb_prim_role_switch: endpoint { + }; + }; }; }; @@ -2659,6 +2698,11 @@ usb_sec_dwc3: usb@a800000 { snps,dis_enblslpm_quirk; phys = <&usb_sec_hsphy>, <&usb_sec_ssphy>; phy-names = "usb2-phy", "usb3-phy"; + + port { + usb_sec_role_switch: endpoint { + }; + }; }; }; @@ -2986,6 +3030,8 @@ dp0_in: endpoint { port@1 { reg = <1>; + mdss_dp0_out: endpoint { + }; }; }; @@ -3060,6 +3106,8 @@ dp1_in: endpoint { port@1 { reg = <1>; + mdss_dp1_out: endpoint { + }; }; }; From patchwork Mon Jun 12 22:14:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 106928 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp174036vqr; Mon, 12 Jun 2023 15:41:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ43mVPsUGMPfIH5XmpywK2mnaW0c4yiBEaf8RgUJNwRvThXp1mScmD9djNRa7ZSGMT32tFN X-Received: by 2002:a17:906:fe46:b0:974:1838:88d8 with SMTP id wz6-20020a170906fe4600b00974183888d8mr9516297ejb.57.1686609697489; Mon, 12 Jun 2023 15:41:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686609697; cv=none; d=google.com; s=arc-20160816; b=Qxr2fqF/NZR5Rdk+m9kd5LyG6t6xxTIKkHHp+nxm7XizNWkg4zbpcKl8CsPqDNuiyo kUYhXS3DMvN8ZTRaAh+vUs5lkWir1zuHT6u3Od1mpOyIk0EJBve29Y4OUzZhjm9PXg7s Rq+43WXy70ArkHnkyVI+y65Pzov2fX3LKDQkDWnm/MDvJl+eBIVy2IjhJEzZTcaJLASY JloBb7AIMzixQwlG2chPMUgMay2WqPgjBLr4oyMraJKzLVRVKg2Y9abkjEhdMcNBsfQH G+v/V6yLcM4Zm8br5vPC7XBbkaMRii7kUJrTaUfFk37xuInOfdxgg8eZrOC+cSy3Sn60 EkGg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MMS1rsNZP/EUanvoEfjtx82k7OtBqZ0B4ITqiaCOBp8=; b=Q9bFU1QB9egwit4NNbvZ445eZxC2s0DE+CqPYH+YIP6NIBkYEuCl/P02j/MuxVMBqQ ohh0iNEmlBSCsEcouoPulDjc8HWV7sJvBx1a1gzvM2YznPwGkzeUh9XlIp3p09F6vUgu Luz4dWHAjAH4Fm0nya5S/3bl/VbVMal8CxTcKhlV2lYYtrxyPjY7CWawsj2Q7wrv2F8J CIXcOmIhUUC+Nvy84CVytFBaddD2FuBQpB50DAAN9viPxdS51V/3PhPW2bQqWVfSWM28 BVMgjdp01NViIxQecdP+5FMpbH47bCoQ5lkIj0OmogGC594T3X9VSH2D8o7M/Rl27aml iUgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=XoRExxUk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o13-20020a170906288d00b009789fa7d6absi2932507ejd.551.2023.06.12.15.41.12; Mon, 12 Jun 2023 15:41:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=XoRExxUk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232569AbjFLWPP (ORCPT + 99 others); Mon, 12 Jun 2023 18:15:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238763AbjFLWPI (ORCPT ); Mon, 12 Jun 2023 18:15:08 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D703510CE; Mon, 12 Jun 2023 15:15:06 -0700 (PDT) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35CLjuDH000406; Mon, 12 Jun 2023 22:15:03 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=MMS1rsNZP/EUanvoEfjtx82k7OtBqZ0B4ITqiaCOBp8=; b=XoRExxUkHEQnyRc7lngVdlKtKBuoX5dISPaPZgJ2/eYVcQ2BwMvXj15/P1oQS3OARN6V L2yuwcttHxIBbhwLHkJKyw2q+1I/vxUllyj8oJVROhv+83kzGEChjFLq75R8lUvBOKPs sK51+U4kKJr9aLPj2vYGJ84BqGhA8g3X8L4CPNqC3goeBBeHbDaDb5OTb/EQLsOzZyR+ 7NG45j6BE2nl7TMCA/up8lFbBWn9IchD7SSQ3hij2Qnu+G1nMgHppjZyw5aTElPcSU8V F8QYjel1W4YA8eztAInoSU1AhAlK7kLvc6G88nAaHDXjRfm0XUjUhH0jM7y26/AJA/eI pQ== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3r60jysf5b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 12 Jun 2023 22:15:03 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 35CMF2Eu023293 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 12 Jun 2023 22:15:02 GMT Received: from hu-bjorande-lv.qualcomm.com (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.986.42; Mon, 12 Jun 2023 15:15:02 -0700 From: Bjorn Andersson To: Bjorn Andersson , Konrad Dybcio , Vinod Koul CC: Rob Herring , Krzysztof Kozlowski , Conor Dooley , , , Subject: [PATCH 2/3] arm64: dts: qcom: sc8180x-primus: Wire up USB Type-C Date: Mon, 12 Jun 2023 15:14:55 -0700 Message-ID: <20230612221456.1887533-3-quic_bjorande@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230612221456.1887533-1-quic_bjorande@quicinc.com> References: <20230612221456.1887533-1-quic_bjorande@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] 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-GUID: Qi_SgoxApLY-9nVdRE-XrSspLHKXLbZ7 X-Proofpoint-ORIG-GUID: Qi_SgoxApLY-9nVdRE-XrSspLHKXLbZ7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-12_16,2023-06-12_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 adultscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 mlxscore=0 clxscore=1015 suspectscore=0 impostorscore=0 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306120191 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768538450038764996?= X-GMAIL-MSGID: =?utf-8?q?1768538450038764996?= Wire up pmic_glink and the various components of USB Type-C to get battery status, orientation switching of SuperSpeed USB, as well as support for external display on the SC8180X Primus reference device. Signed-off-by: Bjorn Andersson --- arch/arm64/boot/dts/qcom/sc8180x-primus.dts | 196 ++++++++++++++++++++ 1 file changed, 196 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc8180x-primus.dts b/arch/arm64/boot/dts/qcom/sc8180x-primus.dts index fc038474cb71..1716fe788f74 100644 --- a/arch/arm64/boot/dts/qcom/sc8180x-primus.dts +++ b/arch/arm64/boot/dts/qcom/sc8180x-primus.dts @@ -50,6 +50,84 @@ lid-switch { }; }; + pmic-glink { + compatible = "qcom,sc8180x-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_con0_hs: endpoint { + remote-endpoint = <&usb_prim_role_switch>; + }; + }; + + port@1 { + reg = <1>; + + pmic_glink_con0_ss: endpoint { + remote-endpoint = <&usb_prim_qmpphy_out>; + }; + }; + + port@2 { + reg = <2>; + + pmic_glink_con0_sbu: endpoint { + remote-endpoint = <&usbprim_sbu_mux>; + }; + }; + }; + }; + + connector@1 { + compatible = "usb-c-connector"; + reg = <1>; + power-role = "dual"; + data-role = "dual"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + + pmic_glink_con1_hs: endpoint { + remote-endpoint = <&usb_sec_role_switch>; + }; + }; + + port@1 { + reg = <1>; + + pmic_glink_con1_ss: endpoint { + remote-endpoint = <&usb_sec_qmpphy_out>; + }; + }; + + port@2 { + reg = <2>; + + pmic_glink_con1_sbu: endpoint { + remote-endpoint = <&usbsec_sbu_mux>; + }; + }; + }; + }; + }; + reserved-memory { rmtfs_mem: rmtfs-region@85500000 { compatible = "qcom,rmtfs-mem"; @@ -143,6 +221,44 @@ vreg_s4a_1p8: pm8150-s4 { vin-supply = <&vph_pwr>; }; + + usbprim-sbu-mux { + compatible = "pericom,pi3usb102", "gpio-sbu-mux"; + + enable-gpios = <&tlmm 152 GPIO_ACTIVE_LOW>; + select-gpios = <&tlmm 100 GPIO_ACTIVE_HIGH>; + + pinctrl-names = "default"; + pinctrl-0 = <&usbprim_sbu_default>; + + mode-switch; + orientation-switch; + + port { + usbprim_sbu_mux: endpoint { + remote-endpoint = <&pmic_glink_con0_sbu>; + }; + }; + }; + + usbsec-sbu-mux { + compatible = "pericom,pi3usb102", "gpio-sbu-mux"; + + enable-gpios = <&tlmm 188 GPIO_ACTIVE_LOW>; + select-gpios = <&tlmm 187 GPIO_ACTIVE_HIGH>; + + pinctrl-names = "default"; + pinctrl-0 = <&usbsec_sbu_default>; + + mode-switch; + orientation-switch; + + port { + usbsec_sbu_mux: endpoint { + remote-endpoint = <&pmic_glink_con1_sbu>; + }; + }; + }; }; &apps_rsc { @@ -363,6 +479,24 @@ &mdss { status = "okay"; }; +&mdss_dp0 { + status = "okay"; +}; + +&mdss_dp0_out { + data-lanes = <0 1>; + remote-endpoint = <&usb_prim_qmpphy_dp_in>; +}; + +&mdss_dp1 { + status = "okay"; +}; + +&mdss_dp1_out { + data-lanes = <0 1>; + remote-endpoint = <&usb_sec_qmpphy_dp_in>; +}; + &mdss_edp { data-lanes = <0 1 2 3>; @@ -496,6 +630,8 @@ &usb_prim_qmpphy { vdda-phy-supply = <&vreg_l3c_1p2>; vdda-pll-supply = <&vreg_l5e_0p88>; + orientation-switch; + status = "okay"; }; @@ -507,6 +643,18 @@ &usb_prim_dwc3 { dr_mode = "host"; }; +&usb_prim_qmpphy_dp_in { + remote-endpoint = <&mdss_dp0_out>; +}; + +&usb_prim_qmpphy_out { + remote-endpoint = <&pmic_glink_con0_ss>; +}; + +&usb_prim_role_switch { + remote-endpoint = <&pmic_glink_con0_hs>; +}; + &usb_sec_hsphy { vdda-pll-supply = <&vreg_l5e_0p88>; vdda18-supply = <&vreg_l12a_1p8>; @@ -519,9 +667,23 @@ &usb_sec_qmpphy { vdda-phy-supply = <&vreg_l3c_1p2>; vdda-pll-supply = <&vreg_l5e_0p88>; + orientation-switch; + status = "okay"; }; +&usb_sec_qmpphy_dp_in { + remote-endpoint = <&mdss_dp1_out>; +}; + +&usb_sec_qmpphy_out { + remote-endpoint = <&pmic_glink_con1_ss>; +}; + +&usb_sec_role_switch { + remote-endpoint = <&pmic_glink_con1_hs>; +}; + &usb_sec { status = "okay"; }; @@ -635,6 +797,40 @@ wake-n-pins { }; }; + usbprim_sbu_default: usbprim-sbu-state { + oe-n-pins { + pins = "gpio152"; + function = "gpio"; + bias-disable; + drive-strength = <16>; + output-high; + }; + + sel-pins { + pins = "gpio100"; + function = "gpio"; + bias-disable; + drive-strength = <16>; + }; + }; + + usbsec_sbu_default: usbsec-sbu-state { + oe-n-pins { + pins = "gpio188"; + function = "gpio"; + bias-disable; + drive-strength = <16>; + output-high; + }; + + sel-pins { + pins = "gpio187"; + function = "gpio"; + bias-disable; + drive-strength = <16>; + }; + }; + tp_int_active_state: tp-int-active-state { tp-int-pins { pins = "gpio24"; From patchwork Mon Jun 12 22:14:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 106927 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp171821vqr; Mon, 12 Jun 2023 15:35:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ49f6TYi3PC3k0iase/HumNBZ13iB61EBDrNE87/Oj3GHai9S2XsuWdh56IXEilU5tmXOEy X-Received: by 2002:a05:6a00:1a0f:b0:65a:1efc:13ca with SMTP id g15-20020a056a001a0f00b0065a1efc13camr12371338pfv.15.1686609321437; Mon, 12 Jun 2023 15:35:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686609321; cv=none; d=google.com; s=arc-20160816; b=BpuGuuOHANhrDK8u2zQZ4SV3YFPdHhRxLGI8kRAs3l+h42Ekk0C+r/Ka4ZWRrAJHa5 me3VdBvfQ4Bdfsi6/i3/gPV3VFPgoQocecRq7BisAo6ux/sUzrhZUI+oE7oBhS7ybMgO BmTfCEMVET1LMQ0Pye268QtIygc3Pzxxv91Oof/zc5HE5eAOwwdU+xrY+a65sAhe/DL5 rDrFAWNvLPbKHncdpG+FQeJdUCHG8zzWlImMTHjcQ+nyFhYc2VE7Wu1Z+aiiGkaUq6rP bmw5oJBEwtuVIzg7NjLiEYVBGwXLjIwX5lGXzflcnMYz2feZSVCwJtWDpKZBITLt3fY6 kp+A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pGyvwgOlbTLUo+V/Y9nEOaXJa/euEuK6f+dzmjv3IZ8=; b=VCsNgyCtFq8aFsZPmaLt73BlDEWDGWCiqbqqiVfyoj5ftuEJJBvFjyKhbmSlSGzVQs aZEFypF8SkdPFlvjlWR6Nmw6B4mjhPTRcLNoZlkJU3Ep4kkJBwu7kulezfYsm30Oj4s5 j/KKUPHoxMopIqjUKwcD4p1y5JbTsj13WIaDVSErQTXnoXxMxDxJTkx2WgxBW8a0+1XW flvEE71qc3W/ATO3Hcj8o59eTAKKyqMKtTbu3tzVzXRG9XL4/wHXP6BrJecgHJY6hkCk //r5Lcx4B0JMt9kvmkDVB33wsVbzeKqnLz6j/vQPn2AYSnprP2txeEhTD0aT4vwGjRW2 HBWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Pp94PJcn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x66-20020a626345000000b0066032c675dcsi7446957pfb.3.2023.06.12.15.35.08; Mon, 12 Jun 2023 15:35:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Pp94PJcn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236436AbjFLWPT (ORCPT + 99 others); Mon, 12 Jun 2023 18:15:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238339AbjFLWPJ (ORCPT ); Mon, 12 Jun 2023 18:15:09 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 047BC10F2; Mon, 12 Jun 2023 15:15:07 -0700 (PDT) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35CJrWqn018957; Mon, 12 Jun 2023 22:15:04 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=pGyvwgOlbTLUo+V/Y9nEOaXJa/euEuK6f+dzmjv3IZ8=; b=Pp94PJcnhy3iWHX0XFwvsvm7xLHUnN6/KpEcl2Sqmr7uEO5U8BBwDWRKFl6Emiv+d5z4 2JFYq0uQ5CygKCFpW9KsEnpgXWJxq6r1ZRQ7lRkWtFRzBsPlYd3HWnQP/iCDvwC8dmB6 D+rLoK/l8QUjEAtDJ5D6hLelfkQqV/U3ZvjGEZbrWCQ8VywO2V47i+hLBVUHRzdpUITa P+a8ZxlZoOw5ZjJpbJcYJLw4W1M2qLYFXk5qpppESD+DSuvNRmKRHi/9YcYSHbUakZUQ SdZawfccgLwQn1QR7Wt0y15Ih1t3boAbZmW+PxpZ7/W01+14w/pNor9eeyL5R5pq3Ldb DQ== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3r60pesfk4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 12 Jun 2023 22:15:04 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 35CMF3pY022238 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 12 Jun 2023 22:15:03 GMT Received: from hu-bjorande-lv.qualcomm.com (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.986.42; Mon, 12 Jun 2023 15:15:02 -0700 From: Bjorn Andersson To: Bjorn Andersson , Konrad Dybcio , Vinod Koul CC: Rob Herring , Krzysztof Kozlowski , Conor Dooley , , , Subject: [PATCH 3/3] arm64: dts: qcom: sc8180x-flex5g: Wire up USB Type-C Date: Mon, 12 Jun 2023 15:14:56 -0700 Message-ID: <20230612221456.1887533-4-quic_bjorande@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230612221456.1887533-1-quic_bjorande@quicinc.com> References: <20230612221456.1887533-1-quic_bjorande@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] 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-GUID: CqIVJeCj7HUS553nE3pthGnz8pCp_Y3h X-Proofpoint-ORIG-GUID: CqIVJeCj7HUS553nE3pthGnz8pCp_Y3h X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-12_16,2023-06-12_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 clxscore=1015 spamscore=0 adultscore=0 suspectscore=0 mlxlogscore=999 impostorscore=0 mlxscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306120191 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768538055854671523?= X-GMAIL-MSGID: =?utf-8?q?1768538055854671523?= Following the SC8180X Primus reference design, add pmic_glink and USB Type-C wiring for battery manager, external display and orientation switching. Signed-off-by: Bjorn Andersson --- .../boot/dts/qcom/sc8180x-lenovo-flex-5g.dts | 196 ++++++++++++++++++ 1 file changed, 196 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts b/arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts index fe3b366e1435..677cb255fad2 100644 --- a/arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts +++ b/arch/arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts @@ -45,6 +45,84 @@ lid { }; }; + pmic-glink { + compatible = "qcom,sc8180x-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_con0_hs: endpoint { + remote-endpoint = <&usb_prim_role_switch>; + }; + }; + + port@1 { + reg = <1>; + + pmic_glink_con0_ss: endpoint { + remote-endpoint = <&usb_prim_qmpphy_out>; + }; + }; + + port@2 { + reg = <2>; + + pmic_glink_con0_sbu: endpoint { + remote-endpoint = <&usbprim_sbu_mux>; + }; + }; + }; + }; + + connector@1 { + compatible = "usb-c-connector"; + reg = <1>; + power-role = "dual"; + data-role = "dual"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + + pmic_glink_con1_hs: endpoint { + remote-endpoint = <&usb_sec_role_switch>; + }; + }; + + port@1 { + reg = <1>; + + pmic_glink_con1_ss: endpoint { + remote-endpoint = <&usb_sec_qmpphy_out>; + }; + }; + + port@2 { + reg = <2>; + + pmic_glink_con1_sbu: endpoint { + remote-endpoint = <&usbsec_sbu_mux>; + }; + }; + }; + }; + }; + reserved-memory { rmtfs_mem: rmtfs-region@85500000 { compatible = "qcom,rmtfs-mem"; @@ -100,6 +178,44 @@ vreg_s4a_1p8: pm8150-s4-regulator { vin-supply = <&vph_pwr>; }; + + usbprim-sbu-mux { + compatible = "pericom,pi3usb102", "gpio-sbu-mux"; + + enable-gpios = <&tlmm 152 GPIO_ACTIVE_LOW>; + select-gpios = <&tlmm 100 GPIO_ACTIVE_HIGH>; + + pinctrl-names = "default"; + pinctrl-0 = <&usbprim_sbu_default>; + + mode-switch; + orientation-switch; + + port { + usbprim_sbu_mux: endpoint { + remote-endpoint = <&pmic_glink_con0_sbu>; + }; + }; + }; + + usbsec-sbu-mux { + compatible = "pericom,pi3usb102", "gpio-sbu-mux"; + + enable-gpios = <&tlmm 188 GPIO_ACTIVE_LOW>; + select-gpios = <&tlmm 187 GPIO_ACTIVE_HIGH>; + + pinctrl-names = "default"; + pinctrl-0 = <&usbsec_sbu_default>; + + mode-switch; + orientation-switch; + + port { + usbsec_sbu_mux: endpoint { + remote-endpoint = <&pmic_glink_con1_sbu>; + }; + }; + }; }; &apps_rsc { @@ -283,6 +399,24 @@ &mdss { status = "okay"; }; +&mdss_dp0 { + status = "okay"; +}; + +&mdss_dp0_out { + data-lanes = <0 1>; + remote-endpoint = <&usb_prim_qmpphy_dp_in>; +}; + +&mdss_dp1 { + status = "okay"; +}; + +&mdss_dp1_out { + data-lanes = <0 1>; + remote-endpoint = <&usb_sec_qmpphy_dp_in>; +}; + &mdss_edp { data-lanes = <0 1 2 3>; @@ -419,6 +553,8 @@ &usb_prim_qmpphy { vdda-phy-supply = <&vreg_l3c_1p2>; vdda-pll-supply = <&vreg_l5e_0p88>; + orientation-switch; + status = "okay"; }; @@ -430,6 +566,18 @@ &usb_prim_dwc3 { dr_mode = "host"; }; +&usb_prim_qmpphy_dp_in { + remote-endpoint = <&mdss_dp0_out>; +}; + +&usb_prim_qmpphy_out { + remote-endpoint = <&pmic_glink_con0_ss>; +}; + +&usb_prim_role_switch { + remote-endpoint = <&pmic_glink_con0_hs>; +}; + &usb_sec_hsphy { vdda-pll-supply = <&vreg_l5e_0p88>; vdda18-supply = <&vreg_l12a_1p8>; @@ -442,9 +590,23 @@ &usb_sec_qmpphy { vdda-phy-supply = <&vreg_l3c_1p2>; vdda-pll-supply = <&vreg_l5e_0p88>; + orientation-switch; + status = "okay"; }; +&usb_sec_qmpphy_dp_in { + remote-endpoint = <&mdss_dp1_out>; +}; + +&usb_sec_qmpphy_out { + remote-endpoint = <&pmic_glink_con1_ss>; +}; + +&usb_sec_role_switch { + remote-endpoint = <&pmic_glink_con1_hs>; +}; + &usb_sec { status = "okay"; }; @@ -560,6 +722,40 @@ wake-n-pins { }; }; + usbprim_sbu_default: usbprim-sbu-state { + oe-n-pins { + pins = "gpio152"; + function = "gpio"; + bias-disable; + drive-strength = <16>; + output-high; + }; + + sel-pins { + pins = "gpio100"; + function = "gpio"; + bias-disable; + drive-strength = <16>; + }; + }; + + usbsec_sbu_default: usbsec-sbu-state { + oe-n-pins { + pins = "gpio188"; + function = "gpio"; + bias-disable; + drive-strength = <16>; + output-high; + }; + + sel-pins { + pins = "gpio187"; + function = "gpio"; + bias-disable; + drive-strength = <16>; + }; + }; + uart13_state: uart13-state { cts-pins { pins = "gpio43";