From: eric@anholt.net (Eric Anholt)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] rpi: add support to enable usb power domain
Date: Tue, 17 Nov 2015 13:46:32 -0800 [thread overview]
Message-ID: <8761105mfb.fsf@eliezer.anholt.net> (raw)
In-Reply-To: <20151102084557.GA1342@omega>
Alexander Aring <alex.aring@gmail.com> writes:
> Hi,
>
> On Thu, Oct 29, 2015 at 12:02:24PM -0700, Eric Anholt wrote:
>> Alexander Aring <alex.aring@gmail.com> writes:
>>
>> > This patch adds support for RPi several Power Domains and enable support
>> > to enable the USB Power Domain when it's not enabled before.
>> >
>> > This patch based on Eric Anholt's patch to support Power Domains. He had
>> > an issue about -EPROBE_DEFER inside the power domain subsystem, this
>> > issue was solved by commit <311fa6a> ("PM / Domains: Return -EPROBE_DEFER
>> > if we fail to init or turn-on domain").
>> >
>> > It was tested with barebox and the following scripts before booting
> ...
>> > Third:
>> > The barebox regulator doesn't support right now to enable/disable
>> > regulators at runtime but I want to bring this mainline in the next
>> > days. So you can't check yourself if the above scripts working right
>> > now. I describe it here to show you what exactly I tested.
>> >
>> > changes since Eric Anholts "power domain" patch:
>> > - add for me all known power domains of the RPi, it contains the domains
>> > 0 - 9.
>>
>> Note: None of the power domain enums other than the ones I'd had in my
>> patch are actually connected to anything in the firmware. I don't think
>> we should be adding them, given that.
>
> Okay. Then it makes sense that I still accessing UART and SDHC when I
> turn off the power.
>
> In you patch you had SDHC, USB, DSI. Are you sure that SDHC power domain
> has any effect, because I don't see any effect and can still access the
> sd card.
It looks like the SDCARD domain is kept always on, even if we ask for it
off. We can clear the always-on flag by setting domain 29 in
MBOX_CHAN_POWER. It's not accessible from the property channel, unless
I've misread the logic.
Yet another reason I'm hoping to write a native power domain driver.
> I would add the power-domains where we have currently an use-case for it
> and this USB at the moment. Is this okay for you?
Sounds good to me. I'll probably extend that for V3D.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151117/1e23e8ec/attachment.sig>
WARNING: multiple messages have this Message-ID (diff)
From: Eric Anholt <eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org>
To: Alexander Aring <alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
pawel.moll-5wv7dgnIgG8@public.gmane.org,
mark.rutland-5wv7dgnIgG8@public.gmane.org,
ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org,
galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org,
lee-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org,
paul-DWxLp4Yu+b8AvxtiuMwx3w@public.gmane.org,
zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
agross-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
apw-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org,
joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org
Subject: Re: [RFC] rpi: add support to enable usb power domain
Date: Tue, 17 Nov 2015 13:46:32 -0800 [thread overview]
Message-ID: <8761105mfb.fsf@eliezer.anholt.net> (raw)
In-Reply-To: <20151102084557.GA1342@omega>
[-- Attachment #1: Type: text/plain, Size: 2177 bytes --]
Alexander Aring <alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> Hi,
>
> On Thu, Oct 29, 2015 at 12:02:24PM -0700, Eric Anholt wrote:
>> Alexander Aring <alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>>
>> > This patch adds support for RPi several Power Domains and enable support
>> > to enable the USB Power Domain when it's not enabled before.
>> >
>> > This patch based on Eric Anholt's patch to support Power Domains. He had
>> > an issue about -EPROBE_DEFER inside the power domain subsystem, this
>> > issue was solved by commit <311fa6a> ("PM / Domains: Return -EPROBE_DEFER
>> > if we fail to init or turn-on domain").
>> >
>> > It was tested with barebox and the following scripts before booting
> ...
>> > Third:
>> > The barebox regulator doesn't support right now to enable/disable
>> > regulators at runtime but I want to bring this mainline in the next
>> > days. So you can't check yourself if the above scripts working right
>> > now. I describe it here to show you what exactly I tested.
>> >
>> > changes since Eric Anholts "power domain" patch:
>> > - add for me all known power domains of the RPi, it contains the domains
>> > 0 - 9.
>>
>> Note: None of the power domain enums other than the ones I'd had in my
>> patch are actually connected to anything in the firmware. I don't think
>> we should be adding them, given that.
>
> Okay. Then it makes sense that I still accessing UART and SDHC when I
> turn off the power.
>
> In you patch you had SDHC, USB, DSI. Are you sure that SDHC power domain
> has any effect, because I don't see any effect and can still access the
> sd card.
It looks like the SDCARD domain is kept always on, even if we ask for it
off. We can clear the always-on flag by setting domain 29 in
MBOX_CHAN_POWER. It's not accessible from the property channel, unless
I've misread the logic.
Yet another reason I'm hoping to write a native power domain driver.
> I would add the power-domains where we have currently an use-case for it
> and this USB at the moment. Is this okay for you?
Sounds good to me. I'll probably extend that for V3D.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
next prev parent reply other threads:[~2015-11-17 21:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-28 20:40 [RFC] rpi: add support to enable usb power domain Alexander Aring
2015-10-28 20:40 ` Alexander Aring
2015-10-29 4:32 ` Stephen Warren
2015-10-29 4:32 ` Stephen Warren
2015-11-02 9:02 ` Alexander Aring
2015-11-02 9:02 ` Alexander Aring
2015-10-29 19:02 ` Eric Anholt
2015-10-29 19:02 ` Eric Anholt
2015-11-02 8:46 ` Alexander Aring
2015-11-02 8:46 ` Alexander Aring
2015-11-17 21:46 ` Eric Anholt [this message]
2015-11-17 21:46 ` Eric Anholt
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=8761105mfb.fsf@eliezer.anholt.net \
--to=eric@anholt.net \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.