devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Maxime Ripard
	<maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Cc: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	devicetree <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 3/3] ARM: dts: sun8i-q8-common: Add support for SDIO wifi controllers
Date: Mon, 29 Aug 2016 11:46:14 +0200	[thread overview]
Message-ID: <724a6222-36e3-e230-5071-a7cb23c51697@redhat.com> (raw)
In-Reply-To: <20160829065620.GC7612@lukather>

Hi,

On 29-08-16 08:56, Maxime Ripard wrote:
> On Fri, Aug 26, 2016 at 04:52:36PM +0200, Hans de Goede wrote:
>> Most of the sun8i q8 boards have an usb wifi controller, on the
>> variants which use an USB wifi controller, this will result in a
>> couple of error msg-s in dmesg when proving the sdio bus and
>> an used mmc controller.
>>
>> The best way to deal with wifi on this boards really is to simply
>> let the kernel auto-detect usb or sdio wifi controllers, so we
>> will just have to live with the few errors in dmesg.
>
> No, because that grabs PINs that might or might not be supposed to be
> used for that, it leaves clocks and regulators enabled, which draw
> power, to no end. And that's even worth since most boards will not use
> it.
>
> You can put the definition of the nodes in the DTSI, but the final
> status will have to be in the (relevant) DTS.

This is again the q8-tablet thing where china produces a new variant
every 2 weeks. So we've sun8i-a23-q8-tablet.dts and sun8i-a33-q8-tablet.dts
which try to be generic dts files for these tablets, since creating
a custom dts per variant is madness.

This commit puts the node in sun8i-q8-common.dtsi because the
A23 and A33 are pin compatible and we've tablets where the
only difference is the SoC soldered on there, the use the _exact_
same PCB and components otherwise, so we have all the sun8i q8
stuff in a common place for sun8i-a23-q8-tablet.dts and
sun8i-a33-q8-tablet.dts, those are the only users of this
dtsi file.

You've already merged the bits which handle the variants with
an USB attached wifi module (enabling ehci0 also on boards
where nothing is connected). This is the counter-part for
PCB's which use a sdio wifi module (about 90% of all boards
in my experience). As for turning a regulator on unnecessary,
both the wifi and sdio wifi solution use the same regulator,
so that is already turned on through the usb bits and it
needs to be in either case.

The only downside of this approach is that we either have
the USB controller turned on unnecessarily (in most cases)
or the mmc controller (in the rare A23 tablet which still
uses an USB wifi module).

This all actually fits neatly into the plans to do hardware
autodetection for these tablets which I'm working on, in
this case we can just let the kernel handle things without
additional code (think the beaglebone capemanager) since
both busses are discoverable.

Once we have the q8-hardwaremgr I'm working on and hope
to post an RFC of soon, we could even make that turn off
the unused controller (as a future enhancement).

I hope this explains things.

Regards,

Hans
--
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

  reply	other threads:[~2016-08-29  9:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-26 14:52 [PATCH 0/3] ARM: dts: sun8i: Add dt nodes for sdio wifi Hans de Goede
2016-08-26 14:52 ` [PATCH 1/3] ARM: dts: sun8i: Add dt node for esp8089 wifi chip on polaroid-mid2407 Hans de Goede
     [not found]   ` <20160826145236.30210-2-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-08-26 22:35     ` Maxime Ripard
2016-08-26 14:52 ` [PATCH 2/3] ARM: dts: sun8i: Add dt node for esp8089 wifi chip on polaroid-mid2809 Hans de Goede
2016-08-26 22:36   ` Maxime Ripard
2016-08-26 14:52 ` [PATCH 3/3] ARM: dts: sun8i-q8-common: Add support for SDIO wifi controllers Hans de Goede
2016-08-29  6:56   ` Maxime Ripard
2016-08-29  9:46     ` Hans de Goede [this message]
2016-09-01 20:37       ` Maxime Ripard
2016-09-03 11:33         ` Hans de Goede
     [not found]           ` <1efbd549-a05b-713e-cbe2-7a5458beaaeb-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-09-05 19:58             ` Maxime Ripard
2016-08-26 15:00 ` [PATCH 0/3] ARM: dts: sun8i: Add dt nodes for sdio wifi Icenowy Zheng
2016-08-26 15:52   ` Hans de Goede

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=724a6222-36e3-e230-5071-a7cb23c51697@redhat.com \
    --to=hdegoede-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
    --cc=wens-jdAy2FN1RRM@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).