From: Stephen Boyd <stephen.boyd-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Peter Chen <Peter.Chen-3arQi8VN3Tc@public.gmane.org>,
Andy Gross <andy.gross-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Rob Clark <robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
Peter Rosin <peda-koto5C5qi+TLoDKTGw+V6w@public.gmane.org>
Subject: [PATCH 0/3] USB Mux support for Chipidea
Date: Tue, 11 Jul 2017 18:02:52 -0700 [thread overview]
Message-ID: <20170712010255.26855-1-stephen.boyd@linaro.org> (raw)
This patchset adds support for the TC7USB40MU usb mux found on
db410c 96boards platforms via the new multiplexer framework and
hooks that into the chipidea driver. This allows us to properly
control host or device mode on this board via the sysfs knob.
So far I've only tested this on db410c, and there are some rough
edges to finish off before it can merge. Also I'm experiencing
odd behavior with switching the role while gadget is enabled and
the micro-usb cable is kept connected. Not sure what's wrong but
it seems like the gadget never gets disconnected? I'll investigate
more.
TODO:
1. The mux framework has to be selected for consumers to use it. We'll
need some stubs in the consumer header file to allow compilation to
continue without mux always enabled by consumers.
2. We probably need some sort of mux_control_get_optional() API so that
we know if there was an error getting the mux control, instead of just
ignoring errors. For now I can pass up EPROBE_DEFER errors and ignore
other errors and consider it "missing from DT".
3. Maybe we can get rid of the mux driver and just use mux-gpio.c with
a compatible string update? I split it off because we may want to
support the "S" pin on the TC7USB40MU one day that shuts off both
mux outputs.
4. The userspace side of things is murky. What is expected to go and toggle
the host/gadget side of things in userspace at this very specific location
for chipidea devices?
Stephen Boyd (3):
usb: misc: Add a driver for TC7USB40MU
usb: chipidea: Hook into mux framework to toggle usb switch
arm64: dts: qcom: Collapse usb support into one node
.../devicetree/bindings/usb/ci-hdrc-usb2.txt | 8 +++
.../devicetree/bindings/usb/toshiba,tc7usb40mu.txt | 31 +++++++++
arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 39 +++++++-----
arch/arm64/boot/dts/qcom/msm8916.dtsi | 62 +++++++++---------
drivers/usb/chipidea/core.c | 17 +++++
drivers/usb/chipidea/host.c | 10 +++
drivers/usb/chipidea/udc.c | 11 ++++
drivers/usb/misc/Kconfig | 11 ++++
drivers/usb/misc/Makefile | 1 +
drivers/usb/misc/tc7usb40mu.c | 74 ++++++++++++++++++++++
include/linux/usb/chipidea.h | 14 ++++
11 files changed, 228 insertions(+), 50 deletions(-)
create mode 100644 Documentation/devicetree/bindings/usb/toshiba,tc7usb40mu.txt
create mode 100644 drivers/usb/misc/tc7usb40mu.c
--
2.10.0.297.gf6727b0
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2017-07-12 1:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-12 1:02 Stephen Boyd [this message]
2017-07-12 1:02 ` [PATCH 1/3] usb: misc: Add a driver for TC7USB40MU Stephen Boyd
[not found] ` <20170712010255.26855-1-stephen.boyd-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-07-12 1:02 ` [PATCH 2/3] usb: chipidea: Hook into mux framework to toggle usb switch Stephen Boyd
[not found] ` <20170712010255.26855-3-stephen.boyd-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-07-12 6:45 ` Peter Rosin
2017-07-13 22:29 ` Stephen Boyd
2017-07-17 17:22 ` Rob Herring
2017-07-12 1:02 ` [PATCH 3/3] arm64: dts: qcom: Collapse usb support into one node Stephen Boyd
2017-07-12 5:04 ` [PATCH 0/3] USB Mux support for Chipidea Peter Rosin
2017-07-13 22:35 ` Stephen Boyd
2017-07-14 21:27 ` Stephen Boyd
2017-07-15 8:33 ` Peter Rosin
2017-07-17 17:18 ` Rob Herring
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=20170712010255.26855-1-stephen.boyd@linaro.org \
--to=stephen.boyd-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
--cc=Peter.Chen-3arQi8VN3Tc@public.gmane.org \
--cc=andy.gross-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=peda-koto5C5qi+TLoDKTGw+V6w@public.gmane.org \
--cc=robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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;
as well as URLs for NNTP newsgroup(s).