From: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Maxime Ripard
<maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Cc: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
devicetree <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Re: [PATCH] ARM: dts: sun4i: Add dts file for the pov protab2-ips9 tablet
Date: Sun, 13 Sep 2015 19:33:36 +0200 [thread overview]
Message-ID: <55F5B370.7040203@redhat.com> (raw)
In-Reply-To: <20150913152224.GU9885@lukather>
Hi,
On 13-09-15 17:22, Maxime Ripard wrote:
> On Tue, Sep 08, 2015 at 09:45:52AM +0200, Hans de Goede wrote:
>> Hi,
>>
>> On 07-09-15 22:56, Maxime Ripard wrote:
>>> On Mon, Sep 07, 2015 at 09:05:29AM +0200, Hans de Goede wrote:
>>>>>> +®_ldo3 {
>>>>>> + /*
>>>>>> + * We need to always power the camera sensor, otherwhise all access
>>>>>> + * to i2c1 is blocked.
>>>>>> + */
>>>>>> + regulator-always-on;
>>>>>> + regulator-min-microvolt = <2800000>;
>>>>>> + regulator-max-microvolt = <2800000>;
>>>>>> + regulator-name = "vdd-csi";
>>>>>> +};
>>>>>
>>>>> What is connected on i2c1 ? Just the camera sensor? or it has some
>>>>> other devices there?
>>>>
>>>> The bma250 accelerometer sits there, and the kernel already has a driver
>>>> for it. That driver needs to have devicetree binding support added, and
>>>> then we should be able to use the accelerometer.
>>>
>>> Ok, so if this regulator is disable, you can't access the other
>>> devices as well, right?
>>
>> Right, the controller reports the bus as being stuck.
>
> Which is pretty bad... :/
Yes.
>>> Do you know why? Is it the regulator providing
>>> the pull-up voltage?
>>
>> I've tried enabling the pull ups on the SoC i2c pins, so I do not think
>> that it is that, it seems that somehow when not powered the camera sensor is
>> actively keeping the lines low. Either it has multiple power planes, or
>> it is using normally-on fet-s between ground and its i2c lines.
>
> Well, if a regulator is powered down, it's also tied to the ground,
? I do not believe that that is necessarily always the case, that would
require an extra fet in the output logic of the pmic which actually
connects it to the ground when powered down. I would expect it to simply
be floating when not enabled.
> which means you would actually have pull-down. Maybe the in-SoC
> pullups simply aren't strong enough in such a case.
This all assumes that that regulator is actually tied to the pull-ups,
something which we've no knowledge of whatsoever.
> Anyway. In both cases, the regulator really shouldn't be drifting
> along like this.
Right which is why I've added the always-on property.
> If the i2c bus needs a regulator to be operationaly,
> then we can just add an optional bus-supply property or something to
> give that to the i2c driver so that it can enable it when needed.
I agree that that would be sensible if this regulator were tied to
the pull-ups, but I've my doubts that it is. We've not seen anything
similar on any other allwinner tablet, other then ChenYu-s Ippo-q8-v5
tablet.
This tablet is sort of a high-end tablet (with a nice ips screen) and
such it also uses a different (better) sensor for its frontcam, a
gc2015 rather then the usual gc0308. I believe that this is the
culprit.
Which would make modelling this as some sort of i2c-bus power-supply
wrong, and I've checked and none of the existing i2c bindings under
Documentation/devicetree/bindings/i2c contain such a thing, so we
would be the first and we will likely have a hard time selling a
binding for this upstream, esp. since we do not know what exactly
is going on.
So all in all I strongly believe that just setting always-on
on the regulator in question is the best solution.
Regards,
Hans
>
> Maxime
>
next prev parent reply other threads:[~2015-09-13 17:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-05 8:21 [PATCH] ARM: dts: sun4i: Add dts file for the pov protab2-ips9 tablet Hans de Goede
[not found] ` <1441441319-10658-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-09-06 16:30 ` Maxime Ripard
2015-09-07 7:05 ` Hans de Goede
[not found] ` <55ED3739.609-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-09-07 7:49 ` Priit Laes
[not found] ` <1441612142.14422.34.camel-q/aMd4JkU83YtjvyW6yDsg@public.gmane.org>
2015-09-07 8:49 ` [linux-sunxi] " Hans de Goede
[not found] ` <55ED4F8F.6080502-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-09-07 9:14 ` Priit Laes
[not found] ` <1441617262.21530.4.camel-q/aMd4JkU83YtjvyW6yDsg@public.gmane.org>
2015-09-07 9:30 ` Hans de Goede
[not found] ` <55ED591B.7050705-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-09-07 20:52 ` Maxime Ripard
2015-09-08 7:48 ` Hans de Goede
[not found] ` <55EE92E0.1010805-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-09-10 13:56 ` Maxime Ripard
2015-09-07 20:56 ` Maxime Ripard
2015-09-08 7:45 ` [linux-sunxi] " Hans de Goede
[not found] ` <55EE9230.70209-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-09-08 8:40 ` Chen-Yu Tsai
[not found] ` <CAGb2v64BGPP9Fs0gM0ghJZ0tO8QdGZD9GfpquGCGKiZCeTkyww-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-08 12:49 ` [linux-sunxi] " Hans de Goede
[not found] ` <55EED95D.20004-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-09-08 13:14 ` Chen-Yu Tsai
2015-09-13 15:22 ` Maxime Ripard
2015-09-13 17:33 ` Hans de Goede [this message]
[not found] ` <55F5B370.7040203-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-09-22 15:02 ` Maxime Ripard
2015-09-22 15:24 ` [linux-sunxi] " Hans de Goede
[not found] ` <560172B5.8090709-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-10-10 12:32 ` Hans de Goede
2015-10-19 19:43 ` Maxime Ripard
2015-10-20 21:59 ` 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=55F5B370.7040203@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=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
--cc=maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
--cc=wsa-z923LK4zBo2bacvFa/9K2g@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).