I've been working with GPIOs on an i.MX8QXP MEK with Baseboard. The particular GPIOs I've been using are on the Audio In connector on the bottom of the Baseboard, which I am using because I have a PCIe x8 ribbon cable, and I don't currently have any of the other connectors on the baseboard. The GPIOs on this Audio In connector currently have a high logic level of 1.8V. From threads like i.MX8 ADC_IN0 pin can't set as GPIO function, I have seen references to dual voltage pads. In particular, SC_P_COMP_CTL_GPIO_1V8_3V3_GPIORHB_PAD is what I'm referring to, which seems to indicate that the pad can output either 1.8V or 3.3V. In my devicetree I have the following code:
&esai0 {
status = "disabled";
};
&iomuxc {
pinctrl-0 = <&pinctrl_hog>, <&pinctrl_nstatus>, <&pinctrl_confdone>, <&pinctrl_initdone>, <&pinctrl_nconfig>, <&pinctrl_nce>, <&pinctrl_trgoe>;
imx8qxp-mek {
pinctrl_nstatus: nstatus {
fsl,pins = <
SC_P_COMP_CTL_GPIO_1V8_3V3_GPIORHB_PAD 0x000514a0
SC_P_ESAI0_SCKT_LSIO_GPIO0_IO03 0xE4000020 /* gpio 483 nSTATUS open-drain-input, pull-up, high-drive*/
>;
gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>;
};
pinctrl_confdone: confdone {
fsl,pins = <
SC_P_COMP_CTL_GPIO_1V8_3V3_GPIORHB_PAD 0x000514a0
SC_P_ESAI0_FST_LSIO_GPIO0_IO01 0xE4000020 /* gpio 481 CONF_DONE open-drain-input, pull-up, high-drive*/
>;
gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
};
pinctrl_initdone: initdone{
fsl,pins = <
SC_P_COMP_CTL_GPIO_1V8_3V3_GPIORHB_PAD 0x000514a0
SC_P_ESAI0_TX5_RX0_LSIO_GPIO0_IO09 0xE4000020 /* gpio 489 INIT_DONE open-drain-input, pull-up, high-drive*/
>;
gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
};
pinctrl_nconfig: nconfig{
fsl,pins = <
SC_P_COMP_CTL_GPIO_1V8_3V3_GPIORHB_PAD 0x000514a0
SC_P_ESAI0_SCKR_LSIO_GPIO0_IO02 0xE6000020 /* gpio 482 nCONFIG in-out, pull-up, high-drive*/
>;
gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
};
pinctrl_nce: nce{
fsl,pins = <
SC_P_COMP_CTL_GPIO_1V8_3V3_GPIORHB_PAD 0x000514a0
SC_P_ESAI0_TX1_LSIO_GPIO0_IO05 0xE6000020 /* gpio 485 nCE in-out, pull-up, high-drive*/
>;
gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
};
pinctrl_trgoe: trgoe{
fsl,pins = <
SC_P_COMP_CTL_GPIO_1V8_3V3_GPIORHB_PAD 0x000514a0
SC_P_ESAI0_TX2_RX3_LSIO_GPIO0_IO06 0xE6000020 /* gpio 486 TRGOE in-out, pull-up, high-drive*/
>;
gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
};
};
};
Following the example from the aforementioned thread, I added in the line "SC_P_COMP_CTL_GPIO_1V8_3V3_GPIORHB_PAD 0x000514a0" for each GPIO. My question is if I can change the output voltage by somehow modifying the hex value at the end of the line.
Any help appreciated. Thanks!
Nolan Z
Hi Nolan
>question is if I can change the output voltage by somehow modifying the hex value at the end of the line.
unfortunately not, it can be changed from userspace:
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------