Skip to contentSkip to conversation

mt1873-evb: MMC failing with linux-next

DISCUSSION Kevin Hilman 4 participants 6 messages Feb 9, 2016 – Feb 15, 2016 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello,

I tried getting MMC working with linux-next (next-20160208) on mt8173-evb by enabling a few options[1] on top of the default defconfig, and this results in a kernel that hangs as soon as it starts userspace.

The MMC driver seems to start, though has some regulator issues:

[    0.526380] sdhci: Secure Digital Host Controller Interface driver
[    0.527176] sdhci: Copyright(c) Pierre Ossman
[    0.528835] vio18: unsupportable voltage range: 3300000-1980000uV
[    0.529610] mtk-msdc 11230000.mmc: Regulator set error -22:    3300000 - 3300000
[    0.563731] mtk-msdc 11240000.mmc: Got CD GPIO

The driver appears to be attempting to set 3.3V but using a 1.8V regulator (vio18), which is failing.

Then, the kernel hangs after freeing unused memory:

[    0.616386] hctosys: unable to open rtc device (rtc0)
[    0.624118] usb_vbus: disabling
[    0.624547] vusb: disabling
[    0.624929] vgp6: disabling
[    0.625635] ALSA device list:
[    0.626009]   No soundcards found.
[    0.626963] Freeing unused kernel memory: 724K (ffffffc000977000 - ffffffc000a2c000)

And nothing further here.

It boots fine when disabling the MMC driver (CONFIG_MMC_MTK=n).

Any ideas?

Kevin

[1]
CONFIG_MMC_MTK=y
CONFIG_MFD_MT6397=y
CONFIG_REGULATOR_MT6397=y
CONFIG_MTK_PMIC_WRAP=y

A message that is not in the archive (sent off-list or not yet received): 7hegcmadfk.fsf-rdvid1DuHRBWk0Htik3J/[email protected]

#2 lore raw

Hi Kevin,

Quoted 27 lines · Kevin Hilman

Hello,

I tried getting MMC working with linux-next (next-20160208) on mt8173-evb by enabling a few options[1] on top of the default defconfig, and this results in a kernel that hangs as soon as it starts userspace.

The MMC driver seems to start, though has some regulator issues:

[    0.526380] sdhci: Secure Digital Host Controller Interface driver
[    0.527176] sdhci: Copyright(c) Pierre Ossman
[    0.528835] vio18: unsupportable voltage range: 3300000-1980000uV
[    0.529610] mtk-msdc 11230000.mmc: Regulator set error -22:    3300000 - 3300000
[    0.563731] mtk-msdc 11240000.mmc: Got CD GPIO

The driver appears to be attempting to set 3.3V but using a 1.8V regulator (vio18), which is failing.

Then, the kernel hangs after freeing unused memory:

[    0.616386] hctosys: unable to open rtc device (rtc0)
[    0.624118] usb_vbus: disabling
[    0.624547] vusb: disabling
[    0.624929] vgp6: disabling
[    0.625635] ALSA device list:
[    0.626009]   No soundcards found.
[    0.626963] Freeing unused kernel memory: 724K (ffffffc000977000 - ffffffc000a2c000)
Quoted 2 lines

And nothing further here.

I can see the warning from the mmc regulator access, but after that my board boots just fine. I'm using linux-next as of today (20160212).
I attached my config, it should be defconfig plus the config options you mentioned (and an initramfs).

Is this the configuration you have?

Regards,
Matthias

Quoted 4 lines

It boots fine when disabling the MMC driver (CONFIG_MMC_MTK=n).

Any ideas?

Quoted 8 lines

Kevin

[1]
CONFIG_MMC_MTK=y
CONFIG_MFD_MT6397=y
CONFIG_REGULATOR_MT6397=y
CONFIG_MTK_PMIC_WRAP=y

_______________________________________________
Linux-mediatek mailing list [email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek

maintainer
#3 lore raw

Hi,

I just resend as the attachment was to too big for linux-arm-kernel.

Quoted 32 lines · Matthias Brugger

Hi Kevin,

Quoted 29 lines · Kevin Hilman

Hello,

I tried getting MMC working with linux-next (next-20160208) on mt8173-evb by enabling a few options[1] on top of the default defconfig, and this results in a kernel that hangs as soon as it starts userspace.

The MMC driver seems to start, though has some regulator issues:

[    0.526380] sdhci: Secure Digital Host Controller Interface driver
[    0.527176] sdhci: Copyright(c) Pierre Ossman
[    0.528835] vio18: unsupportable voltage range: 3300000-1980000uV
[    0.529610] mtk-msdc 11230000.mmc: Regulator set error -22:
3300000 - 3300000
[    0.563731] mtk-msdc 11240000.mmc: Got CD GPIO

The driver appears to be attempting to set 3.3V but using a 1.8V regulator (vio18), which is failing.

Then, the kernel hangs after freeing unused memory:

[    0.616386] hctosys: unable to open rtc device (rtc0)
[    0.624118] usb_vbus: disabling
[    0.624547] vusb: disabling
[    0.624929] vgp6: disabling
[    0.625635] ALSA device list:
[    0.626009]   No soundcards found.
[    0.626963] Freeing unused kernel memory: 724K (ffffffc000977000 -

ffffffc000a2c000)

Quoted 9 lines
Quoted 2 lines

And nothing further here.

I can see the warning from the mmc regulator access, but after that my board boots just fine.
I'm using linux-next as of today (20160212).
I attached my config, it should be defconfig plus the config options you mentioned (and an initramfs).

Instead of attaching my config, you can find it here:
http://pastebin.com/5uhXtSHj

Quoted 17 lines

Is this the configuration you have?

Regards,
Matthias

Quoted 12 lines

It boots fine when disabling the MMC driver (CONFIG_MMC_MTK=n).

Any ideas?

Kevin

[1]
CONFIG_MMC_MTK=y
CONFIG_MFD_MT6397=y
CONFIG_REGULATOR_MT6397=y
CONFIG_MTK_PMIC_WRAP=y

maintainer
#4 lore raw
In reply to Matthias Brugger
Quoted 35 lines · Matthias Brugger

Hi Kevin,

Quoted 27 lines · Kevin Hilman

Hello,

I tried getting MMC working with linux-next (next-20160208) on mt8173-evb by enabling a few options[1] on top of the default defconfig, and this results in a kernel that hangs as soon as it starts userspace.

The MMC driver seems to start, though has some regulator issues:

[    0.526380] sdhci: Secure Digital Host Controller Interface driver
[    0.527176] sdhci: Copyright(c) Pierre Ossman
[    0.528835] vio18: unsupportable voltage range: 3300000-1980000uV
[    0.529610] mtk-msdc 11230000.mmc: Regulator set error -22:
3300000 - 3300000
[    0.563731] mtk-msdc 11240000.mmc: Got CD GPIO

The driver appears to be attempting to set 3.3V but using a 1.8V regulator (vio18), which is failing.

Then, the kernel hangs after freeing unused memory:

[    0.616386] hctosys: unable to open rtc device (rtc0)
[    0.624118] usb_vbus: disabling
[    0.624547] vusb: disabling
[    0.624929] vgp6: disabling
[    0.625635] ALSA device list:
[    0.626009]   No soundcards found.
[    0.626963] Freeing unused kernel memory: 724K (ffffffc000977000 -
Quoted 4 lines

ffffffc000a2c000)

And nothing further here.

Quoted 7 lines

I can see the warning from the mmc regulator access, but after that my board boots just fine.
I'm using linux-next as of today (20160212).
I attached my config, it should be defconfig plus the config options you mentioned (and an initramfs).

Is this the configuration you have?

I spotted an error in my scripts to build the kernel. After fixing this I can reproduce your error.

Regards,
Matthias

Quoted 16 lines

Regards,
Matthias

Quoted 12 lines

It boots fine when disabling the MMC driver (CONFIG_MMC_MTK=n).

Any ideas?

Kevin

[1]
CONFIG_MMC_MTK=y
CONFIG_MFD_MT6397=y
CONFIG_REGULATOR_MT6397=y
CONFIG_MTK_PMIC_WRAP=y

#5 lore raw
Quoted 42 lines · Matthias Brugger
Quoted 41 lines · Matthias Brugger

Hi Kevin,

Quoted 27 lines · Kevin Hilman

Hello,

I tried getting MMC working with linux-next (next-20160208) on mt8173-evb by enabling a few options[1] on top of the default defconfig, and this results in a kernel that hangs as soon as it starts userspace.

The MMC driver seems to start, though has some regulator issues:

[    0.526380] sdhci: Secure Digital Host Controller Interface driver
[    0.527176] sdhci: Copyright(c) Pierre Ossman
[    0.528835] vio18: unsupportable voltage range: 3300000-1980000uV
[    0.529610] mtk-msdc 11230000.mmc: Regulator set error -22:
3300000 - 3300000
[    0.563731] mtk-msdc 11240000.mmc: Got CD GPIO

The driver appears to be attempting to set 3.3V but using a 1.8V regulator (vio18), which is failing.

Then, the kernel hangs after freeing unused memory:

[    0.616386] hctosys: unable to open rtc device (rtc0)
[    0.624118] usb_vbus: disabling
[    0.624547] vusb: disabling
[    0.624929] vgp6: disabling
[    0.625635] ALSA device list:
[    0.626009]   No soundcards found.
[    0.626963] Freeing unused kernel memory: 724K (ffffffc000977000 -
Quoted 4 lines

ffffffc000a2c000)

And nothing further here.

I can see the warning from the mmc regulator access, but after that my board boots just fine.
I'm using linux-next as of today (20160212).
I attached my config, it should be defconfig plus the config options you mentioned (and an initramfs).

Quoted 4 lines
Quoted 1 line

Is this the configuration you have?

I spotted an error in my scripts to build the kernel. After fixing this I can reproduce your error.

OK, let me know if you need anything else to help debug, or want me to test anything further. Otherwise I'll leave it in your capable hands.

Kevin

#6 lore raw
In reply to Kevin Hilman

Hi Kevin,

Quoted 8 lines · Kevin Hilman

Hello,

I tried getting MMC working with linux-next (next-20160208) on mt8173-evb by enabling a few options[1] on top of the default defconfig, and this results in a kernel that hangs as soon as it starts userspace.

The MMC driver seems to start, though has some regulator issues:

Quoted 8 lines
[    0.526380] sdhci: Secure Digital Host Controller Interface driver
[    0.527176] sdhci: Copyright(c) Pierre Ossman
[    0.528835] vio18: unsupportable voltage range: 3300000-1980000uV
[    0.529610] mtk-msdc 11230000.mmc: Regulator set error -22:    3300000 - 3300000
[    0.563731] mtk-msdc 11240000.mmc: Got CD GPIO

The driver appears to be attempting to set 3.3V but using a 1.8V regulator (vio18), which is failing.

This message shows set 3.3V to vio18 fail. Then MMC core will set 1.8V to vio18 again, this time should be ok.

Quoted 11 lines

Then, the kernel hangs after freeing unused memory:

[    0.616386] hctosys: unable to open rtc device (rtc0)
[    0.624118] usb_vbus: disabling
[    0.624547] vusb: disabling
[    0.624929] vgp6: disabling
[    0.625635] ALSA device list:
[    0.626009]   No soundcards found.
[    0.626963] Freeing unused kernel memory: 724K (ffffffc000977000 - ffffffc000a2c000)
Quoted 5 lines

And nothing further here.

It boots fine when disabling the MMC driver (CONFIG_MMC_MTK=n).

Any ideas?

MT8173-evb use MT8173 engineer sample, which has one bug that if disable USB power domain, vcore (include mmc) power will be disabled too. MT8173 mass production chip already fix this bug. Sascha send one patch to fix this issue [1] before. But I think it is not a good solution because if mmc runtime suspend, vcore power will be disabled too. Please apply following code and try again, I will send this fixup to public later.

By the way, you should set MMC_BLOCK_MINORS=32 because partition number on eMMC is larger than default value 8.

(quoted diff) +0 -0

b/arch/arm64/boot/dts/mediatek/mt8173-evb.d
index e427f04..7453a47 100644

arch/arm64/boot/dts/mediatek/mt8173-evb.dts +3 -0
@@ -214,6 +214,9 @@
 };
 
 &pwrap {
+       /* Only MT8173 E1 needs USB power domain */
+       power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>;
+
        pmic: mt6397 {
                compatible = "mediatek,mt6397";
                interrupt-parent = <&pio>;

[1]:http://lists.infradead.org/pipermail/linux-arm-kernel/2015-July/358065.html