Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2361122iof; Wed, 8 Jun 2022 03:22:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+zg2GkqRN1mIr8OmHLrWjrQF1NohGqRfl2vJsYfAUdyQMk0Su7VVx9nWUabfA05TfZ8iI X-Received: by 2002:a17:90b:1c82:b0:1dd:1b46:5aa9 with SMTP id oo2-20020a17090b1c8200b001dd1b465aa9mr37105244pjb.158.1654683751374; Wed, 08 Jun 2022 03:22:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654683751; cv=none; d=google.com; s=arc-20160816; b=ZwbD3XatzdKaUvfifmKJpSYWi0x9GrTpdRNvzlJzt6nO3eaT6uqYvyRqZwuR3bRynG +r4jDEw/vHPnKnhuyJtRYEKnUOVIFoZrbSxy752AEtLsRsf/Vcdn0/CZ7l+ULIrr3/iu tiGOFTdto2uG7p1W4zHDXLrROGzUysLXa5WjDbJTW/ugRckHl8iBI4RonJ9pnY5fNIe6 oD7I9OnGs+3lXKm6mf9WeyUJNdroDEZmyW/JNhT3bgvF94m8JTW4acVNmJeKJ7Gwf5/7 Nqlaa8HL55YOWM2KlOSd4yGamGuWc7M0z/2EpS4dKoo1AZCSTy9c/S6n3NDtnyVLe7H5 7EcQ== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=uslo1ay+/qxoDJknXX4jPIC6SbHTLg2hMT/co1gVHAM=; b=le1wdmAIsAfpqnTT5PfJExz+LhwptWXFtKDowlwKJ5Ikk9akewpvhu90vU3hXQlrTo /fZx8XL1lgqWHbvB8yquc49KfblAZBuIPEXUbO9m7k36GSlkk/U3bgNXI0yCGro3smEo zy7KKsDfzs3LaCE2tCYaal/3zp9Dbv7Q/tzSkAPQxgjNJIwSMRTKfpY0xunWhtxWSBR6 I1O3iuDbUiXz7J++p1GxLn7onyuy1y3YHglqvjxJTL1PUclQgJ0Hf2u+N7NRLULDqA7S MSAv9H9MFhvgWcpo+Fv2dDl8VXGhtX87SW/BY6gL4afGCT1TmlMjuCJaYcrdt7tMjah+ 4DUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Pqt7muh1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id d1-20020a63f241000000b003db238f2a93si28691165pgk.815.2022.06.08.03.22.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 03:22:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Pqt7muh1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C90521A89BE; Wed, 8 Jun 2022 02:51:04 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235470AbiFHJuj (ORCPT + 99 others); Wed, 8 Jun 2022 05:50:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235483AbiFHJuV (ORCPT ); Wed, 8 Jun 2022 05:50:21 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8960D392A2E for ; Wed, 8 Jun 2022 02:18:38 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id z7so26189012edm.13 for ; Wed, 08 Jun 2022 02:18:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=uslo1ay+/qxoDJknXX4jPIC6SbHTLg2hMT/co1gVHAM=; b=Pqt7muh1OBZiOFSiS3jyVF1QSLKEUn1uSY8nr2V3ACJvzmkgVnQHkAfGVZauD+0c1v +hbhGHn5MnERl91/CB0MMUI9XDTrcXhx0xM3sYOanaEnHzpdQmnI3TNih+WK9C1iHNkT xYWWuW3xA5Ocf/tmlVbVefF7Jso7rh5Jh4AGyQ0BuqDFP19TMjU4BRRmRMAqtP+wrr2c 1hK3Qb1ssTEMomdCVyzMefEjWQ98Tl0LZxhibkrlEE8aFG/MV2Mv36nNxUfUbo2ChLCz iEzuVGRJ22qzlV6VKnZGcI7LF9aLW+tFAh1BdCSbZAEdRsoACcYubLtMyucU9tKAXSi5 /1aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=uslo1ay+/qxoDJknXX4jPIC6SbHTLg2hMT/co1gVHAM=; b=RcWJdgrEdfz5fBUlsFe9Nk8rALKy/TizuGbRciUMaZzYHJ4UT+hgtLuFS37U58+9XH ZqOQkPwPaTUg0L6vXRKyYuDBL8+WXX/jNqkGK+BldIw/ZqHAbW8RvXX952sRBSoHCuci N3M5zlOoPv7pVmfTB9cR6TaAsksaTJidQXh0t9F4lkE2UMcZNd3r7jjydBNNy4kYAFNm ny6RgmU6T7MiZSxSrpX2h3o2Gmx1MNp9PsT3axAa+6g5QbtHtSQX6LpxVzvcdK3KIb8D mdZYbMT4VtTsWCNQ5Yh2Y3lg0XTAXJJXaD2qjW9/YdY8XgK0a/QWmXl8iUKh47VcMOuR u8mA== X-Gm-Message-State: AOAM530YSM6tCXpvkCXx2wi2cD3mMP+hbDCyHlos4B3BKZHfPqoA7akh jOhpwU5VffE0MhPfHtMAAP6cg8xevhbu8Q== X-Received: by 2002:aa7:d9d9:0:b0:42d:f9e4:49e0 with SMTP id v25-20020aa7d9d9000000b0042df9e449e0mr37661598eds.299.1654679916702; Wed, 08 Jun 2022 02:18:36 -0700 (PDT) Received: from [192.168.0.190] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id e1-20020a1709062c0100b0070bdc059ab2sm7432535ejh.138.2022.06.08.02.18.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Jun 2022 02:18:36 -0700 (PDT) Message-ID: Date: Wed, 8 Jun 2022 11:18:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH 3/7] dt-bindings: usb: Add Type-C switch binding Content-Language: en-US To: Prashant Malani , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Cc: bleung@chromium.org, swboyd@chromium.org, heikki.krogerus@linux.intel.com, Andrzej Hajda , AngeloGioacchino Del Regno , Daniel Vetter , David Airlie , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "open list:DRM DRIVERS" , Greg Kroah-Hartman , Hsin-Yi Wang , Jernej Skrabec , Jonas Karlman , =?UTF-8?B?Sm9zw6kgRXhww7NzaXRv?= , Krzysztof Kozlowski , Laurent Pinchart , Maxime Ripard , Neil Armstrong , =?UTF-8?B?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Pin-Yen Lin , Robert Foss , Rob Herring , Sam Ravnborg , Thomas Zimmermann , Tzung-Bi Shih , Xin Ji References: <20220607190131.1647511-1-pmalani@chromium.org> <20220607190131.1647511-4-pmalani@chromium.org> From: Krzysztof Kozlowski In-Reply-To: <20220607190131.1647511-4-pmalani@chromium.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On 07/06/2022 21:00, Prashant Malani wrote: > Introduce a binding which represents a component that can control the > routing of USB Type-C data lines as well as address data line > orientation (based on CC lines' orientation). > > Signed-off-by: Prashant Malani > --- > .../devicetree/bindings/usb/typec-switch.yaml | 76 +++++++++++++++++++ > 1 file changed, 76 insertions(+) > create mode 100644 Documentation/devicetree/bindings/usb/typec-switch.yaml > > diff --git a/Documentation/devicetree/bindings/usb/typec-switch.yaml b/Documentation/devicetree/bindings/usb/typec-switch.yaml > new file mode 100644 > index 000000000000..60a600a63fef > --- /dev/null > +++ b/Documentation/devicetree/bindings/usb/typec-switch.yaml > @@ -0,0 +1,76 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/usb/typec-switch.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: USB Type-C Switch > + > +maintainers: > + - Prashant Malani > + > +description: > + A USB Type-C switch represents a component which routes USB Type-C data > + lines to various protocol host controllers (e.g USB, VESA DisplayPort, > + Thunderbolt etc.) depending on which mode the Type-C port, port partner > + and cable are operating in. It can also modify lane routing based on > + the orientation of a connected Type-C peripheral. > + > +properties: > + compatible: > + items: Single item, so no need for items. > + - enum: > + - typec-switch > + > + mode-switch: > + type: boolean > + description: Specify that this switch can handle alternate mode switching. > + > + orientation-switch: > + type: boolean > + description: Specify that this switch can handle orientation switching. > + > + ports: > + $ref: /schemas/graph.yaml#/properties/ports > + description: OF graph binding modelling data lines to the Type-C switch. > + > + properties: > + port@0: > + $ref: /schemas/graph.yaml#/properties/port > + description: Link between the switch and a Type-C connector. > + > + required: > + - port@0 > + > +required: > + - compatible > + - ports > + > +anyOf: > + - required: > + - mode-switch > + - required: > + - orientation-switch > + > +additionalProperties: true Why true? I see usb-connector has it from commit 6a0e321ea735 ("dt-bindings: Explicitly allow additional properties in common schemas") but that looks also weird - this is not a common schema, but a complete, generic one. > + > +examples: > + - | > + anx7625 { Generic node name. > + typecswitch { I guess here as well, so "usb-switch"? > + compatible = "typec-switch"; > + mode-switch; > + orientation-switch; > + ports { > + #address-cells = <1>; > + #size-cells = <0>; > + > + port@0 { > + reg = <0>; > + anx_ep: endpoint { > + remote-endpoint = <&typec_controller>; > + }; > + }; > + }; > + }; > + }; Best regards, Krzysztof