espressif / esp-hosted

Hosted Solution (Linux/MCU) with ESP32 (Wi-Fi + BT + BLE)
Other
713 stars 170 forks source link

esp32_sdio.ko #477

Open tgt008 opened 2 months ago

tgt008 commented 2 months ago

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#

mantriyogesh commented 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
  2. Linux details and kernel version
  3. host log: dmesg from start of boot
  4. esp log: minicom or idf.py monitor
  5. git commit used at esp and host
tgt008 commented 2 months ago

1.FG or NG NG

  1. Linux details and kernel version Linux version 6.1.22+g78ce688d5a79 (oe-user@oe-host) (aarch64-poky-linux-gcc (GCC) 12.2.0,
  2. host log: dmesg from start of boot [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd040] [ 0.000000] Linux version 6.1.22+g78ce688d5a79 (oe-user@oe-host) (aarch64-poky-linux-gcc (GCC) 12.2.0, GNU ld (GNU Binutils) 2.40.20230119) #1 SMP PREEMPT Wed Feb 21 01:38:06 UTC 2024 [ 0.000000] Machine model: AVNET Maaxboard-8ulp [ 0.000000] efi: UEFI not found. [ 0.000000] Reserved memory: created CMA memory pool at 0x00000000d8000000, size 640 MiB [ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool [ 0.000000] Reserved memory: created DMA memory pool at 0x000000008ff00000, size 1 MiB [ 0.000000] OF: reserved mem: initialized node vdev0buffer@8ff00000, compatible id shared-dma-pool [ 0.000000] Reserved memory: created DMA memory pool at 0x0000000090000000, size 1 MiB [ 0.000000] OF: reserved mem: initialized node ele-reserved@90000000, compatible id shared-dma-pool [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a8400000, size 1 MiB [ 0.000000] OF: reserved mem: initialized node vdevbuffer@a8400000, compatible id shared-dma-pool [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a8500000, size 1 MiB [ 0.000000] OF: reserved mem: initialized node audio@a8500000, compatible id shared-dma-pool [ 0.000000] NUMA: No NUMA configuration found [ 0.000000] NUMA: Faking a node at [mem 0x0000000080000000-0x00000000ffffffff] [ 0.000000] NUMA: NODE_DATA [mem 0xd7be5700-0xd7be7fff] [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000080000000-0x00000000ffffffff] [ 0.000000] DMA32 empty [ 0.000000] Normal empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000080000000-0x000000008dffffff] [ 0.000000] node 0: [mem 0x000000008e000000-0x00000000900fffff] [ 0.000000] node 0: [mem 0x0000000090100000-0x00000000a83fffff] [ 0.000000] node 0: [mem 0x00000000a8400000-0x00000000a95fffff] [ 0.000000] node 0: [mem 0x00000000a9600000-0x00000000afefffff] [ 0.000000] node 0: [mem 0x00000000aff00000-0x00000000aff1ffff] [ 0.000000] node 0: [mem 0x00000000aff20000-0x00000000ffffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000ffffffff] [ 0.000000] psci: probing for conduit method from DT. [ 0.000000] psci: PSCIv1.1 detected in firmware. [ 0.000000] psci: Using standard PSCI v0.2 function IDs [ 0.000000] psci: MIGRATE_INFO_TYPE not supported. [ 0.000000] psci: SMC Calling Convention v1.2 [ 0.000000] percpu: Embedded 20 pages/cpu s44520 r8192 d29208 u81920 [ 0.000000] pcpu-alloc: s44520 r8192 d29208 u81920 alloc=20*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [ 0.000000] Detected VIPT I-cache on CPU0 [ 0.000000] CPU features: detected: GIC system register CPU interface [ 0.000000] CPU features: kernel page table isolation forced ON by KASLR [ 0.000000] CPU features: detected: Kernel page table isolation (KPTI) [ 0.000000] alternatives: applying boot alternatives [ 0.000000] Fallback order for Node 0: 0 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 516096 [ 0.000000] Policy zone: DMA [ 0.000000] Kernel command line: console=ttyLP1,115200 console=tty1 root=/dev/mmcblk0p2 rootwait rw [ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear) [ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear) [ 0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off [ 0.000000] Memory: 1316748K/2097152K available (19904K kernel code, 1614K rwdata, 6788K rodata, 3328K init, 645K bss, 125044K reserved, 655360K cma-reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1 [ 0.000000] rcu: Preemptible hierarchical RCU implementation. [ 0.000000] rcu: RCU event tracing is enabled. [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=2. [ 0.000000] Trampoline variant of Tasks RCU enabled. [ 0.000000] Tracing variant of Tasks RCU enabled. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies. [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2 [ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0 [ 0.000000] GICv3: GIC: Using split EOI/Deactivate mode [ 0.000000] GICv3: 192 SPIs implemented [ 0.000000] GICv3: 0 Extended SPIs implemented [ 0.000000] Root IRQ handler: gic_handle_irq [ 0.000000] GICv3: GICv3 features: 16 PPIs [ 0.000000] GICv3: CPU0: found redistributor 0 region 0:0x000000002d440000 [ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention. [ 0.000000] arch_timer: cp15 timer(s) running at 1.00MHz (phys). [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 3526361616960 ns [ 0.000001] sched_clock: 56 bits at 1000kHz, resolution 1000ns, wraps every 2199023255500ns [ 0.000175] clocksource: imx-tpm: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns [ 0.000703] Console: colour dummy device 80x25 [ 0.001701] printk: console [tty1] enabled [ 0.001817] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=4000) [ 0.001860] pid_max: default: 32768 minimum: 301 [ 0.001976] LSM: Security Framework initializing [ 0.002144] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear) [ 0.002193] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear) [ 0.004637] cblist_init_generic: Setting adjustable number of callback queues. [ 0.004683] cblist_init_generic: Setting shift to 1 and lim to 1. [ 0.004824] cblist_init_generic: Setting shift to 1 and lim to 1. [ 0.005130] rcu: Hierarchical SRCU implementation. [ 0.005153] rcu: Max phase no-delay instances is 1000. [ 0.006757] EFI services will not be available. [ 0.007035] smp: Bringing up secondary CPUs ... [ 0.008184] Detected VIPT I-cache on CPU1 [ 0.008314] GICv3: CPU1: found redistributor 1 region 0:0x000000002d460000 [ 0.008374] CPU1: Booted secondary processor 0x0000000001 [0x411fd040] [ 0.008516] smp: Brought up 1 node, 2 CPUs [ 0.008587] SMP: Total of 2 processors activated. [ 0.008608] CPU features: detected: 32-bit EL0 Support [ 0.008626] CPU features: detected: 32-bit EL1 Support [ 0.008646] CPU features: detected: CRC32 instructions [ 0.008757] CPU: All CPU(s) started at EL2 [ 0.008807] alternatives: applying system-wide alternatives [ 0.011655] devtmpfs: initialized [ 0.021587] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 0.021663] futex hash table entries: 512 (order: 3, 32768 bytes, linear) [ 0.050066] pinctrl core: initialized pinctrl subsystem [ 0.052842] DMI not present or invalid. [ 0.053964] NET: Registered PF_NETLINK/PF_ROUTE protocol family [ 0.055637] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations [ 0.055831] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations [ 0.056056] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations [ 0.056158] audit: initializing netlink subsys (disabled) [ 0.056448] audit: type=2000 audit(0.056:1): state=initialized audit_enabled=0 res=1 [ 0.057339] thermal_sys: Registered thermal governor 'step_wise' [ 0.057349] thermal_sys: Registered thermal governor 'power_allocator' [ 0.057427] cpuidle: using governor menu [ 0.057783] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers. [ 0.057891] ASID allocator initialised with 32768 entries [ 0.059154] Serial: AMBA PL011 UART driver [ 0.059283] imx mu driver is registered. [ 0.059341] imx rpmsg driver is registered. [ 0.074736] imx8ulp-pinctrl 298c0000.pinctrl: initialized IMX pinctrl driver [ 0.087567] KASLR enabled [ 0.121444] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages [ 0.121497] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page [ 0.121523] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages [ 0.121545] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page [ 0.121568] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages [ 0.121590] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page [ 0.121614] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages [ 0.121635] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page [ 0.124634] ACPI: Interpreter disabled. [ 0.126076] iommu: Default domain type: Translated [ 0.126109] iommu: DMA domain TLB invalidation policy: strict mode [ 0.126605] SCSI subsystem initialized [ 0.126835] libata version 3.00 loaded. [ 0.127186] usbcore: registered new interface driver usbfs [ 0.127273] usbcore: registered new interface driver hub [ 0.127333] usbcore: registered new device driver usb [ 0.128939] mc: Linux media interface: v0.10 [ 0.129026] videodev: Linux video capture interface: v2.00 [ 0.129149] pps_core: LinuxPPS API ver. 1 registered [ 0.129171] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it [ 0.129216] PTP clock support registered [ 0.129436] EDAC MC: Ver: 3.0.0 [ 0.130287] arm-scmi firmware:scmi: Enabled polling mode TX channel - prot_id:16 [ 0.130486] arm-scmi firmware:scmi: SCMI Notifications - Core Enabled. [ 0.130620] arm-scmi firmware:scmi: SCMI Protocol v2.0 'NXP:' Firmware version 0x0 [ 0.131798] FPGA manager framework [ 0.131965] Advanced Linux Sound Architecture Driver Initialized. [ 0.132957] Bluetooth: Core ver 2.22 [ 0.133019] NET: Registered PF_BLUETOOTH protocol family [ 0.133042] Bluetooth: HCI device and connection manager initialized [ 0.133070] Bluetooth: HCI socket layer initialized [ 0.133094] Bluetooth: L2CAP socket layer initialized [ 0.133128] Bluetooth: SCO socket layer initialized [ 0.133700] vgaarb: loaded [ 0.134463] clocksource: Switched to clocksource arch_sys_counter [ 0.134811] VFS: Disk quotas dquot_6.6.0 [ 0.134895] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes) [ 0.135193] pnp: PnP ACPI: disabled [ 0.147560] NET: Registered PF_INET protocol family [ 0.147914] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear) [ 0.151782] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear) [ 0.151905] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear) [ 0.151951] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear) [ 0.152168] TCP bind hash table entries: 16384 (order: 7, 524288 bytes, linear) [ 0.152797] TCP: Hash tables configured (established 16384 bind 16384) [ 0.152977] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear) [ 0.153074] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear) [ 0.153338] NET: Registered PF_UNIX/PF_LOCAL protocol family [ 0.153972] RPC: Registered named UNIX socket transport module. [ 0.154003] RPC: Registered udp transport module. [ 0.154022] RPC: Registered tcp transport module. [ 0.154040] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.155347] PCI: CLS 0 bytes, default 64 [ 0.156199] hw perfevents: enabled with armv8_cortex_a35 PMU driver, 7 counters available [ 0.157127] kvm [1]: IPA Size Limit: 40 bits [ 0.159561] kvm [1]: GICv3: no GICV resource entry [ 0.159588] kvm [1]: disabling GICv2 emulation [ 0.159620] kvm [1]: GIC system register CPU interface enabled [ 0.159716] kvm [1]: vgic interrupt IRQ9 [ 0.159808] kvm [1]: Hyp mode initialized successfully [ 0.161614] Initialise system trusted keyrings [ 0.161955] workingset: timestamp_bits=42 max_order=19 bucket_order=0 [ 0.173619] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.174993] NFS: Registering the id_resolver key type [ 0.175092] Key type id_resolver registered [ 0.175114] Key type id_legacy registered [ 0.175256] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 0.175283] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering... [ 0.175338] ntfs: driver 2.1.32 [Flags: R/W]. [ 0.175594] ntfs3: Max link count 4000 [ 0.175616] ntfs3: Enabled Linux POSIX ACLs support [ 0.175756] jffs2: version 2.2. (NAND) \xc2\xa9 2001-2006 Red Hat, Inc. [ 0.176373] 9p: Installing v9fs 9p2000 file system support [ 0.245185] Key type asymmetric registered [ 0.245211] Asymmetric key parser 'x509' registered [ 0.245301] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 243) [ 0.245333] io scheduler mq-deadline registered [ 0.245354] io scheduler kyber registered [ 0.254401] EINJ: ACPI disabled. [ 0.255542] arm-scmi firmware:scmi: Failed. SCMI protocol 20 not active. [ 0.273460] Bus freq driver module loaded [ 0.277844] arm-scmi firmware:scmi: Failed. SCMI protocol 22 not active. [ 0.282530] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled [ 0.286402] 293a0000.serial: ttyLP1 at MMIO 0x293a0010 (irq = 19, base_baud = 1500000) is a FSL_LPUART [ 1.448976] printk: console [ttyLP1] enabled [ 1.454488] 29860000.serial: ttyLP2 at MMIO 0x29860010 (irq = 20, base_baud = 3000000) is a FSL_LPUART [ 1.464832] 29870000.serial: ttyLP3 at MMIO 0x29870010 (irq = 21, base_baud = 3000000) is a FSL_LPUART [ 1.491959] loop: module loaded [ 1.497397] megasas: 07.719.03.00-rc1 [ 1.510948] tun: Universal TUN/TAP device driver, 1.6 [ 1.517226] thunder_xcv, ver 1.0 [ 1.520550] thunder_bgx, ver 1.0 [ 1.523861] nicpf, ver 1.0 [ 1.527946] pps pps0: new PPS source ptp0 [ 1.535416] fec 29950000.ethernet eth0: registered PHC device 0 [ 1.543994] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version [ 1.551260] hns3: Copyright (c) 2017 Huawei Corporation. [ 1.556684] hclge is initializing [ 1.560055] e1000: Intel(R) PRO/1000 Network Driver [ 1.564952] e1000: Copyright (c) 1999-2006 Intel Corporation. [ 1.570789] e1000e: Intel(R) PRO/1000 Network Driver [ 1.575777] e1000e: Copyright(c) 1999 - 2015 Intel Corporation. [ 1.581778] igb: Intel(R) Gigabit Ethernet Network Driver [ 1.587199] igb: Copyright (c) 2007-2014 Intel Corporation. [ 1.592851] igbvf: Intel(R) Gigabit Virtual Function Network Driver [ 1.599142] igbvf: Copyright (c) 2009 - 2012 Intel Corporation. [ 1.605298] sky2: driver version 1.30 [ 1.609719] usbcore: registered new interface driver r8152 [ 1.615777] VFIO - User Level meta-driver version: 0.3 [ 1.625380] usbcore: registered new interface driver uas [ 1.630816] usbcore: registered new interface driver usb-storage [ 1.636964] usbcore: registered new interface driver usbserial_generic [ 1.643549] usbserial: USB Serial support registered for generic [ 1.649630] usbcore: registered new interface driver ftdi_sio [ 1.655422] usbserial: USB Serial support registered for FTDI USB Serial Device [ 1.662881] usbcore: registered new interface driver usb_serial_simple [ 1.669470] usbserial: USB Serial support registered for carelink [ 1.675628] usbserial: USB Serial support registered for zio [ 1.681332] usbserial: USB Serial support registered for funsoft [ 1.687399] usbserial: USB Serial support registered for flashloader [ 1.693807] usbserial: USB Serial support registered for google [ 1.699774] usbserial: USB Serial support registered for libtransistor [ 1.706353] usbserial: USB Serial support registered for vivopay [ 1.712417] usbserial: USB Serial support registered for moto_modem [ 1.718734] usbserial: USB Serial support registered for motorola_tetra [ 1.725397] usbserial: USB Serial support registered for nokia [ 1.731276] usbserial: USB Serial support registered for novatel_gps [ 1.737675] usbserial: USB Serial support registered for hp4x [ 1.743469] usbserial: USB Serial support registered for suunto [ 1.749445] usbserial: USB Serial support registered for siemens_mpi [ 1.755874] usbcore: registered new interface driver usb_ehset_test [ 1.766962] i2c_dev: i2c /dev entries driver [ 1.777046] imx7ulp-wdt 292a0000.watchdog: imx8ulp wdt probe [ 1.790572] Bluetooth: HCI UART driver ver 2.3 [ 1.795068] Bluetooth: HCI UART protocol H4 registered [ 1.800231] Bluetooth: HCI UART protocol BCSP registered [ 1.805603] Bluetooth: HCI UART protocol LL registered [ 1.810771] Bluetooth: HCI UART protocol ATH3K registered [ 1.816226] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 1.822661] Bluetooth: HCI UART protocol Broadcom registered [ 1.828377] Bluetooth: HCI UART protocol QCA registered [ 1.834005] arm-scmi firmware:scmi: Failed. SCMI protocol 19 not active. [ 1.842297] sdhci: Secure Digital Host Controller Interface driver [ 1.848524] sdhci: Copyright(c) Pierre Ossman [ 1.853748] Synopsys Designware Multimedia Card Interface Driver [ 1.860530] sdhci-pltfm: SDHCI platform and OF driver helper [ 1.868774] ledtrig-cpu: registered to indicate activity on CPUs [ 1.876686] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping .... [ 1.884073] usbcore: registered new interface driver usbhid [ 1.889678] usbhid: USB HID core driver [ 1.897571] remoteproc remoteproc0: imx-rproc is available [ 1.903229] remoteproc remoteproc0: attaching to imx-rproc [ 1.909910] rproc-virtio rproc-virtio.0.auto: assigned reserved memory node vdevbuffer@a8400000 [ 1.919505] virtio_rpmsg_bus virtio0: rpmsg host is online [ 1.925063] rproc-virtio rproc-virtio.0.auto: registered virtio0 (type 7) [ 1.926478] virtio_rpmsg_bus virtio0: creating channel rpmsg-i2c-channel addr 0x1 [ 1.931901] rproc-virtio rproc-virtio.1.auto: assigned reserved memory node vdevbuffer@a8400000 [ 1.939421] virtio_rpmsg_bus virtio1: rpmsg host is online [ 1.948243] i2c-rpmsg virtio0.rpmsg-i2c-channel.-1.1: new channel: 0x400 -> 0x1! [ 1.953642] rproc-virtio rproc-virtio.1.auto: registered virtio1 (type 7) [ 1.961063] virtio_rpmsg_bus virtio0: creating channel rpmsg-audio-channel addr 0x2 [ 1.967825] remoteproc remoteproc0: remote processor imx-rproc is now attached [ 1.967960] virtio_rpmsg_bus virtio0: creating channel rpmsg-keypad-channel addr 0x3 [ 1.978321] cs_system_cfg: CoreSight Configuration manager initialised [ 1.982897] virtio_rpmsg_bus virtio0: creating channel rpmsg-io-channel addr 0x4 [ 1.995523] Galcore version 6.4.11.p1.658245 [ 1.997312] gpio_rpmsg virtio0.rpmsg-io-channel.-1.4: new channel: 0x401 -> 0x4! [ 2.025287] virtio_rpmsg_bus virtio0: creating channel rpmsg-pwm-channel addr 0x5 [ 2.033085] pwm-rpmsg virtio0.rpmsg-pwm-channel.-1.5: new channel: 0x402 -> 0x5! [ 2.040566] virtio_rpmsg_bus virtio0: creating channel rpmsg-rtc-channel addr 0x6 [ 2.048783] virtio_rpmsg_bus virtio0: creating channel rpmsg-life-cycle-channel addr 0x7 [ 2.057726] rpmsg_life_cycle virtio0.rpmsg-life-cycle-channel.-1.7: new channel: 0x403 -> 0x7! [ 2.066839] virtio_rpmsg_bus virtio1: creating channel rpmsg-virtual-tty-channel addr 0x1e [ 2.114094] [drm] Initialized vivante 1.0.0 20170808 for 80000000.gpu on minor 0 [ 2.125316] NET: Registered PF_LLC protocol family [ 2.131450] NET: Registered PF_INET6 protocol family [ 2.137869] Segment Routing with IPv6 [ 2.141647] In-situ OAM (IOAM) with IPv6 [ 2.145735] NET: Registered PF_PACKET protocol family [ 2.150867] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this. [ 2.164019] Bluetooth: RFCOMM TTY layer initialized [ 2.168940] Bluetooth: RFCOMM socket layer initialized [ 2.174137] Bluetooth: RFCOMM ver 1.11 [ 2.177953] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 2.183288] Bluetooth: BNEP filters: protocol multicast [ 2.188537] Bluetooth: BNEP socket layer initialized [ 2.193529] Bluetooth: HIDP (Human Interface Emulation) ver 1.2 [ 2.199482] Bluetooth: HIDP socket layer initialized [ 2.204695] 8021q: 802.1Q VLAN Support v1.8 [ 2.208942] lib80211: common routines for IEEE802.11 drivers [ 2.214635] lib80211_crypt: registered algorithm 'NULL' [ 2.214646] lib80211_crypt: registered algorithm 'WEP' [ 2.214656] lib80211_crypt: registered algorithm 'CCMP' [ 2.214665] lib80211_crypt: registered algorithm 'TKIP' [ 2.214826] 9pnet: Installing 9P2000 support [ 2.219343] Key type dns_resolver registered [ 2.224283] registered taskstats version 1 [ 2.228453] Loading compiled-in X.509 certificates [ 2.265665] mxs_phy 29910000.usb-phy: supply phy-3p0 not found, using dummy regulator [ 2.274233] mxs_phy 29930000.usb-phy: supply phy-3p0 not found, using dummy regulator [ 2.283313] imx_rpmsg_i2c i2c-rpbus-1: add I2C adapter i2c-rpmsg-adapter successfully [ 2.306760] imx_rpmsg_pwm pwm: add PWM chip 3 successfully [ 2.313850] imx_usb 29900000.usb: No over current polarity defined [ 2.625138] imx_usb 29920000.usb: No over current polarity defined [ 2.635167] ci_hdrc ci_hdrc.1: EHCI Host Controller [ 2.640112] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1 [ 2.662528] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00 [ 2.668982] hub 1-0:1.0: USB hub found [ 2.672802] hub 1-0:1.0: 1 port detected [ 2.686089] sdhci-esdhc-imx 298f0000.mmc: allocated mmc-pwrseq [ 2.687350] input: gpio-keys as /devices/platform/gpio-keys/input/input0 [ 2.699679] rtc_rpmsg virtio0.rpmsg-rtc-channel.-1.6: new channel: 0x404 -> 0x6! [ 2.709661] imx_rpmsg_rtc rtc-rpmsg: registered as rtc0 [ 2.715514] imx_rpmsg_rtc rtc-rpmsg: setting system clock to 1970-01-01T00:00:05 UTC (5) [ 2.722477] mmc0: SDHCI controller on 298d0000.mmc [298d0000.mmc] using ADMA [ 2.724492] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 2.730777] mmc2: SDHCI controller on 298f0000.mmc [298f0000.mmc] using ADMA [ 2.741425] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 2.752313] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 2.753163] ALSA device list: [ 2.760996] platform regulatory.0: Falling back to sysfs fallback for: regulatory.db [ 2.761123] No soundcards found. [ 2.775589] Waiting for root device /dev/mmcblk0p2... [ 2.839509] mmc0: new HS400 Enhanced strobe MMC card at address 0001 [ 2.846868] mmcblk0: mmc0:0001 G1M15L 29.6 GiB [ 2.854015] mmcblk0: p1 p2 [ 2.857937] mmcblk0boot0: mmc0:0001 G1M15L 31.5 MiB [ 2.864843] mmcblk0boot1: mmc0:0001 G1M15L 31.5 MiB [ 2.871713] mmcblk0rpmb: mmc0:0001 G1M15L 4.00 MiB, chardev (234:0) [ 2.930513] usb 1-1: new high-speed USB device number 2 using ci_hdrc [ 2.945438] EXT4-fs (mmcblk0p2): recovery complete [ 2.950878] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Quota mode: none. [ 2.959554] VFS: Mounted root (ext4 filesystem) on device 179:2. [ 2.965996] devtmpfs: mounted [ 2.971084] Freeing unused kernel memory: 3328K [ 2.975791] Run /sbin/init as init process [ 2.979924] with arguments: [ 2.979931] /sbin/init [ 2.979938] with environment: [ 2.979944] HOME=/ [ 2.979951] TERM=linux [ 3.091965] hub 1-1:1.0: USB hub found [ 3.096039] hub 1-1:1.0: 4 ports detected [ 3.109966] systemd[1]: System time before build time, advancing clock. [ 3.156694] systemd[1]: systemd 253.1^ running in system mode (+PAM -AUDIT -SELINUX -APPARMOR +IMA -SMACK +SECCOMP -GCRYPT -GNUTLS -OPENSSL +ACL +BLKID -CURL -ELFUTILS -FIDO2 -IDN2 -IDN -IPTC +KMOD -LIBCRYPTSETUP +LIBFDISK -PCRE2 -PWQUALITY -P11KIT -QRENCODE -TPM2 -BZIP2 -LZ4 -XZ -ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=hybrid) [ 3.188578] systemd[1]: Detected architecture arm64. [ 3.256158] systemd[1]: Hostname set to . [ 3.504086] systemd-sysv-generator[161]: SysV service '/etc/init.d/sshd' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust. [ 4.069861] systemd[1]: Queued start job for default target Multi-User System. [ 4.168075] systemd[1]: Created slice Slice /system/getty. [ 4.179409] systemd[1]: Created slice Slice /system/modprobe. [ 4.190420] systemd[1]: Created slice Slice /system/serial-getty. [ 4.201953] systemd[1]: Created slice Slice /system/wpa_supplicant. [ 4.212637] systemd[1]: Created slice User and Session Slice. [ 4.219479] systemd[1]: Started Dispatch Password Requests to Console Directory Watch. [ 4.228292] systemd[1]: Started Forward Password Requests to Wall Directory Watch. [ 4.236809] systemd[1]: Reached target Path Units. [ 4.242056] systemd[1]: Reached target Remote File Systems. [ 4.248073] systemd[1]: Reached target Slice Units. [ 4.253389] systemd[1]: Reached target Swaps. [ 4.310780] systemd[1]: Listening on RPCbind Server Activation Socket. [ 4.318113] systemd[1]: Reached target RPC Port Mapper. [ 4.325314] systemd[1]: Listening on Syslog Socket. [ 4.331294] systemd[1]: Listening on initctl Compatibility Named Pipe. [ 4.339535] systemd[1]: Listening on Journal Audit Socket. [ 4.346377] systemd[1]: Listening on Journal Socket (/dev/log). [ 4.353760] systemd[1]: Listening on Journal Socket. [ 4.360469] systemd[1]: Listening on Network Service Netlink Socket. [ 4.368516] systemd[1]: Listening on udev Control Socket. [ 4.375288] systemd[1]: Listening on udev Kernel Socket. [ 4.381923] systemd[1]: Listening on User Database Manager Socket. [ 4.419321] systemd[1]: Mounting Huge Pages File System... [ 4.434746] systemd[1]: Mounting POSIX Message Queue File System... [ 4.450725] systemd[1]: Mounting Kernel Debug File System... [ 4.457821] systemd[1]: Kernel Trace File System was skipped because of an unmet condition check (ConditionPathExists=/sys/kernel/tracing). [ 4.480151] systemd[1]: Mounting Temporary Directory /tmp... [ 4.497179] systemd[1]: Starting Create List of Static Device Nodes... [ 4.513263] systemd[1]: Starting Load Kernel Module configfs... [ 4.528785] systemd[1]: Starting Load Kernel Module drm... [ 4.543774] systemd[1]: Starting Load Kernel Module fuse... [ 4.561176] systemd[1]: Starting RPC Bind... [ 4.566857] systemd[1]: File System Check on Root Device was skipped because of an unmet condition check (ConditionPathIsReadWrite=!/). [ 4.581967] fuse: init (API version 7.37) [ 4.607777] systemd[1]: Starting Journal Service... [ 4.627179] systemd[1]: Starting Load Kernel Modules... [ 4.643284] systemd[1]: Starting Generate network units from Kernel command line... [ 4.671750] systemd[1]: Starting Remount Root and Kernel File Systems... [ 4.697381] systemd[1]: Starting Coldplug All udev Devices... [ 4.709614] mlan: loading out-of-tree module taints kernel. [ 4.725619] systemd[1]: Started RPC Bind. [ 4.740516] systemd[1]: Mounted Huge Pages File System. [ 4.747378] systemd[1]: Mounted POSIX Message Queue File System. [ 4.759953] systemd[1]: Mounted Kernel Debug File System. [ 4.767331] systemd[1]: Mounted Temporary Directory /tmp. [ 4.778404] systemd[1]: Finished Create List of Static Device Nodes. [ 4.794148] systemd[1]: modprobe@configfs.service: Deactivated successfully. [ 4.806229] systemd[1]: Finished Load Kernel Module configfs. [ 4.818625] systemd[1]: modprobe@drm.service: Deactivated successfully. [ 4.832601] systemd[1]: Finished Load Kernel Module drm. [ 4.844086] systemd[1]: modprobe@fuse.service: Deactivated successfully. [ 4.854198] systemd[1]: Finished Load Kernel Module fuse. [ 4.865174] systemd[1]: Finished Generate network units from Kernel command line. [ 4.873501] wlan: Loading MWLAN driver [ 4.894624] wlan: Register to Bus Driver... [ 4.896762] EXT4-fs (mmcblk0p2): re-mounted. Quota mode: none. [ 4.900528] wlan: Register to Bus Driver Done [ 4.908036] systemd[1]: Mounting FUSE Control File System... [ 4.909426] wlan: Driver loaded successfully [ 4.933754] systemd[1]: Mounting Kernel Configuration File System... [ 4.936968] systemd-journald[176]: Collecting audit messages is enabled. [ 4.960762] systemd[1]: Finished Load Kernel Modules. [ 4.974291] systemd[1]: Finished Remount Root and Kernel File Systems. [ 4.982771] systemd[1]: Mounted FUSE Control File System. [ 4.990036] systemd[1]: Mounted Kernel Configuration File System. [ 5.004154] systemd[1]: Rebuild Hardware Database was skipped because of an unmet condition check (ConditionNeedsUpdate=/etc). [ 5.039866] systemd[1]: Starting Apply Kernel Variables... [ 5.047571] systemd[1]: Create System Users was skipped because no trigger condition checks were met. [ 5.076690] systemd[1]: Starting Create Static Device Nodes in /dev... [ 5.178333] systemd[1]: Finished Apply Kernel Variables. [ 5.225898] systemd[1]: Finished Create Static Device Nodes in /dev. [ 5.240057] systemd[1]: Started Journal Service. [ 5.300338] audit: type=1334 audit(1677836960.188:2): prog-id=5 op=LOAD [ 5.310726] audit: type=1334 audit(1677836960.196:3): prog-id=6 op=LOAD [ 5.353579] systemd-journald[176]: Received client request to flush runtime journal. [ 6.607463] systemd-journald[176]: Oldest entry in /run/log/journal/22502964b6984daabfb8617a58fc912b/system.journal is older than the configured file retention duration (1month), suggesting rotation. [ 6.631713] systemd-journald[176]: /run/log/journal/22502964b6984daabfb8617a58fc912b/system.journal: Journal header limits reached or header out-of-date, rotating. [ 7.229894] random: avahi-daemon: uninitialized urandom read (4 bytes read) [ 7.413073] audit: type=1334 audit(1724319476.991:4): prog-id=7 op=LOAD [ 7.423791] audit: type=1334 audit(1724319477.003:5): prog-id=8 op=LOAD [ 7.521807] random: wpa_supplicant: uninitialized urandom read (4096 bytes read) [ 7.532107] random: dbus-daemon: uninitialized urandom read (12 bytes read) [ 9.061069] Micrel KSZ8081 or KSZ8091 29950000.ethernet-1:01: attached PHY driver (mii_bus:phy_addr=29950000.ethernet-1:01, irq=POLL) [ 9.417543] audit: type=1334 audit(1724319478.995:6): prog-id=9 op=LOAD [ 9.430616] audit: type=1334 audit(1724319479.007:7): prog-id=10 op=LOAD [ 11.300699] audit: type=1006 audit(1724319480.882:8): pid=397 uid=0 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=1 res=1 [ 11.321743] audit: type=1300 audit(1724319480.882:8): arch=c00000b7 syscall=64 success=yes exit=1 a0=8 a1=ffffe9d74e80 a2=1 a3=1 items=0 ppid=1 pid=397 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm="(systemd)" exe="/lib/systemd/systemd" key=(null) [ 11.367615] audit: type=1327 audit(1724319480.882:8): proctitle="(systemd)" [ 11.390425] audit: type=1334 audit(1724319480.970:9): prog-id=11 op=LOAD [ 11.406528] audit: type=1300 audit(1724319480.970:9): arch=c00000b7 syscall=280 success=yes exit=8 a0=5 a1=ffffd8d33e08 a2=90 a3=0 items=0 ppid=1 pid=397 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm="systemd" exe="/lib/systemd/systemd" key=(null) [ 11.483581] audit: type=1327 audit(1724319480.970:9): proctitle="(systemd)" [ 11.503620] audit: type=1334 audit(1724319480.970:10): prog-id=11 op=UNLOAD [ 11.517355] audit: type=1334 audit(1724319480.970:11): prog-id=12 op=LOAD [ 11.528802] audit: type=1300 audit(1724319480.970:11): arch=c00000b7 syscall=280 success=yes exit=8 a0=5 a1=ffffd8d33eb8 a2=90 a3=aaab15d9004a items=0 ppid=1 pid=397 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm="systemd" exe="/lib/systemd/systemd" key=(null) [ 11.561861] audit: type=1327 audit(1724319480.970:11): proctitle="(systemd)" [ 13.801866] da7213 1-001a: supply VDDA not found, using dummy regulator [ 13.996202] da7213 1-001a: supply VDDIO not found, using dummy regulator [ 14.089476] fsl-ele-mu soc@0:ele-mu: ele_mu_probe: Not able to read cmd_tag [ 14.102741] fsl-ele-mu soc@0:ele-mu: ele_mu_probe: Not able to read rsp_tag [ 14.151165] fsl-ele-mu soc@0:ele-mu: assigned reserved memory node ele-reserved@90000000 [ 14.242031] caam 292e0000.crypto: device ID = 0x0a16040300000000 (Era 11) [ 14.248959] caam 292e0000.crypto: job rings = 4, qi = 0 [ 15.846746] imx_audio_rpmsg virtio0.rpmsg-audio-channel.-1.2: new channel: 0x405 -> 0x2! [ 15.914506] imx-audio-rpmsg imx-audio-rpmsg.3.auto: assigned reserved memory node audio@a8500000 [ 16.292175] imx-audio-rpmsg imx-audio-rpmsg.3.auto: assigned reserved memory node audio@a8500000 [ 16.306737] da7213 1-001a: supply VDDMIC not found, using dummy regulator [ 16.401162] caam algorithms registered in /proc/crypto [ 16.409563] caam 292e0000.crypto: rng crypto API alg registered prng-caam [ 16.419511] caam 292e0000.crypto: registering rng-caam [ 16.449743] random: crng init done [ 16.453321] random: 1 urandom warning(s) missed due to ratelimiting [ 16.587875] Device caam-keygen registered [ 39.456687] kauditd_printk_skb: 4 callbacks suppressed [ 39.456707] audit: type=1006 audit(1724319509.020:14): pid=600 uid=0 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=3 res=1 [ 39.475239] audit: type=1300 audit(1724319509.020:14): arch=c00000b7 syscall=64 success=yes exit=1 a0=8 a1=ffffe9d74e80 a2=1 a3=1 items=0 ppid=1 pid=600 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm="(systemd)" exe="/lib/systemd/systemd" key=(null) [ 39.501930] audit: type=1327 audit(1724319509.020:14): proctitle="(systemd)" [ 39.535923] audit: type=1334 audit(1724319509.100:15): prog-id=13 op=LOAD [ 39.544884] audit: type=1300 audit(1724319509.100:15): arch=c00000b7 syscall=280 success=yes exit=8 a0=5 a1=ffffe948c488 a2=90 a3=0 items=0 ppid=1 pid=600 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm="systemd" exe="/lib/systemd/systemd" key=(null) [ 39.571360] audit: type=1327 audit(1724319509.100:15): proctitle="(systemd)" [ 39.579362] audit: type=1334 audit(1724319509.100:16): prog-id=13 op=UNLOAD [ 39.587213] audit: type=1334 audit(1724319509.100:17): prog-id=14 op=LOAD [ 39.595055] audit: type=1300 audit(1724319509.100:17): arch=c00000b7 syscall=280 success=yes exit=8 a0=5 a1=ffffe948c538 a2=90 a3=aaaae479304a items=0 ppid=1 pid=600 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm="systemd" exe="/lib/systemd/systemd" key=(null) [ 39.622268] audit: type=1327 audit(1724319509.100:17): proctitle="(systemd)" root@maaxboard8ulp:~/test#

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

mantriyogesh commented 2 months ago

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.

adityat-1812 commented 2 months ago

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

mantriyogesh commented 2 months ago

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.

sreejitharikath commented 2 months ago

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

mantriyogesh commented 2 months ago

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

mantriyogesh commented 2 months ago

@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.

adityat-1812 commented 2 months ago

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

mantriyogesh commented 2 months ago

Can you please send a picture of the setup

adityat-1812 commented 2 months ago

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

mantriyogesh commented 2 months ago

You would be connecting the ESP with Linux host in some way?

adityat-1812 commented 2 months ago

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

mantriyogesh commented 2 months ago

So is it jumpers? Is it tf card or is it PCB?

mantriyogesh commented 2 months ago

Unless connected, how would sdio or ESP-Hosted work?

mantriyogesh commented 2 months ago

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:

  1. Linux host
  2. Kernel version - 5.x + is preferred
  3. SPI or SDIO bus at least on headers (For SDIO, can also use TF card slot, if you embed ESP on TF card)
  4. For SDIO, external pull-up registers are mandatory. Values are present in porting guide.
  5. 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

adityat-1812 commented 2 months ago

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:

  1. Linux host
  2. Kernel version - 5.x + is preferred
  3. SPI or SDIO bus at least on headers (For SDIO, can also use TF card slot, if you embed ESP on TF card)
  4. For SDIO, external pull-up registers are mandatory. Values are present in porting guide.
  5. 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. What is tf card?
  2. I'm going to connect ESP32 wifi using SDIO only
  3. I'm using ti's AM625 processor with Linux OS of kernel version 6.1.80
  4. My hardware isn't created yet, till the hardware is completed I want to configure/ enable the ESP32 wifi using SDIO interface on my AM625 device.
  5. What are changes required in device tree of AM625 to get ESP32 wifi work with SDIO interface.
mantriyogesh commented 2 months ago

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.

adityat-1812 commented 2 months ago

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?

mantriyogesh commented 2 months ago

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.

adityat-1812 commented 2 months ago

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

mantriyogesh commented 2 months ago

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.

adityat-1812 commented 2 months ago

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?

mantriyogesh commented 2 months ago

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.

adityat-1812 commented 2 months ago

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.

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?

mantriyogesh commented 2 months ago

From your Linux data sheet, find out what exact gpio number 'GPIO1_10' is translated to. use that gpio number.

adityat-1812 commented 2 months ago

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 ?

mantriyogesh commented 2 months ago

https://github.com/espressif/esp-hosted/blob/master/esp_hosted_fg/docs/Linux_based_host/porting_guide.md#241-gpio-numbering-in-raspberry-pi-os

adityat-1812 commented 2 months ago

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: ============================================

Screenshot from 2024-09-13 15-49-25

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 
mantriyogesh commented 2 months ago

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

adityat-1812 commented 2 months ago

ImportedPhoto_1726462747207 This is the photo of my setup, please let me know, what am I missing?

mantriyogesh commented 2 months ago
  1. Where is ESP chipset?

  2. Wired setup is very unstable in 4-bit sdio mode. Use 1 -bit sdio instead. Configure your sdio in host (using device tree) accordingly.

  3. Ext pull up registers mandatory

  4. eFuse might also needed as you are using ESP32.

Unless hardware configured correctly it cannot work. Check porting guide for more details.

adityat-1812 commented 2 months ago
  1. Where is ESP chipset?

    1. Wired setup is very unstable in 4-bit sdio mode. Use 1 -bit sdio instead. Configure your sdio in host (using device tree) accordingly.

    2. Ext pull up registers mandatory

    3. eFuse might also needed as you are using ESP32.

Unless hardware configured correctly it cannot work. Check porting guide for more details.

  1. ESP chipset is on top side of ESP
  2. How to use 1-bit SDIO? Also, why is my setup unstable. Configured the SDIO in host as ![image](https://github.com/user-attachments/assets/6c727aad-f5c4-499a-adf9-711a8f30f9b4)
  3. Yes, I've added 10K Ohm registers for pull up
  4. What is eFuse and how to use it? Best Regards, Aditya T
mantriyogesh commented 2 months ago

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.

mantriyogesh commented 2 months ago

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:

  1. Hardware in configured in device tree
  2. Connections not correct

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.

adityat-1812 commented 2 months ago

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 1726466395557 I'll check the eFuse details.

Logs of Host [LINUX]: Linux-logs.txt Logs of Slave [ESP32]: ESP-logs.txt

mantriyogesh commented 2 months ago

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. Screenshot 2024-09-16 at 2 55 29 PM

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: Screenshot 2024-09-16 at 2 58 53 PM

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.

adityat-1812 commented 2 months ago

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. Screenshot 2024-09-16 at 2 55 29 PM

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: Screenshot 2024-09-16 at 2 58 53 PM

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]

mantriyogesh commented 2 months ago

The question remains, then why sdhci1 ? :

Screenshot 2024-09-16 at 3 13 44 PM

adityat-1812 commented 2 months ago

The question remains, then why sdhci1 ? :

Screenshot 2024-09-16 at 3 13 44 PM

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>;
    };
};
mantriyogesh commented 2 months ago

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.

mantriyogesh commented 2 months ago

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.

adityat-1812 commented 2 months ago

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:~#
mantriyogesh commented 2 months ago

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.

adityat-1812 commented 2 months ago

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