LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] ARM: dts: Fix timer regression for beagleboard revision c
@ 2021-11-25 14:48 Tony Lindgren
  2021-11-28 18:43 ` Jarkko Nikula
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Tony Lindgren @ 2021-11-25 14:48 UTC (permalink / raw)
  To: linux-omap
  Cc: Benoît Cousson, devicetree, linux-kernel, Daniel Lezcano,
	Thomas Gleixner, Rob Herring, Jarkko Nikula

Commit e428e250fde6 ("ARM: dts: Configure system timers for omap3")
caused a timer regression for beagleboard revision c where the system
clockevent stops working if omap3isp module is unloaded.

Turns out we still have beagleboard revisions a-b4 capacitor c70 quirks
applied that limit the usable timers for no good reason. This also affects
the power management as we use the system clock instead of the 32k clock
source.

Let's fix the issue by adding a new omap3-beagle-ab4.dts for the old timer
quirks. This allows us to remove the timer quirks for later beagleboard
revisions. We also need to update the related timer quirk check for the
correct compatible property.

Fixes: e428e250fde6 ("ARM: dts: Configure system timers for omap3")
Cc: linux-kernel@vger.kernel.org
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Rob Herring <robh+dt@kernel.org>
Reported-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 .../devicetree/bindings/arm/omap/omap.txt     |  3 ++
 arch/arm/boot/dts/Makefile                    |  1 +
 arch/arm/boot/dts/omap3-beagle-ab4.dts        | 47 +++++++++++++++++++
 arch/arm/boot/dts/omap3-beagle.dts            | 33 -------------
 drivers/clocksource/timer-ti-dm-systimer.c    |  2 +-
 5 files changed, 52 insertions(+), 34 deletions(-)
 create mode 100644 arch/arm/boot/dts/omap3-beagle-ab4.dts

diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt
--- a/Documentation/devicetree/bindings/arm/omap/omap.txt
+++ b/Documentation/devicetree/bindings/arm/omap/omap.txt
@@ -119,6 +119,9 @@ Boards (incomplete list of examples):
 - OMAP3 BeagleBoard : Low cost community board
   compatible = "ti,omap3-beagle", "ti,omap3430", "ti,omap3"
 
+- OMAP3 BeagleBoard A to B4 : Early BeagleBoard revisions A to B4 with a timer quirk
+  compatible = "ti,omap3-beagle-ab4", "ti,omap3-beagle", "ti,omap3430", "ti,omap3"
+
 - OMAP3 Tobi with Overo : Commercial expansion board with daughter board
   compatible = "gumstix,omap3-overo-tobi", "gumstix,omap3-overo", "ti,omap3430", "ti,omap3"
 
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -794,6 +794,7 @@ dtb-$(CONFIG_ARCH_OMAP3) += \
 	logicpd-som-lv-37xx-devkit.dtb \
 	omap3430-sdp.dtb \
 	omap3-beagle.dtb \
+	omap3-beagle-ab4.dtb \
 	omap3-beagle-xm.dtb \
 	omap3-beagle-xm-ab.dtb \
 	omap3-cm-t3517.dtb \
diff --git a/arch/arm/boot/dts/omap3-beagle-ab4.dts b/arch/arm/boot/dts/omap3-beagle-ab4.dts
new file mode 100644
--- /dev/null
+++ b/arch/arm/boot/dts/omap3-beagle-ab4.dts
@@ -0,0 +1,47 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/dts-v1/;
+
+#include "omap3-beagle.dts"
+
+/ {
+	model = "TI OMAP3 BeagleBoard A to B4";
+	compatible = "ti,omap3-beagle-ab4", "ti,omap3-beagle", "ti,omap3430", "ti,omap3";
+};
+
+/*
+ * Workaround for capacitor C70 issue, see "Boards revision A and < B5"
+ * section at https://elinux.org/BeagleBoard_Community
+ */
+
+/* Unusable as clocksource because of unreliable oscillator */
+&counter32k {
+	status = "disabled";
+};
+
+/* Unusable as clockevent because of unreliable oscillator, allow to idle */
+&timer1_target {
+	/delete-property/ti,no-reset-on-init;
+	/delete-property/ti,no-idle;
+	timer@0 {
+		/delete-property/ti,timer-alwon;
+	};
+};
+
+/* Preferred always-on timer for clocksource */
+&timer12_target {
+	ti,no-reset-on-init;
+	ti,no-idle;
+	timer@0 {
+		/* Always clocked by secure_32k_fck */
+	};
+};
+
+/* Preferred timer for clockevent */
+&timer2_target {
+	ti,no-reset-on-init;
+	ti,no-idle;
+	timer@0 {
+		assigned-clocks = <&gpt2_fck>;
+		assigned-clock-parents = <&sys_ck>;
+	};
+};
diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts
--- a/arch/arm/boot/dts/omap3-beagle.dts
+++ b/arch/arm/boot/dts/omap3-beagle.dts
@@ -308,39 +308,6 @@ &usbhsehci {
 	phys = <0 &hsusb2_phy>;
 };
 
-/* Unusable as clocksource because of unreliable oscillator */
-&counter32k {
-	status = "disabled";
-};
-
-/* Unusable as clockevent because if unreliable oscillator, allow to idle */
-&timer1_target {
-	/delete-property/ti,no-reset-on-init;
-	/delete-property/ti,no-idle;
-	timer@0 {
-		/delete-property/ti,timer-alwon;
-	};
-};
-
-/* Preferred always-on timer for clocksource */
-&timer12_target {
-	ti,no-reset-on-init;
-	ti,no-idle;
-	timer@0 {
-		/* Always clocked by secure_32k_fck */
-	};
-};
-
-/* Preferred timer for clockevent */
-&timer2_target {
-	ti,no-reset-on-init;
-	ti,no-idle;
-	timer@0 {
-		assigned-clocks = <&gpt2_fck>;
-		assigned-clock-parents = <&sys_ck>;
-	};
-};
-
 &twl_gpio {
 	ti,use-leds;
 	/* pullups: BIT(1) */
diff --git a/drivers/clocksource/timer-ti-dm-systimer.c b/drivers/clocksource/timer-ti-dm-systimer.c
--- a/drivers/clocksource/timer-ti-dm-systimer.c
+++ b/drivers/clocksource/timer-ti-dm-systimer.c
@@ -241,7 +241,7 @@ static void __init dmtimer_systimer_assign_alwon(void)
 	bool quirk_unreliable_oscillator = false;
 
 	/* Quirk unreliable 32 KiHz oscillator with incomplete dts */
-	if (of_machine_is_compatible("ti,omap3-beagle") ||
+	if (of_machine_is_compatible("ti,omap3-beagle-ab4") ||
 	    of_machine_is_compatible("timll,omap3-devkit8000")) {
 		quirk_unreliable_oscillator = true;
 		counter_32k = -ENODEV;
-- 
2.33.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ARM: dts: Fix timer regression for beagleboard revision c
  2021-11-25 14:48 [PATCH] ARM: dts: Fix timer regression for beagleboard revision c Tony Lindgren
@ 2021-11-28 18:43 ` Jarkko Nikula
  2021-11-29  9:56 ` Daniel Lezcano
  2021-12-11 15:30 ` Jarkko Nikula
  2 siblings, 0 replies; 8+ messages in thread
From: Jarkko Nikula @ 2021-11-28 18:43 UTC (permalink / raw)
  To: Tony Lindgren, linux-omap
  Cc: Benoît Cousson, devicetree, linux-kernel, Daniel Lezcano,
	Thomas Gleixner, Rob Herring

On 25.11.2021 16.48, Tony Lindgren wrote:
> Commit e428e250fde6 ("ARM: dts: Configure system timers for omap3")
> caused a timer regression for beagleboard revision c where the system
> clockevent stops working if omap3isp module is unloaded.
> 
> Turns out we still have beagleboard revisions a-b4 capacitor c70 quirks
> applied that limit the usable timers for no good reason. This also affects
> the power management as we use the system clock instead of the 32k clock
> source.
> 
> Let's fix the issue by adding a new omap3-beagle-ab4.dts for the old timer
> quirks. This allows us to remove the timer quirks for later beagleboard
> revisions. We also need to update the related timer quirk check for the
> correct compatible property.
> 
> Fixes: e428e250fde6 ("ARM: dts: Configure system timers for omap3")
> Cc: linux-kernel@vger.kernel.org
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Rob Herring <robh+dt@kernel.org>
> Reported-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  .../devicetree/bindings/arm/omap/omap.txt     |  3 ++
>  arch/arm/boot/dts/Makefile                    |  1 +
>  arch/arm/boot/dts/omap3-beagle-ab4.dts        | 47 +++++++++++++++++++
>  arch/arm/boot/dts/omap3-beagle.dts            | 33 -------------
>  drivers/clocksource/timer-ti-dm-systimer.c    |  2 +-
>  5 files changed, 52 insertions(+), 34 deletions(-)
>  create mode 100644 arch/arm/boot/dts/omap3-beagle-ab4.dts
> 
I trust Tony got this working since I lent the board for him to look at
this regression since our earlier remote attempts didn't find a working fix.

Jarkko


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ARM: dts: Fix timer regression for beagleboard revision c
  2021-11-25 14:48 [PATCH] ARM: dts: Fix timer regression for beagleboard revision c Tony Lindgren
  2021-11-28 18:43 ` Jarkko Nikula
@ 2021-11-29  9:56 ` Daniel Lezcano
  2021-11-29 13:30   ` Tony Lindgren
  2021-12-11 15:30 ` Jarkko Nikula
  2 siblings, 1 reply; 8+ messages in thread
From: Daniel Lezcano @ 2021-11-29  9:56 UTC (permalink / raw)
  To: Tony Lindgren, linux-omap
  Cc: Benoît Cousson, devicetree, linux-kernel, Thomas Gleixner,
	Rob Herring, Jarkko Nikula


Hi Tony,

On 25/11/2021 15:48, Tony Lindgren wrote:
> Commit e428e250fde6 ("ARM: dts: Configure system timers for omap3")
> caused a timer regression for beagleboard revision c where the system
> clockevent stops working if omap3isp module is unloaded.
> 
> Turns out we still have beagleboard revisions a-b4 capacitor c70 quirks
> applied that limit the usable timers for no good reason. This also affects
> the power management as we use the system clock instead of the 32k clock
> source.
> 
> Let's fix the issue by adding a new omap3-beagle-ab4.dts for the old timer
> quirks. This allows us to remove the timer quirks for later beagleboard
> revisions. We also need to update the related timer quirk check for the
> correct compatible property.
> 
> Fixes: e428e250fde6 ("ARM: dts: Configure system timers for omap3")
> Cc: linux-kernel@vger.kernel.org
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Rob Herring <robh+dt@kernel.org>
> Reported-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  .../devicetree/bindings/arm/omap/omap.txt     |  3 ++
>  arch/arm/boot/dts/Makefile                    |  1 +
>  arch/arm/boot/dts/omap3-beagle-ab4.dts        | 47 +++++++++++++++++++
>  arch/arm/boot/dts/omap3-beagle.dts            | 33 -------------
>  drivers/clocksource/timer-ti-dm-systimer.c    |  2 +-
>  5 files changed, 52 insertions(+), 34 deletions(-)
>  create mode 100644 arch/arm/boot/dts/omap3-beagle-ab4.dts

Usually, bindings DT and driver changes are separate patches


> diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt
> --- a/Documentation/devicetree/bindings/arm/omap/omap.txt
> +++ b/Documentation/devicetree/bindings/arm/omap/omap.txt
> @@ -119,6 +119,9 @@ Boards (incomplete list of examples):
>  - OMAP3 BeagleBoard : Low cost community board
>    compatible = "ti,omap3-beagle", "ti,omap3430", "ti,omap3"
>  
> +- OMAP3 BeagleBoard A to B4 : Early BeagleBoard revisions A to B4 with a timer quirk
> +  compatible = "ti,omap3-beagle-ab4", "ti,omap3-beagle", "ti,omap3430", "ti,omap3"
> +
>  - OMAP3 Tobi with Overo : Commercial expansion board with daughter board
>    compatible = "gumstix,omap3-overo-tobi", "gumstix,omap3-overo", "ti,omap3430", "ti,omap3"
>  
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -794,6 +794,7 @@ dtb-$(CONFIG_ARCH_OMAP3) += \
>  	logicpd-som-lv-37xx-devkit.dtb \
>  	omap3430-sdp.dtb \
>  	omap3-beagle.dtb \
> +	omap3-beagle-ab4.dtb \
>  	omap3-beagle-xm.dtb \
>  	omap3-beagle-xm-ab.dtb \
>  	omap3-cm-t3517.dtb \
> diff --git a/arch/arm/boot/dts/omap3-beagle-ab4.dts b/arch/arm/boot/dts/omap3-beagle-ab4.dts
> new file mode 100644
> --- /dev/null
> +++ b/arch/arm/boot/dts/omap3-beagle-ab4.dts
> @@ -0,0 +1,47 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/dts-v1/;
> +
> +#include "omap3-beagle.dts"
> +
> +/ {
> +	model = "TI OMAP3 BeagleBoard A to B4";
> +	compatible = "ti,omap3-beagle-ab4", "ti,omap3-beagle", "ti,omap3430", "ti,omap3";
> +};
> +
> +/*
> + * Workaround for capacitor C70 issue, see "Boards revision A and < B5"
> + * section at https://elinux.org/BeagleBoard_Community
> + */
> +
> +/* Unusable as clocksource because of unreliable oscillator */
> +&counter32k {
> +	status = "disabled";
> +};
> +
> +/* Unusable as clockevent because of unreliable oscillator, allow to idle */
> +&timer1_target {
> +	/delete-property/ti,no-reset-on-init;
> +	/delete-property/ti,no-idle;
> +	timer@0 {
> +		/delete-property/ti,timer-alwon;
> +	};
> +};
> +
> +/* Preferred always-on timer for clocksource */
> +&timer12_target {
> +	ti,no-reset-on-init;
> +	ti,no-idle;
> +	timer@0 {
> +		/* Always clocked by secure_32k_fck */
> +	};
> +};
> +
> +/* Preferred timer for clockevent */
> +&timer2_target {
> +	ti,no-reset-on-init;
> +	ti,no-idle;
> +	timer@0 {
> +		assigned-clocks = <&gpt2_fck>;
> +		assigned-clock-parents = <&sys_ck>;
> +	};
> +};
> diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts
> --- a/arch/arm/boot/dts/omap3-beagle.dts
> +++ b/arch/arm/boot/dts/omap3-beagle.dts
> @@ -308,39 +308,6 @@ &usbhsehci {
>  	phys = <0 &hsusb2_phy>;
>  };
>  
> -/* Unusable as clocksource because of unreliable oscillator */
> -&counter32k {
> -	status = "disabled";
> -};
> -
> -/* Unusable as clockevent because if unreliable oscillator, allow to idle */
> -&timer1_target {
> -	/delete-property/ti,no-reset-on-init;
> -	/delete-property/ti,no-idle;
> -	timer@0 {
> -		/delete-property/ti,timer-alwon;
> -	};
> -};
> -
> -/* Preferred always-on timer for clocksource */
> -&timer12_target {
> -	ti,no-reset-on-init;
> -	ti,no-idle;
> -	timer@0 {
> -		/* Always clocked by secure_32k_fck */
> -	};
> -};
> -
> -/* Preferred timer for clockevent */
> -&timer2_target {
> -	ti,no-reset-on-init;
> -	ti,no-idle;
> -	timer@0 {
> -		assigned-clocks = <&gpt2_fck>;
> -		assigned-clock-parents = <&sys_ck>;
> -	};
> -};
> -
>  &twl_gpio {
>  	ti,use-leds;
>  	/* pullups: BIT(1) */
> diff --git a/drivers/clocksource/timer-ti-dm-systimer.c b/drivers/clocksource/timer-ti-dm-systimer.c
> --- a/drivers/clocksource/timer-ti-dm-systimer.c
> +++ b/drivers/clocksource/timer-ti-dm-systimer.c
> @@ -241,7 +241,7 @@ static void __init dmtimer_systimer_assign_alwon(void)
>  	bool quirk_unreliable_oscillator = false;
>  
>  	/* Quirk unreliable 32 KiHz oscillator with incomplete dts */
> -	if (of_machine_is_compatible("ti,omap3-beagle") ||
> +	if (of_machine_is_compatible("ti,omap3-beagle-ab4") ||
>  	    of_machine_is_compatible("timll,omap3-devkit8000")) {
>  		quirk_unreliable_oscillator = true;
>  		counter_32k = -ENODEV;
> 


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ARM: dts: Fix timer regression for beagleboard revision c
  2021-11-29  9:56 ` Daniel Lezcano
@ 2021-11-29 13:30   ` Tony Lindgren
  0 siblings, 0 replies; 8+ messages in thread
From: Tony Lindgren @ 2021-11-29 13:30 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: linux-omap, Benoît Cousson, devicetree, linux-kernel,
	Thomas Gleixner, Rob Herring, Jarkko Nikula

Hi,

* Daniel Lezcano <daniel.lezcano@linaro.org> [211129 09:57]:
> On 25/11/2021 15:48, Tony Lindgren wrote:
> >  .../devicetree/bindings/arm/omap/omap.txt     |  3 ++
> >  arch/arm/boot/dts/Makefile                    |  1 +
> >  arch/arm/boot/dts/omap3-beagle-ab4.dts        | 47 +++++++++++++++++++
> >  arch/arm/boot/dts/omap3-beagle.dts            | 33 -------------
> >  drivers/clocksource/timer-ti-dm-systimer.c    |  2 +-
> >  5 files changed, 52 insertions(+), 34 deletions(-)
> >  create mode 100644 arch/arm/boot/dts/omap3-beagle-ab4.dts
> 
> Usually, bindings DT and driver changes are separate patches

Not always for fixes :) In this case we need to patch both the dts for
timer quirks, and also update the related driver quirk. The driver quirk
I originally added to deal with possble older dtb files complicating the
fix unncessarily..

If you have better ideas for a fix please let me know.

Regards,

Tony

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ARM: dts: Fix timer regression for beagleboard revision c
  2021-11-25 14:48 [PATCH] ARM: dts: Fix timer regression for beagleboard revision c Tony Lindgren
  2021-11-28 18:43 ` Jarkko Nikula
  2021-11-29  9:56 ` Daniel Lezcano
@ 2021-12-11 15:30 ` Jarkko Nikula
  2021-12-12 19:04   ` Jarkko Nikula
  2 siblings, 1 reply; 8+ messages in thread
From: Jarkko Nikula @ 2021-12-11 15:30 UTC (permalink / raw)
  To: Tony Lindgren, linux-omap
  Cc: Benoît Cousson, devicetree, linux-kernel, Daniel Lezcano,
	Thomas Gleixner, Rob Herring

Hi Tony

On 11/25/21 16:48, Tony Lindgren wrote:
> Commit e428e250fde6 ("ARM: dts: Configure system timers for omap3")
> caused a timer regression for beagleboard revision c where the system
> clockevent stops working if omap3isp module is unloaded.
> 
> Turns out we still have beagleboard revisions a-b4 capacitor c70 quirks
> applied that limit the usable timers for no good reason. This also affects
> the power management as we use the system clock instead of the 32k clock
> source.
> 
> Let's fix the issue by adding a new omap3-beagle-ab4.dts for the old timer
> quirks. This allows us to remove the timer quirks for later beagleboard
> revisions. We also need to update the related timer quirk check for the
> correct compatible property.
> 
> Fixes: e428e250fde6 ("ARM: dts: Configure system timers for omap3")
> Cc: linux-kernel@vger.kernel.org
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Rob Herring <robh+dt@kernel.org>
> Reported-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---

>  .../devicetree/bindings/arm/omap/omap.txt     |  3 ++
>  arch/arm/boot/dts/Makefile                    |  1 +
>  arch/arm/boot/dts/omap3-beagle-ab4.dts        | 47 +++++++++++++++++++
>  arch/arm/boot/dts/omap3-beagle.dts            | 33 -------------
>  drivers/clocksource/timer-ti-dm-systimer.c    |  2 +-
>  5 files changed, 52 insertions(+), 34 deletions(-)
>  create mode 100644 arch/arm/boot/dts/omap3-beagle-ab4.dts
> 
I must have some error in my methodology since I cannot see the issue
being fixed with your patch :-(

Testing at commit 6f513529296f ("Merge tag 'for-5.16-rc4-tag' of
git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux")

alias ma='nice make -j `getconf _NPROCESSORS_ONLN` ARCH=arm
CROSS_COMPILE="ccache arm-linux-gnueabihf-"'

make ARCH=arm omap2plus_defconfig
ma
cat arch/arm/boot/dts/omap3-beagle.dtb >>arch/arm/boot/zImage
ma LOADADDR=0x80008000 uImage

-> copy uImage & modules, boot
# rmmod omap3_isp
# sleep 1
-> This is the regression. Sleep is blocked until I hit keys over serial
console

rm vmlinux arch/arm/boot/zImage
patch -p1 </tmp/your-mail.eml

ma
cat arch/arm/boot/dts/omap3-beagle-ab4.dtb >>arch/arm/boot/zImage
ma LOADADDR=0x80008000 uImage

-> copy uImage & modules to µSD, boot
# rmmod omap3_isp
# sleep 1
-> is still blocked until I hit keys over serial console

When I compare the dmesg this is the only difference (along with "linux
version" line) before user space starts. I.e. timer configuration is the
same in both.

[    0.000000] OF: fdt: Machine model: TI OMAP3 BeagleBoard
->
[    0.000000] OF: fdt: Machine model: TI OMAP3 BeagleBoard A to B4

Jarkko

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ARM: dts: Fix timer regression for beagleboard revision c
  2021-12-11 15:30 ` Jarkko Nikula
@ 2021-12-12 19:04   ` Jarkko Nikula
  2021-12-13  5:43     ` Tony Lindgren
  0 siblings, 1 reply; 8+ messages in thread
From: Jarkko Nikula @ 2021-12-12 19:04 UTC (permalink / raw)
  To: Tony Lindgren, linux-omap
  Cc: Benoît Cousson, devicetree, linux-kernel, Daniel Lezcano,
	Thomas Gleixner, Rob Herring

On Sat, Dec 11, 2021 at 05:30:57PM +0200, Jarkko Nikula wrote:
> Hi Tony
> 
> On 11/25/21 16:48, Tony Lindgren wrote:
> > Commit e428e250fde6 ("ARM: dts: Configure system timers for omap3")
> > caused a timer regression for beagleboard revision c where the system
> > clockevent stops working if omap3isp module is unloaded.
> > 
> > Turns out we still have beagleboard revisions a-b4 capacitor c70 quirks
> > applied that limit the usable timers for no good reason. This also affects
> > the power management as we use the system clock instead of the 32k clock
> > source.
> > 
> > Let's fix the issue by adding a new omap3-beagle-ab4.dts for the old timer
> > quirks. This allows us to remove the timer quirks for later beagleboard
> > revisions. We also need to update the related timer quirk check for the
> > correct compatible property.
> > 
> > Fixes: e428e250fde6 ("ARM: dts: Configure system timers for omap3")
> > Cc: linux-kernel@vger.kernel.org
> > Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Rob Herring <robh+dt@kernel.org>
> > Reported-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > ---
> 
> >  .../devicetree/bindings/arm/omap/omap.txt     |  3 ++
> >  arch/arm/boot/dts/Makefile                    |  1 +
> >  arch/arm/boot/dts/omap3-beagle-ab4.dts        | 47 +++++++++++++++++++
> >  arch/arm/boot/dts/omap3-beagle.dts            | 33 -------------
> >  drivers/clocksource/timer-ti-dm-systimer.c    |  2 +-
> >  5 files changed, 52 insertions(+), 34 deletions(-)
> >  create mode 100644 arch/arm/boot/dts/omap3-beagle-ab4.dts
> > 
> I must have some error in my methodology since I cannot see the issue
> being fixed with your patch :-(
> 
Facepalm, as I was expecting I had error in my methodology... see below

> cat arch/arm/boot/dts/omap3-beagle.dtb >>arch/arm/boot/zImage

This I used years before your patch and by some reason I confused to use
new omap3-beagle-ab4.dtb when testing your patch yesterday:

> cat arch/arm/boot/dts/omap3-beagle-ab4.dtb >>arch/arm/boot/zImage

without realizing my Beagle Board version is not between A to B4 but C2.
So when using the omap3-beagle.dtb your patch fixes the regression I
found.

Tested-by: Jarkko Nikula <jarkko.nikula@bitmer.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ARM: dts: Fix timer regression for beagleboard revision c
  2021-12-12 19:04   ` Jarkko Nikula
@ 2021-12-13  5:43     ` Tony Lindgren
  2021-12-17 12:17       ` Tony Lindgren
  0 siblings, 1 reply; 8+ messages in thread
From: Tony Lindgren @ 2021-12-13  5:43 UTC (permalink / raw)
  To: Jarkko Nikula
  Cc: linux-omap, Benoît Cousson, devicetree, linux-kernel,
	Daniel Lezcano, Thomas Gleixner, Rob Herring

* Jarkko Nikula <jarkko.nikula@bitmer.com> [211212 19:05]:
> On Sat, Dec 11, 2021 at 05:30:57PM +0200, Jarkko Nikula wrote:
> This I used years before your patch and by some reason I confused to use
> new omap3-beagle-ab4.dtb when testing your patch yesterday:
> 
> > cat arch/arm/boot/dts/omap3-beagle-ab4.dtb >>arch/arm/boot/zImage
> 
> without realizing my Beagle Board version is not between A to B4 but C2.
> So when using the omap3-beagle.dtb your patch fixes the regression I
> found.
> 
> Tested-by: Jarkko Nikula <jarkko.nikula@bitmer.com>

OK good to hear omap3-beagle.dtb now works for beagles that don't have
the A to B4 hardware timer issue :) And thanks for testing.

It seems the beagle revisions A to B4 are broken for any kind of power
management as the clockevent timer for those boards is not always on.
Probably not worth spending much effort on those. Maybe the PMIC could
be reconfigured on the buggy revisions in addition to the timer quirks
if somebody still cares for those board revisions.

Regards,

Tony

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ARM: dts: Fix timer regression for beagleboard revision c
  2021-12-13  5:43     ` Tony Lindgren
@ 2021-12-17 12:17       ` Tony Lindgren
  0 siblings, 0 replies; 8+ messages in thread
From: Tony Lindgren @ 2021-12-17 12:17 UTC (permalink / raw)
  To: Jarkko Nikula
  Cc: linux-omap, Benoît Cousson, devicetree, linux-kernel,
	Daniel Lezcano, Thomas Gleixner, Rob Herring

* Tony Lindgren <tony@atomide.com> [211213 05:44]:
> * Jarkko Nikula <jarkko.nikula@bitmer.com> [211212 19:05]:
> > On Sat, Dec 11, 2021 at 05:30:57PM +0200, Jarkko Nikula wrote:
> > This I used years before your patch and by some reason I confused to use
> > new omap3-beagle-ab4.dtb when testing your patch yesterday:
> > 
> > > cat arch/arm/boot/dts/omap3-beagle-ab4.dtb >>arch/arm/boot/zImage
> > 
> > without realizing my Beagle Board version is not between A to B4 but C2.
> > So when using the omap3-beagle.dtb your patch fixes the regression I
> > found.
> > 
> > Tested-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
> 
> OK good to hear omap3-beagle.dtb now works for beagles that don't have
> the A to B4 hardware timer issue :) And thanks for testing.
> 
> It seems the beagle revisions A to B4 are broken for any kind of power
> management as the clockevent timer for those boards is not always on.
> Probably not worth spending much effort on those. Maybe the PMIC could
> be reconfigured on the buggy revisions in addition to the timer quirks
> if somebody still cares for those board revisions.

Anyways, applying this fix into omap-for-v5.17/fixes-not-urgent.

Regards,

Tony

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-12-17 12:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-25 14:48 [PATCH] ARM: dts: Fix timer regression for beagleboard revision c Tony Lindgren
2021-11-28 18:43 ` Jarkko Nikula
2021-11-29  9:56 ` Daniel Lezcano
2021-11-29 13:30   ` Tony Lindgren
2021-12-11 15:30 ` Jarkko Nikula
2021-12-12 19:04   ` Jarkko Nikula
2021-12-13  5:43     ` Tony Lindgren
2021-12-17 12:17       ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).