OSD32MP157C-512M-BAA AF and IO pins

Forums Devices OSD32MP15x OSD32MP157C-512M-BAA AF and IO pins

Viewing 3 reply threads
  • Author
    Posts
    • #12047
      Gil Hershmangil_he
      Participant

        hello Neeraj,

        I would like to verify/confirm the following:
        As far as I understand, each IO in any bank (excluding exceptional IOs), can be assigned numerous functional roles, via programming an Alternate Function to it.
        For example:
        SDMMC2_D5 can be assigned to PA9 with AF10, PA15 with AF9, PB9 with AF10.
        Can I take any IO, assign to it an AF, and use its assigned function?
        Are there any rules to assign AF for IO pins for a specific function, for example, SDMMC2?
        I mean other than using Tables 8 (AF0-AF7) and Table 9 (AF8-AF15)?
        Can I use different AF group (for example AF1 and AF9) for SDMMC2 bus signals?
        I see that AF7 is used for SDMMC2 (AF0-AF7 group) and also AF8/9/10 are used for SDMMC2 (AF8-AF15 group).
        So, can I take any SDMMC2 signal and assign the right AF to it, meaning one of AF7/8/9/10 ?

        eMMC Flash is my boot/SW device.
        After power up I program the proper IOs for SDMMC2 and then it will load from the eMMC Flash connected to these IOs.
        Where does the AF assigning take place?
        (I assume not on the eMMC Flash SW, which is also my boot device).

        We will assemble the STM32MP157C on the prototypes but the 153C on the final product.
        Any difference in AF assigning between both devices with regard to SDMMC2 and SPI buses?

        Thank you
        Gil

        • This topic was modified 2 years, 9 months ago by Gil Hershmangil_he.
        • This topic was modified 2 years, 9 months ago by Gil Hershmangil_he.
        • This topic was modified 2 years, 9 months ago by Gil Hershmangil_he.
        • This topic was modified 2 years, 9 months ago by Gil Hershmangil_he.
      • #12053
        Neeraj Kumar Reddy DantuNeeraj Dantu
        Moderator

          Gil,

          You can chose any AF to build your interfaces. Please take a look into STM32CubeMX to build your pin configuration.

          The pin muxing takes place in TF-A, u-boot and Linux kernel based on the deice trees for each of those components in the boot chain. For example, if you are trying to boot from eMMC, you will need to setup the SDMMC peripheral in TF-A, u-boot and kernel device tree. In general, u-boot and kernel device trees are the same. TF-A device tree can be minimal to setup the boot interfaces and clock tree.

          Please note that by default, to boot from a certain interface, you will need certain pin assignments. Take a look at https://wiki.st.com/stm32mpu/wiki/STM32MP15_ROM_code_overview for all the pin configuration options needed. If you want, you can modify these default pin configurations using OTP registers.

          STM32MP157C and STM32MP153C do not differ in pin configuration. So, you can use OSD32MP157C and OSD32MP153C as long as you know the differences in the internal SoC functionality.

          Best,
          Neeraj

          • #12255
            Gil Hershmangil_he
            Participant

              hello Neeraj,

              I am re-opening this thread.
              My design will boot from the USB.
              Our boot mode will be UART4/5/7/8 and USB (OTG HS).
              We intend to use UART4 for debug messages during boot time (before Linux loads up), mainly for UBOOT messages.
              Do the ROM, FSBL and SSBL send messages during run time?

              So, when the on-chip ROM runs, USB will be used to communicate with the board.
              Then, we will use STM32CubeMX to define everything we need.
              Then, the correct binaries are created and we will upload them into the FSBL and SSBL in the Octavo.
              Is that correct?

              Where is the first point (during power up) that pin muxing is defined?
              Where is the first point that the software stdout is defined? (so UART4 will be the standard output for us).
              Is it in the device tree in TF-A? Does the TF-A reside in the FSBL?

              Which application will we use to program the full image to the eMMC Flash? (FSBL, SSBL, UBOOT and Linux).

              I’d appreciate your comments on the above.

              Thank you
              Gil

            • #12259
              Neeraj Kumar Reddy DantuNeeraj Dantu
              Moderator

                Gil,

                UART4 is the default console used by TF-A(First stage bootloader), U-boot(Second stage bootloader) and kernel. So, you will see messages on UART4 when booting before the kernel is initialized.

                You can load FSBL, SSBL using Cube Programmer and possibly setup kernel boot and Root Filesystem via USB(Ethernet over USB) as well.

                Pinmuxing is defined as early as ROM code. But, it is limited to the boot interface. See for example, which pins are used by default for an SD card boot here: https://wiki.st.com/stm32mpu/wiki/STM32MP15_ROM_code_overview#Boot_from_SD_card

                TF-A, u-boot and kernel can define further pin multiplexing using their device trees.

                STDOUT is defined for TF-A, U-boot and kernel. TF-A is the first binary that outputs messages to STDOUT(UART4 by default)

                You can use ST’s Cube Programmer(https://www.st.com/en/development-tools/stm32cubeprog.html) to load an image to eMMC.

                I recommend you stick to reference design pin muxing for SD card/eMMC and USB to have an easier time booting and programming your board.

                Best,
                Neeraj

              • #12267
                Gil Hershmangil_he
                Participant

                  Hi Neeraj,

                  Very well.
                  USB, by default, uses DP2/DM2 so I am using these pins.
                  I also use eMMC2 default pins as defined in the ROM.

                  However, I am NOT using UART4 default pins.
                  I will define the non-default UART4 pins in the device trees in TF-A/UBOOT/Linux and will see messages through UART4 after the device tree in the TF-A loads.
                  Am I correct here?

                  thanks
                  Gil

                • #12282
                  Neeraj Kumar Reddy DantuNeeraj Dantu
                  Moderator

                    Gil,

                    We have not tired it, but https://wiki.stmicroelectronics.cn/stm32mpu/wiki/How_to_configure_U-Boot_for_your_board#Console indicates that what you are assuming it true.

                    best,
                    Neeraj

                • #12056
                  Gil Hershmangil_he
                  Participant

                    ok.
                    Got it.
                    thanks.

                  • #12254
                    Gil Hershmangil_he
                    Participant

                      See my message above – REPLY #12255

                      • This reply was modified 2 years, 7 months ago by Gil Hershmangil_he.
                      • This reply was modified 2 years, 7 months ago by Gil Hershmangil_he.
                  Viewing 3 reply threads
                  • You must be logged in to reply to this topic.