Configure GPIO's through custom Device Tree

Forums Devices OSD335x-SM Configure GPIO's through custom Device Tree

Viewing 3 reply threads
  • Author
    Posts
    • #6206
      Dusty
      Participant

      Hello,

      I followed the Linux Device Tree Application Note to add some GPIO’s (all in GPIO3 module):

      and

      (full dts file attached).

      I also disabled the other overlays and cape manager in uEnv.txt (to avoid my dts configuration to be overwritten):

      (full uEnv.txt attached).

      The problem is that my GPIO configuration still doesn’t seem to take effect:

      I can export most gpio’s manually, and control them, but they all default to inputs (27h), although configured differently in the Device Tree.

      Is my Device Tree wrong?

      Are my Device Tree setting overwritten through an overlay (although disabled)?

      The boot log indicates that the overlays are not loaded, but I still see this in the boot log (bone_capemgr.uboot_capemgr_enabled=1):

      Why would the u-boot command enable it although disabled through uEnv.txt?

       

      Part 2 of the question:

      GPIO3[15] is a little bit different: USB1_DRVVBUS.gpio3[13]

      This is the USB1 bus power pin and it seems to resist to be put in GPIO mode 7 because it’s already claimed by USB1.

      However, I don’t have an USB1 interface physically on my custom board, and didn’t include it in my Device Tree. Any ideas how I can ‘free’ this pin to be used as GPIO3[15]?

       

      Thank you,
      Dusty

      • This topic was modified 5 years, 9 months ago by Dusty.
      • This topic was modified 5 years, 9 months ago by Dusty.
    • #6223
      Eshtaartha Basu
      Moderator

      Hello Dusty,

      I will look into this issue and get back to you by the beginning of next week.

    • #6254
      Eshtaartha Basu
      Moderator

      Hello Dusty,

      Sorry. This is taking longer than expected. I will get back to you on this issue by the beginning of the week of Aug 21st.

    • #6305
      Eshtaartha Basu
      Moderator

      Hello Dusty,

      Sorry for the delay in response.

      Your device tree is not correct. gpio3_default node is not binding to any parent node.

      /
      &ocp {
      compatible = “bone-pinmux-helper”;
      pinctrl-names = “default”;
      pinctrl-0 = <&gpio3_pins_default>;
      status = “okay”;
      }; /

      should be:

      &ocp {
      gpio3_default {
      compatible = “bone-pinmux-helper”;
      pinctrl-names = “default”;
      pinctrl-0 = <&gpio3_pins_default>;
      status = “okay”;
      };
      };

      You need to uncomment &ocp node and add gpio3_default under it. This is similar to the BB Blue dts:
      https://github.com/RobertCNelson/dtb-rebuilder/blob/4.14-ti/src/arm/am335x-boneblue.dts#L706

      For the USB1_DRVVBUS issue, you might need to modify the device tree to set usb1 to peripheral mode where the driver will not take control of the DRVVBUS signal.

      A similar issue has been resolved on TI forum:
      https://e2e.ti.com/support/arm/sitara_arm/f/791/t/270060?USB1-power-control-with-DRVVBUS?

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