[Letux-kernel] omap_hsmmc + gta04 + sdio irq + runtime_suspend + 4 bit = trouble

Andreas Kemnade andreas at kemnade.info
Sun Sep 2 22:42:18 CEST 2018


Hi,

since some time now, we use an extra pair of
pm_runtime_get_sync/pm_runtime_put in omap_hsmmc_enable_sdio_irq() to
disable runtime pm when sdio irqs are enabled on the gta04 (dm3730
soc). That enables the use of ieee ps which clearly outweights the
loss of power saving by hsmmc runtime pm. And it gives superior
performance.
There is a w2cbw003 attached using a level shifter to mmc2.

But now I try to find a better solution with could go into mainline.
I tried the following dt snippet:


        mmc2_pins: pinmux_mmc2_pins {
                pinctrl-single,pins = <
                        /* sdmmc2_clk.sdmmc2_clk */
                        OMAP3_CORE1_IOPAD(0x2158, PIN_INPUT_PULLUP | MUX_MODE0)

                        /* sdmmc2_cmd.sdmmc2_cmd */
                        OMAP3_CORE1_IOPAD(0x215a, PIN_INPUT_PULLUP | MUX_MODE0)

                        /* sdmmc2_dat0.sdmmc2_dat0 */
                        OMAP3_CORE1_IOPAD(0x215c, PIN_INPUT_PULLUP | MUX_MODE0)

                        /* sdmmc2_dat0.sdmmc2_dat1 */
                        OMAP3_CORE1_IOPAD(0x215e, PIN_INPUT_PULLUP | MUX_MODE0 | WAKEUP_EN)

                        /* sdmmc2_dat2.sdmmc2_dat2 */
                        OMAP3_CORE1_IOPAD(0x2160, PIN_INPUT_PULLUP | MUX_MODE0)

                        /* sdmmc2_dat2.sdmmc2_dat3 */
                        OMAP3_CORE1_IOPAD(0x2162, PIN_INPUT_PULLUP | MUX_MODE0)

                        /* sdmmc2_dat4.sdmmc2_dir_dat0 */
                        OMAP3_CORE1_IOPAD(0x2164, PIN_OUTPUT | MUX_MODE1)

                        /* sdmmc2_dat4.sdmmc2_dir_dat1 */
                        OMAP3_CORE1_IOPAD(0x2166, PIN_OUTPUT | MUX_MODE1)

                        /* sdmmc2_dat6.sdmmc2_dir_cmd */
                        OMAP3_CORE1_IOPAD(0x2168, PIN_OUTPUT | MUX_MODE1)

                        /* sdmmc2_dat6.sdmmc2_clkin */
                        OMAP3_CORE1_IOPAD(0x216a, PIN_INPUT_PULLUP | MUX_MODE1)
           >;
        };


&mmc2 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc2_pins>;

        interrupts-extended = <&intc 86>, <&omap3_pmx_core 0x12e>; 
        vmmc-supply = <&vaux4>;
        bus-width = <4>;
        ti,non-removable;       /* remove ti, */
        mmc-pwrseq = <&wifi_pwrseq>;
        cap-power-off-card;     /* remove! */
};

If I use
echo on >/sys/bus/platform/devices/480b4000.mmc/power/control
it works well.


echo auto >/sys/bus/platform/devices/480b4000.mmc/power/control
makes it stop working.
in /proc/interrupts:

168:          1   pinctrl 302 Edge      480b4000.mmc:wakeup

Nothing happening there.

I can make it work by using bus-width = <1>;
But that is not what I want. The entry in /proc/interrupts behaves
sane.
So what is wrong with the devicetree entries?

Regards,
Andreas




-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20180902/d782797c/attachment.asc>


More information about the Letux-kernel mailing list