I would like to ask a question on PWM. We have a custom board based on AM335x on which we are running 3.14 linux.
I would like to enable the PWM to control the FANs attached to this board.
EHRPWM1A/GPIO1_18 ----> FAN_PWM2
EHRPWM1B/GPIO1_19----->FAN_PWM1
DTS file configurations are :
fanpwm_default: fanpwm_default { pinctrl-single,pins = < 0x48 ( PIN_OUTPUT_PULLUP | MUX_MODE6 ) /* (U14) gpmc_a2.ehrpwm1A */ 0x4c ( PIN_OUTPUT_PULLUP | MUX_MODE6 ) /* (T14) gpmc_a3.ehrpwm1B */ >; }; fanpwm_sleep: fanpwm_sleep { pinctrl-single,pins = < 0x48 (PIN_INPUT ) /* (U14) gpmc_a2.ehrpwm1A */ 0x4c (PIN_INPUT ) /* (T14) gpmc_a3.ehrpwm1B */ >; };
and AM33xx.dtsi file
epwmss0: epwmss@48300000 { compatible = "ti,am33xx-pwmss"; reg = <0x48300000 0x10>; ti,hwmods = "epwmss0"; #address-cells = <1>; #size-cells = <1>; status = "okay"; ranges = <0x48300100 0x48300100 0x80 /* ECAP */ 0x48300180 0x48300180 0x80 /* EQEP */ 0x48300200 0x48300200 0x80>; /* EHRPWM */ ecap0: ecap@48300100 { compatible = "ti,am33xx-ecap"; #pwm-cells = <3>; reg = <0x48300100 0x80>; ti,hwmods = "ecap0"; status = "okay"; }; ehrpwm0: ehrpwm@48300200 { compatible = "ti,am33xx-ehrpwm"; #pwm-cells = <3>; reg = <0x48300200 0x80>; ti,hwmods = "ehrpwm0"; status = "okay"; }; };
Dmesg :
[ 0.896949] io scheduler noop registered
[ 0.896973] io scheduler deadline registered
[ 0.897022] io scheduler cfq registered (default)
[ 0.901076] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[ 0.903127] ehrpwm 48300200.fanpwm: Failed to get tbclk
[ 0.903213] ehrpwm: probe of 48300200.fanpwm failed with error -2
[ 0.906695] of_get_named_gpiod_flags: can't parse gpios property of node '/backlight[0]'
[ 0.906760] backlight.10 supply power not found, using dummy regulator
[ 0.907018] pwm-backlight backlight.10: unable to request PWM, trying legacy API
[ 0.907052] pwm-backlight backlight.10: unable to request legacy PWM
[ 0.907184] platform backlight.10: Driver pwm-backlight requests probe deferral
Could any one help me, Am I missing anything here ?