|
如何使用PWM0的GPIO功能
发表于 2016-7-29 16:46:10
浏览:6232
|
回复:2
打印
只看该作者
[复制链接]
楼主
本帖最后由 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功能的节点,那么需要使用的话该怎么办?
|
|