From patchwork Mon Feb 15 03:52:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?RWRkaWUgSHVhbmcgKOm7g+aZuuWCkSk=?= X-Patchwork-Id: 8309251 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E3711C02AA for ; Mon, 15 Feb 2016 04:02:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0D9B820515 for ; Mon, 15 Feb 2016 04:02:55 +0000 (UTC) Received: from bombadil.infradead.org (unknown [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 03ACA204DE for ; Mon, 15 Feb 2016 04:02:54 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aVADF-0002oX-MZ; Mon, 15 Feb 2016 03:52:37 +0000 Received: from [210.61.82.183] (helo=mailgw01.mediatek.com) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aVADB-0002jA-VF; Mon, 15 Feb 2016 03:52:34 +0000 Received: from mtkhts09.mediatek.inc [(172.21.101.70)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1087294651; Mon, 15 Feb 2016 11:52:10 +0800 Received: from [172.21.77.4] (172.21.77.4) by mtkhts09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 14.3.266.1; Mon, 15 Feb 2016 11:52:08 +0800 Message-ID: <1455508328.29366.14.camel@mtksdaap41> Subject: Re: mt1873-evb: MMC failing with linux-next From: Eddie Huang To: Kevin Hilman Date: Mon, 15 Feb 2016 11:52:08 +0800 In-Reply-To: <7hegcmadfk.fsf@baylibre.com> References: <7hegcmadfk.fsf@baylibre.com> X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160214_195234_168969_516054B8 X-CRM114-Status: GOOD ( 17.34 ) X-Spam-Score: -1.1 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matthias Brugger , Sascha Hauer , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RDNS_NONE,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Kevin, On Mon, 2016-02-08 at 17:18 -0800, Kevin Hilman wrote: > 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. This message shows set 3.3V to vio18 fail. Then MMC core will set 1.8V to vio18 again, this time should be ok. > > 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? 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. [1]:http://lists.infradead.org/pipermail/linux-arm-kernel/2015-July/358065.html diff --git a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts b/arch/arm64/boot/dts/mediatek/mt8173-evb.d index e427f04..7453a47 100644 --- a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts +++ b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts @@ -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>;