espressif / esp-hosted

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

ESP32-C3 SPI Chip Enable pin selection #207

Open MooseGmaing opened 1 year ago

MooseGmaing commented 1 year ago

Hello, I am using ESP-Hosted NG over SPI with an ESP32-C3. It worked fine, but I needed to use CE0 for a different SPI slave and now (when the ESP is connected to CE1) it does not work. Does the code Require a specific Chip Enable pin, or is it selectable/autodetected? Looking through the code I didn't find anything specifying the CE pin, but I'm not very good with C so I might have overlooked something.

mantriyogesh commented 1 year ago

Hello @MooseGmaing ,

Thanks for using ESP-Hosted. I'm little confused, as CE0 or CE1.

If I understand correctly, your host had two ChipSelects. If you use CE0 with ESP32-C3, it works but if you move ESP32-C3 to other CHIPSelect CE1 of Host, the ESP32-C3 is not working. Is this correct understanding?

Also can you please help with:

  1. Which platform (SoC) and kernel version?
  2. Host /var/log/kern.log or /var/log/messages or dmesg log
  3. Esp minicom log
MooseGmaing commented 1 year ago
  1. I'm using a Raspberry Pi and I'm talking about its Chip Select Pins (CE0, CE1). My kernel version is 5.10.103-v7+ (RetroPie is my operating system).
  2. This is my dmesg log: [ 0.000000] Booting Linux on physical CPU 0xf00 [ 0.000000] Linux version 5.10.103-v7+ (dom@buildbot) (arm-linux-gnueabihf-gc c-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1529 SMP Tue Mar 8 12:21:37 GMT 2022 [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d [ 0.000000] CPU: div instructions available: patching division code [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instructio n cache [ 0.000000] OF: fdt: Machine model: Raspberry Pi 2 Model B Rev 1.1 [ 0.000000] random: fast init done [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] Reserved memory: created CMA memory pool at 0x2ac00000, size 64 M iB [ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id share d-dma-pool [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000000000000-0x000000002fffffff] [ 0.000000] Normal empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000000000000-0x000000002fffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000002fffffff] [ 0.000000] On node 0 totalpages: 196608 [ 0.000000] DMA zone: 1728 pages used for memmap [ 0.000000] DMA zone: 0 pages reserved [ 0.000000] DMA zone: 196608 pages, LIFO batch:63 [ 0.000000] percpu: Embedded 20 pages/cpu s50828 r8192 d22900 u81920 [ 0.000000] pcpu-alloc: s50828 r8192 d22900 u81920 alloc=20*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 194880 [ 0.000000] Kernel command line: coherent_pool=1M snd_bcm2835.enable_compat_a lsa=0 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=320 bcm2708_fb.fbheight=240 b cm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 consol e=ttyAMA0,115200 console=tty1 root=PARTUUID=dfbf6d4c-02 rootfstype=ext4 fsck.rep air=yes rootwait loglevel=3 consoleblank=0 plymouth.enable=0 [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear) [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, li near) [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] Memory: 696112K/786432K available (10240K kernel code, 1312K rwda ta, 2952K rodata, 1024K init, 862K bss, 24784K reserved, 65536K cma-reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 [ 0.000000] ftrace: allocating 32081 entries in 95 pages [ 0.000000] ftrace: allocated 94 pages with 5 groups [ 0.000000] rcu: Hierarchical RCU implementation. [ 0.000000] Rude variant of Tasks RCU enabled. [ 0.000000] Tracing variant of Tasks RCU enabled. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jif fies. [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] random: get_random_bytes called from start_kernel+0x3ac/0x580 wit h crng_init=1 [ 0.000000] arch_timer: cp15 timer(s) running at 19.20MHz (phys). [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns [ 0.000011] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 43980 46511078ns [ 0.000028] Switching to timer-based delay loop, resolution 52ns [ 0.000380] Console: colour dummy device 80x30 [ 0.000476] printk: console [tty1] enabled [ 0.000547] Calibrating delay loop (skipped), value calculated using timer fr equency.. 38.40 BogoMIPS (lpj=192000) [ 0.000585] pid_max: default: 32768 minimum: 301 [ 0.000853] LSM: Security Framework initializing [ 0.001159] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linea r) [ 0.001194] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear) [ 0.003067] cgroup: Disabling memory control group subsystem [ 0.003450] CPU: Testing write buffer coherency: ok [ 0.004166] CPU0: update cpu_capacity 1024 [ 0.004190] CPU0: thread -1, cpu 0, socket 15, mpidr 80000f00 [ 0.005968] Setting up static identity map for 0x100000 - 0x10003c [ 0.006235] rcu: Hierarchical SRCU implementation. [ 0.007527] smp: Bringing up secondary CPUs ... [ 0.009174] CPU1: update cpu_capacity 1024 [ 0.009189] CPU1: thread -1, cpu 1, socket 15, mpidr 80000f01 [ 0.011191] CPU2: update cpu_capacity 1024 [ 0.011204] CPU2: thread -1, cpu 2, socket 15, mpidr 80000f02 [ 0.012969] CPU3: update cpu_capacity 1024 [ 0.012982] CPU3: thread -1, cpu 3, socket 15, mpidr 80000f03 [ 0.013212] smp: Brought up 1 node, 4 CPUs [ 0.013242] SMP: Total of 4 processors activated (153.60 BogoMIPS). [ 0.013257] CPU: All CPU(s) started in HYP mode. [ 0.013270] CPU: Virtualization extensions available. [ 0.014587] devtmpfs: initialized [ 0.035952] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5 [ 0.036334] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, ma x_idle_ns: 19112604462750000 ns [ 0.036378] futex hash table entries: 1024 (order: 4, 65536 bytes, linear) [ 0.040428] pinctrl core: initialized pinctrl subsystem [ 0.042125] NET: Registered protocol family 16 [ 0.047161] DMA: preallocated 1024 KiB pool for atomic coherent allocations [ 0.054552] audit: initializing netlink subsys (disabled) [ 0.055133] audit: type=2000 audit(0.050:1): state=initialized audit_enabled= 0 res=1 [ 0.056065] thermal_sys: Registered thermal governor 'step_wise' [ 0.057286] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers. [ 0.057308] hw-breakpoint: maximum watchpoint size is 8 bytes. [ 0.057678] Serial: AMBA PL011 UART driver [ 0.080161] bcm2835-mbox 3f00b880.mailbox: mailbox enabled [ 0.099455] raspberrypi-firmware soc:firmware: Attached to firmware from 2021 -12-01T15:07:06, variant start [ 0.109455] raspberrypi-firmware soc:firmware: Firmware hash is 71bd3109023a0 c8575585ba87cbb374d2eeb038f [ 0.164570] Kprobes globally optimized [ 0.171721] bcm2835-dma 3f007000.dma: DMA legacy API manager, dmachans=0x1 [ 0.174606] SCSI subsystem initialized [ 0.175014] usbcore: registered new interface driver usbfs [ 0.175105] usbcore: registered new interface driver hub [ 0.175207] usbcore: registered new device driver usb [ 0.177836] clocksource: Switched to clocksource arch_sys_counter [ 1.928856] VFS: Disk quotas dquot_6.6.0 [ 1.929014] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) [ 1.929288] FS-Cache: Loaded [ 1.929700] CacheFiles: Loaded [ 1.946131] NET: Registered protocol family 2 [ 1.946495] IP idents hash table entries: 16384 (order: 5, 131072 bytes, line ar) [ 1.949463] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear) [ 1.949553] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear) [ 1.949679] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear) [ 1.949877] TCP: Hash tables configured (established 8192 bind 8192) [ 1.950137] UDP hash table entries: 512 (order: 2, 16384 bytes, linear) [ 1.950219] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear) [ 1.950621] NET: Registered protocol family 1 [ 1.951732] RPC: Registered named UNIX socket transport module. [ 1.951754] RPC: Registered udp transport module. [ 1.951769] RPC: Registered tcp transport module. [ 1.951784] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 1.953863] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counter s available [ 1.959023] Initialise system trusted keyrings [ 1.959455] workingset: timestamp_bits=14 max_order=18 bucket_order=4 [ 1.971453] zbud: loaded [ 1.974192] FS-Cache: Netfs 'nfs' registered for caching [ 1.975469] NFS: Registering the id_resolver key type [ 1.975573] Key type id_resolver registered [ 1.975589] Key type id_legacy registered [ 1.975795] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 1.975814] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering ... [ 1.977468] Key type asymmetric registered [ 1.977490] Asymmetric key parser 'x509' registered [ 1.977569] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 2 49) [ 1.977588] io scheduler mq-deadline registered [ 1.977605] io scheduler kyber registered [ 1.981194] bcm2708_fb soc:fb: FB found 1 display(s) [ 1.985473] Console: switching to colour frame buffer device 40x30 [ 1.987449] bcm2708_fb soc:fb: Registered framebuffer for display 0, size 320 x240 [ 1.994475] bcm2835-rng 3f104000.rng: hwrng registered [ 1.994991] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000 000(1024 MiB) [ 1.996151] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f2 00000 [ 2.014300] brd: module loaded [ 2.031468] loop: module loaded [ 2.033925] Loading iSCSI transport class v2.0-870. [ 2.036470] usbcore: registered new interface driver lan78xx [ 2.036564] usbcore: registered new interface driver smsc95xx [ 2.036599] dwc_otg: version 3.00a 10-AUG-2012 (platform bus) [ 2.765151] Core Release: 2.80a [ 2.765192] Setting default values for core params [ 2.765236] Finished setting default values for core params [ 2.965702] Using Buffer DMA mode [ 2.965720] Periodic Transfer Interrupt Enhancement - disabled [ 2.965734] Multiprocessor Interrupt Enhancement - disabled [ 2.965752] OTG VER PARAM: 0, OTG VER FLAG: 0 [ 2.965774] Dedicated Tx FIFOs mode

[ 2.966432] WARN::dwc_otg_hcd_init:1074: FIQ DMA bounce buffers: virt = aad14 000 dma = 0xead14000 len=9024 [ 2.966475] FIQ FSM acceleration enabled for : Non-periodic Split Transactions Periodic Split Transactions High-Speed Isochronous Endpoints Interrupt/Control Split Transaction hack enabled [ 2.966494] dwc_otg: Microframe scheduler enabled

[ 2.966587] WARN::hcd_init_fiq:457: FIQ on core 1

[ 2.966606] WARN::hcd_init_fiq:458: FIQ ASM at 807cb8b8 length 36

[ 2.966629] WARN::hcd_init_fiq:497: MPHI regs_base at b0810000 [ 2.966659] dwc_otg 3f980000.usb: DWC OTG Controller [ 2.966714] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1 [ 2.966782] dwc_otg 3f980000.usb: irq 89, io mem 0x00000000 [ 2.966843] Init: Port Power? op_state=1 [ 2.966858] Init: Power Port (0) [ 2.967363] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bc dDevice= 5.10 [ 2.967386] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber= 1 [ 2.967405] usb usb1: Product: DWC OTG Controller [ 2.967424] usb usb1: Manufacturer: Linux 5.10.103-v7+ dwc_otg_hcd [ 2.967443] usb usb1: SerialNumber: 3f980000.usb [ 2.968727] hub 1-0:1.0: USB hub found [ 2.968834] hub 1-0:1.0: 1 port detected [ 2.970495] dwc_otg: FIQ enabled [ 2.970515] dwc_otg: NAK holdoff enabled [ 2.970530] dwc_otg: FIQ split-transaction FSM enabled [ 2.970552] Module dwc_common_port init [ 2.971026] usbcore: registered new interface driver usb-storage [ 2.971461] mousedev: PS/2 mouse device common for all mice [ 2.973030] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer [ 2.975722] sdhci: Secure Digital Host Controller Interface driver [ 2.975743] sdhci: Copyright(c) Pierre Ossman [ 2.976652] sdhost-bcm2835 3f202000.mmc: could not get clk, deferring probe [ 2.976979] sdhci-pltfm: SDHCI platform and OF driver helper [ 2.978241] ledtrig-cpu: registered to indicate activity on CPUs [ 2.978693] hid: raw HID events driver (C) Jiri Kosina [ 2.978911] usbcore: registered new interface driver usbhid [ 2.978927] usbhid: USB HID core driver [ 2.985516] Initializing XFRM netlink socket [ 2.985580] NET: Registered protocol family 17 [ 2.985814] Key type dns_resolver registered [ 2.986513] Registering SWP/SWPB emulation handler [ 2.986725] registered taskstats version 1 [ 2.986765] Loading compiled-in X.509 certificates [ 2.988393] Key type ._fscrypt registered [ 2.988416] Key type .fscrypt registered [ 2.988432] Key type fscrypt-provisioning registered [ 3.003238] uart-pl011 3f201000.serial: cts_event_workaround enabled [ 3.003383] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 114, base_baud = 0) is a PL011 rev2 [ 3.003740] printk: console [ttyAMA0] enabled [ 3.006785] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains drive r [ 3.009885] sdhost: log_buf @ (ptrval) (ead13000) [ 3.058412] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1) [ 3.062321] of_cfs_init [ 3.062737] of_cfs_init: OK [ 3.064156] Waiting for root device PARTUUID=dfbf6d4c-02... [ 3.098059] Indeed it is in host mode hprt0 = 00021501 [ 3.179460] mmc0: host does not support reading read-only switch, assuming wr ite-enable [ 3.181426] mmc0: Problem switching card into high-speed mode! [ 3.182511] mmc0: new SDHC card at address 0001 [ 3.183835] mmcblk0: mmc0:0001 SD32G 29.1 GiB [ 3.188047] mmcblk0: p1 p2 [ 3.227851] EXT4-fs (mmcblk0p2): INFO: recovery required on readonly filesyst em [ 3.227893] EXT4-fs (mmcblk0p2): write access will be enabled during recovery [ 3.307882] usb 1-1: new high-speed USB device number 2 using dwc_otg [ 3.308117] Indeed it is in host mode hprt0 = 00001101 [ 3.548456] usb 1-1: New USB device found, idVendor=0424, idProduct=9514, bcd Device= 2.00 [ 3.548486] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 3.549656] hub 1-1:1.0: USB hub found [ 3.549819] hub 1-1:1.0: 5 ports detected [ 3.695730] EXT4-fs (mmcblk0p2): recovery complete [ 3.712052] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. O pts: (null) [ 3.712202] VFS: Mounted root (ext4 filesystem) readonly on device 179:2. [ 3.714527] devtmpfs: mounted [ 3.724338] Freeing unused kernel memory: 1024K [ 3.724830] Run /sbin/init as init process [ 3.724860] with arguments: [ 3.724875] /sbin/init [ 3.724889] with environment: [ 3.724902] HOME=/ [ 3.724916] TERM=linux [ 3.867919] usb 1-1.1: new high-speed USB device number 3 using dwc_otg [ 4.008519] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00, b cdDevice= 2.00 [ 4.008552] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber =0 [ 4.011791] smsc95xx v2.0.0 [ 4.796021] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb- 1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:d2:9f:df [ 4.982619] systemd[1]: System time before build time, advancing clock. [ 5.129717] NET: Registered protocol family 10 [ 5.132006] Segment Routing with IPv6 [ 5.219521] systemd[1]: systemd 241 running in system mode. (+PAM +AUDIT +SEL INUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL + XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybr id) [ 5.221143] systemd[1]: Detected architecture arm. [ 5.315153] systemd[1]: Set hostname to . [ 5.495683] uart-pl011 3f201000.serial: no DMA platform data [ 6.389796] systemd[1]: /lib/systemd/system/smbd.service:9: PIDFile= referenc es path below legacy directory /var/run/, updating /var/run/samba/smbd.pid → /ru n/samba/smbd.pid; please update the unit file accordingly. [ 6.434745] systemd[1]: /lib/systemd/system/nmbd.service:9: PIDFile= referenc es path below legacy directory /var/run/, updating /var/run/samba/nmbd.pid → /ru n/samba/nmbd.pid; please update the unit file accordingly. [ 6.598292] random: systemd: uninitialized urandom read (16 bytes read) [ 6.624219] random: systemd: uninitialized urandom read (16 bytes read) [ 6.629693] systemd[1]: Created slice system-systemd\x2dfsck.slice. [ 6.630915] random: systemd: uninitialized urandom read (16 bytes read) [ 6.631888] systemd[1]: Listening on udev Kernel Socket. [ 6.632692] systemd[1]: Reached target Swap. [ 6.635251] systemd[1]: Created slice system-serial\x2dgetty.slice. [ 6.636465] systemd[1]: Listening on initctl Compatibility Named Pipe. [ 7.791254] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null) [ 7.945990] systemd-journald[110]: Received request to flush runtime journal from PID 1 [ 8.910464] vc_sm_cma: module is from the staging directory, the quality is u nknown, you have been warned. [ 8.913184] mc: Linux media interface: v0.10 [ 8.914105] bcm2835_vc_sm_cma_probe: Videocore shared memory driver

[ 8.922763] [vc_sm_connected_init]: installed successfully [ 8.976315] videodev: Linux video capture interface: v2.00 [ 9.063225] bcm2835_mmal_vchiq: module is from the staging directory, the qua lity is unknown, you have been warned. [ 9.063234] bcm2835_mmal_vchiq: module is from the staging directory, the qua lity is unknown, you have been warned. [ 9.064377] bcm2835_mmal_vchiq: module is from the staging directory, the qua lity is unknown, you have been warned. [ 9.111218] bcm2835_v4l2: module is from the staging directory, the quality i s unknown, you have been warned. [ 9.132228] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned. [ 9.134970] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned. [ 9.139785] bcm2835_audio bcm2835_audio: card created with 4 channels [ 9.161593] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev /video13 [ 9.162309] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /de v/video14 [ 9.162980] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /de v/video15 [ 9.163565] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/ video16 [ 9.163618] bcm2835-isp bcm2835-isp: Register output node 0 with media contro ller [ 9.163655] bcm2835-isp bcm2835-isp: Register capture node 1 with media contr oller [ 9.163685] bcm2835-isp bcm2835-isp: Register capture node 2 with media contr oller [ 9.163716] bcm2835-isp bcm2835-isp: Register capture node 3 with media contr oller [ 9.164193] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp [ 9.164500] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned. [ 9.175096] bcm2835_audio bcm2835_audio: card created with 4 channels [ 9.178265] bcm2835-codec bcm2835-codec: Device registered as /dev/video10 [ 9.178346] bcm2835-codec bcm2835-codec: Loaded V4L2 decode [ 9.187487] bcm2835-codec bcm2835-codec: Device registered as /dev/video11 [ 9.187569] bcm2835-codec bcm2835-codec: Loaded V4L2 encode [ 9.222920] bcm2835-codec bcm2835-codec: Device registered as /dev/video12 [ 9.223031] bcm2835-codec bcm2835-codec: Loaded V4L2 isp [ 9.226794] bcm2835-codec bcm2835-codec: Device registered as /dev/video18 [ 9.226874] bcm2835-codec bcm2835-codec: Loaded V4L2 image_fx [ 12.048868] random: crng init done [ 12.048944] random: 7 urandom warning(s) missed due to ratelimiting [ 12.749494] 8021q: 802.1Q VLAN Support v1.8 [ 12.983099] cfg80211: Loading compiled-in X.509 certificates for regulatory d atabase [ 13.078163] Adding 102396k swap on /var/swap. Priority:-2 extents:1 across:1 02396k SSFS [ 13.107100] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 13.380348] SMSC LAN8700 usb-001:003:01: attached PHY driver [SMSC LAN8700] ( mii_bus:phy_addr=usb-001:003:01, irq=POLL) [ 13.380794] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup [ 13.389149] smsc95xx 1-1.1:1.0 eth0: Link is Down [ 15.439343] smsc95xx 1-1.1:1.0 eth0: Link is Up - 100Mbps/Full - flow control off [ 15.439418] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 17.686217] ICMPv6: process 'dhcpcd' is using deprecated sysctl (syscall) net .ipv6.neigh.eth0.retrans_time - use net.ipv6.neigh.eth0.retrans_time_ms instead [ 22.240081] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/spi@7e204000/spidev@0/status [ 22.482104] Bluetooth: Core ver 2.22 [ 22.482269] NET: Registered protocol family 31 [ 22.482282] Bluetooth: HCI device and connection manager initialized [ 22.482316] Bluetooth: HCI socket layer initialized [ 22.482335] Bluetooth: L2CAP socket layer initialized [ 22.482373] Bluetooth: SCO socket layer initialized [ 26.681638] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/spi@7e204000/spidev@0/status

  1. I'm sorry, but I don't know what an ESP minicom log is. For some additional information, I do have the SPI bus on, as well as power for the ESP32.
mantriyogesh commented 1 year ago

Please check https://github.com/espressif/esp-hosted/blob/master/esp_hosted_fg/docs/Linux_based_host/porting_guide.md#124-peripheral-configurations : 1.2.4 Peripheral configurations -> SPI Bus instance and Chip select number

Additional reference: https://github.com/espressif/esp-hosted/blob/master/esp_hosted_ng/docs/porting_guide.md

MooseGmaing commented 1 year ago

Ok, so I just need to change the Chip Select number in the code from 0 to 1, correct?

mantriyogesh commented 1 year ago

Yes

MooseGmaing commented 1 year ago

In line 470 of esp-spi.c I changed esp_board.chip_select = 0; to esp_board.chip_select = 1;. This is what I get when running rpi_init.sh: Building for spi protocol rm -rf *.o sdio/*.o spi/*.o *.ko make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- -C /lib/modules/5.10.103-v7+/build M=/home/pi/esp-hosted/esp_hosted_ng/host clean make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. make[1]: Entering directory '/usr/src/linux-headers-5.10.103-v7+' CLEAN /home/pi/esp-hosted/esp_hosted_ng/host/Module.symvers make[1]: Leaving directory '/usr/src/linux-headers-5.10.103-v7+' make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- -C /lib/modules/5.10.103-v7+/build M=/home/pi/esp-hosted/esp_hosted_ng/host modules make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. make[1]: Entering directory '/usr/src/linux-headers-5.10.103-v7+' CC [M] /home/pi/esp-hosted/esp_hosted_ng/host/esp_bt.o CC [M] /home/pi/esp-hosted/esp_hosted_ng/host/main.o CC [M] /home/pi/esp-hosted/esp_hosted_ng/host/esp_cmd.o CC [M] /home/pi/esp-hosted/esp_hosted_ng/host/esp_wpa_utils.o CC [M] /home/pi/esp-hosted/esp_hosted_ng/host/esp_cfg80211.o CC [M] /home/pi/esp-hosted/esp_hosted_ng/host/esp_stats.o CC [M] /home/pi/esp-hosted/esp_hosted_ng/host/spi/esp_spi.o LD [M] /home/pi/esp-hosted/esp_hosted_ng/host/esp32_spi.o MODPOST /home/pi/esp-hosted/esp_hosted_ng/host/Module.symvers CC [M] /home/pi/esp-hosted/esp_hosted_ng/host/esp32_spi.mod.o LD [M] /home/pi/esp-hosted/esp_hosted_ng/host/esp32_spi.ko make[1]: Leaving directory '/usr/src/linux-headers-5.10.103-v7+' insmod: ERROR: could not insert module esp32_spi.ko: No such device I don't know why it does not recognize the ESP32. Do I need to have spi enabled? The tutorial said that esp-hosted uses its own spi driver.

mantriyogesh commented 1 year ago

Hello @MooseGmaing ,

  1. Some command output of below cmds required for understanding:

    modinfo esp32_spi.ko
    uname -a
    cat /boot/config.txt
  2. Have you changed hardware connections of SPI GPIO(s) as per one in your interest? You may refer pin configs from https://pinout.xyz/

  3. Worth checking https://blog.stabel.family/raspberry-pi-4-multiple-spis-and-the-device-tree/

MooseGmaing commented 1 year ago

This is what I get when running modinfo esp32_spi.ko:

filename: /home/pi/esp-hosted/esp_hosted_ng/host/esp32_spi.ko version: 0.1 description: Wifi driver for ESP-Hosted solution author: Yogesh Mantri <yogesh.mantri@espressif.com> author: Mangesh Malusare <mangesh.malusare@espressif.com> author: Amey Inamdar <amey.inamdar@espressif.com> license: GPL srcversion: E58581E8221234024F10B3E depends: cfg80211,bluetooth name: esp32_spi vermagic: 5.10.103-v7+ SMP mod_unload modversions ARMv7 p2v8 parm: resetpin:Host's GPIO pin number which is connected to ESP32's EN to reset ESP32 device (int)

My kernel version is 5.10.103-v7+ (RetroPie is my operating system). Here is my /boot/config.txt:

For more options and information see

http://rpf.io/configtxt

Some settings may impact device functionality. See link above for details

uncomment if you get no picture on HDMI for a default "safe" mode

hdmi_safe=1

uncomment this if your display has a black border of unused pixels visible

and your display can output without overscan

disable_overscan=1

uncomment the following to adjust overscan. Use positive numbers if console

goes off screen, and negative if there is too much border

overscan_left=16

overscan_right=16

overscan_top=16

overscan_bottom=16

uncomment to force a console size. By default it will be display's size minus

overscan.

framebuffer_width=320 framebuffer_height=240

uncomment if hdmi display is not detected and composite is being output

hdmi_group=2 hdmi_mode=87 hdmi_cvt=320 240 60 1 0 0 0 hdmi_force_hotplug=1

uncomment to force a specific HDMI mode (this will force VGA)

hdmi_group=1

hdmi_mode=1

uncomment to force a HDMI mode rather than DVI. This can make audio work in

DMT (computer monitor) modes

hdmi_drive=2

uncomment to increase signal to HDMI, if you have interference, blanking, or

no display

config_hdmi_boost=4

uncomment for composite PAL

sdtv_mode=2

uncomment to overclock the arm. 700 MHz is the default.

arm_freq=800

core_freq=250 core_freq_min=250

Uncomment some or all of these to enable the optional hardware interfaces

dtparam=i2c_arm=on

dtparam=i2s=on

dtparam=spi=on

dtoverlay=spi0-cs

Uncomment this to enable infrared communication.

dtoverlay=gpio-ir,gpio_pin=17

dtoverlay=gpio-ir-tx,gpio_pin=18

Additional overlays and parameters are documented /boot/overlays/README

Enable audio (loads snd_bcm2835)

dtparam=audio=on

[pi4]

Enable DRM VC4 V3D driver on top of the dispmanx display stack

dtoverlay=vc4-fkms-v3d max_framebuffers=2

[all]

dtoverlay=vc4-fkms-v3d

gpu_mem_256=128 gpu_mem_512=256 gpu_mem_1024=256

overscan_scale=1

I have every pin like in the ESP-Hosted hardware spi setup, the only difference is that instead of CE0 I have CE1

mantriyogesh commented 1 year ago
  1. Please uncomment from your device tree
    dtparam=spi=on

    And reboot and verify if /dev/spidev0.1 is created or not by using

    ls /dev/spidev*

Once it is visible, run

cd esp_hosted_fg/host/linux/host_control
bash rpi_init.sh spi

After running this command, /dev/spidev0.1 should no more be visible and get back the dmesg log

  1. You would have done hardware connection using one of esp peripheral from https://github.com/espressif/esp-hosted/blob/master/esp_hosted_fg/docs/Linux_based_host/SPI_setup.md#11-hardware-setup Obviously CE1 pin is different from CE0. You would have to change the gpio from pin24 (bcm pin 8) to pin 26(bcm pin 7) connected

  2. As per I think, cs0 & cs1 should be by default enabled, considering there is no mention of spi0-2cs. Remove setting

    dtoverlay=spi0-cs
  3. Further, spi1-2cs is to change the default cs pins. If you wish the same, please mention the pins See https://raspberrypi.stackexchange.com/questions/121478/re-configure-spi-cs-as-gpio-while-using-spi

Please check that pin numbers are expected to be bcm pin numbers (bcm pins not exactly match the physical numbers)

  1. Reference https://github.com/raspberrypi/linux/blob/04c8e47067d4873c584395e5cb260b4f170a99ea/arch/arm/boot/dts/overlays/README#L1154-L1158
MooseGmaing commented 1 year ago

Hello, sorry for the wait, but I didn't find time to troubleshoot this. I did what you said and this is what happens: `pi@retropie~/esp-hosted/esp_hosted_fg/host/linux/host_control $ bash rpi_init.s h spi Building for spi protocol rm: cannot remove 'spidev_disabler.dtbo': No such file or directory rm -f .out .o gcc -C -Wall --sysroot= -I/home/pi/esp-hosted/esp_hosted_fg/host/linux/host_cont rol/c_support/../../../../common/protobuf-c -I/home/pi/esp-hosted/esp_hosted_fg/ host/linux/host_control/c_support/../../../../common/include -I/home/pi/esp-host ed/esp_hosted_fg/host/linux/host_control/c_support/../../../control_lib/include -I/home/pi/esp-hosted/esp_hosted_fg/host/linux/host_control/c_support/../../../c ontrol_lib/src/include -I/home/pi/esp-hosted/esp_hosted_fg/host/linux/host_contr ol/c_support/../../../virtual_serial_if/include -I/home/pi/esp-hosted/esp_hosted _fg/host/linux/host_control/c_support/../../../components/include -I/home/pi/esp -hosted/esp_hosted_fg/host/linux/host_control/c_support/../../port/include -I. / home/pi/esp-hosted/esp_hosted_fg/host/linux/host_control/c_support/../../../../c ommon/protobuf-c/protobuf-c/protobuf-c.c /home/pi/esp-hosted/esp_hosted_fg/host/ linux/host_control/c_support/../../../../common/esp_hosted_config.pb-c.c /home/p i/esp-hosted/esp_hosted_fg/host/linux/host_control/c_support/../../../control_li b/src/ctrl_core.c /home/pi/esp-hosted/esp_hosted_fg/host/linux/host_control/c_su pport/../../../control_lib/src/ctrl_api.c /home/pi/esp-hosted/esp_hosted_fg/host /linux/host_control/c_support/../../../virtual_serial_if/src/serial_if.c /home/p i/esp-hosted/esp_hosted_fg/host/linux/host_control/c_support/../../../components /src/esp_queue.c /home/pi/esp-hosted/esp_hosted_fg/host/linux/host_control/c_sup port/../../port/src/platform_wrapper.c ./test_utils.c -lpthread -lrt test.c -o t est.out gcc: error: /home/pi/esp-hosted/esp_hosted_fg/host/linux/host_control/c_support/ ../../../../common/protobuf-c/protobuf-c/protobuf-c.c: No such file or directory make: [Makefile:42: test] Error 1 gcc -C -Wall --sysroot= -fsanitize=undefined -fsanitize-address-use-after-scope -fsanitize-undefined-trap-on-error -fstack-protector-all -fstack-check -fsanit ize=address -fsanitize=pointer-compare -fno-omit-frame-pointer -static-libasan - I/home/pi/esp-hosted/esp_hosted_fg/host/linux/host_control/c_support/../../../.. /common/protobuf-c -I/home/pi/esp-hosted/esp_hosted_fg/host/linux/host_control/c _support/../../../../common/include -I/home/pi/esp-hosted/esp_hosted_fg/host/lin ux/host_control/c_support/../../../control_lib/include -I/home/pi/esp-hosted/esp _hosted_fg/host/linux/host_control/c_support/../../../control_lib/src/include -I /home/pi/esp-hosted/esp_hosted_fg/host/linux/host_control/c_support/../../../vir tual_serial_if/include -I/home/pi/esp-hosted/esp_hosted_fg/host/linux/host_contr ol/c_support/../../../components/include -I/home/pi/esp-hosted/esp_hosted_fg/hos t/linux/host_control/c_support/../../port/include -I. /home/pi/esp-hosted/esp_ho sted_fg/host/linux/host_control/c_support/../../../../common/protobuf-c/protobuf -c/protobuf-c.c /home/pi/esp-hosted/esp_hosted_fg/host/linux/host_control/c_supp ort/../../../../common/esp_hosted_config.pb-c.c /home/pi/esp-hosted/esp_hosted_f g/host/linux/host_control/c_support/../../../control_lib/src/ctrl_core.c /home/p i/esp-hosted/esp_hosted_fg/host/linux/host_control/c_support/../../../control_li b/src/ctrl_api.c /home/pi/esp-hosted/esp_hosted_fg/host/linux/host_control/c_sup port/../../../virtual_serial_if/src/serial_if.c /home/pi/esp-hosted/esp_hosted_f g/host/linux/host_control/c_support/../../../components/src/esp_queue.c /home/pi /esp-hosted/esp_hosted_fg/host/linux/host_control/c_support/../../port/src/platf orm_wrapper.c ./test_utils.c -lpthread -lrt stress.c -o stress.out -ggdb3 -g gcc: error: /home/pi/esp-hosted/esp_hosted_fg/host/linux/host_control/c_support/ ../../../../common/protobuf-c/protobuf-c/protobuf-c.c: No such file or directory make: [Makefile:45: stress] Error 1 rm -f commands.so *.o gcc -C -Wall -I/home/pi/esp-hosted/esp_hosted_fg/host/linux/hostcontrol/python support/../../../../common/protobuf-c -I/home/pi/esp-hosted/esp_hosted_fg/host/l inux/host_control/python_support/../../../../common/include -I/home/pi/esp-hoste d/esp_hosted_fg/host/linux/host_control/python_support/../../../control_lib/incl ude -I/home/pi/esp-hosted/esp_hosted_fg/host/linux/host_control/python_support/. ./../../control_lib/src/include -I/home/pi/esp-hosted/esp_hosted_fg/host/linux/h ost_control/python_support/../../../virtual_serial_if/include -I/home/pi/esp-hos ted/esp_hosted_fg/host/linux/host_control/python_support/../../../components/inc lude -I/home/pi/esp-hosted/esp_hosted_fg/host/linux/host_control/python_support/ ../../port/include -I. /home/pi/esp-hosted/esp_hosted_fg/host/linux/host_control /python_support/../../../../common/protobuf-c/protobuf-c/protobuf-c.c /home/pi/e sp-hosted/esp_hosted_fg/host/linux/host_control/python_support/../../../../commo n/esp_hosted_config.pb-c.c /home/pi/esp-hosted/esp_hosted_fg/host/linux/host_con trol/python_support/../../../control_lib/src/ctrl_core.c /home/pi/esp-hosted/esp _hosted_fg/host/linux/host_control/python_support/../../../controllib/src/ctrl api.c /home/pi/esp-hosted/esp_hosted_fg/host/linux/host_control/python_support/. ./../../virtual_serial_if/src/serial_if.c /home/pi/esp-hosted/esp_hosted_fg/host /linux/host_control/python_support/../../../components/src/esp_queue.c /home/pi/ esp-hosted/esp_hosted_fg/host/linux/host_control/python_support/../../port/src/p latform_wrapper.c -lrt -lpthread -o commands.so -shared -fPIC gcc: error: /home/pi/esp-hosted/esp_hosted_fg/host/linux/host_control/python_sup port/../../../../common/protobuf-c/protobuf-c/protobuf-c.c: No such file or dire ctory make: ** [Makefile:37: commands.so] Error 1 rm -rf .o sdio/.o spi/.o *.ko make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- -C /lib/modules/5.10.1 03-v7+/build M=/home/pi/esp-hosted/esp_hosted_fg/host/linux/host_driver/esp32 cl ean make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule . make[1]: Entering directory '/usr/src/linux-headers-5.10.103-v7+' make[1]: Leaving directory '/usr/src/linux-headers-5.10.103-v7+' make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- -C /lib/modules/5.10.1 03-v7+/build M=/home/pi/esp-hosted/esp_hosted_fg/host/linux/host_driver/esp32 mo dules make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule . make[1]: Entering directory '/usr/src/linux-headers-5.10.103-v7+' CC [M] /home/pi/esp-hosted/esp_hosted_fg/host/linux/host_driver/esp32/esp_bt. o CC [M] /home/pi/esp-hosted/esp_hosted_fg/host/linux/host_driver/esp32/main.o CC [M] /home/pi/esp-hosted/esp_hosted_fg/host/linux/host_driver/esp32/esp_sta ts.o CC [M] /home/pi/esp-hosted/esp_hosted_fg/host/linux/host_driver/esp32/spi/esp _spi.o CC [M] /home/pi/esp-hosted/esp_hosted_fg/host/linux/host_driver/esp32/esp_ser ial.o CC [M] /home/pi/esp-hosted/esp_hosted_fg/host/linux/host_driver/esp32/esp_rb. o LD [M] /home/pi/esp-hosted/esp_hosted_fg/host/linux/host_driver/esp32/esp32_s pi.o MODPOST /home/pi/esp-hosted/esp_hosted_fg/host/linux/host_driver/esp32/Module. symvers CC [M] /home/pi/esp-hosted/esp_hosted_fg/host/linux/host_driver/esp32/esp32_s pi.mod.o LD [M] /home/pi/esp-hosted/esp_hosted_fg/host/linux/host_driver/esp32/esp32_s pi.ko make[1]: Leaving directory '/usr/src/linux-headers-5.10.103-v7+' esp32 module inserted /dev/esps0 device created RPi init successfully completed pi@retropie:~/esp-hosted/esp_hosted_fg/host/linux/host_control $ ifconfig eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.0.0.10 netmask 255.255.255.0 broadcast 10.0.0.255 inet6 fe80::7bbb:b98e:4584:17f6 prefixlen 64 scopeid 0x20 ether b8:27:eb:d2:9f:df txqueuelen 1000 (Ethernet) RX packets 1318 bytes 117640 (114.8 KiB) RX errors 0 dropped 1 overruns 0 frame 0 TX packets 620 bytes 101686 (99.3 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 loop txqueuelen 1000 (Local Loopback) RX packets 4 bytes 240 (240.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 4 bytes 240 (240.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

pi@retropie~/esp-hosted/esp_hosted_fg/host/linux/host_control $ hciconfig pi@retropie~/esp-hosted/esp_hosted_fg/host/linux/host_control $ ls /dev/spidev* /dev/spidev0.1 pi@retropie:~/esp-hosted/esp_hosted_fg/host/linux/host_control $ `

Even though it says that RPi init successfully completed I don't see WiFi or Bluetooth. I don't understand why ESP Hosted-NG doesn't recognize the ESP32. Oh, and one very bad thing, my other SPI slave (the one connected to CE0) is a 3,2 inch ili9341 display. It uses the GitHub driver fbcp-ili9341 and it says to disable dtparam=spi=on and with dtparam=spi=on on the display does not work. Does this mean there is no chance for this to work?

mantriyogesh commented 1 year ago

gcc: error: /home/pi/esp-hosted/esp_hosted_fg/host/linux/host_control/python_sup port/../../../../common/protobuf-c/protobuf-c/protobuf-c.c: No such file or dire ctory Screenshot_20230223-075545904

mantriyogesh commented 1 year ago

Question regarding dtparam=spi=on, The raspberry pi documentation says to enqble it to use spi. Check: https://www.raspberrypi-spy.co.uk/2014/08/enabling-the-spi-interface-on-the-raspberry-pi/

If you are getting /dev/spidev0.1 listed, with or without /dev/spidev0.1 line , it should be okay.

mantriyogesh commented 1 year ago

As NG driver works on cs0, it should just work with cs1, unless system doesn't expose/configured cs1.

As you have another device working with cs0, can just you try to use cs1 with that, if that passes?

MooseGmaing commented 1 year ago

I updated the repo and turned SPI back on and it still doesn't work. I unfortunately can't use CS1 with my other device, as it is a TFT display using the fbcp-ili9341 GitHub driver and it doesn't support CS1. I opened an issue there for adding CS1 support but they haven't responded yet.

mantriyogesh commented 1 year ago

No worries. Let us go step by step. Now you are on FG or NG?

MooseGmaing commented 1 year ago

Hello, I reinstalled ESP Hosted NG and finished the SPI-only tutorial for the ESP32-C3. I ran the script and it says

esp32 module inserted, ESP32 host init successfully completed

But when I run ifconfig and hciconfig I don't see any ESP device. This is what I get in the dmesg log:

esp_reset, ESP32: Triggering ESP reset. [ 131.750606] ESP32 peripheral is registered to SPI bus [0],chip select [0], SPI Clock [10] [ 302.030957] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/spi@7e204000/spidev@0/status

I have no idea why it doesn't look like the example log.

mantriyogesh commented 1 year ago

The same worked earlier.. I mean c3 with ng, with ce0. Am I correct? Any changes you had done from earlier working setup? Like code changes, config changes?

MooseGmaing commented 1 year ago

Yes, you're right this is exactly what I had earlier. The only thing I changed is I installed the driver, and that's when it started to stop working. I removed it but as you can see it doesn't work. I think I'll use a new OS image and start from zero.

mantriyogesh commented 1 year ago

I suppose you might already have taken care, to revert the chip select and config changes.

mantriyogesh commented 1 year ago

If you can send me that logs,I can check if anything wrong.

Host - /var/log/kern.log, /boot/config.txt, commands (run) log Esp - minicom

Can you try to comment two lines, https://github.com/espressif/esp-hosted/blob/fe0b10584417629908cee8141699c2f35ea05a25/esp_hosted_ng/host/spi/esp_spi.c#L216-L217

And try again? Please get the logs, will be able to understand something. I still think you might not need to re-flash the os.

MooseGmaing commented 1 year ago

This is the kern.log:

Feb 24 16:55:07 retropie kernel: [ 61.435651] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/spi@7e204000/spidev@0/status Feb 24 16:55:08 retropie kernel: [ 61.689992] Bluetooth: Core ver 2.22 Feb 24 16:55:08 retropie kernel: [ 61.690201] NET: Registered protocol family 31 Feb 24 16:55:08 retropie kernel: [ 61.690217] Bluetooth: HCI device and connection manager initialized Feb 24 16:55:08 retropie kernel: [ 61.690262] Bluetooth: HCI socket layer initialized Feb 24 16:55:08 retropie kernel: [ 61.690283] Bluetooth: L2CAP socket layer initialized Feb 24 16:55:08 retropie kernel: [ 61.690336] Bluetooth: SCO socket layer initialized Feb 24 16:56:18 retropie kernel: [ 132.243851] esp32_spi: loading out-of-tree module taints kernel. Feb 24 16:56:18 retropie kernel: [ 132.248712] esp_reset, ESP32: Triggering ESP reset. Feb 24 16:56:18 retropie kernel: [ 132.469666] ESP32 peripheral is registered to SPI bus [0],chip select [0], SPI Clock [10]

Here is my config.txt:

For more options and information see

http://rpf.io/configtxt

Some settings may impact device functionality. See link above for details

uncomment if you get no picture on HDMI for a default "safe" mode

hdmi_safe=1

uncomment this if your display has a black border of unused pixels visible

and your display can output without overscan

disable_overscan=1

uncomment the following to adjust overscan. Use positive numbers if console

goes off screen, and negative if there is too much border

overscan_left=16

overscan_right=16

overscan_top=16

overscan_bottom=16

uncomment to force a console size. By default it will be display's size minus

overscan.

framebuffer_width=1280

framebuffer_height=720

uncomment if hdmi display is not detected and composite is being output

hdmi_force_hotplug=1

uncomment to force a specific HDMI mode (this will force VGA)

hdmi_group=1

hdmi_mode=1

uncomment to force a HDMI mode rather than DVI. This can make audio work in

DMT (computer monitor) modes

hdmi_drive=2

uncomment to increase signal to HDMI, if you have interference, blanking, or

no display

config_hdmi_boost=4

uncomment for composite PAL

sdtv_mode=2

uncomment to overclock the arm. 700 MHz is the default.

arm_freq=800

core_freq=250 core_freq_min=250

Uncomment some or all of these to enable the optional hardware interfaces

dtparam=i2c_arm=on

dtparam=i2s=on

dtparam=spi=on

Uncomment this to enable infrared communication.

dtoverlay=gpio-ir,gpio_pin=17

dtoverlay=gpio-ir-tx,gpio_pin=18

Additional overlays and parameters are documented /boot/overlays/README

Enable audio (loads snd_bcm2835)

dtparam=audio=on

[pi4]

Enable DRM VC4 V3D driver on top of the dispmanx display stack

dtoverlay=vc4-fkms-v3d max_framebuffers=2

[all]

dtoverlay=vc4-fkms-v3d

gpu_mem_256=128 gpu_mem_512=256 gpu_mem_1024=256 overscan_scale=1

I unfortunately can't give you the ESP minicom log as I am using a ESP32-C3-32S (basically WROOM) this means I don't have a USB port.

mantriyogesh commented 1 year ago

Have you used resetpin? What is the command run log?

MooseGmaing commented 1 year ago

I have it connected to GPIO/BCM 6 on the Raspberry Pi and to EN(Enable/Reset) on the ESP. Could you specify what a command run log is and how to get it?

mantriyogesh commented 1 year ago

It's okay, i got it. $ git diff # in esp-hosted folder

The GPIO connection is moved back to CE0? (and all connections are firm?) also can you please reboot and try again (if you had changed /boot/config.txt, reboot is needed to take changes in place)

MooseGmaing commented 1 year ago

When I run git diff # it doesn't show me anything. Yes, I have the GPIO on CE0 and all connections are firm and the ESP is hot so it is getting power. After reboot still no difference.

mantriyogesh commented 1 year ago

Can you re-flash the ESP NG binary ? Are you using 1.0.2 ESP firmware and host is checked out at https://github.com/espressif/esp-hosted/commit/29208b6c156be06dfd90dadc6dd43acd4d98d748 or later?

Actually ESP32 log will be much useful. You don't need USB as such. just find out which device (device for example, /dev/ttyUSB0) is ESP32 exposed to (from the same machine, where you were flashing ESP32) & run minicom -D /dev/ttyUSB0

command log I was referring to all the commands you had run (like bash rpi_init.sh) and output of those commands

MooseGmaing commented 1 year ago

61bUn3gmiLL _AC_SL1001_ This is what I was using to flash my ESP, I don't have it connected now. I have all the latest firmware.

mantriyogesh commented 1 year ago

Okay. I was just reconfirming that it has NG firmware. FG firmware and NG host are not compatible (and vice versa).

MooseGmaing commented 1 year ago

Yes, It has NG firmware.

mantriyogesh commented 1 year ago

Now, I think left out with https://github.com/espressif/esp-hosted/issues/207#issuecomment-1443912393

MooseGmaing commented 1 year ago

I found this in the dmesg log:

OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/spi@7e204000/spidev@0/status

mantriyogesh commented 1 year ago

Not a prob.

MooseGmaing commented 1 year ago

Ok, so what is the problem here?

mantriyogesh commented 1 year ago

Oh, I am not sure.

Can you please send setup image?

There are two ways, I will go in debug mode and give you binaries to flash (long cut), but even in this case I would need esp logs (otherwise there is no way to cross check message transfer) Other way, As you had it working first time, still reflashing would be helpful. Including flashing esp, disconnect hw connection and reconnect.

MooseGmaing commented 1 year ago

My setup image is the latest RetroPie image for the Raspberry Pi 2B

mantriyogesh commented 1 year ago

OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/spi@7e204000/spidev@0/status will come in positive case also.

mantriyogesh commented 1 year ago

Well, we had tested on RPi 3 & 4. But that should not be problem.

mantriyogesh commented 1 year ago

By Image I meant the picture of setup

MooseGmaing commented 1 year ago

I have a new OS, so I don't have that driver and everything is just like it was when it worked.

mantriyogesh commented 1 year ago

So now you have CE0 working?

MooseGmaing commented 1 year ago

No, maybe the ESP32 is broken somehow. Perhaps something is shorted. I'll try re-flashing the binaries.

mantriyogesh commented 1 year ago

Hello @MooseGmaing

Firstly, Apologies, I couldn't try beforehand due to other priority work items. Secondly, I got it worked myself on Raspberry Pi 4 with spi bus 0 chip select 1.

Changes:

  1. Hardware connection: Change the connections as: Screenshot 2023-03-02 at 4 02 35 PM

  2. Code changes:

    diff --git a/esp_hosted_fg/host/linux/host_control/spidev_disabler.dts b/esp_hosted_fg/host/linux/host_control/spidev_disabler.dts
    index 664ecb9..b6de380 100644
    --- a/esp_hosted_fg/host/linux/host_control/spidev_disabler.dts
    +++ b/esp_hosted_fg/host/linux/host_control/spidev_disabler.dts
    @@ -5,7 +5,7 @@
     compatible = "brcm,bcm2708";
    
     fragment@0 {
    -        target = <&spidev0>;
    +        target = <&spidev1>;
    
         __overlay__ {
             status = "disabled";
    diff --git a/esp_hosted_fg/host/linux/host_driver/esp32/spi/esp_spi.c b/esp_hosted_fg/host/linux/host_driver/esp32/spi/esp_spi.c
    index a320a09..9293a7e 100644
    --- a/esp_hosted_fg/host/linux/host_driver/esp32/spi/esp_spi.c
    +++ b/esp_hosted_fg/host/linux/host_driver/esp32/spi/esp_spi.c
    @@ -366,7 +366,7 @@ static int spi_dev_init(int spi_clk_mhz)
        esp_board.mode = SPI_MODE_2;
        esp_board.max_speed_hz = spi_clk_mhz * NUMBER_1M;
        esp_board.bus_num = 0;
    -       esp_board.chip_select = 0;
    +       esp_board.chip_select = 1;
    
        master = spi_busnum_to_master(esp_board.bus_num);
        if (!master) {
  3. /boot/config used:

    $ cat /boot/config.txt
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=2
#hdmi_mode=85

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

[all]
#dtoverlay=vc4-fkms-v3d

##dtoverlay=sdio,poll_once=off,sdio_overclock=5,max-frequency=5,overclock_50=5
##dtoverlay=sdio,poll_once=off,max-frequency=10000000,sdio_overclock=10
#force_turbo=1

#dtoverlay=sdio,poll_once=off
#dtoverlay=disable-bt

dtparam=spi=on
dtoverlay=disable-bt
core_freq=250
core_freq_min=250

enable_uart=1
dtoverlay=disable-bt

  1. cmds run & output log:
    $ commands run
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $ vim
c_support/            LICENSE               python_support/       rpi_init.sh           spidev_disabler.dtbo  spidev_disabler.dts
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $ vim spidev_disabler.dt^C
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $ ls /dev/spidev0.1 ^C
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $ vim spidev_disabler.dts
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $ vim ../host_driver/esp32/spi/esp_spi.c
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $
(reverse-i-search)`bash': ^Csh rpi_init.sh spi
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $ vim spidev_disabler.dt
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $ vim spidev_disabler.dts
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $ bash rpi_init.sh spi
Building for spi protocol
rm -f *.out *.o
gcc -C -Wall --sysroot= -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../../common/protobuf-c -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../../common/include -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../control_lib/include -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../control_lib/src/include -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../virtual_serial_if/include -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../components/include -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../port/include -I. /home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../../common/protobuf-c/protobuf-c/protobuf-c.c /home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../../common/esp_hosted_config.pb-c.c /home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../control_lib/src/ctrl_core.c /home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../control_lib/src/ctrl_api.c /home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../virtual_serial_if/src/serial_if.c /home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../components/src/esp_queue.c /home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../port/src/platform_wrapper.c ./test_utils.c -lpthread -lrt test.c -o test.out
gcc -C -Wall --sysroot= -fsanitize=undefined  -fsanitize-address-use-after-scope -fsanitize-undefined-trap-on-error  -fstack-protector-all -fstack-check -fsanitize=address -fsanitize=pointer-compare -fno-omit-frame-pointer -static-libasan -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../../common/protobuf-c -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../../common/include -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../control_lib/include -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../control_lib/src/include -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../virtual_serial_if/include -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../components/include -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../port/include -I. /home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../../common/protobuf-c/protobuf-c/protobuf-c.c /home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../../common/esp_hosted_config.pb-c.c /home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../control_lib/src/ctrl_core.c /home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../control_lib/src/ctrl_api.c /home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../virtual_serial_if/src/serial_if.c /home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../components/src/esp_queue.c /home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../port/src/platform_wrapper.c ./test_utils.c -lpthread -lrt stress.c -o stress.out -ggdb3 -g
rm -f commands.so *.o
gcc -C -Wall -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/python_support/../../../../common/protobuf-c -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/python_support/../../../../common/include -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/python_support/../../../control_lib/include -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/python_support/../../../control_lib/src/include -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/python_support/../../../virtual_serial_if/include -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/python_support/../../../components/include -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/python_support/../../port/include -I. /home/pi/h3/esp_hosted_fg/host/linux/host_control/python_support/../../../../common/protobuf-c/protobuf-c/protobuf-c.c /home/pi/h3/esp_hosted_fg/host/linux/host_control/python_support/../../../../common/esp_hosted_config.pb-c.c /home/pi/h3/esp_hosted_fg/host/linux/host_control/python_support/../../../control_lib/src/ctrl_core.c /home/pi/h3/esp_hosted_fg/host/linux/host_control/python_support/../../../control_lib/src/ctrl_api.c /home/pi/h3/esp_hosted_fg/host/linux/host_control/python_support/../../../virtual_serial_if/src/serial_if.c /home/pi/h3/esp_hosted_fg/host/linux/host_control/python_support/../../../components/src/esp_queue.c /home/pi/h3/esp_hosted_fg/host/linux/host_control/python_support/../../port/src/platform_wrapper.c -lrt -lpthread -o commands.so -shared -fPIC
rm -rf *.o sdio/*.o spi/*.o *.ko
make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- -C /lib/modules/5.10.103-v7l+/build M=/home/pi/h3/esp_hosted_fg/host/linux/host_driver/esp32 clean
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: Entering directory '/usr/src/linux-headers-5.10.103-v7l+'
  CLEAN   /home/pi/h3/esp_hosted_fg/host/linux/host_driver/esp32/Module.symvers
make[1]: Leaving directory '/usr/src/linux-headers-5.10.103-v7l+'
make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- -C /lib/modules/5.10.103-v7l+/build M=/home/pi/h3/esp_hosted_fg/host/linux/host_driver/esp32 modules
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: Entering directory '/usr/src/linux-headers-5.10.103-v7l+'
  CC [M]  /home/pi/h3/esp_hosted_fg/host/linux/host_driver/esp32/esp_bt.o
  CC [M]  /home/pi/h3/esp_hosted_fg/host/linux/host_driver/esp32/main.o
  CC [M]  /home/pi/h3/esp_hosted_fg/host/linux/host_driver/esp32/esp_stats.o
  CC [M]  /home/pi/h3/esp_hosted_fg/host/linux/host_driver/esp32/spi/esp_spi.o
  CC [M]  /home/pi/h3/esp_hosted_fg/host/linux/host_driver/esp32/esp_serial.o
  CC [M]  /home/pi/h3/esp_hosted_fg/host/linux/host_driver/esp32/esp_rb.o
  LD [M]  /home/pi/h3/esp_hosted_fg/host/linux/host_driver/esp32/esp32_spi.o
  MODPOST /home/pi/h3/esp_hosted_fg/host/linux/host_driver/esp32/Module.symvers
  CC [M]  /home/pi/h3/esp_hosted_fg/host/linux/host_driver/esp32/esp32_spi.mod.o
  LD [M]  /home/pi/h3/esp_hosted_fg/host/linux/host_driver/esp32/esp32_spi.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.10.103-v7l+'
esp32 module inserted
/dev/esps0 device created
RPi init successfully completed
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $ dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.103-v7l+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1529 SMP Tue Mar 8 12:24:00 GMT 2022
[    0.000000] CPU: ARMv7 Processor [410fd083] revision 3 (ARMv7), cr=30c5383d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000] OF: fdt: Machine model: Raspberry Pi 4 Model B Rev 1.1
[    0.000000] random: fast init done
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Reserved memory: created CMA memory pool at 0x000000001ac00000, size 320 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x000000002fffffff]
[    0.000000]   Normal   empty
[    0.000000]   HighMem  [mem 0x0000000030000000-0x000000007fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000003b3fffff]
[    0.000000]   node   0: [mem 0x0000000040000000-0x000000007fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000007fffffff]
[    0.000000] On node 0 totalpages: 504832
[    0.000000]   DMA zone: 1728 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 196608 pages, LIFO batch:63
[    0.000000]   HighMem zone: 308224 pages, LIFO batch:63
[    0.000000] percpu: Embedded 20 pages/cpu s50828 r8192 d22900 u81920
[    0.000000] pcpu-alloc: s50828 r8192 d22900 u81920 alloc=20*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 503104
[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1  smsc95xx.macaddr=DC:A6:32:33:6D:7C vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=tty1 root=PARTUUID=c9650e41-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait net.ifnames=0 biosdevname=0 fbcon=scrollback:1024k
[    0.000000] Kernel parameter elevator= does not have any effect anymore.
               Please use sysfs to set IO scheduler for individual devices.
[    0.000000] Ignoring scrollback size option
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: mapped [mem 0x0000000015a00000-0x0000000019a00000] (64MB)
[    0.000000] Memory: 1587380K/2019328K available (10240K kernel code, 1366K rwdata, 3196K rodata, 2048K init, 882K bss, 104268K reserved, 327680K cma-reserved, 1232896K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 34355 entries in 101 pages
[    0.000000] ftrace: allocated 101 pages with 4 groups
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]  Rude variant of Tasks RCU enabled.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] random: get_random_bytes called from start_kernel+0x3c8/0x59c with crng_init=1
[    0.000008] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483647500ns
[    0.000035] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
[    0.000098] bcm2835: system timer (irq = 25)
[    0.000746] arch_timer: cp15 timer(s) running at 54.00MHz (phys).
[    0.000767] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xc743ce346, max_idle_ns: 440795203123 ns
[    0.000789] sched_clock: 56 bits at 54MHz, resolution 18ns, wraps every 4398046511102ns
[    0.000807] Switching to timer-based delay loop, resolution 18ns
[    0.001062] Console: colour dummy device 80x30
[    0.001834] printk: console [tty1] enabled
[    0.001902] Calibrating delay loop (skipped), value calculated using timer frequency.. 108.00 BogoMIPS (lpj=540000)
[    0.001957] pid_max: default: 32768 minimum: 301
[    0.002136] LSM: Security Framework initializing
[    0.002333] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.002378] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.003860] cgroup: Disabling memory control group subsystem
[    0.004107] CPU: Testing write buffer coherency: ok
[    0.004575] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.005791] Setting up static identity map for 0x200000 - 0x20003c
[    0.006005] rcu: Hierarchical SRCU implementation.
[    0.006929] smp: Bringing up secondary CPUs ...
[    0.008126] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.009466] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.010755] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.010912] smp: Brought up 1 node, 4 CPUs
[    0.010959] SMP: Total of 4 processors activated (432.00 BogoMIPS).
[    0.010988] CPU: All CPU(s) started in HYP mode.
[    0.011015] CPU: Virtualization extensions available.
[    0.011876] devtmpfs: initialized
[    0.025972] VFP support v0.3: implementor 41 architecture 3 part 40 variant 8 rev 0
[    0.026234] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.026286] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.034459] pinctrl core: initialized pinctrl subsystem
[    0.035563] NET: Registered protocol family 16
[    0.039426] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[    0.040210] audit: initializing netlink subsys (disabled)
[    0.040480] audit: type=2000 audit(0.030:1): state=initialized audit_enabled=0 res=1
[    0.041108] thermal_sys: Registered thermal governor 'step_wise'
[    0.041859] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.041913] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.042322] Serial: AMBA PL011 UART driver
[    0.075592] bcm2835-mbox fe00b880.mailbox: mailbox enabled
[    0.090880] raspberrypi-firmware soc:firmware: Attached to firmware from 2021-12-01T15:01:54, variant start
[    0.100894] raspberrypi-firmware soc:firmware: Firmware hash is 71bd3109023a0c8575585ba87cbb374d2eeb038f
[    0.141040] Kprobes globally optimized
[    0.146549] bcm2835-dma fe007000.dma: DMA legacy API manager, dmachans=0x1
[    0.150723] vgaarb: loaded
[    0.151279] SCSI subsystem initialized
[    0.151522] usbcore: registered new interface driver usbfs
[    0.151610] usbcore: registered new interface driver hub
[    0.151699] usbcore: registered new device driver usb
[    0.152055] usb_phy_generic phy: supply vcc not found, using dummy regulator
[    0.154033] clocksource: Switched to clocksource arch_sys_counter
[    1.100990] VFS: Disk quotas dquot_6.6.0
[    1.101106] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    1.101285] FS-Cache: Loaded
[    1.101505] CacheFiles: Loaded
[    1.112411] NET: Registered protocol family 2
[    1.112657] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    1.114298] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    1.114368] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    1.114453] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    1.114536] TCP: Hash tables configured (established 8192 bind 8192)
[    1.114708] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    1.114760] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    1.115026] NET: Registered protocol family 1
[    1.115766] RPC: Registered named UNIX socket transport module.
[    1.115800] RPC: Registered udp transport module.
[    1.115828] RPC: Registered tcp transport module.
[    1.115856] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.115893] PCI: CLS 0 bytes, default 64
[    1.119298] Initialise system trusted keyrings
[    1.119554] workingset: timestamp_bits=14 max_order=19 bucket_order=5
[    1.127868] zbud: loaded
[    1.129663] FS-Cache: Netfs 'nfs' registered for caching
[    1.130419] NFS: Registering the id_resolver key type
[    1.130496] Key type id_resolver registered
[    1.130525] Key type id_legacy registered
[    1.130691] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.130723] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    1.131780] Key type asymmetric registered
[    1.131812] Asymmetric key parser 'x509' registered
[    1.132018] bounce: pool size: 64 pages
[    1.132073] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    1.132304] io scheduler mq-deadline registered
[    1.132335] io scheduler kyber registered
[    1.136844] brcm-pcie fd500000.pcie: host bridge /scb/pcie@7d500000 ranges:
[    1.136897] brcm-pcie fd500000.pcie:   No bus range found for /scb/pcie@7d500000, using [bus 00-ff]
[    1.137012] brcm-pcie fd500000.pcie:      MEM 0x0600000000..0x063fffffff -> 0x00c0000000
[    1.137122] brcm-pcie fd500000.pcie:   IB MEM 0x0000000000..0x007fffffff -> 0x0400000000
[    1.196139] brcm-pcie fd500000.pcie: link up, 5.0 GT/s PCIe x1 (SSC)
[    1.196551] brcm-pcie fd500000.pcie: PCI host bridge to bus 0000:00
[    1.196590] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.196625] pci_bus 0000:00: root bus resource [mem 0x600000000-0x63fffffff] (bus address [0xc0000000-0xffffffff])
[    1.196738] pci 0000:00:00.0: [14e4:2711] type 01 class 0x060400
[    1.196996] pci 0000:00:00.0: PME# supported from D0 D3hot
[    1.200437] PCI: bus0: Fast back to back transfers disabled
[    1.200838] pci 0000:01:00.0: [1106:3483] type 00 class 0x0c0330
[    1.200983] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00000fff 64bit]
[    1.201433] pci 0000:01:00.0: PME# supported from D0 D3cold
[    1.204907] PCI: bus1: Fast back to back transfers disabled
[    1.205021] pci 0000:00:00.0: BAR 8: assigned [mem 0x600000000-0x6000fffff]
[    1.205063] pci 0000:01:00.0: BAR 0: assigned [mem 0x600000000-0x600000fff 64bit]
[    1.205164] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.205204] pci 0000:00:00.0:   bridge window [mem 0x600000000-0x6000fffff]
[    1.205626] pcieport 0000:00:00.0: enabling device (0140 -> 0142)
[    1.205858] pcieport 0000:00:00.0: PME: Signaling with IRQ 64
[    1.212129] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[    1.215205] iproc-rng200 fe104000.rng: hwrng registered
[    1.215533] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
[    1.216431] gpiomem-bcm2835 fe200000.gpiomem: Initialised: Registers at 0xfe200000
[    1.228633] brd: module loaded
[    1.240873] loop: module loaded
[    1.242631] Loading iSCSI transport class v2.0-870.
[    1.247585] bcmgenet fd580000.ethernet: GENET 5.0 EPHY: 0x0000
[    1.344198] unimac-mdio unimac-mdio.-19: Broadcom UniMAC MDIO bus
[    1.345398] usbcore: registered new interface driver r8152
[    1.345484] usbcore: registered new interface driver lan78xx
[    1.345562] usbcore: registered new interface driver smsc95xx
[    1.347209] xhci_hcd 0000:01:00.0: enabling device (0140 -> 0142)
[    1.347388] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    1.347438] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 1
[    1.350747] xhci_hcd 0000:01:00.0: hcc params 0x002841eb hci version 0x100 quirks 0x0000060000000890
[    1.352083] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[    1.352125] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.352162] usb usb1: Product: xHCI Host Controller
[    1.352193] usb usb1: Manufacturer: Linux 5.10.103-v7l+ xhci-hcd
[    1.352224] usb usb1: SerialNumber: 0000:01:00.0
[    1.352996] hub 1-0:1.0: USB hub found
[    1.353110] hub 1-0:1.0: 1 port detected
[    1.353794] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    1.353838] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[    1.353884] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
[    1.354489] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.10
[    1.354529] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.354564] usb usb2: Product: xHCI Host Controller
[    1.354594] usb usb2: Manufacturer: Linux 5.10.103-v7l+ xhci-hcd
[    1.354625] usb usb2: SerialNumber: 0000:01:00.0
[    1.355345] hub 2-0:1.0: USB hub found
[    1.355450] hub 2-0:1.0: 4 ports detected
[    1.357196] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    1.357525] dwc_otg: FIQ enabled
[    1.357539] dwc_otg: NAK holdoff enabled
[    1.357554] dwc_otg: FIQ split-transaction FSM enabled
[    1.357572] Module dwc_common_port init
[    1.358027] usbcore: registered new interface driver uas
[    1.358151] usbcore: registered new interface driver usb-storage
[    1.358366] mousedev: PS/2 mouse device common for all mice
[    1.360039] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[    1.363363] sdhci: Secure Digital Host Controller Interface driver
[    1.363396] sdhci: Copyright(c) Pierre Ossman
[    1.364149] mmc-bcm2835 fe300000.mmcnr: could not get clk, deferring probe
[    1.364806] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.368911] ledtrig-cpu: registered to indicate activity on CPUs
[    1.369275] hid: raw HID events driver (C) Jiri Kosina
[    1.369477] usbcore: registered new interface driver usbhid
[    1.369508] usbhid: USB HID core driver
[    1.375406] Initializing XFRM netlink socket
[    1.375468] NET: Registered protocol family 17
[    1.375606] Key type dns_resolver registered
[    1.376029] Registering SWP/SWPB emulation handler
[    1.376232] registered taskstats version 1
[    1.376273] Loading compiled-in X.509 certificates
[    1.377107] Key type ._fscrypt registered
[    1.377138] Key type .fscrypt registered
[    1.377166] Key type fscrypt-provisioning registered
[    1.388621] uart-pl011 fe201000.serial: there is not valid maps for state default
[    1.388897] uart-pl011 fe201000.serial: cts_event_workaround enabled
[    1.388987] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 36, base_baud = 0) is a PL011 rev2
[    1.395667] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver
[    1.396765] mmc-bcm2835 fe300000.mmcnr: mmc_debug:0 mmc_debug2:0
[    1.396800] mmc-bcm2835 fe300000.mmcnr: DMA channel allocated
[    1.427084] of_cfs_init
[    1.427365] of_cfs_init: OK
[    1.446761] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[    1.448479] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    1.450209] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    1.453270] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[    1.454985] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    1.462962] mmc0: SDHCI controller on fe340000.mmc [fe340000.mmc] using ADMA
[    1.463638] Waiting for root device PARTUUID=c9650e41-02...
[    1.528606] mmc1: new high speed SDIO card at address 0001
[    1.574126] mmc0: new ultra high speed DDR50 SDHC card at address 0001
[    1.575045] mmcblk0: mmc0:0001 SD 29.1 GiB
[    1.577219]  mmcblk0: p1 p2
[    1.613016] EXT4-fs (mmcblk0p2): INFO: recovery required on readonly filesystem
[    1.613061] EXT4-fs (mmcblk0p2): write access will be enabled during recovery
[    1.634077] usb 1-1: new high-speed USB device number 2 using xhci_hcd
[    1.816727] usb 1-1: New USB device found, idVendor=2109, idProduct=3431, bcdDevice= 4.21
[    1.816775] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    1.816809] usb 1-1: Product: USB2.0 Hub
[    1.818812] hub 1-1:1.0: USB hub found
[    1.819122] hub 1-1:1.0: 4 ports detected
[    2.633929] EXT4-fs (mmcblk0p2): recovery complete
[    2.647813] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    2.647913] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    2.653856] devtmpfs: mounted
[    2.664052] Freeing unused kernel memory: 2048K
[    2.664394] Run /sbin/init as init process
[    2.664423]   with arguments:
[    2.664437]     /sbin/init
[    2.664451]   with environment:
[    2.664466]     HOME=/
[    2.664480]     TERM=linux
[    2.664494]     biosdevname=0
[    3.157761] systemd[1]: System time before build time, advancing clock.
[    3.274439] NET: Registered protocol family 10
[    3.275886] Segment Routing with IPv6
[    3.357303] systemd[1]: systemd 241 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
[    3.358315] systemd[1]: Detected architecture arm.
[    3.449686] systemd[1]: Set hostname to <raspberrypi>.
[    4.393299] random: systemd: uninitialized urandom read (16 bytes read)
[    4.417044] random: systemd: uninitialized urandom read (16 bytes read)
[    4.420582] systemd[1]: Created slice system-systemd\x2dfsck.slice.
[    4.421278] random: systemd: uninitialized urandom read (16 bytes read)
[    4.421983] systemd[1]: Listening on fsck to fsckd communication Socket.
[    4.423308] systemd[1]: Listening on Journal Audit Socket.
[    4.424333] systemd[1]: Listening on udev Kernel Socket.
[    4.425844] systemd[1]: Created slice User and Session Slice.
[    4.426557] systemd[1]: Listening on initctl Compatibility Named Pipe.
[    4.428119] systemd[1]: Created slice system-getty.slice.
[    5.016190] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    5.119826] systemd-journald[131]: Received request to flush runtime journal from PID 1
[    5.875851] rpivid-mem feb00000.hevc-decoder: rpivid-hevcmem initialised: Registers at 0xfeb00000 length 0x00010000
[    5.879927] rpivid-mem feb10000.rpivid-local-intc: rpivid-intcmem initialised: Registers at 0xfeb10000 length 0x00001000
[    5.880735] rpivid-mem feb20000.h264-decoder: rpivid-h264mem initialised: Registers at 0xfeb20000 length 0x00010000
[    5.881444] rpivid-mem feb30000.vp9-decoder: rpivid-vp9mem initialised: Registers at 0xfeb30000 length 0x00010000
[    6.004256] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[    6.006428] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[    6.006482] [vc_sm_connected_init]: start
[    6.019444] [vc_sm_connected_init]: installed successfully
[    6.022732] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[    6.022741] mc: Linux media interface: v0.10
[    6.059479] bcm2835_audio bcm2835_audio: card created with 8 channels
[    6.064681] videodev: Linux video capture interface: v2.00
[    6.090296] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[    6.098955] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[    6.111266] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
[    6.132433] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[    6.151862] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video13
[    6.152418] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video14
[    6.152861] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video15
[    6.153490] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video16
[    6.153547] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[    6.153593] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[    6.153636] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[    6.153678] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[    6.153949] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp
[    6.183868] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[    6.183942] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[    6.187505] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[    6.187573] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[    6.199930] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[    6.200012] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[    6.202764] bcm2835-codec bcm2835-codec: Device registered as /dev/video18
[    6.202834] bcm2835-codec bcm2835-codec: Loaded V4L2 image_fx
[    6.311044] [drm] No displays found. Consider forcing hotplug if HDMI is attached
[    6.311213] vc4-drm gpu: bound fe600000.firmwarekms (ops vc4_fkms_ops [vc4])
[    6.315082] [drm] Initialized vc4 0.0.0 20140616 for gpu on minor 1
[    6.376164] [drm] Initialized v3d 1.0.0 20180419 for fec00000.v3d on minor 0
[    6.386389] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    6.429111] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    6.483896] brcmfmac: F1 signature read @0x18000000=0x15264345
[    6.513021] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    6.513945] usbcore: registered new interface driver brcmfmac
[    6.777733] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    6.777897] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    6.787874] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Jan  4 2021 19:56:29 version 7.45.229 (617f1f5 CY) FWID 01-2dbd9d2e
[    8.439354] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
[    8.449370] bcmgenet fd580000.ethernet: configuring instance for external RGMII (RX delay)
[    8.450066] bcmgenet fd580000.ethernet eth0: Link is Down
[    8.837150] random: crng init done
[    8.837196] random: 7 urandom warning(s) missed due to ratelimiting
[    9.854619] Adding 102396k swap on /var/swap.  Priority:-2 extents:1 across:102396k SSFS
[   12.456099] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   12.634322] bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   12.634403] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   20.040806] fuse: init (API version 7.32)
[   22.874223] Under-voltage detected! (0x00050005)
[   27.034079] Voltage normalised (0x00000000)
[  145.562195] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/spi@7e204000/spidev@0/status
[  145.746233] Bluetooth: Core ver 2.22
[  145.746325] NET: Registered protocol family 31
[  145.746338] Bluetooth: HCI device and connection manager initialized
[  145.746362] Bluetooth: HCI socket layer initialized
[  145.746378] Bluetooth: L2CAP socket layer initialized
[  145.746400] Bluetooth: SCO socket layer initialized
[  174.013439] esp32_spi: loading out-of-tree module taints kernel.
[  174.014505] esp_reset, ESP32: Resetpin of Host is 6
[  174.014735] esp_reset, ESP32: Triggering ESP reset.
[  174.015163] ESP32 peripheral is registered to SPI bus [0],chip select [0], SPI Clock [10]
[  174.586721]
               Received INIT event from ESP32 peripheral
[  174.586730] EVENT: 2
[  174.586757] EVENT: 1
[  174.586768] ESP Reconfigure SPI CLK to 30 MHz
[  174.804729] ESP32 peripheral is registered to SPI bus [0],chip select [0], SPI Clock [30]
[  175.024445] EVENT: 0
[  175.024482] ESP peripheral capabilities: 0xe8
[  175.244878] EVENT: 3
[  175.583199] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[  175.583222] Bluetooth: BNEP filters: protocol multicast
[  175.583242] Bluetooth: BNEP socket layer initialized
[  280.344672] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/spi@7e204000/spidev@1/status
[  306.778019] esp_reset, ESP32: Resetpin of Host is 6
[  306.778245] esp_reset, ESP32: Triggering ESP reset.
[  306.778665] ESP32 peripheral is registered to SPI bus [0],chip select [1], SPI Clock [10]
[  307.350070]
               Received INIT event from ESP32 peripheral
[  307.350080] EVENT: 2
[  307.350107] EVENT: 1
[  307.350118] ESP Reconfigure SPI CLK to 30 MHz
[  307.567573] ESP32 peripheral is registered to SPI bus [0],chip select [1], SPI Clock [30]
[  307.787045] EVENT: 0
[  307.787083] ESP peripheral capabilities: 0xe8
[  308.007443] EVENT: 3
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $ dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.103-v7l+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1529 SMP Tue Mar 8 12:24:00 GMT 2022
[    0.000000] CPU: ARMv7 Processor [410fd083] revision 3 (ARMv7), cr=30c5383d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000] OF: fdt: Machine model: Raspberry Pi 4 Model B Rev 1.1
[    0.000000] random: fast init done
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Reserved memory: created CMA memory pool at 0x000000001ac00000, size 320 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x000000002fffffff]
[    0.000000]   Normal   empty
[    0.000000]   HighMem  [mem 0x0000000030000000-0x000000007fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000003b3fffff]
[    0.000000]   node   0: [mem 0x0000000040000000-0x000000007fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000007fffffff]
[    0.000000] On node 0 totalpages: 504832
[    0.000000]   DMA zone: 1728 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 196608 pages, LIFO batch:63
[    0.000000]   HighMem zone: 308224 pages, LIFO batch:63
[    0.000000] percpu: Embedded 20 pages/cpu s50828 r8192 d22900 u81920
[    0.000000] pcpu-alloc: s50828 r8192 d22900 u81920 alloc=20*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 503104
[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1  smsc95xx.macaddr=DC:A6:32:33:6D:7C vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=tty1 root=PARTUUID=c9650e41-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait net.ifnames=0 biosdevname=0 fbcon=scrollback:1024k
[    0.000000] Kernel parameter elevator= does not have any effect anymore.
               Please use sysfs to set IO scheduler for individual devices.
[    0.000000] Ignoring scrollback size option
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: mapped [mem 0x0000000015a00000-0x0000000019a00000] (64MB)
[    0.000000] Memory: 1587380K/2019328K available (10240K kernel code, 1366K rwdata, 3196K rodata, 2048K init, 882K bss, 104268K reserved, 327680K cma-reserved, 1232896K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 34355 entries in 101 pages
[    0.000000] ftrace: allocated 101 pages with 4 groups
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]  Rude variant of Tasks RCU enabled.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] random: get_random_bytes called from start_kernel+0x3c8/0x59c with crng_init=1
[    0.000008] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483647500ns
[    0.000035] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
[    0.000098] bcm2835: system timer (irq = 25)
[    0.000746] arch_timer: cp15 timer(s) running at 54.00MHz (phys).
[    0.000767] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xc743ce346, max_idle_ns: 440795203123 ns
[    0.000789] sched_clock: 56 bits at 54MHz, resolution 18ns, wraps every 4398046511102ns
[    0.000807] Switching to timer-based delay loop, resolution 18ns
[    0.001062] Console: colour dummy device 80x30
[    0.001834] printk: console [tty1] enabled
[    0.001902] Calibrating delay loop (skipped), value calculated using timer frequency.. 108.00 BogoMIPS (lpj=540000)
[    0.001957] pid_max: default: 32768 minimum: 301
[    0.002136] LSM: Security Framework initializing
[    0.002333] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.002378] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.003860] cgroup: Disabling memory control group subsystem
[    0.004107] CPU: Testing write buffer coherency: ok
[    0.004575] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.005791] Setting up static identity map for 0x200000 - 0x20003c
[    0.006005] rcu: Hierarchical SRCU implementation.
[    0.006929] smp: Bringing up secondary CPUs ...
[    0.008126] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.009466] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.010755] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.010912] smp: Brought up 1 node, 4 CPUs
[    0.010959] SMP: Total of 4 processors activated (432.00 BogoMIPS).
[    0.010988] CPU: All CPU(s) started in HYP mode.
[    0.011015] CPU: Virtualization extensions available.
[    0.011876] devtmpfs: initialized
[    0.025972] VFP support v0.3: implementor 41 architecture 3 part 40 variant 8 rev 0
[    0.026234] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.026286] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.034459] pinctrl core: initialized pinctrl subsystem
[    0.035563] NET: Registered protocol family 16
[    0.039426] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[    0.040210] audit: initializing netlink subsys (disabled)
[    0.040480] audit: type=2000 audit(0.030:1): state=initialized audit_enabled=0 res=1
[    0.041108] thermal_sys: Registered thermal governor 'step_wise'
[    0.041859] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.041913] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.042322] Serial: AMBA PL011 UART driver
[    0.075592] bcm2835-mbox fe00b880.mailbox: mailbox enabled
[    0.090880] raspberrypi-firmware soc:firmware: Attached to firmware from 2021-12-01T15:01:54, variant start
[    0.100894] raspberrypi-firmware soc:firmware: Firmware hash is 71bd3109023a0c8575585ba87cbb374d2eeb038f
[    0.141040] Kprobes globally optimized
[    0.146549] bcm2835-dma fe007000.dma: DMA legacy API manager, dmachans=0x1
[    0.150723] vgaarb: loaded
[    0.151279] SCSI subsystem initialized
[    0.151522] usbcore: registered new interface driver usbfs
[    0.151610] usbcore: registered new interface driver hub
[    0.151699] usbcore: registered new device driver usb
[    0.152055] usb_phy_generic phy: supply vcc not found, using dummy regulator
[    0.154033] clocksource: Switched to clocksource arch_sys_counter
[    1.100990] VFS: Disk quotas dquot_6.6.0
[    1.101106] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    1.101285] FS-Cache: Loaded
[    1.101505] CacheFiles: Loaded
[    1.112411] NET: Registered protocol family 2
[    1.112657] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    1.114298] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    1.114368] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    1.114453] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    1.114536] TCP: Hash tables configured (established 8192 bind 8192)
[    1.114708] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    1.114760] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    1.115026] NET: Registered protocol family 1
[    1.115766] RPC: Registered named UNIX socket transport module.
[    1.115800] RPC: Registered udp transport module.
[    1.115828] RPC: Registered tcp transport module.
[    1.115856] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.115893] PCI: CLS 0 bytes, default 64
[    1.119298] Initialise system trusted keyrings
[    1.119554] workingset: timestamp_bits=14 max_order=19 bucket_order=5
[    1.127868] zbud: loaded
[    1.129663] FS-Cache: Netfs 'nfs' registered for caching
[    1.130419] NFS: Registering the id_resolver key type
[    1.130496] Key type id_resolver registered
[    1.130525] Key type id_legacy registered
[    1.130691] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.130723] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    1.131780] Key type asymmetric registered
[    1.131812] Asymmetric key parser 'x509' registered
[    1.132018] bounce: pool size: 64 pages
[    1.132073] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    1.132304] io scheduler mq-deadline registered
[    1.132335] io scheduler kyber registered
[    1.136844] brcm-pcie fd500000.pcie: host bridge /scb/pcie@7d500000 ranges:
[    1.136897] brcm-pcie fd500000.pcie:   No bus range found for /scb/pcie@7d500000, using [bus 00-ff]
[    1.137012] brcm-pcie fd500000.pcie:      MEM 0x0600000000..0x063fffffff -> 0x00c0000000
[    1.137122] brcm-pcie fd500000.pcie:   IB MEM 0x0000000000..0x007fffffff -> 0x0400000000
[    1.196139] brcm-pcie fd500000.pcie: link up, 5.0 GT/s PCIe x1 (SSC)
[    1.196551] brcm-pcie fd500000.pcie: PCI host bridge to bus 0000:00
[    1.196590] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.196625] pci_bus 0000:00: root bus resource [mem 0x600000000-0x63fffffff] (bus address [0xc0000000-0xffffffff])
[    1.196738] pci 0000:00:00.0: [14e4:2711] type 01 class 0x060400
[    1.196996] pci 0000:00:00.0: PME# supported from D0 D3hot
[    1.200437] PCI: bus0: Fast back to back transfers disabled
[    1.200838] pci 0000:01:00.0: [1106:3483] type 00 class 0x0c0330
[    1.200983] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00000fff 64bit]
[    1.201433] pci 0000:01:00.0: PME# supported from D0 D3cold
[    1.204907] PCI: bus1: Fast back to back transfers disabled
[    1.205021] pci 0000:00:00.0: BAR 8: assigned [mem 0x600000000-0x6000fffff]
[    1.205063] pci 0000:01:00.0: BAR 0: assigned [mem 0x600000000-0x600000fff 64bit]
[    1.205164] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.205204] pci 0000:00:00.0:   bridge window [mem 0x600000000-0x6000fffff]
[    1.205626] pcieport 0000:00:00.0: enabling device (0140 -> 0142)
[    1.205858] pcieport 0000:00:00.0: PME: Signaling with IRQ 64
[    1.212129] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[    1.215205] iproc-rng200 fe104000.rng: hwrng registered
[    1.215533] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
[    1.216431] gpiomem-bcm2835 fe200000.gpiomem: Initialised: Registers at 0xfe200000
[    1.228633] brd: module loaded
[    1.240873] loop: module loaded
[    1.242631] Loading iSCSI transport class v2.0-870.
[    1.247585] bcmgenet fd580000.ethernet: GENET 5.0 EPHY: 0x0000
[    1.344198] unimac-mdio unimac-mdio.-19: Broadcom UniMAC MDIO bus
[    1.345398] usbcore: registered new interface driver r8152
[    1.345484] usbcore: registered new interface driver lan78xx
[    1.345562] usbcore: registered new interface driver smsc95xx
[    1.347209] xhci_hcd 0000:01:00.0: enabling device (0140 -> 0142)
[    1.347388] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    1.347438] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 1
[    1.350747] xhci_hcd 0000:01:00.0: hcc params 0x002841eb hci version 0x100 quirks 0x0000060000000890
[    1.352083] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[    1.352125] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.352162] usb usb1: Product: xHCI Host Controller
[    1.352193] usb usb1: Manufacturer: Linux 5.10.103-v7l+ xhci-hcd
[    1.352224] usb usb1: SerialNumber: 0000:01:00.0
[    1.352996] hub 1-0:1.0: USB hub found
[    1.353110] hub 1-0:1.0: 1 port detected
[    1.353794] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    1.353838] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[    1.353884] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
[    1.354489] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.10
[    1.354529] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.354564] usb usb2: Product: xHCI Host Controller
[    1.354594] usb usb2: Manufacturer: Linux 5.10.103-v7l+ xhci-hcd
[    1.354625] usb usb2: SerialNumber: 0000:01:00.0
[    1.355345] hub 2-0:1.0: USB hub found
[    1.355450] hub 2-0:1.0: 4 ports detected
[    1.357196] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    1.357525] dwc_otg: FIQ enabled
[    1.357539] dwc_otg: NAK holdoff enabled
[    1.357554] dwc_otg: FIQ split-transaction FSM enabled
[    1.357572] Module dwc_common_port init
[    1.358027] usbcore: registered new interface driver uas
[    1.358151] usbcore: registered new interface driver usb-storage
[    1.358366] mousedev: PS/2 mouse device common for all mice
[    1.360039] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[    1.363363] sdhci: Secure Digital Host Controller Interface driver
[    1.363396] sdhci: Copyright(c) Pierre Ossman
[    1.364149] mmc-bcm2835 fe300000.mmcnr: could not get clk, deferring probe
[    1.364806] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.368911] ledtrig-cpu: registered to indicate activity on CPUs
[    1.369275] hid: raw HID events driver (C) Jiri Kosina
[    1.369477] usbcore: registered new interface driver usbhid
[    1.369508] usbhid: USB HID core driver
[    1.375406] Initializing XFRM netlink socket
[    1.375468] NET: Registered protocol family 17
[    1.375606] Key type dns_resolver registered
[    1.376029] Registering SWP/SWPB emulation handler
[    1.376232] registered taskstats version 1
[    1.376273] Loading compiled-in X.509 certificates
[    1.377107] Key type ._fscrypt registered
[    1.377138] Key type .fscrypt registered
[    1.377166] Key type fscrypt-provisioning registered
[    1.388621] uart-pl011 fe201000.serial: there is not valid maps for state default
[    1.388897] uart-pl011 fe201000.serial: cts_event_workaround enabled
[    1.388987] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 36, base_baud = 0) is a PL011 rev2
[    1.395667] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver
[    1.396765] mmc-bcm2835 fe300000.mmcnr: mmc_debug:0 mmc_debug2:0
[    1.396800] mmc-bcm2835 fe300000.mmcnr: DMA channel allocated
[    1.427084] of_cfs_init
[    1.427365] of_cfs_init: OK
[    1.446761] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[    1.448479] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    1.450209] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    1.453270] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[    1.454985] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    1.462962] mmc0: SDHCI controller on fe340000.mmc [fe340000.mmc] using ADMA
[    1.463638] Waiting for root device PARTUUID=c9650e41-02...
[    1.528606] mmc1: new high speed SDIO card at address 0001
[    1.574126] mmc0: new ultra high speed DDR50 SDHC card at address 0001
[    1.575045] mmcblk0: mmc0:0001 SD 29.1 GiB
[    1.577219]  mmcblk0: p1 p2
[    1.613016] EXT4-fs (mmcblk0p2): INFO: recovery required on readonly filesystem
[    1.613061] EXT4-fs (mmcblk0p2): write access will be enabled during recovery
[    1.634077] usb 1-1: new high-speed USB device number 2 using xhci_hcd
[    1.816727] usb 1-1: New USB device found, idVendor=2109, idProduct=3431, bcdDevice= 4.21
[    1.816775] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    1.816809] usb 1-1: Product: USB2.0 Hub
[    1.818812] hub 1-1:1.0: USB hub found
[    1.819122] hub 1-1:1.0: 4 ports detected
[    2.633929] EXT4-fs (mmcblk0p2): recovery complete
[    2.647813] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    2.647913] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    2.653856] devtmpfs: mounted
[    2.664052] Freeing unused kernel memory: 2048K
[    2.664394] Run /sbin/init as init process
[    2.664423]   with arguments:
[    2.664437]     /sbin/init
[    2.664451]   with environment:
[    2.664466]     HOME=/
[    2.664480]     TERM=linux
[    2.664494]     biosdevname=0
[    3.157761] systemd[1]: System time before build time, advancing clock.
[    3.274439] NET: Registered protocol family 10
[    3.275886] Segment Routing with IPv6
[    3.357303] systemd[1]: systemd 241 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
[    3.358315] systemd[1]: Detected architecture arm.
[    3.449686] systemd[1]: Set hostname to <raspberrypi>.
[    4.393299] random: systemd: uninitialized urandom read (16 bytes read)
[    4.417044] random: systemd: uninitialized urandom read (16 bytes read)
[    4.420582] systemd[1]: Created slice system-systemd\x2dfsck.slice.
[    4.421278] random: systemd: uninitialized urandom read (16 bytes read)
[    4.421983] systemd[1]: Listening on fsck to fsckd communication Socket.
[    4.423308] systemd[1]: Listening on Journal Audit Socket.
[    4.424333] systemd[1]: Listening on udev Kernel Socket.
[    4.425844] systemd[1]: Created slice User and Session Slice.
[    4.426557] systemd[1]: Listening on initctl Compatibility Named Pipe.
[    4.428119] systemd[1]: Created slice system-getty.slice.
[    5.016190] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    5.119826] systemd-journald[131]: Received request to flush runtime journal from PID 1
[    5.875851] rpivid-mem feb00000.hevc-decoder: rpivid-hevcmem initialised: Registers at 0xfeb00000 length 0x00010000
[    5.879927] rpivid-mem feb10000.rpivid-local-intc: rpivid-intcmem initialised: Registers at 0xfeb10000 length 0x00001000
[    5.880735] rpivid-mem feb20000.h264-decoder: rpivid-h264mem initialised: Registers at 0xfeb20000 length 0x00010000
[    5.881444] rpivid-mem feb30000.vp9-decoder: rpivid-vp9mem initialised: Registers at 0xfeb30000 length 0x00010000
[    6.004256] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[    6.006428] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[    6.006482] [vc_sm_connected_init]: start
[    6.019444] [vc_sm_connected_init]: installed successfully
[    6.022732] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[    6.022741] mc: Linux media interface: v0.10
[    6.059479] bcm2835_audio bcm2835_audio: card created with 8 channels
[    6.064681] videodev: Linux video capture interface: v2.00
[    6.090296] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[    6.098955] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[    6.111266] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
[    6.132433] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[    6.151862] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video13
[    6.152418] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video14
[    6.152861] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video15
[    6.153490] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video16
[    6.153547] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[    6.153593] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[    6.153636] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[    6.153678] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[    6.153949] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp
[    6.183868] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[    6.183942] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[    6.187505] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[    6.187573] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[    6.199930] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[    6.200012] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[    6.202764] bcm2835-codec bcm2835-codec: Device registered as /dev/video18
[    6.202834] bcm2835-codec bcm2835-codec: Loaded V4L2 image_fx
[    6.311044] [drm] No displays found. Consider forcing hotplug if HDMI is attached
[    6.311213] vc4-drm gpu: bound fe600000.firmwarekms (ops vc4_fkms_ops [vc4])
[    6.315082] [drm] Initialized vc4 0.0.0 20140616 for gpu on minor 1
[    6.376164] [drm] Initialized v3d 1.0.0 20180419 for fec00000.v3d on minor 0
[    6.386389] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    6.429111] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    6.483896] brcmfmac: F1 signature read @0x18000000=0x15264345
[    6.513021] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    6.513945] usbcore: registered new interface driver brcmfmac
[    6.777733] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    6.777897] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    6.787874] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Jan  4 2021 19:56:29 version 7.45.229 (617f1f5 CY) FWID 01-2dbd9d2e
[    8.439354] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
[    8.449370] bcmgenet fd580000.ethernet: configuring instance for external RGMII (RX delay)
[    8.450066] bcmgenet fd580000.ethernet eth0: Link is Down
[    8.837150] random: crng init done
[    8.837196] random: 7 urandom warning(s) missed due to ratelimiting
[    9.854619] Adding 102396k swap on /var/swap.  Priority:-2 extents:1 across:102396k SSFS
[   12.456099] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   12.634322] bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   12.634403] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   20.040806] fuse: init (API version 7.32)
[   22.874223] Under-voltage detected! (0x00050005)
[   27.034079] Voltage normalised (0x00000000)
[  145.562195] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/spi@7e204000/spidev@0/status
[  145.746233] Bluetooth: Core ver 2.22
[  145.746325] NET: Registered protocol family 31
[  145.746338] Bluetooth: HCI device and connection manager initialized
[  145.746362] Bluetooth: HCI socket layer initialized
[  145.746378] Bluetooth: L2CAP socket layer initialized
[  145.746400] Bluetooth: SCO socket layer initialized
[  174.013439] esp32_spi: loading out-of-tree module taints kernel.
[  174.014505] esp_reset, ESP32: Resetpin of Host is 6
[  174.014735] esp_reset, ESP32: Triggering ESP reset.
[  174.015163] ESP32 peripheral is registered to SPI bus [0],chip select [0], SPI Clock [10]
[  174.586721]
               Received INIT event from ESP32 peripheral
[  174.586730] EVENT: 2
[  174.586757] EVENT: 1
[  174.586768] ESP Reconfigure SPI CLK to 30 MHz
[  174.804729] ESP32 peripheral is registered to SPI bus [0],chip select [0], SPI Clock [30]
[  175.024445] EVENT: 0
[  175.024482] ESP peripheral capabilities: 0xe8
[  175.244878] EVENT: 3
[  175.583199] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[  175.583222] Bluetooth: BNEP filters: protocol multicast
[  175.583242] Bluetooth: BNEP socket layer initialized
[  280.344672] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /soc/spi@7e204000/spidev@1/status
[  306.778019] esp_reset, ESP32: Resetpin of Host is 6
[  306.778245] esp_reset, ESP32: Triggering ESP reset.
[  306.778665] ESP32 peripheral is registered to SPI bus [0],chip select [1], SPI Clock [10]
[  307.350070]
               Received INIT event from ESP32 peripheral
[  307.350080] EVENT: 2
[  307.350107] EVENT: 1
[  307.350118] ESP Reconfigure SPI CLK to 30 MHz
[  307.567573] ESP32 peripheral is registered to SPI bus [0],chip select [1], SPI Clock [30]
[  307.787045] EVENT: 0
[  307.787083] ESP peripheral capabilities: 0xe8
[  308.007443] EVENT: 3
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $ cd
c_support/      python_support/
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control $ cd c_support/
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control/c_support $ ls
Makefile  ctrl_config.h  stress.c  stress.out  test.c  test.h  test.out  test_utils.c
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control/c_support $ vim ctrl_config.h
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control/c_support $ sudo ^C
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control/c_support $ make
gcc -C -Wall --sysroot= -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../../common/protobuf-c -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../../common/include -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../control_lib/include -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../control_lib/src/include -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../virtual_serial_if/include -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../components/include -I/home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../port/include -I. /home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../../common/protobuf-c/protobuf-c/protobuf-c.c /home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../../common/esp_hosted_config.pb-c.c /home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../control_lib/src/ctrl_core.c /home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../control_lib/src/ctrl_api.c /home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../virtual_serial_if/src/serial_if.c /home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../../components/src/esp_queue.c /home/pi/h3/esp_hosted_fg/host/linux/host_control/c_support/../../port/src/platform_wrapper.c ./test_utils.c -lpthread -lrt test.c -o test.out
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control/c_support $ sudo ./test.out
sudo ./test.out
[
 set_sta_mac_addr       ||
 get_sta_mac_addr       ||
 set_softap_mac_addr        ||
 get_softap_mac_addr        ||
 get_ap_scan_list       ||
 sta_connect            ||
 get_sta_config         ||
 sta_disconnect         ||
 set_wifi_mode          ||
 get_wifi_mode          ||
 reset_softap_vendor_ie     ||
 set_softap_vendor_ie       ||
 softap_start           ||
 get_softap_config      ||
 softap_connected_sta_list  ||
 softap_stop            ||
 set_wifi_powersave_mode    ||
 get_wifi_powersave_mode    ||
 set_wifi_max_tx_power      ||
 get_wifi_curr_tx_power     ||
 ota <ESP 'network_adapter.bin' path>
]

For example,
sudo ./test.out set_sta_mac_addr
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control/c_support $ sudo ./test.out get_ap_scan_list
Enable heartbeat with duration 20
Heartbeat operation successful
Number of available APs is 9
0) ssid "ESP_1" bssid "74:11:b2:c9:5e:40" rssi "-47" channel "11" auth mode "3"
1) ssid "ESP_Guest" bssid "74:11:b2:c9:5e:41" rssi "-47" channel "11" auth mode "3"
2) ssid "ESP_1" bssid "74:11:b2:74:1e:a0" rssi "-52" channel "6" auth mode "3"
3) ssid "ESP_Guest" bssid "74:11:b2:74:1e:a1" rssi "-53" channel "6" auth mode "3"
4) ssid "ESP_1" bssid "74:11:b2:c8:fa:00" rssi "-58" channel "1" auth mode "3"
5) ssid "ESP_Guest" bssid "74:11:b2:c8:fa:01" rssi "-58" channel "1" auth mode "3"
6) ssid "ESP_1" bssid "74:11:b2:c9:11:40" rssi "-67" channel "6" auth mode "3"
7) ssid "ESP_Guest" bssid "74:11:b2:c9:11:41" rssi "-67" channel "6" auth mode "3"
8) ssid "GUEST@DEN" bssid "bc:5a:56:b4:3c:61" rssi "-75" channel "1" auth mode "0"

Requested operation complete
Sleeping for some time just to showcase heartbeat

^C
Clean-up and exit
Disable Heartbeat
Heartbeat operation successful
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control/c_support $
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control/c_support $ git diff
diff --git a/esp_hosted_fg/host/linux/host_control/spidev_disabler.dts b/esp_hosted_fg/host/linux/host_control/spidev_disabler.dts
index 664ecb9..b6de380 100644
--- a/esp_hosted_fg/host/linux/host_control/spidev_disabler.dts
+++ b/esp_hosted_fg/host/linux/host_control/spidev_disabler.dts
@@ -5,7 +5,7 @@
     compatible = "brcm,bcm2708";

     fragment@0 {
-        target = <&spidev0>;
+        target = <&spidev1>;

         __overlay__ {
             status = "disabled";
diff --git a/esp_hosted_fg/host/linux/host_driver/esp32/spi/esp_spi.c b/esp_hosted_fg/host/linux/host_driver/esp32/spi/esp_spi.c
index a320a09..9293a7e 100644
--- a/esp_hosted_fg/host/linux/host_driver/esp32/spi/esp_spi.c
+++ b/esp_hosted_fg/host/linux/host_driver/esp32/spi/esp_spi.c
@@ -366,7 +366,7 @@ static int spi_dev_init(int spi_clk_mhz)
        esp_board.mode = SPI_MODE_2;
        esp_board.max_speed_hz = spi_clk_mhz * NUMBER_1M;
        esp_board.bus_num = 0;
-       esp_board.chip_select = 0;
+       esp_board.chip_select = 1;

        master = spi_busnum_to_master(esp_board.bus_num);
        if (!master) {
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control/c_support $ cat /boot/config.txt
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=2
#hdmi_mode=85

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

[all]
#dtoverlay=vc4-fkms-v3d

##dtoverlay=sdio,poll_once=off,sdio_overclock=5,max-frequency=5,overclock_50=5
##dtoverlay=sdio,poll_once=off,max-frequency=10000000,sdio_overclock=10
#force_turbo=1

#dtoverlay=sdio,poll_once=off
#dtoverlay=disable-bt

dtparam=spi=on
dtoverlay=disable-bt
core_freq=250
core_freq_min=250

enable_uart=1
dtoverlay=disable-bt

pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control/c_support $ cat /boot/cmdline.txt
console=tty1 root=PARTUUID=c9650e41-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait net.ifnames=0 biosdevname=0 fbcon=scrollback:1024k
pi@raspberrypi:~/h3/esp_hosted_fg/host/linux/host_control/c_support $
mantriyogesh commented 1 year ago

Hello @MooseGmaing

Did you get chance to test this?

mantriyogesh commented 1 year ago

@MooseGmaing any updates please?

MooseGmaing commented 1 year ago

Sorry, but I won't be able to test this until next weekend. I'll let you know if it works.

mantriyogesh commented 1 year ago

Okay.

mantriyogesh commented 1 year ago

Any updates @MooseGmaing ??