From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28901 invoked from network); 13 Nov 2021 19:27:11 -0000 Received: from 4ess.inri.net (216.126.196.42) by inbox.vuxu.org with ESMTPUTF8; 13 Nov 2021 19:27:11 -0000 Received: from a8-18.smtp-out.amazonses.com ([54.240.8.18]) by 4ess; Sat Nov 13 14:22:44 -0500 2021 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=a4tryept6ew4kp6pdupzhtikhmwphypy; d=mapinternet.com; t=1636831351; h=From:Content-Type:Content-Transfer-Encoding:Mime-Version:Subject:Date:References:To:In-Reply-To:Message-Id; bh=ng9T5ljM4Hl/JifD4dwMaAaP9wbnbNAjgyymYwP2E8I=; b=o5St/uol0+Mi7AqbULX3PxEGh+ZTy1a3K4yzol1PKVoOFwQSP/6y+RP7V1B3mtUx Ybpe/PE/0qcjjwiSJSdXrOFARk5Dt/L3O+pDJxQmY2daTT2WPBqBFIqkCeEB2qAVNv2 On0IEezU7yCSBmdgitqh4TOpSqrjfdy7rxhRlytc= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug; d=amazonses.com; t=1636831351; h=From:Content-Type:Content-Transfer-Encoding:Mime-Version:Subject:Date:References:To:In-Reply-To:Message-Id:Feedback-ID; bh=ng9T5ljM4Hl/JifD4dwMaAaP9wbnbNAjgyymYwP2E8I=; b=cbQ/UFXn8dTXKtm810YjzsTey1Yv4RB1FciBwDodrhciidw4xxAG23hhM9O1FT3E StcNjI/jWdQDezAxQ0CV387WSYZ0WuLtyxGU7kzIEOYza/OTIq4YZ5kfN9YsHnNYdxt MDkcf3sr8moKbSBdXYiY2/Z8Rrv76fRihlbUPUkc= X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=107.107.61.28; envelope-from=; From: Mack Wallace Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Date: Sat, 13 Nov 2021 19:22:31 +0000 References: <0100017d00cc4300-5b748622-ae08-4f14-8093-bdd98beb656d-000000@email.amazonses.com> To: 9front@9front.org In-Reply-To: Message-ID: <0100017d1ac052b7-c200f69d-3501-4cdc-a2b8-2fd80b37dbf2-000000@email.amazonses.com> X-Mailer: Apple Mail (2.3608.120.23.2.1) X-Authenticated-User: mackbw@mapinternet.com Feedback-ID: 1.us-east-1.X+xhoL9JiEQ8K0gzGjV36WZnSewOzOs8YCWuakKsLBY=:AmazonSES X-SES-Outgoing: 2021.11.13-54.240.8.18 List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: wrapper metadata-oriented reduce/map locator Subject: Re: [9front] pi 400 and cm4 mmc issues Reply-To: 9front@9front.org Precedence: bulk (Sorry if this is a repeat, I forgot to make sure my message was plain = text) So I applied the patch to bcm/emmc.c and port/sdmmc.c, changed the = config in emmc to use emmc for sdmmc rather than sdhc. - just in case it = was that stupid simple as I am stupid. Apparently not. After some searching I came upon the following: A thread that starts to discuss 'Differences between SD card and eMMC = access (CM4)?' https://forums.raspberrypi.com/viewtopic.php?t=3D293966 but is not very conclusive. However, it does have a reverence to a bare = metal driver that the originator of the thread wrote in C++ = https://github.com/rsta2/circle/blob/master/addon/SDCard/emmc.cpp=20 Another individual was looking to be able to use both the eMMC and an SD = card in this thread: = https://forums.raspberrypi.com/viewtopic.php?t=3D288772=20 If I understand correctly, the same EMMC2 controller is used for either = the eMMC or the microSD card. One could reroute the older SDHOST which = is still on the silicon to run the microSD, but then other things would = be precluded=E2=80=A6 I don=E2=80=99t think any of that is a concern. In emmc.cpp, there are logs of pre-compiler directive conditionals. But = from what I think I understand (which I could be completely wrong), = there are not many differences between using the EMMC and an SD card. = (I=E2=80=99m assuming the USE_SDHOST directive refers to using the older = SD controller). Looks like there are some minor command changes and = chunks of code that are bypassed (like checking on properties of an SD = card). I had started to try to compare what is in emmc.cpp with sdhc.c. = Some of the defines and structures line up nicely, but I was having = issues lining up the commands (i.e. CEMMCDevice::sd_commands[] and = cmdinfo[64] ).=20 Hope some of my babble is useful. mackbw =E2=80=A6The following may have been thrown out of the mailing list as I = probably did not make sure I was sending plain text. > Begin forwarded message: >=20 > From: Mack Wallace > Subject: Re: [9front] pi 400 and cm4 mmc issues > Date: November 8, 2021 at 1:25:25 PM EST > To: 9front@9front.org >=20 > I took the individual files from git and compiled them into a new = kernel. I tried that kernel on a 4GB Pi400, an 8GB Raspberry Pi 4b, and = a 1GB Pi Compute Module 4 (w/o eMMC) on the DFRobot mini router board. = All were able to boot and mount the SD card with this change where = previously one would boot, get errors, and not be able to mount the SD. = So great catch cinap! >=20 > I did not expect any changes with a Compute Module 4 with eMMC as that = is trying to boot from the eMMC and not the SD card. I tried anyway, and = get the usual emmc: cmd 371a0000 arg 0 error intr 0 stat 1fff0001 that = seems to indicate a missing SD card.=20 >=20 > I haven=E2=80=99t done extensive testing, but for the first three; = Pi400, CM4 w/o eMMC, and 8BB PI4b; things seem to work - I can=E2=80=99t = imagine the changes affecting much else. I have other problems (which I = am sure others can affirm with pity and derision), but those are for = another thread.=20 >=20 > Thank you! >=20 > mackbw > On Nov 9, 2021, at 10:38 AM, Eli Cohen wrote: >=20 > yo. I wrote a patch a while ago at > https://raw.githubusercontent.com/echoline/9emmc/master/9emmc.patch >=20 > this was for the eMMC chips in the CM3+ to work (at all) >=20 > it does need more changes still... other machine architectures... it > does not take buswidth (happy halloween!!!) into account, I wrote a > lot of it just from looking at the linux kernel, etc... >=20 > be safe out there! >=20 > love, > uppity 9fans >=20 > On Mon, Nov 8, 2021 at 1:54 PM wrote: >>=20 >> nice. >>=20 >> makes sense. >>=20 >> anyone with a cm4 !=3D 1GB (with eMMC)? >>=20 >> we'd definitely need to adjust port/sdmmc.c code to deal with eMMC = cards, >> but it shouldnt be too difficult. >>=20 >> one can find the JDEC standard for eMMC in duckduckgo. >>=20 >> -- >> cinap >=20