Custom board and flashing the eMMC using USB/DFU

Forums Devices OSD32MP15x Custom board and flashing the eMMC using USB/DFU

Viewing 2 reply threads
  • Author
    Posts
    • #12623
      coloradocarlos
      Participant

        Our custom board is running OpenSTLinux / Dunfell by booting from an SD card image. Works great!

        However, now working on flashing the eMMC using the USB cable and the STM32_Programmer_CLI using port USB1. The flashing process gets stuck in a loop connecting and reconnecting and shows “running program” in PartID 0x01 an 0x03.

        Interestingly, this is shown in the console:

        U-Boot 2020.10-stm32mp-r1 (Oct 05 2020 - 15:15:32 +0000)
        ....
        Hit any key to stop autoboot:  0
        Boot over usb0!
        partitions : Writing GPT: success!
        done
        Erasing fip on mmc 1: done
        DFU alt info setting: done
        Can't get phy-supply regulator
        Failed to get PHY0 for usb-otg@49000000
        Can't get phy-supply regulator
        Failed to get PHY0 for usb-otg@49000000
        No USB device found
        usb_gadget_initialize failed
        Download done
        Reset...
        resetting ...
        INFO:    PSCI Power Domain Map:
        INFO:      Domain Node : Level 1, parent_node -1, State ON (0x0)
        INFO:      Domain Node : Level 0, parent_node 0, State ON (0x0)
        INFO:      CPU Node : MPID 0x0, parent_node 0, State ON (0x0)
        INFO:      CPU Node : MPID 0xffffffff, parent_node 0, State OFF (0x2)

        Anyway, I suspect I need to apply the following patch to U-Boot:

        https://github.com/octavosystems/meta-octavo-osd32mp1/blob/dunfell/recipes-bsp/u-boot/files/0007-Add-OSD32MP1-BRK-build-config.patch

        which seems to be based on this earlier patch:

        Are these patches needed for custom boards based on the OSD32MP1? If so, what modifications are required for a custom board?

        Thanks, Carlos

      • #12762
        Neeraj Dantu
        Moderator

          Carlos,

          The log indicates that there is no USB interface found on the board. Can you check if you defined the USB interface in u-boot device tree?

          The patch you linked creates a new machine and a separate board.c initialization file for BRK. So, it may not work without further modification. The board.c in the patch is modified from the default ST board.c file to avoid use of STUSB1600 USB-C Controller chip as BRK implements a Micro-USB OTG port instead of a USB-C.

          Best,

          Neeraj

        • #12773
          coloradocarlos
          Participant

            A bit more context. The flashing works for our custom board using the Debian SDK. It didn’t work for Dunfell.

            But it is working now. The solution is to apply the patch based on the BRK board. The patch adds the rule for the custom DTB to the Makefile. We are using the OTG pins but for a USB-C in peripheral mode. This is similar to Micro USB design in the BRK board.

            There is also a board.c that I included, but I don’t know if it was needed or not or if modification is required. We are not using the STUSB1600 since we don’t have a requirement to support USB-C OTG host mode.

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