与设备树相关的 pinctrl 状态和句柄是什么?

与设备树相关的 pinctrl 状态和句柄是什么?

我有一个具有以下内容的节点

        mmc0: mmc@11230000 {
            compatible = "mediatek,mt8186-mmc", "mediatek,mt8183-mmc";
            pinctrl-names = "default", "state_uhs", "state_eint";
            pinctrl-0 = <&mmc0_default>;
            pinctrl-1 = <&mmc0_state_uhs>;
            pinctrl-2 = <&mmc0_state_eint>;
            ...
        };

        &pio {
            mmc0_default: mmc0-0 {
                ...

                pins_cmd_dat {
                    pinmux = <...>;
                    bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
                    input-enable;
                    drive-strength = <MTK_DRIVE_4mA>;
                };
                ...
            };
        };

当探测设备时我得到

[    0.227736] mtk-msdc 11230000.mmc: no init pinctrl state
[    0.227882] mtk-msdc 11230000.mmc: no sleep pinctrl state
[    0.227904] mtk-msdc 11230000.mmc: no idle pinctrl state
[    0.228444] mtk-msdc 11230000.mmc: Linked as a consumer to regulator.31
[    0.228763] mtk-msdc 11230000.mmc: Linked as a consumer to regulator.14
[    0.228822] mtk-msdc 11230000.mmc: Failed getting OCR mask: -22

我的假设是,在上面的代码中,pinctrl-names = "default"是状态,并pinctrl-0 = <&mmc0_default>;指向处理状态的 pincontrol。似乎可以从c代码中的驱动程序中设置这里但可以将其设置为设备树中的属性吗?有没有办法在设备树中设置?

相关内容