Pinebook SDIO gpio control using SD card slot blog post
#5
          


By disabling the sdmmc for sdc0,  and setting sdc0 to function gpio_in, muxsel 0x0, drive 0x0, (pinctrl and bindings) I have been able to set gpio160 - gpio165 ( PF0 - PF5 ) to ON | OFF with the sysfs method:

echo 160 > export
echo out > gpio160/direction
echo 1 > gpio160/value
echo 0 > gpio160/value

After bootup the gpio(s) were in default input (cmd and clk no longer strobing); all six gpio(s) were successfully exported, defined, and set ON|OFF. In the left pic above the right LED is Vdd monitor while the left LED is monitoring gpio160 which has just been set ON.  In the right pic the gpio160 has been set OFF;  Vdd still indicating 3v3 rail.

Note:  the dts|dtb is static atm;  will want to configure so that uEnv.txt controls dtb "on-the-fly" via variable. 

Note:  the SD card slot can be raw gpio(s) ;  or SD card external storage ; or SPI  (jtag, other)

Note:  All of this assumes ofc that the pinebook is booted via eMMC;  SD card slot is disabled for external storage

Note:  option (2)  sniffer adapter is less than expected;  sloppy in the slot and difficult to control;  the card needs to be just a tad thicker, and the latching mechanism needs to be better defined;  may have to make our own cards !



marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )


Messages In This Thread
RE: Pinebook SDIO gpio control using SD card slot blog post - by MarkHaysHarris777 - 07-22-2017, 04:17 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  pinebook 1080p power/barrel connector/cable cel 0 791 08-03-2023, 11:43 AM
Last Post: cel
  eMMC compatible with Pinebook leperotero 0 1,593 07-19-2022, 07:15 AM
Last Post: leperotero
Heart [solved] Anyone selling their Pinebook? feyn 0 1,495 07-11-2022, 03:38 PM
Last Post: feyn
  Move PB Pro eMMC 128 GB to Pinebook 11 1080p petet0n76 1 2,030 06-07-2022, 10:35 PM
Last Post: tllim
  UART switch Pinebook 11.6" irongarment 3 3,911 01-03-2022, 03:28 AM
Last Post: kqlnut
Exclamation "6" Key direly needed for 11" Pinebook Corkonian 1 2,996 09-25-2021, 12:03 AM
Last Post: tllim
  SD card read/write troubles jezek 1 3,339 03-26-2021, 09:27 AM
Last Post: jezek
  Pinebook 14 " Battery Swollen/Bulged billjon 1 4,009 01-13-2021, 11:03 AM
Last Post: barray
  touchpad on pinebook issues? ron_burgundy 14 15,483 12-19-2020, 06:55 PM
Last Post: ron_burgundy
  CH341 boards for GPIO xalius 1 4,502 11-22-2020, 10:50 AM
Last Post: pinephonenewbee

Forum Jump:


Users browsing this thread: 2 Guest(s)