Hi,

On Wed, May 20, 2015 at 11:55 PM, Chen-Yu Tsai <[email protected]> wrote:

> Hi,
>
> On Thu, May 21, 2015 at 2:38 PM, Lawrence Yu <[email protected]> wrote:
> > Hi,
> >
> >
> >
> > On Mon, May 18, 2015 at 11:03 PM, Lawrence Yu <[email protected]> wrote:
> >>
> >> Hi,
> >>
> >>
> >> On Mon, May 18, 2015 at 8:01 PM, Chen-Yu Tsai <[email protected]> wrote:
> >>>
> >>> Hi,
> >>>
> >>> On Mon, May 18, 2015 at 12:08 AM, Lawrence Y <[email protected]>
> wrote:
> >>> > Hi,
> >>> >
> >>> > I'm not sure if it is my sdcard, my A31 hummingboard device, or
> >>> > something I
> >>> > am doing wrong, but I've been trying to boot an A31 hummingbird from
> an
> >>> > sdcard using the kernel from the sunxi-next branch at
> >>> >
> >>> > https://github.com/mripard/linux
> >>> > 33da8d2 - Merge tag 'ib-mfd-regulator-v4.2' into sunxi-next
> >>> >
> >>> > and ran into a problem where the kernel would hang while waiting for
> >>> > the
> >>> > root device /dev/mmcblk0p2
> >>> >
> >>> > If I use the sun6i-a31-hummingbird.dtb built from the linux mainline
> >>> > the
> >>> > sdcard will boot the root file system correctly, but if I use the
> >>> > sun6i-a31-hummingbird.dtb from sunxi-next the kernel will hang while
> >>> > waiting
> >>> > for /dev/mmcblk0p2.
> >>> >
> >>> > I ran a git bisect and narrowed down the commit that causes the
> problem
> >>> > I am
> >>> > seeing to
> >>> >
> >>> > commit bab03561224baa536b98f1d137d2b6b5dd159763
> >>> > Date:   Tue Mar 10 19:59:21 2015 +0800
> >>> >
> >>> >     ARM: dts: sun6i: hummingbird: Add AXP221 regulator nodes
> >>> >
> >>> >     This patch adds the AXP221 regulators. Only the ones directly
> used
> >>> >     on the board are added.
> >>> >
> >>> > Please let me know if there is anything I can do to help fix this
> >>> > problem,
> >>> > if it really is a problem.  I have an A31 hummingbird available for
> >>> > testing.
> >>>
> >>> The latest commit you pointed to merges AXP221 support with regulators.
> >>> The Hummingbird A31 dts was also updated with the new regulator nodes.
> >>>
> >>> Do you have AXP20X MFD and regulator support enabled?
> >>> CONFIG_MFD_AXP20X and CONFIG_REGULATOR_AXP20X should be y.
> >>>
> >>>
> >>> ChenYu
> >>
> >>
> >> I tested with the sunxi_defconfig and confirmed that
> >>
> >> CONFIG_INPUT_AXP20X_PEK=y
> >> CONFIG_MFD_AXP20X=y
> >> CONFIG_REGULATOR_AXP20X=y
> >>
> >> are set in the .config file by the sunxi_defconfig and was used when the
> >> root file system on the mmc card is not detected during the boot.
> >>
> >> I did some more experimenting and found that if I change the vmmc-supply
> >> for the mmc0 in the dts from vcc_3v0 to reg_vcc3v0 the root file system
> on
> >> the sdcard will boot properly
> >>
> >> @@ -119,7 +119,7 @@
> >>  &mmc0 {
> >>         pinctrl-names = "default";
> >>         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_hummingbird>;
> >> -       vmmc-supply = <&vcc_3v0>;
> >> +       vmmc-supply = <&reg_vcc3v0>;
> >>         bus-width = <4>;
> >>         cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
> >>         cd-inverted;
> >>
> >> I am going to try Han's suggestion of using the vcc_3v3 when I get a
> >> chance to see if that makes it better.
> >>
> >> Lawrence
> >>
> >
> > I changed the vmmc-supply in the mmc0 dts section to be reg_vcc3v0 from
> > vcc_3v0 and the tablet seems to boot to login from the sdcard
> consistently
> > now.
> >
> > I'm not sure if the AXP20x module is being loaded or not from the
> > hummingbird A31 dts file.  I did a grep of the dmesg and there is no
> > occurrence of the string AXP in the dmesg logs during boot.  If the
> AXP20x
> > module is not being loaded, maybe that could explain why the vcc_3v0 did
> not
> > work for the mmc0 section?
>
> You should see something like the following:
>
> axp20x 2-0068: AXP20x variant AXP221 found
> input: axp20x-pek as
> /devices/platform/soc@01c00000
> /1f03400.i2c/i2c-2/2-0068/axp20x-pek/input/input0
> axp20x 2-0068: AXP20X driver loaded
>
> If not, either the AXP driver and/or the P2WI driver is missing.
>
> Since you already mentioned you have AXP enabled, check
>
>     CONFIG_I2C_SUN6I_P2WI
>
> for P2WI support. The AXP221 is not a standard I2C chip.
>
> ChenYu
>
> > I also added some printk statements to the axp209 probe function that did
> > not emit anything to the dmesg output, but I'm not sure if that is
> > conclusive or not since I'm not sure if printk works in the probe.
> >
> > Maybe someone could suggest a better way to tell if the AXP221 support is
> > being loaded?
> >
> > Thanks!
> >
> > Lawrence
>

Thank you for the suggestion, I think that was the piece I was missing!
After enabiling the CONFIG_I2C_SUN6I_P2WI on top of the sunxi_defconfig the
AXP driver for AXP221 gets loaded and seems to work.  Tablet now appears to
reboot and power off as expected which is great!

Lawrence

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to