From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Rob Herring <robh@kernel.org>
Cc: Prashant Malani <pmalani@chromium.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Tim Wawrzynczak <twawrzynczak@chromium.org>,
Benson Leung <bleung@chromium.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
Enric Balletbo i Serra <enric.balletbo@collabora.com>,
Guenter Roeck <groeck@chromium.org>
Subject: Re: [PATCH 1/2] dt-bindings: chrome: Add cros-ec-typec mux props
Date: Mon, 15 Jun 2020 13:24:08 +0300 [thread overview]
Message-ID: <20200615102408.GF3213128@kuha.fi.intel.com> (raw)
In-Reply-To: <CAL_Jsq+ORkzHchpD0qsH97zDJzXGj3jWy8=orXSVhNQd4kr9Kg@mail.gmail.com>
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
prev parent reply other threads:[~2020-06-15 10:24 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-22 22:22 [PATCH 1/2] dt-bindings: chrome: Add cros-ec-typec mux props Prashant Malani
2020-04-22 22:22 ` [PATCH 2/2] platform/chrome: typec: Register Type C switches Prashant Malani
2020-04-24 11:36 ` Heikki Krogerus
2020-04-29 22:22 ` Enric Balletbo i Serra
2020-04-29 23:02 ` Prashant Malani
2020-04-29 23:20 ` Enric Balletbo i Serra
2020-04-29 22:25 ` Enric Balletbo i Serra
2020-05-18 7:19 ` Prashant Malani
2020-04-23 2:59 ` [PATCH 1/2] dt-bindings: chrome: Add cros-ec-typec mux props Prashant Malani
2020-04-29 22:13 ` Enric Balletbo i Serra
2020-05-06 18:06 ` Benson Leung
2020-05-11 18:03 ` Prashant Malani
2020-05-11 19:28 ` Rob Herring
2020-05-11 20:46 ` Prashant Malani
2020-05-12 13:41 ` Heikki Krogerus
2020-05-14 18:16 ` Prashant Malani
2020-05-29 21:54 ` Rob Herring
2020-05-29 23:30 ` Prashant Malani
2020-06-09 20:30 ` Rob Herring
2020-06-09 23:57 ` Prashant Malani
2020-06-10 15:33 ` Heikki Krogerus
2020-06-10 16:53 ` Rob Herring
2020-06-10 17:48 ` Prashant Malani
2020-06-11 20:00 ` Rob Herring
2020-06-12 17:34 ` Prashant Malani
2020-06-15 13:22 ` Heikki Krogerus
2020-06-18 18:59 ` Prashant Malani
2020-06-29 20:41 ` Prashant Malani
2020-07-10 8:51 ` Prashant Malani
2020-07-17 18:04 ` Prashant Malani
2020-06-12 12:46 ` Heikki Krogerus
2020-06-12 14:20 ` Rob Herring
2020-06-15 10:24 ` Heikki Krogerus [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200615102408.GF3213128@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=bleung@chromium.org \
--cc=devicetree@vger.kernel.org \
--cc=enric.balletbo@collabora.com \
--cc=groeck@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmalani@chromium.org \
--cc=robh@kernel.org \
--cc=twawrzynczak@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox