Disable pullups on ConnectCard i.mx28 for GPIO use

My goal is to use ConnectCard i.mx28 pins 18, 20, 22, 24, and 26 (SSP0_CMD, SSP0_DATA0, SSP0_DATA1, SSP0_DATA2, and SSP0_DATA3, respectively) for GPIO. My problem is that the pins seem to have an internal pullup I just can’t clear. I’ve done what I believe to be an exhaustive effort to clear the pullups:

  • Added “config_dts disable ‘ssp0’” to linux-dey_3.10.bb to not initialize those pins with the SSP0 peripheral.

  • This didn’t have any effect, so I went nuclear and removed all references to ssp0, mmc0, and spi0 from imx28.dtsi.

  • Still no effect, so I added some pinctrl stanzas to imx28.dtsi to explicitly disable the pullups:

  •                           myboard: myboard@0 {
    
  •                                   reg = <0>;
    
  •                                   fsl,pinmux-ids = <
    
  •                                           0x2000 /* MX28_PAD_SSP0_DATA0__SSP0_D0 */
    
  •                                           0x2010 /* MX28_PAD_SSP0_DATA1__SSP0_D1 */
    
  •                                           0x2020 /* MX28_PAD_SSP0_DATA2__SSP0_D2 */
    
  •                                           0x2030 /* MX28_PAD_SSP0_DATA3__SSP0_D3 */
    
  •                                           0x2080 /* MX28_PAD_SSP0_CMD__SSP0_CMD */
    
  •                                           0x20a0 /* MX28_PAD_SSP0_SCK__SSP0_SCK */
    
  •                                   >;
    
  •                                   fsl,drive-strength = <0>;
    
  •                                   fsl,voltage = <1>;
    
  •                                   fsl,pull-up = <0>;
    
  •                           };
    
  • Still no effect, so I went looking for other methods to disable the pullup. On page 1008 of the i.MX28 manual, I found this:

“HW_OCOTP_ROM1:0x8002C1B0:17 SSP0_EXT_PULLUP - Blow this bit to disable the internal pull-ups for SSP0 DATA and CMD signals.”

So I used this command in uboot to blow the efuse:

otp blow 0x19 0x00020000

uboot now indicates it’s blown:
CCARDIMX28 # otp dump

HW_OCOTP_ROMn
HW_OCOTP_ROMn0: 0x00000000
HW_OCOTP_ROMn1: 0x00020000

And it’s still pulled high!

root@ccardimx28js:~# echo 72 > /sys/class/gpio/export
root@ccardimx28js:~# echo out > /sys/class/gpio/gpio72/direction
root@ccardimx28js:~# echo 0 > /sys/class/gpio/gpio72/value
root@ccardimx28js:~# cat /sys/class/gpio/gpio72/value
1

How do I disable this pullup?

Please take a look at this document:
https://www.kernel.org/doc/Documentation/devicetree/bindings/pinctrl/fsl,mxs-pinctrl.txt
I beleive it explains how to disable pull-ups via device tree

This is one of the things I tried. Please refer to the code pasted into my question. Do you know why this code doesn’t work?

have you tried to implement the example in the link as is without any changes? does it disable pull up on mmc-cd and mmc-sck pins?

it looks like some pins do not have an internal pull-up control, so make sure you use the pin that does: https://lkml.org/lkml/2013/3/31/117
https://git.geekli.st/pirej/kernel/commit/d8880a126d96ba0f9e0191826431650c24711d47

also found another example here:
https://git.congatec.com/arm/imx6_kernel_3.14/blob/87311d0455fb92cb6ad5ef539c9351a22c02e53a/Documentation/devicetree/bindings/pinctrl/fsl,mxs-pinctrl.txt

I have not used the example without changes for a few reasons:

I have no trouble disabling pullups on most pins. For example, I had no trouble disabling the pullup on SSP0_CARD_DETECT. Specifically, SSP0_CMD, SSP0_DATA0, SSP0_DATA1, SSP0_DATA2, and SSP0_DATA3 are the pins I have not been successful in disabling the pullups on.

The problem is that these pins are pulled high, not missing pullups as some of your links describe.