From: Luca Weiss <luca.weiss@fairphone.com>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Bjorn Andersson <andersson@kernel.org>
Cc: ~postmarketos/upstreaming@lists.sr.ht,
phone-devel@vger.kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
devicetree@vger.kernel.org, Luca Weiss <luca.weiss@fairphone.com>
Subject: [PATCH 0/3] Handle reversed SBU orientation for FSA4480
Date: Fri, 13 Oct 2023 13:38:04 +0200 [thread overview]
Message-ID: <20231013-fsa4480-swap-v1-0-b877f62046cc@fairphone.com> (raw)
Short reason:
Without swapping the SBU lanes, on QCM6490 Fairphone 5 the
DisplayPort-over-USB-C doesn't work.
The Orient-Chip OCP96011 used in this phone is generally compatible with
FSA4480 but has a difference how AUX+/- should be connected to SBU1/2.
Long explanation, with my current understanding:
* FSA4480 block diagram shows AUX+ connected to SBU2 and AUX- to SBU1.
* OCP96011 block diagram shows AUX+ connected to SBU1 and AUX- to SBU2
(it's not 100% clear though in the picture but makes sense with the
observed behavior)
* Fairphone 5 schematics have AUX+ connected to SBU2 and AUX- to SBU1,
which would be correct for FSA4480 but since OCP96011 is used (which
expects it to be the other way around) the Linux driver needs to
reverse it.
If AUX+ would be connected to SBU1 and AUX- to SBU2 as shown in the
OCP96011 block diagram, then no driver/dts change would be needed.
Not sure if I've implemented the best solution in this patch. Other
solutions I could think of are:
* Add some custom boolean property to the node, e.g. 'fsa,swap-sbu'
* Reverse when ocs,ocp96011 compatible is used. This would be incorrect
since when following the OCP96011 block diagram no reversing would be
needed, as explained above.
However I think the current solution with data-lanes in the endpoint is
the best fit and is also already used for a similar purpose in another
USB mux driver.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Luca Weiss (3):
dt-bindings: usb: fsa4480: Add data-lanes property to endpoint
usb: typec: fsa4480: Add support to swap SBU orientation
dt-bindings: usb: fsa4480: Add compatible for OCP96011
.../devicetree/bindings/usb/fcs,fsa4480.yaml | 43 +++++++++++-
drivers/usb/typec/mux/fsa4480.c | 81 ++++++++++++++++++++++
2 files changed, 121 insertions(+), 3 deletions(-)
---
base-commit: e3b18f7200f45d66f7141136c25554ac1e82009b
change-id: 20231013-fsa4480-swap-9b0f76d73c19
Best regards,
--
Luca Weiss <luca.weiss@fairphone.com>
next reply other threads:[~2023-10-13 11:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-13 11:38 Luca Weiss [this message]
2023-10-13 11:38 ` [PATCH 1/3] dt-bindings: usb: fsa4480: Add data-lanes property to endpoint Luca Weiss
2023-10-16 14:22 ` Rob Herring
2023-10-16 14:32 ` Neil Armstrong
2023-10-17 19:12 ` Rob Herring
2023-10-13 11:38 ` [PATCH 2/3] usb: typec: fsa4480: Add support to swap SBU orientation Luca Weiss
2023-10-13 12:39 ` Neil Armstrong
2023-10-17 9:01 ` Heikki Krogerus
2023-10-17 10:17 ` Luca Weiss
2023-10-18 7:10 ` Heikki Krogerus
2023-10-13 11:38 ` [PATCH 3/3] dt-bindings: usb: fsa4480: Add compatible for OCP96011 Luca Weiss
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=20231013-fsa4480-swap-v1-0-b877f62046cc@fairphone.com \
--to=luca.weiss@fairphone.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=phone-devel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).