Open tgt008 opened 2 months ago
Please provide the related log. The issue is not clear enough. Please refer to Porting Guide for getting the correct bus setup. unless required things are set correctly, the bus cannot perform. As a result, unfortunately, any higher applications as you tried will just fail.
1.FG or NG NG
4 esp log: minicom or idf.py monitor ESP-ROM:esp32c6-20220919 Build:Sep 19 2022 rst:0x1 (POWERON),boot:0x2e (SPI_FAST_FLASH_BOOT) SPIWP:0xee mode:DIO, clock div:2 load:0x4086c410,len:0xd44 load:0x4086e610,len:0x2de4 load:0x40875728,len:0x17d8 entry 0x4086c410 I (23) boot: ESP-IDF v5.1.3-dirty 2nd stage bootloader I (24) boot: compile time Aug 9 2024 18:46:32 I (24) boot: chip revision: v0.0 I (27) boot.esp32c6: SPI Speed : 80MHz I (32) boot.esp32c6: SPI Mode : DIO I (36) boot.esp32c6: SPI Flash Size : 4MB I (41) boot: Enabling RNG early entropy source... I (47) boot: Partition Table: I (50) boot: ## Label Usage Type ST Offset Length I (57) boot: 0 nvs WiFi data 01 02 00009000 00004000 I (65) boot: 1 otadata OTA data 01 00 0000d000 00002000 I (72) boot: 2 phy_init RF data 01 01 0000f000 00001000 I (80) boot: 3 factory factory app 00 00 00010000 00100000 I (87) boot: 4 ota_0 OTA app 00 10 00110000 00100000 I (95) boot: 5 ota_1 OTA app 00 11 00210000 00100000 I (102) boot: End of partition table I (107) boot: Defaulting to factory image I (111) esp_image: segment 0: paddr=00010020 vaddr=420b0020 size=21ea8h (138920) map I (149) esp_image: segment 1: paddr=00031ed0 vaddr=40800000 size=0e148h ( 57672) load I (163) esp_image: segment 2: paddr=00040020 vaddr=42000020 size=a50bch (676028) map I (303) esp_image: segment 3: paddr=000e50e4 vaddr=4080e148 size=0bb00h ( 47872) load I (315) esp_image: segment 4: paddr=000f0bec vaddr=40819c50 size=0352ch ( 13612) load I (324) boot: Loaded app from partition at offset 0x10000 I (325) boot: Disabling RNG early entropy source... I (336) cpu_start: Unicore app I (336) cpu_start: Pro cpu up. W (345) clk: esp_perip_clk_init() has not been implemented yet I (352) cpu_start: Pro cpu start user code I (352) cpu_start: cpu freq: 160000000 Hz I (352) cpu_start: Application information: I (355) cpu_start: Project name: network_adapter I (360) cpu_start: App version: NG-1.0.3.0.0 I (366) cpu_start: Compile time: Aug 9 2024 18:46:15 I (372) cpu_start: ELF file SHA256: 09286b9a... I (377) cpu_start: ESP-IDF: v5.1.3-dirty I (382) cpu_start: Min chip rev: v0.0 I (387) cpu_start: Max chip rev: v0.99 I (392) cpu_start: Chip rev: v0.0 I (397) heap_init: Initializing. RAM available for dynamic allocation: I (404) heap_init: At 4082BE80 len 00050790 (321 KiB): D/IRAM I (410) heap_init: At 4087C610 len 00002F54 (11 KiB): STACK/DIRAM I (417) heap_init: At 50000000 len 00003FE8 (15 KiB): RTCRAM I (424) spi_flash: detected chip: generic I (428) spi_flash: flash io: dio W (432) spi_flash: Detected size(8192k) larger than the size in the binary image header(4096k). Using the size in the binary image header. I (445) sleep: Configure to isolate all GPIO pins in sleep state I (452) sleep: Enable automatic switching of GPIO sleep configuration I (459) coexist: coex firmware version: 77cd7f8 I (464) coexist: coexist rom version 5b8dcfa I (470) app_start: Starting scheduler on CPU0 I (474) main_task: Started on CPU0 I (478) main_task: Calling app_main() I (482) stats: I (490) stats: ESP-Hosted Firmware version :: NG-1.0.3.0.0 I (500) stats: Transport used :: SDIO only I (508) stats: I (516) FW_MAIN: Supported features are: I (521) FW_MAIN: - WLAN over SDIO I (525) FW_BT: - BT/BLE I (528) FW_BT: - HCI Over SDIO I (532) FW_BT: - BLE only I (536) FW_MAIN: Capabilities: 0xd I (545) pp: pp rom version: 5b8dcfa I (545) net80211: net80211 rom version: 5b8dcfa I (550) wifi:wifi driver task: 4087df48, prio:23, stack:6656, core=0 I (556) wifi:wifi firmware version: d23b633 I (559) wifi:wifi certification version: v7.0 I (563) wifi:config NVS flash: disabled I (567) wifi:config nano formating: disabled I (571) wifi:mac_version:HAL_MAC_ESP32AX_761,ut_version:N I (576) wifi:Init data frame dynamic rx buffer num: 60 I (581) wifi:Init static rx mgmt buffer num: 5 I (585) wifi:Init management short buffer num: 32 I (589) wifi:Init dynamic tx buffer num: 40 I (593) wifi:Init static tx FG buffer num: 2 I (597) wifi:Init static rx buffer size: 1700 I (602) wifi:Init static rx buffer num: 40 I (605) wifi:Init dynamic rx buffer num: 60 I (610) wifi_init: rx ba win: 32 I (613) wifi_init: tcpip mbox: 32 I (617) wifi_init: udp mbox: 6 I (621) wifi_init: tcp mbox: 6 I (624) wifi_init: tcp tx win: 5760 I (629) wifi_init: tcp rx win: 5760 I (633) wifi_init: tcp mss: 1440 I (637) wifi_init: WiFi IRAM OP enabled I (641) wifi_init: WiFi RX IRAM OP enabled I (646) BLE_INIT: Using main XTAL as clock source I (656) BLE_INIT: ble controller commit:[217f1bf] I (657) phy_init: phy_version 250,e14681b,Jan 24 2024,17:43:11 I (703) phy: libbtbb version: 939f79c, Jan 24 2024, 17:43:26 I (703) FW_MAIN: ESP Bluetooth MAC addr: 40-4c-ca-56-c1-b6
I (704) FW_SDIO_SLAVE: Using SDIO interface I (710) gpio: GPIO[4]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
5 git commit used at esp and host host
I fail to see any sdio hardware configured at host.
Please review your system's device tree config so that the sdio hardware is configured and detected.
Please review the porting guide steps earlier shared.
Hello @mantriyogesh, I'm new at ESP32, and in my custom board I want to use ESP32 for wifi and bluetooth over the SDIO interface on yocto Linux. Can you help me with integrating the device tree for my board and also the drivers. I cant understand how to integrate it for my AM625 device. Please help me with this. Best Regards, Aditya T
Device tree customisation and configurations are out of scope for ESP-Hosted. They are actually requirements.
We genuinely wish to help, but every Linux system and device trees vary per Linux SoCs. And it needs some patience, if you are doing it for first time.
I think, it would be easier if you start with a commonly known or generally easier Linux SoC. As you would get device tree dumps in public domain. Obviously copying would not work, but at least you would get some idea.
In general it is easier to set up spi, as it also allows to use jumper cables of around 10cm.
why iam not abled to generate virtual serial interface to set up wifi and set internet using esp hosted FG even after flashing corresponding repositories of FG in both raspberry pi 4 b and esp32 s3 wroom 1 devices dmesg | tail -n 50 [ 12.268969] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video20 [ 12.269712] bcm2835-codec bcm2835-codec: Device registered as /dev/video10 [ 12.269753] bcm2835-codec bcm2835-codec: Loaded V4L2 decode [ 12.270757] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video21 [ 12.282325] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video22 [ 12.282900] bcm2835-codec bcm2835-codec: Device registered as /dev/video11 [ 12.282939] bcm2835-codec bcm2835-codec: Loaded V4L2 encode [ 12.283479] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video23 [ 12.283554] bcm2835-isp bcm2835-isp: Register output node 0 with media controller [ 12.283574] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller [ 12.283591] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller [ 12.283657] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller [ 12.283966] rpivid feb10000.codec: Device registered as /dev/video19 [ 12.295543] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp [ 12.306115] alsactl[408]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set [ 12.311881] bcm2835-codec bcm2835-codec: Device registered as /dev/video12 [ 12.311931] bcm2835-codec bcm2835-codec: Loaded V4L2 isp [ 12.320233] bcm2835-codec bcm2835-codec: Device registered as /dev/video18 [ 12.320276] bcm2835-codec bcm2835-codec: Loaded V4L2 image_fx [ 12.336739] bcm2835-codec bcm2835-codec: Device registered as /dev/video31 [ 12.336787] bcm2835-codec bcm2835-codec: Loaded V4L2 encode_image [ 13.762696] Adding 204796k swap on /var/swap. Priority:-2 extents:6 across:3465216k SS [ 15.709808] bcmgenet fd580000.ethernet: configuring instance for external RGMII (RX delay) [ 15.711050] bcmgenet fd580000.ethernet eth0: Link is Down [ 19.835969] bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx [ 82.233704] bcmgenet fd580000.ethernet eth0: Link is Down [ 204.596250] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/spi@7e204000/spidev@0/status [ 204.627263] esp32_spi: loading out-of-tree module taints kernel. [ 204.627761] esp32_spi: esp_reset: Resetpin of Host is 518 [ 204.627979] esp32_spi: esp_reset: Triggering ESP reset. [ 204.628110] esp32_spi: spi_init: ESP: SPI host config: GPIOs: Handshake[534] DataReady[539] [ 204.628116] esp32_spi: spi_dev_init: Config - GPIOs: resetpin[518] Handshake[534] Dataready[539] [ 204.628120] esp32_spi: spi_dev_init: Config - SPI: clock[10MHz] bus[0] cs[0] mode[2] [ 204.628128] esp32_spi: esp_spi_thread: esp spi thread created [ 485.863572] esp32_spi: esp_serial_cleanup: [ 486.333378] esp32_spi: esp_spi_thread: esp spi thread cleared [ 499.956462] esp32_spi: esp_reset: Resetpin of Host is 518 [ 499.956684] esp32_spi: esp_reset: Triggering ESP reset. [ 499.956817] esp32_spi: spi_init: ESP: SPI host config: GPIOs: Handshake[534] DataReady[539] [ 499.956823] esp32_spi: esp_spi_thread: esp spi thread created [ 499.956823] esp32_spi: spi_dev_init: Config - GPIOs: resetpin[518] Handshake[534] Dataready[539] [ 499.956827] esp32_spi: spi_dev_init: Config - SPI: clock[10MHz] bus[0] cs[0] mode[2] [ 634.947893] esp32_spi: esp_serial_cleanup: [ 635.413359] esp32_spi: esp_spi_thread: esp spi thread cleared [ 649.013527] esp32_spi: esp_reset: Resetpin of Host is 518 [ 649.013748] esp32_spi: esp_reset: Triggering ESP reset. [ 649.013898] esp32_spi: spi_init: ESP: SPI host config: GPIOs: Handshake[534] DataReady[539] [ 649.013904] esp32_spi: spi_dev_init: Config - GPIOs: resetpin[518] Handshake[534] Dataready[539] [ 649.013908] esp32_spi: spi_dev_init: Config - SPI: clock[10MHz] bus[0] cs[0] mode[2] [ 649.014189] esp32_spi: esp_spi_thread: esp spi thread created
currently i have commented the dts file, device_tree_dependency_spi() and device overlay in boot/firmware/config.text and additional spi device overlay if spi in rpi.insit.sh just make spi enable for getting this log.iam not able to make virtual serial interface espso in fg set up itas@raspberrypi:~/esp-hosted/esp_hosted_fg/host/linux/host_control $ bash -x ./rpi_init.sh wifi=spi
1 Share the connections photo. 2 Verify your connections and the gpios you have used are connected correctly.
3 Attach the full dmesg log from system start up 4 Attach config file: /boot/config.txt or /boot/firmware/config.txt 5 ESP side full log
@sreejitharikath , it is better to create new issue, so as not.to spam original issue. If you think they are related can mark related, but different issue would to support in better way.
Device tree customisation and configurations are out of scope for ESP-Hosted. They are actually requirements.
We genuinely wish to help, but every Linux system and device trees vary per Linux SoCs. And it needs some patience, if you are doing it for first time.
I think, it would be easier if you start with a commonly known or generally easier Linux SoC. As you would get device tree dumps in public domain. Obviously copying would not work, but at least you would get some idea.
In general it is easier to set up spi, as it also allows to use jumper cables of around 10cm.
But I've connected it using SDIO interface and now I don't have any other option than configuring the device using SDIO only
Can you please send a picture of the setup
Can you please send a picture of the setup
The hardware setup isn't ready yet, but I want to enable it from software side before hardware is ready. Once hardware is ready I'll share the image of my setup
You would be connecting the ESP with Linux host in some way?
You would be connecting the ESP with Linux host in some way?
Yes, I'm going to connect it using SDIO interface which my AM625 has. But I need to confirm that I can use the ESP hosted NG on my linux host system
So is it jumpers? Is it tf card or is it PCB?
Unless connected, how would sdio or ESP-Hosted work?
I can use the ESP hosted NG on my linux host system
Definitely. You can use FG or NG. Please use same git commit at host and slave, preferably latest master.
So, ESP-Hosted NG requirements:
For more and accurate details, please refer Porting guide for NG
Detailed documentation is available at https://github.com/espressif/esp-hosted
I can use the ESP hosted NG on my linux host system
Definitely. You can use FG or NG. Please use same git commit at host and slave, preferably latest master.
So, ESP-Hosted NG requirements:
- Linux host
- Kernel version - 5.x + is preferred
- SPI or SDIO bus at least on headers (For SDIO, can also use TF card slot, if you embed ESP on TF card)
- For SDIO, external pull-up registers are mandatory. Values are present in porting guide.
- If SDIO slave used on ESP32, additional requirement of eFuse burning might be required (simple command described in porting guide)
For more and accurate details, please refer Porting guide for NG
Detailed documentation is available at https://github.com/espressif/esp-hosted
1 micro sd card slot
5 If you are asking the device tree changes for your Linux SoC, it is out of scope for esp-hosted. Check with your Linux SoC support channel. Requirement for ESP-Hosted: SDIO platform is up with your Linux SDIO hardware configured using the configuration method provided by your Linux SoC.
Check porting_guide for hardware considerations and extra GPIO required to be configured in your Linux.
1 micro sd card slot
5 If you are asking the device tree changes for your Linux SoC, it is out of scope for esp-hosted. Check with your Linux SoC support channel. Requirement for ESP-Hosted: SDIO platform is up with your Linux SDIO hardware configured using the configuration method provided by your Linux SoC.
Check porting_guide for hardware considerations and extra GPIO required to be configured in your Linux.
I've the micro SD card slot and I'm trying to remove the SD card connection and connect the ESP32 with it.
The community of Ti can't help me with because they doesn't support the ESP 32, so I need to ask you for helping me out.
Also how to Integrate the drivers into my kernel, like where to copy the .c files and what to add in whole Linux SDK?
&sdhci2 { status = "okay"; vmmc-supply = <&wlan_en>; pinctrl-names = "default"; pinctrl-0 = <&main_mmc2_pins_default>; no-1-8-v; broken-cd; bus-width = <4>; } This is my device tree, will this work?
Also how to Integrate the drivers into my kernel, like where to copy the .c files
Instead of in kernel module, use itt as external loadable module first, once tested fine, can embed as part of kernel modules.
This is my device tree, will this work?
No harm in trying, I cannot surely say, it would work or not. check your SoC data sheet and use hardware config accordingly.
I've the micro SD card slot and I'm trying to remove the SD card connection and connect the ESP32 with it.
How to connect , through GPIO header, or card slot or something else is upto you. SDIO has signal integrity issues if connected with jumpers. using proper PCB is only way o get SDIO correctly working. SPI could be used with wires for evaluation. SDIO 1 bit mode could be tried with jumper wires.
Length of jumper (<=6cm), quality, equal trace length for all signals and external pull-ups are mandatorily checked from porting guide. If I were you, I wouldn't do any changes unless I refer the porting guide and hardware limitations understood clearly and fulfilled.
SPI on the other hand, should be available easily on headers and allows jumper cables with <=10cm length. Obviously, it also needs some hardware considerations, but less strict than sdio. Check porting guide for details.
Also how to Integrate the drivers into my kernel, like where to copy the .c files
Instead of in kernel module, use itt as external loadable module first, once tested fine, can embed as part of kernel modules.
This is my device tree, will this work?
No harm in trying, I cannot surely say, it would work or not. check your SoC data sheet and use hardware config accordingly.
I've the micro SD card slot and I'm trying to remove the SD card connection and connect the ESP32 with it.
How to connect , through GPIO header, or card slot or something else is upto you. SDIO has signal integrity issues if connected with jumpers. using proper PCB is only way o get SDIO correctly working. SPI could be used with wires for evaluation. SDIO 1 bit mode could be tried with jumper wires.
Length of jumper (<=6cm), quality, equal trace length for all signals and external pull-ups are mandatorily checked from porting guide. If I were you, I wouldn't do any changes unless I refer the porting guide and hardware limitations understood clearly and fulfilled.
SPI on the other hand, should be available easily on headers and allows jumper cables with <=10cm length. Obviously, it also needs some hardware considerations, but less strict than sdio. Check porting guide for details.
I'll use it first as loadable kernel module, but how to build it and keep the kernel module and where to keep it? I'm directly soldering the ESP32's SDIO interface to my board's SD card interface also I've removed the SD card connector
I'll use it first as loadable kernel module, but how to build it and keep the kernel module and where to keep it?
upto you? Once cross compile done, copy the module binary and insert with correct module params
I'm directly soldering the ESP32's SDIO interface to my board's SD card interface also I've removed the SD card connector
Again upto you. As long as the connections are done correctly as per porting guide, no issues.
I'll use it first as loadable kernel module, but how to build it and keep the kernel module and where to keep it?
upto you? Once cross compile done, copy the module binary and insert with correct module params
I'm directly soldering the ESP32's SDIO interface to my board's SD card interface also I've removed the SD card connector
Again upto you. As long as the connections are done correctly as per porting guide, no issues.
Where to copy the module binary i.e. .ko file generated and what module parameters are you talking about?
porting guide step: https://github.com/espressif/esp-hosted/blob/master/esp_hosted_ng/docs/porting_guide.md#22-rpi_initsh
module param, 'resetpin' https://github.com/espressif/esp-hosted/blob/20d939491fb20841ae0b56221f249be02ad0ac69/esp_hosted_ng/host/rpi_init.sh#L64-L69
where? /root/ or any path which you are comfortable? Finally, it is a loadable module.
porting guide step: https://github.com/espressif/esp-hosted/blob/master/esp_hosted_ng/docs/porting_guide.md#22-rpi_initsh
module param, 'resetpin'
where? /root/ or any path which you are comfortable? Finally, it is a loadable module.
Well on my setup I'm going to use GPIO1_10 for reset pin, then in this case what value is needed to be given in variable RESETPIN?
From your Linux data sheet, find out what exact gpio number 'GPIO1_10' is translated to. use that gpio number.
From your Linux data sheet, find out what exact gpio number 'GPIO1_10' is translated to. use that gpio number.
Can you guide me for how you calculated RPI_RESETPIN=6 ?
Hello, Now I'm getting this error
[ 769.669173] mmc2: Timeout waiting for hardware cmd interrupt.
[ 769.675009] mmc2: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 769.681467] mmc2: sdhci: Sys addr: 0x00000000 | Version: 0x00001004
[ 769.687933] mmc2: sdhci: Blk size: 0x00000000 | Blk cnt: 0x00000000
[ 769.694394] mmc2: sdhci: Argument: 0x00000000 | Trn mode: 0x00000000
[ 769.700853] mmc2: sdhci: Present: 0x01f00001 | Host ctl: 0x00000001
[ 769.707314] mmc2: sdhci: Power: 0x0000000a | Blk gap: 0x00000080
[ 769.713774] mmc2: sdhci: Wake-up: 0x00000000 | Clock: 0x00004e43
[ 769.720233] mmc2: sdhci: Timeout: 0x00000000 | Int stat: 0x00000000
[ 769.726692] mmc2: sdhci: Int enab: 0x00ff0003 | Sig enab: 0x00ff0003
[ 769.733152] mmc2: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
[ 769.739612] mmc2: sdhci: Caps: 0x3de8c801 | Caps_1: 0x18002407
[ 769.746073] mmc2: sdhci: Cmd: 0x0000371a | Max curr: 0x00000000
[ 769.752534] mmc2: sdhci: Resp[0]: 0x00000000 | Resp[1]: 0x00000000
[ 769.758994] mmc2: sdhci: Resp[2]: 0x00000000 | Resp[3]: 0x00000000
[ 769.765452] mmc2: sdhci: Host ctl2: 0x00000000
[ 769.769913] mmc2: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x0000000000000000
[ 769.777069] mmc2: sdhci: ============================================
This line is getting printed continously and my esp logs are printed below
> I (13) boot: ESP-IDF e7771c75-dirty 2nd stage bootloader
I (13) boot: compile time Sep 12 2024 15:24:14
I (13) boot: Multicore bootloader
I (17) boot: chip revision: v3.0
I (21) boot.esp32: SPI Speed : 40MHz
I (26) boot.esp32: SPI Mode : DIO
I (30) boot.esp32: SPI Flash Size : 4MB
I (35) boot: Enabling RNG early entropy source...
I (40) boot: Partition Table:
I (44) boot: ## Label Usage Type ST Offset Length
I (51) boot: 0 nvs WiFi data 01 02 00009000 00004000
I (59) boot: 1 otadata OTA data 01 00 0000d000 00002000
I (66) boot: 2 phy_init RF data 01 01 0000f000 00001000
I (73) boot: 3 factory factory app 00 00 00010000 00100000
I (81) boot: 4 ota_0 OTA app 00 10 00110000 00100000
I (88) boot: 5 ota_1 OTA app 00 11 00210000 00100000
I (96) boot: End of partition table
I (100) boot: Defaulting to factory image
I (105) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=1fc5ch (130140) map
I (160) esp_image: segment 1: paddr=0002fc84 vaddr=3ffbdb60 size=00394h ( 916) load
I (161) esp_image: segment 2: paddr=00030020 vaddr=400d0020 size=897f8h (563192) map
I (369) esp_image: segment 3: paddr=000b9820 vaddr=3ffbdef4 size=054ech ( 21740) load
I (378) esp_image: segment 4: paddr=000bed14 vaddr=40080000 size=1f910h (129296) load
I (448) boot: Loaded app from partition at offset 0x10000
I (448) boot: Disabling RNG early entropy source...
I (460) cpu_start: Multicore app
I (460) cpu_start: Pro cpu up.
I (460) cpu_start: Starting app cpu, entry point is 0x4008147c
I (0) cpu_start: App cpu up.
I (480) cpu_start: Pro cpu start user code
I (480) cpu_start: cpu freq: 240000000 Hz
I (480) cpu_start: Application information:
I (485) cpu_start: Project name: network_adapter
I (491) cpu_start: App version: release/ng-v1.0.2-264-gabe8f45-
I (498) cpu_start: Compile time: Sep 12 2024 15:23:59
I (504) cpu_start: ELF file SHA256: 41b95d9026517e4d...
I (510) cpu_start: ESP-IDF: e7771c75-dirty
I (515) cpu_start: Min chip rev: v0.0
I (520) cpu_start: Max chip rev: v3.99
I (525) cpu_start: Chip rev: v3.0
I (530) heap_init: Initializing. RAM available for dynamic allocation:
I (537) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (543) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (549) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (555) heap_init: At 3FFD1DF8 len 0000E208 (56 KiB): DRAM
I (561) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (567) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (574) heap_init: At 4009F910 len 000006F0 (1 KiB): IRAM
I (581) spi_flash: detected chip: generic
I (585) spi_flash: flash io: dio
W (589) spi_flash: Detected size(16384k) larger than the size in the binary image header(4096k). Using the size in the binary image header.
I (603) coexist: coex firmware version: 77cd7f8
I (608) app_start: Starting scheduler on CPU0
I (612) app_start: Starting scheduler on CPU1
I (612) main_task: Started on CPU0
I (622) main_task: Calling app_main()
I (625) stats: *********************************************************************
I (633) stats: ESP-Hosted Firmware version :: 1.0.3
I (642) stats: Transport used :: SDIO only
I (650) stats: *********************************************************************
I (659) FW_MAIN: Supported features are:
I (663) FW_MAIN: - WLAN over SDIO
I (667) FW_BT: - BT/BLE
I (671) FW_BT: - HCI Over SDIO
I (675) FW_BT: - BT/BLE dual mode
I (679) FW_MAIN: Capabilities: 0x1d
I (694) wifi:wifi driver task: 3ffbd8b4, prio:23, stack:6656, core=1
I (696) wifi:wifi firmware version: e3cf69a
I (697) wifi:wifi certification version: v7.0
I (699) wifi:config NVS flash: disabled
I (703) wifi:config nano formating: disabled
I (707) wifi:Init data frame dynamic rx buffer num: 40
I (712) wifi:Init static rx mgmt buffer num: 5
I (716) wifi:Init management short buffer num: 32
I (720) wifi:Init dynamic tx buffer num: 64
I (724) wifi:Init static rx buffer size: 1600
I (728) wifi:Init static rx buffer num: 16
I (732) wifi:Init dynamic rx buffer num: 40
I (737) wifi_init: rx ba win: 32
I (740) wifi_init: tcpip mbox: 32
I (744) wifi_init: udp mbox: 6
I (748) wifi_init: tcp mbox: 6
I (751) wifi_init: tcp tx win: 5760
I (756) wifi_init: tcp rx win: 5760
I (760) wifi_init: tcp mss: 1440
I (764) wifi_init: WiFi IRAM OP enabled
I (768) wifi_init: WiFi RX IRAM OP enabled
I (774) BTDM_INIT: BT controller compile version [a38dc5c]
I (780) BTDM_INIT: Bluetooth MAC: 94:e6:86:4c:0f:9a
I (787) phy_init: phy_version 4791,2c4672b,Dec 20 2023,16:06:06
I (1194) FW_MAIN: ESP Bluetooth MAC addr: 94-e6-86-4c- f-9a
I (1194) FW_SDIO_SLAVE: Using SDIO interface
I (1196) gpio: GPIO[5]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
Sorry, but your sdio is not setup yet.
Open data path or start data path is not printed. This means that set up is yet not correct.
Share photo of setup
This is the photo of my setup, please let me know, what am I missing?
Where is ESP chipset?
Wired setup is very unstable in 4-bit sdio mode. Use 1 -bit sdio instead. Configure your sdio in host (using device tree) accordingly.
Ext pull up registers mandatory
eFuse might also needed as you are using ESP32.
Unless hardware configured correctly it cannot work. Check porting guide for more details.
Where is ESP chipset?
Wired setup is very unstable in 4-bit sdio mode. Use 1 -bit sdio instead. Configure your sdio in host (using device tree) accordingly.
Ext pull up registers mandatory
eFuse might also needed as you are using ESP32.
Unless hardware configured correctly it cannot work. Check porting guide for more details.
![image](https://github.com/user-attachments/assets/6c727aad-f5c4-499a-adf9-711a8f30f9b4)
I first doubt if your host is correctly configured with sdio correct.
Second, the sdio 4 bit mode face signal integrity issues over wires. Search this, it is applicable for any sdio 4 -bit (not ESP specific)
I couldn't spot ESP and pull up registers in you're setup.
eFuse burning details and pull up requirements: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/sd_pullup_requirements.html
Depending upon ESP chipset used, Compatibility (problems) is something there with board type. Solutions for each section detailed in lower section.
Why I say sdio not correctly configured:
Sdio should be detected by hardware first.
Probing hardware is different thing happens after detecting it. Probing would trigger ESP driver.
You are currently not detecting hardware itself.
Possible issues:
Detecting sdio is not blocked on eFuse, pull up etc.
Once detection done probing would be triggered, but probing would fail if eFuse or pull up not correct.
Sometimes probing also goes fine but next transactions fail if eFuse and pull up not as expected.
You need to focus on sdio being detected.
Just to reconfirm, attach full dmesg from system bootup as a file.
I first doubt if your host is correctly configured with sdio correct.
Second, the sdio 4 bit mode face signal integrity issues over wires. Search this, it is applicable for any sdio 4 -bit (not ESP specific)
I couldn't spot ESP and pull up registers in you're setup.
eFuse burning details and pull up requirements: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/sd_pullup_requirements.html
Depending upon ESP chipset used, Compatibility (problems) is something there with board type. Solutions for each section detailed in lower section.
While building the dtb I didn't got any errors or warnings, How to edit it so the SDIO form host side get correctly configured. Below attaching the code for configuring SDIO port for SD card which is working properly, then how to do it for wifi.
&sdhci1 {
/* SD/MMC */
vmmc-supply = <&vdd_mmc1>;
vqmmc-supply = <&vdd_sd_dv>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_mmc1_pins_default>;
disable-wp;
no-1-8-v;
sdhci-caps-mask = <0x00000007 0x00200000>;
};
Attached the image of ESP32 and pull ups over it I'll check the eFuse details.
Logs of Host [LINUX]: Linux-logs.txt Logs of Slave [ESP32]: ESP-logs.txt
I am not entirely sure, why would you re-use sdmmc1 , as i can see from traces, i somehow sense that you are using mmc1 already for booting up linux.
From you device tree you seem to use sdhci1. While I cannot verify, I am just asking you to ensure that you are doing it correctly. I will leave to you to get the correct sdio hardware 'detectable'.
How would one confirm?
You would see similar trace:
linux would detect and print something like this,
mmcxX: new high speed SDIO card at address 0001
or
mmcX: new SDIO card at address 0001
or something that sorts.
if this first step is failed, no point going ahead.
I would suggest to read and understand which mmcX is mapped where from your Linux SoC and then try to load that one in your device tree. If you already know what you are doing and sure of it, please disregard this comment in that case.
I am not entirely sure, why would you re-use sdmmc1 , as i can see from traces, i somehow sense that you are using mmc1 already for booting up linux.
From you device tree you seem to use sdhci1. While I cannot verify, I am just asking you to ensure that you are doing it correctly. I will leave to you to get the correct sdio hardware 'detectable'.
How would one confirm?
You would see similar trace:
linux would detect and print something like this,
mmcxX: new high speed SDIO card at address 0001
or
mmcX: new SDIO card at address 0001
or something that sorts.
if this first step is failed, no point going ahead.
I would suggest to read and understand which mmcX is mapped where from your Linux SoC and then try to load that one in your device tree. If you already know what you are doing and sure of it, please disregard this comment in that case.
Sorry but you are getting confused here, In my case there are 3 MMC interfaces and they are MMC0: eMMC [Used for booting] MMC1: SD Card [Used for booting] MMC2: SDIO interface [Used for wifi and bluetooth from ESP32]
The ESP32 is connected to the Host via mmc2 [sdhci2]
The question remains, then why sdhci1 ? :
The question remains, then why sdhci1 ? :
Sorry, I'm using sdhci2, below is the code attached for sdhci2
&sdhci2 {
status = "okay";
vmmc-supply = <&vcc_3v3_sys>;
pinctrl-names = "default";
pinctrl-0 = <&main_mmc2_pins_default>;
bus-width = <4>;
no-1-8-v;
broken-cd;
assigned-clocks = <&k3_clks 157 158>;
assigned-clock-parents = <&k3_clks 157 160>;
#address-cells = <1>;
#size-cells = <0>;
esp32: esp32@1 {
compatible = "esp32_sdio";
reg = <1>;
pinctrl-names = "default";
pinctrl-0 = <&main_wlirq_pins_default>;
};
};
It looks correct in general, however, repeating myself,
Device tree correction falls outside our area of focus. Please get your platform correctly configured with reference to your SoC hardware manual and/or datasheet.
We cannot assess your device tree as it is very specific to your hardware as such.
I also don't know if you have correctly configured reset pin in your device tree. if not, i would suggest you to do so. Reseting slave on module loading is important aspect for synchronisation (between host and slave) at sdio level, else you would fall in some unexpected issues.
Well, for reset pin, I've used 1 gpio for this purpose, below is how I set GPIO for reset pin
root@am62xx-evm:~# lsmod | grep esp32
root@am62xx-evm:~# echo 1914 > /sys/class/gpio/export
root@am62xx-evm:~# echo out > /sys/class/gpio/gpio1914/direction
root@am62xx-evm:~# cat /sys/kernel/debug/gpio
gpiochip1: GPIOs 1904-1955, parent: platform/601000.gpio, 601000.gpio:
gpio-1914 ( |sysfs ) out lo
gpio-1953 ( |am62-sk:green:heartb) out lo
gpiochip0: GPIOs 1956-2047, parent: platform/600000.gpio, 600000.gpio:
gpio-1987 ( |tlv71033 ) out lo ACTIVE LOW
root@am62xx-evm:~# modprobe esp32_sdio resetpin=1914
root@am62xx-evm:~# lsmod | grep esp32
esp32_sdio 77824 0
bluetooth 507904 3 esp32_sdio
cfg80211 389120 1 esp32_sdio
root@am62xx-evm:~# ifconfig -a
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 1c:63:49:1c:04:8c txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.126 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::685a:b4ff:fe58:5aba prefixlen 64 scopeid 0x20<link>
ether 6a:5a:b4:58:5a:ba txqueuelen 1000 (Ethernet)
RX packets 1571 bytes 153414 (149.8 KiB)
RX errors 0 dropped 125 overruns 0 frame 0
TX packets 221 bytes 24806 (24.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 92 bytes 7654 (7.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 92 bytes 7654 (7.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
root@am62xx-evm:~#
for temporary, okay. I meanupto you how you wish to configure.
root@am62xx-evm:~# echo 1914 > /sys/class/gpio/export
root@am62xx-evm:~# echo out > /sys/class/gpio/gpio1914/direction
root@am62xx-evm:~# cat /sys/kernel/debug/gpio
is only for current session and not persistent across reboots in my opinion.
How you expose hardware, is up to you. Just ensure, the hardware is correctly configured before loading esp32 kernel module always, to avoid any unexpected behaviour.
for temporary, okay. I meanupto you how you wish to configure.
root@am62xx-evm:~# echo 1914 > /sys/class/gpio/export root@am62xx-evm:~# echo out > /sys/class/gpio/gpio1914/direction root@am62xx-evm:~# cat /sys/kernel/debug/gpio
is only for current session and not persistent across reboots in my opinion.
How you expose hardware, is up to you. Just ensure, the hardware is correctly configured before loading esp32 kernel module always, to avoid any unexpected behaviour.
Yes, I need to set this GPIO for every power cycle of my Host.
How you expose hardware, is up to you. Just ensure, the hardware is correctly configured before loading esp32 kernel module always, to avoid any unexpected behaviour.
This may not be an issue because I'm configuring this GPIO before loading the esp32_sdio.ko file
Hi esp I loaded the driver.But there's no device in sight.What's going on?
root@maaxboard8ulp:~/test# root@maaxboard8ulp:~/test# root@maaxboard8ulp:~/test# root@maaxboard8ulp:~/test# insmod esp32_sdio.ko root@maaxboard8ulp:~/test# iwconfig lo no wireless extensions.
eth0 no wireless extensions.
root@maaxboard8ulp:~/test#