pinctrl的配置file是<project>.dts
备注:配置是以mt6735上gpio84举例的
1.配置成输入上拉
&pio {
test_pull_up: test_pull_up {
pins_cmd_dat {
pins = <PINMUX_GPIO84__FUNC_GPIO84>;
slew-rate = <0>;
bias-pull-up = <00>;
};
};
};
2.配置成输入下拉
&pio {
test_pull_down: test_pull_down {
pins_cmd_dat {
pins = <PINMUX_GPIO84__FUNC_GPIO84>;
slew-rate = <0>;
bias-pull-down = <00>;
};
};
};
3.配置成输入pull disable
&pio {
test_pull_none: test_pull_none {
pins_cmd_dat {
pins = <PINMUX_GPIO84__FUNC_GPIO84>;
slew-rate = <0>;
bias-disable;
};
};
};
4.配置成输出high
&pio {
test_out_high: test_out_high {
pins_cmd_dat {
pins = <PINMUX_GPIO84__FUNC_GPIO84>;
slew-rate =