From patchwork Fri Jan 13 04:11:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 42928 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp73522wrt; Thu, 12 Jan 2023 20:15:06 -0800 (PST) X-Google-Smtp-Source: AMrXdXsuaAnz3lI01vFUvUWZeAcfkMv3XAQEI3CV+eXeloprKXWaiTFR5beRdJ7h5kLeoJka88Ne X-Received: by 2002:a17:902:e884:b0:192:c014:f6ba with SMTP id w4-20020a170902e88400b00192c014f6bamr60746940plg.33.1673583306165; Thu, 12 Jan 2023 20:15:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673583306; cv=none; d=google.com; s=arc-20160816; b=M1NHKzhjkKCy7+8o9GV/ofXqX09DcTRx9dxbuck2FLNLIL9Tw10Q5Ds5XLnCl+sZKG 46NmwzREZtHKiX+iZfGVaV2XYULhXoKndxdEgCgQ7VC5iZ/UErzltS6uM0RuhBU0vKvF hgF8aNMffws+GSx5rV+hV8ZVSpGfDxRjl3Ic4sxnKgZqbWQ+CR+tpXB6A9XdYKB3lp4G GHxy2gGf2Kr7vopEVOOFgz4/t7dPypacJV7q0ciMMT7XOS+ufhT75hse2tN+brerZgbq HpHCf7Xq9vv3gZdVAU8uRyJWeeccHT+wPfy7jy2hxMLfuKv5jq9pJP882Lt3jZAeBcjU +RjQ== 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=FRnM/dodPKY9NgBPb57hwiI1wCh0wHUvAf4TQWCuAFE=; b=othpbJiWGO+lx9XxhUgBcuzAryamRf4L0Owgr13mv8qP7eZigsEynTRM68at4tAP4w swZWC+ZQH/u/N7AvaDSMWjCTwC24gbKzgDx8qdUpZAJdaX29My3yrdjMbA6GPOIQSjYz 2/gfsRL3BDjNAjhRARfWACxV4f6DdVmXYY4mj5F3T3lpni+wqc0hmThFNcHYpTmq9ALI fROaySqASGcvPeP8XELqM7Lh/C8DYUov3viYwpuX31cagufQTwCTI5i4MTZgRrSJGqQb yB1ORazK6hFN1C2pdQi9/esrIgdFp2QPOG7HQP1CjVpCHjcbqhP3YNt2eK7AYpK+gkqE CWyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="JmPDC/Zk"; 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 y3-20020a17090322c300b00192e2fde201si20883310plg.124.2023.01.12.20.14.54; Thu, 12 Jan 2023 20:15:06 -0800 (PST) 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="JmPDC/Zk"; 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 S231400AbjAMENP (ORCPT + 99 others); Thu, 12 Jan 2023 23:13:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234718AbjAMEL4 (ORCPT ); Thu, 12 Jan 2023 23:11:56 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29D07BA0; Thu, 12 Jan 2023 20:11:43 -0800 (PST) Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30D472Ji009477; Fri, 13 Jan 2023 04:11:39 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=FRnM/dodPKY9NgBPb57hwiI1wCh0wHUvAf4TQWCuAFE=; b=JmPDC/ZkRVV5ddX+Q/m3/zwIbRIwoWAhCA5NrURf0etyKZsDJpkEf7Uc+YbJacdgOooE 9B3cYS9FVZ/VEvolElKZo83qvOte6RsaT0Xl2SpLjKOgnob3wEj/SgUNZAvWYoD/JDQH gtHIEzFIjB7Gj7dqkX9CiXTn1rxcINiDrWGBactXC24fAgKnIkxFT/bd2GrHY4O/X9hN tsG+df6iug5b/Ype1OUunozIeDRoMx2P3LelR8GsEl/gOi5pIsYply09/1d3xZVnhsda NEgD+ATlpwRozTk9HvB2qoO5ZJbts4DNtZKo1LwMs1IGldTaCtQ4TphUWRWtnG7JNbL2 SA== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3n2fwpt1sx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 13 Jan 2023 04:11:39 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 30D4Bb44001432 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 13 Jan 2023 04:11:37 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.36; Thu, 12 Jan 2023 20:11:37 -0800 From: Bjorn Andersson To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Sebastian Reichel CC: , , , , "Subbaraman Narayanamurthy" , Johan Hovold , Neil Armstrong Subject: [PATCH v2 1/4] dt-bindings: soc: qcom: Introduce PMIC GLINK binding Date: Thu, 12 Jan 2023 20:11:29 -0800 Message-ID: <20230113041132.4189268-2-quic_bjorande@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230113041132.4189268-1-quic_bjorande@quicinc.com> References: <20230113041132.4189268-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: QSBG86Tg4kRlR4R91biZ6KowVJDgxMNQ X-Proofpoint-ORIG-GUID: QSBG86Tg4kRlR4R91biZ6KowVJDgxMNQ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-12_14,2023-01-12_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 clxscore=1015 spamscore=0 impostorscore=0 malwarescore=0 mlxlogscore=999 phishscore=0 bulkscore=0 suspectscore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301130026 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 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?1754879288761608013?= X-GMAIL-MSGID: =?utf-8?q?1754879288761608013?= From: Bjorn Andersson The PMIC GLINK service, running on a coprocessor on some modern Qualcomm platforms and implement USB Type-C handling and battery management. This binding describes the component in the OS used to communicate with the firmware and connect it's resources to those described in the Devicetree, particularly the USB Type-C controllers relationship with USB and DisplayPort components. Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson --- Changes since v1: - Added reg under connector, to identify multiple connectors - Updated maintainer email .../bindings/soc/qcom/qcom,pmic-glink.yaml | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml new file mode 100644 index 000000000000..a79dd0ed9275 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml @@ -0,0 +1,102 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/qcom/qcom,pmic-glink.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm PMIC GLINK firmware interface for battery management, USB + Type-C and other things. + +maintainers: + - Bjorn Andersson + +description: + The PMIC GLINK service, running on a coprocessor on some modern Qualcomm + platforms and implement USB Type-C handling and battery management. This + binding describes the component in the OS used to communicate with the + firmware and connect it's resources to those described in the Devicetree, + particularly the USB Type-C controllers relationship with USB and DisplayPort + components. + +properties: + compatible: + items: + - enum: + - qcom,sc8180x-pmic-glink + - qcom,sc8280xp-pmic-glink + - qcom,sm8350-pmic-glink + - const: qcom,pmic-glink + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + +patternProperties: + '^connector@\d$': + $ref: /schemas/connector/usb-connector.yaml# + + properties: + reg: true + + unevaluatedProperties: false + +required: + - compatible + +additionalProperties: false + +examples: + - |+ + pmic-glink { + compatible = "qcom,sc8280xp-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>; + endpoint { + remote-endpoint = <&usb_role>; + }; + }; + + port@1 { + reg = <1>; + + #address-cells = <1>; + #size-cells = <0>; + + endpoint@0 { + reg = <0>; + remote-endpoint = <&qmp_out>; + }; + + endpoint@1 { + reg = <1>; + remote-endpoint = <&displayport_hpd>; + }; + }; + + port@2 { + reg = <2>; + endpoint { + remote-endpoint = <&sbu_mux>; + }; + }; + }; + }; + }; +... +