This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x WLAN Interface

Dear Team,

    In our custom board we are integrating Broadcom BCM4334,  Linux kernel version is 3.12 from ti-sdk-am335x-evm-07.00.00.00.we took reference as ti-am335x-evm.dts file, and it is interface to MMC2 interface. attaching log file and board setup file.

7127.bcm_log.txt
U-Boot 2013.10-00189-g78d8ebd-dirty (Oct 30 2014 - 15:34:44)

I2C:   ready
DRAM:  256 MiB
NAND:  0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Error - No Valid Environment Area found
*** Warning - bad CRC, using default environment

Net:   <ethaddr> not set. Validating first E-fuse MAC
usb_ether
Hit any key to stop autoboot:  0 
mmc0 is current device
Scanning mmc 0...
4117616 bytes read in 571 ms (6.9 MiB/s)
WARNING: Could not determine device tree to use
** File not found /boot/undefined **
mmc0 is current device
SD/MMC found on device 0
reading uEnv.txt
199 bytes read in 16 ms (11.7 KiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc ...
Running uenvcmd ...
reading uImage-dtb.am335x-calixtonxt
4616234 bytes read in 615 ms (7.2 MiB/s)
## Booting kernel from Legacy Image at 82000000 ...
   Image Name:   Linux-3.12.10-ti2013.12.01
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4616170 Bytes = 4.4 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.12.10-ti2013.12.01 (root@shyam-laptop) (gcc version 4.7.3 20130226 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.04
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: Generic AM33XX (Flattened Device Tree), model: CALIXTO AM335x-EVM NXT
[    0.000000] cma: CMA: reserved 24 MiB at 8e000000
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] AM335X ES1.0 (neon )
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 64256
[    0.000000] Kernel command line: console=ttyO0,115200n8 mem=256M root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait ip=off
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 222508K/259072K available (6235K kernel code, 578K rwdata, 2120K rodata, 345K init, 226K bss, 36564K reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xd0800000 - 0xff000000   ( 744 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc083104c   (8357 kB)
[    0.000000]       .init : 0xc0832000 - 0xc0888738   ( 346 kB)
[    0.000000]       .data : 0xc088a000 - 0xc091a8f8   ( 579 kB)
[    0.000000]        .bss : 0xc091a8f8 - 0xc0953198   ( 227 kB)
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[    0.000000] Total of 128 interrupts on 1 active controller
[    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[    0.000000] OMAP clocksource: timer1 at 24000000 Hz
[    0.000000] Console: colour dummy device 80x30
[    0.000634] Calibrating delay loop... 199.06 BogoMIPS (lpj=995328)
[    0.069442] pid_max: default: 32768 minimum: 301
[    0.069645] Security Framework initialized
[    0.069745] Mount-cache hash table entries: 512
[    0.085962] CPU: Testing write buffer coherency: ok
[    0.086667] Setting up static identity map for 0xc061c7e8 - 0xc061c858
[    0.088433] devtmpfs: initialized
[    0.092861] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.173735] omap_hwmod: debugss: _wait_target_disable failed
[    0.175020] pinctrl core: initialized pinctrl subsystem
[    0.176784] regulator-dummy: no parameters
[    0.181564] NET: Registered protocol family 16
[    0.186622] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.192618] cpuidle: using governor ladder
[    0.192652] cpuidle: using governor menu
[    0.213446] platform mpu.1: FIXME: clock-name 'fck' DOES NOT exist in dt!
[    0.215814] platform 49000000.edma: FIXME: clock-name 'fck' DOES NOT exist in dt!
[    0.218394] OMAP GPIO hardware version 0.1
[    0.235822] platform 56000000.sgx: FIXME: clock-name 'fck' DOES NOT exist in dt!
[    0.241102] DSS not supported on this SoC
[    0.241135] No ATAGs?
[    0.241159] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.244936] Calixto BroadCom WLAN Platform Registration
[    0.304618] bio: create slab <bio-0> at 0
[    0.338558] edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver
[    0.340475] WL_REG_ON: 3300 mV 
[    0.341365] vmmcsd_fixed: 3300 mV 
[    0.342177] vdd_mpu_supply: 1262 mV 
[    0.348347] vgaarb: loaded
[    0.351273] SCSI subsystem initialized
[    0.354266] usbcore: registered new interface driver usbfs
[    0.354677] usbcore: registered new interface driver hub
[    0.355128] usbcore: registered new device driver usb
[    0.357529] media: Linux media interface: v0.10
[    0.357926] Linux video capture interface: v2.00
[    0.358543] pps_core: LinuxPPS API ver. 1 registered
[    0.358566] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.358871] PTP clock support registered
[    0.364635] cfg80211: Calling CRDA to update world regulatory domain
[    0.367730] Switched to clocksource timer1
[    0.412589] NET: Registered protocol family 2
[    0.414016] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.414142] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.414214] TCP: Hash tables configured (established 2048 bind 2048)
[    0.414360] TCP: reno registered
[    0.414393] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.414440] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.414886] NET: Registered protocol family 1
[    0.415674] RPC: Registered named UNIX socket transport module.
[    0.415701] RPC: Registered udp transport module.
[    0.415718] RPC: Registered tcp transport module.
[    0.415735] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.417597] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.418987] PM: Loading am335x-pm-firmware.bin
[    0.811268] VFS: Disk quotas dquot_6.5.2
[    0.811414] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.812700] NFS: Registering the id_resolver key type
[    0.812847] Key type id_resolver registered
[    0.812869] Key type id_legacy registered
[    0.812958] jffs2: version 2.2. (NAND) (SUMMARY)  �© 2001-2006 Red Hat, Inc.
[    0.813363] msgmni has been set to 482
[    0.816984] NET: Registered protocol family 38
[    0.817066] io scheduler noop registered
[    0.817087] io scheduler deadline registered
[    0.817134] io scheduler cfq registered (default)
[    0.821414] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[    0.900135] Console: switching to colour frame buffer device 100x30
[    0.917027] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.922589] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 88, base_baud = 3000000) is a OMAP UART0
[    1.531679] console [ttyO0] enabled
[    1.538226] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
[    1.568226] brd: module loaded
[    1.583226] loop: module loaded
[    1.593774] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.609280] Broadcom 43xx driver loaded [ Features: PNS ]
[    1.615491] Broadcom 43xx-legacy driver loaded [ Features: PID ]
[    1.622339] Unable to handle kernel NULL pointer dereference at virtual address 00000018
[    1.630994] pgd = c0004000
[    1.633877] [00000018] *pgd=00000000
[    1.637700] Internal error: Oops: 5 [#1] ARM
[    1.642235] Modules linked in:
[    1.645503] CPU: 0 PID: 1 Comm: swapper Not tainted 3.12.10-ti2013.12.01 #6
[    1.652900] task: cd86fa40 ti: cd870000 task.ti: cd870000
[    1.658678] PC is at brcmf_sdio_pd_probe+0x14/0x34
[    1.663792] LR is at platform_drv_probe+0x20/0x24
[    1.668797] pc : [<c041c438>]    lr : [<c032dc80>]    psr: a0000113
[    1.668797] sp : cd871d98  ip : cd871da8  fp : cd871da4
[    1.680984] r10: c086e460  r9 : cd870000  r8 : c085d364
[    1.686534] r7 : c08ff5c8  r6 : 00000000  r5 : cd8c9c10  r4 : c09493d4
[    1.693465] r3 : 00000000  r2 : 00000001  r1 : c094b6b4  r0 : cd8c9c00
[    1.700401] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[    1.708163] Control: 10c5387d  Table: 80004019  DAC: 00000017
[    1.714266] Process swapper (pid: 1, stack limit = 0xcd870240)
[    1.720462] Stack: (0xcd871d98 to 0xcd872000)
[    1.725097] 1d80:                                                       cd871db4 cd871da8
[    1.733790] 1da0: c032dc80 c041c430 cd871dd4 cd871db8 c032cb80 c032dc6c cd8c9c10 c08ff5c8
[    1.742485] 1dc0: cd8c9c44 00000000 cd871df4 cd871dd8 c032cd50 c032ca88 cd8be0fc 00000000
[    1.751179] 1de0: c08ff5c8 c032ccbc cd871e1c cd871df8 c032b110 c032ccc8 cd864d8c cd8be0f0
[    1.759871] 1e00: cda79df4 c08ff5c8 cda79dc0 c08f1f08 cd871e2c cd871e20 c032c670 c032b0c0
[    1.768564] 1e20: cd871e5c cd871e30 c032c1c0 c032c65c c0776798 c091a900 cd871e5c c08ff5c8
[    1.777257] 1e40: 00000006 c091a900 c0832410 c085d364 cd871e74 cd871e60 c032d198 c032c0f0
[    1.785950] 1e60: c08ff5b4 00000006 cd871e84 cd871e78 c032dde4 c032d124 cd871e9c cd871e88
[    1.794643] 1e80: c032de1c c032dda0 c088835c 00000006 cd871eac cd871ea0 c085d3b8 c032de04
[    1.803336] 1ea0: cd871ebc cd871eb0 c085d374 c085d3ac cd871f4c cd871ec0 c00089ec c085d370
[    1.812029] 1ec0: 0000008f 00000000 00000000 00000000 cd871efc cd871ee0 cd871f04 cd871ee8
[    1.820722] 1ee0: c0832400 c0267470 c0832410 c0b62150 c0640734 000000d6 cd871f4c cd871f08
[    1.829415] 1f00: c005c90c c083241c 00000000 00000006 c0b62156 00000006 c082ef18 c07dc044
[    1.838110] 1f20: cd871f4c c088835c 00000006 c091a900 c0832410 000000d6 c086e454 c086e460
[    1.846803] 1f40: cd871f94 cd871f50 c0832b94 c0008904 00000006 00000006 c0832410 fbff79ff
[    1.855494] 1f60: edf5ff5b fefe7ff1 dfffdab2 00000000 c060ed3c 00000000 00000000 00000000
[    1.864187] 1f80: 00000000 00000000 cd871fac cd871f98 c060ed4c c0832ab0 00000000 00000000
[    1.872880] 1fa0: 00000000 cd871fb0 c00146f8 c060ed48 00000000 00000000 00000000 00000000
[    1.881571] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.890263] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 dff5e8fe af7dbeff
[    1.898936] Backtrace: 
[    1.901577] [<c041c424>] (brcmf_sdio_pd_probe+0x0/0x34) from [<c032dc80>] (platform_drv_probe+0x20/0x24)
[    1.911666] [<c032dc60>] (platform_drv_probe+0x0/0x24) from [<c032cb80>] (driver_probe_device+0x104/0x240)
[    1.921933] [<c032ca7c>] (driver_probe_device+0x0/0x240) from [<c032cd50>] (__driver_attach+0x94/0x98)
[    1.931810]  r7:00000000 r6:cd8c9c44 r5:c08ff5c8 r4:cd8c9c10
[    1.937875] [<c032ccbc>] (__driver_attach+0x0/0x98) from [<c032b110>] (bus_for_each_dev+0x5c/0x90)
[    1.947384]  r6:c032ccbc r5:c08ff5c8 r4:00000000 r3:cd8be0fc
[    1.953444] [<c032b0b4>] (bus_for_each_dev+0x0/0x90) from [<c032c670>] (driver_attach+0x20/0x28)
[    1.962765]  r6:c08f1f08 r5:cda79dc0 r4:c08ff5c8
[    1.967712] [<c032c650>] (driver_attach+0x0/0x28) from [<c032c1c0>] (bus_add_driver+0xdc/0x264)
[    1.976965] [<c032c0e4>] (bus_add_driver+0x0/0x264) from [<c032d198>] (driver_register+0x80/0xfc)
[    1.986379]  r8:c085d364 r7:c0832410 r6:c091a900 r5:00000006 r4:c08ff5c8
[    1.993558] [<c032d118>] (driver_register+0x0/0xfc) from [<c032dde4>] (__platform_driver_register+0x50/0x64)
[    2.003986]  r5:00000006 r4:c08ff5b4
[    2.007823] [<c032dd94>] (__platform_driver_register+0x0/0x64) from [<c032de1c>] (platform_driver_probe+0x24/0x74)
[    2.018844] [<c032ddf8>] (platform_driver_probe+0x0/0x74) from [<c085d3b8>] (brcmf_sdio_init+0x18/0x24)
[    2.028813]  r5:00000006 r4:c088835c
[    2.032649] [<c085d3a0>] (brcmf_sdio_init+0x0/0x24) from [<c085d374>] (brcmfmac_module_init+0x10/0x3c)
[    2.042554] [<c085d364>] (brcmfmac_module_init+0x0/0x3c) from [<c00089ec>] (do_one_initcall+0xf4/0x154)
[    2.052556] [<c00088f8>] (do_one_initcall+0x0/0x154) from [<c0832b94>] (kernel_init_freeable+0xf0/0x1bc)
[    2.062640] [<c0832aa4>] (kernel_init_freeable+0x0/0x1bc) from [<c060ed4c>] (kernel_init+0x10/0xec)
[    2.072276] [<c060ed3c>] (kernel_init+0x0/0xec) from [<c00146f8>] (ret_from_fork+0x14/0x3c)
[    2.081138]  r4:00000000 r3:00000000
[    2.084965] Code: e92dd800 e24cb004 e5903058 e59f1018 (e5932018) 
[    2.091645] ---[ end trace 2d63136bbc107034 ]---
[    2.096961] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[    2.096961] 

6242.bcm setup.txt
ARCH/ARM/MACH-OMAP2/DEVICE.C

############ Platform Data Setup ################

#if IS_ENABLED(CONFIG_BRCMFMAC)

#define BRCM_WL_HOST_WAKE_GPIO  GPIO_TO_PIN(3, 18)

static void brcmfmac_power_on(void)
{
}

static void brcmfmac_power_off(void)
{
}

static void brcmfmac_reset(void)
{
}

static struct brcmfmac_sdio_platform_data brcmfmac_sdio_pdata = {
        .power_on               = brcmfmac_power_on,
        .power_off              = brcmfmac_power_off,
        .reset                  = brcmfmac_reset
};

static struct platform_device brcmfmac_device = {
        .name                   = BRCMFMAC_SDIO_PDATA_NAME,
        .id                     = PLATFORM_DEVID_NONE,
        .dev.platform_data      = &brcmfmac_sdio_pdata
};

void __init wlan_init_brcm_of(void)
{
       if (!of_have_populated_dt())
                return;

        printk("BroadCom WLAN Platform Registration\n");
        brcmfmac_sdio_pdata.oob_irq_supported = true;
        brcmfmac_sdio_pdata.oob_irq_nr = gpio_to_irq(BRCM_WL_HOST_WAKE_GPIO);
        brcmfmac_sdio_pdata.oob_irq_flags = IORESOURCE_IRQ |
                                            IORESOURCE_IRQ_HIGHLEVEL;

        platform_device_register(&brcmfmac_device);
}
#else
static inline void wlan_init_brcm_of(void)
{
}
#endif
                                                                                                                          
static int __init omap2_init_devices(void)
{
        /* Enable dummy states for those platforms without pinctrl support */
        if (!of_have_populated_dt())
                pinctrl_provide_dummies();

        /*
         * please keep these calls, and their implementations above,
         * in alphabetical order so they're easier to sort through.
         */
        omap_init_audio();
        omap_init_camera();
        omap_init_hdmi_audio();
        /* If dtb is there, the devices will be created dynamically */
        if (!of_have_populated_dt()) {
                omap_init_mbox();
                omap_init_mcspi();
                omap_init_sham();
                omap_init_aes();
                omap_init_rng();
        } else {
                /* These can be removed when bindings are done */
                omap_init_wl12xx_of();
                wlan_init_brcm_of();
        }
        omap_init_sti();

        return 0;
}

########### DTS SETUP ######################################

vmmcsd_fixed: fixedregulator@0 {
                compatible = "regulator-fixed";
                regulator-name = "vmmcsd_fixed";
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
        };


am33xx_pinmux: pinmux@44e10800 {
                pinctrl-names = "default";
                pinctrl-0 = <&clkout2_pin &mmc2_pins &mmc2_brcmf_pins>;


                mmc2_pins: pinmux_mmc2_pins {
                pinctrl-single,pins = <
                        0x88 (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2-cmd  */
                        0x8C (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2-clk  */
                        0x118 (PIN_INPUT_PULLUP | MUX_MODE5) /* mmc2-dat0 */
                        0x11C (PIN_INPUT_PULLUP | MUX_MODE5) /* mmc2-dat1 */
                        0x120 (PIN_INPUT_PULLUP | MUX_MODE5) /* mmc2-dat2 */
                        0x108 (PIN_INPUT_PULLUP | MUX_MODE5) /* mmc2-dat3 */
                        >;
                };

                mmc2_brcmf_pins: pinmux_mmc2_brcmf_pins {
                pinctrl-single,pins = <
                        0x19C (PIN_OUTPUT | MUX_MODE7) /* brcmf-power */
                        0x1A0 (PIN_INPUT  | MUX_MODE7) /* oob-irq */
                        >;
                };
};

		ocp {

			wlan_reg: voltage-regulator {
                        compatible = "regulator-fixed";
                        regulator-name = "WL_REG_ON";
                        regulator-min-microvolt = <3300000>;
                        regulator-max-microvolt = <3300000>;
                        gpio = <&gpio3 17 0>;
                        enable-active-high;
                        };

                        wlan {
                        compatible = "brcm,bcm4334";
                        wlan-supply = <&wlan_reg>;
                        clocks = <&clk_32768_ck>;
                        clock-names = "32khz";
                        };
               };

&mmc3 {
        dmas = <&edma 12
                &edma 13>;
        dma-names = "tx", "rx";

        status = "okay";
        vmmc-supply = <&vmmcsd_fixed>;
        bus-width = <4>;
        ti,non-removable;
        ti,needs-special-hs-handling;
        cap-power-off-card;
        keep-power-in-suspend;

};

&edma {
        ti,edma-xbar-event-map = <1 12
                                  2 13>;
};



Regards

Jithin

  • Does your MMC2 interface register? It seems like the kernel does not have a device tree loaded:

    WARNING: Could not determine device tree to use
    ** File not found /boot/undefined **
  • Dear Biser,

        drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c

         if found the issue the problem is mentioned below,

    static int brcmf_sdio_pd_probe(struct platform_device *pdev)
    {
            printk("2 Enter pd probe\n");

            brcmfmac_sdio_pdata = pdev->dev.platform_data;

            if (brcmfmac_sdio_pdata->power_on)
                    brcmfmac_sdio_pdata->power_on();
            
            return 0;
    }

    The crash is happened  due to red marked line.

     brcmfmac_sdio_pdata is not getting the proper platform data from the device.

    for that is done some changes, below mentioned the changes.

    in arch/arm/mach-omap2/device.c

    #if IS_ENABLED(CONFIG_BRCMFMAC)

    #define BRCM_WL_HOST_WAKE_GPIO  GPIO_TO_PIN(3, 18)

    static void brcmfmac_power_on(void)
    {
       printk("BroadCom Module Power On\n");
    }

    static void brcmfmac_power_off(void)
    {
    }

    static void brcmfmac_reset(void)
    {
    }

    static struct brcmfmac_sdio_platform_data brcmfmac_sdio_pdata = {
            .power_on               = brcmfmac_power_on,
            .power_off               = brcmfmac_power_off,
            .reset                       = brcmfmac_reset
    };

    static struct platform_device brcmfmac_device = {
            .name                   = BRCMFMAC_SDIO_PDATA_NAME,
            .id                     = PLATFORM_DEVID_NONE,
            .dev.platform_data      = &brcmfmac_sdio_pdata
    };

    void __init  wlan_init_brcm_of(void)
    {
            if (!of_have_populated_dt())
                    return;

            printk("BroadCom WLAN Platform Registration\n");
            brcmfmac_sdio_pdata.oob_irq_supported = true;
            brcmfmac_sdio_pdata.oob_irq_nr = gpio_to_irq(BRCM_WL_HOST_WAKE_GPIO);
            brcmfmac_sdio_pdata.oob_irq_flags = IORESOURCE_IRQ |
                                                IORESOURCE_IRQ_HIGHLEVEL;

            platform_device_register(&brcmfmac_device);
    }
    #else
    static inline void calixto_wlan_init_brcm_of(void)
    {
    }
    #endif

    Added in omap2_init_devices function

    } else {
                    /* These can be removed when bindings are done */
                    //omap_init_wl12xx_of();
                     wlan_init_brcm_of();

    After the compilation i booted the board. Same crash is happening so i comment out the red marked line and

    add the printk in brcmf_sdio_init

    ret = platform_driver_probe(&brcmf_sdio_pd, brcmf_sdio_pd_probe);
            if (ret == -ENODEV){
                      printk("No platform data available.\n");
            }

    After the compilation i found, No platform data available message but BroadCom WLAN Platform Registration message is appearing.

    Is, the platform data is not registered properly, is there is any problem in my initialization.

    Please guide me to overcome the issue.

    and My dts settings is mentioned below.

    vmmcsd_fixed: fixedregulator@0 {
                    compatible = "regulator-fixed";
                    regulator-name = "vmmcsd_fixed";
                    regulator-min-microvolt = <3300000>;
                    regulator-max-microvolt = <3300000>;
            };

     am33xx_pinmux: pinmux@44e10800 {
                    pinctrl-names = "default";
                    pinctrl-0 = <&mmc3_brcmf_pins>;

     mmc3_pins_brcm: pinmux_mmc3_pins {
                    pinctrl-single,pins = <
                            0x88 (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2-cmd  */
                            0x8C (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2-clk  */
                            0x118 (PIN_INPUT_PULLUP | MUX_MODE5) /* mmc2-dat0 */
                            0x11C (PIN_INPUT_PULLUP | MUX_MODE5) /* mmc2-dat1 */
                            0x120 (PIN_INPUT_PULLUP | MUX_MODE5) /* mmc2-dat2 */
                            0x108 (PIN_INPUT_PULLUP | MUX_MODE5) /* mmc2-dat3 */
                            >;
                    };

                    mmc3_brcmf_pins: pinmux_mmc3_brcmf_pins {
                    pinctrl-single,pins = <
                            0x19C (PIN_OUTPUT | MUX_MODE7) /* brcmf-power */
                            0x1A0 (PIN_INPUT  | MUX_MODE7) /* oob-irq */
                            >;
                    };

    ocp {

             wlan_reg: voltage-regulator {
                            compatible = "regulator-fixed";
                            regulator-name = "WL_REG_ON";
                            regulator-min-microvolt = <3300000>;
                            regulator-max-microvolt = <3300000>;
                            gpio = <&gpio3 17 0>;
                            enable-active-high;
                    };

                    brcmf: bcrmf@1 {
                            compatible = "brcm,bcm4334";
                            wlan-supply = <&wlan_reg>;
                            /* interrupt-parent = <&gpx2>; */
                            /* interrupts = <5 4>; */
                            clocks = <&clk_32768_ck>;
                            clock-names = "32khz";
                    };

    };

    &mmc3 {
            dmas = <&edma 12
                    &edma 13>;
            dma-names = "tx", "rx";
            vmmc-supply = <&vmmcsd_fixed>;
            bus-width = <4>;
            pinctrl-names = "brcm";
            pinctrl-0 = <&mmc3_pins_brcm>;
            ti,non-removable;
            ti,needs-special-hs-handling;
            cap-power-off-card;
            keep-power-in-suspend;
            status = "okay";


    };

    &edma {
            ti,edma-xbar-event-map = <1 12
                                      2 13>;
    };


    Regards

    Jithin


     

  • From your log file I don't see MMC2 register anywhere. It must register before the WiFi driver is loaded.

  • Hi Jithin,

    I didn't see anything for the definition of:
     brcmfmac_sdio_pdata.oob_irq_supported
     brcmfmac_sdio_pdata.oob_irq_nr
     brcmfmac_sdio_pdata.oob_irq_flags

    Are you sure that this is correct?

    BR
    Ivan

  • Dear Biser,

          From device-tree onwards MMC0 will take it as MMC1, as per my knowledge.

    So, MMC2 will defined as MMC3, Please comment if i am wrong.


    Regards

    Jithin

  • Dear Ivan,

    in arch/arm/mach-omap2/device.c

    void __init  wlan_init_brcm_of(void)
    {
            if (!of_have_populated_dt())
                    return;

            printk("BroadCom WLAN Platform Registration\n");
            brcmfmac_sdio_pdata.oob_irq_supported = true;
            brcmfmac_sdio_pdata.oob_irq_nr = gpio_to_irq(BRCM_WL_HOST_WAKE_GPIO);
            brcmfmac_sdio_pdata.oob_irq_flags = IORESOURCE_IRQ |
                                                IORESOURCE_IRQ_HIGHLEVEL;

            platform_device_register(&brcmfmac_device);
    }


    Above function already mentioned in old mail. the function definition is in linux/platform_data/brcmfmac-sdio.h


    Regards

    Jithin

  • Jithin Shyam said:
    From device-tree onwards MMC0 will take it as MMC1, as per my knowledge.

    No, MMC numbering is not changed. Physical MMC0 is registered as MMC0 and so on. What you say is true about I2C though.

  • Dear Biser,

    From the am33xx.dtsi.

     mmc1: mmc@48060000 {
                            compatible = "ti,omap4-hsmmc";
                            ti,hwmods = "mmc1";
                            clocks = <&mmc_clk>, <&clkdiv32k_ick>;
                            clock-names = "fck", "mmchsdb_fck";
                            ti,dual-volt;
                            ti,needs-special-reset;
                            ti,needs-special-hs-handling;
                            dmas = <&edma 24
                                    &edma 25>;
                            dma-names = "tx", "rx";
                            interrupts = <64>;
                            interrupt-parent = <&intc>;
                            reg = <0x48060000 0x1000>;
                            status = "disabled";
                    };

                    mmc2: mmc@481d8000 {
                            compatible = "ti,omap4-hsmmc";
                            ti,hwmods = "mmc2";
                            clocks = <&mmc_clk>, <&clkdiv32k_ick>;
                            clock-names = "fck", "mmchsdb_fck";
                            ti,needs-special-reset;
                            dmas = <&edma 2
                                    &edma 3>;
                            dma-names = "tx", "rx";
                            interrupts = <28>;
                            interrupt-parent = <&intc>;
                            reg = <0x481d8000 0x1000>;
                            status = "disabled";
                    };

                    mmc3: mmc@47810000 {
                            compatible = "ti,omap4-hsmmc";
                            ti,hwmods = "mmc3";
                            clocks = <&mmc_clk>, <&clkdiv32k_ick>;
                            clock-names = "fck", "mmchsdb_fck";
                            ti,needs-special-reset;
                            interrupts = <29>;
                            interrupt-parent = <&intc>;
                            reg = <0x47810000 0x1000>;
                            status = "disabled";
                    };

    As per the TRM MMCHS0  BaseAddress is 0x48060000 So, mmc1 base address is assigned as 0x48060000, which means mmc1 is taken for mmc0 interface.

    Whether my statement is correct.

    Regards

    Jithin

  • Seems you are right.