From: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: Alexander Shishkin
<alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
Richard Zhao
<richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
B29397-KZfg59tc24xl57MIdRCFDg@public.gmane.org,
B20596-KZfg59tc24xl57MIdRCFDg@public.gmane.org,
marex-ynQEQJNshbs@public.gmane.org,
shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org,
dong.aisheng-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org,
linuxzsc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
balbi-l0cyMroinI0@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Re: [PATCH v6 1/3] USB: chipidea: add imx usbmisc support
Date: Wed, 29 Aug 2012 22:00:32 +0200 [thread overview]
Message-ID: <503E74E0.6040503@pengutronix.de> (raw)
In-Reply-To: <20120829110137.GA26594-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 3328 bytes --]
On 08/29/2012 01:01 PM, Sascha Hauer wrote:
> On Wed, Aug 29, 2012 at 01:18:10PM +0300, Alexander Shishkin wrote:
>> Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> writes:
>>
>>> On Wed, Aug 29, 2012 at 10:50:08AM +0300, Alexander Shishkin wrote:
>>>> Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org> writes:
>>>>
>>>>> i.MX usb controllers shares non-core registers, which may include
>>>>> SoC specific controls. We take it as a usbmisc device and usbmisc
>>>>> driver set operations needed by ci13xxx_imx driver.
>>>>>
>>>>> For example, Sabrelite board has bad over-current design, we can
>>>>> usbmisc to disable over-current detect.
>>>>
>>>> Why does this have to be part of the usb driver instead of SoC specific
>>>> code? It looks like you've created a whole new device/driver
>>>> infrastructure just to disable overcurrent for a specific board.
>>>
>>> Richards code indeed only handles overcurrent for a specific board, but
>>> there are more bits to configure in the longer run: power pin
>>> polarities, ULPI/serial mode select and some more.
We already have a patch adding a usbmisc_imx53_init() function to that
driver.
>> Sounds to me like these things that should be taken care of by the phy
>> driver, which will likely be simpler from both driver's and devicetree's
>> perspective.
>
> Most i.MX SoCs have three instances of the chipidea core. These cores
> share a single register space for controlling the mentioned bits (the
> usbmisc register space). The usbmisc looks different on the different
> SoCs.
> Indeed they control some phy specific aspects, but the phy itself may
> also be an external ULPI or UTMI phy with a separate driver. So if we
> integrate the usbmisc into the phy wouldn't that mean that it has to
> be integrated into all possible phy drivers?
>
> From a devicetrees perspective it makes sense to integrate the flags
> into the chipidea nodes, because there is one node per chipidea core,
> but only one usbmisc unit for all ports on the SoC. So we can do a:
>
> chipidea@ofs {
> disable-overcurrent = <1>;
> };
>
> instead of
>
> usbmisc@ofs {
> disable-overcurrent-port0 = <1>;
> disable-overcurrent-port1 = <0>;
> ...
> };
+1
IMHO looks much cleaner.
>>>> And the infrastructure boils down to a complex way of passing a callback
>>>> from imx driver to another imx driver, that only works if they are
>>>> probed in the right order. I don't see any point in doing it like this
>>>> other than inflating the device tree tables even further.
>>>>
>>>> Why can't this be part of the SoC code like it is done, for example in
>>>> arch/arm/mach-omap2/control.c?
>>>
>>> The settings are board specific, so there must be some way to configure
>>> them in the devicetree.
>>
>> But I'm sure there's a way to control board-specific settings/kludges
>> from devicetree?
>
> Hm, yes. That's what Richard does, right? I may be misunderstanding you
> here.
>
> Sascha
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]
next prev parent reply other threads:[~2012-08-29 20:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1346137109-32247-1-git-send-email-richard.zhao@freescale.com>
[not found] ` <1346137109-32247-2-git-send-email-richard.zhao@freescale.com>
[not found] ` <20120828145151.GJ10429@pengutronix.de>
[not found] ` <20120828145151.GJ10429-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-08-29 2:55 ` [PATCH v6 1/3] USB: chipidea: add imx usbmisc support Richard Zhao
[not found] ` <1346137109-32247-2-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2012-08-29 7:50 ` Alexander Shishkin
[not found] ` <871uiqkuhb.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org>
2012-08-29 8:10 ` Sascha Hauer
[not found] ` <20120829081020.GX26594-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-08-29 10:18 ` Alexander Shishkin
[not found] ` <87ehmqj925.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org>
2012-08-29 10:57 ` Richard Zhao
2012-08-29 11:01 ` Sascha Hauer
[not found] ` <20120829110137.GA26594-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-08-29 20:00 ` Marc Kleine-Budde [this message]
[not found] ` <503E74E0.6040503-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-09-04 14:10 ` Richard Zhao
2012-09-11 10:42 ` Alexander Shishkin
[not found] ` <87fw6orgcm.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org>
2012-09-11 12:20 ` Shawn Guo
2012-08-29 8:13 ` Richard Zhao
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=503E74E0.6040503@pengutronix.de \
--to=mkl-bicnvbalz9megne8c9+irq@public.gmane.org \
--cc=B20596-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
--cc=B29397-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
--cc=alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=balbi-l0cyMroinI0@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=dong.aisheng-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linuxzsc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=marex-ynQEQJNshbs@public.gmane.org \
--cc=richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
--cc=s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@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).