MKa
Posts: 9
Joined: Wed Sep 04, 2019 8:36 am

cm3plus does not read id eeprom at boot

Wed Sep 04, 2019 9:08 am

Hi!
We have made a board with CM3+ module attached. We try using HAT EEPROM for board identification/configuration. I have managed creating/loading EEPROM contents by following https://www.raspberrypi.org/forums/view ... p?t=108134 procedure. Write procedure can be verified from SCL0/SDA0 lines. However those lines are dead during boot procedure and no hat folder is present in /proc/device-tree directory.

I have added ID_SDA and ID_SCL definitions in dt-blob.dts and compiled it to /boot/dt-blob.dts (and back for verification). Those lines include:

pins_cm3 section/pin_config:

Code: Select all

            pin@p0  { function = "i2c0";   termination = "pull_up"; }; // I2C 0 SDA
            pin@p1  { function = "i2c0";   termination = "pull_up"; }; // I2C 0 SCL
pins_cm3 section/pin_defines:

Code: Select all

            pin_define@ID_SDA {
               type = "internal";
               number = <0>;
            };
            pin_define@ID_SCL {
               type = "internal";
               number = <1>;
            };
Also based on the hint from https://www.raspberrypi.org/forums/view ... p?t=179330 by 6by9
I added "force_eeprom_read=1" statement to /boot/config.txt

Still, nothing happens in SDA0/SCL0 at boot.

What configuration have I missed?
Tanks,
Matti

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2938
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: cm3plus does not read id eeprom at boot

Wed Sep 04, 2019 1:47 pm

Are you sure your dt-blob.bin is being used? Try modifying some other pin, e.g. make GPIO4 an output, and verify with raspi-gpio that it is taking effect.

And do use external pull-ups - the internal pull-ups aren't strong enough for I2C.

MKa
Posts: 9
Joined: Wed Sep 04, 2019 8:36 am

Re: cm3plus does not read id eeprom at boot

Thu Sep 05, 2019 5:43 am

It started to work when I took pin@p0 and pin@p1 definitions from dt-blob away. Some devices with pin_define@ID_SDA/ID_SCL seem to have them and some don't. Well, this is something I need not understanding.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8890
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: cm3plus does not read id eeprom at boot

Thu Sep 05, 2019 7:26 am

pin@p0 and pin@p1 are only present in pins_rev2 (original Pi A or B, 256MB or 512MB), which doesn't support HATs.
They are not required as the firmware adjusts the pin muxing during probing the HAT, and should put it back again afterwards.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “HATs and other add-ons”