cancel
Showing results for 
Search instead for 
Did you mean: 

stm32mp135 pwm dts

MWoło.2
Senior II

Hi,

can some share dts configuration which allows you to bring up the PWM, timer etc?

I do something like

 

	pwm_regulator {
		compatible = "pwm-regulator";
		pwms = <&{/soc/timer@40002000/pwm} 3 500000 0>;
		regulator-min-microvolt = <1016000>;
		regulator-max-microvolt = <1114000>;
		regulator-name = "vdd_logic";

		/* Voltage Duty-Cycle */
		voltage-table = <1114000 0>,
				<1095000 10>,
				<1076000 20>,
				<1056000 30>,
				<1036000 40>,
				<1016000 50>;
	};

 

 plus

 

&timers4{
	status = "disabled";

	/* USER CODE BEGIN timers4 */
	/delete-property/dmas;
	/delete-property/dma-names;
	/* USER CODE END timers4 */

	pwm{
		pinctrl-names = "default", "sleep";
		pinctrl-0 = <&tim4_pwm_pins_mx>;
		pinctrl-1 = <&tim4_pwm_sleep_pins_mx>;
		status = "okay";

		/* USER CODE BEGIN timers4_pwm */
		timer@3 {
			status = "okay";
		};
		/* USER CODE END timers4_pwm */
	};
};

 

 but nothing appears on the boot log and no timers devices are available in /sys/bus/iio/devices and PWM itself.

Why is not working, a similar solution working on stm32mp15x.

1 ACCEPTED SOLUTION

Accepted Solutions
MWoło.2
Senior II

OK I think I found a solution, my mistake

&timers4{
	status = "okay";

	/* USER CODE BEGIN timers4 */
	/delete-property/dmas;
	/delete-property/dma-names;
	compatible = "st,stm32-timers";
	/* USER CODE END timers4 */

	pwm{
		pinctrl-names = "default", "sleep";
		pinctrl-0 = <&tim4_pwm_pins_mx>;
		pinctrl-1 = <&tim4_pwm_sleep_pins_mx>;
		status = "okay";
		compatible = "st,stm32-pwm";
	};
		/* USER CODE BEGIN timers4_pwm */
		timer@3 {
			compatible = "st,stm32h7-timer-trigger";
			status = "okay";
		};
		/* USER CODE END timers4_pwm */
};

 rest can be found on

https://wiki.st.com/stm32mpu/wiki/PWM_overview

View solution in original post

1 REPLY 1
MWoło.2
Senior II

OK I think I found a solution, my mistake

&timers4{
	status = "okay";

	/* USER CODE BEGIN timers4 */
	/delete-property/dmas;
	/delete-property/dma-names;
	compatible = "st,stm32-timers";
	/* USER CODE END timers4 */

	pwm{
		pinctrl-names = "default", "sleep";
		pinctrl-0 = <&tim4_pwm_pins_mx>;
		pinctrl-1 = <&tim4_pwm_sleep_pins_mx>;
		status = "okay";
		compatible = "st,stm32-pwm";
	};
		/* USER CODE BEGIN timers4_pwm */
		timer@3 {
			compatible = "st,stm32h7-timer-trigger";
			status = "okay";
		};
		/* USER CODE END timers4_pwm */
};

 rest can be found on

https://wiki.st.com/stm32mpu/wiki/PWM_overview