mirror of
				https://github.com/torvalds/linux.git
				synced 2025-10-31 08:38:45 +02:00 
			
		
		
		
	counter: stm32-timer-cnt: add support for stm32mp25
Add support for STM32MP25 SoC. There are new counter modes that may be implemented in later. Still, use newly introduced compatible to handle this new HW variant and avoid being blocked with existing compatible in SoC dtsi file. Modes supported currently still remains compatible. New timer 20 has encoder capability, add it to the list. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Link: https://lore.kernel.org/r/20250110091922.980627-4-fabrice.gasnier@foss.st.com Signed-off-by: William Breathitt Gray <wbg@kernel.org>
This commit is contained in:
		
							parent
							
								
									08e2a660b1
								
							
						
					
					
						commit
						ace2cd11a2
					
				
					 1 changed files with 5 additions and 2 deletions
				
			
		|  | @ -669,12 +669,14 @@ static void stm32_timer_cnt_detect_channels(struct device *dev, | ||||||
| 	dev_dbg(dev, "has %d cc channels\n", priv->nchannels); | 	dev_dbg(dev, "has %d cc channels\n", priv->nchannels); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /* encoder supported on TIM1 TIM2 TIM3 TIM4 TIM5 TIM8 */ | /* encoder supported on TIM1 TIM2 TIM3 TIM4 TIM5 TIM8 TIM20 */ | ||||||
| #define STM32_TIM_ENCODER_SUPPORTED	(BIT(0) | BIT(1) | BIT(2) | BIT(3) | BIT(4) | BIT(7)) | #define STM32_TIM_ENCODER_SUPPORTED	(BIT(0) | BIT(1) | BIT(2) | BIT(3) | BIT(4) | BIT(7) | \ | ||||||
|  | 					 BIT(19)) | ||||||
| 
 | 
 | ||||||
| static const char * const stm32_timer_trigger_compat[] = { | static const char * const stm32_timer_trigger_compat[] = { | ||||||
| 	"st,stm32-timer-trigger", | 	"st,stm32-timer-trigger", | ||||||
| 	"st,stm32h7-timer-trigger", | 	"st,stm32h7-timer-trigger", | ||||||
|  | 	"st,stm32mp25-timer-trigger", | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| static int stm32_timer_cnt_probe_encoder(struct device *dev, | static int stm32_timer_cnt_probe_encoder(struct device *dev, | ||||||
|  | @ -846,6 +848,7 @@ static SIMPLE_DEV_PM_OPS(stm32_timer_cnt_pm_ops, stm32_timer_cnt_suspend, | ||||||
| 
 | 
 | ||||||
| static const struct of_device_id stm32_timer_cnt_of_match[] = { | static const struct of_device_id stm32_timer_cnt_of_match[] = { | ||||||
| 	{ .compatible = "st,stm32-timer-counter", }, | 	{ .compatible = "st,stm32-timer-counter", }, | ||||||
|  | 	{ .compatible = "st,stm32mp25-timer-counter", }, | ||||||
| 	{}, | 	{}, | ||||||
| }; | }; | ||||||
| MODULE_DEVICE_TABLE(of, stm32_timer_cnt_of_match); | MODULE_DEVICE_TABLE(of, stm32_timer_cnt_of_match); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Fabrice Gasnier
						Fabrice Gasnier