OSD32MP153C GPIO read

Forums Devices OSD32MP15x OSD32MP153C GPIO read

Viewing 8 reply threads
  • Author
    Posts
    • #15375
      Gil Hershmangil_he
      Participant

        hello,

        We implemented the STUSB1600 in our board using the OSD32MP153C-512M-BAA.

        Its ALERT# pin is connected to PE8, which is defined as an interrupt for the SoC.

        Implementation is the same as ST DK2 eval board (except we use PE8 and ST uses PI11).

        When I measure the voltage on PE8, I read Low.

        When I read the value using an I2C4 read command, from the UBOOT CLI, I get High.

        How can that be?

        From UBOOT CLI, I use:

        i2c dev 0

        gpio input GPIOE8

        Attached find the UBOOT device tree files.

        thanks,

        Gil

        • This topic was modified 4 weeks ago by Gil Hershmangil_he.
      • #15390
        Neeraj Dantu
        Moderator

          Gil,

          The device tree attached shows that GPIOE8 has the internal pull-up enabled. However, there should not be a measurement discrepancy between u-boot CLI and measurement.

          Here is an interaction I just had on the CLI to show status of GPIOE8 on the RED board:

           

           

        • #15394
          Gil Hershmangil_he
          Participant

            Hi Neeraj,

            I agree.

            There shouldn’t be any discrepancy.

            But, there is.

            What is wrong here?

            Why do the GPIO measurement and GPIO I2C read give different results?

            thanks,

            Gil

          • #15451
            Gil Hershmangil_he
            Participant

              Hi Neeraj,

              I checked GPIOE8 after power up and it reads Low (via UBOOT CLI).

              After some time I checked again and it reads High (few minutes, maybe 10 minutes).

              Nothing changed in the setup. Scope read 0V the entire time.

              Can you perform the same?

              thanks,

              Gil

              • This reply was modified 1 week, 5 days ago by Gil Hershmangil_he.
            • #15477
              Gil Hershmangil_he
              Participant

                Hi Neeraj,

                I checked STUSB1600 registers from UBOOT CLI, in different USB connection scenarios.

                All registers, but one, seem to be correct. The device registers reflect correctly a dynamic connect/disconnect on its USB port

                One thing that is not defined correctly in the STUSB1600, for all scenarios:

                Register 0x0c = 0xf3 which means all interrupts are masked.

                So, when we dynamically connect/disconnect a Host or device to our system, the STUSB1600 will not issue an interrupt.

                How do we correct that?

                thanks,

                Gil

                 

              • #15479
                Neeraj Dantu
                Moderator

                  Gil,

                  I am investigating and will report back.

                  Best,

                  Neeraj

                • #15480
                  Gil Hershmangil_he
                  Participant

                    Hi Neeraj,

                    Adding some data:
                    I changed STUSB1600 register 0x0c to 0x93 to unmask the interrupts.

                     

                    I reset the board with a USB Host connected to it.

                    All registers’ values reflect the state correctly.

                     

                    I disconnected the USB Host.

                    All registers’ values reflect the state correctly.

                     

                    I connected a USB Device.

                    All registers’ values reflect the state correctly.

                     

                    But, the ALERT# pin (interrupt) is not changing. Scope shows Low level all the time.

                    No activity whatsoever.

                    And gpio input GPIOE8 reads High.

                    STM32MP> gpio input GPIOE8

                    gpio: pin GPIOE8 (gpio 72) value is 1

                     

                    Maybe something is wrongly defined with GPIO PE8.

                    I sent you the dts files.

                    What are we missing here?

                     

                    Thanks,

                    Gil

                    • This reply was modified 1 week ago by Gil Hershmangil_he.
                    • This reply was modified 1 week ago by Gil Hershmangil_he.
                    • This reply was modified 1 week ago by Gil Hershmangil_he.
                    • This reply was modified 1 week ago by Gil Hershmangil_he.
                  • #15486
                    Neeraj Dantu
                    Moderator

                      Gil,

                      Can you check the connection of VDD(pin 24) of USBC1600? For OTG functionality, this needs to be connected to mid way point of the USB-C sink power path. On the RED board, I needed to change the jumper position of JP21 in order for OTG function to work. I was able to verify both sink and source modes as well as see the interrupt on ALERT pin when something is connected.

                      I am still unsure why you are reading different value of GPIO. My suspicion is that there is an issue with U-Boot CLI handling this claimed pin. I will check further, but I don’t think anything is wrong based on the functionality all working.

                      Best,

                      Neeraj

                    • #15491
                      Gil Hershmangil_he
                      Participant

                        Hi Neeraj,

                        On our system, VDD pin of the STUSB1600 is connected to 5V (same 5V that power the Octavo SiP).

                        The same connection exists in the Octavo DK2 ref design (attached picture).

                        We don’t have a Sink capability, in the sense that an external USB Host powers our system.

                        We can act as a USB Host with power sourcing and as a USB Device.

                        So, we don’t have a power Sink circuit (as the RED has).

                        I attached also our circuit design.

                        What do you think?

                        Thanks,

                        Gil

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