From patchwork Mon Dec 11 07:41:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xinhu Wu X-Patchwork-Id: 1874347 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45d1:ec00::1; helo=ny.mirrors.kernel.org; envelope-from=devicetree+bounces-23716-incoming-dt=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [IPv6:2604:1380:45d1:ec00::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SpYcx28HLz20Gd for ; Mon, 11 Dec 2023 18:42:57 +1100 (AEDT) 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 875A61C20987 for ; Mon, 11 Dec 2023 07:42:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D8177208BA; Mon, 11 Dec 2023 07:42:49 +0000 (UTC) X-Original-To: devicetree@vger.kernel.org Received: from SHSQR01.spreadtrum.com (mx1.unisoc.com [222.66.158.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BEC8F3; Sun, 10 Dec 2023 23:42:46 -0800 (PST) Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 3BB7fYgV057623; Mon, 11 Dec 2023 15:41:34 +0800 (+08) (envelope-from xinhu.wu@unisoc.com) Received: from SHDLP.spreadtrum.com (shmbx07.spreadtrum.com [10.0.1.12]) by dlp.unisoc.com (SkyGuard) with ESMTPS id 4SpYSS3dgmz2PH8jY; Mon, 11 Dec 2023 15:35:36 +0800 (CST) Received: from zebjkernups01.spreadtrum.com (10.0.93.153) by shmbx07.spreadtrum.com (10.0.1.12) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Mon, 11 Dec 2023 15:41:32 +0800 From: Xinhu Wu To: , , , , , , , , , , CC: , , , , , , , Subject: [PATCH V2 2/2] dt-bindings: usb: Add an Spreadtrum pmic typec yaml Date: Mon, 11 Dec 2023 15:41:20 +0800 Message-ID: <20231211074120.27958-3-xinhu.wu@unisoc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231211074120.27958-1-xinhu.wu@unisoc.com> References: <20231211074120.27958-1-xinhu.wu@unisoc.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To shmbx07.spreadtrum.com (10.0.1.12) X-MAIL: SHSQR01.spreadtrum.com 3BB7fYgV057623 Add device tree binding Documentation details for Spreadtrum pmic typec driver Signed-off-by: Xinhu Wu --- .../bindings/usb/sprd,pmic_typec.yaml | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/sprd,pmic_typec.yaml diff --git a/Documentation/devicetree/bindings/usb/sprd,pmic_typec.yaml b/Documentation/devicetree/bindings/usb/sprd,pmic_typec.yaml new file mode 100644 index 000000000000..e522ac02026b --- /dev/null +++ b/Documentation/devicetree/bindings/usb/sprd,pmic_typec.yaml @@ -0,0 +1,65 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/sprd,pmic-typec.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Unisoc SC27xx Type-C port controller + +maintainers: + - Xinhu Wu + +description: + Supports the typec found on these PMICs. + +properties: + compatible: + enum: + - sprd,sc2730-typec + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + sprd,mode: + maxItems: 1 + description: the number indicates src, snk or drp. + enum: [0, 1, 2] + + nvmem-cells: + maxItems: 2 + description: + A phandle to the 'cc resistance' trim data provided by + a nvmem device. + + nvmem-cell-names: + items: + - const: typec_cc1_cal + - const: typec_cc2_cal + +required: + - compatible + - reg + - interrupts + - sprd,mode + - nvmem-cells + - nvmem-cell-names + +examples: + - | + #include + pmic { + #address-cells = <1>; + #size-cells = <0>; + pmic_typec: typec@380 { + compatible = "sprd,sc2730-typec"; + reg = <0x380>; + interrupt-parent = <&sc2730_pmic>; + interrupts = <8>; + sprd,mode = <2>; + nvmem-cells = <&typec_cc1_cal>, <&typec_ccc2_cal>; + nvmem-cell-names = "typec_cc1_cal","typec_cc2_cal"; + }; + };