Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3288453imw; Mon, 11 Jul 2022 05:58:10 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v2pQf3xNV2uhtoLq+XhiMSPS9qmTZ593LNyQLwQKofgmlHE/mFfZmpWM2mrpQvUAW+depH X-Received: by 2002:a05:6a00:22cb:b0:525:ba83:559a with SMTP id f11-20020a056a0022cb00b00525ba83559amr18507767pfj.54.1657544290180; Mon, 11 Jul 2022 05:58:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657544290; cv=none; d=google.com; s=arc-20160816; b=YLZToFeFTrgpDb/FSPs11/xZFLnGtTdlMCEJjEyEKzoJYP3qSME9APj+irOJCPBPOG Q5X1brqQDSY89GgtU1WSvoE1o7wd4NDzdqByFU01Rw9eF25qg3p3Kxe27UBJ6DJSfG2z /7fY0m+nPAd6J/KNyG2X+hWkVqAP9X+UMja5FRjE1S/HRY4c+Lbr4NkyQJhHZL4CRv3g f6N+ZRYR27WPdh+6++LsZOm1Mm3MJJxUb+g+pyhM05IGtVUkyRz4h04EQBG+Y05W4Y2L 9sXdroSMoaA2e200khlAJ1ABAH7DHcyYS89aXgbjUvgZIlRJcyNexY7Xue+17hLWsmlK M8fw== 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=jHypv5E2Ntg6iXVsvy1Ne3ieQ+rIz+C8sBC7FRD48UU=; b=Wu+EXOXMNsuxz53vrE30bmT6AJoRC0yclgvAtDr4c5lQZo2FkKWxTX7+CueBp3LERO risNFscccL+NvmeSopLcnGqV9IHp/oOfA6Zm3NYxzdnaEVj1AC3xMnkD8IrqFCgqkH16 m9YsZiHi3mSBP9SyH7BcQmDUD6M/EGtkpAHQmTp+zDQ8qJao+pJ1o7GUw92BcUK7IcWA X2Sdv02G5WL5rvla49P3DzFgZHfJk74+XjUoyWckKe/iMtHj472Dxx4+WEGABiQ7TbUF cgb5aiONlpiGkomGX1qrfjB6DbsmZVW6QrYz1LdIt4MQnGhyDaM/OPsLqoBI2NAMGbBZ 460g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b="vW4bZd/j"; 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=foss.st.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lj6-20020a17090b344600b001ecd45dda01si8212915pjb.88.2022.07.11.05.57.58; Mon, 11 Jul 2022 05:58:10 -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=@foss.st.com header.s=selector1 header.b="vW4bZd/j"; 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=foss.st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230146AbiGKMBu (ORCPT + 99 others); Mon, 11 Jul 2022 08:01:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229685AbiGKMBr (ORCPT ); Mon, 11 Jul 2022 08:01:47 -0400 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCCAA37F8C; Mon, 11 Jul 2022 05:01:46 -0700 (PDT) Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 26BB1qC9000697; Mon, 11 Jul 2022 14:01:38 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=selector1; bh=jHypv5E2Ntg6iXVsvy1Ne3ieQ+rIz+C8sBC7FRD48UU=; b=vW4bZd/jCn66wdgq1ucTAX+nWsOI+ewsHPGNeO5MhBrjj+xAiq7wlzfmc9RGhvtLrOiM FTsrZ3RVO4AgsStSZD0TYONBvkYL5oubLWgdP2mQW6dEIief0UlMqt/fVX5gxyosAkPo IGHCrL3sVyNapt+qmzfdL6luVVqYPlDvW0ZsQdmlJz5bmi5vPFQILhm3SAxdx2ww/mub /3o3YVapTQC9N4UWBl4UJtfaIGfihpV9OZCrh1ZE7oOY7QxOc4mHeCwGt4y6bWcpXelL MGfkbacMha5LmsGoJBUHU5XXDf+iF/5aFG+v0tP2sHo+nYnCjU22fe6tc1tUv0q+rTfj Pw== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3h6xtak5vd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Jul 2022 14:01:38 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 0301F10002A; Mon, 11 Jul 2022 14:01:37 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node2.st.com [10.75.129.70]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id ED10E21ED2B; Mon, 11 Jul 2022 14:01:37 +0200 (CEST) Received: from localhost (10.75.127.50) by SHFDAG1NODE2.st.com (10.75.129.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2308.20; Mon, 11 Jul 2022 14:01:37 +0200 From: Fabrice Gasnier To: , , , CC: , , , , , , , Subject: [PATCH v2 1/4] dt-bindings: usb: typec: add bindings for stm32g0 controller Date: Mon, 11 Jul 2022 14:01:19 +0200 Message-ID: <20220711120122.25804-2-fabrice.gasnier@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220711120122.25804-1-fabrice.gasnier@foss.st.com> References: <20220711120122.25804-1-fabrice.gasnier@foss.st.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.75.127.50] X-ClientProxiedBy: SFHDAG2NODE3.st.com (10.75.127.6) To SHFDAG1NODE2.st.com (10.75.129.70) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-07-11_17,2022-07-08_01,2022-06-22_01 X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 Add DT schema documentation for the STM32G0 Type-C PD (Power Delivery) controller. STM32G0 provides an integrated USB Type-C and power delivery interface. It can be programmed with a firmware to handle UCSI protocol over I2C interface. A GPIO is used as an interrupt line. It may be used as a wakeup source, so use optional "wakeup-source" and "power-domains" properties to support wakeup. Signed-off-by: Fabrice Gasnier --- Changes in v2: - Krzysztof's review comments: update commit message, use ports, use unevaluatedProperties: false for usb-connector schema, define maxItems for power-domains, adopt generic node names, remove quotes --- .../bindings/usb/st,typec-stm32g0.yaml | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/st,typec-stm32g0.yaml diff --git a/Documentation/devicetree/bindings/usb/st,typec-stm32g0.yaml b/Documentation/devicetree/bindings/usb/st,typec-stm32g0.yaml new file mode 100644 index 0000000000000..7b3a2c2124e38 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/st,typec-stm32g0.yaml @@ -0,0 +1,90 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/st,typec-stm32g0.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics STM32G0 USB Type-C PD controller + +description: | + The STM32G0 MCU can be programmed to control Type-C connector(s) through I2C + typically using the UCSI protocol over I2C, with a dedicated alert + (interrupt) pin. + +maintainers: + - Fabrice Gasnier + +properties: + compatible: + const: st,stm32g0-typec + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + connector: + type: object + $ref: /schemas/connector/usb-connector.yaml# + unevaluatedProperties: false + + firmware-name: + description: | + Should contain the name of the default firmware image + file located on the firmware search path + + wakeup-source: true + + power-domains: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + typec@53 { + compatible = "st,stm32g0-typec"; + reg = <0x53>; + /* Alert pin on GPIO PE12 */ + interrupts = <12 IRQ_TYPE_EDGE_FALLING>; + interrupt-parent = <&gpioe>; + + /* Example with one type-C connector */ + connector { + compatible = "usb-c-connector"; + label = "USB-C"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + con_usb_c_ep: endpoint { + remote-endpoint = <&usb_ep>; + }; + }; + }; + }; + }; + }; + + usb { + usb-role-switch; + port { + usb_ep: endpoint { + remote-endpoint = <&con_usb_c_ep>; + }; + }; + }; +... -- 2.25.1