Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1554999ybt; Mon, 15 Jun 2020 03:26:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzHUiN703+nKKqlSY4PyIFS7BYtXwYoTS5BjTBKSHh29DzAGF1rv4oDtvKRSJfp6X4nrsH X-Received: by 2002:a17:906:8684:: with SMTP id g4mr23708140ejx.431.1592216811499; Mon, 15 Jun 2020 03:26:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592216811; cv=none; d=google.com; s=arc-20160816; b=cyeC5xfLD8/K3L1on5ZyjBx/onfw8C3w64X0VMIOgWNlOL7SLfMug2E8k/rcz61w9w Lh6kOEOQH/J1lHY//iz+ut7wZ8l6l5N/e/y1kZdT2l6m5xRVhF9192FKYPjJTQ9E21Uh 4YJ/kkiCLRn73qo1/uMrbynEDS9VuzoaCa1t33Z+fp7axCIRr/HdElw4IKqBss32tXe6 7lSk+ZARAWvLfJvLg18pHAYLz20dBv8G8lvgjFatsCpt5aS2FPCt+TjQfynQyOCzsHu6 K0+AsWKQ5wHUXXplQiec0YT5ZaDJB6I59bR7MkojUKgM9jr5NGKnePZS23fLHfk+8EXI 8eSg== 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 :ironport-sdr:ironport-sdr; bh=9lf9yMlPLD0SOGm0E7CoUdHCbpT/l9YQsxxgUGeo6vw=; b=h28jSwUGJHiIUPJfR9Pc2d6zv6vwK3bfKJANkdhAQro8dT4+x+jpCjjJJwD1jcuVe5 6zG4OWRYXXmbHtLBgHNo9x+IZBQF8vWv/ZGaWCBLTWd+TzDPdJSVYW21ZcIrv2nsmK/a kxIoiZISpHZ5R9B23JX+L/dCJIVYQFe+DyzZQyrKRRDFll+szLCBPdHrbPinxstRTomq XZqNImelTkqvhPQXjRq0+kbANKHx/HgtkRumNQo0udI7pmDfMSOcLhqvh+u0Sz4IVcFO lPwhPhHiocAT2OOA5xmjU/zcAHo7b/tOc/H2Q0qgc0dJvIntvkt40FYyvf2mAd7WqFzr pD4w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l13si8700714ejx.63.2020.06.15.03.26.28; Mon, 15 Jun 2020 03:26:51 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729027AbgFOKYi (ORCPT + 99 others); Mon, 15 Jun 2020 06:24:38 -0400 Received: from mga05.intel.com ([192.55.52.43]:44816 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728368AbgFOKYZ (ORCPT ); Mon, 15 Jun 2020 06:24:25 -0400 IronPort-SDR: xTQoMOai+79a0VMSW6vB0JQ2mLh6f5u76zxCxoCKDMriqo4vIaKZTd3zuDeKz7uUFRfixzkUXJ N1s0U51xfpTg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2020 03:24:12 -0700 IronPort-SDR: QHNkefPRDepG2BFbs+0Y3tudqdRM70isz34I66Nj59VSt0I2p9Zdf+zIemowO/QBeLIhyjg6m4 BbuWOJYUhU6w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,514,1583222400"; d="scan'208";a="382505677" Received: from kuha.fi.intel.com ([10.237.72.162]) by fmsmga001.fm.intel.com with SMTP; 15 Jun 2020 03:24:09 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Mon, 15 Jun 2020 13:24:08 +0300 Date: Mon, 15 Jun 2020 13:24:08 +0300 From: Heikki Krogerus To: Rob Herring Cc: Prashant Malani , "linux-kernel@vger.kernel.org" , Tim Wawrzynczak , Benson Leung , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Enric Balletbo i Serra , Guenter Roeck Subject: Re: [PATCH 1/2] dt-bindings: chrome: Add cros-ec-typec mux props Message-ID: <20200615102408.GF3213128@kuha.fi.intel.com> References: <20200511204635.GC136540@google.com> <20200512134154.GC2085641@kuha.fi.intel.com> <20200609235740.GA154315@google.com> <20200610153356.GC3213128@kuha.fi.intel.com> <20200612124634.GD3213128@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, > > Either I'm missing something, or the devicetree description of the > > Type-C connectors really is way too complex, way too "low level", > > causing us potential problems without providing anything that we could > > actually ever use in the operating system. > > Well, all bindings are a balancing act of being flexible enough vs. > high-level enough to be stable. What I need is something that's going > to work for everyone, not just CrOS. Adding a new property at time is > death by 1000 cuts and usually a sign of someone only fixing their own > immediate problem. If you referring to the phandles that are related to the muxes, then those we will need. Those phandles point to the components that can configure the muxes, but those components are not the muxes themselves. On these platforms the muxes can not be configured directly, and this is by the way the normal setup these days. I have even alternate mode adapters that do not configure the mux directly from the microcontroller. So we are not talking about the first platform with this setup here. The problem is that these components are not physically connected to the connector, so we can't place them to the OF graph. The mux should be placed into the graph (we may not be able to configure the muxes, but we may still be able to read their status), but these components should not. I was really hoping that we could follow the "mux-controller" bindings, but it just did not feel it would work perfectly with these components that are not exactly the mux-controllers, but more like proxies to the actual mux-controllers. We could probable ignore that fact if the real mux-controllers were not visible to us, but unfortunately they are visible to us. More importantly, the "muxes" that we need to use with USB Type-C connectors will not always be actual muxes at all. Depending on the platform, for example the USB role switching will be handled by a mux, or a dual-role capable USB controller. But I'm open for suggestions here. The only thing that I can say for sure about this is that we can't rely on OF graph with the muxes. Right now I actually only have a wish that we had a reference array that would hold all the phandles to the components that can configure the lines behind the connector a bit like in mux bindings, but regardless of were they real muxes, "proxy" to the muxes, or anything else. Then we would need to define also somekind of device property for each known function, like "orientation", "role" and so on, that would return index to the component (mux, or what ever it is) in the reference array that can handle that particular function. I also don't feel comfortable using the name "mux" with these because, they really will not always be muxes. That's why I talk about switches, though I'm not sure if that's any better. Sorry about the long mail. thanks, -- heikki