aBUGSworstnightmare
Posts: 1097
Joined: Tue Jun 30, 2015 1:35 pm

Re: SDIO for Wifi/Bluetooth module

Thu Feb 23, 2017 10:43 am

Hi,
I'm trying to get an ESP12F running in SDIO mode, connected to a CM3 I/O board. I've compiled a custom device tree blob and also changed the overlay because I'm using SD1 on GPIO34-39 (and not GPIO22-27) like most of you.
WiFi module is (at the time of writing) connected with 80mm wires, no series resistors like in the hackaday how-too.

Til date, I was not able to get the module running, neither in 1-bit nor 4bit mode.

Here is the output after trying to load the driver:
[email protected]:~ $ sudo modprobe esp8089
modprobe: ERROR: could not insert 'esp8089': No such device
[email protected]:~ $ sudo dmesg -c
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.4.38-v7+ ([email protected]) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #938 SMP Thu Dec 15 15:22:21 GMT 2016
[ 0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine model: Raspberry Pi Compute Module 3 Rev 1.0
...
[ 0.829631] Waiting for root device /dev/mmcblk0p2...
[ 0.864720] mmc0: host does not support reading read-only switch, assuming write-enable
[ 0.866741] mmc0: new high speed SDHC card at address 59b4
[ 0.867334] mmcblk0: mmc0:59b4 5WCGP 29.8 GiB
[ 0.869153] mmcblk0: p1 p2
...
[ 201.886558]
***** EAGLE DRIVER VER:bdf5087c3deb*****

[ 201.886616] ESP8089 reset via GPIO 43
[ 201.903205] cfg80211: World regulatory domain updated:
[ 201.903221] cfg80211: DFS Master region: unset
[ 201.903227] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 201.903235] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 201.903243] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[ 201.903249] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[ 201.903257] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[ 201.903264] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[ 201.903271] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[ 201.903277] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[ 201.903283] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[ 213.087495] esp_sdio_init ------ RETRY ------
[ 213.087612] ESP8089 reset via GPIO 43
[ 213.297551] ESP8089 reset via GPIO 43
[ 224.507520] esp_sdio_init ------ RETRY ------
[ 224.507636] ESP8089 reset via GPIO 43
[ 224.717534] ESP8089 reset via GPIO 43
[ 235.927528] esp_sdio_init ------ RETRY ------
[ 235.927646] ESP8089 reset via GPIO 43
[ 236.137527] ESP8089 reset via GPIO 43
[ 247.347516] esp_sdio_init ------ RETRY ------
[ 247.347632] ESP8089 reset via GPIO 43
[ 247.557494] eagle sdio can not power up!
Is it correct when saying this looks like a connection (and or SDIO clock speed) issue? Any guidance/tip welcome.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1906
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: SDIO for Wifi/Bluetooth module

Thu Feb 23, 2017 10:52 am

dmesg output should include some additional mmc references - mmc-bcm2835, mmc1 etc. Have you filtered them out?

aBUGSworstnightmare
Posts: 1097
Joined: Tue Jun 30, 2015 1:35 pm

Re: SDIO for Wifi/Bluetooth module

Thu Feb 23, 2017 11:05 am

Here's the full output:

Code: Select all

[email protected]:~ $ sudo modprobe esp8089
modprobe: ERROR: could not insert 'esp8089': No such device
[email protected]:~ $ sudo dmesg -c
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.4.38-v7+ ([email protected]) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #938 SMP Thu Dec 15 15:22:21 GMT 2016
[    0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: Raspberry Pi Compute Module 3 Rev 1.0
[    0.000000] cma: Reserved 8 MiB at 0x32800000
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] On node 0 totalpages: 208896
[    0.000000] free_area_init_node: node 0, pgdat 808c4f40, node_mem_map b20c6000
[    0.000000]   Normal zone: 1836 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 208896 pages, LIFO batch:31
[    0.000000] [bcm2709_smp_init_cpus] enter (9520->f3003010)
[    0.000000] [bcm2709_smp_init_cpus] ncores=4
[    0.000000] PERCPU: Embedded 13 pages/cpu @b2082000 s22592 r8192 d22464 u53248
[    0.000000] pcpu-alloc: s22592 r8192 d22464 u53248 alloc=13*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 207060
[    0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1280 bcm2708_fb.fbheight=1024 bcm2709.boardrev=0xa020a0 bcm2709.serial=0xf982b367 smsc95xx.macaddr=B8:27:EB:82:B3:67 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 809144K/835584K available (6357K kernel code, 432K rwdata, 1716K rodata, 476K init, 764K bss, 18248K reserved, 8192K cma-reserved)
[    0.000000] Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xb3800000 - 0xff800000   (1216 MB)
    lowmem  : 0x80000000 - 0xb3000000   ( 816 MB)
    modules : 0x7f000000 - 0x80000000   (  16 MB)
      .text : 0x80008000 - 0x807ea688   (8074 kB)
      .init : 0x807eb000 - 0x80862000   ( 476 kB)
      .data : 0x80862000 - 0x808ce250   ( 433 kB)
       .bss : 0x808d1000 - 0x809901ec   ( 765 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] 	Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] Architected 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.000009] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000027] Switching to timer-based delay loop, resolution 52ns
[    0.000293] Console: colour dummy device 80x30
[    0.000494] console [tty1] enabled
[    0.000518] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[    0.000538] pid_max: default: 32768 minimum: 301
[    0.000852] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000867] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.001788] Disabling cpuset control group subsystem
[    0.001821] Initializing cgroup subsys io
[    0.001851] Initializing cgroup subsys memory
[    0.001895] Initializing cgroup subsys devices
[    0.001916] Initializing cgroup subsys freezer
[    0.001935] Initializing cgroup subsys net_cls
[    0.001983] CPU: Testing write buffer coherency: ok
[    0.002045] ftrace: allocating 21237 entries in 63 pages
[    0.051416] CPU0: update cpu_capacity 1024
[    0.051447] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.051459] [bcm2709_smp_prepare_cpus] enter
[    0.051603] Setting up static identity map for 0x8240 - 0x8274
[    0.053253] [bcm2709_boot_secondary] cpu:1 started (0) 16
[    0.053470] [bcm2709_secondary_init] enter cpu:1
[    0.053512] CPU1: update cpu_capacity 1024
[    0.053518] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.053899] [bcm2709_boot_secondary] cpu:2 started (0) 17
[    0.054063] [bcm2709_secondary_init] enter cpu:2
[    0.054084] CPU2: update cpu_capacity 1024
[    0.054090] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.054453] [bcm2709_boot_secondary] cpu:3 started (0) 18
[    0.054583] [bcm2709_secondary_init] enter cpu:3
[    0.054603] CPU3: update cpu_capacity 1024
[    0.054609] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.054670] Brought up 4 CPUs
[    0.054694] SMP: Total of 4 processors activated (153.60 BogoMIPS).
[    0.054702] CPU: All CPU(s) started in HYP mode.
[    0.054710] CPU: Virtualization extensions available.
[    0.055316] devtmpfs: initialized
[    0.066200] VFP support v0.3: implementor 41 architecture 3 part 40 variant 3 rev 4
[    0.066526] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.067231] pinctrl core: initialized pinctrl subsystem
[    0.067753] NET: Registered protocol family 16
[    0.072983] DMA: preallocated 4096 KiB pool for atomic coherent allocations
[    0.079661] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.079673] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.079824] Serial: AMBA PL011 UART driver
[    0.080085] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    0.143562] bcm2835-dma 3f007000.dma: DMA legacy API manager at f3007000, dmachans=0x1
[    0.144136] SCSI subsystem initialized
[    0.144317] usbcore: registered new interface driver usbfs
[    0.144406] usbcore: registered new interface driver hub
[    0.144505] usbcore: registered new device driver usb
[    0.150981] raspberrypi-firmware soc:firmware: Attached to firmware from 2016-12-09 15:15
[    0.178220] clocksource: Switched to clocksource arch_sys_counter
[    0.223199] FS-Cache: Loaded
[    0.223470] CacheFiles: Loaded
[    0.235791] NET: Registered protocol family 2
[    0.236645] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.236760] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.236949] TCP: Hash tables configured (established 8192 bind 8192)
[    0.237042] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.237089] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.237316] NET: Registered protocol family 1
[    0.237637] RPC: Registered named UNIX socket transport module.
[    0.237647] RPC: Registered udp transport module.
[    0.237656] RPC: Registered tcp transport module.
[    0.237665] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.238812] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 7 counters available
[    0.240133] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.253311] VFS: Disk quotas dquot_6.6.0
[    0.253622] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.255884] FS-Cache: Netfs 'nfs' registered for caching
[    0.256781] NFS: Registering the id_resolver key type
[    0.256837] Key type id_resolver registered
[    0.256847] Key type id_legacy registered
[    0.259200] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.259320] io scheduler noop registered
[    0.259336] io scheduler deadline registered (default)
[    0.259388] io scheduler cfq registered
[    0.261896] BCM2708FB: allocated DMA memory f2c10000
[    0.261921] BCM2708FB: allocated DMA channel 0 @ f3007000
[    0.298897] Console: switching to colour frame buffer device 160x64
[    0.321360] bcm2835-rng 3f104000.rng: hwrng registered
[    0.321456] vc-cma: Videocore CMA driver
[    0.321466] vc-cma: vc_cma_base      = 0x00000000
[    0.321476] vc-cma: vc_cma_size      = 0x00000000 (0 MiB)
[    0.321484] vc-cma: vc_cma_initial   = 0x00000000 (0 MiB)
[    0.321696] vc-mem: phys_addr:0x00000000 mem_base=0x3dc00000 mem_size:0x3f000000(1008 MiB)
[    0.336437] brd: module loaded
[    0.345112] loop: module loaded
[    0.346016] vchiq: vchiq_init_state: slot_zero = 0xb2c80000, is_master = 0
[    0.347493] Loading iSCSI transport class v2.0-870.
[    0.348128] usbcore: registered new interface driver smsc95xx
[    0.348183] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    0.548572] Core Release: 2.80a
[    0.548585] Setting default values for core params
[    0.548617] Finished setting default values for core params
[    0.748984] Using Buffer DMA mode
[    0.748995] Periodic Transfer Interrupt Enhancement - disabled
[    0.749003] Multiprocessor Interrupt Enhancement - disabled
[    0.749013] OTG VER PARAM: 0, OTG VER FLAG: 0
[    0.749031] Dedicated Tx FIFOs mode
[    0.749340] WARN::dwc_otg_hcd_init:1047: FIQ DMA bounce buffers: virt = 0xb2c04000 dma = 0xf2c04000 len=9024
[    0.749371] FIQ FSM acceleration enabled for :
Non-periodic Split Transactions
Periodic Split Transactions
High-Speed Isochronous Endpoints
Interrupt/Control Split Transaction hack enabled
[    0.749394] dwc_otg: Microframe scheduler enabled
[    0.749443] WARN::hcd_init_fiq:413: FIQ on core 1 at 0x8044844c
[    0.749459] WARN::hcd_init_fiq:414: FIQ ASM at 0x804487bc length 36
[    0.749474] WARN::hcd_init_fiq:439: MPHI regs_base at 0xb387e000
[    0.749540] dwc_otg 3f980000.usb: DWC OTG Controller
[    0.749579] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[    0.749615] dwc_otg 3f980000.usb: irq 62, io mem 0x00000000
[    0.749668] Init: Port Power? op_state=1
[    0.749675] Init: Power Port (0)
[    0.749881] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    0.749896] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.749908] usb usb1: Product: DWC OTG Controller
[    0.749921] usb usb1: Manufacturer: Linux 4.4.38-v7+ dwc_otg_hcd
[    0.749933] usb usb1: SerialNumber: 3f980000.usb
[    0.750744] hub 1-0:1.0: USB hub found
[    0.750786] hub 1-0:1.0: 1 port detected
[    0.751445] dwc_otg: FIQ enabled
[    0.751455] dwc_otg: NAK holdoff enabled
[    0.751463] dwc_otg: FIQ split-transaction FSM enabled
[    0.751497] Module dwc_common_port init
[    0.751744] usbcore: registered new interface driver usb-storage
[    0.752018] mousedev: PS/2 mouse device common for all mice
[    0.752754] bcm2835-cpufreq: min=600000 max=1200000
[    0.753049] sdhci: Secure Digital Host Controller Interface driver
[    0.753059] sdhci: Copyright(c) Pierre Ossman
[    0.755264] sdhost: log_buf @ b2c07000 (f2c07000)
[    0.808253] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[    0.808438] mmc-bcm2835 3f300000.mmc: could not find pctldev for node /clocks/[email protected], deferring probe
[    0.808537] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.808963] ledtrig-cpu: registered to indicate activity on CPUs
[    0.809095] hidraw: raw HID events driver (C) Jiri Kosina
[    0.809293] usbcore: registered new interface driver usbhid
[    0.809301] usbhid: USB HID core driver
[    0.809869] Initializing XFRM netlink socket
[    0.809903] NET: Registered protocol family 17
[    0.810038] Key type dns_resolver registered
[    0.810616] Registering SWP/SWPB emulation handler
[    0.811416] registered taskstats version 1
[    0.811602] vc-sm: Videocore shared memory driver
[    0.811617] [vc_sm_connected_init]: start
[    0.828972] [vc_sm_connected_init]: end - returning 0
[    0.829303] mmc-bcm2835 3f300000.mmc: could not find pctldev for node /clocks/[email protected], deferring probe
[    0.829443] of_cfs_init
[    0.829545] of_cfs_init: OK
[    0.830413] Waiting for root device /dev/mmcblk0p2...
[    0.865504] mmc0: host does not support reading read-only switch, assuming write-enable
[    0.867518] mmc0: new high speed SDHC card at address 59b4
[    0.868095] mmcblk0: mmc0:59b4 5WCGP 29.8 GiB
[    0.869907]  mmcblk0: p1 p2
[    0.870921] mmc-bcm2835 3f300000.mmc: could not find pctldev for node /clocks/[email protected], deferring probe
[    0.948333] Indeed it is in host mode hprt0 = 00021501
[    0.959563] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    0.959615] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    0.968650] devtmpfs: mounted
[    0.969420] Freeing unused kernel memory: 476K (807eb000 - 80862000)
[    1.128272] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    1.128564] Indeed it is in host mode hprt0 = 00001101
[    1.275945] random: systemd: uninitialized urandom read (16 bytes read, 28 bits of entropy available)
[    1.280162] systemd[1]: systemd 215 running in system mode. (+PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR)
[    1.280545] systemd[1]: Detected architecture 'arm'.
[    1.329587] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[    1.329611] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    1.329624] usb 1-1: Product: USB2.0 Hub
[    1.330568] hub 1-1:1.0: USB hub found
[    1.330869] hub 1-1:1.0: 4 ports detected
[    1.332857] mmc-bcm2835 3f300000.mmc: could not find pctldev for node /clocks/[email protected], deferring probe
[    1.332958] mmc-bcm2835 3f300000.mmc: could not find pctldev for node /clocks/[email protected], deferring probe
[    1.414629] NET: Registered protocol family 10
[    1.416161] systemd[1]: Inserted module 'ipv6'
[    1.418076] systemd[1]: Set hostname to <raspberrypi>.
[    1.552711] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 62 bits of entropy available)
[    1.608265] usb 1-1.1: new full-speed USB device number 3 using dwc_otg
[    1.725491] usb 1-1.1: New USB device found, idVendor=046d, idProduct=c52b
[    1.725518] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    1.725531] usb 1-1.1: Product: USB Receiver
[    1.725544] usb 1-1.1: Manufacturer: Logitech
[    1.734402] mmc-bcm2835 3f300000.mmc: could not find pctldev for node /clocks/[email protected], deferring probe
[    1.743632] mmc-bcm2835 3f300000.mmc: could not find pctldev for node /clocks/[email protected], deferring probe
[    1.751517] mmc-bcm2835 3f300000.mmc: could not find pctldev for node /clocks/[email protected], deferring probe
[    1.751614] mmc-bcm2835 3f300000.mmc: could not find pctldev for node /clocks/[email protected], deferring probe
[    1.781242] random: systemd: uninitialized urandom read (16 bytes read, 66 bits of entropy available)
[    1.782516] random: systemd: uninitialized urandom read (16 bytes read, 66 bits of entropy available)
[    1.783930] random: systemd: uninitialized urandom read (16 bytes read, 66 bits of entropy available)
[    1.802811] random: systemd: uninitialized urandom read (16 bytes read, 67 bits of entropy available)
[    1.803349] random: systemd: uninitialized urandom read (16 bytes read, 67 bits of entropy available)
[    1.803498] random: systemd: uninitialized urandom read (16 bytes read, 67 bits of entropy available)
[    1.828281] usb 1-1.3: new low-speed USB device number 4 using dwc_otg
[    1.834462] random: systemd: uninitialized urandom read (16 bytes read, 67 bits of entropy available)
[    1.850519] random: systemd: uninitialized urandom read (16 bytes read, 68 bits of entropy available)
[    2.003414] systemd[1]: Cannot add dependency job for unit regenerate_ssh_host_keys.service, ignoring: Unit regenerate_ssh_host_keys.service failed to load: No such file or directory.
[    2.006926] systemd[1]: Starting Forward Password Requests to Wall Directory Watch.
[    2.007275] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    2.007355] systemd[1]: Starting Remote File Systems (Pre).
[    2.007522] systemd[1]: Reached target Remote File Systems (Pre).
[    2.007728] systemd[1]: Starting Arbitrary Executable File Formats File System Automount Point.
[    2.008169] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[    2.008412] systemd[1]: Starting Encrypted Volumes.
[    2.008484] systemd[1]: Reached target Encrypted Volumes.
[    2.008560] systemd[1]: Starting Swap.
[    2.008627] systemd[1]: Reached target Swap.
[    2.008715] systemd[1]: Expecting device dev-mmcblk0p1.device...
[    2.008789] systemd[1]: Starting Root Slice.
[    2.008973] systemd[1]: Created slice Root Slice.
[    2.009047] systemd[1]: Starting Delayed Shutdown Socket.
[    2.009268] systemd[1]: Listening on Delayed Shutdown Socket.
[    2.009343] systemd[1]: Starting /dev/initctl Compatibility Named Pipe.
[    2.009587] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[    2.009660] systemd[1]: Starting Journal Socket (/dev/log).
[    2.009839] systemd[1]: Listening on Journal Socket (/dev/log).
[    2.009914] systemd[1]: Starting User and Session Slice.
[    2.010154] systemd[1]: Created slice User and Session Slice.
[    2.010247] systemd[1]: Starting udev Control Socket.
[    2.010401] systemd[1]: Listening on udev Control Socket.
[    2.010487] systemd[1]: Starting udev Kernel Socket.
[    2.010620] systemd[1]: Listening on udev Kernel Socket.
[    2.010732] systemd[1]: Starting Journal Socket.
[    2.010938] systemd[1]: Listening on Journal Socket.
[    2.011072] systemd[1]: Starting System Slice.
[    2.011286] systemd[1]: Created slice System Slice.
[    2.011368] systemd[1]: Starting system-systemd\x2dfsck.slice.
[    2.011679] systemd[1]: Created slice system-systemd\x2dfsck.slice.
[    2.011827] systemd[1]: Starting Increase datagram queue length...
[    2.036238] usb 1-1.3: New USB device found, idVendor=04d9, idProduct=1603
[    2.036261] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    2.036273] usb 1-1.3: Product: USB Keyboard
[    2.036285] usb 1-1.3: Manufacturer:  
[    2.039016] systemd[1]: Starting Restore / save the current clock...
[    2.045526] systemd[1]: Starting Create list of required static device nodes for the current kernel...
[    2.049150] systemd[1]: Mounting POSIX Message Queue File System...
[    2.053728] systemd[1]: Mounting Debug File System...
[    2.085633] input:   USB Keyboard as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:04D9:1603.0004/input/input0
[    2.087441] systemd[1]: Started Set Up Additional Binary Formats.
[    2.087596] systemd[1]: Mounted Huge Pages File System.
[    2.087710] systemd[1]: Starting udev Coldplug all Devices...
[    2.139123] hid-generic 0003:04D9:1603.0004: input,hidraw0: USB HID v1.10 Keyboard [  USB Keyboard] on usb-3f980000.usb-1.3/input0
[    2.139314] mmc-bcm2835 3f300000.mmc: could not find pctldev for node /clocks/[email protected], deferring probe
[    2.162539] systemd[1]: Starting Load Kernel Modules...
[    2.209135] systemd[1]: Starting system-autologin.slice.
[    2.209540] systemd[1]: Created slice system-autologin.slice.
[    2.209710] systemd[1]: Starting File System Check on Root Device...
[    2.213002] systemd[1]: Starting Slices.
[    2.213115] systemd[1]: Reached target Slices.
[    2.216324] systemd[1]: Mounted Debug File System.
[    2.216620] systemd[1]: Mounted POSIX Message Queue File System.
[    2.218205] systemd[1]: Started Increase datagram queue length.
[    2.224614] input:   USB Keyboard as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.1/0003:04D9:1603.0005/input/input1
[    2.231686] systemd[1]: Started Restore / save the current clock.
[    2.232682] systemd[1]: Started Create list of required static device nodes for the current kernel.
[    2.241078] systemd[1]: Time has been changed
[    2.253564] fuse init (API version 7.23)
[    2.278612] hid-generic 0003:04D9:1603.0005: input,hidraw1: USB HID v1.10 Device [  USB Keyboard] on usb-3f980000.usb-1.3/input1
[    2.279109] mmc-bcm2835 3f300000.mmc: could not find pctldev for node /clocks/[email protected], deferring probe
[    2.288685] i2c /dev entries driver
[    2.291767] systemd[1]: Started Load Kernel Modules.
[    2.293528] systemd[1]: Started udev Coldplug all Devices.
[    2.358305] usb 1-1.4: new high-speed USB device number 5 using dwc_otg
[    2.383277] systemd[1]: Starting Apply Kernel Variables...
[    2.439347] systemd[1]: Mounting Configuration File System...
[    2.441972] systemd[1]: Mounting FUSE Control File System...
[    2.444960] systemd[1]: Starting Create Static Device Nodes in /dev...
[    2.448155] systemd[1]: Starting Syslog Socket.
[    2.448500] systemd[1]: Listening on Syslog Socket.
[    2.448677] systemd[1]: Starting Journal Service...
[    2.452425] systemd[1]: Started Journal Service.
[    2.463973] usb 1-1.4: New USB device found, idVendor=05e3, idProduct=0715
[    2.463997] usb 1-1.4: New USB device strings: Mfr=3, Product=4, SerialNumber=2
[    2.464010] usb 1-1.4: Product: USB Storage
[    2.464022] usb 1-1.4: Manufacturer: Generic 
[    2.464034] usb 1-1.4: SerialNumber: 000000009412
[    2.465349] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[    2.465675] scsi host0: usb-storage 1-1.4:1.0
[    2.466227] mmc-bcm2835 3f300000.mmc: could not find pctldev for node /clocks/[email protected], deferring probe
[    2.466402] mmc-bcm2835 3f300000.mmc: could not find pctldev for node /clocks/[email protected], deferring probe
[    2.769524] systemd-udevd[140]: starting version 215
[    3.272578] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[    3.272796] mmc-bcm2835 3f300000.mmc: could not find pctldev for node /clocks/[email protected], deferring probe
[    3.274835] bcm2835-wdt 3f100000.watchdog: Broadcom BCM2835 watchdog timer
[    3.275037] mmc-bcm2835 3f300000.mmc: could not find pctldev for node /clocks/[email protected], deferring probe
[    3.347468] mmc-bcm2835 3f300000.mmc: could not find pctldev for node /clocks/[email protected], deferring probe
[    3.437137] logitech-djreceiver 0003:046D:C52B.0003: hiddev0,hidraw2: USB HID v1.11 Device [Logitech USB Receiver] on usb-3f980000.usb-1.1/input2
[    3.461122] scsi 0:0:0:0: Direct-Access     Generic  STORAGE DEVICE   9412 PQ: 0 ANSI: 0
[    3.462082] mmc-bcm2835 3f300000.mmc: could not find pctldev for node /clocks/[email protected], deferring probe
[    3.464183] sd 0:0:0:0: [sda] Attached SCSI removable disk
[    3.480244] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    3.507176] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    3.548625] mmc-bcm2835 3f300000.mmc: could not find pctldev for node /clocks/[email protected], deferring probe
[    3.575852] input: Logitech M215 2nd Gen as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1:1.2/0003:046D:C52B.0003/0003:046D:401B.0006/input/input2
[    3.576643] logitech-hidpp-device 0003:046D:401B.0006: input,hidraw3: USB HID v1.11 Mouse [Logitech M215 2nd Gen] on usb-3f980000.usb-1.1:1
[    3.578562] mmc-bcm2835 3f300000.mmc: could not find pctldev for node /clocks/[email protected], deferring probe
[    3.586648] input: Logitech K330 as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1:1.2/0003:046D:C52B.0003/0003:046D:4016.0007/input/input3
[    3.589172] logitech-hidpp-device 0003:046D:4016.0007: input,hidraw4: USB HID v1.11 Keyboard [Logitech K330] on usb-3f980000.usb-1.1:2
[    3.589364] mmc-bcm2835 3f300000.mmc: could not find pctldev for node /clocks/[email protected], deferring probe
[    3.598013] input: Logitech M325 as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1:1.2/0003:046D:C52B.0003/0003:046D:400A.0008/input/input4
[    3.601040] logitech-hidpp-device 0003:046D:400A.0008: input,hidraw5: USB HID v1.11 Mouse [Logitech M325] on usb-3f980000.usb-1.1:3
[    3.601244] mmc-bcm2835 3f300000.mmc: could not find pctldev for node /clocks/[email protected], deferring probe
[    4.194746] systemd-journald[131]: Received request to flush runtime journal from PID 1
[    4.787507] random: nonblocking pool is initialized
[    7.172199] Adding 102396k swap on /var/swap.  Priority:-1 extents:4 across:217088k SSFS
[   30.312340] Bluetooth: Core ver 2.21
[   30.313446] NET: Registered protocol family 31
[   30.313466] Bluetooth: HCI device and connection manager initialized
[   30.313489] Bluetooth: HCI socket layer initialized
[   30.313503] Bluetooth: L2CAP socket layer initialized
[   30.313536] Bluetooth: SCO socket layer initialized
[   30.352862] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   30.352879] Bluetooth: BNEP filters: protocol multicast
[   30.352898] Bluetooth: BNEP socket layer initialized
[   37.887435] 
***** EAGLE DRIVER VER:bdf5087c3deb*****

[   37.887497] ESP8089 reset via GPIO 43
[   37.904124] cfg80211: World regulatory domain updated:
[   37.904140] cfg80211:  DFS Master region: unset
[   37.904145] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   37.904154] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   37.904162] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[   37.904169] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[   37.904176] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[   37.904184] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[   37.904190] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[   37.904197] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   37.904203] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[   49.088268] esp_sdio_init ------ RETRY ------ 
[   49.088392] ESP8089 reset via GPIO 43
[   49.298325] ESP8089 reset via GPIO 43
[   60.508275] esp_sdio_init ------ RETRY ------ 
[   60.508398] ESP8089 reset via GPIO 43
[   60.718304] ESP8089 reset via GPIO 43
[   71.928275] esp_sdio_init ------ RETRY ------ 
[   71.928393] ESP8089 reset via GPIO 43
[   72.138274] ESP8089 reset via GPIO 43
[   83.348258] esp_sdio_init ------ RETRY ------ 
[   83.348375] ESP8089 reset via GPIO 43
[   83.558289] eagle sdio can not power up!
[email protected]:~ $ 

What is (possible) root cause for this
mmc-bcm2835 3f300000.mmc: could not find pctldev for node /clocks/[email protected], deferring probe
By the way: the LED on the WiFi module shows some activity during the process ...

Benjam
Posts: 1
Joined: Tue Mar 28, 2017 2:57 pm
Location: Cambridge, UK

Re: SDIO for Wifi/Bluetooth module

Tue Mar 28, 2017 3:00 pm

I'm also interested in adding Wifi support to a CM3 module, so very interested to hear if you got anywhere in the end?

Most of this thread is looking at the older Pi configurations, so I'm keen to check it still feasible to interface to SDIO WiFi modules on the CM3

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1906
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: SDIO for Wifi/Bluetooth module

Tue Mar 28, 2017 4:19 pm

Provided you are careful to keep the wires short it shouldn't be difficult to use SDIO on the MMC interface.

@aBUGSworstnightmare There must be a problem with the overlay you are using to enable the MMC interface. Can you upload the source?

aBUGSworstnightmare
Posts: 1097
Joined: Tue Jun 30, 2015 1:35 pm

Re: SDIO for Wifi/Bluetooth module

Wed Mar 29, 2017 8:25 am

PhilE wrote:Provided you are careful to keep the wires short it shouldn't be difficult to use SDIO on the MMC interface.

@aBUGSworstnightmare There must be a problem with the overlay you are using to enable the MMC interface. Can you upload the source?
Here is the source

Code: Select all

/* Enable SDIO from MMC interface via GPIOs 34-39. Includes sdhost overlay. */

/include/ "sdhost-overlay.dts"

/{
	compatible = "brcm,bcm2708";

	[email protected] {
		target = <&mmc>;
		sdio_mmc: __overlay__ {
			pinctrl-names = "default";
			pinctrl-0 = <&sdio_pins>;
			non-removable;
			bus-width = <4>;
			brcm,overclock-50 = <0>;
			status = "okay";
		};
	};

	[email protected] {
		target = <&gpio>;
		__overlay__ {
			sdio_pins: sdio_pins {
				brcm,pins = <34 35 36 37 38 39>;
				brcm,function = <7 7 7 7 7 7>; /* ALT3 = SD1 */
				brcm,pull = <0 2 2 2 2 2>;
			};
		};
	};

	__overrides__ {
		poll_once = <&sdio_mmc>,"non-removable?";
		bus_width = <&sdio_mmc>,"bus-width:0";
		sdio_overclock = <&sdio_mmc>,"brcm,overclock-50:0";
	};
};

GilchristT
Posts: 10
Joined: Tue Nov 29, 2011 6:44 pm

Re: SDIO for Wifi/Bluetooth module

Wed Mar 29, 2017 9:07 am

PhilE wrote:Provided you are careful to keep the wires short it shouldn't be difficult to use SDIO on the MMC interface.
At risk of asking how long is a piece of string, roughly what sort of trace length would be considered short?

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1906
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: SDIO for Wifi/Bluetooth module

Wed Mar 29, 2017 2:04 pm

I'm only a software engineer, so I can't advise you. The aim is to avoid cross-talk and general interference, so the shorter the better. But 50MHz isn't a particularly high frequency, so clock skew shouldn't be a big problem.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1906
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: SDIO for Wifi/Bluetooth module

Wed Mar 29, 2017 2:14 pm

@aBUGSworstnightmare I can't see what's going wrong - the overlay looks OK in itself. Can you run:

Code: Select all

dtc -I fs /proc/device-tree > whatever.dts
and paste the output somewhere where I can see it?

keabarnes
Posts: 1
Joined: Wed Mar 01, 2017 12:40 pm

Re: SDIO for Wifi/Bluetooth module

Wed Apr 12, 2017 9:37 am

So I've been struggling with this for a while and am still having issues.

I'm running "2017-04-10-raspbian-jessie-lite.img" on a RPi CM3, on a new CMIO dev board.

I've followed three different tutorials to get it to work, each on a new install:

1. https://github.com/al177/esp8089
2. https://hackaday.io/project/8678/instructions
3. https://oshlab.com/esp8266-raspberry-pi-gpio-wifi/

From what I understand, (2) is just a packaged version of (1).

I'm using an ESP-12F module, which is mounted on a breadboard with 33ohm resistors on the D# lines.
I've connected the module using jumper cables to a RPi 1 Model B, followed tutorial (3), and successfully gotten it to work with download speeds of 10Mbps.

I then moved the jumpers over to the CMIO CM3 board, followed each of the tutorials above independently and none seem to work.

It's been a very frustrating couple of weeks, so any help with this would be greatly appreciated!

@PhilE I've attached the output of dtc as requested

The last one I tested, (2), gave the dmesg output below:

In short:

Code: Select all

***** EAGLE DRIVER VER:bdf5087c3deb*****

[  337.596140] ESP8089 reset via GPIO 0
[  337.797453] eagle_sdio_dummy: probe of mmc1:0001:1 failed with error -110
[  338.137544] mmc1: card 0001 removed
[  338.201960] mmc1: queuing unknown CIS tuple 0x01 (3 bytes)
[  338.209088] mmc1: queuing unknown CIS tuple 0x1a (5 bytes)
[  338.212176] mmc1: queuing unknown CIS tuple 0x1b (8 bytes)
[  338.214132] mmc1: queuing unknown CIS tuple 0x80 (1 bytes)
[  338.214184] mmc1: queuing unknown CIS tuple 0x81 (1 bytes)
[  338.214234] mmc1: queuing unknown CIS tuple 0x82 (1 bytes)
[  338.214263] mmc1: new high speed SDIO card at address 0001
[  338.214557] esp_sdio_dummy_probe enter
[  338.417334] esp_sdio_init power up OK
[  348.677354] resetting event timeout
[  348.677380] esp_init_all failed: -110
[  348.677389] first error exit
Full dmesg output:

Code: Select all

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.4.50-v7+ ([email protected]) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #970 SMP Mon Feb 20 19:18:29 GMT 2017
[    0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: Raspberry Pi Compute Module 3 Rev 1.0
[    0.000000] cma: Reserved 8 MiB at 0x3a800000
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] On node 0 totalpages: 241664
[    0.000000] free_area_init_node: node 0, pgdat 808c5040, node_mem_map b9fa6000
[    0.000000]   Normal zone: 2124 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 241664 pages, LIFO batch:31
[    0.000000] [bcm2709_smp_init_cpus] enter (9520->f3003010)
[    0.000000] [bcm2709_smp_init_cpus] ncores=4
[    0.000000] PERCPU: Embedded 13 pages/cpu @b9f62000 s22592 r8192 d22464 u53248
[    0.000000] pcpu-alloc: s22592 r8192 d22464 u53248 alloc=13*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 239540
[    0.000000] Kernel command line: bcm2708_fb.fbwidth=1824 bcm2708_fb.fbheight=984 bcm2708_fb.fbswap=1 dma.dmachans=0x7f35 bcm2709.boardrev=0xa020a0 bcm2709.serial=0x2a2373f0 bcm2709.uart_clock=48000000 smsc95xx.macaddr=B8:27:EB:23:73:F0 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=PARTUUID=b3ba6501-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 939064K/966656K available (6357K kernel code, 432K rwdata, 1716K rodata, 476K init, 764K bss, 19400K reserved, 8192K cma-reserved)
[    0.000000] Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xbb800000 - 0xff800000   (1088 MB)
    lowmem  : 0x80000000 - 0xbb000000   ( 944 MB)
    modules : 0x7f000000 - 0x80000000   (  16 MB)
      .text : 0x80008000 - 0x807ea73c   (8074 kB)
      .init : 0x807eb000 - 0x80862000   ( 476 kB)
      .data : 0x80862000 - 0x808ce350   ( 433 kB)
       .bss : 0x808d1000 - 0x809901ec   ( 765 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] 	Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] Architected 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.000009] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000027] Switching to timer-based delay loop, resolution 52ns
[    0.000288] Console: colour dummy device 80x30
[    0.001345] console [tty1] enabled
[    0.001390] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[    0.001459] pid_max: default: 32768 minimum: 301
[    0.001796] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.001838] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.002792] Disabling cpuset control group subsystem
[    0.002850] Initializing cgroup subsys io
[    0.002901] Initializing cgroup subsys memory
[    0.002968] Initializing cgroup subsys devices
[    0.003011] Initializing cgroup subsys freezer
[    0.003054] Initializing cgroup subsys net_cls
[    0.003125] CPU: Testing write buffer coherency: ok
[    0.003210] ftrace: allocating 21246 entries in 63 pages
[    0.052448] CPU0: update cpu_capacity 1024
[    0.052513] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.052545] [bcm2709_smp_prepare_cpus] enter
[    0.052699] Setting up static identity map for 0x8240 - 0x8274
[    0.054343] [bcm2709_boot_secondary] cpu:1 started (0) 18
[    0.054533] [bcm2709_secondary_init] enter cpu:1
[    0.054577] CPU1: update cpu_capacity 1024
[    0.054583] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.054958] [bcm2709_boot_secondary] cpu:2 started (0) 17
[    0.055120] [bcm2709_secondary_init] enter cpu:2
[    0.055141] CPU2: update cpu_capacity 1024
[    0.055147] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.055506] [bcm2709_boot_secondary] cpu:3 started (0) 18
[    0.055636] [bcm2709_secondary_init] enter cpu:3
[    0.055656] CPU3: update cpu_capacity 1024
[    0.055662] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.055723] Brought up 4 CPUs
[    0.055822] SMP: Total of 4 processors activated (153.60 BogoMIPS).
[    0.055851] CPU: All CPU(s) started in HYP mode.
[    0.055877] CPU: Virtualization extensions available.
[    0.056513] devtmpfs: initialized
[    0.067194] VFP support v0.3: implementor 41 architecture 3 part 40 variant 3 rev 4
[    0.067560] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.068285] pinctrl core: initialized pinctrl subsystem
[    0.068841] NET: Registered protocol family 16
[    0.073988] DMA: preallocated 4096 KiB pool for atomic coherent allocations
[    0.080796] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.080845] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.081016] Serial: AMBA PL011 UART driver
[    0.081275] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
[    0.580622] console [ttyAMA0] enabled
[    0.584745] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    0.653365] bcm2835-dma 3f007000.dma: DMA legacy API manager at f3007000, dmachans=0x1
[    0.661911] SCSI subsystem initialized
[    0.665849] usbcore: registered new interface driver usbfs
[    0.671460] usbcore: registered new interface driver hub
[    0.676878] usbcore: registered new device driver usb
[    0.692008] raspberrypi-firmware soc:firmware: Attached to firmware from 2017-04-05 11:49
[    0.727319] clocksource: Switched to clocksource arch_sys_counter
[    0.778224] FS-Cache: Loaded
[    0.781390] CacheFiles: Loaded
[    0.796760] NET: Registered protocol family 2
[    0.802006] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.809204] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.815843] TCP: Hash tables configured (established 8192 bind 8192)
[    0.822339] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.828334] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.834928] NET: Registered protocol family 1
[    0.839714] RPC: Registered named UNIX socket transport module.
[    0.845655] RPC: Registered udp transport module.
[    0.850399] RPC: Registered tcp transport module.
[    0.855120] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.862620] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 7 counters available
[    0.872093] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.891521] VFS: Disk quotas dquot_6.6.0
[    0.895755] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.905004] FS-Cache: Netfs 'nfs' registered for caching
[    0.911242] NFS: Registering the id_resolver key type
[    0.916343] Key type id_resolver registered
[    0.920561] Key type id_legacy registered
[    0.926969] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.934544] io scheduler noop registered
[    0.938541] io scheduler deadline registered (default)
[    0.943742] io scheduler cfq registered
[    0.950189] BCM2708FB: allocated DMA memory fac10000
[    0.955189] BCM2708FB: allocated DMA channel 0 @ f3007000
[    1.010622] Console: switching to colour frame buffer device 228x61
[    1.046927] bcm2835-rng 3f104000.rng: hwrng registered
[    1.052316] vc-cma: Videocore CMA driver
[    1.056346] vc-cma: vc_cma_base      = 0x00000000
[    1.061192] vc-cma: vc_cma_size      = 0x00000000 (0 MiB)
[    1.066737] vc-cma: vc_cma_initial   = 0x00000000 (0 MiB)
[    1.072497] vc-mem: phys_addr:0x00000000 mem_base=0x3dc00000 mem_size:0x3f000000(1008 MiB)
[    1.096185] brd: module loaded
[    1.108150] loop: module loaded
[    1.112335] vchiq: vchiq_init_state: slot_zero = 0xbac80000, is_master = 0
[    1.120996] Loading iSCSI transport class v2.0-870.
[    1.126712] usbcore: registered new interface driver smsc95xx
[    1.132696] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    1.338896] Core Release: 2.80a
[    1.342132] Setting default values for core params
[    1.347075] Finished setting default values for core params
[    1.553205] Using Buffer DMA mode
[    1.556616] Periodic Transfer Interrupt Enhancement - disabled
[    1.562620] Multiprocessor Interrupt Enhancement - disabled
[    1.568354] OTG VER PARAM: 0, OTG VER FLAG: 0
[    1.572832] Dedicated Tx FIFOs mode
[    1.576743] WARN::dwc_otg_hcd_init:1047: FIQ DMA bounce buffers: virt = 0xbac04000 dma = 0xfac04000 len=9024
[    1.586870] FIQ FSM acceleration enabled for :
Non-periodic Split Transactions
Periodic Split Transactions
High-Speed Isochronous Endpoints
Interrupt/Control Split Transaction hack enabled
[    1.616640] dwc_otg: Microframe scheduler enabled
[    1.616720] WARN::hcd_init_fiq:415: FIQ on core 1 at 0x80448d28
[    1.629646] WARN::hcd_init_fiq:416: FIQ ASM at 0x80449098 length 36
[    1.642892] WARN::hcd_init_fiq:441: MPHI regs_base at 0xbb87e000
[    1.655827] dwc_otg 3f980000.usb: DWC OTG Controller
[    1.667704] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[    1.681998] dwc_otg 3f980000.usb: irq 62, io mem 0x00000000
[    1.694489] Init: Port Power? op_state=1
[    1.705183] Init: Power Port (0)
[    1.715347] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.729025] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.743106] usb usb1: Product: DWC OTG Controller
[    1.754706] usb usb1: Manufacturer: Linux 4.4.50-v7+ dwc_otg_hcd
[    1.767715] usb usb1: SerialNumber: 3f980000.usb
[    1.780047] hub 1-0:1.0: USB hub found
[    1.790651] hub 1-0:1.0: 1 port detected
[    1.801888] dwc_otg: FIQ enabled
[    1.801897] dwc_otg: NAK holdoff enabled
[    1.801906] dwc_otg: FIQ split-transaction FSM enabled
[    1.801941] Module dwc_common_port init
[    1.802250] usbcore: registered new interface driver usb-storage
[    1.815349] mousedev: PS/2 mouse device common for all mice
[    1.828474] bcm2835-cpufreq: min=600000 max=1200000
[    1.840291] sdhci: Secure Digital Host Controller Interface driver
[    1.853167] sdhci: Copyright(c) Pierre Ossman
[    1.866462] sdhost: log_buf @ bac07000 (fac07000)
[    1.937355] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[    1.972105] mmc-bcm2835 3f300000.mmc: mmc_debug:0 mmc_debug2:0
[    1.984653] mmc-bcm2835 3f300000.mmc: DMA channel allocated
[    1.997417] Indeed it is in host mode hprt0 = 00021501
[    2.027435] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.041320] ledtrig-cpu: registered to indicate activity on CPUs
[    2.054679] hidraw: raw HID events driver (C) Jiri Kosina
[    2.067022] mmc0: MAN_BKOPS_EN bit is not set
[    2.078458] usbcore: registered new interface driver usbhid
[    2.079945] mmc0: new high speed MMC card at address 0001
[    2.080550] mmcblk0: mmc0:0001 4FPD3R 3.64 GiB
[    2.080825] mmcblk0boot0: mmc0:0001 4FPD3R partition 1 4.00 MiB
[    2.081073] mmcblk0boot1: mmc0:0001 4FPD3R partition 2 4.00 MiB
[    2.081332] mmcblk0rpmb: mmc0:0001 4FPD3R partition 3 512 KiB
[    2.091552]  mmcblk0: p1 p2
[    2.122146] mmc1: queuing unknown CIS tuple 0x01 (3 bytes)
[    2.129514] mmc1: queuing unknown CIS tuple 0x1a (5 bytes)
[    2.132721] mmc1: queuing unknown CIS tuple 0x1b (8 bytes)
[    2.135435] mmc1: queuing unknown CIS tuple 0x80 (1 bytes)
[    2.135516] mmc1: queuing unknown CIS tuple 0x81 (1 bytes)
[    2.135605] mmc1: queuing unknown CIS tuple 0x82 (1 bytes)
[    2.135646] mmc1: new high speed SDIO card at address 0001
[    2.197370] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    2.198025] Indeed it is in host mode hprt0 = 00001101
[    2.270191] usbhid: USB HID core driver
[    2.280946] Initializing XFRM netlink socket
[    2.291558] NET: Registered protocol family 17
[    2.302361] Key type dns_resolver registered
[    2.313342] Registering SWP/SWPB emulation handler
[    2.325148] registered taskstats version 1
[    2.335383] vc-sm: Videocore shared memory driver
[    2.346142] [vc_sm_connected_init]: start
[    2.356709] [vc_sm_connected_init]: end - returning 0
[    2.368057] of_cfs_init
[    2.376532] of_cfs_init: OK
[    2.396127] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    2.410436] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    2.417572] usb 1-1: New USB device found, idVendor=8564, idProduct=4000
[    2.417582] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    2.417589] usb 1-1: Product: USB2.0 Hub
[    2.417596] usb 1-1: Manufacturer: Transcend
[    2.419462] hub 1-1:1.0: USB hub found
[    2.421132] hub 1-1:1.0: 4 ports detected
[    2.496799] devtmpfs: mounted
[    2.506494] Freeing unused kernel memory: 476K (807eb000 - 80862000)
[    2.697361] usb 1-1.1: new low-speed USB device number 3 using dwc_otg
[    2.767064] random: systemd: uninitialized urandom read (16 bytes read, 65 bits of entropy available)
[    2.786463] systemd[1]: systemd 215 running in system mode. (+PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR)
[    2.806867] systemd[1]: Detected architecture 'arm'.
[    2.831635] usb 1-1.1: New USB device found, idVendor=413c, idProduct=2113
[    2.831645] usb 1-1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[    2.831653] usb 1-1.1: Product: Dell KB216 Wired Keyboard
[    2.861683] input: Dell KB216 Wired Keyboard as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1:1.0/0003:413C:2113.0001/input/input0
[    2.918204] hid-generic 0003:413C:2113.0001: input,hidraw0: USB HID v1.11 Keyboard [Dell KB216 Wired Keyboard] on usb-3f980000.usb-1.1/input0
[    2.949509] input: Dell KB216 Wired Keyboard as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1:1.1/0003:413C:2113.0002/input/input1
[    3.027775] hid-generic 0003:413C:2113.0002: input,hidraw1: USB HID v1.11 Device [Dell KB216 Wired Keyboard] on usb-3f980000.usb-1.1/input1
[    3.034249] NET: Registered protocol family 10
[    3.061156] systemd[1]: Inserted module 'ipv6'
[    3.074686] systemd[1]: Set hostname to <raspberrypi>.
[    3.087576] random: systemd: uninitialized urandom read (16 bytes read, 69 bits of entropy available)
[    3.104620] systemd[1]: Initializing machine ID from random generator.
[    3.119139] systemd[1]: Installed transient /etc/machine-id file.
[    3.147383] usb 1-1.2: new high-speed USB device number 4 using dwc_otg
[    3.200307] uart-pl011 3f201000.uart: no DMA platform data
[    3.233128] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 70 bits of entropy available)
[    3.268831] usb 1-1.2: New USB device found, idVendor=7392, idProduct=7811
[    3.284003] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.299529] usb 1-1.2: Product: 802.11n WLAN Adapter
[    3.312634] usb 1-1.2: Manufacturer: Realtek
[    3.325058] usb 1-1.2: SerialNumber: 00e04c000001
[    3.378651] random: systemd: uninitialized urandom read (16 bytes read, 73 bits of entropy available)
[    3.397803] random: systemd: uninitialized urandom read (16 bytes read, 73 bits of entropy available)
[    3.417003] random: systemd: uninitialized urandom read (16 bytes read, 73 bits of entropy available)
[    3.448366] random: systemd: uninitialized urandom read (16 bytes read, 73 bits of entropy available)
[    3.466996] random: systemd: uninitialized urandom read (16 bytes read, 73 bits of entropy available)
[    3.484779] random: systemd: uninitialized urandom read (16 bytes read, 73 bits of entropy available)
[    3.527637] random: systemd: uninitialized urandom read (16 bytes read, 74 bits of entropy available)
[    3.642767] systemd[1]: Cannot add dependency job for unit regenerate_ssh_host_keys.service, ignoring: Unit regenerate_ssh_host_keys.service failed to load: No such file or directory.
[    3.668371] systemd[1]: Cannot add dependency job for unit display-manager.service, ignoring: Unit display-manager.service failed to load: No such file or directory.
[    3.695096] systemd[1]: Expecting device dev-ttyAMA0.device...
[    3.719489] systemd[1]: Starting Forward Password Requests to Wall Directory Watch.
[    3.736304] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    3.752939] systemd[1]: Starting Remote File Systems (Pre).
[    3.777281] systemd[1]: Reached target Remote File Systems (Pre).
[    3.792484] systemd[1]: Starting Encrypted Volumes.
[    3.816243] systemd[1]: Reached target Encrypted Volumes.
[    3.830816] systemd[1]: Starting Arbitrary Executable File Formats File System Automount Point.
[    3.859166] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[    3.877941] systemd[1]: Starting Swap.
[    3.901066] systemd[1]: Reached target Swap.
[    3.914825] systemd[1]: Expecting device dev-disk-by\x2dpartuuid-b3ba6501\x2d01.device...
[    3.943023] systemd[1]: Starting Root Slice.
[    3.967099] systemd[1]: Created slice Root Slice.
[    3.981147] systemd[1]: Starting User and Session Slice.
[    4.005658] systemd[1]: Created slice User and Session Slice.
[    4.020597] systemd[1]: Starting /dev/initctl Compatibility Named Pipe.
[    4.046500] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[    4.062753] systemd[1]: Starting Delayed Shutdown Socket.
[    4.086917] systemd[1]: Listening on Delayed Shutdown Socket.
[    4.101459] systemd[1]: Starting Journal Socket (/dev/log).
[    4.124947] systemd[1]: Listening on Journal Socket (/dev/log).
[    4.139188] systemd[1]: Starting udev Control Socket.
[    4.161693] systemd[1]: Listening on udev Control Socket.
[    4.175395] systemd[1]: Starting udev Kernel Socket.
[    4.197358] systemd[1]: Listening on udev Kernel Socket.
[    4.210899] systemd[1]: Starting Journal Socket.
[    4.232344] systemd[1]: Listening on Journal Socket.
[    4.245336] systemd[1]: Starting System Slice.
[    4.266273] systemd[1]: Created slice System Slice.
[    4.279129] systemd[1]: Starting File System Check on Root Device...
[    4.337946] systemd[1]: Starting system-systemd\x2dfsck.slice.
[    4.362214] systemd[1]: Created slice system-systemd\x2dfsck.slice.
[    4.376962] systemd[1]: Starting system-getty.slice.
[    4.400327] systemd[1]: Created slice system-getty.slice.
[    4.414852] systemd[1]: Starting system-serial\x2dgetty.slice.
[    4.438559] systemd[1]: Created slice system-serial\x2dgetty.slice.
[    4.453270] systemd[1]: Starting Increase datagram queue length...
[    4.479484] systemd[1]: Starting Restore / save the current clock...
[    4.508857] systemd[1]: Mounting POSIX Message Queue File System...
[    4.534895] systemd[1]: Mounted Huge Pages File System.
[    4.549375] systemd[1]: Mounting Debug File System...
[    4.576336] systemd[1]: Starting Create list of required static device nodes for the current kernel...
[    4.608352] systemd[1]: Started Set Up Additional Binary Formats.
[    4.622806] systemd[1]: Starting udev Coldplug all Devices...
[    4.653986] systemd[1]: Starting Load Kernel Modules...
[    4.680266] systemd[1]: Starting Slices.
[    4.702291] systemd[1]: Reached target Slices.
[    4.727523] systemd[1]: Mounted Debug File System.
[    4.748755] systemd[1]: Mounted POSIX Message Queue File System.
[    4.772304] systemd[1]: Started File System Check on Root Device.
[    4.804709] systemd[1]: Started Increase datagram queue length.
[    4.828284] systemd[1]: Started Restore / save the current clock.
[    4.853301] systemd[1]: Started Create list of required static device nodes for the current kernel.
[    4.918786] systemd[1]: Started Load Kernel Modules.
[    4.936639] systemd[1]: Time has been changed
[    4.968270] systemd[1]: Started udev Coldplug all Devices.
[    5.121698] systemd[1]: Mounting Configuration File System...
[    5.177805] systemd[1]: Starting Apply Kernel Variables...
[    5.203711] systemd[1]: Mounted FUSE Control File System.
[    5.218094] systemd[1]: Starting Create Static Device Nodes in /dev...
[    5.245905] systemd[1]: Starting Syslog Socket.
[    5.255868] systemd[1]: Listening on Syslog Socket.
[    5.256069] systemd[1]: Starting Journal Service...
[    5.278990] systemd[1]: Started Journal Service.
[    5.457049] systemd-udevd[139]: starting version 215
[    5.656214] bcm2835-wdt 3f100000.watchdog: Broadcom BCM2835 watchdog timer
[    5.677881] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[    6.177696] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    6.459503] systemd-journald[137]: Received request to flush runtime journal from PID 1
[    7.070599] random: nonblocking pool is initialized
[    7.100477] cfg80211: World regulatory domain updated:
[    7.100507] cfg80211:  DFS Master region: unset
[    7.100518] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[    7.100537] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[    7.100551] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[    7.100566] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[    7.100581] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[    7.100596] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[    7.100609] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[    7.100621] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[    7.100635] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[    7.118458] usbcore: registered new interface driver rtl8192cu
[    8.080975] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[    8.151987] cfg80211: Regulatory domain changed to country: GB
[    8.152011] cfg80211:  DFS Master region: ETSI
[    8.152021] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[    8.152036] cfg80211:   (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[    8.152050] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[    8.152065] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[    8.152077] cfg80211:   (5490000 KHz - 5710000 KHz @ 160000 KHz), (N/A, 2700 mBm), (0 s)
[    8.152090] cfg80211:   (57000000 KHz - 66000000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)
[    9.633226] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   13.823289] Adding 102396k swap on /var/swap.  Priority:-1 extents:5 across:200700k SSFS
[  337.596051] 
***** EAGLE DRIVER VER:bdf5087c3deb*****

[  337.596140] ESP8089 reset via GPIO 0
[  337.797453] eagle_sdio_dummy: probe of mmc1:0001:1 failed with error -110
[  338.137544] mmc1: card 0001 removed
[  338.201960] mmc1: queuing unknown CIS tuple 0x01 (3 bytes)
[  338.209088] mmc1: queuing unknown CIS tuple 0x1a (5 bytes)
[  338.212176] mmc1: queuing unknown CIS tuple 0x1b (8 bytes)
[  338.214132] mmc1: queuing unknown CIS tuple 0x80 (1 bytes)
[  338.214184] mmc1: queuing unknown CIS tuple 0x81 (1 bytes)
[  338.214234] mmc1: queuing unknown CIS tuple 0x82 (1 bytes)
[  338.214263] mmc1: new high speed SDIO card at address 0001
[  338.214557] esp_sdio_dummy_probe enter
[  338.417334] esp_sdio_init power up OK
[  348.677354] resetting event timeout
[  348.677380] esp_init_all failed: -110
[  348.677389] first error exit
Attachments
whatever.zip
(3.92 KiB) Downloaded 86 times

kralc
Posts: 8
Joined: Wed May 03, 2017 5:08 pm

Re: SDIO for Wifi/Bluetooth module

Wed May 03, 2017 5:16 pm

Hello,

I am attempting to load the SDIO overlay into a HAT EEPROM. I can get the overlay to work with poll_once on (i.e. in it's default state), but I would like poll_once off as this is to be used with SD cards which may be changed.

I have tried removing the "non-removable;" line and recompiling the overlay, but this doesn't work. Any suggestions?

EEPROM writing process (where eeprom.dts is a copy of https://github.com/raspberrypi/linux/bl ... verlay.dts):

Code: Select all

dtc [email protected] -I dts -O dtb -o eeprom.dtbo overlays/eeprom.dts
./eepmake eeprom_settings.txt eeprom.eep eeprom.dtbo
sudo ./eepflash.sh -w -f=eeprom.eep -t=24c64

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1906
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: SDIO for Wifi/Bluetooth module

Thu May 04, 2017 10:38 am

It is a fundamental limitation of the overlay mechanism that it doesn't permit a property to be deleted, only overwritten. As you have discovered, this is a particular problem for boolean properties like "non-removable", which are true if present and false if absent - the content is irrelevant.

Up to now I have tried to keep the capabilities of the firmware overlay mechanism the same as the run-time kernel overlay mechanism, but perhaps this is an area where I should allow it differ since there is no workaround.

kralc
Posts: 8
Joined: Wed May 03, 2017 5:08 pm

Re: SDIO for Wifi/Bluetooth module

Thu May 04, 2017 1:02 pm

Could this be worked around by replacing the boolean value with an int or hex value, acting as a bool? So, 0 = off and non-zero is on?
The other solution would be to default to the false state, which is straightforward to overwrite, but I understand this can introduce problems with other SDIO hardware so is not ideal.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1906
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: SDIO for Wifi/Bluetooth module

Thu May 04, 2017 1:16 pm

"non-removable" is a standard property used by the MMC framework. Changing it would diverge from the upstream in kernel in ways I'm not happy with.

What platform are you on? I've noticed that the CM and CM3 dtbs set "non-removable" when there is no good reason to - only Pi3 and Pi0W should be defining it. I'll look into removing it, then your problem will be solved.

kralc
Posts: 8
Joined: Wed May 03, 2017 5:08 pm

Re: SDIO for Wifi/Bluetooth module

Thu May 04, 2017 1:46 pm

I'm currently using the Pi 3.

I agree it is undesirable to diverge from the upstream standards. Another possiblility would be to manually perform a poll - if I ran a separate daemon which looked for the presence (or lack) of an SD card, then I could leave the device overlay as-is. Do you know if that is possible?

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1906
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: SDIO for Wifi/Bluetooth module

Thu May 04, 2017 2:17 pm

If the non-removable property is set then the mmc_rescan method exits early when called more than once.

There is a workaround you could try - it's a bit ugly but should work. The idea is to use your overlay to disable the existing "mmc" node, then create a clone with a different name that contains just the elements that you want, i.e. without the non-removable property. I think you should also be able to skip the '/include/ "sdhost-overlay.dts"' - it should no longer be necessary, and it's about time I reviewed some of the existing overlays to look for similar anachronisms.

kralc
Posts: 8
Joined: Wed May 03, 2017 5:08 pm

Re: SDIO for Wifi/Bluetooth module

Fri May 05, 2017 9:11 am

I've been having a go at creating a replacement MMC node, but I'm not having much luck. I haven't got much device tree experiance, so I'm probably missing something obvious. My latest attempt is shown below (calling the new node "mmcb"):

Code: Select all

/dts-v1/;
/plugin/;

/{
        compatible = "brcm,bcm2708";

        /delete-node/ [email protected];

        [email protected]{
                target = <&soc>;
                mmcb: [email protected] {
                        reg = <0x7e300000 0x100>;
                        dmas = <0xa 0xb>;
                        interrupts = <0x2 0x1e>;
                        pinctrl-0 = <0x52>;
                        compatible = "brcm,bcm2835-mmc";
                        bus-width = <0x4>;
                        clocks = <0x16>;
                        status = "okay";
                        phandle = <0x38>;
                        brcm,overclock-50 = <0x0>;
                        dma-names = "rx-tx";
                        pinctrl-names = "default";
                };
        };

        [email protected] {
                target = <&mmcb>;
                frag1: __overlay__ {
                        pinctrl-0 = <&mmc_pins>;
                };
        };

        [email protected] {
                target = <&gpio>;
                __overlay__ {
                        mmc_pins: mmc_pins {
                                brcm,pins = <22 23 24 25 26 27>;
                                brcm,function = <7 7 7 7 7 7>; /* ALT3 = SD1 */
                                brcm,pull = <0 2 2 2 2 2>;
                        };
                };
        };

        [email protected] {
                target = <&sdhost>;
                __overlay__ {
                        status = "okay";
                };
        };
};

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1906
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: SDIO for Wifi/Bluetooth module

Fri May 05, 2017 9:38 am

OK, that's a good attempt but there are some errors:

1. I wish /delete-node/ worked in an overlay, but it doesn't. It exists to allow you to include a dtsi file but leave out some bits - once you compile it to a dtb (or dtbo) then the fact that you deleted something is lost (although the node you deleted stays deleted). As a result, when you apply that overlay it doesn't result in the deletion of that node in the base dtb. What you need to do here is to disable the existing mmc node, not delete it, by setting its status to "disabled".

2. A word/name followed by a colon is a label attached to a node, not the name of the node. Labels are global, i.e. they can be used in place of complete paths, whereas node names are local to their parent node. Labels in overlays (currently) don't survive the application process - you can't add a new label to the base dtb or change an existing one. This means you can call your labels anything you like, but the node name matters, so your first fragment would begin like this:

Code: Select all

        [email protected]{
                target = <&soc>;
                mmcb: [email protected] {
                        reg = <0x7e300000 0x100>;
3. Labels get converted to phandles - effectively integer labels - with the values vary depending on the number and order of the labels. When you write your overlay you need to copy the source of the mmc node, not the decompiled version - see https://github.com/raspberrypi/linux/bl ... x.dtsi#L76 and https://github.com/raspberrypi/linux/bl ... -b.dts#L82. Just copy all of the properties scattered across multiple source files into your new node - the decompiled version will help you to make sure you've found them all.

4. Notice that in the base dtb the mmc node already has a pinctrl-0 property pointing to sdio_pins. What not modify that to change the pin assignments rather than create a new node? "target = <&sdio_pins>;"...

5. You don't need fragment 4 - the sdhost node is already enabled by default.

kralc
Posts: 8
Joined: Wed May 03, 2017 5:08 pm

Re: SDIO for Wifi/Bluetooth module

Fri May 05, 2017 12:06 pm

Thanks for the help - I'm starting to understand this better. However, after making the adjustments you suggested I have a problem with the line "clocks = <&clocks BCM2835_CLOCK_EMMC>;" throwing a syntax error when compiling. Omiting or manually attemping values causes the Pi to fail at boot (I supect this is becuase the old MMC node is being disabled, but the new one can't be initialised without this vaue.)

I've had a search through the GitHub repository, but the only possible value I could find was 28 (which I also see in my working device tree for the default mmc node) but this doesn't work - presumably this gets interpreted somehow at compile time.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1906
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: SDIO for Wifi/Bluetooth module

Fri May 05, 2017 12:16 pm

The standard dtb source files have the following includes:

Code: Select all

#include <dt-bindings/pinctrl/bcm2835.h>
#include <dt-bindings/clock/bcm2835.h>
#include <dt-bindings/clock/bcm2835-aux.h>
#include <dt-bindings/gpio/gpio.h>
The file you want is here: https://github.com/raspberrypi/linux/bl ... /bcm2835.h

kralc
Posts: 8
Joined: Wed May 03, 2017 5:08 pm

Re: SDIO for Wifi/Bluetooth module

Fri May 05, 2017 2:19 pm

I cannot get the dts file to compile when I include the header file - I have tried rearranging the lines and changing the location of the file, but every time it fails and the error follows the #include line. Nor can I find examples online of people including a .h file in their Pi overlay.

Below is the command I am using (and the generated output) and the input file, eeprom.dts. File bcm2835.h is in the same directory. Are you able to get this to compile? Perhaps I have not configured my compiler correctly?

Again, thank you for your help - I always seem to end up just short of where I need to be!

Code: Select all

$ dtc [email protected] -I dts -O dtb -o eeprom.dtbo eeprom.dts
Error: eeprom.dts:4.1-9 syntax error
FATAL ERROR: Unable to parse input tree

Code: Select all

/dts-v1/;
/plugin/;

#include <bcm2835.h>

/{
        compatible = "brcm,bcm2708";

        [email protected]{
                target = <&soc>;
                mmc: __overlay__ {
                        status = "disabled";
                };
        };

        [email protected]{
                target = <&soc>;
                mmcb: [email protected] {
                        compatible = "brcm,bcm2835-mmc";
                        reg = <0x7e300000 0x100>;
                        interrupts = <2 30>;
                        clocks = <&clocks BCM2835_CLOCK_EMMC>;
                        dmas = <&dma 11>;
                        dma-names = "rx-tx";
                        brcm,overclock-50 = <0>;
                        status = "okay";
                        pinctrl-names = "default";
                        pinctrl-0 = <&mmc_pins>;
                        bus-width = <4>;
                };
        };

        [email protected] {
                target = <&gpio>;
                __overlay__ {
                        mmc_pins: mmc_pins {
                                brcm,pins = <22 23 24 25 26 27>;
                                brcm,function = <7 7 7 7 7 7>; /* ALT3 = SD1 */
                                brcm,pull = <0 2 2 2 2 2>;
                        };
                };
        };
};

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1906
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: SDIO for Wifi/Bluetooth module

Fri May 05, 2017 2:31 pm

The DT compiler doesn't automatically run cpp on the input files - that is done by the kernel Makefiles before passing the output to dtc. You need to move your overlay into the kernel tree, run cpp yourself, giving it a suitable include path, or replace the symbol with the correct value as found in the header file - in this case 28.

A few more errors:

Code: Select all

        [email protected]{
                target = <&soc>;
                mmc: __overlay__ {
                        status = "disabled";
                };
        };
The label here doesn't do anything useful. You need to change the target to "<&mmc>".

Code: Select all

        [email protected]{
                target = <&soc>;
                mmcb: [email protected] {
Here you've missed out the "__overlay__" node in the hierarchy.

Code: Select all

                       pinctrl-0 = <&mmc_pins>;
                        bus-width = <4>;
                };
        };

        [email protected] {
                target = <&gpio>;
                __overlay__ {
                        mmc_pins: mmc_pins {
                                brcm,pins = <22 23 24 25 26 27>;
                                brcm,function = <7 7 7 7 7 7>; /* ALT3 = SD1 */
                                brcm,pull = <0 2 2 2 2 2>;
                        };
This isn't wrong, but you could leave "pinctrl-0 = <&sdio_pins>;" and make fragment 3 just say:

Code: Select all

        [email protected] {
                target = <&sdio_pins>;
                __overlay__ {
                        brcm,pins = <22 23 24 25 26 27>;
                };
        };

kralc
Posts: 8
Joined: Wed May 03, 2017 5:08 pm

Re: SDIO for Wifi/Bluetooth module

Fri May 05, 2017 3:35 pm

It works! For the benefit of future forum-browsers, the DTS file is below. I needed to use <7 28> as the clocks value in the end, copied from the mmc node - which I had tried, so I think it was the other points causing it to fail but previous issues were misdirecting me.

There is one interesing quirk. If the Pi is booted with no card in the second slot, inserting one causes an issue (manifested to me as a drop of the SSH session and can't reconnect without power-cycling, but this may be a secondary symptom.) Boot with the SD card in place, and you can dis- and re-connect no problem!

Thanks again, Phil.

Code: Select all

/dts-v1/;
/plugin/;

/{
        compatible = "brcm,bcm2708";

        [email protected]{
                target = <&mmc>;
                __overlay__ {
                        status = "disabled";
                };
        };

        [email protected]{
                target = <&soc>;
                __overlay__ {
                        mmcb: [email protected] {
                                compatible = "brcm,bcm2835-mmc";
                                reg = <0x7e300000 0x100>;
                                interrupts = <2 30>;
                                clocks = <&clocks 28>;
                                dmas = <&dma 11>;
                                dma-names = "rx-tx";
                                brcm,overclock-50 = <0>;
                                status = "okay";
                                pinctrl-names = "default";
                                pinctrl-0 = <&sdio_pins>;
                                bus-width = <4>;
                        };
                };
        };

        [email protected] {
                target = <&sdio_pins>;
                __overlay__ {
                        brcm,pins = <22 23 24 25 26 27>;
                };
        };

};
Code since edited: See posts below.
Last edited by kralc on Fri May 05, 2017 3:49 pm, edited 1 time in total.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1906
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: SDIO for Wifi/Bluetooth module

Fri May 05, 2017 3:40 pm

Can you try with "clocks = <&clocks 28>;"? I'm worried that a hard-coded phandle (which is what your "7" is) will break if the base dtb ever changes.

kralc
Posts: 8
Joined: Wed May 03, 2017 5:08 pm

Re: SDIO for Wifi/Bluetooth module

Fri May 05, 2017 3:48 pm

Changed to "clocks = <&clocks 28>;" and it works the same - I'll update my DTS file above to reflect this.

Return to “Compute Module”