re: JetPack 3.2.1 using TX2
I have seen this topic brought up before but always seems to direct the reader to manipulate the pwm after linux has booted and by echoing values to the exposed fs points here: /sys/class/pwm/pwmchip0.
Is it possible to set the period and duty_cycle in the device tree so that when u-boot starts up the pwm has a default value, is enabled and is outputting a waveform specified in the device tree? For example, if a backlight on a LCD is attached to this pwm so one can see the boot process instead of waiting until linux has boot.
This fragment from tegra186_quill-pwm-fan.dtsi would suggest pwm_period can be set for the fan.
/ {
pwm_fan_shared_data: pfsd {
status = "okay";
num_resources = <0>;
secret = <47>;
active_steps = <10>;
active_rpm = <0 1000 2000 3000 4000 5000 6000 7000 10000 11000>;
rpm_diff_tolerance = <2>;
active_rru = <40 2 1 1 1 1 1 1 1 1>;
active_rrd = <40 2 1 1 1 1 1 1 1 1>;
state_cap_lookup = <2 2 2 2 3 3 3 4 4 4>;
pwm_period = <45334>;
pwm_id = <3>;
step_time = <100>; /* mesecs */
state_cap = <7>;
active_pwm_max = <256>;
tach_period = <1000>;
pwm_gpio = <&tegra_aon_gpio TEGRA_AON_GPIO(V, 6) GPIO_ACTIVE_LOW>; /* TEGRA_MAIN_GPIO_PV6 */
};
pwm-fan {
status = "okay";
compatible = "pwm-fan";
#pwm-cells = <1>;
pwms = <&tegra_pwm4 0 45334>;
shared_data = <&pwm_fan_shared_data>;
active_pwm = <0 80 120 160 255 255 255 255 255 255>;
};
};