Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1653654 > unrolled thread
| Started by | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| First post | 2017-05-31 00:10 +0200 |
| Last post | 2017-05-31 09:30 +0200 |
| Articles | 20 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 00/58] ARM: at91: rework Atmel TCB drivers Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-05-31 00:10 +0200
[PATCH 22/58] ARM: dts: at91: at91sam9rl: TC blocks are also simple-mfd and syscon devices Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-05-31 00:10 +0200
[PATCH 31/58] ARM: dts: at91: sama5d3: TC blocks are also simple-mfd and syscon devices Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-05-31 00:10 +0200
[PATCH 29/58] ARM: dts: at91: cosino: use TCB0 as clocksource Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-05-31 00:10 +0200
[PATCH 15/58] ARM: dts: at91: at91sam9261ek: use TCB0 as clocksource Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-05-31 00:10 +0200
[PATCH 24/58] ARM: dts: at91: at91sam9n12: TC blocks are also simple-mfd and syscon devices Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-05-31 00:10 +0200
[PATCH 09/58] ARM: dts: at91: foxg20: use TCB0 as clocksource Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-05-31 00:10 +0200
[PATCH 02/58] ARM: dts: at91: at91rm9200: TC blocks are also simple-mfd and syscon devices Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-05-31 00:10 +0200
[PATCH 13/58] ARM: dts: at91: ge863-pro3: use TCB0 as clocksource Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-05-31 00:10 +0200
[PATCH 03/58] ARM: dts: at91: at91rm9200ek: use TCB0 as clocksource Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-05-31 00:10 +0200
[PATCH 25/58] ARM: dts: at91: at91sam9n12ek: use TCB0 as clocksource Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-05-31 00:10 +0200
[PATCH 06/58] ARM: dts: at91: at91sam9260ek: use TCB0 as clocksource Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-05-31 00:10 +0200
[PATCH 11/58] ARM: dts: at91: kizbox: use TCB0 as clocksource Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-05-31 00:10 +0200
[PATCH 07/58] ARM: dts: at91: sam9_l9260: use TCB0 as clocksource Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-05-31 00:10 +0200
[PATCH 04/58] ARM: dts: at91: mpa1600: use TCB0 as clocksource Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-05-31 00:10 +0200
[PATCH 28/58] ARM: dts: at91: acme/g25: use TCB0 as clocksource Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-05-31 00:10 +0200
[PATCH 26/58] ARM: dts: at91: at91sam9x5: TC blocks are also simple-mfd and syscon devices Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-05-31 00:10 +0200
[PATCH 33/58] ARM: dts: at91: sama5d3 Xplained: use TCB0 as clocksource Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-05-31 00:10 +0200
[PATCH 27/58] ARM: dts: at91: at91sam9x5cm: use TCB0 as clocksource Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-05-31 00:10 +0200
Re: [PATCH 00/58] ARM: at91: rework Atmel TCB drivers Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-05-31 09:30 +0200
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2017-05-31 00:10 +0200 |
| Subject | [PATCH 00/58] ARM: at91: rework Atmel TCB drivers |
| Message-ID | <tMXlg-4i6-3@gated-at.bofh.it> |
Hi,
This series reworks the Atmel Timer counter Block drivers. Those blocks
each have 3 counters with 2 channels each and can be used for
multiple functions:
- timers
- PWMs
- Quadrature decoders
- Stepper motor counters
Up until now, each TCB was fully used by each driver, possibly wasting
counters/channels.
There is a second issue motivating that rework. Until now, the PIT is
still used to boot then later in the boot sequence, the clocksource is
switched to the TCB. This ends up not working well with preempt-rt
because on some SoCs, the PIT interrupt is shared with the DBGU uart.
When using preempt-rt the interrupt flags for the PIT and the DBGU end
up being incompatible.
The rework breaks the DT ABI. Backward compatibility can be kept by
keeping tcb_clksrc and atmel_tclib but as AVR32 is now gone from the
kernel, I don't think it makes much sense to keep them.
Also, there is no other choice than breaking the mainly unused
pwm-atmel-tcb binding. Only the kizbox is actually using it.
I think the bindings are now ok and I hope we can take the DT changes
for 4.13.
Cc: Antoine Aubert <a.aubert@overkiz.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: devicetree@vger.kernel.org
Cc: Douglas Gilbert <dgilbert@interlog.com>
Cc: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
Cc: Gregory Hermant <gregory.hermant@calao-systems.com>
Cc: Joachim Eastwood <manabian@gmail.com>
Cc: linux-pwm@vger.kernel.org
Cc: Marek Vasut <marex@denx.de>
Cc: Martin Reimann <martin.reimann@egnite.de>
Cc: Peter Rosin <peda@axentia.se>
Cc: Raashid Muhammed <raashidmuhammed@zilogic.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Rodolfo Giometti <giometti@linux.it>
Cc: Sergio Tanzilli <tanzilli@acmesystems.it>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tim Schendekehl <tim.schendekehl@egnite.de>
Alexandre Belloni (58):
ARM: at91: Document new TCB bindings
ARM: dts: at91: at91rm9200: TC blocks are also simple-mfd and syscon
devices
ARM: dts: at91: at91rm9200ek: use TCB0 as clocksource
ARM: dts: at91: mpa1600: use TCB0 as clocksource
ARM: dts: at91: at91sam9260: TC blocks are also simple-mfd and syscon
devices
ARM: dts: at91: at91sam9260ek: use TCB0 as clocksource
ARM: dts: at91: sam9_l9260: use TCB0 as clocksource
ARM: dts: at91: ethernut5: use TCB0 as clocksource
ARM: dts: at91: foxg20: use TCB0 as clocksource
ARM: dts: at91: animeo_ip: use TCB0 as clocksource
ARM: dts: at91: kizbox: use TCB0 as clocksource
ARM: dts: at91: at91sam9g20ek: use TCB0 as clocksource
ARM: dts: at91: ge863-pro3: use TCB0 as clocksource
ARM: dts: at91: at91sam9261: TC blocks are also simple-mfd and syscon
devices
ARM: dts: at91: at91sam9261ek: use TCB0 as clocksource
ARM: dts: at91: at91sam9263: TC blocks are also simple-mfd and syscon
devices
ARM: dts: at91: at91sam9263ek: use TCB0 as clocksource
ARM: dts: at91: calao: use TCB0 as clocksource
ARM: dts: at91: at91sam9g45: TC blocks are also simple-mfd and syscon
devices
ARM: dts: at91: at91sam9m10g45ek: use TCB0 as clocksource
ARM: dts: at91: pm9g45: use TCB0 as clocksource
ARM: dts: at91: at91sam9rl: TC blocks are also simple-mfd and syscon
devices
ARM: dts: at91: at91sam9rlek: use TCB0 as clocksource
ARM: dts: at91: at91sam9n12: TC blocks are also simple-mfd and syscon
devices
ARM: dts: at91: at91sam9n12ek: use TCB0 as clocksource
ARM: dts: at91: at91sam9x5: TC blocks are also simple-mfd and syscon
devices
ARM: dts: at91: at91sam9x5cm: use TCB0 as clocksource
ARM: dts: at91: acme/g25: use TCB0 as clocksource
ARM: dts: at91: cosino: use TCB0 as clocksource
ARM: dts: at91: kizboxmini: use TCB0 as clocksource
ARM: dts: at91: sama5d3: TC blocks are also simple-mfd and syscon
devices
ARM: dts: at91: sama5d3xek: use TCB0 as clocksource
ARM: dts: at91: sama5d3 Xplained: use TCB0 as clocksource
ARM: dts: at91: kizbox2: use TCB0 as clocksource
ARM: dts: at91: sama5d3xek_cmp: use TCB0 as clocksource
ARM: dts: at91: linea/tse850-3: use TCB0 as clocksource
ARM: dts: at91: sama5d4: TC blocks are also simple-mfd and syscon
devices
ARM: dts: at91: sama5d4: Add TCB2
ARM: dts: at91: sama5d4ek: use TCB2 as clocksource
ARM: dts: at91: sama5d4 Xplained: use TCB2 as clocksource
ARM: dts: at91: ma5d4: use TCB2 as clocksource
ARM: dts: at91: vinco: use TCB2 as clocksource
ARM: dts: at91: sama5d2: TC blocks are also simple-mfd and syscon
devices
ARM: dts: at91: sama5d2 Xplained: use TCB0 as clocksource
ARM: at91: add TCB registers definitions
clocksource/drivers: Add a new driver for the Atmel ARM TC blocks
clocksource/drivers: timer-atmel-tcbclksrc: add clockevent device
clocksource/drivers: timer-atmel-tcbclksrc: add clockevent device on
separate channel
clocksource/drivers: atmel-pit: allow unselecting ATMEL_PIT
ARM: at91/defconfig: sama5: unselect ATMEL_PIT
ARM: at91/defconfig: at91_dt unselect ATMEL_PIT
PWM: atmel-tcb: switch to new binding
ARM: dts: at91: kizbox: switch to new pwm-atmel-tcb binding
clocksource/drivers: remove tcb_clksrc
misc: remove atmel_tclib.c
ARM: configs: at91: remove ATMEL_TCLIB
ARM: multi_v7_defconfig: Remove ATMEL_TCLIB Kconfig symbol
ARM: multi_v5_defconfig: Remove ATMEL_TCLIB Kconfig symbol
.../devicetree/bindings/arm/atmel-at91.txt | 32 --
.../devicetree/bindings/mfd/atmel-tcb.txt | 58 +++
.../devicetree/bindings/pwm/atmel-tcb-pwm.txt | 12 +-
arch/arm/boot/dts/animeo_ip.dts | 12 +
arch/arm/boot/dts/at91-ariag25.dts | 12 +
arch/arm/boot/dts/at91-ariettag25.dts | 12 +
arch/arm/boot/dts/at91-cosino.dtsi | 12 +
arch/arm/boot/dts/at91-foxg20.dts | 12 +
arch/arm/boot/dts/at91-kizbox.dts | 54 ++-
arch/arm/boot/dts/at91-kizbox2.dts | 12 +
arch/arm/boot/dts/at91-kizboxmini.dts | 12 +
arch/arm/boot/dts/at91-linea.dtsi | 12 +
arch/arm/boot/dts/at91-qil_a9260.dts | 12 +
arch/arm/boot/dts/at91-sam9_l9260.dts | 12 +
arch/arm/boot/dts/at91-sama5d2_xplained.dts | 12 +
arch/arm/boot/dts/at91-sama5d3_xplained.dts | 12 +
arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi | 12 +
arch/arm/boot/dts/at91-sama5d4_xplained.dts | 12 +
arch/arm/boot/dts/at91-sama5d4ek.dts | 12 +
arch/arm/boot/dts/at91-vinco.dts | 12 +
arch/arm/boot/dts/at91rm9200.dtsi | 8 +-
arch/arm/boot/dts/at91rm9200ek.dts | 12 +
arch/arm/boot/dts/at91sam9260.dtsi | 8 +-
arch/arm/boot/dts/at91sam9260ek.dts | 12 +
arch/arm/boot/dts/at91sam9261.dtsi | 4 +-
arch/arm/boot/dts/at91sam9261ek.dts | 12 +
arch/arm/boot/dts/at91sam9263.dtsi | 4 +-
arch/arm/boot/dts/at91sam9263ek.dts | 12 +
arch/arm/boot/dts/at91sam9g20ek_common.dtsi | 12 +
arch/arm/boot/dts/at91sam9g45.dtsi | 8 +-
arch/arm/boot/dts/at91sam9m10g45ek.dts | 12 +
arch/arm/boot/dts/at91sam9n12.dtsi | 8 +-
arch/arm/boot/dts/at91sam9n12ek.dts | 12 +
arch/arm/boot/dts/at91sam9rl.dtsi | 4 +-
arch/arm/boot/dts/at91sam9rlek.dts | 12 +
arch/arm/boot/dts/at91sam9x5.dtsi | 8 +-
arch/arm/boot/dts/at91sam9x5cm.dtsi | 12 +
arch/arm/boot/dts/ethernut5.dts | 12 +
arch/arm/boot/dts/ge863-pro3.dtsi | 12 +
arch/arm/boot/dts/mpa1600.dts | 12 +
arch/arm/boot/dts/pm9g45.dts | 12 +
arch/arm/boot/dts/sama5d2.dtsi | 8 +-
arch/arm/boot/dts/sama5d3.dtsi | 4 +-
arch/arm/boot/dts/sama5d3_tcb1.dtsi | 4 +-
arch/arm/boot/dts/sama5d3xcm.dtsi | 12 +
arch/arm/boot/dts/sama5d3xcm_cmp.dtsi | 12 +
arch/arm/boot/dts/sama5d4.dtsi | 18 +-
arch/arm/boot/dts/tny_a9260_common.dtsi | 12 +
arch/arm/boot/dts/tny_a9263.dts | 12 +
arch/arm/boot/dts/usb_a9260_common.dtsi | 12 +
arch/arm/boot/dts/usb_a9263.dts | 12 +
arch/arm/configs/at91_dt_defconfig | 2 +-
arch/arm/configs/multi_v5_defconfig | 1 -
arch/arm/configs/multi_v7_defconfig | 1 -
arch/arm/configs/sama5_defconfig | 2 +-
drivers/clocksource/Kconfig | 22 +-
drivers/clocksource/Makefile | 2 +-
drivers/clocksource/tcb_clksrc.c | 381 ----------------
drivers/clocksource/timer-atmel-tcbclksrc.c | 502 +++++++++++++++++++++
drivers/misc/Kconfig | 33 --
drivers/misc/Makefile | 1 -
drivers/misc/atmel_tclib.c | 198 --------
drivers/pwm/Kconfig | 3 +-
drivers/pwm/pwm-atmel-tcb.c | 221 ++++-----
include/linux/atmel_tc.h | 9 -
include/soc/at91/atmel_tcb.h | 229 ++++++++++
66 files changed, 1468 insertions(+), 801 deletions(-)
create mode 100644 Documentation/devicetree/bindings/mfd/atmel-tcb.txt
delete mode 100644 drivers/clocksource/tcb_clksrc.c
create mode 100644 drivers/clocksource/timer-atmel-tcbclksrc.c
delete mode 100644 drivers/misc/atmel_tclib.c
create mode 100644 include/soc/at91/atmel_tcb.h
--
2.11.0
[toc] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2017-05-31 00:10 +0200 |
| Subject | [PATCH 22/58] ARM: dts: at91: at91sam9rl: TC blocks are also simple-mfd and syscon devices |
| Message-ID | <tMXuV-4AS-9@gated-at.bofh.it> |
| In reply to | #1653654 |
Add simple-mfd and syscon to the TC blocks to allow to register one of the
channels as clocksource properly at boot time. It also allows to use regmap
instead of tclib.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/boot/dts/at91sam9rl.dtsi | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/at91sam9rl.dtsi b/arch/arm/boot/dts/at91sam9rl.dtsi
index f4c129a98f17..b77c5fbb8d9d 100644
--- a/arch/arm/boot/dts/at91sam9rl.dtsi
+++ b/arch/arm/boot/dts/at91sam9rl.dtsi
@@ -116,7 +116,9 @@
ranges;
tcb0: timer@fffa0000 {
- compatible = "atmel,at91rm9200-tcb";
+ compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon";
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <0xfffa0000 0x100>;
interrupts = <16 IRQ_TYPE_LEVEL_HIGH 0>,
<17 IRQ_TYPE_LEVEL_HIGH 0>,
--
2.11.0
[toc] | [prev] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2017-05-31 00:10 +0200 |
| Subject | [PATCH 31/58] ARM: dts: at91: sama5d3: TC blocks are also simple-mfd and syscon devices |
| Message-ID | <tMXuW-4AS-13@gated-at.bofh.it> |
| In reply to | #1653654 |
Add simple-mfd and syscon to the TC blocks to allow to register one of the
channels as clocksource properly at boot time. It also allows to use
regmap instead of tclib.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/boot/dts/sama5d3.dtsi | 4 +++-
arch/arm/boot/dts/sama5d3_tcb1.dtsi | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/sama5d3.dtsi b/arch/arm/boot/dts/sama5d3.dtsi
index b06448ba6649..d026470c10e7 100644
--- a/arch/arm/boot/dts/sama5d3.dtsi
+++ b/arch/arm/boot/dts/sama5d3.dtsi
@@ -142,7 +142,9 @@
};
tcb0: timer@f0010000 {
- compatible = "atmel,at91sam9x5-tcb";
+ compatible = "atmel,at91sam9x5-tcb", "simple-mfd", "syscon";
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <0xf0010000 0x100>;
interrupts = <26 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&tcb0_clk>, <&clk32k>;
diff --git a/arch/arm/boot/dts/sama5d3_tcb1.dtsi b/arch/arm/boot/dts/sama5d3_tcb1.dtsi
index 801f9745e82f..cb30bdb1a9ca 100644
--- a/arch/arm/boot/dts/sama5d3_tcb1.dtsi
+++ b/arch/arm/boot/dts/sama5d3_tcb1.dtsi
@@ -28,7 +28,9 @@
};
tcb1: timer@f8014000 {
- compatible = "atmel,at91sam9x5-tcb";
+ compatible = "atmel,at91sam9x5-tcb", "simple-mfd", "syscon";
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <0xf8014000 0x100>;
interrupts = <27 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&tcb1_clk>, <&clk32k>;
--
2.11.0
[toc] | [prev] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2017-05-31 00:10 +0200 |
| Subject | [PATCH 29/58] ARM: dts: at91: cosino: use TCB0 as clocksource |
| Message-ID | <tMXuW-4AS-11@gated-at.bofh.it> |
| In reply to | #1653654 |
Use tcb0 as the clocksource like previously selected in at91_dt_defconfig.
Cc: Rodolfo Giometti <giometti@linux.it>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/boot/dts/at91-cosino.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm/boot/dts/at91-cosino.dtsi b/arch/arm/boot/dts/at91-cosino.dtsi
index 02d8ef43de3a..9dcee7095c06 100644
--- a/arch/arm/boot/dts/at91-cosino.dtsi
+++ b/arch/arm/boot/dts/at91-cosino.dtsi
@@ -37,6 +37,18 @@
ahb {
apb {
+ tcb0: timer@f8008000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>;
+ };
+
+ timer@1 {
+ compatible = "atmel,tcb-timer";
+ reg = <1>;
+ };
+ };
+
mmc0: mmc@f0008000 {
pinctrl-0 = <
&pinctrl_board_mmc0
--
2.11.0
[toc] | [prev] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2017-05-31 00:10 +0200 |
| Subject | [PATCH 15/58] ARM: dts: at91: at91sam9261ek: use TCB0 as clocksource |
| Message-ID | <tMXuW-4AS-15@gated-at.bofh.it> |
| In reply to | #1653654 |
Use tcb0 as the clocksource like previously selected in at91_dt_defconfig.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/boot/dts/at91sam9261ek.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm/boot/dts/at91sam9261ek.dts b/arch/arm/boot/dts/at91sam9261ek.dts
index 55bd51f07fa6..91ce8648e2ce 100644
--- a/arch/arm/boot/dts/at91sam9261ek.dts
+++ b/arch/arm/boot/dts/at91sam9261ek.dts
@@ -106,6 +106,18 @@
};
apb {
+ tcb0: timer@fffa0000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>;
+ };
+
+ timer@1 {
+ compatible = "atmel,tcb-timer";
+ reg = <1>;
+ };
+ };
+
usb1: gadget@fffa4000 {
atmel,vbus-gpio = <&pioB 29 GPIO_ACTIVE_HIGH>;
status = "okay";
--
2.11.0
[toc] | [prev] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2017-05-31 00:10 +0200 |
| Subject | [PATCH 24/58] ARM: dts: at91: at91sam9n12: TC blocks are also simple-mfd and syscon devices |
| Message-ID | <tMXuW-4AS-17@gated-at.bofh.it> |
| In reply to | #1653654 |
Add simple-mfd and syscon to the TC blocks to allow to register one of the
channels as clocksource properly at boot time. It also allows to use regmap
instead of tclib.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/boot/dts/at91sam9n12.dtsi | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/at91sam9n12.dtsi b/arch/arm/boot/dts/at91sam9n12.dtsi
index f43d7695352d..d86f35fecdb8 100644
--- a/arch/arm/boot/dts/at91sam9n12.dtsi
+++ b/arch/arm/boot/dts/at91sam9n12.dtsi
@@ -430,7 +430,9 @@
};
tcb0: timer@f8008000 {
- compatible = "atmel,at91sam9x5-tcb";
+ compatible = "atmel,at91sam9x5-tcb", "simple-mfd", "syscon";
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <0xf8008000 0x100>;
interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&tcb_clk>, <&clk32k>;
@@ -438,7 +440,9 @@
};
tcb1: timer@f800c000 {
- compatible = "atmel,at91sam9x5-tcb";
+ compatible = "atmel,at91sam9x5-tcb", "simple-mfd", "syscon";
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <0xf800c000 0x100>;
interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&tcb_clk>, <&clk32k>;
--
2.11.0
[toc] | [prev] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2017-05-31 00:10 +0200 |
| Subject | [PATCH 09/58] ARM: dts: at91: foxg20: use TCB0 as clocksource |
| Message-ID | <tMXuW-4AS-19@gated-at.bofh.it> |
| In reply to | #1653654 |
Use tcb0 as the clocksource like previously selected in at91_dt_defconfig.
Cc: Sergio Tanzilli <tanzilli@acmesystems.it>
Cc: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/boot/dts/at91-foxg20.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm/boot/dts/at91-foxg20.dts b/arch/arm/boot/dts/at91-foxg20.dts
index 50d5e719b451..d413e2d9abdf 100644
--- a/arch/arm/boot/dts/at91-foxg20.dts
+++ b/arch/arm/boot/dts/at91-foxg20.dts
@@ -34,6 +34,18 @@
ahb {
apb {
+ tcb0: timer@fffa0000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>, <1>;
+ };
+
+ timer@2 {
+ compatible = "atmel,tcb-timer";
+ reg = <2>;
+ };
+ };
+
usb1: gadget@fffa4000 {
atmel,vbus-gpio = <&pioC 6 GPIO_ACTIVE_HIGH>;
status = "okay";
--
2.11.0
[toc] | [prev] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2017-05-31 00:10 +0200 |
| Subject | [PATCH 02/58] ARM: dts: at91: at91rm9200: TC blocks are also simple-mfd and syscon devices |
| Message-ID | <tMXuW-4AS-21@gated-at.bofh.it> |
| In reply to | #1653654 |
Add simple-mfd and syscon to the TC blocks to allow to register one of the
channels as clocksource properly at boot time. It also allows to use
regmap instead of tclib.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/boot/dts/at91rm9200.dtsi | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/at91rm9200.dtsi b/arch/arm/boot/dts/at91rm9200.dtsi
index f057e0b15a6f..9392171c7544 100644
--- a/arch/arm/boot/dts/at91rm9200.dtsi
+++ b/arch/arm/boot/dts/at91rm9200.dtsi
@@ -375,7 +375,9 @@
};
tcb0: timer@fffa0000 {
- compatible = "atmel,at91rm9200-tcb";
+ compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon";
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <0xfffa0000 0x100>;
interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0
18 IRQ_TYPE_LEVEL_HIGH 0
@@ -385,7 +387,9 @@
};
tcb1: timer@fffa4000 {
- compatible = "atmel,at91rm9200-tcb";
+ compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon";
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <0xfffa4000 0x100>;
interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0
21 IRQ_TYPE_LEVEL_HIGH 0
--
2.11.0
[toc] | [prev] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2017-05-31 00:10 +0200 |
| Subject | [PATCH 13/58] ARM: dts: at91: ge863-pro3: use TCB0 as clocksource |
| Message-ID | <tMXuW-4AS-23@gated-at.bofh.it> |
| In reply to | #1653654 |
Use tcb0 as the clocksource like previously selected in at91_dt_defconfig.
Cc: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/boot/dts/ge863-pro3.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm/boot/dts/ge863-pro3.dtsi b/arch/arm/boot/dts/ge863-pro3.dtsi
index 4aee5cc75fa4..eef2303806bc 100644
--- a/arch/arm/boot/dts/ge863-pro3.dtsi
+++ b/arch/arm/boot/dts/ge863-pro3.dtsi
@@ -18,6 +18,18 @@
ahb {
apb {
+ tcb0: timer@fffa0000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>, <1>;
+ };
+
+ timer@2 {
+ compatible = "atmel,tcb-timer";
+ reg = <2>;
+ };
+ };
+
dbgu: serial@fffff200 {
status = "okay";
};
--
2.11.0
[toc] | [prev] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2017-05-31 00:10 +0200 |
| Subject | [PATCH 03/58] ARM: dts: at91: at91rm9200ek: use TCB0 as clocksource |
| Message-ID | <tMXuW-4AS-25@gated-at.bofh.it> |
| In reply to | #1653654 |
Use tcb0 as the clocksource like previously selected in at91_dt_defconfig.
Tested-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/boot/dts/at91rm9200ek.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm/boot/dts/at91rm9200ek.dts b/arch/arm/boot/dts/at91rm9200ek.dts
index f90e1c2d3caa..a446e12cbaa8 100644
--- a/arch/arm/boot/dts/at91rm9200ek.dts
+++ b/arch/arm/boot/dts/at91rm9200ek.dts
@@ -32,6 +32,18 @@
ahb {
apb {
+ tcb0: timer@fffa0000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>, <1>;
+ };
+
+ timer@2 {
+ compatible = "atmel,tcb-timer";
+ reg = <2>;
+ };
+ };
+
usb1: gadget@fffb0000 {
atmel,vbus-gpio = <&pioD 4 GPIO_ACTIVE_HIGH>;
atmel,pullup-gpio = <&pioD 5 GPIO_ACTIVE_HIGH>;
--
2.11.0
[toc] | [prev] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2017-05-31 00:10 +0200 |
| Subject | [PATCH 25/58] ARM: dts: at91: at91sam9n12ek: use TCB0 as clocksource |
| Message-ID | <tMXuW-4AS-29@gated-at.bofh.it> |
| In reply to | #1653654 |
Use tcb0 as the clocksource like previously selected in at91_dt_defconfig.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/boot/dts/at91sam9n12ek.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm/boot/dts/at91sam9n12ek.dts b/arch/arm/boot/dts/at91sam9n12ek.dts
index 626c67d66626..9adda0ca1557 100644
--- a/arch/arm/boot/dts/at91sam9n12ek.dts
+++ b/arch/arm/boot/dts/at91sam9n12ek.dts
@@ -42,6 +42,18 @@
status = "okay";
};
+ tcb0: timer@f8008000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>;
+ };
+
+ timer@1 {
+ compatible = "atmel,tcb-timer";
+ reg = <1>;
+ };
+ };
+
i2c0: i2c@f8010000 {
status = "okay";
--
2.11.0
[toc] | [prev] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2017-05-31 00:10 +0200 |
| Subject | [PATCH 06/58] ARM: dts: at91: at91sam9260ek: use TCB0 as clocksource |
| Message-ID | <tMXuW-4AS-33@gated-at.bofh.it> |
| In reply to | #1653654 |
Use tcb0 as the clocksource like previously selected in at91_dt_defconfig.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/boot/dts/at91sam9260ek.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm/boot/dts/at91sam9260ek.dts b/arch/arm/boot/dts/at91sam9260ek.dts
index b2578feceb08..e16c706d91ef 100644
--- a/arch/arm/boot/dts/at91sam9260ek.dts
+++ b/arch/arm/boot/dts/at91sam9260ek.dts
@@ -69,6 +69,18 @@
ahb {
apb {
+ tcb0: timer@fffa0000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>, <1>;
+ };
+
+ timer@2 {
+ compatible = "atmel,tcb-timer";
+ reg = <2>;
+ };
+ };
+
usb1: gadget@fffa4000 {
atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
status = "okay";
--
2.11.0
[toc] | [prev] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2017-05-31 00:10 +0200 |
| Subject | [PATCH 11/58] ARM: dts: at91: kizbox: use TCB0 as clocksource |
| Message-ID | <tMXuX-4AS-39@gated-at.bofh.it> |
| In reply to | #1653654 |
Use tcb0 as the clocksource like previously selected in at91_dt_defconfig.
Cc: Antoine Aubert <a.aubert@overkiz.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/boot/dts/at91-kizbox.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm/boot/dts/at91-kizbox.dts b/arch/arm/boot/dts/at91-kizbox.dts
index b4f147c193fd..c6bf08f8201e 100644
--- a/arch/arm/boot/dts/at91-kizbox.dts
+++ b/arch/arm/boot/dts/at91-kizbox.dts
@@ -31,6 +31,18 @@
ahb {
apb {
+ tcb0: timer@fffa0000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>, <1>;
+ };
+
+ timer@2 {
+ compatible = "atmel,tcb-timer";
+ reg = <2>;
+ };
+ };
+
macb0: ethernet@fffc4000 {
phy-mode = "mii";
pinctrl-0 = <&pinctrl_macb_rmii
--
2.11.0
[toc] | [prev] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2017-05-31 00:10 +0200 |
| Subject | [PATCH 07/58] ARM: dts: at91: sam9_l9260: use TCB0 as clocksource |
| Message-ID | <tMXuX-4AS-45@gated-at.bofh.it> |
| In reply to | #1653654 |
Use tcb0 as the clocksource like previously selected in at91_dt_defconfig.
Cc: Raashid Muhammed <raashidmuhammed@zilogic.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/boot/dts/at91-sam9_l9260.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm/boot/dts/at91-sam9_l9260.dts b/arch/arm/boot/dts/at91-sam9_l9260.dts
index 171243ca4f2f..70cb36f7a9d7 100644
--- a/arch/arm/boot/dts/at91-sam9_l9260.dts
+++ b/arch/arm/boot/dts/at91-sam9_l9260.dts
@@ -32,6 +32,18 @@
ahb {
apb {
+ tcb0: timer@fffa0000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>, <1>;
+ };
+
+ timer@2 {
+ compatible = "atmel,tcb-timer";
+ reg = <2>;
+ };
+ };
+
mmc0: mmc@fffa8000 {
pinctrl-0 = <
&pinctrl_board_mmc0
--
2.11.0
[toc] | [prev] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2017-05-31 00:10 +0200 |
| Subject | [PATCH 04/58] ARM: dts: at91: mpa1600: use TCB0 as clocksource |
| Message-ID | <tMXuX-4AS-41@gated-at.bofh.it> |
| In reply to | #1653654 |
Use tcb0 as the clocksource like previously selected in at91_dt_defconfig.
Cc: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/boot/dts/mpa1600.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm/boot/dts/mpa1600.dts b/arch/arm/boot/dts/mpa1600.dts
index 116ce78bea4f..383bc604ec2a 100644
--- a/arch/arm/boot/dts/mpa1600.dts
+++ b/arch/arm/boot/dts/mpa1600.dts
@@ -32,6 +32,18 @@
status = "okay";
};
+ tcb0: timer@fffa0000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>, <1>;
+ };
+
+ timer@2 {
+ compatible = "atmel,tcb-timer";
+ reg = <2>;
+ };
+ };
+
macb0: ethernet@fffbc000 {
phy-mode = "rmii";
status = "okay";
--
2.11.0
[toc] | [prev] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2017-05-31 00:10 +0200 |
| Subject | [PATCH 28/58] ARM: dts: at91: acme/g25: use TCB0 as clocksource |
| Message-ID | <tMXuX-4AS-47@gated-at.bofh.it> |
| In reply to | #1653654 |
Use tcb0 as the clocksource like previously selected in at91_dt_defconfig.
Cc: Sergio Tanzilli <tanzilli@acmesystems.it>
Cc: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/boot/dts/at91-ariag25.dts | 12 ++++++++++++
arch/arm/boot/dts/at91-ariettag25.dts | 12 ++++++++++++
2 files changed, 24 insertions(+)
diff --git a/arch/arm/boot/dts/at91-ariag25.dts b/arch/arm/boot/dts/at91-ariag25.dts
index 4da011a7a698..42bce451dba1 100644
--- a/arch/arm/boot/dts/at91-ariag25.dts
+++ b/arch/arm/boot/dts/at91-ariag25.dts
@@ -58,6 +58,18 @@
};
};
+ tcb0: timer@f8008000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>;
+ };
+
+ timer@1 {
+ compatible = "atmel,tcb-timer";
+ reg = <1>;
+ };
+ };
+
i2c0: i2c@f8010000 {
status = "okay";
};
diff --git a/arch/arm/boot/dts/at91-ariettag25.dts b/arch/arm/boot/dts/at91-ariettag25.dts
index c514502081d2..898e8fadc577 100644
--- a/arch/arm/boot/dts/at91-ariettag25.dts
+++ b/arch/arm/boot/dts/at91-ariettag25.dts
@@ -45,6 +45,18 @@
};
};
+ tcb0: timer@f8008000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>;
+ };
+
+ timer@1 {
+ compatible = "atmel,tcb-timer";
+ reg = <1>;
+ };
+ };
+
usb2: gadget@f803c000 {
status = "okay";
};
--
2.11.0
[toc] | [prev] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2017-05-31 00:10 +0200 |
| Subject | [PATCH 26/58] ARM: dts: at91: at91sam9x5: TC blocks are also simple-mfd and syscon devices |
| Message-ID | <tMXuX-4AS-49@gated-at.bofh.it> |
| In reply to | #1653654 |
Add simple-mfd and syscon to the TC blocks to allow to register one of the
channels as clocksource properly at boot time. It also allows to use regmap
instead of tclib.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/boot/dts/at91sam9x5.dtsi | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
index f66bae925705..b27c716e9091 100644
--- a/arch/arm/boot/dts/at91sam9x5.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5.dtsi
@@ -417,7 +417,9 @@
};
tcb0: timer@f8008000 {
- compatible = "atmel,at91sam9x5-tcb";
+ compatible = "atmel,at91sam9x5-tcb", "simple-mfd", "syscon";
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <0xf8008000 0x100>;
interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&tcb0_clk>, <&clk32k>;
@@ -425,7 +427,9 @@
};
tcb1: timer@f800c000 {
- compatible = "atmel,at91sam9x5-tcb";
+ compatible = "atmel,at91sam9x5-tcb", "simple-mfd", "syscon";
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <0xf800c000 0x100>;
interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&tcb0_clk>, <&clk32k>;
--
2.11.0
[toc] | [prev] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2017-05-31 00:10 +0200 |
| Subject | [PATCH 33/58] ARM: dts: at91: sama5d3 Xplained: use TCB0 as clocksource |
| Message-ID | <tMXuX-4AS-43@gated-at.bofh.it> |
| In reply to | #1653654 |
Use tcb0 as the clocksource like previously selected in sama5_defconfig.
Tested-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/boot/dts/at91-sama5d3_xplained.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm/boot/dts/at91-sama5d3_xplained.dts b/arch/arm/boot/dts/at91-sama5d3_xplained.dts
index 5a53fcf542ab..33bec1e9f22e 100644
--- a/arch/arm/boot/dts/at91-sama5d3_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d3_xplained.dts
@@ -65,6 +65,18 @@
status = "okay";
};
+ tcb0: timer@f0010000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>;
+ };
+
+ timer@1 {
+ compatible = "atmel,tcb-timer";
+ reg = <1>;
+ };
+ };
+
i2c0: i2c@f0014000 {
pinctrl-0 = <&pinctrl_i2c0_pu>;
status = "okay";
--
2.11.0
[toc] | [prev] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2017-05-31 00:10 +0200 |
| Subject | [PATCH 27/58] ARM: dts: at91: at91sam9x5cm: use TCB0 as clocksource |
| Message-ID | <tMXuX-4AS-57@gated-at.bofh.it> |
| In reply to | #1653654 |
Use tcb0 as the clocksource like previously selected in at91_dt_defconfig.
[tested on at91sam9x25ek and at91sam9x35ek]
Tested-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
arch/arm/boot/dts/at91sam9x5cm.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm/boot/dts/at91sam9x5cm.dtsi b/arch/arm/boot/dts/at91sam9x5cm.dtsi
index b098ad8cd93a..9110bcafb322 100644
--- a/arch/arm/boot/dts/at91sam9x5cm.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5cm.dtsi
@@ -24,6 +24,18 @@
ahb {
apb {
+ tcb0: timer@f8008000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>;
+ };
+
+ timer@1 {
+ compatible = "atmel,tcb-timer";
+ reg = <1>;
+ };
+ };
+
pinctrl@fffff400 {
1wire_cm {
pinctrl_1wire_cm: 1wire_cm-0 {
--
2.11.0
[toc] | [prev] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2017-05-31 09:30 +0200 |
| Message-ID | <tN6eT-1Kf-53@gated-at.bofh.it> |
| In reply to | #1653654 |
Hi, On 31/05/2017 at 08:34:00 +0200, Peter Rosin wrote: > On 2017-05-30 23:50, Alexandre Belloni wrote: > > Hi, > > > > This series reworks the Atmel Timer counter Block drivers. Those blocks > > each have 3 counters with 2 channels each and can be used for > > multiple functions: > > - timers > > - PWMs > > - Quadrature decoders > > - Stepper motor counters > > I'd like to test this, but I have a hard time doing that since all I got > was this cover letter and a single DT-only patch. > > I understand that you were reluctant to spam too many people with > dozens of patches, but perhaps the series can be fetched from > somewhere? > Sure, I've pushed the branch here: https://github.com/alexandrebelloni/linux/tree/at91-tcb-v3 -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web