Dobrica Pavlinušić's random unstructured stuff
esp8089: Revision 10
use [esp8266] module over sdio on [cubieboard] as wifi card

{toc: }

^ links

https://hackaday.io/project/8678-rpi-wifi-hat
https://github.com/al177/esp8089

^ setup

^^ cubieboard pinout

.pre
root@cubieboard:/home/dpavlin# cat mmc3-sdio.txt
22 PI4 2 1 2 [mmc mmc3] SCD3_CMD
24 PI5 2 1 2 [mmc mmc3] SCD3_CLK
26 PI6 2 1 2 [mmc mmc3] SCD3_D0
28 PI7 2 1 2 [mmc mmc3] SCD3_D1
30 PI8 2 1 2 [mmc mmc3] SCD3_D2
32 PI9 2 1 2 [mmc mmc3] SCD4_D3
.pre

^^ ESP-201 pinout from top

.pre
15 IO0 13 IO15
14 IO2 12 IO13
18 D2 GPIO9 10 IO12
21 CLK GPIO6 9 IO14
20 CMD GPIO11 8 XPD GPIO16
22 D0 GPIO7 7 CHIP_EN
23 D1 GPIO8 32 RST
19 D3 GPIO10 6 TOUT ADC
16 IO4 24 IO5
3.3V GND
3.3V GND
.pre

^^ CH_EN mapping to GPIO pin

.pre
PE4 "132" => "PE4", -> CHIP_EN

root@cubieboard:/home/dpavlin/linux-gpio-pinout# modprobe esp8089 esp_reset_gpio=132 # PE4
[Sun Jun 30 19:19:24 2019]
***** EAGLE DRIVER VER:bdf5087c3deb*****

[Sun Jun 30 19:19:24 2019] ESP8089 reset via GPIO 132
[Sun Jun 30 19:19:35 2019] esp_sdio_init ------ RETRY ------
[Sun Jun 30 19:19:35 2019] ESP8089 reset via GPIO 132
[Sun Jun 30 19:19:35 2019] ESP8089 reset via GPIO 132
[Sun Jun 30 19:19:46 2019] esp_sdio_init ------ RETRY ------
[Sun Jun 30 19:19:46 2019] ESP8089 reset via GPIO 132
[Sun Jun 30 19:19:47 2019] ESP8089 reset via GPIO 132
[Sun Jun 30 19:19:58 2019] esp_sdio_init ------ RETRY ------
[Sun Jun 30 19:19:58 2019] ESP8089 reset via GPIO 132
[Sun Jun 30 19:19:58 2019] ESP8089 reset via GPIO 132
[Sun Jun 30 19:20:09 2019] esp_sdio_init ------ RETRY ------
[Sun Jun 30 19:20:09 2019] ESP8089 reset via GPIO 132
modprobe: ERROR: could not insert 'esp8089': No such device
[Sun Jun 30 19:20:10 2019] eagle sdio can not power up!

.pre

^ additional components

https://hackaday.io/project/8678-rpi-wifi/details

missing 200 ohm resistors on sdio lines

4.7k pullup on CH_PD https://github.com/al177/esp8089/issues/4

rpi needs dtoverlay=sdio,poll_once=false

it's still not clear to me do I have to remove spi flash or not

newer project with simpler overview

* https://hackaday.io/project/12980-pi2wifi
* https://sites.google.com/site/mincepi/pi2wifi

it suggests 33 ohm resistors on sdio, includes dts overlay)

https://hackaday.io/project/8678/instructions also suggest 33 ohm resistors...

^ clear the QE (quad enable) bit in the sreg2 of a W25Q40BV or similar

https://github.com/jacksonliam/rpi-bitbang-spiflash

^ bootloader

^^ IO15 -> 3V3

My best guess from espressif powerpoint this is sdio boot mode

.pre
ets Jan 8 2013,rst cause:1, boot mode:(7,7)

waiting for host
.pre