Giter VIP home page Giter VIP logo

Comments (21)

ignasurba avatar ignasurba commented on July 24, 2024 1

I have just received a small reel of RTS5170, still waiting on the connectors from USA. But they should be here next week - so I will make a larger batch this time

Since I will test the new RTS5170 to be sure they work as expected, here are the things I will check too:

  • 1-bit mode
  • 1.8V mode
  • level shifter like TXS02612

Reasons to use a level shifter would be to undervolt the eMMC even further, so the processor would still be in reset and possibly not interfere with the mmcblkNX

I will also make a revision for the 1.8V level board with solder pads and unpopulated holes for 2.54 headers and make them available on Tindie :)

So expect some news in two weeks!

from mmcblknx.

ignasurba avatar ignasurba commented on July 24, 2024

Hello!
The driver supports 1.8V signaling, but it would need driver recompiling, which is kind of tedious for users.
Another option would be just to add a level shifter..
Do you think there's a need of 1.8V version for the OLED version with solder pads?
Thanks,
Ignas

from mmcblknx.

DrmnSamoLiu avatar DrmnSamoLiu commented on July 24, 2024

Sorry for bumping this age-old issue, but recently I've also been facing the situation that 1.8v signal level is required.
For example, Kioxia THGAMRG7T13BAIL doesn't even support 3.3v vccq at any speed, so using most of the sd readers on the market blindly will most probably fry the chip.
I noticed that you had drawn a trace from RTS5170 pin 24 (1.8v) out to a pad named "Jumper" in the kicad design, but did not put any component on it. Is it for selecting signal level, or it's simply for selecting Vcc?
Or if possible, can you provide some docs or commands to compile the driver to use 1.8v signal level at all times? Very much appreciated!

from mmcblknx.

marcosscriven avatar marcosscriven commented on July 24, 2024

@ignasurba - I'd also like to bump this please. I found this GitHub repo by Googling "emmc 1.8v logic levels".

I had just in fact posted to Reddit about how to read eMMC in SDIO mode to get the boot partitions of an arbitrary eMMC (not Switch necessarily) https://www.reddit.com/r/embedded/comments/13o27gv/whats_a_cheap_way_to_dump_emmc_in_sdio_1bit_mode/?sort=new

So you've already helped immensely by highlighting the existence of the RTS5170 and rtsx driver!

If I buy your board and solder DAT0, CMD, CLK, & GND from my on-board eMMC device to your board(with the MCU prevented from running), are you saying I can run it in 1.8V mode, just with a recompile?

Will it also work in 1-bit mode? I don't want to desolder/deadbug the chip to get to the other DAT pins, except as a very last resort.

Thanks!

from mmcblknx.

ignasurba avatar ignasurba commented on July 24, 2024

RTS5170 has support for 1.8V levels, but would require a modified driver. Since the definitions are there, RTSX_LDO_VCC_1V8 instead of RTSX_LDO_VCC_3V3, but building them is not for everyone. (the jumper only selects the 1.8V power override for the eMMC)

I am currently waiting for parts to make a second batch of readers. And considering to make a version with level converter and open solderable pads to use 1.8V IO with the default Linux driver. (for use with OLED)

I need to investigate the 1-bit mode, I recall it working, but pretty slow ~1MB/s.

What are your thoughts? Modified driver? Or hardware level converter?

As per Kioxia chips, it means they are non compliant with the standard (as per Jedec Embedded Multi-Media Card (e•MMC) Electrical Standard (5.1))

image

I should make a warning, so people would check!

from mmcblknx.

DrmnSamoLiu avatar DrmnSamoLiu commented on July 24, 2024

considering to make a version with level converter and open solderable pads to use 1.8V IO with the default Linux driver.

I wouldn't recommend making the pads on the reader board itself if you want re-usability. The solder mask on BGA pads can be easily broken during the cleaning process with solder wicks, and over time it will be impossible to maintain good connection.

Actually, I'm designing a 1.8v eMMC to microSD card adapter in the past few weeks too. I decided to make it into two parts: the logic level converter PCB and eMMC holder pcb. Pretty much like the configuration mmcblkNX have. (mmcblkNX board + switch eMMC to Molex board.)

I can't really share the details right now (because it's made using company resources.), but believe me, it is a real pain to use a logic level converter with eMMCs because weird things could happen when host thinks it's using 3.3v and the chip think it's using 1.8v. (Usually the speed are different for 3.3v mode and 1.8v mode.)

So I would say if the only thing it takes for the mmcblkNX to do 1.8v I/O is modifying firmware, then it will be better to do so.

@marcosscriven
You could try this: https://shop.exploitee.rs/shop/p/low-voltage-emmc-adapter
But then you'll have to find a device or PC that have SD card interface and actually uses SDIO to access the eMMC and not just the storage area.
Your best bet would be to get an SD to microSD adapter (Big to small, not the small to big adapter often bundled with microSD cards.) and use a single board computer such as raspi that has microSD slots to read it.

from mmcblknx.

marcosscriven avatar marcosscriven commented on July 24, 2024

Thanks for responses @ignasurba (sorry I didn't see it sooner)

What are your thoughts? Modified driver? Or hardware level converter?

Modifying driver is fine for me, especially as I can use VMs with a USB controller passed through. Just means swapping VM to choose which mode I want (bit heavy weight but works)

I need to investigate the 1-bit mode, I recall it working, but pretty slow ~1MB/s.

Slow is fine for my purposes - I just need to get the data off once for analysis. Once I've done that, I can risk a de-solder and replacing with something more modular.

I think maybe remixing your board to have 2.54mm headers for CMD, CLK, and DAT0 would be all I need right now. Main issue with that is PCBWay don't seem to have the RLT5170 in https://www.pcbway.com/components/result/?s=RTS5170

BTW, in my recent searches I found someone with a similar looking board https://twitter.com/MC_Roly/status/1664114848379338753?s=20

from mmcblknx.

marcosscriven avatar marcosscriven commented on July 24, 2024

Your best bet would be to get an SD to microSD adapter (Big to small, not the small to big adapter often bundled with microSD cards.) and use a single board computer such as raspi that has microSD slots to read it.

Thanks @DrmnSamoLiu

I've seen using an SD card adapter in a couple of places now - for instance https://www.riverloopsecurity.com/blog/2020/03/hw-101-emmc/

diy_adapter

But that would still leave me with the problem of the eMMC being on a board driving it at 1.8V. I don't want to run it at 3.3V because then I could damage someone on the board its on.

In many ways desoldering the chip would be the simplest way to go, but don't want to risk that until I've exhausted the onboard routes.

Re the Exploiteers logic shifter (which I'd seen in the linked whitepaper), does that go against your advice above? "it is a real pain to use a logic level converter with eMMCs"

from mmcblknx.

DrmnSamoLiu avatar DrmnSamoLiu commented on July 24, 2024

@marcosscriven The link to low voltage eMMC to SD adapter I mentioned is made for chips using 1.8v logic level.
It is using a SDIO logic level converter IC to convert 3.3v signals to 1.8v, and also have a separate pin header for vccq.

from mmcblknx.

marcosscriven avatar marcosscriven commented on July 24, 2024

I see got it. I don't think either solution quite works.

The voltage converter will sort the levels issue, but then I'd struggle to find an SD reader that can get at the boot partitions. I saw on the Exploiteers whitepaper they did it with a beaglebone.

Just using my own adapter would need level shifting to use with an RPi.

I essentially need something with the RLT5170 on.

from mmcblknx.

marcosscriven avatar marcosscriven commented on July 24, 2024

@marcosscriven The link to low voltage eMMC to SD adapter I mentioned is made for chips using 1.8v logic level. It is using a SDIO logic level converter IC to convert 3.3v signals to 1.8v, and also have a separate pin header for vccq.

Thanks for your suggestion @DrmnSamoLiu

I tried this and just get this error:

[Wed Jun 14 18:51:07 2023] mmc1: error -22 whilst initialising SDIO card
[Wed Jun 14 18:51:07 2023] mmc-bcm2835 fe300000.mmc: card claims to support voltages below defined range
[Wed Jun 14 18:51:07 2023] mmc1: error -84 whilst initialising SDIO card
[Wed Jun 14 18:51:08 2023] mmc-bcm2835 fe300000.mmc: card claims to support voltages below defined range
[Wed Jun 14 18:51:08 2023] mmc-bcm2835 fe300000.mmc: no support for card's volts
[Wed Jun 14 18:51:08 2023] mmc1: error -22 whilst initialising SDIO card

Which I think just means it's not going to work with level shifting.

@ignasurba - is your new batch available to purchase?

from mmcblknx.

marcosscriven avatar marcosscriven commented on July 24, 2024

@ignasurba - I found another chip that could help here https://datasheet.lcsc.com/lcsc/1809191022_Alcor-Micro-AU6438_C12397.pdf

That seems to have an internal 3.3V and 1.8V internal regulator. Not 100% sure if that also enables boot0/boot1 access though.

from mmcblknx.

DrmnSamoLiu avatar DrmnSamoLiu commented on July 24, 2024

@marcosscriven Can you elaborate the exact eMMC chip model and the reader/device you were using when seeing this error message? (With a pic of your wiring, preferably.)

I have seen this "card claims to support voltages below defined range" error message when I'm using rpi with my (bad) custom 1.8v board. After some debugging I realized it's just because my board is so badly designed that the communications between the eMMC and rpi were messed up, and rpi is not getting correct voltage support data (extCSD to be precise) from the eMMC.

So if you are using fly wire to connect to the eMMC chip, it could just be bad wiring that causes this message.
Try to keep the wires as short as possible and separate them to avoid EM interference. Also make sure the you are not fighting with the main processor of the device you are working on to access the eMMC. (Make the CMD, CLK, DAT0 traces from processor to eMMC open either by removing resistors or keep the processor in reset state.)

Also, is it possible for you to share what device are you working on? It's kinda rare to see a chip that needs absolutely 1.8v I/O since I think 99% of the eMMC chips on the market supports dual voltage.

from mmcblknx.

marcosscriven avatar marcosscriven commented on July 24, 2024

@DrmnSamoLiu - It's this one https://datasheet.lcsc.com/lcsc/2008061102_Samsung-KLM4G1FETE-B041_C500273.pdf

Don't have a pic handy, but yes the wires are about 10cm. I did have it setup with an oscilloscope, and that looked pretty clean. The difference here though the ground loop is longer compared to the scope probes.

Interesting though a poor connection could give the voltage support errors.

The chip itself doesn't absolutely need 1.8V - however, as it's on a board and wired up to an MCU that's also working at 1.8V, I don't want to fry it (or cut the traces).

If I can't fly wire it, I'll just have to deadbug it. I've been super patient not just going for that, it's extremely tempting :)

from mmcblknx.

marcosscriven avatar marcosscriven commented on July 24, 2024

Forgot to answer:

Also make sure the you are not fighting with the main processor of the device you are working on to access the eMMC.

I just shorted the crystal to do this. Confirmed no signals on 'scope.

from mmcblknx.

DrmnSamoLiu avatar DrmnSamoLiu commented on July 24, 2024

the wires are about 10cm

10cm is actually already long enough to cause trouble in my personal experience, but if you're working with an oscilloscope then I believe you have more idea than me about electrical engineering.

In most devices I observed, the eMMC chips would be placed very very close to the processor, which I assume is for reducing the trace length.
In the "bad" board I tried to match trace length but it ended up unnecessarily increasing the trace length. In the latest version of my 1.8v board I tried to minimize trace length and added ground guard between signal lines, and it works fine most of the time now.
I'm really an EE amateur and does not have the equipment or software for signal integrity analysis and such, so I'm not sure what makes more impact on the signal quality.

You might want to first check if the "eMMC power up sequence" is correct with your setup.
In this stackexchange question are some image of CMD0 that processor will send to eMMC chip after power up.
You can also look for JEDEC eMMC specifications for what other CMDs should look like under an oscilloscope.
(Especially CMD8 and its responses, CMD8 is SEND_EXT_CSD and reader uses this data to recognize many attributes of the chip.)

Also just a friendly advice:
If you are not confident about desoldering the eMMC chip by yourself, you can try to ask smart phone repair shops for the service. At least that's what I did before I get all the required tools and skills to desolder them by myself :p

from mmcblknx.

DrmnSamoLiu avatar DrmnSamoLiu commented on July 24, 2024

@marcosscriven I forgot to mention another trick:

Assuming you are using an SBC to read the eMMC, try look for a way to limit the SD card interface clock speed.
For example in raspi 3B+, you can use device tree overlay option (sdio_overclock and sd_overclock) to limit SD clock speed. Lowering the clock speed is possible although it says "overclock".

Also see if debugfs is enabled in your SBC, you can set the clock speed by echoing the speed you want to /sys/kernel/debug/mmc1/clock

Try gradually making the clock speed slower (to reduce interference), and see if your SBC starts recognizing the eMMC correctly.
This is quite a trade off for speed. But if your target are only the boot partitions, you should still be able to dump them in a reasonable time. (Usually 4MB each)

I realized it's actually bad circuit design in my board using this method, since lowering the clock speed starts making my junk board work.

from mmcblknx.

ignasurba avatar ignasurba commented on July 24, 2024

I have just received a small reel of RTS5170, still waiting on the connectors from USA. But they should be here next week - so I will make a larger batch this time

Since I will test the new RTS5170 to be sure they work as expected, here are the things I will check too:

  • 1-bit mode
  • 1.8V mode
  • level shifter like TXS02612

Reasons to use a level shifter would be to undervolt the eMMC even further, so the processor would still be in reset and possibly not interfere with the mmcblkNX

I will also make a revision for the 1.8V level board with solder pads and unpopulated holes for 2.54 headers and make them available on Tindie :)

So expect some news in two weeks!

from mmcblknx.

pd0wm avatar pd0wm commented on July 24, 2024

@ignasurba Thanks for open sourcing this work! Any updates on one bit mode and workings through a level shifter?

I wanted to adapt your design to include the TXS02612 and some headers for easy in circuit reading, but didn't want to waste any time if one bit mode is not supported.

from mmcblknx.

fishpepper avatar fishpepper commented on July 24, 2024

I can confirm that 1bit mode works. I tested it with manually connecting wires to an sdcard adapter and reading from an odroid emmc module.

@ignasurba Could you give some hints which register settings can be used to enable RTSX_LDO_VCC_1V8?
There is no mention of RTSX_LDO_VCC_* in the linux kernel header files, I only found some references in the rtsx driver of freebsd.

from mmcblknx.

gquere avatar gquere commented on July 24, 2024

@ignasurba Hello, I'm interested in the 1.8V version discussed here but haven't found it on Tindie. Has this revision been abandoned?

from mmcblknx.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.