cancel
Showing results for 
Search instead for 
Did you mean: 

Wi-Fi Bluetooth for Linux

SeSo_4694526
New Contributor

I would like to add Wifi and Bluetooth 5 capabilities to a my own embedded system. I am using the Cypress CYW43455 chipset .

Does anybody knows or has documentation about how to connect the SDIO (WiFi) and UART 4-wires (Bluetooth) interfaces between this module and the Embedded Module ARM Cortex A5 ?

I already build kernel with cypress’s driver

The system boot, but I don’t know why mmc1 is not recognize as new high speed SDHC?

root@OpenWrt:~# dmesg | grep mmc0

[    1.410000] mmc0: SDHCI controller on a0000000.sdio-host [a0000000.sdio-host] using ADMA

[    1.470000] mmc0: new high speed SDHC card at address 1234

[    1.480000] mmcblk0: mmc0:1234 SA08G 7.21 GiB

root@OpenWrt:~# dmesg | grep mmc1

[    1.490000] mmc1: SDHCI controller on b0000000.sdio-host [b0000000.sdio-host] using ADMA

When I check the modules involved I see they are loaded

root@OpenWrt:~# find /lib/modules/

/lib/modules/4.14.171/brcmfmac.ko

/lib/modules/4.14.171/brcmutil.ko

/lib/modules/4.14.171/cfg80211.ko

/lib/modules/4.14.171/compat.ko

root@OpenWrt:~# ls /lib/wifi/

mac80211.sh

But if if check the ifconfig, the wifi interface not exist

root@OpenWrt:~# ifconfig

eth0      Link encap:Ethernet  HWaddr 3A:8C:D2:08:DD:E8

          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fe80::388c:d2ff:fe08:dde8/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:114424 errors:0 dropped:0 overruns:0 frame:0

          TX packets:40496 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:140422453 (133.9 MiB)  TX bytes:6601581 (6.2 MiB)

          Interrupt:30 Base address:0x8000

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:65536  Metric:1

          RX packets:5293 errors:0 dropped:0 overruns:0 frame:0

          TX packets:5293 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:378236 (369.3 KiB)  TX bytes:378236 (369.3 KiB)

0 Likes
1 Solution
KaNa_3391246
Valued Contributor II

Hi SeSo_4694526,

Please let me explain about it in detail.

At insmod, FMAC driver needs the following files for chip.

1) FW

2) NVRAM

3) CLM BLOB

And FMAC expects these files to have a specific location and filename.

1) /lib/firmware/brcm/brcmfmac<chip_name>_<interface>.bin

2) /lib/firmware/brcm/brcmfmac<chip_name>_<interface>.txt

3) /lib/firmware/brcm/brcmfmac<chip_name>_<interface>.clm_blob

For example, when using CYW43455 on SDIO interface:

1) /lib/firmware/brcm/brcmfmac43455_sdio.bin

2) /lib/firmware/brcm/brcmfmac43455_sdio.txt

3) /lib/firmware/brcm/brcmfmac43455_sdio.clm_blob

I would appreciate if you could verify the directory '/lib/firmware/brcm/' in your custom design.

Best regards,

KaNa_3391246

View solution in original post

0 Likes
16 Replies
GauravS_31
Moderator
Moderator

The interface connection between Wi-Fi/BT and host is usually documented in the EVK vendor's user manual or application note. For instance, if you have used NXP host processor and Murata module, I am aware of "Murata Wi-Fi/Bluetooth EVK for i.MX Hardware User Manual 1.0". To load the modules, you can use the following commands:

insmod /lib/modules/4.14.171/compat.ko

   

insmod /lib/modules/4.14.171/cfg80211.ko

   

insmod /lib/modules/4.14.171/brcmutil.ko

   

insmod /lib/modules/4.14.171/brcmfmac.ko

You can use lsmod command to verify if the modules are loaded. The ifconfig should then work.

SeSo_4694526
New Contributor

Thanks for your response

When i check all the modules are loaded

root@OpenWrt:~# insmod /lib/modules/4.14.171/compat.ko

module is already loaded - compat

root@OpenWrt:~# insmod /lib/modules/4.14.171/cfg80211.ko

module is already loaded - cfg80211

root@OpenWrt:~# insmod /lib/modules/4.14.171/brcmutil.ko

module is already loaded - brcmutil

root@OpenWrt:~# insmod /lib/modules/4.14.171/brcmfmac.ko

module is already loaded - brcmfmac

but the ifconfig don't show the wifi interfase

Maybe I am wrong in the path that I am using in /etc/config/wireless because I am using SDIO

root@OpenWrt:~# cat /etc/config/wireless
config wifi-device 'radio0'
        option type 'mac80211'
        option channel '6'
        option hwmode '11g'
        option htmode 'HT20'
        option path 'patform/soc_at_01c00000/1c12000.mmc/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
        option disable '0'
        option country ''

config wifi-iface
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'MyWiFiap'
        option encription 'psk2'
        option key 'detec wifi'

0 Likes
SeSo_4694526
New Contributor

Maybe the problem is in the SDIO detection because when I type the next command nothing is displayed

root@OpenWrt:~# dmesg | grep 'new high speed SDIO'

0 Likes
GauravS_31
Moderator
Moderator

I think the WLAN interface bring up has failed. I could see the message mmc0: new high speed SDIO card at address 0001 in my setup. Also the dmesg should contain the following:

[86580.840465] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac43455-sdio.bin for chip 0x004345(17221) rev 0x000006

[86580.856146] usbcore: registered new interface driver brcmfmac

[86581.023875] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Mar 23 2020 02:20:01 version 7.45.206 (r725000 CY) FWID 01-febaba43

Have you tested on an eval kit or custom design? Which FMAC release has been built? What is the firmware version being used? Can you share the dmesg logs? I want to check how the bringup is happening. In my setup, I have used version 7.45.206 as shown above and tested on i.Mx6 eval kit.

SeSo_4694526
New Contributor

Thanks for your response,

WiFi Esquematicos.png

Have you tested on an eval kit or custom design?

We have our custom design, with the module connected on the mmc1 corresponding tracks,

This is our schematic diagram

The wifi/BT module is connected to the ATMEL A5 processor via the MMC1 controller. The additional control lines a wired to general purpose I/O pines (such as the WIFI_regulator_ON pin).

Which FMAC release has been built?

All of these

respuesta 2.png

What is the firmware version being used?

I’m not sure, how could I check that?

Can you share the dmesg logs? I want to check how the bringup is happening. In my setup, I have used version 7.45.206 as shown above and tested on i.Mx6 eval kit.

 

[    0.000000] Booting Linux on physical CPU 0x0

[    0.000000] Linux version 4.14.171 (nestoram@nestoramASUS) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r10947-65030d81f3)) #0 Thu Feb 27 21:05:12 2020

[    0.000000] CPU: ARMv7 Processor [410fc051] revision 1 (ARMv7), cr=10c53c7d

[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache

[    0.000000] OF: fdt: Machine model: Atmel SAMA5D27 SOM1 EK

[    0.000000] Memory policy: Data cache writeback

[    0.000000] cma: Failed to reserve 64 MiB

[    0.000000] On node 0 totalpages: 32768

[    0.000000] free_area_init_node: node 0, pgdat c092cd70, node_mem_map c7efb000

[    0.000000]   Normal zone: 256 pages used for memmap

[    0.000000]   Normal zone: 0 pages reserved

[    0.000000]   Normal zone: 32768 pages, LIFO batch:7

[    0.000000] CPU: All CPU(s) started in SVC mode.

[    0.000000] random: get_random_bytes called from start_kernel+0x84/0x3b4 with crng_init=0

[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768

[    0.000000] pcpu-alloc: [0] 0

[    0.000000] Built 1 zonelists, mobility grouping off.  Total pages: 32512

[    0.000000] Kernel command line: console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rw rootwait

[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)

[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)

[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)

[    0.000000] Memory: 121208K/131072K available (5113K kernel code, 181K rwdata, 1600K rodata, 1024K init, 153K bss, 9864K reserved, 0K cma-reserved)

[    0.000000] Virtual kernel memory layout:

[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)

[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)

[    0.000000]     vmalloc : 0xc8800000 - 0xff800000   ( 880 MB)

[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)

[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)

[    0.000000]       .text : 0xc0008000 - 0xc05fe580   (6106 kB)

[    0.000000]       .init : 0xc0800000 - 0xc0900000   (1024 kB)

[    0.000000]       .data : 0xc0900000 - 0xc092d720   ( 182 kB)

[    0.000000]        .bss : 0xc092d720 - 0xc0953b74   ( 154 kB)

[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1

[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16

[    0.000000] L2C-310 ID prefetch enabled, offset 2 lines

[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled

[    0.000000] L2C-310 cache controller enabled, 8 ways, 128 kB

[    0.000000] L2C-310: CACHE_ID 0x410000c9, AUX_CTRL 0x36020000

[    0.000000] clocksource: pit: mask: 0x7ffffff max_cycles: 0x7ffffff, max_idle_ns: 11654027029 ns

[    0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns

[    0.050000] Calibrating delay loop... 326.86 BogoMIPS (lpj=1634304)

[    0.060000] pid_max: default: 32768 minimum: 301

[    0.060000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)

[    0.060000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)

[    0.060000] CPU: Testing write buffer coherency: ok

[    0.060000] Setting up static identity map for 0x20100000 - 0x20100060

[    0.070000] VFP support v0.3: implementor 41 architecture 2 part 30 variant 5 rev 1

[    0.070000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns

[    0.070000] futex hash table entries: 256 (order: -1, 3072 bytes)

[    0.070000] pinctrl core: initialized pinctrl subsystem

[    0.080000] NET: Registered protocol family 16

[    0.080000] DMA: preallocated 256 KiB pool for atomic coherent allocations

[    0.080000] cpuidle: using governor ladder

[    0.080000] cpuidle: using governor menu

[    0.120000] AT91: PM: standby: standby, suspend: ulp0

[    0.120000] tcb_clksrc: tc0 at 10.750 MHz

[    0.120000] clocksource: tcb_clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 186464433812 ns

[    0.160000] at_xdmac f0010000.dma-controller: 16 channels, mapped at 0xc888d000

[    0.160000] at_xdmac f0004000.dma-controller: 16 channels, mapped at 0xc888f000

[    0.160000] AT91: Could not find matching SoC description

[    0.160000] SCSI subsystem initialized

[    0.160000] usbcore: registered new interface driver usbfs

[    0.160000] usbcore: registered new interface driver hub

[    0.160000] usbcore: registered new device driver usb

[    0.160000] at91_i2c fc028000.i2c: could not find pctldev for node /ahb/apb/pinctrl@fc038000/i2c1_default, deferring probe

[    0.160000] Linux video capture interface: v2.00

[    0.170000] Advanced Linux Sound Architecture Driver Initialized.

[    0.180000] clocksource: Switched to clocksource tcb_clksrc

[    0.180000] NET: Registered protocol family 2

[    0.190000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)

[    0.190000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)

[    0.190000] TCP: Hash tables configured (established 1024 bind 1024)

[    0.190000] UDP hash table entries: 256 (order: 0, 4096 bytes)

[    0.190000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)

[    0.190000] NET: Registered protocol family 1

[    0.190000] No memory allocated for crashlog

[    0.190000] workingset: timestamp_bits=30 max_order=15 bucket_order=0

[    0.220000] io scheduler noop registered (default)

[    0.230000] pinctrl-at91-pio4 fc038000.pinctrl: atmel pinctrl initialized

[    0.230000] f8020000.serial: ttyS0 at MMIO 0xf8020000 (irq = 36, base_baud = 5125000) is a ATMEL_SERIAL

[    0.680000] console [ttyS0] enabled

[    0.690000] f8024000.serial: ttyS1 at MMIO 0xf8024000 (irq = 37, base_baud = 5125000) is a ATMEL_SERIAL

[    0.700000] fc00c000.serial: ttyS2 at MMIO 0xfc00c000 (irq = 40, base_baud = 5125000) is a ATMEL_SERIAL

[    0.720000] brd: module loaded

[    0.740000] loop: module loaded

[    0.740000] atmel_spi f8000000.spi: Using dma0chan0 (tx) and dma0chan1 (rx) for DMA transfers

[    0.750000] atmel_spi f8000000.spi: Using FIFO (16 data)

[    0.770000] atmel_spi f8000000.spi: Atmel SPI Controller version 0x311 at 0xf8000000 (irq 29)

[    0.780000] atmel_spi fc018400.spi: DMA TX channel not available, SPI unable to use DMA

[    0.780000] atmel_spi fc018400.spi: Atmel SPI Controller using PIO only

[    0.790000] atmel_spi fc018400.spi: Using FIFO (16 data)

[    0.800000] atmel_spi fc018400.spi: Atmel SPI Controller version 0x311 at 0xfc018400 (irq 178)

[    0.810000] libphy: Fixed MDIO Bus: probed

[    0.810000] macb f8008000.ethernet: invalid hw address, using random

[    0.820000] libphy: MACB_mii_bus: probed

[    0.930000] Micrel KSZ8081 or KSZ8091 f8008000.ethernet-ffffffff:00: attached PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=f8008000.ethernet-ffffffff:00, irq=177)

[    0.940000] macb f8008000.ethernet eth0: Cadence GEM rev 0x00020203 at 0xf8008000 irq 30 (96:cc:6d:ef:f3:52)

[    0.950000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver

[    0.960000] ehci-atmel: EHCI Atmel driver

[    0.960000] atmel-ehci 500000.ehci: EHCI Host Controller

[    0.970000] atmel-ehci 500000.ehci: new USB bus registered, assigned bus number 1

[    0.980000] atmel-ehci 500000.ehci: irq 19, io mem 0x00500000

[    1.010000] atmel-ehci 500000.ehci: USB 2.0 started, EHCI 1.00

[    1.010000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002

[    1.020000] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

[    1.030000] usb usb1: Product: EHCI Host Controller

[    1.030000] usb usb1: Manufacturer: Linux 4.14.171 ehci_hcd

[    1.040000] usb usb1: SerialNumber: 500000.ehci

[    1.040000] hub 1-0:1.0: USB hub found

[    1.050000] hub 1-0:1.0: 3 ports detected

[    1.050000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver

[    1.060000] ohci-platform: OHCI generic platform driver

[    1.060000] ohci-atmel: OHCI Atmel driver

[    1.070000] at91_ohci 400000.ohci: USB Host Controller

[    1.070000] at91_ohci 400000.ohci: new USB bus registered, assigned bus number 2

[    1.080000] at91_ohci 400000.ohci: irq 19, io mem 0x00400000

[    1.160000] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001

[    1.170000] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1

[    1.170000] usb usb2: Product: USB Host Controller

[    1.180000] usb usb2: Manufacturer: Linux 4.14.171 ohci_hcd

[    1.180000] usb usb2: SerialNumber: at91

[    1.190000] hub 2-0:1.0: USB hub found

[    1.190000] hub 2-0:1.0: 3 ports detected

[    1.200000] usbcore: registered new interface driver cdc_acm

[    1.210000] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

[    1.210000] usbcore: registered new interface driver usb-storage

[    1.220000] usbcore: registered new interface driver usbserial

[    1.230000] usbcore: registered new interface driver usbserial_generic

[    1.230000] usbserial: USB Serial support registered for generic

[    1.240000] usbcore: registered new interface driver ftdi_sio

[    1.240000] usbserial: USB Serial support registered for FTDI USB Serial Device

[    1.250000] usbcore: registered new interface driver pl2303

[    1.260000] usbserial: USB Serial support registered for pl2303

[    1.260000] rtc rtc0: invalid alarm value: 1900-1-1 0:0:0

[    1.270000] at91_rtc f80480b0.rtc: registered as rtc0

[    1.270000] at91_rtc f80480b0.rtc: AT91 Real Time Clock driver.

[    1.280000] i2c /dev entries driver

[    1.290000] AT91: Starting after general reset

[    1.290000] sama5d4_wdt f8048040.watchdog: initialized (timeout = 16 sec, nowayout = 0)

[    1.300000] sdhci: Secure Digital Host Controller Interface driver

[    1.310000] sdhci: Copyright(c) Pierre Ossman

[    1.310000] sdhci-pltfm: SDHCI platform and OF driver helper

[    1.320000] sdhci-at91 a0000000.sdio-host: update clk mul to 39 as gck rate is 480000000 Hz

[    1.400000] mmc0: SDHCI controller on a0000000.sdio-host [a0000000.sdio-host] using ADMA

[    1.400000] sdhci-at91 b0000000.sdio-host: update clk mul to 39 as gck rate is 480000000 Hz

[    1.470000] mmc0: new high speed SDHC card at address 1234

[    1.470000] mmcblk0: mmc0:1234 SA08G 7.21 GiB

[    1.480000]  mmcblk0: p1 p2

[    1.490000] mmc1: SDHCI controller on b0000000.sdio-host [b0000000.sdio-host] using ADMA

[    1.500000] ledtrig-cpu: registered to indicate activity on CPUs

[    1.500000] usbcore: registered new interface driver usbhid

[    1.510000] usbhid: USB HID core driver

[    1.520000] NET: Registered protocol family 10

[    1.530000] Segment Routing with IPv6

[    1.540000] NET: Registered protocol family 17

[    1.540000] 8021q: 802.1Q VLAN Support v1.8

[    1.560000] at91_i2c fc028000.i2c: can't get DMA channel, continue without DMA support

[    1.560000] at91_i2c fc028000.i2c: Using FIFO (16 data)

[    1.570000] at91_i2c fc028000.i2c: AT91 i2c bus driver (hw version: 0x704).

[    1.580000] input: gpio_keys as /devices/platform/gpio_keys/input/input0

[    1.590000] at91_rtc f80480b0.rtc: setting system clock to 2012-01-01 00:00:07 UTC (1325376007)

[    1.600000] ALSA device list:

[    1.600000]   No soundcards found.

[    1.610000] atmel_usart f8020000.serial: using dma0chan2 for rx DMA transfers

[    1.610000] atmel_usart f8020000.serial: using dma0chan3 for tx DMA transfers

[    1.650000] EXT4-fs (mmcblk0p2): warning: mounting unchecked fs, running e2fsck is recommended

[    1.680000] EXT4-fs (mmcblk0p2): mounted filesystem without journal. Opts: (null)

[    1.690000] VFS: Mounted root (ext4 filesystem) on device 179:2.

[    1.700000] Freeing unused kernel memory: 1024K

[    1.770000] random: fast init done

[    1.810000] init: Console is alive

[    1.810000] init: - watchdog -

[    2.100000] kmodloader: loading kernel modules from /etc/modules-boot.d/*

[    2.120000] ehci-platform: EHCI generic platform driver

[    2.130000] kmodloader: done loading kernel modules from /etc/modules-boot.d/*

[    2.150000] init: - preinit -

[    2.510000] random: jshn: uninitialized urandom read (4 bytes read)

[    2.580000] random: jshn: uninitialized urandom read (4 bytes read)

[    2.620000] random: jshn: uninitialized urandom read (4 bytes read)

[    2.670000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

[    2.680000] macb f8008000.ethernet eth0: link up (100/Full)

[    2.690000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

[    5.890000] mount_root: mounting /dev/root

[    5.900000] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)

[    5.910000] urandom-seed: Seeding with /etc/urandom.seed

[    5.990000] procd: - early -

[    6.000000] procd: - watchdog -

[    6.600000] procd: - watchdog -

[    6.610000] procd: - ubus -

[    6.630000] random: ubusd: uninitialized urandom read (4 bytes read)

[    6.660000] random: ubusd: uninitialized urandom read (4 bytes read)

[    6.670000] random: ubusd: uninitialized urandom read (4 bytes read)

[    6.680000] procd: - init -

[    7.310000] kmodloader: loading kernel modules from /etc/modules.d/*

[    7.400000] NET: Registered protocol family 15

[    7.410000] urngd: v1.0.2 started.

[    7.420000] Initializing XFRM netlink socket

[    7.480000] ip6_tables: (C) 2000-2006 Netfilter Core Team

[    7.580000] Loading modules backported from Linux version v4.19.98-0-gd183c8e2647a

[    7.580000] Backport generated by backports.git v4.19.98-1-0-g8204eb99

[    7.610000] ip_tables: (C) 2000-2006 Netfilter Core Team

[    7.630000] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)

[    7.710000] random: crng init done

[    7.720000] random: 4 urandom warning(s) missed due to ratelimiting

[    7.820000] xt_time: kernel timezone is -0000

[    7.900000] usbcore: registered new interface driver option

[    7.900000] usbserial: USB Serial support registered for GSM modem (1-port)

[    7.920000] PPP generic driver version 2.4.2

[    7.930000] NET: Registered protocol family 24

[    7.930000] usbcore: registered new interface driver qcserial

[    7.940000] usbserial: USB Serial support registered for Qualcomm USB modem

[    7.980000] usbcore: registered new interface driver brcmfmac

[    8.010000] kmodloader: 1 module could not be probed

[    8.010000] kmodloader: - at91_udc - 0

[   17.660000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

[   17.670000] macb f8008000.ethernet eth0: link up (100/Full)

[   17.670000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

0 Likes
GauravS_31
Moderator
Moderator

Thank you for the details. If you are using the latest FMAC release https://community.cypress.com/docs/DOC-19375, the firmware version can be checked at \cypress-fmac-v5.4.18-2020_0402\cypress-firmware-v5.4.18-2020_0402.tar\cypress-firmware-v5.4.18-2020_0402\firmware\versions file. From the dmesg log, I do not see the 43455 chip getting enumerated. Also I do not see the WLAN firmware version getting printed. Which means that the WLAN interface was not brought up and that is why the wlan0 interface is not seen in ifconfig. Could you confirm that WL_REG_ON was kept high? Keeping the pin low would hold the WLAN chip in reset. Did you place the brcmfmac43455-sdio.bin and brcm43455-sdio.clm_blob files in /lib/firmware/brcm?

SeSo_4694526
New Contributor

I believe the problem is in the driver configuration because we review this driver

https://community.cypress.com/docs/DOC-19375

https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.cypress.com%2Fdocs%2FDOC...

But I see only iNX6UL/4.1.15, iNX6SX/4.1.15 y iNX6SX/4.9.88 in device tree file, and this files are created for Murata Wi-Fi/BT EVK. I need to modify and create my own device tree because my connections are:

Conexion WiFi.png

And the file created in device tree are different

/*
* Copyright (C) 2015 Freescale Semiconductor, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

/*
* NOTE: This DTS file is written for plugging in Murata Wi-Fi/BT EVK into SD3
* slot using Murata i.MX InterConnect Ver 1.0 Adapter AND SD Card Extender on
* SD2 slot. Bluetooth UART connects via SD3 EMMC/MMC Plus pinout.
* WL_REG_ON/BT_REG_ON/WL_HOST_WAKE connect via SD Card Extender.
*/

#include "imx6sx-sdb.dts"

/ {
    modem_reset: modem-reset {
        compatible = "gpio-reset";
        reset-gpios = <&gpio6 11 GPIO_ACTIVE_LOW>;
        reset-delay-us = <1000>;
        #reset-cells = <0>;
    };

    usdhc3_pwrseq: usdhc3_pwrseq {
        compatible = "mmc-pwrseq-simple";
        reset-gpios = <&gpio6 10 GPIO_ACTIVE_LOW>;
    };
};

&iomuxc {
    imx6sx-sdb-murata-v1_sdext {
        pinctrl_bt: btgrp {
                fsl,pins = <
                        MX6SX_PAD_SD2_DATA3__GPIO6_IO_11        0x13069 /* BT_REG_ON */
                >;
        };

        pinctrl_uart3: uart3grp {
                fsl,pins = <
                        MX6SX_PAD_SD3_DATA4__UART3_RX           0x1b0b1
                        MX6SX_PAD_SD3_DATA5__UART3_TX           0x1b0b1
                        MX6SX_PAD_SD3_DATA7__UART3_CTS_B        0x1b0b1
                        MX6SX_PAD_SD3_DATA6__UART3_RTS_B        0x1b0b1
                >;
        };

        /* change MUXing on SD2 slot for control signals. */
        pinctrl_usdhc2_1: usdhc2grp-1 {
                fsl,pins = <
                        MX6SX_PAD_SD2_CMD__USDHC2_CMD           0x17059
                        MX6SX_PAD_SD2_CLK__USDHC2_CLK           0x10059
                        MX6SX_PAD_SD2_DATA0__USDHC2_DATA0       0x17059
                >;
        };

        /* Murata change SD3 to 4-bit SDIO only; use upper 4-bits for UART. */
        pinctrl_wifi: wifigrp {
                fsl,pins = <
                        MX6SX_PAD_SD3_CMD__USDHC3_CMD           0x17069
                        MX6SX_PAD_SD3_CLK__USDHC3_CLK           0x10071
                        MX6SX_PAD_SD3_DATA0__USDHC3_DATA0       0x17069
                        MX6SX_PAD_SD3_DATA1__USDHC3_DATA1       0x17069
                        MX6SX_PAD_SD3_DATA2__USDHC3_DATA2       0x17069
                        MX6SX_PAD_SD3_DATA3__USDHC3_DATA3       0x17069
                        MX6SX_PAD_KEY_COL0__GPIO2_IO_10         0x17059 /* CD */
                        MX6SX_PAD_KEY_ROW0__GPIO2_IO_15         0x17059 /* WP */
                        /* Murata Module control signals */
                        MX6SX_PAD_SD2_DATA1__GPIO6_IO_9         0x13069 /* WL_HOST_WAKE */
                        MX6SX_PAD_SD2_DATA2__GPIO6_IO_10        0x13069 /* WL_REG_ON */
                >;
        };
    };
};

&uart3 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_uart3
             &pinctrl_bt>;
    fsl,uart-has-rtscts;
    resets = <&modem_reset>;
    status = "okay";
};

&usdhc2 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_usdhc2_1>;
    bus-width = <1>;
};

&vcc_sd3 {
    regulator-always-on;
};

&usdhc3 {
    #address-cells = <1>;
    #size-cells = <0>;
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_wifi>;
    bus-width = <4>;
    no-1-8-v;   /* force 3.3V VIO */
    non-removable;
    mmc-pwrseq = <&usdhc3_pwrseq>;
    pm-ignore-notify;
    cap-power-off-card;
    status = "okay";

    brcmf: bcrmf@1 {
        reg = <1>;
        compatible = "brcm,bcm4329-fmac";
        interrupt-parent = <&gpio6>;
        interrupts = <9 IRQ_TYPE_LEVEL_HIGH>;
        interrupt-names = "host-wake";
    };
};

0 Likes
KaNa_3391246
Valued Contributor II

Hi SeSo_4694526,

Excuse me for cutting in.

I would appreciate if you could verify that mmc1's SDIO interface is working properly in your custom design.

For example, if a generic SDHC card is connected to mmc1, will it be recognized?

Best regards,

KaNa_3391246

0 Likes
SeSo_4694526
New Contributor

We almost get it

The mmc1 is working

sdhci-at91 b0000000.sdio-host: update clk mul to 39 as gck rate is 480000000 Hz

[    1.470000] mmc0: new high speed SDHC card at address 1234

[    1.480000] mmcblk0: mmc0:1234 SA08G 7.21 GiB

[    1.490000] mmc1: SDHCI controller on b0000000.sdio-host [b0000000.sdio-host] using ADMA

but I don't know why appears these

[    1.630000] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)

[    1.640000] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)

[    1.650000] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)

[    1.660000] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)

but looks its working

[    1.750000] mmc1: new high speed SDIO card at address 0001

And load the driver with some errors

[    7.890000] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6

[    7.950000] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.atmel,sama5d27-som1-ek.txt failed with error -2

[    7.970000] brcmfmac mmc1:0001:1: Falling back to user helper

[    8.020000] firmware brcm!brcmfmac43455-sdio.atmel,sama5d27-som1-ek.txt: firmware_loading_store: map pages failed

[    8.200000] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6

[    8.220000] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.clm_blob failed with error -2

[    8.230000] brcmfmac mmc1:0001:1: Falling back to user helper

[    8.280000] firmware brcm!brcmfmac43455-sdio.clm_blob: firmware_loading_store: map pages failed

[    8.290000] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-11), device may have limited channels available

[    8.310000] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Mar  1 2015 07:29:38 version 7.45.18 (r538002) FWID 01-6a2c8ad4

0 Likes
GauravS_31
Moderator
Moderator

The CIS tuple 0x80 message is basically hardware header information and it is normal. However, the nvram file name brcmfmac43455-sdio.atmel,sama5d27-som1-ek.txt should be changed to brcmfmac43455-sdio.txt and the brcm directory should contain the brcmfmac43455-sdio.clm_blob file.

0 Likes
KaNa_3391246
Valued Contributor II

Hi SeSo_4694526,

Please let me explain about it in detail.

At insmod, FMAC driver needs the following files for chip.

1) FW

2) NVRAM

3) CLM BLOB

And FMAC expects these files to have a specific location and filename.

1) /lib/firmware/brcm/brcmfmac<chip_name>_<interface>.bin

2) /lib/firmware/brcm/brcmfmac<chip_name>_<interface>.txt

3) /lib/firmware/brcm/brcmfmac<chip_name>_<interface>.clm_blob

For example, when using CYW43455 on SDIO interface:

1) /lib/firmware/brcm/brcmfmac43455_sdio.bin

2) /lib/firmware/brcm/brcmfmac43455_sdio.txt

3) /lib/firmware/brcm/brcmfmac43455_sdio.clm_blob

I would appreciate if you could verify the directory '/lib/firmware/brcm/' in your custom design.

Best regards,

KaNa_3391246

View solution in original post

0 Likes
SeSo_4694526
New Contributor

thanks for the detail of the explanationI i

I add the third file (blob) and the second error gone

but

[    7.890000] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6

[    7.980000] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.atmel,sama5d27-som1-ek.txt failed with error -2

[    7.990000] brcmfmac mmc1:0001:1: Falling back to user helper

[    8.050000] firmware brcm!brcmfmac43455-sdio.atmel,sama5d27-som1-ek.txt: firmware_loading_store: map pages failed

[    8.260000] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6

[    8.310000] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Feb 27 2018 03:15:32 version 7.45.154 (r684107 CY) FWID 01-4fbe0b04

[

I have the 3 files in brcm

root@OpenWrt:/lib/firmware/brcm# ls -1

brcmfmac43455-sdio.bin

brcmfmac43455-sdio.clm_blob

brcmfmac43455-sdio.txt

I found in GitHub the bin file but I am not sure if is the correct file

https://github.com/armbian/firmware/tree/master/brcm

brcmfmac43455-sdio.bin      add new firmware for AP6255

0 Likes
KaNa_3391246
Valued Contributor II

Hi SeSo_4694526,

For some reason, it seems that FMAC of your custom design expects 'brcmfmac43455-sdio.atmel,sama5d27-som1-ek.txt' as NVRAM filename.

As suggested by GauravS_31, I would appreciate if you could try the following steps:

1) Get the latest FMAC and rebuild and create 'ko' files for your custom design.

  https://community.cypress.com/docs/DOC-19375

2) Place the created 4 ko files in any folder. For example:

  /home/test/compat.ko

  /home/test/cfg80211.ko

  /home/test/brcmutil.ko

  /home/test/brcmfmac.ko

3) install modules as below:

  rmmod brcmfmac brcmutil cfg80211 compat

  insmod /home/test/compat.ko

  insmod /home/test/cfg80211.ko

  insmod /home/test/brcmutil.ko

  insmod /home/test/brcmfmac.ko

Best regards,

KaNa_3391246

0 Likes
SeSo_4694526
New Contributor

ello

Before doing that, I don´t know if the driver is working well because if I access my device with Luci and I can see wifi networks and I get access to Internet

but now I want to configure the wifi as AP with 3 SSIDs and get access with my mobile phone

Luci WiFi.png

Best Regards

0 Likes
KaNa_3391246
Valued Contributor II

Hi SeSo_4694526,

I suggest the following:

If the original question (why mmc1 is not recognize) has been resolved, let's wrap up this discussion.

And please create a new discussion about 'AP with 3 SSIDs' if needed.

Best regards,

KaNa_3391246

0 Likes
GauravS_31
Moderator
Moderator

I would recommend to use the latest firmware available in Cypress Linux WiFi Driver Release (FMAC) [2020-04-02] which contains security fixes for known vulnerabilities till that date.

0 Likes