From patchwork Thu Dec 22 14:28:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 35803 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp356239wrn; Thu, 22 Dec 2022 06:29:40 -0800 (PST) X-Google-Smtp-Source: AMrXdXt4VHA7JAE5+ySOZ/G4bOdL9j+RksSjz8DYjcHpKNe6cztekU3dWVqMsM/VH4jXOjtZXVD6 X-Received: by 2002:a17:903:3296:b0:186:8bb2:de4b with SMTP id jh22-20020a170903329600b001868bb2de4bmr5685440plb.43.1671719379896; Thu, 22 Dec 2022 06:29:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671719379; cv=none; d=google.com; s=arc-20160816; b=RyXXQrsWb9EXLiLM3h1m8UKn+fcWose2RtBP7K4r1derFhBeA4PkyYCaPNB4Udy+iL 0hw/KMKR0weZc6uYRZ7lt8u6qYjTlCGWp6WOvHpOj83R86TW7/rpeCxOxwJj0ZUWtVRt xqAuCf2Ln1v0RPxNNlEvQ25oI0Rs3tBLDVEcj/b3pujUfjZQlVYQEBJ2YyW18DKm1EZb xGdkp1k2Ic+fwfU1QZ0zGNDjgC4azhhzl8Xp0/jY2JicAVKGxZQ/+VpJtkK44E3GNDW7 977bSh3I2dilNQTSl+BOztLSMqeSFQa0TKdVfyqIBmFteGbDf8JerjyLx372M+WLp1XU Vhiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-language:references:cc:to:subject:from:user-agent :mime-version:date:message-id:dkim-signature; bh=IiR9nJxZj0ahc9gYg7Q4kSlDraiLVtIVMlRjW0NAGg4=; b=Rljoo36VsX0O8dOiR2gJwHexhYC+BNqiPgloQT6gQuseruvGLb1CNNA4PsfScsRtI9 +NsWzPXVmTJ8V5Ievqoo3UGvcpg4KNK/pz29okJhk32LMYXejeluf7zgsxSyeQgSMzFY sDhdWwLmzsIVB4v3FN/BLO4OhBfIAytMHrAt9pOvTDWsHsDiOVhGzKXajJTT3xfRFaQJ BnvQQn2I2vdfOS0yGMUlOKV6F0W2aS+eEjbTjxSoTXCh7dIuBpKN/f67PpwUu1MfekRS 0TTeOpwT5z6Bgxky7kw0inNLUPf6zQqwu7R88ldOKE8YI3w4RBISnojTfJ38zXaLvWFf zEKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kVO3wEjl; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i17-20020a170902e49100b00179f1584540si565847ple.564.2022.12.22.06.29.26; Thu, 22 Dec 2022 06:29:39 -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=@gmail.com header.s=20210112 header.b=kVO3wEjl; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235639AbiLVO27 (ORCPT + 99 others); Thu, 22 Dec 2022 09:28:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235504AbiLVO25 (ORCPT ); Thu, 22 Dec 2022 09:28:57 -0500 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A759101CB; Thu, 22 Dec 2022 06:28:56 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id t17so5340510eju.1; Thu, 22 Dec 2022 06:28:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=IiR9nJxZj0ahc9gYg7Q4kSlDraiLVtIVMlRjW0NAGg4=; b=kVO3wEjlUNasPOkQM+Z8XVHJ1D4eroDcNYLwjW2XFT1X4tvZMLhYsMzwjZLJn31O39 yjmuS0HuXq1lSB/v+qiLEd/JfdlhFFF8ZoQZQOBhosIrGG7z23XCxzQvXdMMDv4liNZw CXZVDY5Fjvl3VTQ47YozPl/DmcpQBwyFeaKUtTFc7iNlEb2i2fR1IqIi04TSpIC2ixLn ThK0qRxwTTZQS2Vn/11sFIAtVgqcN1YwPPxG6L1IP1MG7340wDX88+f7bnFFdDiViIBQ 1PSn4OcmRKU4pr4HNe2SPzP1VeNxXmPRiRltzh1VP1EPFGrGxrpjeAXekFVl0dvLvzKG vTxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IiR9nJxZj0ahc9gYg7Q4kSlDraiLVtIVMlRjW0NAGg4=; b=KFxx6KpXEiqyBLrT8HbYXDkCoB9mcs7fX63HNWgMqiJPlZN5v8UbGRxzFWj6EJf+FZ 6FG7hcnv0ayup0a9Q3B5vodGYajDMAEUr95Fr8pPpOoSE6vF9z6ajMWXEaGJ23FFgz++ f4bjKnjakkgfqa7aVdHvN5GCQpWkI8O40ZFjTm0P1wKMibGiBBhOwXweKz6/2oUQCkAV QKuvZUysPT6Fn5qlDWnKl8LdGt3rZC4/HzufIuzp+uY6EGW8qWfsGvXhzU8Wf4ifgc7q KZoHloGbVEyrz1ZK8fChlqveV54f3p5m4UEjGqz4nAoR+X5IzGHCLKs0If+fFyBeceDi ZCMA== X-Gm-Message-State: AFqh2krucK3Vn1n8e2NCr/YE+EKQWJjuNyZNDRDF9UJ5DLNi36OKuVlX zpZnve9xTJKZACv6MIJ1gpc= X-Received: by 2002:a17:906:5956:b0:81b:f617:eb99 with SMTP id g22-20020a170906595600b0081bf617eb99mr4531596ejr.67.1671719334856; Thu, 22 Dec 2022 06:28:54 -0800 (PST) Received: from [192.168.2.1] (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id vf20-20020a170907239400b0081586470b7csm298343ejb.173.2022.12.22.06.28.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Dec 2022 06:28:54 -0800 (PST) Message-ID: <0336a3c4-4a43-c983-11d7-e2ae16187fc8@gmail.com> Date: Thu, 22 Dec 2022 15:28:53 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 From: Johan Jonker Subject: [PATCH v6 08/17] dt-bindings: usb: convert fcs,fusb302.txt to yaml To: heiko@sntech.de Cc: hjc@rock-chips.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, gregkh@linuxfoundation.org, airlied@gmail.com, daniel@ffwll.ch, andrzej.hajda@intel.com, neil.armstrong@linaro.org, robert.foss@linaro.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, philippe.cornu@foss.st.com, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-usb@vger.kernel.org, linus.walleij@linaro.org, inki.dae@samsung.com, sw0312.kim@samsung.com, kyungmin.park@samsung.com, alim.akhtar@samsung.com, linux-samsung-soc@vger.kernel.org References: <67771143-fd83-383d-41b2-68e8707134e8@gmail.com> Content-Language: en-US In-Reply-To: <67771143-fd83-383d-41b2-68e8707134e8@gmail.com> X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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?1752924820391748709?= X-GMAIL-MSGID: =?utf-8?q?1752924820391748709?= Convert fcs,fusb302.txt to yaml. Changed: Add vbus-supply property Signed-off-by: Johan Jonker Reviewed-by: Rob Herring --- Changed V6: Add unevaluatedProperties Drop unused labels --- .../devicetree/bindings/usb/fcs,fusb302.txt | 34 ---------- .../devicetree/bindings/usb/fcs,fusb302.yaml | 67 +++++++++++++++++++ 2 files changed, 67 insertions(+), 34 deletions(-) delete mode 100644 Documentation/devicetree/bindings/usb/fcs,fusb302.txt create mode 100644 Documentation/devicetree/bindings/usb/fcs,fusb302.yaml -- 2.20.1 diff --git a/Documentation/devicetree/bindings/usb/fcs,fusb302.txt b/Documentation/devicetree/bindings/usb/fcs,fusb302.txt deleted file mode 100644 index 60e465429..000000000 --- a/Documentation/devicetree/bindings/usb/fcs,fusb302.txt +++ /dev/null @@ -1,34 +0,0 @@ -Fairchild FUSB302 Type-C Port controllers - -Required properties : -- compatible : "fcs,fusb302" -- reg : I2C slave address -- interrupts : Interrupt specifier - -Required sub-node: -- connector : The "usb-c-connector" attached to the FUSB302 IC. The bindings - of the connector node are specified in: - - Documentation/devicetree/bindings/connector/usb-connector.yaml - - -Example: - -fusb302: typec-portc@54 { - compatible = "fcs,fusb302"; - reg = <0x54>; - interrupt-parent = <&nmi_intc>; - interrupts = <0 IRQ_TYPE_LEVEL_LOW>; - - usb_con: connector { - compatible = "usb-c-connector"; - label = "USB-C"; - power-role = "dual"; - try-power-role = "sink"; - source-pdos = ; - sink-pdos = ; - op-sink-microwatt = <10000000>; - }; -}; diff --git a/Documentation/devicetree/bindings/usb/fcs,fusb302.yaml b/Documentation/devicetree/bindings/usb/fcs,fusb302.yaml new file mode 100644 index 000000000..b396ea0ab --- /dev/null +++ b/Documentation/devicetree/bindings/usb/fcs,fusb302.yaml @@ -0,0 +1,67 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/fcs,fusb302.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Fairchild FUSB302 Type-C Port controller + +maintainers: + - Rob Herring + +properties: + compatible: + const: fcs,fusb302 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + vbus-supply: + description: VBUS power supply + + connector: + type: object + $ref: /schemas/connector/usb-connector.yaml# + unevaluatedProperties: false + +required: + - compatible + - reg + - interrupts + - vbus-supply + - connector + +additionalProperties: false + +examples: + - | + #include + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + typec-portc@54 { + compatible = "fcs,fusb302"; + reg = <0x54>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + vbus-supply = <&vbus_typec>; + + connector { + compatible = "usb-c-connector"; + label = "USB-C"; + power-role = "dual"; + try-power-role = "sink"; + source-pdos = ; + sink-pdos = ; + op-sink-microwatt = <10000000>; + }; + }; + };