[MinnowBoard] Echo to MinnowBoardMax GPIO export fails

John 'Warthog9' Hawley warthog19 at eaglescrag.net
Sat Jan 3 22:40:13 UTC 2015


On 01/03/2015 02:20 PM, Michael Jones wrote:
> With respect to MinnowBoardMax and Linux 3.18.1 kernel with Ubuntu .config merged with Minnowmax-3.18.txt:
> 
> I2C and UART are working. GPIO is NOT working.
> 
> I am having trouble exporting 216 manually on the command line, or by running calimari-btns.sh
> 
> I get "no device found" when echoing 216 to /sys/class/gpio/export. (type command after sudo -s to exe as root)
> 
> I did a check of available ports with cat /sys/kernel/debug/gpio and nothing covers 216.
> 
> So I am wondering if the problem is the .config used to build a 3.18.1 kernel. I merged Minnowmax-3.18.txt, which enables gpio. However, something “extra” from Ubuntu land may interfere.
> 
> I have added the lines from my .config (grep on GPIO) and the /sys/kernel/debug/gpio data below to see if anyone can recognize the problem.
> 
> Is there something that needs to be done to enable GPIO similar to using i2c-dev and i2c-tools, etc?
> 
> Can someone cat their /sys/kernel/debug/gpio file on a system that the calimari-btns.sh runs on and send it?
> 
> Mike
> 
> .config
> ————
> 
> CONFIG_RFKILL_GPIO=m
> CONFIG_MTD_GPIO_ADDR=m
> CONFIG_MTD_NAND_GPIO=m
> CONFIG_MDIO_GPIO=y
> CONFIG_KEYBOARD_GPIO=m
> CONFIG_KEYBOARD_GPIO_POLLED=m
> CONFIG_MOUSE_GPIO=m
> # CONFIG_INPUT_GPIO_BEEPER is not set
> CONFIG_INPUT_GPIO_TILT_POLLED=m
> CONFIG_INPUT_GPIO_ROTARY_ENCODER=m
> CONFIG_I2C_MUX_GPIO=m
> CONFIG_I2C_CBUS_GPIO=m
> CONFIG_I2C_GPIO=m
> CONFIG_SPI_GPIO=m
> CONFIG_PPS_CLIENT_GPIO=m
> CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
> CONFIG_GPIOLIB=y
> CONFIG_GPIO_DEVRES=y
> CONFIG_GPIO_ACPI=y
> CONFIG_GPIOLIB_IRQCHIP=y
> # CONFIG_DEBUG_GPIO is not set
> CONFIG_GPIO_SYSFS=y
> CONFIG_GPIO_GENERIC=m
> CONFIG_GPIO_DA9052=m
> CONFIG_GPIO_DA9055=m
> CONFIG_GPIO_MAX730X=m
> # Memory mapped GPIO drivers:
> CONFIG_GPIO_GENERIC_PLATFORM=m
> # CONFIG_GPIO_DWAPB is not set
> CONFIG_GPIO_IT8761E=m
> CONFIG_GPIO_F7188X=m
> # CONFIG_GPIO_SCH311X is not set
> CONFIG_GPIO_SCH=m
> CONFIG_GPIO_ICH=m
> CONFIG_GPIO_VX855=m
> CONFIG_GPIO_LYNXPOINT=y
> # I2C GPIO expanders:
> CONFIG_GPIO_ARIZONA=m
> CONFIG_GPIO_MAX7300=m
> CONFIG_GPIO_MAX732X=m
> CONFIG_GPIO_PCA953X=m
> CONFIG_GPIO_PCF857X=m
> CONFIG_GPIO_RC5T583=y
> CONFIG_GPIO_SX150X=y
> CONFIG_GPIO_TC3589X=y
> CONFIG_GPIO_TPS65912=m
> CONFIG_GPIO_TWL6040=m
> CONFIG_GPIO_WM831X=m
> CONFIG_GPIO_WM8350=m
> CONFIG_GPIO_WM8994=m
> CONFIG_GPIO_ADP5520=m
> CONFIG_GPIO_ADP5588=m
> # PCI GPIO expanders:
> CONFIG_GPIO_AMD8111=m
> CONFIG_GPIO_INTEL_MID=y
> CONFIG_GPIO_ML_IOH=m
> CONFIG_GPIO_RDC321X=m
> # SPI GPIO expanders:
> CONFIG_GPIO_MAX7301=m
> CONFIG_GPIO_MCP23S08=m
> CONFIG_GPIO_MC33880=m
> # AC97 GPIO expanders:
> CONFIG_GPIO_UCB1400=m
> # LPC GPIO expanders:
> CONFIG_GPIO_KEMPLD=m
> # MODULbus GPIO expanders:
> CONFIG_GPIO_JANZ_TTL=m
> CONFIG_GPIO_PALMAS=y
> CONFIG_GPIO_TPS6586X=y
> CONFIG_GPIO_TPS65910=y
> # USB GPIO expanders:
> CONFIG_GPIO_VIPERBOARD=m
> CONFIG_W1_MASTER_GPIO=m
> CONFIG_CHARGER_GPIO=m
> CONFIG_SENSORS_GPIO_FAN=m
> CONFIG_SSB_DRIVER_GPIO=y
> CONFIG_BCMA_DRIVER_GPIO=y
> CONFIG_PCF50633_GPIO=m
> # CONFIG_MFD_SM501_GPIO is not set
> CONFIG_REGULATOR_GPIO=m
> CONFIG_IR_GPIO_CIR=m
> CONFIG_BACKLIGHT_GPIO=m
> CONFIG_USB_GPIO_VBUS=m
> CONFIG_LEDS_PCA9532_GPIO=y
> CONFIG_LEDS_GPIO=m
> CONFIG_LEDS_TRIGGER_GPIO=m
> CONFIG_EXTCON_GPIO=m
> 
> /sys/kernel/debug/gpio
> ———————————————
> 
> GPIOs 338-381, platform/INT33FC:02, INT33FC:02:
>  gpio-0   (Unrequested         ) in     hi pad-29  offset:0x1d0 mux:0                  up   20k
>  gpio-1   (Unrequested         ) in     hi pad-33  offset:0x210 mux:0                  up   20k
>  gpio-2   (Unrequested         ) in     hi pad-30  offset:0x1e0 mux:0                  up   20k
>  gpio-3   (Unrequested         ) in     lo pad-31  offset:0x1f0 mux:6  fall      level up   2k 
>  gpio-4   (Unrequested         ) in out lo pad-32  offset:0x200 mux:0                           
>  gpio-5   (Unrequested         ) in     hi pad-34  offset:0x220 mux:0                           
>  gpio-6   (Unrequested         ) in     lo pad-36  offset:0x240 mux:0                           
>  gpio-7   (Unrequested         ) in     lo pad-35  offset:0x230 mux:0                           
>  gpio-8   (Unrequested         )    out lo pad-38  offset:0x260 mux:0                           
>  gpio-9   (Unrequested         )    out lo pad-37  offset:0x250 mux:0                           
>  gpio-10  (Unrequested         )    out lo pad-18  offset:0x120 mux:0                           
>  gpio-11  (Unrequested         ) in     lo pad-7   offset:0x070 mux:0                  up   10k
>  gpio-12  (Unrequested         ) in     hi pad-11  offset:0x0b0 mux:0                           
>  gpio-13  (Unrequested         ) in     hi pad-20  offset:0x140 mux:0                           
>  gpio-14  (Unrequested         )    out lo pad-17  offset:0x110 mux:1                           
>  gpio-15  (Unrequested         ) in     hi pad-1   offset:0x010 mux:0                  up   20k
>  gpio-16  (Unrequested         ) in     hi pad-8   offset:0x080 mux:0                  up   20k
>  gpio-17  (Unrequested         ) in out hi pad-10  offset:0x0a0 mux:1                           
>  gpio-18  (Unrequested         )    out lo pad-19  offset:0x130 mux:1                           
>  gpio-19  (Unrequested         ) in     hi pad-12  offset:0x0c0 mux:0                  up   10k
>  gpio-20  (Unrequested         ) in     hi pad-0   offset:0x000 mux:0                  up   10k
>  gpio-21  (Unrequested         ) in     hi pad-2   offset:0x020 mux:0                           
>  gpio-22  (Unrequested         ) in out lo pad-23  offset:0x170 mux:0                           
>  gpio-23  (Unrequested         ) in out lo pad-39  offset:0x270 mux:0                           
>  gpio-24  (Unrequested         ) in out lo pad-28  offset:0x1c0 mux:0                           
>  gpio-25  (Unrequested         ) in out lo pad-27  offset:0x1b0 mux:0                           
>  gpio-26  (Unrequested         ) in out lo pad-22  offset:0x160 mux:0                           
>  gpio-27  (Unrequested         ) in     hi pad-21  offset:0x150 mux:0                  up   20k
>  gpio-28  (Unrequested         ) in     hi pad-24  offset:0x180 mux:0                  up   20k
>  gpio-29  (Unrequested         ) in     hi pad-25  offset:0x190 mux:0                  up   20k
>  gpio-30  (Unrequested         ) in     hi pad-26  offset:0x1a0 mux:0                  up   20k
>  gpio-31  (Unrequested         ) in out lo pad-51  offset:0x330 mux:0                           
>  gpio-32  (Unrequested         ) in out lo pad-56  offset:0x380 mux:0                           
>  gpio-33  (Unrequested         ) in out lo pad-54  offset:0x360 mux:0                           
>  gpio-34  (Unrequested         ) in out lo pad-49  offset:0x310 mux:0                           
>  gpio-35  (Unrequested         ) in out lo pad-55  offset:0x370 mux:0                           
>  gpio-36  (Unrequested         ) in out lo pad-48  offset:0x300 mux:0                           
>  gpio-37  (Unrequested         ) in out lo pad-57  offset:0x390 mux:0                           
>  gpio-38  (Unrequested         ) in out lo pad-50  offset:0x320 mux:0                           
>  gpio-39  (Unrequested         ) in out lo pad-58  offset:0x3a0 mux:0                           
>  gpio-40  (Unrequested         ) in out hi pad-52  offset:0x340 mux:0                           
>  gpio-41  (Unrequested         ) in out lo pad-53  offset:0x350 mux:0                           
>  gpio-42  (Unrequested         ) in out hi pad-59  offset:0x3b0 mux:0                           
>  gpio-43  (Unrequested         ) in out lo pad-40  offset:0x280 mux:0                           
> 
> GPIOs 382-409, platform/INT33FC:01, INT33FC:01:
>  gpio-0   (Unrequested         ) in     lo pad-19  offset:0x130 mux:2                           
>  gpio-1   (Unrequested         ) in     lo pad-18  offset:0x120 mux:2                           
>  gpio-2   (Unrequested         ) in     lo pad-17  offset:0x110 mux:2                           
>  gpio-3   (Unrequested         ) in out lo pad-20  offset:0x140 mux:2                           
>  gpio-4   (Unrequested         ) in out lo pad-21  offset:0x150 mux:2                           
>  gpio-5   (Unrequested         ) in out lo pad-22  offset:0x160 mux:2                           
>  gpio-6   (Unrequested         ) in     lo pad-24  offset:0x180 mux:0                  down 20k
>  gpio-7   (Unrequested         ) in     lo pad-25  offset:0x190 mux:2                  down 20k
>  gpio-8   (Unrequested         ) in     lo pad-23  offset:0x170 mux:0                  down 20k
>  gpio-9   (Unrequested         ) in out lo pad-16  offset:0x100 mux:0                           
>  gpio-10  (Unrequested         ) in out lo pad-14  offset:0x0e0 mux:0                           
>  gpio-11  (Unrequested         ) in out lo pad-15  offset:0x0f0 mux:0                           
>  gpio-12  (Unrequested         )    out lo pad-12  offset:0x0c0 mux:0                           
>  gpio-13  (Unrequested         ) in     lo pad-26  offset:0x1a0 mux:1                           
>  gpio-14  (Unrequested         ) in out lo pad-27  offset:0x1b0 mux:1                           
>  gpio-15  (Unrequested         ) in out lo pad-1   offset:0x010 mux:0                           
>  gpio-16  (Unrequested         ) in out lo pad-4   offset:0x040 mux:0                           
>  gpio-17  (Unrequested         ) in out lo pad-8   offset:0x080 mux:0                           
>  gpio-18  (Unrequested         ) in out lo pad-11  offset:0x0b0 mux:0                           
>  gpio-19  (Unrequested         ) in out lo pad-0   offset:0x000 mux:0                           
>  gpio-20  (Unrequested         ) in out lo pad-3   offset:0x030 mux:0                           
>  gpio-21  (Unrequested         ) in out lo pad-6   offset:0x060 mux:0                           
>  gpio-22  (Unrequested         ) in out lo pad-10  offset:0x0a0 mux:0                           
>  gpio-23  (Unrequested         ) in out lo pad-13  offset:0x0d0 mux:0                           
>  gpio-24  (Unrequested         ) in out lo pad-2   offset:0x020 mux:0                           
>  gpio-25  (Unrequested         ) in out lo pad-5   offset:0x050 mux:0                           
>  gpio-26  (Unrequested         ) in out lo pad-9   offset:0x090 mux:0                           
>  gpio-27  (Unrequested         )        lo pad-7   offset:0x070 mux:0                  down 20k
> GPIOs 410-511, platform/INT33FC:00, INT33FC:00:
>  gpio-0   (Unrequested         ) in     lo pad-85  offset:0x550 mux:1                           
>  gpio-1   (Unrequested         ) in     lo pad-89  offset:0x590 mux:1                           
>  gpio-2   (Unrequested         ) in     lo pad-93  offset:0x5d0 mux:1                           
>  gpio-3   (Unrequested         ) in     hi pad-96  offset:0x600 mux:1                  up   10k
>  gpio-4   (Unrequested         ) in     hi pad-99  offset:0x630 mux:1                  up   10k
>  gpio-5   (Unrequested         ) in     hi pad-102 offset:0x660 mux:1                  up   10k
>  gpio-6   (Unrequested         ) in out hi pad-98  offset:0x620 mux:0                           
>  gpio-7   (Unrequested         ) in     hi pad-101 offset:0x650 mux:2                  up   20k
>  gpio-8   (Unrequested         ) in out lo pad-34  offset:0x220 mux:0                           
>  gpio-9   (Unrequested         ) in out lo pad-37  offset:0x250 mux:0                           
>  gpio-10  (Unrequested         ) in out lo pad-36  offset:0x240 mux:0                           
>  gpio-11  (Unrequested         ) in out lo pad-38  offset:0x260 mux:0                           
>  gpio-12  (Unrequested         ) in out lo pad-39  offset:0x270 mux:0                           
>  gpio-13  (Unrequested         ) in out lo pad-35  offset:0x230 mux:0                           
>  gpio-14  (Unrequested         ) in out lo pad-40  offset:0x280 mux:0                           
>  gpio-15  (Unrequested         ) in out lo pad-84  offset:0x540 mux:0                           
>  gpio-16  (Unrequested         ) in out lo pad-62  offset:0x3e0 mux:3                  down 20k
>  gpio-17  (Unrequested         ) in out lo pad-61  offset:0x3d0 mux:3                  up   20k
>  gpio-18  (Unrequested         ) in out lo pad-64  offset:0x400 mux:3                  up   20k
>  gpio-19  (Unrequested         ) in out lo pad-59  offset:0x3b0 mux:3                  up   20k
>  gpio-20  (Unrequested         ) in out hi pad-54  offset:0x360 mux:3                  up   20k
>  gpio-21  (Unrequested         ) in out lo pad-56  offset:0x380 mux:3                  up   20k
>  gpio-22  (Unrequested         ) in out lo pad-60  offset:0x3c0 mux:3                  up   20k
>  gpio-23  (Unrequested         ) in out lo pad-55  offset:0x370 mux:3                  up   20k
>  gpio-24  (Unrequested         ) in out lo pad-63  offset:0x3f0 mux:3                  up   20k
>  gpio-25  (Unrequested         ) in out lo pad-57  offset:0x390 mux:3                  up   20k
>  gpio-26  (Unrequested         ) in out hi pad-51  offset:0x330 mux:3                  down 20k
>  gpio-27  (Unrequested         ) in out lo pad-50  offset:0x320 mux:1                  down 20k
>  gpio-28  (Unrequested         ) in out lo pad-53  offset:0x350 mux:1                  up   20k
>  gpio-29  (Unrequested         ) in out lo pad-47  offset:0x2f0 mux:1                  up   20k
>  gpio-30  (Unrequested         ) in out lo pad-52  offset:0x340 mux:1                  up   20k
>  gpio-31  (Unrequested         ) in out hi pad-49  offset:0x310 mux:1                  up   20k
>  gpio-32  (Unrequested         ) in out lo pad-48  offset:0x300 mux:1                  up   20k
>  gpio-33  (Unrequested         ) in     lo pad-43  offset:0x2b0 mux:1                  down 20k
>  gpio-34  (Unrequested         ) in     lo pad-46  offset:0x2e0 mux:1                  up   20k
>  gpio-35  (Unrequested         ) in     lo pad-41  offset:0x290 mux:1                  up   20k
>  gpio-36  (Unrequested         ) in     lo pad-45  offset:0x2d0 mux:1                  up   20k
>  gpio-37  (Unrequested         ) in     lo pad-42  offset:0x2a0 mux:1                  up   20k
>  gpio-38  (Unrequested         ) in     hi pad-58  offset:0x3a0 mux:1  fall rise                
>  gpio-39  (Unrequested         ) in     lo pad-44  offset:0x2c0 mux:1                  up   20k
>  gpio-40  (Unrequested         ) in     lo pad-95  offset:0x5f0 mux:1                  down 20k
>  gpio-41  (Unrequested         ) in     hi pad-105 offset:0x690 mux:1                  up   20k
>  gpio-42  (Unrequested         ) in out lo pad-70  offset:0x460 mux:0                           
>  gpio-43  (Unrequested         ) in out lo pad-68  offset:0x440 mux:0                           
>  gpio-44  (Unrequested         ) in out lo pad-67  offset:0x430 mux:0                           
>  gpio-45  (Unrequested         ) in out lo pad-66  offset:0x420 mux:0                           
>  gpio-46  (Unrequested         ) in out hi pad-69  offset:0x450 mux:0                           
>  gpio-47  (Unrequested         ) in out lo pad-71  offset:0x470 mux:0                           
>  gpio-48  (Unrequested         ) in out lo pad-65  offset:0x410 mux:0                           
>  gpio-49  (Unrequested         ) in out hi pad-72  offset:0x480 mux:0                           
>  gpio-50  (Unrequested         ) in out lo pad-86  offset:0x560 mux:0                           
>  gpio-51  (Unrequested         ) in     lo pad-90  offset:0x5a0 mux:1                           
>  gpio-52  (Unrequested         ) in     lo pad-88  offset:0x580 mux:1                           
>  gpio-53  (Unrequested         ) in     hi pad-92  offset:0x5c0 mux:1                  up   10k
>  gpio-54  (Unrequested         ) in     hi pad-103 offset:0x670 mux:0                  up   20k
>  gpio-55  (Unrequested         ) in out lo pad-77  offset:0x4d0 mux:0                           
>  gpio-56  (Unrequested         ) in     hi pad-79  offset:0x4f0 mux:0                  up   20k
>  gpio-57  (Unrequested         ) in     lo pad-83  offset:0x530 mux:1                  down 20k
>  gpio-58  (Unrequested         ) in out lo pad-78  offset:0x4e0 mux:0                           
>  gpio-59  (Unrequested         ) in out lo pad-81  offset:0x510 mux:0                           
>  gpio-60  (Unrequested         )    out lo pad-80  offset:0x500 mux:0                           
>  gpio-61  (Unrequested         ) in     lo pad-82  offset:0x520 mux:1                  up   20k
>  gpio-62  (Unrequested         ) in     hi pad-13  offset:0x0d0 mux:0                  up   20k
>  gpio-63  (Unrequested         ) in     hi pad-12  offset:0x0c0 mux:0                  up   20k
>  gpio-64  (Unrequested         ) in     hi pad-15  offset:0x0f0 mux:0                  up   20k
>  gpio-65  (Unrequested         ) in     hi pad-14  offset:0x0e0 mux:0                  up   20k
>  gpio-66  (Unrequested         ) in     hi pad-17  offset:0x110 mux:1                  up   20k
>  gpio-67  (Unrequested         ) in     lo pad-18  offset:0x120 mux:1                  up   20k
>  gpio-68  (Unrequested         ) in     lo pad-19  offset:0x130 mux:1                  up   20k
>  gpio-69  (Unrequested         ) in     lo pad-16  offset:0x100 mux:1                  down 20k
>  gpio-70  (Unrequested         ) in     lo pad-2   offset:0x020 mux:1                  up   20k
>  gpio-71  (Unrequested         ) in     lo pad-1   offset:0x010 mux:1                  up   20k
>  gpio-72  (Unrequested         ) in     hi pad-0   offset:0x000 mux:0                  up   20k
>  gpio-73  (Unrequested         ) in     hi pad-4   offset:0x040 mux:0                  up   20k
>  gpio-74  (Unrequested         ) in     lo pad-6   offset:0x060 mux:1                  up   20k
>  gpio-75  (Unrequested         ) in     lo pad-7   offset:0x070 mux:1                  up   20k
>  gpio-76  (Unrequested         ) in out hi pad-9   offset:0x090 mux:0                  up   20k
>  gpio-77  (Unrequested         ) in     hi pad-8   offset:0x080 mux:0                  up   20k
>  gpio-78  (Unrequested         ) in out hi pad-33  offset:0x210 mux:0                           
>  gpio-79  (Unrequested         ) in out hi pad-32  offset:0x200 mux:0                           
>  gpio-80  (Unrequested         ) in     lo pad-31  offset:0x1f0 mux:1                           
>  gpio-81  (Unrequested         ) in     lo pad-30  offset:0x1e0 mux:1                           
>  gpio-82  (Unrequested         ) in out hi pad-29  offset:0x1d0 mux:0                           
>  gpio-83  (Unrequested         ) in out hi pad-27  offset:0x1b0 mux:0                           
>  gpio-84  (Unrequested         ) in out hi pad-25  offset:0x190 mux:0                           
>  gpio-85  (Unrequested         ) in out hi pad-28  offset:0x1c0 mux:0                           
>  gpio-86  (Unrequested         ) in     lo pad-26  offset:0x1a0 mux:1                  up   20k
>  gpio-87  (Unrequested         ) in out hi pad-23  offset:0x170 mux:0                           
>  gpio-88  (Unrequested         ) in     lo pad-21  offset:0x150 mux:1                  up   2k 
>  gpio-89  (Unrequested         ) in     lo pad-20  offset:0x140 mux:1                  up   2k 
>  gpio-90  (Unrequested         ) in     lo pad-24  offset:0x180 mux:1                  up   2k 
>  gpio-91  (Unrequested         ) in     lo pad-22  offset:0x160 mux:1                  up   2k 
>  gpio-92  (Unrequested         ) in out lo pad-5   offset:0x050 mux:1                           
>  gpio-93  (Unrequested         )    out lo pad-3   offset:0x030 mux:1                           
>  gpio-94  (Unrequested         ) in     lo pad-10  offset:0x0a0 mux:1                  down 20k
>  gpio-95  (Unrequested         ) in     lo pad-11  offset:0x0b0 mux:1                           
>  gpio-96  (Unrequested         ) in out lo pad-106 offset:0x6a0 mux:0                           
>  gpio-97  (Unrequested         ) in out lo pad-87  offset:0x570 mux:0                           
>  gpio-98  (Unrequested         ) in out lo pad-91  offset:0x5b0 mux:0                           
>  gpio-99  (Unrequested         ) in out lo pad-104 offset:0x680 mux:0                           
>  gpio-100 (Unrequested         ) in out lo pad-97  offset:0x610 mux:0                           
>  gpio-101 (Unrequested         ) in out lo pad-100 offset:0x640 mux:0       

it's pretty obvious that the Ubuntu kernel there is enumerating the
gpio's significantly different than a stock kernel (or any other
distro's kernel).  When I get a chance this week I'll try and get it
figured out what's going on there.

Any chance you can try a completely stock kernel 3.18.x kernel?

- John 'Warthog9' Hawley


More information about the elinux-MinnowBoard mailing list