From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nathan Date: Wed, 29 Apr 2015 18:34:33 -0500 Subject: [U-Boot] "Writing to MMC(%d)... failed" In-Reply-To: <5540A144.5060207@samsung.com> References: <553F3FAB.7030706@samsung.com> <5540A144.5060207@samsung.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 Wed, Apr 29, 2015 at 4:15 AM, Przemyslaw Marczak wrote: > > Yes, it's good, that you mention that. The odroid_defconfig was tested only > on U3 and X2. You can found the info here: doc/README.odroid. "tested only on...", that I knew, but also knew the U2 and U3 both used 4412 Prime and only had hopes that was all that would be involved, but figured there was the possibility of differing GPIOs. > I understand, that we have many Odroid variants, and the config name > suggest, that it can be used for any. > > The SoC is the same as in U3, but maybe the revision is different or the > part is different. You should check carefully, what's going on in the > hardkernel's U-Boot for this board. > Please note, that there can be some things done by the BL1/BL2. > > You can easy check your SoC proid by command: "md.l 0x10000000 0x1", > and the revision is: main.sub, where: > "main = val & 0xf0" > "sub = val & 0xf" > > For U3, the reg "val" is 0xe4412220, so it is rev 2.0. I had seen that command, but never used it. Didn't even know about that address holding the ID. With my U2, I also got that same result: ***** Odroid # md.l 0x10000000 0x1 10000000: e4412220 "A. ***** But again, I am willing to bet it was wired up differently from the U3. > I don't remember exactly, but there was an issue with using bl1/bl2 for X2 > and U3. It was about ability to boot the binary on both boards. > If I good remember the X2 binaries, doesn't boot on U3, but the version for > U3, can boot on both. > This means, that the mainline U-Boot could require some additional things to > do before boot on U2. Maybe it's just proper bl1/bl2, you must check this. I'm sure the HK BLs are fine since they work with their old u-boot.bin, but I will see about stripping out bl2 from u-boot-dts.bin, though I'm sure I'll have to check some other things. > And as I wrote before, the dw-mmc driver is used for the eMMC slot card > only, and sdhci driver is used for sd card slot. Yup, so I'll remain focused on the sdhci part of it all. > You shouldn't worry about this. The mmc init starts for your sd card port. > The one more thing is, that maybe the GPIO configuration is wrong. > It should be configured by the pinmux. Please check it by: > For GPK2: > Odroid # md.l 0x11000080 0x1 > 11000080: 02222022 " ". > Odroid # md.l 0x11000088 0x1 > 11000088: 00000030 0... > Odroid # md.l 0x1100008c 0x1 > 1100008c: 00003fdf I'm getting the same values ***** Odroid # md.l 0x11000080 0x1 11000080: 02222022 " ". Odroid # md.l 0x11000088 0x1 11000088: 00000030 0... Odroid # md.l 0x1100008c 0x1 1100008c: 00003fdf .?.. ***** > For GPK3:( with no eMMC inserted) > Odroid # md.l 0x110000a0 0x1 > 110000a0: 00000000 .... > Odroid # md.l 0x110000a8 0x1 > 110000a8: 00001555 U... > Odroid # md.l 0x110000ac 0x1 > 110000ac: 00000000 Also same here ***** Odroid # md.l 0x110000a0 0x1 110000a0: 00000000 .... Odroid # md.l 0x110000a8 0x1 110000a8: 00001555 U... Odroid # md.l 0x110000ac 0x1 110000ac: 00000000 .... ***** > I'm using U3 and sometimes X2 - only those were tested. I don't have U2. > Both binnaries, which you send me - works proper. I can list my partitions > with them. But the problem is your board - it's U2. > > You need to work with hardkernel's version. You should check, the clocks, > and the GPIO registers for MMC. > Compare the registers from your working hardkernel's version with the > mainline one. > Check the function board_clock_init(), the mmc clocks are set at the end of > it, then you can check, which registers it writes. > > There is a public documentation for the Exynos4412 rev. 1.0, > search on google with: "samsung exynos4 quad manual" > > There may be some differences, but this would help you. This is huge what you've done to lead me in the right direction and very much appreciated. It's good to know the binaries worked so I know the compiler is fine and I really think I should just be checking out the GPIOs, as well as the clocks that you mentioned. I remember doing that with the kernel's dts last year. I actually have that manual from 2013-02 as well as other docs/schematics from HK, so at least now I know where to refer to. You have given me a lot of good stuff to feast on, so I hope I won't be posting back until I have solved this. Thanks again.