Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp641279ybg; Fri, 12 Jun 2020 10:37:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPzZL3HtffF2QFtwsGmMnCXgvhYcd9w9gA3uGPve8bwJH1eOw6gRykK9E1FhIVE5jrFkpz X-Received: by 2002:a50:bf03:: with SMTP id f3mr13302638edk.368.1591983438509; Fri, 12 Jun 2020 10:37:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591983438; cv=none; d=google.com; s=arc-20160816; b=p/yiBiKqZDLbbx8+uhu2+QIb3VVxPRfJfyFoD6M2LpH5k3yptyRieZlNTkSX4v/N/S qky6sCKyMkNXh2r/A9gPZ7GiSv2DKrdIWlv02QFt9oxcSQad63LWGF7A0KxQj3kcksMt yOyONSm8inlm6KhgAGoz4+X8S2/ftxbkPRPPYA/q2AiUmBxmsimkJ0w/k9N8ZJTHlVUP Bex2AEBrddf+fnUBRmuejhVyYtcSDklPdE71vvWqBDAQhx+8RXELVPnOl2313APOtn8C eOVpSrVpzOHp8k11TIwHslZaETu2MszSzVL8pc6Wl3dhhdfG4Wfa96ktk/crBrJbcy4I qIyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=O3A9kqksUUGvdliaTj1158oQyu0tKFSE0txFn2JVaGo=; b=qg9iJboFTeYZyyc7UCMbPczC3dZkT5iw8ZlFUsOwzfoj7DObJ/m1eWQZpZk4NURVdL M5aZQXkeYUtkhyVriHt6xI8X5BU7yUhehSl1PXubjx6QtG/ScgqV4NEQpDayk/63TUWE t7bmqsmx1T9V6S7iZXvBdZBDNwjd5h8H9dSppBwbZ9nL8UmvIGYeYo6/L4phVQE1erSr j/04PZ/JICJR5vOvmPCBPeiyGmVPls5pqopsk84Zs89KoitdmPmomO+nhv3FB/P6Lb+J mbVIOyuQePBdEWByxxfhQLwXtqcp6k76PKWdgmh+TXo6Gx3a4D7KV6jFd1w69ZdMd/HZ 05fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=XbRN0hQS; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x10si4392427ejc.477.2020.06.12.10.36.55; Fri, 12 Jun 2020 10:37:18 -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=@chromium.org header.s=google header.b=XbRN0hQS; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726308AbgFLReK (ORCPT + 99 others); Fri, 12 Jun 2020 13:34:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726108AbgFLReI (ORCPT ); Fri, 12 Jun 2020 13:34:08 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C7F8C03E96F for ; Fri, 12 Jun 2020 10:34:08 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id 10so4618066pfx.8 for ; Fri, 12 Jun 2020 10:34:08 -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=O3A9kqksUUGvdliaTj1158oQyu0tKFSE0txFn2JVaGo=; b=XbRN0hQSE+gVdn/cNLHWHpEMCANqatGirZWTgJFnhn32pjwblWKjnxT4fH+Q67LsUH s4DP0Sk7hQUA7giCY6dfCeCkkv7SvaXCdrVWcVxNoirfUuus11d+nuuRt8q4fcbaUPiB QdJVP5IUllFct+yxKzUwbXLkb2ER45dtLQuWU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=O3A9kqksUUGvdliaTj1158oQyu0tKFSE0txFn2JVaGo=; b=lQ8Iu/THfYXpLUgUfB8tHNJQjUaft3BE7dvMXkZ9nmlfl+mDkiTvqJAtY4U+d0vJs5 sYtkZjMODofYaQpBwbwPF7YtsbK9VcDDSMcIbarVQh1T+95fQo9rFcG1JqjzFJTpDKo7 Eiiq5DKP1HNhF2wTg2AhtWh0b/sE+7hVhSXpHsO2+nm7h+qgd37tROjQSdpQJWDWa/Hr u4HjRZHvbaH08Fsf/eD/8ZGeXfeNfDLO8YjpGi7inlomqCMJSiZ8V0P4NJ/OG1VdZDl0 MLsV1LDASBRFDSCjkmhDYltPxAGgf/5owfYuUE52c9wMko74q25yfGZk6UKTyWvThIxn dCwg== X-Gm-Message-State: AOAM530NK2PQx/y6m+1JxZdH6OTAh8IDvsb13l7nhJFDFwpuzJ7NKfEj 1xsm+ktstyj62Sba92xKRhDKuQ== X-Received: by 2002:a63:7409:: with SMTP id p9mr9764759pgc.6.1591983247727; Fri, 12 Jun 2020 10:34:07 -0700 (PDT) Received: from google.com ([2620:15c:202:201:476b:691:abc3:38db]) by smtp.gmail.com with ESMTPSA id b11sm6705969pfr.58.2020.06.12.10.34.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 10:34:07 -0700 (PDT) Date: Fri, 12 Jun 2020 10:34:06 -0700 From: Prashant Malani To: Rob Herring Cc: Heikki Krogerus , "linux-kernel@vger.kernel.org" , Tim Wawrzynczak , Benson Leung , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Enric Balletbo i Serra , Guenter Roeck , Rajmohan Mani Subject: Re: [PATCH 1/2] dt-bindings: chrome: Add cros-ec-typec mux props Message-ID: References: <20200511204635.GC136540@google.com> <20200512134154.GC2085641@kuha.fi.intel.com> <20200609235740.GA154315@google.com> <20200610153356.GC3213128@kuha.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, Thanks as always for your help in reviewing this proposal! Kindly see inline (Trimming text); On Thu, Jun 11, 2020 at 02:00:47PM -0600, Rob Herring wrote: > On Wed, Jun 10, 2020 at 11:49 AM Prashant Malani wrote: > > > > Hi Rob, > > > > On Wed, Jun 10, 2020 at 9:53 AM Rob Herring wrote: > > > > > > > On Tue, Jun 09, 2020 at 04:57:40PM -0700, Prashant Malani wrote: > > > > I think the updated example handles this grouping (port@1 going to a > > "SS mux") although as you said it should probably be a group of muxes, > > but I think the example illustrates the point. Is that assessment > > correct? > > Yes, but let's stop calling it a mux. It's a "USB Type C signal routing blob". Ack. Let's go with "-switch" ? That's what the connector class uses and it conveys the meaning (unless that is a reserved keyword in DT). > > > Would this block the addition of the "*-switch" properties? IIUC the > > two are related but not dependent on each other. > > > > The *-switch properties are phandles which the Type C connector class > > framework expects (and uses to get handles to those switches). > > These would point to the "mux" or "group of mux" abstractions as noted earlier. > > You don't need them though. Walk the graph. You get the connector > port@1 remote endpoint and then get its parent. > I see; would it be something along the lines of this? (DT example follows; search for "example_end" to jump to bottom): connector@0 { compatible = "usb-c-connector"; reg = <0>; power-role = "dual"; data-role = "dual"; try-power-role = "source"; .... ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; usb_con_hs: endpoint { remote-endpoint = <&foo_usb_hs_controller>; }; }; port@1 { reg = <1>; #address-cells = <1>; #size-cells = <0>; usb_con0_ss_mode: endpoint@0 { reg = <0> remote-endpoint = <&mode_switch_ss_in>; }; usb_con0_ss_orientation: endpoint@1 { reg = <1> remote-endpoint = <&orientation_switch_ss_in>; }; usb_con0_ss_data_role: endpoint@2 { reg = <2> remote-endpoint = <&data_role_switch_in>; }; }; port@2 { reg = <2>; #address-cells = <1>; #size-cells = <0>; usb_con0_sbu_mode: endpoint@0 { reg = <0> remote-endpoint = <&mode_switch_sbu_in>; }; usb_con0_sbu_orientation: endpoint@1 { reg = <1> remote-endpoint = <&orientation_switch_sbu_in>; }; }; }; }; mode_switch { compatible = "typec-mode-switch"; mux-controls = <&mode_mux_controller>; mux-control-names = "mode"; #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; mode_switch_ss_in: endpoint { remote-endpoint = <&usb_con0_ss_mode> }; }; port@1 { reg = <1>; mode_switch_out_usb3: endpoint { remote-endpoint = <&usb3_0_ep> }; }; port@2 { reg = <2>; mode_switch_out_dp: endpoint { remote-endpoint = <&dp0_out_ep> }; }; port@3 { reg = <3>; mode_switch_sbu_in: endpoint { remote-endpoint = <&usb_con0_sbu_mode> }; }; // ... other ports similarly defined. }; orientation_switch { compatible = "typec-orientation-switch"; mux-controls = <&orientation_mux_controller>; mux-control-names = "orientation"; #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; orientation_switch_ss_in: endpoint { remote-endpoint = <&usb_con0_ss_orientation> }; }; port@1 reg = <1>; orientation_switch_sbu_in: endpoint { remote-endpoint = <&usb_con0_sbu_orientation> }; }; // ... other ports similarly defined. }; data_role_switch { compatible = "typec-data-role-switch"; mux-controls = <&data_role_switch_controller>; mux-control-names = "data_role"; port { data_role_switch_in: endpoint { remote-endpoint = <&usb_con0_ss_data_role> }; }; }; Would this be conformant to OF graph and usb-connector bindings requirements? We'll certainly send out a format PATCH/RFC series for this, but I was hoping to gauge whether we're thinking along the right lines. So, in effect this would mean: - New bindings(and compatible strings) to be added for: typec-{orientation,data-role,mode}-switch. - Handling in Type C connector class to parse switches from OF graph. - Handling in Type C connector class for distinct switches for port@1 (SS lines) and port@2 (SBU lines). The only thing I'm confused about is how we can define these switch remote-endpoint bindings in usb-connector.yaml; the port can have an remote-endpoint, but can we specify what the parent of the remote-endpoint should have as a compatible string? Or do we not need to? Best regards, -Prashant