This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: How to use PWM3 on TDA4/J721E?

Part Number: TDA4VM

Hi TI,

I have the following questions on TDA4VM PWM:

  1. How to enable PWM instances of TDA4VM?
  2. How to exercise from user space the TI J7/TDA4x PWM interface?

I add device-tree at dts:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
mypru_icssg0_pwm3_pins_default: mypru_icssg0_pwm3_pins_default {
pinctrl-single,pins = <
J721E_IOPAD(0xb0, PIN_OUTPUT, 3) /* (AF28) PRG0_PRU0_GPO0.PRG0_PWM3_A0 */
>;
};
timer3: timer@2430000 {
compatible = "ti,omap3430-timer";
reg = <0x2430000 0x400>;
interrupts = <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>;
ti,hwmods = "timer3";
ti,timer-pwm;
status = "okay";
};
pwm3: dmtimer-pwm@3 {
compatible = "ti,omap-dmtimer-pwm";
ti,timers = <&timer3>;
#pwm-cells = <3>;
pinctrl-names = "default";
pinctrl-0 = <&mypru_icssg0_pwm3_pins_default>;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

enbale the related macros at tisdk_j7-evm_defconfig:  

Fullscreen
1
2
3
4
5
6
7
8
--- ../arch/arm64/configs/tisdk_j7-evm_defconfig
+++ ../arch/arm64/configs/tisdk_j7-evm_defconfig
@@ -6444,6 +6444,8 @@
# CONFIG_PWM_PCA9685 is not set
CONFIG_PWM_TIECAP=y
CONFIG_PWM_TIEHRPWM=y
+CONFIG_OMAP_DM_TIMER=y
+CONFIG_PWM_OMAP_DMTIMER=y
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Then I got compliing error:

implicit declaration of function ‘__omap_dm_timer_init_regs’; did you mean ‘omap_dm_timer_write_reg’? [-Werror=implicit-function-declaration]

Thanks

thanks