如何使用PWM0的GPIO功能
本帖最后由 vir 于 2016-7-29 16:51 编辑如图,如果我想使用PWM0和PWM1的GPIO功能,该怎么做?
在文件rk3288-pinctrl.dtsi 中:
gpio7_pwm {
vop0_pwm_pin:vop0-pwm {
rockchip,pins = <VOP0_PWM>;
rockchip,pull = <VALUE_PULL_DISABLE>;
rockchip,drive = <VALUE_DRV_DEFAULT>;
//rockchip,tristate = <VALUE_TRI_DEFAULT>;
};
vop1_pwm_pin:vop1-pwm {
rockchip,pins = <VOP1_PWM>;
rockchip,pull = <VALUE_PULL_DISABLE>;
rockchip,drive = <VALUE_DRV_DEFAULT>;
//rockchip,tristate = <VALUE_TRI_DEFAULT>;
};
pwm0_pin:pwm0 {
rockchip,pins = <PWM0>;
rockchip,pull = <VALUE_PULL_DISABLE>;
rockchip,drive = <VALUE_DRV_DEFAULT>;
//rockchip,tristate = <VALUE_TRI_DEFAULT>;
};
pwm1_pin:pwm1 {
rockchip,pins = <PWM1>;
rockchip,pull = <VALUE_PULL_DISABLE>;
rockchip,drive = <VALUE_DRV_DEFAULT>;
//rockchip,tristate = <VALUE_TRI_DEFAULT>;
};
pwm2_pin:pwm2 {
rockchip,pins = <PWM2>;
rockchip,pull = <VALUE_PULL_DISABLE>;
rockchip,drive = <VALUE_DRV_DEFAULT>;
//rockchip,tristate = <VALUE_TRI_DEFAULT>;
};
pwm3_pin:pwm3 {
rockchip,pins = <PWM3>;
rockchip,pull = <VALUE_PULL_DISABLE>;
rockchip,drive = <VALUE_DRV_DEFAULT>;
//rockchip,tristate = <VALUE_TRI_DEFAULT>;
};
没有看到定义gpio功能的节点,那么需要使用的话该怎么办?
没有可以自己加嘛,具体参考wiki“GPIO使用”或者百度一下设备树 zhansb 发表于 2016-7-29 18:08
没有可以自己加嘛,具体参考wiki“GPIO使用”或者百度一下设备树
问题是自己加的不知道对不对:(,所以想参考一下
页:
[1]