Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp3165410rdb; Tue, 29 Aug 2023 07:16:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFjcbNqG3ge41eKdEupWYmNbymQbWDYevdRjAwG/QDBSnPeLdG/xDVw8oIpfmdt/T0CfSyt X-Received: by 2002:a05:6402:5191:b0:52b:db31:3c5c with SMTP id q17-20020a056402519100b0052bdb313c5cmr289830edd.0.1693318598869; Tue, 29 Aug 2023 07:16:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693318598; cv=none; d=google.com; s=arc-20160816; b=vziBj3gWqa+ZF/rx9S8mRgqWvkL0h9KRdyAZErBU3DnvTN9bOY8/QnUUZjvErFBebr IDw4HnRfFhI8BtG1SP47i5SSF3i9sOXosvJjsvNaulXvGxGMlYz6WOA7WHFTr68wDeUD JwRId2yIAmYK5u+fTLDKXmzHaqB8qeWnzRKW+09QqsHXCNu2iTrK2mUprvqKaioWKta+ kLvg11gjV6Ys04GORdPLZMTndqmU050z/2TdsRrGcurTNlJdREmx5a6ob4MX9ENislQs zE5YM2rRMR5ajgdDb/dRtDBJd5q5B3dg1ecVBrZ3XInnOh/+znZHE6gTQSo2uUy0VVrc 8TDg== 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 :authenticated-by; bh=RVp5was4WV4FL9+iGoUbzKw9im5/AHNw0TpEkG3a72Q=; fh=JpcBwM0pSECTSMntpM63eCZ7ZK4ygFAFOvkw4M/Gmqk=; b=opWs/ETj0nunw/wIgZjO2spggGq+UNJ8lALxQ+Ho6RPRh67rV+q9gkW55b3q+XZNIj VyGdfJtwhDYgHeciABw6w7tcqqGZEbYJmNeRoCjqu5fvRA6hLx1/Z4mnQ1FtTMFRSsx3 rQScrpLBG0iwMVvsW438xAyrUXM50CTJJ+uc5to1Mp59sSaN14YQGoWWCzmZpZuereG2 Qqa1x8/jR4jELWz/fOYrzle9+fUsOt96rZYFP5opcIfLVusDK+tuUHVlqetL7JU9hHPy iseuOs+8i0V3TQkKUDId2JQkT/ydYJuHODqLabcb/X1zy03cy+YIkmMGY+bIjtC1jkJ4 QFNA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x12-20020aa7dacc000000b0052322fbabf9si6019902eds.324.2023.08.29.07.16.02; Tue, 29 Aug 2023 07:16:38 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231216AbjH2LUu (ORCPT + 99 others); Tue, 29 Aug 2023 07:20:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230484AbjH2LU3 (ORCPT ); Tue, 29 Aug 2023 07:20:29 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 49F53BD; Tue, 29 Aug 2023 04:20:26 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 37TBJniO6021402, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.81/5.90) with ESMTPS id 37TBJniO6021402 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 29 Aug 2023 19:19:49 +0800 Received: from RTEXMBS02.realtek.com.tw (172.21.6.95) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.32; Tue, 29 Aug 2023 19:20:13 +0800 Received: from RTEXH36505.realtek.com.tw (172.21.6.25) by RTEXMBS02.realtek.com.tw (172.21.6.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Tue, 29 Aug 2023 19:20:13 +0800 Received: from localhost.localdomain (172.21.252.101) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server id 15.1.2375.32 via Frontend Transport; Tue, 29 Aug 2023 19:20:13 +0800 From: Stanley Chang To: MyungJoo Ham CC: Stanley Chang , Greg Kroah-Hartman , Rob Herring , "Krzysztof Kozlowski" , Conor Dooley , Chanwoo Choi , , , Subject: [PATCH v2 2/2] dt-bindings: extcon: Add Realtek DHC RTD SoC Type-C Date: Tue, 29 Aug 2023 19:20:05 +0800 Message-ID: <20230829112011.20529-2-stanley_chang@realtek.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230829112011.20529-1-stanley_chang@realtek.com> References: <20230829112011.20529-1-stanley_chang@realtek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-KSE-ServerInfo: RTEXMBS02.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-ServerInfo: RTEXH36505.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 Document the device-tree bindings for Realtek SoCs Type-C. Realtek DHC (digital home center) RTD SoCs support a Type-C module. Signed-off-by: Stanley Chang --- v1 to v2 change: 1. moved this binding from extcon to usb. 2. removed the property of pinctrl. 3. revised the properties of nvmem and gpio. 4. added connector node. 5. revised the example. --- .../bindings/usb/realtek,rtd-type-c.yaml | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/realtek,rtd-type-c.yaml diff --git a/Documentation/devicetree/bindings/usb/realtek,rtd-type-c.yaml b/Documentation/devicetree/bindings/usb/realtek,rtd-type-c.yaml new file mode 100644 index 000000000000..6142b0b5b534 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/realtek,rtd-type-c.yaml @@ -0,0 +1,82 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright 2023 Realtek Semiconductor Corporation +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/realtek,rtd-type-c.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Realtek DHC RTD SoCs USB Type-C Connector detection + +maintainers: + - Stanley Chang + +description: + Realtek digital home center (DHC) RTD series SoCs include a type c module. + This module is able to detect the state of type c connector. + +properties: + compatible: + enum: + - realtek,rtd1295-type-c + - realtek,rtd1312c-type-c + - realtek,rtd1315e-type-c + - realtek,rtd1319-type-c + - realtek,rtd1319d-type-c + - realtek,rtd1395-type-c + - realtek,rtd1619-type-c + - realtek,rtd1619b-type-c + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + nvmem-cell-names: + items: + - const: usb-cal + + nvmem-cells: + maxItems: 1 + description: + The phandle to nvmem cell that contains the trimming data. + The type c parameter trimming data specified via efuse. + If unspecified, default value is used. + + realtek,rd-ctrl-gpios: + description: The gpio node to control external Rd on board. + maxItems: 1 + + connector: + $ref: /schemas/connector/usb-connector.yaml# + description: Properties for usb c connector. + type: object + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - | + #include + + type-c@7220 { + compatible = "realtek,rtd1619b-type-c"; + reg = <0x7220 0x20>; + interrupts = <0 60 IRQ_TYPE_LEVEL_HIGH>; + + pinctrl-names = "default"; + pinctrl-0 = <&usb_cc1_pins>, <&usb_cc2_pins>; + nvmem-cells = <&otp_usb_cal>; + nvmem-cell-names = "usb-cal"; + + connector { + compatible = "usb-c-connector"; + label = "USB-C"; + data-role = "dual"; + power-role = "dual"; + }; + }; -- 2.34.1