Skip to content

Commit 2388538

Browse files
committed
ARM: dts: Fix timer regression for beagleboard revision c
Commit e428e25 ("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: e428e25 ("ARM: dts: Configure system timers for omap3") Cc: [email protected] Cc: Daniel Lezcano <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Rob Herring <[email protected]> Reported-by: Jarkko Nikula <[email protected]> Tested-by: Jarkko Nikula <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
1 parent 29a5e84 commit 2388538

File tree

5 files changed

+52
-34
lines changed

5 files changed

+52
-34
lines changed

Documentation/devicetree/bindings/arm/omap/omap.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ Boards (incomplete list of examples):
119119
- OMAP3 BeagleBoard : Low cost community board
120120
compatible = "ti,omap3-beagle", "ti,omap3430", "ti,omap3"
121121

122+
- OMAP3 BeagleBoard A to B4 : Early BeagleBoard revisions A to B4 with a timer quirk
123+
compatible = "ti,omap3-beagle-ab4", "ti,omap3-beagle", "ti,omap3430", "ti,omap3"
124+
122125
- OMAP3 Tobi with Overo : Commercial expansion board with daughter board
123126
compatible = "gumstix,omap3-overo-tobi", "gumstix,omap3-overo", "ti,omap3430", "ti,omap3"
124127

arch/arm/boot/dts/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,7 @@ dtb-$(CONFIG_ARCH_OMAP3) += \
794794
logicpd-som-lv-37xx-devkit.dtb \
795795
omap3430-sdp.dtb \
796796
omap3-beagle.dtb \
797+
omap3-beagle-ab4.dtb \
797798
omap3-beagle-xm.dtb \
798799
omap3-beagle-xm-ab.dtb \
799800
omap3-cm-t3517.dtb \
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// SPDX-License-Identifier: GPL-2.0-only
2+
/dts-v1/;
3+
4+
#include "omap3-beagle.dts"
5+
6+
/ {
7+
model = "TI OMAP3 BeagleBoard A to B4";
8+
compatible = "ti,omap3-beagle-ab4", "ti,omap3-beagle", "ti,omap3430", "ti,omap3";
9+
};
10+
11+
/*
12+
* Workaround for capacitor C70 issue, see "Boards revision A and < B5"
13+
* section at https://elinux.org/BeagleBoard_Community
14+
*/
15+
16+
/* Unusable as clocksource because of unreliable oscillator */
17+
&counter32k {
18+
status = "disabled";
19+
};
20+
21+
/* Unusable as clockevent because of unreliable oscillator, allow to idle */
22+
&timer1_target {
23+
/delete-property/ti,no-reset-on-init;
24+
/delete-property/ti,no-idle;
25+
timer@0 {
26+
/delete-property/ti,timer-alwon;
27+
};
28+
};
29+
30+
/* Preferred always-on timer for clocksource */
31+
&timer12_target {
32+
ti,no-reset-on-init;
33+
ti,no-idle;
34+
timer@0 {
35+
/* Always clocked by secure_32k_fck */
36+
};
37+
};
38+
39+
/* Preferred timer for clockevent */
40+
&timer2_target {
41+
ti,no-reset-on-init;
42+
ti,no-idle;
43+
timer@0 {
44+
assigned-clocks = <&gpt2_fck>;
45+
assigned-clock-parents = <&sys_ck>;
46+
};
47+
};

arch/arm/boot/dts/omap3-beagle.dts

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -304,39 +304,6 @@
304304
phys = <0 &hsusb2_phy>;
305305
};
306306

307-
/* Unusable as clocksource because of unreliable oscillator */
308-
&counter32k {
309-
status = "disabled";
310-
};
311-
312-
/* Unusable as clockevent because if unreliable oscillator, allow to idle */
313-
&timer1_target {
314-
/delete-property/ti,no-reset-on-init;
315-
/delete-property/ti,no-idle;
316-
timer@0 {
317-
/delete-property/ti,timer-alwon;
318-
};
319-
};
320-
321-
/* Preferred always-on timer for clocksource */
322-
&timer12_target {
323-
ti,no-reset-on-init;
324-
ti,no-idle;
325-
timer@0 {
326-
/* Always clocked by secure_32k_fck */
327-
};
328-
};
329-
330-
/* Preferred timer for clockevent */
331-
&timer2_target {
332-
ti,no-reset-on-init;
333-
ti,no-idle;
334-
timer@0 {
335-
assigned-clocks = <&gpt2_fck>;
336-
assigned-clock-parents = <&sys_ck>;
337-
};
338-
};
339-
340307
&twl_gpio {
341308
ti,use-leds;
342309
/* pullups: BIT(1) */

drivers/clocksource/timer-ti-dm-systimer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ static void __init dmtimer_systimer_assign_alwon(void)
241241
bool quirk_unreliable_oscillator = false;
242242

243243
/* Quirk unreliable 32 KiHz oscillator with incomplete dts */
244-
if (of_machine_is_compatible("ti,omap3-beagle") ||
244+
if (of_machine_is_compatible("ti,omap3-beagle-ab4") ||
245245
of_machine_is_compatible("timll,omap3-devkit8000")) {
246246
quirk_unreliable_oscillator = true;
247247
counter_32k = -ENODEV;

0 commit comments

Comments
 (0)