IMX8QXP GPIOs UBOOT

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX8QXP GPIOs UBOOT

1,697 Views
eldon_hiebert
Contributor I

How to declare a general use GPIO in DTS file for u-boot?

example:

in the dts file......

pinctrl_gpio3: gpio3grp {
fsl,pins = <
   SC_P_QSPI0A_SS1_B_LSIO_GPIO3_IO15 0x00000041 /* NOR_RESET (gpio399) */
   SC_P_QSPI0B_SCLK_LSIO_GPIO3_IO17 0x00000061 /* 5VIMX_OC_ (gpio401) */
   SC_P_QSPI0B_DQS_LSIO_GPIO3_IO22 0x00000061 /* ETH_RESET (gpio406) */
   SC_P_QSPI0B_SS0_B_LSIO_GPIO3_IO23 0x00000061 /* ETH_PHY_INTn (gpio407) */
   SC_P_QSPI0B_SS1_B_LSIO_GPIO3_IO24 0x00000041 /* AVAILABLE (gpio408) */
>;
};

....

&fec1 {
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_fec1>;
   phy-mode = "rgmii";
   phy-handle = <&ethphy0>;
   local-mac-address = [00 0a 35 00 00 01];
   fsl,magic-packet;
   enet-reset = <&gpio3 22 GPIO_ACTIVE_HIGH>;
   status = "okay";

   mdio {
      #address-cells = <1>;
      #size-cells = <0>;

      ethphy0: ethernet-phy@0 {
         compatible = "ethernet-phy-ieee802.3-c45";
         device_type = "ethernet-phy";
         reg = <3>;
         max-speed = <100>;
      };
   };
};

in u-boot have a c-code section....

ret = dm_gpio_lookup_name("enet-reset", &desc);

this returns -EINVAL

Confused about access of GPIOs in general on imx8qxp platform in u-boot.

0 Kudos
Reply
1 Reply

1,558 Views
igorpadykov
NXP Employee
NXP Employee

Hi Eldon

I am afraid this is not supported (note i.MX8QXP is not publicly released yet and

has not full support), gpio example (like USDHC1_CD_GPIO) can be found on

imx8qxp_mek.c\imx8qxp_mek\freescale\board - uboot-imx - i.MX U-Boot 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply