Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5414145ybv; Tue, 11 Feb 2020 15:25:54 -0800 (PST) X-Google-Smtp-Source: APXvYqzbzJF3QPFMzGe8n7IYV05VMC3KEeNhXZMk7LVarzhpGEMGyW2a39DBtDC43HTuyKMlOXPl X-Received: by 2002:a9d:6b12:: with SMTP id g18mr6844438otp.211.1581463554351; Tue, 11 Feb 2020 15:25:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581463554; cv=none; d=google.com; s=arc-20160816; b=w/IKUdE5ThFwusStUr9e+ht9JZ2jFDxqcdGStm+P1alhFp/4oVlilJT6BgouF3ZVC9 tFSBP6RHHuUZVJ3DWmSKhEDa20QJXq1P1MX8ZJm0iifPzZq2EK0V3QkPf7bYymbvRG7G nC3MtqoQtALcy0glxpQgg2YtPu/Y2AkmVD82s+GExAVsD0QUc1Tp17mbqO4/bku3in5t agtqWDl2e8u4m7dgoV7wHcawrtcSbphmytCTO0KN4ynTK2+IeuyskPCBhj/SohoHROQ/ McCqkNxMeHIP7Y3LVbRHawPDUSJvNwinpAM404FmFEtAjL+2o775W3cu+ueigkWXWrF1 2vRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=2Rn1hNfPgsPh5RIe2Tr74IC6enStkIEra/fBMTmMQbY=; b=Ghre3+uShWttVIlyez+D8dlJDAxIWplmsF/2bacpuAKqrvYUfU8huDPs58xoo/h56x eDu2UVXBkcMpZn+1bFYjpPgDpytt8oahcPoNJpmb5oKSoc8yyluPvP9W+YiHXhgOZsUP soTDyLdGIK5DIIRfXBqQq5vzEmLQSixSEwBheoDWUd7m2RXxiQixXOgF4UaZEyH2I9+m YI+cB0rO/3K1kR8P8eG4PsFC2F+WLaVeG5QkmtsWC50zEmBW5DeyYN94BFbofbhOtKs1 YvFWA3SK8rvS55wayDbECZH1PsZKzQHs2DJRc5x2eyHnEuk5PlNq0YdCtrrO5z1isxaP qlyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=U5XTL5ri; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q189si2316732oic.235.2020.02.11.15.25.41; Tue, 11 Feb 2020 15:25:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=U5XTL5ri; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727911AbgBKXZ1 (ORCPT + 99 others); Tue, 11 Feb 2020 18:25:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:49768 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727597AbgBKXZ1 (ORCPT ); Tue, 11 Feb 2020 18:25:27 -0500 Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 886FF20842; Tue, 11 Feb 2020 23:25:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581463526; bh=8+QEMo0KaGrsQjqAphm6GxLxfHtuCWMrnJmpQjbwK/g=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=U5XTL5riMETDn7faoSi8Pnp1Px8TtrAUjPASWkZ48Csm8C17M0h/f5H02c1oTu7Bj YLCaTDvUcL0k0QGpOtCw1hr4BFTTipSyF4zvsxGjFqNkpCQz6svyCfp+ycKAnP8zjp XJPgTZqSgSJ75nAOl+T1YBlRCwO8V2cunXC07l4k= Received: by mail-qt1-f176.google.com with SMTP id e21so187717qtp.13; Tue, 11 Feb 2020 15:25:26 -0800 (PST) X-Gm-Message-State: APjAAAXrkuJynduuEysHq34SG0pNlSXqutZ3CubcImPyAY4MoyNh3HxD aGW9ZKWy4UU3ZuDG6dCFTHoOowoRwB9INARm/g== X-Received: by 2002:ac8:1415:: with SMTP id k21mr4831678qtj.300.1581463525519; Tue, 11 Feb 2020 15:25:25 -0800 (PST) MIME-Version: 1.0 References: <20200207203752.209296-1-pmalani@chromium.org> <20200207203752.209296-2-pmalani@chromium.org> In-Reply-To: <20200207203752.209296-2-pmalani@chromium.org> From: Rob Herring Date: Tue, 11 Feb 2020 17:25:13 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/4] dt-bindings: Add cros-ec Type C port driver To: Prashant Malani Cc: "linux-kernel@vger.kernel.org" , heikki.krogerus@intel.com, Enric Balletbo i Serra , Benson Leung , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Guenter Roeck , Mark Rutland Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 7, 2020 at 2:39 PM Prashant Malani wrote: > > Some Chrome OS devices with Embedded Controllers (EC) can read and > modify Type C port state. > > Add an entry in the DT Bindings documentation that lists out the logical > device and describes the relevant port information, to be used by the > corresponding driver. > > Signed-off-by: Prashant Malani > --- > > Changes in v2: > - No changes. Patch first introduced in v2 of series. > > .../bindings/chrome/google,cros-ec-typec.yaml | 77 +++++++++++++++++++ > 1 file changed, 77 insertions(+) > create mode 100644 Documentation/devicetree/bindings/chrome/google,cros-ec-typec.yaml > > diff --git a/Documentation/devicetree/bindings/chrome/google,cros-ec-typec.yaml b/Documentation/devicetree/bindings/chrome/google,cros-ec-typec.yaml > new file mode 100644 > index 00000000000000..46ebcbe76db3c2 > --- /dev/null > +++ b/Documentation/devicetree/bindings/chrome/google,cros-ec-typec.yaml > @@ -0,0 +1,77 @@ > +# SPDX-License-Identifier: GPL-2.0 > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/chrome/google,cros-ec-typec.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Google Chrome OS EC(Embedded Controller) Type C port driver. > + > +maintainers: > + - Benson Leung > + - Prashant Malani > + > +description: > + Chrome OS devices have an Embedded Controller(EC) which has access to > + Type C port state. This node is intended to allow the host to read and > + control the Type C ports. The node for this device should be under a > + cros-ec node like google,cros-ec-spi. > + > +properties: > + compatible: > + const: google,cros-ec-typec > + > + port: > + description: A node that represents a physical Type C port on the > + device. > + type: object > + properties: > + port-number: > + description: The number used by the Chrome OS EC to identify > + this type C port. > + $ref: /schemas/types.yaml#/definitions/uint32 > + power-role: > + description: Determines the power role that the Type C port will > + adopt. > + oneOf: > + - items: > + - const: sink > + - const: source > + - const: dual > + data-role: > + description: Determines the data role that the Type C port will > + adopt. > + oneOf: > + - items: > + - const: host > + - const: device > + - const: dual > + try-power-role: > + description: Determines the preferred power role of the Type C port. > + oneOf: > + - items: > + - const: sink > + - const: source > + - const: dual > + > + required: > + - port-number > + - power-role > + - data-role > + - try-power-role > + > +required: > + - compatible > + - port > + > +examples: > + - |+ > + typec { > + compatible = "google,cros-ec-typec"; > + > + port@0 { 'port' is reserved for OF graph binding which this is not. > + port-number = <0>; > + power-role = "dual"; > + data-role = "dual"; > + try-power-role = "source"; These are usb-connector binding properties, but this is not a usb-connector node. However, I think it should be. The main thing to work out seems to be have multiple connectors. With your binding, how does one associate the USB host controller with each port/connector? That's a solved problem with the connector binding. Rob