From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chen-Yu Tsai Date: Tue, 22 Jan 2019 01:05:25 +0800 Subject: [U-Boot] [PATCH v3 9/9] arm: dts: sunxi: Enumerate MMC2 as MMC1 In-Reply-To: References: <20190121103115.17794-1-jagan@amarulasolutions.com> <20190121103115.17794-10-jagan@amarulasolutions.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Jan 21, 2019 at 11:38 PM Vasily Khoruzhick wrote: > > On Mon, Jan 21, 2019 at 2:32 AM Jagan Teki wrote: > > > > Environment and fastboot MMC devices are configured based number > > of mmc slots defined on particular board in sunxi platform. > > > > If number of slots are not more than 1, it assigns 0 which usually mmc > > device on SD slot. With DM_MMC it is detected as 0 since mmc0 node always > > be an mmc device. > > > > If number of slots are more than 1, it assigns 1 which assumes 0 is mmc > > device and 1 is emmc device. But with DM_MMC there is chance of detecting > > emmc as device 2 since mmc1 is SDIO as per devicetree definition. > > > > So override mmc2 to mmc1 in sunxi dtsi, this will eventually detect mmc2 > > as mmc 1 device even if the board dts has mmc0, mmc1, mmc2. > > It doesn't work on Pinebook - where we have mmc0 (SD card), mmc1 > (SDIO), mmc2 (eMMC). It still enumerates mmc2 as mmc2. Try doing a clean build (i.e., do make distclean beforehand)? It worked for me once I did that. ChenYu > > Some platforms like A20 has mmc0...mmc3, but there is no usecases now for > > enabling all mmc controllers in any of A20 board dts files. > > > > Signed-off-by: Jagan Teki > > --- > > arch/arm/dts/sunxi-u-boot.dtsi | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/arch/arm/dts/sunxi-u-boot.dtsi b/arch/arm/dts/sunxi-u-boot.dtsi > > index 8a9f2a6417..fdd4c80aa4 100644 > > --- a/arch/arm/dts/sunxi-u-boot.dtsi > > +++ b/arch/arm/dts/sunxi-u-boot.dtsi > > @@ -1,6 +1,10 @@ > > #include > > > > / { > > + aliases { > > + mmc1 = &mmc2; > > + }; > > + > > binman { > > filename = "u-boot-sunxi-with-spl.bin"; > > pad-byte = <0xff>; > > -- > > 2.18.0.321.gffc6fa0e3 > >