From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 375F9C433EF for ; Wed, 8 Jun 2022 17:15:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 328AA112885; Wed, 8 Jun 2022 17:15:20 +0000 (UTC) Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by gabe.freedesktop.org (Postfix) with ESMTPS id 327D7112885 for ; Wed, 8 Jun 2022 17:15:19 +0000 (UTC) Received: by mail-pj1-x102b.google.com with SMTP id cx11so19186533pjb.1 for ; Wed, 08 Jun 2022 10:15:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=oH5uSEXgacKKfpEHTJJprfTXKBauCCXmjG/dRGDnTp0=; b=F2j4EyCRQ4esZS5rbSoSjLJlVg1KyteIP6cE3LN9453W0Yd/gSP6kkCPlhrYoF10ZZ c5W6dVkzES8e65A8wNGFtVrk/aiFT2T5JMn8JeZXCeGEdzEiGvdYArUPLJ3tKsvYEQZH ggca4mYXT40ImHDmzrKFFaC279eH7JLC3d7b8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=oH5uSEXgacKKfpEHTJJprfTXKBauCCXmjG/dRGDnTp0=; b=kOV+IsjgBRmYc7FEXO8+byKyjIr2Sf6Yps4KYT+bzATgsUvhqQ+Qy3H4KAlaZXsn64 i+K2VHrd8gAFkoOOZaheJ7w2LetRt8rIO7Lwnz0ENFa/kjzWH8zyGm3yX48hRro9btPF meeB7dAHTvJMBN3raK+jLY5XmvSVAP1rGQOE8mY4zy5bK4I97Dfu02Xdfp7VZ++8Yvgk uIfzIWlSBwHnF+W4W7q/hKoGz6ZENIiLSO6VR57S4GSwmFsfFJGxg193KDKqk18CUlTY XaEdGvoueQPGGll40IqLNbigVIUQa45Xfg3E9mHmctIzCzNOFODfXKT2e7fka4WUBcfV gR8w== X-Gm-Message-State: AOAM533LXf7mtdbD+X4kuNLZbeDSajI8Jh0oAQnUcs3M80XTwYN0ktgT aRdWwJVpt+S/H+shoUkaYpG5Wg== X-Google-Smtp-Source: ABdhPJzEOdF+hiLQJ76yi5LDmB6MtapdNTYM8JdrFeaUFWEgT0fkKdgiPR7EJyZu6Oz5avgTWxcygQ== X-Received: by 2002:a17:90a:c981:b0:1e6:75f0:d4ea with SMTP id w1-20020a17090ac98100b001e675f0d4eamr215793pjt.37.1654708518745; Wed, 08 Jun 2022 10:15:18 -0700 (PDT) Received: from chromium.org (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id 190-20020a6219c7000000b005184c9c46dbsm15229447pfz.81.2022.06.08.10.15.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 10:15:17 -0700 (PDT) Date: Wed, 8 Jun 2022 17:15:16 +0000 From: Prashant Malani To: Krzysztof Kozlowski Subject: Re: [PATCH 3/7] dt-bindings: usb: Add Type-C switch binding Message-ID: References: <20220607190131.1647511-1-pmalani@chromium.org> <20220607190131.1647511-4-pmalani@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: heikki.krogerus@linux.intel.com, Andrzej Hajda , Neil Armstrong , David Airlie , "open list:DRM DRIVERS" , Laurent Pinchart , Krzysztof Kozlowski , Sam Ravnborg , Jernej Skrabec , Tzung-Bi Shih , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Thomas Zimmermann , =?iso-8859-1?Q?N=EDcolas_F=2E_R=2E_A=2E?= Prado , Jonas Karlman , swboyd@chromium.org, Pin-Yen Lin , Rob Herring , Maxime Ripard , Hsin-Yi Wang , Xin Ji , AngeloGioacchino Del Regno , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Robert Foss , =?iso-8859-1?Q?Jos=E9_Exp=F3sito?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Krzysztof, On Jun 08 11:18, Krzysztof Kozlowski wrote: > 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. I tried this initially, but dt_binding_check throws the following error: $ make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/usb/typec-switch.yaml LINT Documentation/devicetree/bindings CHKDT Documentation/devicetree/bindings/processed-schema.json /foo/linux/Documentation/devicetree/bindings/usb/typec-switch.yaml: properties:compatible: [{'enum': ['typec-switch']}] is not of type 'object', 'boolean' from schema $id: http://json-schema.org/draft-07/schema# SCHEMA Documentation/devicetree/bindings/processed-schema.json /foo/linux/Documentation/devicetree/bindings/usb/typec-switch.yaml: ignoring, error in schema: properties: compatible > > > + - 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. Will fix in v2. > > > + typecswitch { > > I guess here as well, so "usb-switch"? Same here, will fix with v2, along with 4-space indentation. > > > + 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E43B2C433EF for ; Wed, 8 Jun 2022 17:23:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230165AbiFHRXq (ORCPT ); Wed, 8 Jun 2022 13:23:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230123AbiFHRXM (ORCPT ); Wed, 8 Jun 2022 13:23:12 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 416943D3FF0 for ; Wed, 8 Jun 2022 10:15:19 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id 3-20020a17090a174300b001e426a02ac5so21253436pjm.2 for ; Wed, 08 Jun 2022 10:15:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=oH5uSEXgacKKfpEHTJJprfTXKBauCCXmjG/dRGDnTp0=; b=F2j4EyCRQ4esZS5rbSoSjLJlVg1KyteIP6cE3LN9453W0Yd/gSP6kkCPlhrYoF10ZZ c5W6dVkzES8e65A8wNGFtVrk/aiFT2T5JMn8JeZXCeGEdzEiGvdYArUPLJ3tKsvYEQZH ggca4mYXT40ImHDmzrKFFaC279eH7JLC3d7b8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=oH5uSEXgacKKfpEHTJJprfTXKBauCCXmjG/dRGDnTp0=; b=7UQpdLDZBtQMTuABZcLuR1dC06RgSHDrkUl3g36SZxYRI88wqBLtl0wiwr+nnQG0FD b89BWcaOib+EcmX+nts2r2bXhL1nN/M1MG1kPCTE8r+IB2AWTIj7Zhtk9YfDBIDCtVx3 sdAnY13obG+3tbiwqLSbCeWN5TdMwxtG2QUL78woUzTuMTVJjdx5q0OyMLIW7Uxk5fwH rueOSqv8VbqzrUVOS2hbOyOejYNhzLjLhMEgqg74fF79/dSOXJkwGI1pMPqTYirMP7oN 0II0SVEef64vTsoLl9RjayNsVIYdyMZluSL2Y2GJu+6GUeGI90iQ5h3kaXhma3Mq9fN6 fTIQ== X-Gm-Message-State: AOAM530/elGvi05buHIUu+ffOeNpgC2FdAD5ZnQCpCcpeU3VKO+vuZ7k LW+CYl9t2tA7AMXjHGNFikcPnA== X-Google-Smtp-Source: ABdhPJzEOdF+hiLQJ76yi5LDmB6MtapdNTYM8JdrFeaUFWEgT0fkKdgiPR7EJyZu6Oz5avgTWxcygQ== X-Received: by 2002:a17:90a:c981:b0:1e6:75f0:d4ea with SMTP id w1-20020a17090ac98100b001e675f0d4eamr215793pjt.37.1654708518745; Wed, 08 Jun 2022 10:15:18 -0700 (PDT) Received: from chromium.org (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id 190-20020a6219c7000000b005184c9c46dbsm15229447pfz.81.2022.06.08.10.15.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 10:15:17 -0700 (PDT) Date: Wed, 8 Jun 2022 17:15:16 +0000 From: Prashant Malani To: Krzysztof Kozlowski Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, 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 , =?iso-8859-1?Q?Jos=E9_Exp=F3sito?= , Krzysztof Kozlowski , Laurent Pinchart , Maxime Ripard , Neil Armstrong , =?iso-8859-1?Q?N=EDcolas_F=2E_R=2E_A=2E?= Prado , Pin-Yen Lin , Robert Foss , Rob Herring , Sam Ravnborg , Thomas Zimmermann , Tzung-Bi Shih , Xin Ji Subject: Re: [PATCH 3/7] dt-bindings: usb: Add Type-C switch binding Message-ID: References: <20220607190131.1647511-1-pmalani@chromium.org> <20220607190131.1647511-4-pmalani@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Krzysztof, On Jun 08 11:18, Krzysztof Kozlowski wrote: > 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. I tried this initially, but dt_binding_check throws the following error: $ make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/usb/typec-switch.yaml LINT Documentation/devicetree/bindings CHKDT Documentation/devicetree/bindings/processed-schema.json /foo/linux/Documentation/devicetree/bindings/usb/typec-switch.yaml: properties:compatible: [{'enum': ['typec-switch']}] is not of type 'object', 'boolean' from schema $id: http://json-schema.org/draft-07/schema# SCHEMA Documentation/devicetree/bindings/processed-schema.json /foo/linux/Documentation/devicetree/bindings/usb/typec-switch.yaml: ignoring, error in schema: properties: compatible > > > + - 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. Will fix in v2. > > > + typecswitch { > > I guess here as well, so "usb-switch"? Same here, will fix with v2, along with 4-space indentation. > > > + 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