Hi,
I am attempting to setup a gpio to be a PWM. I have attached the decompiled devtree.
This is the pinmux definition:
soc_gpio39_pn1 {
nvidia,pins = "soc_gpio39_pn1";
nvidia,function = "pwm";
nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};
I have tried the function as gp and pwm.
We are using PWM1 and the following is the device tree setup:
pwm1: pwm@3280000 {
compatible = "nvidia,tegra234-pwm", "nvidia,tegra194-pwm";
reg = <0x0 0x3280000 0x0 0x10000>;
clocks = <&bpmp TEGRA234_CLK_PWM1>;
clock-parents = <&bpmp TEGRA234_CLK_CLK_32K>;
resets = <&bpmp TEGRA234_RESET_PWM1>;
reset-names = "pwm";
status = "disabled";
#pwm-cells = <2>;
The status is Okay in the decompiled device tree.
I am using the following commands to setup and enable the PWM:
echo 0 > /sys/class/pwm/pwmchip0/export
echo 10000 > /sys/class/pwm/pwmchip0/pwm/period
echo 5000 > /sys/class/pwm/pwmchip0/pwm/duty_cycle
echo 1 > /sys/class/pwm/pwmchip0/enable
The pin that has been assigned to the PWM is N1/ pin 85. I can toggle the pin using:
sudo gpioset gpiochip0 85=0/1
I have tried different periods and duty cycles, but I do not see the pin showing a PWM output.
What am I missing to see this pin act as a PWM signal?
Thanks for your input.
Malcolm
devtree_aug14.zip (39.1 KB)