Hi,
Interfacing wl12xx with MMC3 on Beaglebone black. Below are my configuration & dmesg snap. Please let me know whether there is a hardware issue or device tree configuration issue.
wlan_en_reg: fixedregulator@3 {
compatible = "regulator-fixed";
regulator-name = "wlan-en-regulator";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
/* WL_EN */
gpio = <&gpio0 27 0>;
enable-active-high;
};
wlan_pins_default: pinmux_wlan_pins_default {
pinctrl-single,pins = <
0x28 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpio0_26 WL_IRQ */
0x2c (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpio0_27 WL_EN */
>;
};
/* ODIN-W160 SDIO pins */
mmc3_pins: pinmux_mmc3_pins {
pinctrl-single,pins = <
0x3C (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2_dat3 */
0x38 (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2_dat2 */
0x34 (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2_dat1 */
0x30 (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2_dat0 */
0x8c (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2_clk */
0x88 (PIN_INPUT_PULLUP | MUX_MODE3) /* mmc2_cmd */
>;
};
&mmc3 {
/* these are on the crossbar and are outlined in the
xbar-event-map element */
dmas = <&edma 32 &edma 33>;
dma-names = "tx", "rx";
status = "okay";
vmmc-supply = <&wlan_en_reg>;
ti,non-removable;
bus-width = <4>;
ti,needs-special-hs-handling;
cap-power-off-card;
keep-power-in-suspend;
pinctrl-names = "default";
pinctrl-0 = <&mmc3_pins &wlan_pins_default>;
#address-cells = <1>;
#size-cells = <0>;
wlcore: wlcore@3 {
compatible = "ti,wl1271";
reg = <2>;
interrupt-parent = <&gpio0>;
interrupts = <26 0x4>;
ref-clock-frequency = <25000000>;
};
};
dmesg log:
[ 4.223375] i2c /dev entries driver
[ 4.228992] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[ 4.236949] omap_hsmmc 48060000.mmc: Got CD GPIO
[ 4.250111] mmc0: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 21 width 0 timing 0
[ 4.268669] mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 0 timing 0
[ 4.290159] mmc1: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 7 width 0 timing 0
[ 4.298270] mmc0: clock 400000Hz busmode 2 powermode 2 cs 1 Vdd 21 width 0 timing 0
[ 4.308205] mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 0 timing 0
[ 4.315938] mmc1: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 7 width 0 timing 0
[ 4.324898]
[ 4.324898] ************ mmc_attach_sdio ************
[ 4.333652] mmc0: clock 400000Hz busmode 2 powermode 2 cs 1 Vdd 21 width 0 timing 0
[ 4.342940] ledtrig-cpu: registered to indicate activity on CPUs
[ 4.351338] mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 0 timing 0
[ 4.359361] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
[ 4.368286] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
[ 4.375931] hidraw: raw HID events driver (C) Jiri Kosina
[ 4.382822] usbcore: registered new interface driver usbhid
[ 4.388432] usbhid: USB HID core driver
[ 4.392877] ashmem: initialized
[ 4.397042] remoteproc0: wkup_m3 is available
[ 4.401786] remoteproc0: Note: remoteproc is still under development and considered experimental.
[ 4.410910] remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
[ 4.425685] oprofile: using arm/armv7
[ 4.430151] NET: Registered protocol family 10
[ 4.434702] mmc0: host does not support reading read-only switch, assuming write-enable
[ 4.444303] mip6: Mobile IPv6
[ 4.447317] NET: Registered protocol family 17
[ 4.451962] mmc0: clock 25000000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 0 timing 0
[ 4.460006] Key type dns_resolver registered
[ 4.464302] mpls_gso: MPLS GSO support
[ 4.468296] omap_voltage_late_init: Voltage driver support not added
[ 4.474865] mmc0: clock 25000000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 2 timing 0
[ 4.483303] cpu cpu0: of_pm_voltdm_notifier_register: Failed to get cpu0 regulator/voltdm: -517
[ 4.492161] mmc0: new SDHC card at address e624
[ 4.497220] cpu cpu0: cpu0 clock notifier not ready, retry
[ 4.503085] mmcblk0: mmc0:e624 SU04G 3.69 GiB
[ 4.508367] ThumbEE CPU extension supported.
[ 4.513208] Registering SWP/SWPB emulation handler
[ 4.518201] mmcblk0: p1 p2
[ 4.523799] registered taskstats version 1
[ 4.528412] mmc1: clock 400000Hz busmode 2 powermode 2 cs 1 Vdd 7 width 0 timing 0
[ 4.537029] Btrfs loaded
[ 4.542283] mmc1: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 7 width 0 timing 0
[ 4.552326]
[ 4.552326] ************ mmc_attach_sdio ************
[ 4.559820]
[ 4.559820] ************ mmc_attach_sdio 1 ************
[ 4.566664] omap_hsmmc 47810000.mmc: card claims to support voltages below defined range
[ 4.575096] Key type encrypted registered
[ 4.582426]
[ 4.582426] ************ mmc_attach_sdio 2 ************
[ 4.589445] [HSB]: hostcaps = 2707 ocr = 80
[ 4.593648] [HSB]: Sending the operation code ocr = 80 .
[ 4.599583] [HSB]: ocr = 80 rocr = a0ffffc0 .
[ 4.604097] [HSB]: Its SDIO interface Card attached
[ 4.609324] [HSB]: Init_card is done..
[ 4.613164]
[ 4.613164] ************ Test_1 ************
[ 4.619193] [HSB]: No support of 1.8 Volt
[ 4.623626]
************Test 2 rocr=-1593835584,ocr=128 ************
,[HSB]: Send the Relative Address for the Card = 0
[ 4.635633] [HSB]: Relative Address for the Card = 1
[ 4.640916]
[ 4.640916] ************Test 2_0 sdio_read_cccr:ocr=128 ************
[ 4.649153] [HSB]: Get CSD of card
[ 4.653090] [HSB]: Select Card Success quirks = 0
[ 4.658921] [HSB]: Read the CCR Register CCCR = 80
[ 4.663782] [HSB]: CCR vsn= 1 multi_block = 1 low_speed =0 wide_bus = 0 high_power = 0 ,high_speed = 0 disable_cd = 0
[ 4.674884]
[ 4.674884] ************Test 2 sdio_read_cccr:ocr=128 ************
[ 4.686668] tps65217 0-0024: TPS65217 ID 0xe version 1.2
[ 4.692835] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[ 4.699892] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[ 4.707174] i2c i2c-1: of_i2c: modalias failure on /ocp/i2c@4802a000/tps1@24
[ 4.714723] [HSB]: Read the CIS Success
[ 4.718982] at24 1-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[ 4.725937] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 400 kHz
[ 4.731593]
[ 4.731593] ************Test 2_1 sdio_read_cccr:ocr=128 ************
[ 4.739582]
[ 4.739582] ************Test 2_3 sdio_read_cccr:ocr=128 ************
[ 4.749500] at24 2-0054: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[ 4.756861] at24 2-0055: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[ 4.764235] [HSB]: Disbavle the CD
[ 4.767657] [HSB]: Enable the Card to High speed
[ 4.772632] at24 2-0056: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[ 4.779585]
************Test 3 sdio_enable_hs err =0 : 25000000 ************
,mmc1: clock 25000000Hz busmode 2 powermode 2 cs 0 Vdd 7 width 0 timing 0
[ 4.794046] at24 2-0057: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[ 4.801428] at24 2-005d: 8192 byte 24c64 EEPROM, writable, 32 bytes/write
[ 4.808665] [HSB]: Set the Speed or clock to= 25000000
[ 4.814004] [HSB]: Enable the 4 Bit mode communication = 2
[ 4.820515]
[ 4.820515] ************ sdio_enable_4bit_bus card->type=2 ************
[ 4.828913] [HSB]: Write Failed CCR reg ctrl= 82 ret = ffffffac
[ 4.834950]
[ 4.834950] ************ sdio_enable_4bit_bus err_2 : -84 ************
[ 4.843268]
************Test 3_1 Enable 4bit err =-84 ************
,[HSB]: Error to remove the card
[ 4.853496] [HSB]: Error
[ 4.856299]
[ 4.856299] ************ mmc_attach_sdio 9 ************
[ 4.863242] mmc1: error -84 whilst initialising SDIO card
[ 4.894629] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
[ 4.950805] mmc1: clock 25000000Hz busmode 1 powermode 2 cs 0 Vdd 7 width 0 timing 0
[ 4.959046] ocp:backlight supply power not found, using dummy regulator
[ 4.965807] pwm-backlight ocp:backlight: unable to request PWM, trying legacy API
[ 4.998708] mmc1: clock 0Hz busmode 2 powermode 0 cs 0 Vdd 0 width 0 timing 0
[ 5.006919] pwm-backlight ocp:backlight: unable to request legacy PWM
[ 5.015086] remoteproc0: powering up wkup_m3
[ 5.019650] remoteproc0: Booting fw image am335x-pm-firmware.elf, size 219663
[ 5.027209] remoteproc0: remote processor wkup_m3 is now up