Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp889760ybm; Fri, 29 May 2020 14:57:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHHl1g+Kj9i/O1zwomDMVChnR5pvSAs4GMEyfk3F6GeI/lR5Wug2Cgpc2C9QPwb4reeFft X-Received: by 2002:a17:906:6dcf:: with SMTP id j15mr4719350ejt.270.1590789457441; Fri, 29 May 2020 14:57:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590789457; cv=none; d=google.com; s=arc-20160816; b=n58SAyqHtaP61I8rNOzgkAqUoH/AM5g4fwj2PzHmGQFc9HEmDUtIN5WFo915DH6kK0 Qp/3DfP47dZ0A/ZPbsY9pRjFUxJbJlttfRPM6Axq2Nh5lFHSIUnV7nSaoq4HcWHhaYAQ Grye79Ppyill55jDtYl3OEVcVSO4NFGvh6/WdYQiN6uD78Ik+jhowy2IQAiCvQGuLDdn 2uENXPFN3jQB+Kn7nJsWPH+rL28ctSl9aTQGrPrxuoxNZVPy9hFmQ0xCB9iIl9fsnNl3 eZHZ0mIt6a+di1e3mCltB+EDW2SLGa/nWb7SF81E0nAM9Aj8S7EKDHiSSZwrvwqUh4E4 Iuvg== 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=gf/XwIQkOXjfgnawpCU/IbkKQBU9zkM+B1VWTEME/8o=; b=G01fvpYdN2K+jAWnjeqfGrEnGG1Adf1xB2TgdmWQLYY1m508BU0ofzJN/1Y9iiSAis HNIeDCyo+HFR56CTXBwPfU+1qD4+LmFpItYaw+YCT20zCI+TMkl2V5KAFlDJXeVbavK7 ny3Okv7lZTGcWzbRG3PA3WquSm9I3T+R63gh1j4s4aU+kdPh8XowcwtRKpLCdiypd9Qz Wqxv+12LlDdZbCQI40ijzQPjsnopkW/u8cRQhoH6qlttEbh0zPKDb/TxMVRiJUgtd1rQ loEjcqwOsZ3wOM6JMQtqm8cUIRXdocmwvzVHnQvexr4u8MWxLEctROfElqarAJB5X5OC 4V4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Vl65MHJ2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id t15si6201844edw.497.2020.05.29.14.57.13; Fri, 29 May 2020 14:57:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Vl65MHJ2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728395AbgE2VzE (ORCPT + 99 others); Fri, 29 May 2020 17:55:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:47190 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726975AbgE2VzD (ORCPT ); Fri, 29 May 2020 17:55:03 -0400 Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) (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 ABE4920897; Fri, 29 May 2020 21:55:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590789302; bh=90nMNMJZG3bE6EONlBgplDhLtYLcosIsBsMQPBXQX5I=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Vl65MHJ2VWrBN3QVABldy5J+oYUDjGIJIdHVsGWB4EAqqA2wh8iDjxttk1uv/G8u6 AfNomewL5esdgfno+4IYHbkNA+dfyvq6dWntRDcXdSGAHjNl7sn00mnZPyLxEX/ZFi iatsQ0JyWihsGNcSybTjTPM1Pq70976o+gyQEymY= Received: by mail-oi1-f179.google.com with SMTP id b3so3917849oib.13; Fri, 29 May 2020 14:55:02 -0700 (PDT) X-Gm-Message-State: AOAM531eUE/8JyOiHZu87vlJ31e9JONAkvGGOlzsWLfcTs91A2RZ+iOZ 5tlnRTGw4Yc2W7tN1wxRTmskGYwKbdBl6mofLA== X-Received: by 2002:aca:564a:: with SMTP id k71mr7374718oib.147.1590789301910; Fri, 29 May 2020 14:55:01 -0700 (PDT) MIME-Version: 1.0 References: <20200422222242.241699-1-pmalani@chromium.org> <20200511192800.GA28762@bogus> <20200511204635.GC136540@google.com> <20200512134154.GC2085641@kuha.fi.intel.com> In-Reply-To: <20200512134154.GC2085641@kuha.fi.intel.com> From: Rob Herring Date: Fri, 29 May 2020 15:54:50 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] dt-bindings: chrome: Add cros-ec-typec mux props To: Heikki Krogerus Cc: Prashant Malani , "linux-kernel@vger.kernel.org" , twawrzynczak@chromium.org, Benson Leung , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Enric Balletbo i Serra , Guenter Roeck 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 Tue, May 12, 2020 at 7:42 AM Heikki Krogerus wrote: > > Hi guys, > > On Mon, May 11, 2020 at 01:46:35PM -0700, Prashant Malani wrote: > > Hi Rob, > > > > Thank you for reviewing the patch. Kindly see my comments inline: > > > > On Mon, May 11, 2020 at 02:28:00PM -0500, Rob Herring wrote: > > > On Wed, Apr 22, 2020 at 03:22:39PM -0700, Prashant Malani wrote: > > > > Add properties for mode, orientation and USB data role switches for > > > > Type C connectors. When available, these will allow the Type C connector > > > > class port driver to configure the various switches according to USB PD > > > > information (like orientation, alt mode etc.) provided by the Chrome OS > > > > EC controller. > > > > > > > > Signed-off-by: Prashant Malani > > > > --- > > > > .../bindings/chrome/google,cros-ec-typec.yaml | 27 ++++++++++++++++++- > > > > 1 file changed, 26 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/Documentation/devicetree/bindings/chrome/google,cros-ec-typec.yaml b/Documentation/devicetree/bindings/chrome/google,cros-ec-typec.yaml > > > > index 6d7396ab8bee..b5814640aa32 100644 > > > > --- a/Documentation/devicetree/bindings/chrome/google,cros-ec-typec.yaml > > > > +++ b/Documentation/devicetree/bindings/chrome/google,cros-ec-typec.yaml > > > > @@ -21,7 +21,21 @@ properties: > > > > const: google,cros-ec-typec > > > > > > > > connector: > > > > - $ref: /schemas/connector/usb-connector.yaml# > > > > + allOf: > > > > + - $ref: /schemas/connector/usb-connector.yaml# > > > > + - type: object > > > > + properties: > > > > > > These don't seem CrOS EC specific, so why document them as such. > > > > Are you referring to the "mode-switch", "orientation-switch" and > > "usb-role-switch" properties? If so, then yes, they aren't Cros EC > > specific. The Type C connector class framework requires the nodes to be > > named like this, and the cros-ec-typec driver uses this framework, hence > > the description here (the Type C connector class framework doesn't have > > any bindings). > > > > Would it be better to add in the description string that Type Connector > > class expects these switches to be named this way? : > > > > " Reference to a DT node for the USB Type C Multiplexer controlling the > > data lines routing for this connector. This switch is assumed registered > > with the Type C connector class framework, which requires it to be named > > this way." > > > > > > > + mode-switch: > > > > + description: Reference to a DT node for the USB Type C Multiplexer > > > > + controlling the data lines routing for this connector. > > > > > > This is for alternate mode muxing I presume. > > > > Yes, that's right. > > > > > > We already have a mux-control binding. Why not use that here? > > > > Heikki might be able to offer more insight into why this is the case, > > since the connector class framework seems to expect a phandle and for > > the device driver to implement a "set" command. Heikki, would you happen to know? > > The mode-switch here would actually represent the "consumer" part in > the mux-control bindings. So the mux-controls would describe the > relationship between the "mode-switch" and the mux controller(s), > while the mode-switch property describes the relationship between > something like USB Type-C Port Manager (or this cros_ec function) and > the "mux consumer". The "USB Type-C Port Manager" is not just the parent node in your case? Can you point me to what you expect your DT to look like showing the mode switch node, the connector, the USB host(s), and the DP/HDMI bridge/output? Rob