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.

how to configure MMC1 on OMAP4770 Blaze platform ?

Other Parts Discussed in Thread: WL1283, WL1271

Hello,

I'm working on OMAP4770 Blaze platform with 4IA.1.4, there is a built-in WL1283 WIFI module connected to MMC5, but  is there anyone know how to configure MMC1 to support another SDIO card, i,e WIFI module?

Best Regards,

Calvin

 

  • Calvin,

    The MMC configuration is done in the board file in the kernel (for example, /arch/arm/mach-omap2/board-4430sdp.c):

    493 static struct omap2_hsmmc_info mmc[] = {
    494         {
    495                 .mmc            = 2,
    496                 .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA |
    497                                         MMC_CAP_1_8V_DDR,
    498                 .gpio_cd        = -EINVAL,
    499                 .gpio_wp        = -EINVAL,
    500                 .nonremovable   = true,
    501                 .ocr_mask       = MMC_VDD_29_30,
    502                 .no_off_init    = true,
    503         },
    504         {
    505                 .mmc            = 1,
    506                 .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA |
    507                                         MMC_CAP_1_8V_DDR,
    508                 .gpio_wp        = -EINVAL,
    509         },
    510         {
    511                 .mmc            = 5,
    512                 .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
    513                 .gpio_cd        = -EINVAL,
    514                 .gpio_wp        = -EINVAL,
    515                 .ocr_mask       = MMC_VDD_165_195,
    516                 .nonremovable   = true,
    517         },
    518         {}      /* Terminator */
    519 };

    You can change the configuration for MMC1 as needed.  Also make sure to take care of the pin muxing for MMC in this same board file.

    Regards,
    Gina 

  • Hi Gina,

    Thanks for your reply, but is there any documentation describing how to configure the structure ? If yes, please provide it to me.

    Regards,

    Calvin

     

     
     
  • Calvin,

    Unfortunately I am not aware of any documentation describing specifically how to do this.  Your best bet is to look at the code, starting with the board file mmc structure that I mentioned, and ask specific questions to the forum if you run into an issue.

    Regards,
    Gina 

  • Gina,

    I did not change the mmc structure, and currently I try to plug-in 1271 SDIO module into MMC1, insert wl12xx_Sdio.ko, and I got some messages as below, Could you help to fix them ?

    shell@android:/system/lib/modules $ su
    shell@android:/system/lib/modules # [   54.859649] mmc1: card claims to support voltages below the defined range. These will be ignored.
    [   54.873077] mmc1: error -110 whilst initialising SDIO card
    [   66.945526] mmc1: card claims to support voltages below the defined range. These will be ignored.
    [   66.985992] mmc1: queuing unknown CIS tuple 0x91 (3 bytes)
    [   66.993438] mmc1: new SDIO card at address 0001

    shell@android:/system/lib/modules #
    shell@android:/system/lib/modules #
    shell@android:/system/lib/modules # lsmod
    wl12xx 169752 0 - Live 0xbf0f3000
    mac80211 324745 1 wl12xx, Live 0xbf08f000
    omaplfb_sgx544_112 19228 0 - Live 0xbf086000
    cfg80211 178578 2 wl12xx,mac80211, Live 0xbf04e000
    pvrsrvkm_sgx544_112 259175 45 omaplfb_sgx544_112, Live 0xbf004000
    compat 2814 0 - Live 0xbf000000
    shell@android:/system/lib/modules # [   78.705352] request_suspend_state: sleep (0->3) at 78697265776 (2000-01-01 00:01:13.292816311 UTC)
    [   78.715850] DSSCOMP: dsscomp_early_suspend
    [   78.726776] DSSCOMP: blanked screen
    shell@android:/system/lib/modules # insmod wl12xx_sdio.ko
    [   93.814575] cfg80211: wext will not work because kernel was compiled with CONFIG_WIRELESS_EXT=n. Tools using wext interface, like iwconfig will not work.
    [   93.832275] wl12xx: loaded
    shell@android:/system/lib/modules # lsmod
    wl12xx_sdio 3310 0 - Live 0xbf129000
    wl12xx 169752 0 - Live 0xbf0f3000
    mac80211 324745 1 wl12xx, Live 0xbf08f000
    omaplfb_sgx544_112 19228 0 - Live 0xbf086000
    cfg80211 178578 2 wl12xx,mac80211, Live 0xbf04e000
    pvrsrvkm_sgx544_112 259175 45 omaplfb_sgx544_112, Live 0xbf004000
    compat 2814 0 - Live 0xbf000000
    shell@android:/system/lib/modules #
    shell@android:/system/lib/modules #
    shell@android:/system/lib/modules # netcfg
    lo       UP                                   127.0.0.1/8   0x00000049 00:00:00:00:00:00
    ifb0     DOWN                                   0.0.0.0/0   0x00000082 a2:40:99:b0:aa:79
    ifb1     DOWN                                   0.0.0.0/0   0x00000082 da:ea:43:2c:05:17
    sit0     DOWN                                   0.0.0.0/0   0x00000080 00:00:00:00:00:00
    ip6tnl0  DOWN                                   0.0.0.0/0   0x00000080 00:00:00:00:00:00
    wlan0    DOWN                                   0.0.0.0/0   0x00001002 de:ad:be:ef:00:00
    shell@android:/system/lib/modules # netcfg wlan0 up
    [  107.290466] wl12xx: open_count=0, add=1, current_fw=0
    [  107.296295] wl12xx: state: 0
    [  107.638641] wl1271_sdio mmc1:0001:2: sdio read failed (-84)
    [  107.645172] wl1271_sdio mmc1:0001:2: sdio read failed (-84)
    [  107.720581] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 00000000: 00 00 00 00 19 00 00 00 00 00 ec f6 00 0c 18 f8
    [  107.731658] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 00000010: fc 00 08 10 f0 f8 00 0a 14 00 00 00 00 00 00 00
    [  107.742736] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 00000020: 00 00 00 00 00 00 00 ee f4 f8 fe 05 ea f3 fa 01
    [  107.753417] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 00000030: 06 e5 f1 fa 02 07 d9 01 80 00 1d 1f 22 26 27 29
    [  107.764129] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 00000040: 1d 1f 22 26 27 27 16 1d 1e 20 24 25 50 50 50 50
    [  107.774719] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 00000050: 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50
    [  107.785400] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 00000060: 50 50 50 50 50 50 50 50 01 02 02 02 02 00 15 15
    [  107.796112] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 00000070: 15 19 19 15 0e 1e 2d 00 9a 01 ae 01 c2 01 cc 01
    [  107.806823] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 00000080: db 01 db 01 d1 01 80 80 80 80 80 80 80 00 00 00
    [  107.817535] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 00000090: 00 00 00 00 1c 1e 21 23 25 50 18 1e 21 23 25 50
    [  107.828247] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 000000a0: 16 1c 1e 20 20 50 50 50 50 50 50 50 50 50 50 50
    [  107.838928] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 000000b0: 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50
    [  107.849578] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 000000c0: 50 50 50 50 50 50 50 50 50 01 02 02 02 02 00 1a
    [  107.860290] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 000000d0: 1a 1a 1a 1a 1a 10 10 10 10 10 10 10 1e 2d 00 00
    [  107.871520] wl12xx: TEST_CMD_INI_FILE_EXT_RADIO_PARAM: 00000000: 00 00 00 00 26 00 00 00 00 00 00 00 00 00 00 00
    [  107.882598] wl12xx: TEST_CMD_INI_FILE_EXT_RADIO_PARAM: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [  107.894348] wl12xx: TEST_CMD_INI_FILE_EXT_RADIO_PARAM: 00000020: 00 00 00 00
    [  107.937805] sr_class1p5_calib_work: mpu: Calibration complete: Voltage Nominal=1375000Calib=1253380 margin=0
    [  107.953918] wl1271_sdio mmc1:0001:2: sdio read failed (-84)
    [  107.971710] wl12xx: firmware booted (Rev 6.3.7.0.105)
    [  107.988128] ADDRCONF(NETDEV_UP): wlan0: link is not ready

     

    Regards,

    Calvin

  • Calvin,

    You mentioned that you did not change the mmc structure - why not?  You are getting the errors:

    [   54.873077] mmc1: error -110 whilst initialising SDIO card
    [   66.945526] mmc1: card claims to support voltages below the defined range. These will be ignored.

    The mmc structure has defined the voltage for MMC1 as:

     .ocr_mask       = MMC_VDD_29_30,

    Is this correct for your SDIO card?  If not, you will need to update this code appropriately (and anything else in the MMC1 structure that is different for your SDIO card).

    Regards,
    Gina 

  • Hi Gina,

    Thanks, I changed the ocr_mask and this error seems gone. now I have a problem that the wl1271 SDIO card can't find any AP arround,

    please take a look at the following logs, Thanks.

    Regards,

    Calvin

     

     

    [    7.863616] Compat-wireless backport release:

    [    7.869628] Backport based on wl12xx.git v3.1-rc6-14178-gfb320e3

    [    7.947448] PVR: PVRCore_Init

    [    7.951782] PVR: PVRSRVDriverProbe(pDevice=c78a4600)

    [    7.958007] PVR: SGX register base: 0x56000000

    [    7.963623] PVR: SGX register size: 65535

    [    7.968719] PVR: SGX IRQ: 53

    [    7.972686] PVR: EnableSystemClocks: Enabling System Clocks

    [    7.979888] PVR: PVRCore_Init: major device 248

    [    8.025909] omaplfb: OMAPLFBInitIonOmap: Device 0: Requesting 2 TILER 2D framebuffers

    [    8.048767] cfg80211: Calling CRDA to update world regulatory domain

    [    8.207946] cfg80211: World regulatory domain updated:

    [    8.213745] cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)

    [    8.222778] cfg80211:     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

    [    8.231384] cfg80211:     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)

    [    8.239929] cfg80211:     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)

    [    8.248535] cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

    [    8.257110] cfg80211:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

    [    8.460418] PVR: Installing MISR with cookie bf03ca18

    [    8.466125] PVR: Installing device LISR SGX ISR on IRQ 53 with cookie c72c3500

    [    8.474151] PVR: OSUnMapPhysToLin: unmapping 65535 bytes from c8be0000

    [    8.481842] PVR: SysFinalise: Version string: SGX revision = 1.1.2

    [    8.503479] EXT4-fs (mmcblk0p8): warning: mounting fs with errors, running e2fsck is recommended

    [    8.543579] EXT4-fs (mmcblk0p8): re-mounted. Opts: (null)

    [    8.585205] EXT4-fs (mmcblk0p8): re-mounted. Opts: (null)

    [    8.674255] wl12xx: driver version: BETA_01202012_01-1417-g788ab65

    [    8.681182] wl12xx: compilation time: Fri May 25 13:04:14 2012

    [    8.690887] android_usb: already disabled

    [    8.695495] android_usb gadget: adding config #1 'android'/c07ef6a8

    [    8.702362] mtp_bind_config

    7ef6a8

    [    8.713714] android_usb gadget: mtp_function_bind dev: c7aea000

    [    8.720214] android_usb gadget: create_bulk_endpoints dev: c7aea000

    [    8.727142] android_usb gadget: usb_ep_autoconfig for ep_in got ep1in

    [    8.734191] android_usb gadget: usb_ep_autoconfig for mtp ep_out got ep1out

    [    8.741821] android_usb gadget: usb_ep_autoconfig for mtp ep_out got ep2out

    [    8.749389] android_usb gadget: usb_ep_autoconfig for mtp ep_intr got ep2in

    [    8.757110] android_usb gadget: dual speed mtp: IN/ep1in, OUT/ep2out

    [    8.764282] adb_bind_config

    [    8.767639] android_usb gadget: adding 'adb'/c7a7b480 to config 'android'/c07ef6a8

    [    8.775878] android_usb gadget: adb_function_bind dev: c7a7b480

    [    8.782379] android_usb gadget: create_bulk_endpoints dev: c7a7b480

    [    8.789215] android_usb gadget: usb_ep_autoconfig for ep_in got ep3in

    [    8.796295] android_usb gadget: usb_ep_autoconfig for adb ep_out got ep3out

    [    8.803924] android_usb gadget: dual speed adb: IN/ep3in, OUT/ep3out

    [    8.810913] android_usb gadget: cfg 1/c07ef6a8 speeds: high full

    [    8.817504] android_usb gadget:   interface 0 = mtp/c7aea000

    [    8.823669] android_usb gadget:   interface 1 = adb/c7a7b480

    [    8.831268] warning: `adbd' uses 32-bit capabilities (legacy support in use)

    [    8.839416] adb_open

    [    8.842010] adb_read(24)

    [    8.845001] adb_read: waiting for online state

    [    8.945648] (stk) :ldisc installation timeout

    [    8.950195] (stk) :ldisc_install = 0

    [    9.062133] android_work: sent uevent USB_STATE=CONNECTED

    [    9.068542] android_work: sent uevent USB_STATE=DISCONNECTED

    [    9.152069] android_work: sent uevent USB_STATE=CONNECTED

    [    9.161895] android_usb gadget: vendor request: 1 index: 4 value: 0 length: 16

    [    9.170227] android_usb gadget: vendor request: 1 index: 4 value: 0 length: 40

    [    9.621368] misc dsscomp: [c6cf6c00] ignoring set failure -22

    [    9.629272] mgr_blank while GO is set

    [   10.109680] (stk) : timed out waiting for ldisc to be un-installed

    [   10.256195] (stk) :ldisc_install = 1

    [   10.380889] android_usb gadget: high speed config #1: android

    [   10.387390] android_usb gadget: mtp_function_set_alt intf: 0 alt: 0

    [   10.394195] android_usb gadget: adb_function_set_alt intf: 1 alt: 0

    [   10.401397] rx c6c55240 queue

    [   10.404724] android_work: sent uevent USB_STATE=CONFIGURED

    [   11.414367] (stk) :ldisc installation timeout

    [   11.418975] (stk) :ldisc_install = 0

    [   11.681335] rx c6c55240 24

    [   11.684539] adb_read returning 24

    [   11.695617] adb_read(7)

    [   11.698303] rx c6c55240 queue

    [   11.701568] rx c6c55240 7

    [   11.709686] adb_read returning 7

    [   11.713500] adb_write(24)

    [   11.716430] adb_write returning 24

    [   11.720458] adb_read(24)

    [   11.724792] adb_write(9)

    [   11.726623] rx c6c55240 queue

    [   11.730926] adb_write returning 9

    [   12.578460] (stk) : timed out waiting for ldisc to be un-installed

    [   12.704650] (stk) :ldisc_install = 1

    [   13.859680] (stk) :ldisc installation timeout

    [   13.864471] (stk) :ldisc_install = 0

    [   15.023834] (stk) : timed out waiting for ldisc to be un-installed

    [   15.168273] (stk) :ldisc_install = 1

    [   16.328430] (stk) :ldisc installation timeout

    [   16.333251] (stk) :ldisc_install = 0

    [   17.508148] (stk) : timed out waiting for ldisc to be un-installed

    [   17.625335] (stk) :ldisc_install = 1

    [   18.781555] (stk) :ldisc installation timeout

    [   18.786407] (stk) :ldisc_install = 0

    [   19.480316] request_suspend_state: wakeup (3->0) at 19472198488 (2000-01-01 00:00:13.974945070 UTC)

    [   19.647583] init: no such service 'dhcpcd_:-h android-fd992512e49d9f71 '

    [   19.708312] acc_open

    [   19.710876] acc_release

    [   19.946685] (stk) : timed out waiting for ldisc to be un-installed

    [   19.953857] Bluetooth: st_register failed -22

    [   20.093109] cfg80211: wext will not work because kernel was compiled with CONFIG_WIRELESS_EXT=n. Tools using wext interface, like iwconfig will not work.

    [   20.110443] wl12xx: loaded

    [   20.209594] wl12xx: open_count=0, add=1, current_fw=0

    [   20.221832] wl12xx: state: 0

    [   20.670715] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 00000000: 00 00 00 00 19 00 00 00 00 00 ec f6 00 0c 18 f8

    [   20.683746] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 00000010: fc 00 08 10 f0 f8 00 0a 14 00 00 00 00 00 00 00

    [   20.700683] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 00000020: 00 00 00 00 00 00 00 ee f4 f8 fe 05 ea f3 fa 01

    [   20.720458] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 00000030: 06 e5 f1 fa 02 07 d9 01 80 00 1d 1f 22 26 27 29

    [   20.765960] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 00000040: 1d 1f 22 26 27 27 16 1d 1e 20 24 25 50 50 50 50

    [   20.810729] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 00000050: 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50

    [   20.826965] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 00000060: 50 50 50 50 50 50 50 50 01 02 02 02 02 00 15 15

    [   20.838775] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 00000070: 15 19 19 15 10 1e 2d 00 9a 01 ae 01 c2 01 cc 01

    [   20.849426] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 00000080: db 01 db 01 d1 01 80 80 80 80 80 80 80 00 00 00

    [   20.860076] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 00000090: 00 00 00 00 1c 1e 21 23 25 50 18 1e 21 23 25 50

    [   20.870635] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 000000a0: 16 1c 1e 20 20 50 50 50 50 50 50 50 50 50 50 50

    [   20.881256] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 000000b0: 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50

    [   20.891784] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 000000c0: 50 50 50 50 50 50 50 50 50 01 02 02 02 02 00 10

    [   20.908966] wl12xx: TEST_CMD_INI_FILE_RADIO_PARAM: 000000d0: 10 10 10 10 10 10 10 10 10 10 10 10 1e 2d 00 00

    [   20.920135] wl12xx: TEST_CMD_INI_FILE_EXT_RADIO_PARAM: 00000000: 00 00 00 00 26 00 00 00 00 00 00 00 00 00 00 00

    [   20.931243] wl12xx: TEST_CMD_INI_FILE_EXT_RADIO_PARAM: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

    [   20.942321] wl12xx: TEST_CMD_INI_FILE_EXT_RADIO_PARAM: 00000020: 00 00 00 00

    [   20.994628] wl12xx: firmware booted (Rev 6.3.7.0.105)

    [   21.017150] ADDRCONF(NETDEV_UP): wlan0: link is not ready

    [   21.251190] wl12xx: RX_FILTER: 00000000: 00 00 00 00 00 00 00 00 01 00 01 01 00 00 06 02

    [   21.273925] wl12xx: RX_FILTER: 00000010: 00 d2 8b 43 9f fd 00 00

    [   21.297119] wl12xx: RX_FILTER: 00000000: 00 00 00 00 00 00 00 00 01 01 01 01 00 00 02 02

    [   21.336273] wl12xx: RX_FILTER: 00000010: 33 33 00 00

    [   21.369476] wl12xx: RX_FILTER: 00000000: 00 00 00 00 00 00 00 00 00 00 00 00

    [   21.377960] wl12xx: RX_FILTER: 00000000: 00 00 00 00 00 00 00 00 00 01 00 00

    [   21.387634] wl12xx: RX_FILTER: 00000000: 00 00 00 00 00 00 00 00 01 00 01 01 00 00 06 02

    [   21.398773] wl12xx: RX_FILTER: 00000010: 00 d2 8b 43 9f fd 00 00

    [   21.405517] wl12xx: RX_FILTER: 00000000: 00 00 00 00 00 00 00 00 01 01 01 01 00 00 02 02

    [   21.456390] wl12xx: RX_FILTER: 00000010: 33 33 00 00

    [   21.677459] mtp_open

    [   21.688507] android_usb gadget: mtp_read(512)

    [   21.694458] android_usb gadget: mtp_read: waiting for online state

    [   21.726074] android_usb gadget: rx c6c55080 queue

    [   22.372283] Invalid Device Structure

    shell@android:/ $ su

    shell@android:/ # netcfg

    lo       UP                                   127.0.0.1/8   0x00000049 00:00:00:00:00:00

    ifb0     DOWN                                   0.0.0.0/0   0x00000082 f2:e5:7c:d0:21:08

    ifb1     DOWN                                   0.0.0.0/0   0x00000082 ba:16:01:87:79:0b

    sit0     DOWN                                   0.0.0.0/0   0x00000080 00:00:00:00:00:00

    ip6tnl0  DOWN                                   0.0.0.0/0   0x00000080 00:00:00:00:00:00

    wlan0    UP                                     0.0.0.0/0   0x00001003 00:d2:8b:43:9f:fd

    shell@android:/ # wpa_cli -i wlan0 scan

    OK

    shell@android:/ # wpa_cli -i wlan0 scan_result

    bssid / frequency / signal level / flags / ssid

  • Hi Calvin,

    I'm glad the SDIO detect is working now.  Since this is a WLAN-specific question about finding the APs, can you please re-post it in the WLAN forum:  http://e2e.ti.com/support/low_power_rf/f/307.aspx

    Thank you,
    Gina