OSD32MP1-BRK

Forums Devices OSD32MP15x OSD32MP1-BRK

Viewing 11 reply threads
  • Author
    Posts
    • #15698
      MLML
      Participant

        Hi all

        I would like to program the 4K EEPROM residing in OSD32MP157C chip.

        I am using OSD32MP1-BRK which contains the chip.

        Anyone can advise me how to do it?

      • #15700
        Neeraj Dantu
        Moderator

          ML,

          The EEPROM is configured in the device tree here: https://github.com/octavosystems/OSD32MP1-BRK-device-tree/blob/kirkstone/linux-v5.15.24-stm32mp1-r1/stm32mp157c-osd32mp1-brk.dts#L837. You should be able to access it using the SYSFS via ‘/sys/bus/i2c/devices/3-0050/’. ‘3’ is the I2C interface number that the EEPROM is on and ‘0050’ is the address of the EEPROM. This directory contains file “eeprom”, which you can use to interact with the EEPROM. Please see https://stackoverflow.com/a/60781512.

          There are a number of other ways including using Linux IOCTL/python libraries/[shell commands: i2ctools]. See https://wiki.st.com/stm32mpu/wiki/I2C_i2c-tools for useful info on using i2ctools.

          Best,
          Neeraj

        • #15746
          MLML
          Participant

            HI Neeraj, thanks for the reply!

            I am green horn in this area ;p so not quite sure what u meant by to access the EEPROM (in the device tree) via SYSFS.

            What are the appropriate software platform I will need to install in order to do what u meant? Also how do I download the modification (done to the EEPROM) to my development board – OSD32MP1-BRK? Many thanks to u again!

          • #15750
            Neeraj Dantu
            Moderator

              ML,

              Please see https://www.kernel.org/doc/Documentation/i2c/i2c-sysfs.rst for an overview of I2C SYSFS. The EEPROM driver invoked by the device tree provides entries in /sys/bus/i2c/devices directory that you can interact with as files.

              The default Linux image should come with EEPROM device driver enabled. Images for BRK are available here: https://octavosystems.com/octavo_products/osd32mp1-brk/#Software/. See also: https://octavosystems.com/app_notes/osd32mp1-brk-getting-started/.

              Best,
              Neeraj

            • #15772
              MLML
              Participant

                I follow the steps listed here https://octavosystems.com/app_notes/osd32mp1-brk-getting-started/#trouble

                But I am still unable to detect new network adapter called Remote NDIS Compatible Device though I have configured the boot switch to 101 and also saw the red LED blinking.

                I cannot find this adapter in network connection or under Other devices in the Device Manager.

                Can anyone advise me what can be done?

              • #15778
                Neeraj Dantu
                Moderator

                  ML,

                  I would suggest trying a different USB cable(some cables only provide power).

                  Also, you should be able to use a USB to UART adapter to connect to the UART interface(marked TX, RX and GND) near the SD card slot. This will allow you to use a program like Putty to open a terminal on your computer and monitor the console log output of the BRK board when it is booting. After it boots, it will also provide a console for you to type in commands like “ifconfig” to see the Ethernet configuration from the board side. An example adapter can be found here: https://learn.sparkfun.com/tutorials/sparkfun-usb-to-serial-uart-boards-hookup-guide/all.

                  Best,
                  Neeraj

                • #15779
                  MLML
                  Participant

                    Thanks Neeraj,

                    I did the following:

                    Write to EEPROM:

                    echo -n -e ‘\xAB\xCD\xEF’ | dd of=/sys/bus/i2c/devices/3-0050/eeprom bs=1 seek=16

                    Added delay

                    sleep 0.1  # Add a small delay to ensure write completion

                    Tried to read the EEPROM:

                    dd if=/sys/bus/i2c/devices/3-0050/eeprom bs=1 count=3 skip=16 2>/dev/null | hexdump -C

                    Result:

                    00000000  ff ff ff                                          |…|

                    00000003

                    I expected to see AB CD EF but did not. Can you advise me what went wrong?

                    • This reply was modified 2 weeks, 3 days ago by MLML.
                  • #15784
                    Neeraj Dantu
                    Moderator

                      ML,

                      My apologies, I did not realize a fix was not issued to the images on the website. The issue is that the EEPROM follows 16 bit addressing format and by default 8 bit addressing is used by the at24 driver.

                      To fix this, the device tree for the board needs “address-width = <16>;” definition in eeprom node.

                      Here is a Debian image that has this fix: https://octavosystems.com/octavosystems.com/wp-content/uploads/2025/02/FlashLayout_sdcard_stm32mp157c-osd32mp1-brk-trusted.zip. I am working on updating the images on the web and OpenSTLinux layers.

                      Please let me know how the new image works for you.

                      Best,
                      Neeraj

                    • #15791
                      MLML
                      Participant

                        I downloaded the Debian image from the above link u provided using Etcher sw. But encountered the following Error: (0,h.requestMetaData) is not a function during programming of the image

                        Can advise what to be done?

                        Many tks

                        • #15792
                          Neeraj Dantu
                          Moderator

                            Hey ML,

                            I have re-verified that the image downloaded from the above post is OK. I also used Etcher(on Ubuntu OS) to program the SD card to make sure there is no problem with the image file. Can you try a different SD card/host machine/Etcher version?

                            Best,
                            Neeraj

                        • #15807
                          MLML
                          Participant

                            Thanks Neeraj, I am able to load in the debian image into a brand new SD card.

                            Write to EEPROM:

                            debian@localhost:~$ sudo echo -n -e ‘\xAB\xCD\xEF’ | sudo dd of=/sys/bus/i2c/devices/3-0050/eeprom bs=1 seek=16

                            Result:

                            3+0 records in

                            3+0 records out

                            3 bytes copied, 0.0414865 s, 0.1 kB/s

                            Read from EEPROM

                            debian@localhost:~$ sudo dd if=/sys/bus/i2c/devices/3-0050/eeprom bs=1 count=3 skip=16 2>/dev/null | hexdump -C

                            Result:

                            00000000  ff ff ff                                          |…|

                            00000003

                            Checking i2c status:

                            debian@localhost:~$ sudo i2cdetect -y 3

                            Result:

                            0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

                            00:                         — — — — — — — —

                            10: — — — — — — — — — — — — — — — —

                            20: — — — — — — — — — — — — — — — —

                            30: — — — UU — — — — — — — — — — — —

                            40: — — — — — — — — — — — — — — — —

                            50: UU — — — — — — — — — — — — — — —

                            60: — — — — — — — — — — — — — — — —

                            70: — — — — — — — —

                             

                            I am still unable to write to the EEPROM at address 0x50 & strangely the i2C at this address is unavailable (UU) for use?

                            • This reply was modified 1 week, 4 days ago by MLML.
                          • #15809
                            MLML
                            Participant

                              Hi Neeraj

                              Can u help me try on your side the Debian image is it possible to write & readback from the EEPROM(in the SiP chip) on the OSD32Mp1-BRK development card? Many thanks!

                              • #15819
                                Neeraj Dantu
                                Moderator

                                  ML,

                                  This is how I wrote and read back from EEPROM on OSD32MP1-BRK:

                                  root@localhost:/sys/bus/i2c/devices/3-0050# echo “OSD32MP1” > eeprom
                                  root@localhost:/sys/bus/i2c/devices/3-0050# cat eeprom
                                  OSD32MP1
                                  ?????????????????????????????????????????????????????????

                                  You are seeing “UU” in i2cdetect output because the driver for the EEPROM is in control of the I2C device. You can still force i2c tools to interact with the EEPROM using “-f” flag if you need to.

                                  Please make sure you also set the EEPROM_WP(write protect) switch position located in the BOOT switches(switch #4) to the position towards the Micro-USB port. This disables the write protect on the EEPROM so you can write to it.

                                  Best,
                                  Neeraj

                              • #15827
                                MLML
                                Participant

                                  Hi Neeraj,

                                  Thanks now it is working well :).

                                  The SiP part on my development card (OSD32MP1-BRK) is OSD32MP157F but is it possible for me to replace the on-board SiP with another SiP – OSD32MP153C? Because I want to use OSD32MP153C but I only have this development card.

                              Viewing 11 reply threads
                              • You must be logged in to reply to this topic.