diff mbox series

arm: dts: Add 32KHz clock as default clock source

Message ID 20200427172604.16351-1-lokeshvutla@ti.com (mailing list archive)
State New, archived
Headers show
Series arm: dts: Add 32KHz clock as default clock source | expand

Commit Message

Lokesh Vutla April 27, 2020, 5:26 p.m. UTC
Clocksource to timer configured in pwm mode can be selected using the DT
property ti,clock-source. There are few pwm timers which are not
selecting the clock source and relying on default value in hardware or
selected by driver. Instead of relying on default value, always select
the clock source from DT. 

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
Tony,
	This is in preparation with removal of selecting clock source in
	prepare() api. Let me know if you prefer separate patches for
	each dts.

 arch/arm/boot/dts/am335x-guardian.dts            | 1 +
 arch/arm/boot/dts/am3517-evm.dts                 | 1 +
 arch/arm/boot/dts/logicpd-torpedo-baseboard.dtsi | 1 +
 arch/arm/boot/dts/omap3-gta04.dtsi               | 1 +
 4 files changed, 4 insertions(+)

Comments

Tony Lindgren April 28, 2020, 6:19 p.m. UTC | #1
* Lokesh Vutla <lokeshvutla@ti.com> [200427 17:27]:
> Clocksource to timer configured in pwm mode can be selected using the DT
> property ti,clock-source. There are few pwm timers which are not
> selecting the clock source and relying on default value in hardware or
> selected by driver. Instead of relying on default value, always select
> the clock source from DT. 
> 
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> ---
> Tony,
> 	This is in preparation with removal of selecting clock source in
> 	prepare() api. Let me know if you prefer separate patches for
> 	each dts.

Looks just fine to me.

Tony

>  arch/arm/boot/dts/am335x-guardian.dts            | 1 +
>  arch/arm/boot/dts/am3517-evm.dts                 | 1 +
>  arch/arm/boot/dts/logicpd-torpedo-baseboard.dtsi | 1 +
>  arch/arm/boot/dts/omap3-gta04.dtsi               | 1 +
>  4 files changed, 4 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/am335x-guardian.dts b/arch/arm/boot/dts/am335x-guardian.dts
> index 81e0f63e94d3..0ebe9e2c150e 100644
> --- a/arch/arm/boot/dts/am335x-guardian.dts
> +++ b/arch/arm/boot/dts/am335x-guardian.dts
> @@ -105,6 +105,7 @@
>  		ti,timers = <&timer7>;
>  		pinctrl-names = "default";
>  		pinctrl-0 = <&dmtimer7_pins>;
> +		ti,clock-source = <0x01>;
>  	};
>  
>  	vmmcsd_fixed: regulator-3v3 {
> diff --git a/arch/arm/boot/dts/am3517-evm.dts b/arch/arm/boot/dts/am3517-evm.dts
> index a1fd3e63e86e..92466b9eb6ba 100644
> --- a/arch/arm/boot/dts/am3517-evm.dts
> +++ b/arch/arm/boot/dts/am3517-evm.dts
> @@ -156,6 +156,7 @@
>  		pinctrl-0 = <&pwm_pins>;
>  		ti,timers = <&timer11>;
>  		#pwm-cells = <3>;
> +		ti,clock-source = <0x01>;
>  	};
>  
>  	/* HS USB Host PHY on PORT 1 */
> diff --git a/arch/arm/boot/dts/logicpd-torpedo-baseboard.dtsi b/arch/arm/boot/dts/logicpd-torpedo-baseboard.dtsi
> index f7b82ced4080..381f0e82bb70 100644
> --- a/arch/arm/boot/dts/logicpd-torpedo-baseboard.dtsi
> +++ b/arch/arm/boot/dts/logicpd-torpedo-baseboard.dtsi
> @@ -65,6 +65,7 @@
>  		pinctrl-0 = <&pwm_pins>;
>  		ti,timers = <&timer10>;
>  		#pwm-cells = <3>;
> +		ti,clock-source = <0x01>;
>  	};
>  
>  };
> diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi
> index 409a758c99f1..ecc45862b4f3 100644
> --- a/arch/arm/boot/dts/omap3-gta04.dtsi
> +++ b/arch/arm/boot/dts/omap3-gta04.dtsi
> @@ -150,6 +150,7 @@
>  		compatible = "ti,omap-dmtimer-pwm";
>  		ti,timers = <&timer11>;
>  		#pwm-cells = <3>;
> +		ti,clock-source = <0x01>;
>  	};
>  
>  	hsusb2_phy: hsusb2_phy {
> -- 
> 2.23.0
>
Suman Anna May 5, 2020, 4:06 p.m. UTC | #2
On 4/28/20 1:19 PM, Tony Lindgren wrote:
> * Lokesh Vutla <lokeshvutla@ti.com> [200427 17:27]:
>> Clocksource to timer configured in pwm mode can be selected using the DT
>> property ti,clock-source. There are few pwm timers which are not
>> selecting the clock source and relying on default value in hardware or
>> selected by driver. Instead of relying on default value, always select
>> the clock source from DT.
>>
>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>

Thanks Lokesh, with this patch, we should be able to pickup the dmtimer 
driver patch to finally allow dmtimer clients to use 
assigned-clock-parents.

Once both of these are merged, we can deprecate the ti,clock-source from 
the omap-pwm-dmtimer driver.

Reviewed-by: Suman Anna <s-anna@ti.com>

regards
Suman

>> ---
>> Tony,
>> 	This is in preparation with removal of selecting clock source in
>> 	prepare() api. Let me know if you prefer separate patches for
>> 	each dts.
> 
> Looks just fine to me.
> 
> Tony
> 
>>   arch/arm/boot/dts/am335x-guardian.dts            | 1 +
>>   arch/arm/boot/dts/am3517-evm.dts                 | 1 +
>>   arch/arm/boot/dts/logicpd-torpedo-baseboard.dtsi | 1 +
>>   arch/arm/boot/dts/omap3-gta04.dtsi               | 1 +
>>   4 files changed, 4 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/am335x-guardian.dts b/arch/arm/boot/dts/am335x-guardian.dts
>> index 81e0f63e94d3..0ebe9e2c150e 100644
>> --- a/arch/arm/boot/dts/am335x-guardian.dts
>> +++ b/arch/arm/boot/dts/am335x-guardian.dts
>> @@ -105,6 +105,7 @@
>>   		ti,timers = <&timer7>;
>>   		pinctrl-names = "default";
>>   		pinctrl-0 = <&dmtimer7_pins>;
>> +		ti,clock-source = <0x01>;
>>   	};
>>   
>>   	vmmcsd_fixed: regulator-3v3 {
>> diff --git a/arch/arm/boot/dts/am3517-evm.dts b/arch/arm/boot/dts/am3517-evm.dts
>> index a1fd3e63e86e..92466b9eb6ba 100644
>> --- a/arch/arm/boot/dts/am3517-evm.dts
>> +++ b/arch/arm/boot/dts/am3517-evm.dts
>> @@ -156,6 +156,7 @@
>>   		pinctrl-0 = <&pwm_pins>;
>>   		ti,timers = <&timer11>;
>>   		#pwm-cells = <3>;
>> +		ti,clock-source = <0x01>;
>>   	};
>>   
>>   	/* HS USB Host PHY on PORT 1 */
>> diff --git a/arch/arm/boot/dts/logicpd-torpedo-baseboard.dtsi b/arch/arm/boot/dts/logicpd-torpedo-baseboard.dtsi
>> index f7b82ced4080..381f0e82bb70 100644
>> --- a/arch/arm/boot/dts/logicpd-torpedo-baseboard.dtsi
>> +++ b/arch/arm/boot/dts/logicpd-torpedo-baseboard.dtsi
>> @@ -65,6 +65,7 @@
>>   		pinctrl-0 = <&pwm_pins>;
>>   		ti,timers = <&timer10>;
>>   		#pwm-cells = <3>;
>> +		ti,clock-source = <0x01>;
>>   	};
>>   
>>   };
>> diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi
>> index 409a758c99f1..ecc45862b4f3 100644
>> --- a/arch/arm/boot/dts/omap3-gta04.dtsi
>> +++ b/arch/arm/boot/dts/omap3-gta04.dtsi
>> @@ -150,6 +150,7 @@
>>   		compatible = "ti,omap-dmtimer-pwm";
>>   		ti,timers = <&timer11>;
>>   		#pwm-cells = <3>;
>> +		ti,clock-source = <0x01>;
>>   	};
>>   
>>   	hsusb2_phy: hsusb2_phy {
>> -- 
>> 2.23.0
>>
Tony Lindgren May 5, 2020, 6:02 p.m. UTC | #3
* Suman Anna <s-anna@ti.com> [200505 16:07]:
> On 4/28/20 1:19 PM, Tony Lindgren wrote:
> > * Lokesh Vutla <lokeshvutla@ti.com> [200427 17:27]:
> > > Clocksource to timer configured in pwm mode can be selected using the DT
> > > property ti,clock-source. There are few pwm timers which are not
> > > selecting the clock source and relying on default value in hardware or
> > > selected by driver. Instead of relying on default value, always select
> > > the clock source from DT.
> > > 
> > > Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> 
> Thanks Lokesh, with this patch, we should be able to pickup the dmtimer
> driver patch to finally allow dmtimer clients to use assigned-clock-parents.
> 
> Once both of these are merged, we can deprecate the ti,clock-source from the
> omap-pwm-dmtimer driver.
> 
> Reviewed-by: Suman Anna <s-anna@ti.com>

I've pushed this patch applied against v5.7-rc1 into
omap-for-v5.8/dt-timer.

Regards,

Tony
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/am335x-guardian.dts b/arch/arm/boot/dts/am335x-guardian.dts
index 81e0f63e94d3..0ebe9e2c150e 100644
--- a/arch/arm/boot/dts/am335x-guardian.dts
+++ b/arch/arm/boot/dts/am335x-guardian.dts
@@ -105,6 +105,7 @@ 
 		ti,timers = <&timer7>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&dmtimer7_pins>;
+		ti,clock-source = <0x01>;
 	};
 
 	vmmcsd_fixed: regulator-3v3 {
diff --git a/arch/arm/boot/dts/am3517-evm.dts b/arch/arm/boot/dts/am3517-evm.dts
index a1fd3e63e86e..92466b9eb6ba 100644
--- a/arch/arm/boot/dts/am3517-evm.dts
+++ b/arch/arm/boot/dts/am3517-evm.dts
@@ -156,6 +156,7 @@ 
 		pinctrl-0 = <&pwm_pins>;
 		ti,timers = <&timer11>;
 		#pwm-cells = <3>;
+		ti,clock-source = <0x01>;
 	};
 
 	/* HS USB Host PHY on PORT 1 */
diff --git a/arch/arm/boot/dts/logicpd-torpedo-baseboard.dtsi b/arch/arm/boot/dts/logicpd-torpedo-baseboard.dtsi
index f7b82ced4080..381f0e82bb70 100644
--- a/arch/arm/boot/dts/logicpd-torpedo-baseboard.dtsi
+++ b/arch/arm/boot/dts/logicpd-torpedo-baseboard.dtsi
@@ -65,6 +65,7 @@ 
 		pinctrl-0 = <&pwm_pins>;
 		ti,timers = <&timer10>;
 		#pwm-cells = <3>;
+		ti,clock-source = <0x01>;
 	};
 
 };
diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi
index 409a758c99f1..ecc45862b4f3 100644
--- a/arch/arm/boot/dts/omap3-gta04.dtsi
+++ b/arch/arm/boot/dts/omap3-gta04.dtsi
@@ -150,6 +150,7 @@ 
 		compatible = "ti,omap-dmtimer-pwm";
 		ti,timers = <&timer11>;
 		#pwm-cells = <3>;
+		ti,clock-source = <0x01>;
 	};
 
 	hsusb2_phy: hsusb2_phy {