From patchwork Thu Jun 18 19:21:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Woodhouse X-Patchwork-Id: 242630 List-Id: U-Boot discussion From: dwmw2 at infradead.org (David Woodhouse) Date: Thu, 18 Jun 2020 20:21:43 +0100 Subject: Can't access mmc #0 on mt7623 when booted from external SD In-Reply-To: <433a7e49d0436bb4faad5abd36fca3276b253779.camel@infradead.org> References: <27c3dbc9dfef671db7dcb4868576685c7a79f6e9.camel@infradead.org> <67818497faeb00fc82af639ad29536406b29dbd8.camel@infradead.org> <0f643138d106b75df6c66b52607f21def681d9e1.camel@infradead.org> <433a7e49d0436bb4faad5abd36fca3276b253779.camel@infradead.org> Message-ID: <0965610b1daeb5884a2e71a115c716521c45abca.camel@infradead.org> On Thu, 2020-06-18 at 16:52 +0100, David Woodhouse wrote: > So... whose bug is that? :) Looks like the pinctrl driver. This *ought* to work (with the caveat that I really ought to make two pinctrl setups and change between them according to the voltage, like the Linux DT and mtk-sd driver do). conf-rst { But it doesn't work. Partly because the U-Boot mtk pinctrl driver doesn't support the R0 R1 bits encoded in that <3>, and partly because it doesn't *even* get pullup/pulldown right at all; it sets the bit in the GPIO_PULLSEL registers but *not* the PUPD bit in the correct register for MSDC and other pins. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 5174 bytes Desc: not available URL: --- a/arch/arm/dts/mt7623n-bananapi-bpi-r2.dts +++ b/arch/arm/dts/mt7623n-bananapi-bpi-r2.dts @@ -133,12 +133,14 @@ "MSDC0_DAT2", "MSDC0_DAT3", "MSDC0_DAT4", "MSDC0_DAT5", "MSDC0_DAT6", "MSDC0_DAT7"; input-enable; - bias-pull-up; + drive-strength = <2>; + bias-pull-up = <3>; }; conf-clk { pins = "MSDC0_CLK"; - bias-pull-down; + drive-strength = <2>; + bias-pull-down = <3>; };