WIFI Device on i.MX28 with mainline Linux 3.8.2 and Device Tree

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

WIFI Device on i.MX28 with mainline Linux 3.8.2 and Device Tree

1,641 Views
joilg
Contributor I

Hello all,

has anybody already an SDIO Wifi Device with I.MX28, mainline kernel and device tree running? 

I' trying to setup a SDIO Wifi Module connected on the SSP2 interface.

Reset of the module is connected to MX28_PAD_SSP0_DATA4__GPIO_2_4 active low when reset.

Power of the module is switched on with MX28_PAD_SSP0_DATA5__GPIO_2_5 high.

I add this in my dts file:

    apb@80000000 {

        apbh@80000000 {

            ....

            ssp2: ssp@80014000 {

                compatible = "fsl,imx28-mmc";

                pinctrl-names = "default";

                pinctrl-0 = <&mmc2_4bit_pins_atm28 &mmc2_sck_cfg_atm28>;

                bus-width = <4>;

                cd-gpios = <&gpio2 4 0>;

                cd-inverted;

                vmmc-supply = <&reg_vddio_sd2>;

                status = "okay";

            };

            pinctrl@80018000 {

                pinctrl-names = "default";

                pinctrl-0 = <&hog_pins_a>;

                hog_pins_a: hog@0 {

                    reg = <0>;

                    fsl,pinmux-ids = <

                        0x2043     /* MX28_PAD_SSP0_DATA4__GPIO_2_4 WLAN_RESET/DETECT */

                        0x2053     /* MX28_PAD_SSP0_DATA5__GPIO_2_5 WLAN_PWRDNN */

                    >;

                    fsl,drive-strength = <0>;

                    fsl,voltage = <1>;

                    fsl,pull-up = <0>;

                };

      ...

      ...

                mmc2_4bit_pins_atm28: mmc2-4bit-atm28@0 {

                    reg = <0>;

                    fsl,pinmux-ids = <

                        0x2110 /* MX28_PAD_SSP2_MOSI__SSP2_CMD */

                        0x2100 /* MX28_PAD_SSP2_SCK__SSP2_SCK */

                        0x2120 /* MX28_PAD_SSP2_MISO__SSP2_D0 */

                        0x2141 /* MX28_PAD_SSP2_SS1__SSP2_D1 */

                        0x2151 /* MX28_PAD_SSP2_SS2__SSP2_D2 */

                        0x2130 /* MX28_PAD_SSP2_SS0__SSP2_D3 */

                    >;

                    fsl,drive-strength = <1>;   /* 8mA */

                    fsl,voltage = <1>;            /* 3.3V */

                    fsl,pull-up = <1>;            /* pull up */

                };

                mmc2_sck_cfg_atm28: mmc2-sck-cfg-atm28@0 {

                    fsl,pinmux-ids = <

                        0x2100 /* MX28_PAD_SSP2_SCK__SSP2_SCK */

                    >;

                    fsl,drive-strength = <2>;   /* 12mA */

                    fsl,voltage = <1>;            /* 3.3V */

                    fsl,pull-up = <0>;            /* pull up */

                };

       ....

       ....

    regulators {

       ....

       ....

        reg_vddio_sd2: vddio-sd2 {

            compatible = "regulator-fixed";

            regulator-name = "vddio-sd2";

            regulator-min-microvolt = <3300000>;

            regulator-max-microvolt = <3300000>;

            gpio = <&gpio2 5 0>;

            startup-delay-us = <70000>;

            enable-active-high;

        };

      ....

     

dmesg

...

...

[    0.656781] of_get_named_gpio_flags exited with status 124

[    0.658312] vddio-sd0: 3300 mV

[    0.662343] reg-fixed-voltage vddio-sd0.7: vddio-sd0 supplying 3300000uV

[    0.662625] of_get_named_gpio_flags exited with status 69                     <<<<<<<

[    0.663906] vddio-sd2: 3300 mV

[    0.667468] reg-fixed-voltage vddio-sd2.8: vddio-sd2 supplying 3300000uV

...

...

[   38.504406] libertas_sdio: Libertas SDIO driver

[   38.509156] libertas_sdio: Copyright Pierre Ossman

dmesg | grep mmc

[    0.000000] Kernel command line: console=ttyAMA0,115200 gpmi ubi.mtd=7 root=/dev/mmcblk0p3 rw rootwait

[    1.731156] mxs-mmc 80010000.ssp: Looking up vmmc-supply from device tree

[    1.767187] mxs-mmc 80010000.ssp: initialized

[    1.772562] mxs-mmc 80014000.ssp: Looking up vmmc-supply from device tree

[    1.887187] mxs-mmc 80014000.ssp: initialized

[    1.904687] mmc0: new SDHC card at address e624

[    1.921593] mmcblk0: mmc0:e624 SU04G 3.69 GiB

[    1.950718]  mmcblk0: p1 p2 p3

dmesg | grep sdio

[   38.504406] libertas_sdio: Libertas SDIO driver

[   38.509156] libertas_sdio: Copyright Pierre Ossman

cat /sys/kernel/debug/mmc1/ios

clock:  0 Hz

vdd:  0 (invalid)

bus mode: 1 (open drain)

chip select: 0 (don't care)

power mode: 0 (off)

bus width: 0 (1 bits)

timing spec: 0 (legacy)

signal voltage: 0 (3.30 V)

I missed something similar to   mmc1: new SDIO card  at ..   in the system log.  Also mmc1/ios didn't show correct data.

mmc0 connected to a MMC card works well.

I cannot enable debug for mmc. it results in to many outputs for mmc0. 


Please help me how to setup the dts file correctly.

Thanks in advance.

Johannes










     


Labels (1)
0 Kudos
1 Reply

527 Views
fabio_estevam
NXP Employee
NXP Employee

Johannes,

Please post this to the linux-arm-kernel mailig list and we will help you from there.

Regards,

Fabio Estevam

0 Kudos