2017-12-19 21:32:44

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 00/45] Migrate TCB bindings

Hi,

As the bindings were acked by Rob a while ago [1] and I think there is
consensus on what they look like, I'm planning to apply that series for
4.16 so we get a smoother transition for the TCB driver rework.

I've simply removed the PWM binding change that I will submit with the
driver change itself.
There is also a small fix in the at91sam9261ek patch.

[1] https://patchwork.kernel.org/patch/9755341/

Cc: Antoine Aubert <[email protected]>
Cc: [email protected]
Cc: Douglas Gilbert <[email protected]>
Cc: Fabio Porcedda <[email protected]>
Cc: Gregory CLEMENT <[email protected]>
Cc: Joachim Eastwood <[email protected]>
Cc: Marek Vasut <[email protected]>
Cc: Martin Reimann <[email protected]>
Cc: Peter Rosin <[email protected]>
Cc: Raashid Muhammed <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Rodolfo Giometti <[email protected]>
Cc: Sergio Tanzilli <[email protected]>
Cc: Tim Schendekehl <[email protected]>

Alexandre Belloni (45):
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 for timers
ARM: dts: at91: mpa1600: use TCB0 as timers
ARM: dts: at91: at91sam9260: TC blocks are also simple-mfd and syscon
devices
ARM: dts: at91: at91sam9260ek: use TCB0 as timers
ARM: dts: at91: sam9_l9260: use TCB0 as timers
ARM: dts: at91: ethernut5: use TCB0 as timers
ARM: dts: at91: foxg20: use TCB0 as timers
ARM: dts: at91: animeo_ip: use TCB0 as timers
ARM: dts: at91: kizbox: use TCB0 as timers
ARM: dts: at91: at91sam9g20ek: use TCB0 as timers
ARM: dts: at91: ge863-pro3: use TCB0 as timers
ARM: dts: at91: at91sam9261: TC blocks are also simple-mfd and syscon
devices
ARM: dts: at91: at91sam9261ek: use TCB0 as timers
ARM: dts: at91: at91sam9263: TC blocks are also simple-mfd and syscon
devices
ARM: dts: at91: at91sam9263ek: use TCB0 as timers
ARM: dts: at91: calao: use TCB0 as timers
ARM: dts: at91: at91sam9g45: TC blocks are also simple-mfd and syscon
devices
ARM: dts: at91: at91sam9m10g45ek: use TCB0 as timers
ARM: dts: at91: pm9g45: use TCB0 as timers
ARM: dts: at91: at91sam9rl: TC blocks are also simple-mfd and syscon
devices
ARM: dts: at91: at91sam9rlek: use TCB0 as timers
ARM: dts: at91: at91sam9n12: TC blocks are also simple-mfd and syscon
devices
ARM: dts: at91: at91sam9n12ek: use TCB0 as timers
ARM: dts: at91: at91sam9x5: TC blocks are also simple-mfd and syscon
devices
ARM: dts: at91: at91sam9x5cm: use TCB0 as timers
ARM: dts: at91: acme/g25: use TCB0 as timers
ARM: dts: at91: cosino: use TCB0 as timers
ARM: dts: at91: kizboxmini: use TCB0 as timers
ARM: dts: at91: sama5d3: TC blocks are also simple-mfd and syscon
devices
ARM: dts: at91: sama5d3xek: use TCB0 as timers
ARM: dts: at91: sama5d3 Xplained: use TCB0 as timers
ARM: dts: at91: kizbox2: use TCB0 as timers
ARM: dts: at91: sama5d3xek_cmp: use TCB0 as timers
ARM: dts: at91: linea/tse850-3: use TCB0 as timers
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 timers
ARM: dts: at91: sama5d4 Xplained: use TCB2 as timers
ARM: dts: at91: ma5d4: use TCB2 as timers
ARM: dts: at91: vinco: use TCB2 as timers
ARM: dts: at91: sama5d2: TC blocks are also simple-mfd and syscon
devices
ARM: dts: at91: sama5d2 Xplained: use TCB0 as timers
ARM: dts: at91: sama5d27_som1_ek: use TCB0 as timers

.../devicetree/bindings/arm/atmel-at91.txt | 32 -------------
.../devicetree/bindings/mfd/atmel-tcb.txt | 56 ++++++++++++++++++++++
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 | 12 +++++
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-sama5d27_som1_ek.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 | 20 ++++++++
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 +++++
51 files changed, 575 insertions(+), 51 deletions(-)
create mode 100644 Documentation/devicetree/bindings/mfd/atmel-tcb.txt

--
2.15.1


2017-12-19 21:32:48

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 01/45] ARM: at91: Document new TCB bindings

The current binding for the TCB is not flexible enough for some use cases
and prevents proper utilization of all the channels.

Acked-by: Rob Herring <[email protected]>
Cc: [email protected]
Signed-off-by: Alexandre Belloni <[email protected]>
---
.../devicetree/bindings/arm/atmel-at91.txt | 32 -------------
.../devicetree/bindings/mfd/atmel-tcb.txt | 56 ++++++++++++++++++++++
2 files changed, 56 insertions(+), 32 deletions(-)
create mode 100644 Documentation/devicetree/bindings/mfd/atmel-tcb.txt

diff --git a/Documentation/devicetree/bindings/arm/atmel-at91.txt b/Documentation/devicetree/bindings/arm/atmel-at91.txt
index 91cb8e4f2a4f..31220b54d85d 100644
--- a/Documentation/devicetree/bindings/arm/atmel-at91.txt
+++ b/Documentation/devicetree/bindings/arm/atmel-at91.txt
@@ -90,38 +90,6 @@ System Timer (ST) required properties:
Its subnodes can be:
- watchdog: compatible should be "atmel,at91rm9200-wdt"

-TC/TCLIB Timer required properties:
-- compatible: Should be "atmel,<chip>-tcb".
- <chip> can be "at91rm9200" or "at91sam9x5"
-- reg: Should contain registers location and length
-- interrupts: Should contain all interrupts for the TC block
- Note that you can specify several interrupt cells if the TC
- block has one interrupt per channel.
-- clock-names: tuple listing input clock names.
- Required elements: "t0_clk", "slow_clk"
- Optional elements: "t1_clk", "t2_clk"
-- clocks: phandles to input clocks.
-
-Examples:
-
-One interrupt per TC block:
- tcb0: timer@fff7c000 {
- compatible = "atmel,at91rm9200-tcb";
- reg = <0xfff7c000 0x100>;
- interrupts = <18 4>;
- clocks = <&tcb0_clk>;
- clock-names = "t0_clk";
- };
-
-One interrupt per TC channel in a TC block:
- tcb1: timer@fffdc000 {
- compatible = "atmel,at91rm9200-tcb";
- reg = <0xfffdc000 0x100>;
- interrupts = <26 4 27 4 28 4>;
- clocks = <&tcb1_clk>;
- clock-names = "t0_clk";
- };
-
RSTC Reset Controller required properties:
- compatible: Should be "atmel,<chip>-rstc".
<chip> can be "at91sam9260" or "at91sam9g45" or "sama5d3"
diff --git a/Documentation/devicetree/bindings/mfd/atmel-tcb.txt b/Documentation/devicetree/bindings/mfd/atmel-tcb.txt
new file mode 100644
index 000000000000..c4a83e364cb6
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/atmel-tcb.txt
@@ -0,0 +1,56 @@
+* Device tree bindings for Atmel Timer Counter Blocks
+- compatible: Should be "atmel,<chip>-tcb", "simple-mfd", "syscon".
+ <chip> can be "at91rm9200" or "at91sam9x5"
+- reg: Should contain registers location and length
+- #address-cells: has to be 1
+- #size-cells: has to be 0
+- interrupts: Should contain all interrupts for the TC block
+ Note that you can specify several interrupt cells if the TC
+ block has one interrupt per channel.
+- clock-names: tuple listing input clock names.
+ Required elements: "t0_clk", "slow_clk"
+ Optional elements: "t1_clk", "t2_clk"
+- clocks: phandles to input clocks.
+
+The TCB can expose multiple subdevices:
+ * a timer
+ - compatible: Should be "atmel,tcb-timer"
+ - reg: Should contain the TCB channels to be used. If the
+ counter width is 16 bits (at91rm9200-tcb), two consecutive
+ channels are needed. Else, only one channel will be used.
+
+Examples:
+
+One interrupt per TC block:
+ tcb0: timer@fff7c000 {
+ compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0xfff7c000 0x100>;
+ interrupts = <18 4>;
+ clocks = <&tcb0_clk>, <&clk32k>;
+ clock-names = "t0_clk", "slow_clk";
+
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>, <1>;
+ };
+
+ timer@2 {
+ compatible = "atmel,tcb-timer";
+ reg = <2>;
+ };
+ };
+
+One interrupt per TC channel in a TC block:
+ tcb1: timer@fffdc000 {
+ compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0xfffdc000 0x100>;
+ interrupts = <26 4>, <27 4>, <28 4>;
+ clocks = <&tcb1_clk>, <&clk32k>;
+ clock-names = "t0_clk", "slow_clk";
+ };
+
+
--
2.15.1

2017-12-19 21:32:50

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 02/45] ARM: dts: at91: at91rm9200: TC blocks are also simple-mfd and syscon devices

Add simple-mfd and syscon to the TC blocks to allow to register one of the
channels as clocksource properly at boot time and free up the remaining
channels for other use.

Signed-off-by: Alexandre Belloni <[email protected]>
---
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 da622bf45b4a..ba61893a02a0 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.15.1

2017-12-19 21:32:55

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 03/45] ARM: dts: at91: at91rm9200ek: use TCB0 for timers

Use tcb0 for timers like selected in at91_dt_defconfig.

Tested-by: Alexandre Belloni <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
---
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 33192d0cefee..81aaf8151c76 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.15.1

2017-12-19 21:33:01

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 08/45] ARM: dts: at91: ethernut5: use TCB0 as timers

Use tcb0 for timers as selected in at91_dt_defconfig.

Cc: Martin Reimann <[email protected]>
Cc: Tim Schendekehl <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/ethernut5.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/ethernut5.dts b/arch/arm/boot/dts/ethernut5.dts
index 123b203be06c..b554f85add41 100644
--- a/arch/arm/boot/dts/ethernut5.dts
+++ b/arch/arm/boot/dts/ethernut5.dts
@@ -36,6 +36,18 @@
status = "okay";
};

+ tcb0: timer@fffa0000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>, <1>;
+ };
+
+ timer@2 {
+ compatible = "atmel,tcb-timer";
+ reg = <2>;
+ };
+ };
+
usart0: serial@fffb0000 {
status = "okay";
};
--
2.15.1

2017-12-19 21:33:05

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 09/45] ARM: dts: at91: foxg20: use TCB0 as timers

Use tcb0 for timers as selected in at91_dt_defconfig.

Cc: Sergio Tanzilli <[email protected]>
Cc: Douglas Gilbert <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
---
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.15.1

2017-12-19 21:33:13

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 45/45] ARM: dts: at91: sama5d27_som1_ek: use TCB0 as timers

Use tcb0 for timers as selected in sama5_defconfig.

Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/at91-sama5d27_som1_ek.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts b/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts
index 6d87b4eb6c41..e86e0c00eb6b 100644
--- a/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts
+++ b/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts
@@ -119,6 +119,18 @@
status = "okay";
};

+ tcb0: timer@f800c000 {
+ timer0: timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>;
+ };
+
+ timer1: timer@1 {
+ compatible = "atmel,tcb-timer";
+ reg = <1>;
+ };
+ };
+
uart1: serial@f8020000 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1_default>;
--
2.15.1

2017-12-19 21:33:15

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 44/45] ARM: dts: at91: sama5d2 Xplained: use TCB0 as timers

Use tcb0 for timers as selected in sama5_defconfig.

Tested-by: Alexandre Belloni <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/at91-sama5d2_xplained.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/at91-sama5d2_xplained.dts b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
index 56de21de2779..e4bbb7e0f793 100644
--- a/arch/arm/boot/dts/at91-sama5d2_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
@@ -133,6 +133,18 @@
};
};

+ tcb0: timer@f800c000 {
+ timer0: timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>;
+ };
+
+ timer1: timer@1 {
+ compatible = "atmel,tcb-timer";
+ reg = <1>;
+ };
+ };
+
pdmic@f8018000 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pdmic_default>;
--
2.15.1

2017-12-19 21:33:11

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 30/45] ARM: dts: at91: kizboxmini: use TCB0 as timers

Use tcb0 for timers as selected in at91_dt_defconfig.

Cc: Antoine Aubert <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/at91-kizboxmini.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/at91-kizboxmini.dts b/arch/arm/boot/dts/at91-kizboxmini.dts
index fe1bc0a59a98..15b0746e44e2 100644
--- a/arch/arm/boot/dts/at91-kizboxmini.dts
+++ b/arch/arm/boot/dts/at91-kizboxmini.dts
@@ -34,6 +34,18 @@

ahb {
apb {
+ tcb0: timer@f8008000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>;
+ };
+
+ timer@1 {
+ compatible = "atmel,tcb-timer";
+ reg = <1>;
+ };
+ };
+
usart0: serial@f801c000 {
status = "okay";
};
--
2.15.1

2017-12-19 21:33:09

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 20/45] ARM: dts: at91: at91sam9m10g45ek: use TCB0 as timers

Use tcb0 for timers as selected in at91_dt_defconfig.

Tested-by: Alexandre Belloni <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/at91sam9m10g45ek.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts
index e922552a04cb..211df5917a7d 100644
--- a/arch/arm/boot/dts/at91sam9m10g45ek.dts
+++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts
@@ -39,6 +39,18 @@
status = "okay";
};

+ tcb0: timer@fff7c000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>, <1>;
+ };
+
+ timer@2 {
+ compatible = "atmel,tcb-timer";
+ reg = <2>;
+ };
+ };
+
usart1: serial@fff90000 {
pinctrl-0 =
<&pinctrl_usart1
--
2.15.1

2017-12-19 21:32:59

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 04/45] ARM: dts: at91: mpa1600: use TCB0 as timers

Use tcb0 for timers as selected in at91_dt_defconfig.

Cc: Joachim Eastwood <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
---
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 36cfa215620d..43aaa67fcd87 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.15.1

2017-12-19 21:34:44

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 43/45] ARM: dts: at91: sama5d2: TC blocks are also simple-mfd and syscon devices

Add simple-mfd and syscon to the TC blocks to allow to register one of the
channels as clocksource properly at boot time and free up the remaining
channels for other use.

Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/sama5d2.dtsi | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/sama5d2.dtsi b/arch/arm/boot/dts/sama5d2.dtsi
index b44e63995583..978e2acab22d 100644
--- a/arch/arm/boot/dts/sama5d2.dtsi
+++ b/arch/arm/boot/dts/sama5d2.dtsi
@@ -1094,7 +1094,9 @@
};

tcb0: timer@f800c000 {
- compatible = "atmel,at91sam9x5-tcb";
+ compatible = "atmel,at91sam9x5-tcb", "simple-mfd", "syscon";
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <0xf800c000 0x100>;
interrupts = <35 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&tcb0_clk>, <&clk32k>;
@@ -1102,7 +1104,9 @@
};

tcb1: timer@f8010000 {
- compatible = "atmel,at91sam9x5-tcb";
+ compatible = "atmel,at91sam9x5-tcb", "simple-mfd", "syscon";
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <0xf8010000 0x100>;
interrupts = <36 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&tcb1_clk>, <&clk32k>;
--
2.15.1

2017-12-19 21:34:46

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 42/45] ARM: dts: at91: vinco: use TCB2 as timers

As TCB2 doesn't have any output pins, use it for timers

Cc: Gregory CLEMENT <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/at91-vinco.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/at91-vinco.dts b/arch/arm/boot/dts/at91-vinco.dts
index 9f6005708ea8..1be9889a2b3a 100644
--- a/arch/arm/boot/dts/at91-vinco.dts
+++ b/arch/arm/boot/dts/at91-vinco.dts
@@ -151,6 +151,18 @@
status = "okay";
};

+ tcb2: timer@fc024000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>;
+ };
+
+ timer@1 {
+ compatible = "atmel,tcb-timer";
+ reg = <1>;
+ };
+ };
+
macb1: ethernet@fc028000 {
phy-mode = "rmii";
status = "okay";
--
2.15.1

2017-12-19 21:34:51

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 41/45] ARM: dts: at91: ma5d4: use TCB2 as timers

As TCB2 doesn't have any output pins, use it for timers

Cc: Marek Vasut <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi b/arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi
index b813fdfa2842..d3e79fbf1944 100644
--- a/arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi
+++ b/arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi
@@ -89,6 +89,18 @@
};
};

+ tcb2: timer@fc024000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>;
+ };
+
+ timer@1 {
+ compatible = "atmel,tcb-timer";
+ reg = <1>;
+ };
+ };
+
adc0: adc@fc034000 {
pinctrl-names = "default";
pinctrl-0 = <
--
2.15.1

2017-12-19 21:35:41

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 40/45] ARM: dts: at91: sama5d4 Xplained: use TCB2 as timers

As TCB2 doesn't have any output pins, use for timers.

Tested-by: Alexandre Belloni <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/at91-sama5d4_xplained.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/at91-sama5d4_xplained.dts b/arch/arm/boot/dts/at91-sama5d4_xplained.dts
index 29ab17a97f9a..4b7c762d5f22 100644
--- a/arch/arm/boot/dts/at91-sama5d4_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d4_xplained.dts
@@ -130,6 +130,18 @@
status = "okay";
};

+ tcb2: timer@fc024000 {
+ timer0: timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>;
+ };
+
+ timer1: timer@1 {
+ compatible = "atmel,tcb-timer";
+ reg = <1>;
+ };
+ };
+
adc0: adc@fc034000 {
pinctrl-names = "default";
pinctrl-0 = <
--
2.15.1

2017-12-19 21:36:19

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 39/45] ARM: dts: at91: sama5d4ek: use TCB2 as timers

As TCB2 doesn't have any output pins, use it for timers.

Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/at91-sama5d4ek.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/at91-sama5d4ek.dts b/arch/arm/boot/dts/at91-sama5d4ek.dts
index 5b7ee92e32a7..7887a7160a54 100644
--- a/arch/arm/boot/dts/at91-sama5d4ek.dts
+++ b/arch/arm/boot/dts/at91-sama5d4ek.dts
@@ -174,6 +174,18 @@
status = "okay";
};

+ tcb2: timer@fc024000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>;
+ };
+
+ timer@1 {
+ compatible = "atmel,tcb-timer";
+ reg = <1>;
+ };
+ };
+
watchdog@fc068640 {
status = "okay";
};
--
2.15.1

2017-12-19 21:36:26

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 37/45] ARM: dts: at91: sama5d4: TC blocks are also simple-mfd and syscon devices

Add simple-mfd and syscon to the TC blocks to allow to register one of the
channels as clocksource properly at boot time and free up the remaining
channels for other use.

Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/sama5d4.dtsi | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/sama5d4.dtsi b/arch/arm/boot/dts/sama5d4.dtsi
index b069644ed238..652c047753f0 100644
--- a/arch/arm/boot/dts/sama5d4.dtsi
+++ b/arch/arm/boot/dts/sama5d4.dtsi
@@ -960,7 +960,9 @@
};

tcb0: timer@f801c000 {
- compatible = "atmel,at91sam9x5-tcb";
+ compatible = "atmel,at91sam9x5-tcb", "simple-mfd", "syscon";
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <0xf801c000 0x100>;
interrupts = <40 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&tcb0_clk>, <&clk32k>;
@@ -1188,7 +1190,9 @@
};

tcb1: timer@fc020000 {
- compatible = "atmel,at91sam9x5-tcb";
+ compatible = "atmel,at91sam9x5-tcb", "simple-mfd", "syscon";
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <0xfc020000 0x100>;
interrupts = <41 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&tcb1_clk>, <&clk32k>;
--
2.15.1

2017-12-19 21:36:29

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 36/45] ARM: dts: at91: linea/tse850-3: use TCB0 as timers

Use tcb0 for timers as selected in sama5_defconfig.

Tested-by: Peter Rosin <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/at91-linea.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/at91-linea.dtsi b/arch/arm/boot/dts/at91-linea.dtsi
index 87e5090fb4c4..c7b964e25321 100644
--- a/arch/arm/boot/dts/at91-linea.dtsi
+++ b/arch/arm/boot/dts/at91-linea.dtsi
@@ -27,6 +27,18 @@
clock-frequency = <12000000>;
};

+&tcb0 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>;
+ };
+
+ timer@1 {
+ compatible = "atmel,tcb-timer";
+ reg = <1>;
+ };
+};
+
&i2c0 {
status = "okay";

--
2.15.1

2017-12-19 21:36:23

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 38/45] ARM: dts: at91: sama5d4: Add TCB2

The third TC block is missing from the dtsi. It has no output pins but can
still be used for timers as the IRQ is wired.

Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/sama5d4.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/sama5d4.dtsi b/arch/arm/boot/dts/sama5d4.dtsi
index 652c047753f0..373b3621b536 100644
--- a/arch/arm/boot/dts/sama5d4.dtsi
+++ b/arch/arm/boot/dts/sama5d4.dtsi
@@ -1199,6 +1199,16 @@
clock-names = "t0_clk", "slow_clk";
};

+ tcb2: timer@fc024000 {
+ compatible = "atmel,at91sam9x5-tcb", "simple-mfd", "syscon";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0xfc024000 0x100>;
+ interrupts = <42 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&tcb2_clk>, <&clk32k>;
+ clock-names = "t0_clk", "slow_clk";
+ };
+
macb1: ethernet@fc028000 {
compatible = "atmel,sama5d4-gem";
reg = <0xfc028000 0x100>;
--
2.15.1

2017-12-19 21:37:43

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 35/45] ARM: dts: at91: sama5d3xek_cmp: use TCB0 as timers

Use tcb0 for timers as selected in sama5_defconfig.

Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/sama5d3xcm_cmp.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/sama5d3xcm_cmp.dtsi b/arch/arm/boot/dts/sama5d3xcm_cmp.dtsi
index 75cbf4d4ab1a..a02f59021364 100644
--- a/arch/arm/boot/dts/sama5d3xcm_cmp.dtsi
+++ b/arch/arm/boot/dts/sama5d3xcm_cmp.dtsi
@@ -69,6 +69,18 @@
cs-gpios = <&pioD 13 0>, <0>, <0>, <0>;
};

+ tcb0: timer@f0010000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>;
+ };
+
+ timer@1 {
+ compatible = "atmel,tcb-timer";
+ reg = <1>;
+ };
+ };
+
macb0: ethernet@f0028000 {
phy-mode = "rgmii";
#address-cells = <1>;
--
2.15.1

2017-12-19 21:37:49

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 32/45] ARM: dts: at91: sama5d3xek: use TCB0 as timers

Use tcb0 for timers as selected in sama5_defconfig.

Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/sama5d3xcm.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/sama5d3xcm.dtsi b/arch/arm/boot/dts/sama5d3xcm.dtsi
index 9506daf5efb6..3311a882458b 100644
--- a/arch/arm/boot/dts/sama5d3xcm.dtsi
+++ b/arch/arm/boot/dts/sama5d3xcm.dtsi
@@ -34,6 +34,18 @@
spi0: spi@f0004000 {
cs-gpios = <&pioD 13 0>, <0>, <0>, <0>;
};
+
+ tcb0: timer@f0010000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>;
+ };
+
+ timer@1 {
+ compatible = "atmel,tcb-timer";
+ reg = <1>;
+ };
+ };
};

ebi@10000000 {
--
2.15.1

2017-12-19 21:37:52

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 33/45] ARM: dts: at91: sama5d3 Xplained: use TCB0 as timers

Use tcb0 for timers as selected in sama5_defconfig.

Tested-by: Alexandre Belloni <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
---
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 40879aded680..02c1d2958d78 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 {
+ timer0: timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>;
+ };
+
+ timer1: timer@1 {
+ compatible = "atmel,tcb-timer";
+ reg = <1>;
+ };
+ };
+
i2c0: i2c@f0014000 {
pinctrl-0 = <&pinctrl_i2c0_pu>;
status = "okay";
--
2.15.1

2017-12-19 21:37:46

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 34/45] ARM: dts: at91: kizbox2: use TCB0 as timers

Use tcb0 for timers as selected in sama5_defconfig.

Cc: Antoine Aubert <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/at91-kizbox2.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/at91-kizbox2.dts b/arch/arm/boot/dts/at91-kizbox2.dts
index ec6c28c521a5..30041e8f12d5 100644
--- a/arch/arm/boot/dts/at91-kizbox2.dts
+++ b/arch/arm/boot/dts/at91-kizbox2.dts
@@ -94,6 +94,18 @@
};
};

+ tcb0: timer@f0010000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>;
+ };
+
+ timer@1 {
+ compatible = "atmel,tcb-timer";
+ reg = <1>;
+ };
+ };
+
usart0: serial@f001c000 {
status = "okay";
};
--
2.15.1

2017-12-19 21:38:52

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 29/45] ARM: dts: at91: cosino: use TCB0 as timers

Use tcb0 for timers as selected in at91_dt_defconfig.

Cc: Rodolfo Giometti <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
---
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 89cde175154e..295a5a43fe01 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.15.1

2017-12-19 21:38:57

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 28/45] ARM: dts: at91: acme/g25: use TCB0 as timers

Use tcb0 for timers as selected in at91_dt_defconfig.

Cc: Sergio Tanzilli <[email protected]>
Cc: Douglas Gilbert <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
---
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 1c86537a42a0..e3e14b7e25aa 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 f877f3430bcc..7a34c4dc05d2 100644
--- a/arch/arm/boot/dts/at91-ariettag25.dts
+++ b/arch/arm/boot/dts/at91-ariettag25.dts
@@ -46,6 +46,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.15.1

2017-12-19 21:39:00

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 27/45] ARM: dts: at91: at91sam9x5cm: use TCB0 as timers

Use tcb0 for timers as selected in at91_dt_defconfig.

[tested on at91sam9x25ek and at91sam9x35ek]
Tested-by: Alexandre Belloni <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
---
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 bdeaa0b64a5b..4908ee07e628 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.15.1

2017-12-19 21:39:02

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 26/45] ARM: dts: at91: at91sam9x5: TC blocks are also simple-mfd and syscon devices

Add simple-mfd and syscon to the TC blocks to allow to register one of the
channels as clocksource properly at boot time and free up the remaining
channels for other use.

Signed-off-by: Alexandre Belloni <[email protected]>
---
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 ad779a7dfefd..fee4fe51a97e 100644
--- a/arch/arm/boot/dts/at91sam9x5.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5.dtsi
@@ -433,7 +433,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>;
@@ -441,7 +443,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.15.1

2017-12-19 21:39:20

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 21/45] ARM: dts: at91: pm9g45: use TCB0 as timers

Use tcb0 for timers as selected in at91_dt_defconfig.

Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/pm9g45.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/pm9g45.dts b/arch/arm/boot/dts/pm9g45.dts
index be5177221cbb..927d00cab014 100644
--- a/arch/arm/boot/dts/pm9g45.dts
+++ b/arch/arm/boot/dts/pm9g45.dts
@@ -52,6 +52,18 @@
};
};

+ tcb0: timer@fff7c000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>, <1>;
+ };
+
+ timer@2 {
+ compatible = "atmel,tcb-timer";
+ reg = <2>;
+ };
+ };
+
mmc0: mmc@fff80000 {
pinctrl-0 = <
&pinctrl_board_mmc
--
2.15.1

2017-12-19 21:39:17

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 23/45] ARM: dts: at91: at91sam9rlek: use TCB0 as timers

Use tcb0 for timers as selected in at91_dt_defconfig.

Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/at91sam9rlek.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/at91sam9rlek.dts b/arch/arm/boot/dts/at91sam9rlek.dts
index ea6ed98960c9..4bde9f245e61 100644
--- a/arch/arm/boot/dts/at91sam9rlek.dts
+++ b/arch/arm/boot/dts/at91sam9rlek.dts
@@ -124,6 +124,18 @@
};

apb {
+ tcb0: timer@fffa0000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>, <1>;
+ };
+
+ timer@2 {
+ compatible = "atmel,tcb-timer";
+ reg = <2>;
+ };
+ };
+
mmc0: mmc@fffa4000 {
pinctrl-0 = <
&pinctrl_board_mmc0
--
2.15.1

2017-12-19 21:39:14

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 24/45] ARM: dts: at91: at91sam9n12: TC blocks are also simple-mfd and syscon devices

Add simple-mfd and syscon to the TC blocks to allow to register one of the
channels as clocksource properly at boot time and free up the remaining
channels for other use.

Signed-off-by: Alexandre Belloni <[email protected]>
---
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 e0ac824e0785..4b62f4f963f6 100644
--- a/arch/arm/boot/dts/at91sam9n12.dtsi
+++ b/arch/arm/boot/dts/at91sam9n12.dtsi
@@ -446,7 +446,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>;
@@ -454,7 +456,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.15.1

2017-12-19 21:39:08

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 25/45] ARM: dts: at91: at91sam9n12ek: use TCB0 as timers

Use tcb0 for timers as selected in at91_dt_defconfig.

Signed-off-by: Alexandre Belloni <[email protected]>
---
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 212562aedf5e..c43095c5cb5c 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.15.1

2017-12-19 21:38:49

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 31/45] ARM: dts: at91: sama5d3: TC blocks are also simple-mfd and syscon devices

Add simple-mfd and syscon to the TC blocks to allow to register one of the
channels as clocksource properly at boot time and free up the remaining
channels for other use.

Signed-off-by: Alexandre Belloni <[email protected]>
---
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 1889b4dea066..b9c05b57735e 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.15.1

2017-12-19 21:42:45

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 18/45] ARM: dts: at91: calao: use TCB0 as timers

Use tcb0 for timers as selected in at91_dt_defconfig.

[tested on usb_a9g20 and usb_a9263]
Tested-by: Alexandre Belloni <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/at91-qil_a9260.dts | 12 ++++++++++++
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 ++++++++++++
5 files changed, 60 insertions(+)

diff --git a/arch/arm/boot/dts/at91-qil_a9260.dts b/arch/arm/boot/dts/at91-qil_a9260.dts
index f46352790a41..72e9148ca096 100644
--- a/arch/arm/boot/dts/at91-qil_a9260.dts
+++ b/arch/arm/boot/dts/at91-qil_a9260.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>;
+ };
+ };
+
usb1: gadget@fffa4000 {
atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
status = "okay";
diff --git a/arch/arm/boot/dts/tny_a9260_common.dtsi b/arch/arm/boot/dts/tny_a9260_common.dtsi
index 5d83df4675a1..8e3cf5109f98 100644
--- a/arch/arm/boot/dts/tny_a9260_common.dtsi
+++ b/arch/arm/boot/dts/tny_a9260_common.dtsi
@@ -27,6 +27,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";
};
diff --git a/arch/arm/boot/dts/tny_a9263.dts b/arch/arm/boot/dts/tny_a9263.dts
index 8cf0a9e08571..7b403db4cd34 100644
--- a/arch/arm/boot/dts/tny_a9263.dts
+++ b/arch/arm/boot/dts/tny_a9263.dts
@@ -36,6 +36,18 @@
status = "okay";
};

+ tcb0: timer@fff7c000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>, <1>;
+ };
+
+ timer@2 {
+ compatible = "atmel,tcb-timer";
+ reg = <2>;
+ };
+ };
+
usb1: gadget@fff78000 {
atmel,vbus-gpio = <&pioB 11 GPIO_ACTIVE_HIGH>;
status = "okay";
diff --git a/arch/arm/boot/dts/usb_a9260_common.dtsi b/arch/arm/boot/dts/usb_a9260_common.dtsi
index 34a49995eda3..de3fa3ab34d6 100644
--- a/arch/arm/boot/dts/usb_a9260_common.dtsi
+++ b/arch/arm/boot/dts/usb_a9260_common.dtsi
@@ -23,6 +23,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@fffc4000 {
phy-mode = "rmii";
status = "okay";
diff --git a/arch/arm/boot/dts/usb_a9263.dts b/arch/arm/boot/dts/usb_a9263.dts
index 7b1125be99c4..0a753b4c74e7 100644
--- a/arch/arm/boot/dts/usb_a9263.dts
+++ b/arch/arm/boot/dts/usb_a9263.dts
@@ -36,6 +36,18 @@
status = "okay";
};

+ tcb0: timer@fff7c000 {
+ 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.15.1

2017-12-19 21:42:42

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 15/45] ARM: dts: at91: at91sam9261ek: use TCB0 as timers

Use tcb0 for timers as selected in at91_dt_defconfig.

Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/at91sam9261ek.dts | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

diff --git a/arch/arm/boot/dts/at91sam9261ek.dts b/arch/arm/boot/dts/at91sam9261ek.dts
index 960d6940ebf6..35db7f48229a 100644
--- a/arch/arm/boot/dts/at91sam9261ek.dts
+++ b/arch/arm/boot/dts/at91sam9261ek.dts
@@ -15,6 +15,14 @@
chosen {
bootargs = "rootfstype=ubifs ubi.mtd=5 root=ubi0:rootfs rw";
stdout-path = "serial0:115200n8";
+
+ clocksource {
+ timer = <&timer0>;
+ };
+
+ clockevent {
+ timer = <&timer1>;
+ };
};

memory {
@@ -125,6 +133,18 @@
};

apb {
+ tcb0: timer@fffa0000 {
+ timer0: timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>, <1>;
+ };
+
+ timer1: timer@2 {
+ compatible = "atmel,tcb-timer";
+ reg = <2>;
+ };
+ };
+
usb1: gadget@fffa4000 {
atmel,vbus-gpio = <&pioB 29 GPIO_ACTIVE_HIGH>;
status = "okay";
--
2.15.1

2017-12-19 21:42:37

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 22/45] ARM: dts: at91: at91sam9rl: TC blocks are also simple-mfd and syscon devices

Add simple-mfd and syscon to the TC blocks to allow to register one of the
channels as clocksource properly at boot time and free up the remaining
channels for other use.

Signed-off-by: Alexandre Belloni <[email protected]>
---
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 52f0e9ef8f67..3cae687dccbd 100644
--- a/arch/arm/boot/dts/at91sam9rl.dtsi
+++ b/arch/arm/boot/dts/at91sam9rl.dtsi
@@ -124,7 +124,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.15.1

2017-12-19 21:43:35

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 17/45] ARM: dts: at91: at91sam9263ek: use TCB0 as timers

Use tcb0 for timers as selected in at91_dt_defconfig.

Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/at91sam9263ek.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/at91sam9263ek.dts b/arch/arm/boot/dts/at91sam9263ek.dts
index 5a2e1af793f5..5f1f995c1242 100644
--- a/arch/arm/boot/dts/at91sam9263ek.dts
+++ b/arch/arm/boot/dts/at91sam9263ek.dts
@@ -37,6 +37,18 @@
status = "okay";
};

+ tcb0: timer@fff7c000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>, <1>;
+ };
+
+ timer@2 {
+ compatible = "atmel,tcb-timer";
+ reg = <2>;
+ };
+ };
+
usart0: serial@fff8c000 {
pinctrl-0 = <
&pinctrl_usart0
--
2.15.1

2017-12-19 21:43:52

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 16/45] ARM: dts: at91: at91sam9263: TC blocks are also simple-mfd and syscon devices

Add simple-mfd and syscon to the TC blocks to allow to register one of the
channels as clocksource properly at boot time and free up the remaining
channels for other use.

Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/at91sam9263.dtsi | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/at91sam9263.dtsi b/arch/arm/boot/dts/at91sam9263.dtsi
index e54f14d36b6f..9e401fb980b5 100644
--- a/arch/arm/boot/dts/at91sam9263.dtsi
+++ b/arch/arm/boot/dts/at91sam9263.dtsi
@@ -389,7 +389,9 @@
};

tcb0: timer@fff7c000 {
- compatible = "atmel,at91rm9200-tcb";
+ compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon";
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <0xfff7c000 0x100>;
interrupts = <19 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&tcb_clk>, <&slow_xtal>;
--
2.15.1

2017-12-19 21:43:56

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 13/45] ARM: dts: at91: ge863-pro3: use TCB0 as timers

Use tcb0 for timers as selected in at91_dt_defconfig.

Cc: Fabio Porcedda <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
---
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 6a9fdc0760f0..a7adbdc2f0c0 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.15.1

2017-12-19 21:43:49

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 19/45] ARM: dts: at91: at91sam9g45: TC blocks are also simple-mfd and syscon devices

Add simple-mfd and syscon to the TC blocks to allow to register one of the
channels as clocksource properly at boot time and free up the remaining
channels for other use.

Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/at91sam9g45.dtsi | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
index 2b127ca7aaa0..ce204b4a5dee 100644
--- a/arch/arm/boot/dts/at91sam9g45.dtsi
+++ b/arch/arm/boot/dts/at91sam9g45.dtsi
@@ -415,7 +415,9 @@
};

tcb0: timer@fff7c000 {
- compatible = "atmel,at91rm9200-tcb";
+ compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon";
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <0xfff7c000 0x100>;
interrupts = <18 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&tcb0_clk>, <&tcb0_clk>, <&tcb0_clk>, <&clk32k>;
@@ -423,7 +425,9 @@
};

tcb1: timer@fffd4000 {
- compatible = "atmel,at91rm9200-tcb";
+ compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon";
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <0xfffd4000 0x100>;
interrupts = <18 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&tcb0_clk>, <&tcb0_clk>, <&tcb0_clk>, <&clk32k>;
--
2.15.1

2017-12-19 21:44:34

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 11/45] ARM: dts: at91: kizbox: use TCB0 as timers

Use tcb0 for timers as selected in at91_dt_defconfig.

Cc: Antoine Aubert <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
---
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 1f31df846d61..1003846679c1 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.15.1

2017-12-19 21:44:37

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 12/45] ARM: dts: at91: at91sam9g20ek: use TCB0 as timers

Use tcb0 for timers as selected in at91_dt_defconfig.

Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/at91sam9g20ek_common.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
index ac9a1511e239..50561b7b7939 100644
--- a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
+++ b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
@@ -51,6 +51,18 @@
status = "okay";
};

+ tcb0: timer@fffa0000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>, <1>;
+ };
+
+ timer@2 {
+ compatible = "atmel,tcb-timer";
+ reg = <2>;
+ };
+ };
+
usart0: serial@fffb0000 {
pinctrl-0 =
<&pinctrl_usart0
--
2.15.1

2017-12-19 21:44:42

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 10/45] ARM: dts: at91: animeo_ip: use TCB0 as timers

Use tcb0 for timers as selected in at91_dt_defconfig.

Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/animeo_ip.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/animeo_ip.dts b/arch/arm/boot/dts/animeo_ip.dts
index 26ade8c0a960..b67a75179784 100644
--- a/arch/arm/boot/dts/animeo_ip.dts
+++ b/arch/arm/boot/dts/animeo_ip.dts
@@ -43,6 +43,18 @@

ahb {
apb {
+ tcb0: timer@fffa0000 {
+ timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>, <1>;
+ };
+
+ timer@2 {
+ compatible = "atmel,tcb-timer";
+ reg = <2>;
+ };
+ };
+
usart0: serial@fffb0000 {
pinctrl-0 = <&pinctrl_usart0 &pinctrl_usart0_rts>;
linux,rs485-enabled-at-boot-time;
--
2.15.1

2017-12-19 21:44:32

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 14/45] ARM: dts: at91: at91sam9261: TC blocks are also simple-mfd and syscon devices

Add simple-mfd and syscon to the TC blocks to allow to register one of the
channels as clocksource properly at boot time and free up the remaining
channels for other use.

Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/at91sam9261.dtsi | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/at91sam9261.dtsi b/arch/arm/boot/dts/at91sam9261.dtsi
index 66876019101d..ff7387ab6e1c 100644
--- a/arch/arm/boot/dts/at91sam9261.dtsi
+++ b/arch/arm/boot/dts/at91sam9261.dtsi
@@ -125,7 +125,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 = <17 IRQ_TYPE_LEVEL_HIGH 0>,
<18 IRQ_TYPE_LEVEL_HIGH 0>,
--
2.15.1

2017-12-19 21:45:58

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 06/45] ARM: dts: at91: at91sam9260ek: use TCB0 as timers

Use tcb0 for timers as selected in at91_dt_defconfig.

Signed-off-by: Alexandre Belloni <[email protected]>
---
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.15.1

2017-12-19 21:45:54

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 05/45] ARM: dts: at91: at91sam9260: TC blocks are also simple-mfd and syscon devices

Add simple-mfd and syscon to the TC blocks to allow to register one of the
channels as clocksource properly at boot time and free up the remaining
channels for other use.

Signed-off-by: Alexandre Belloni <[email protected]>
---
arch/arm/boot/dts/at91sam9260.dtsi | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/at91sam9260.dtsi b/arch/arm/boot/dts/at91sam9260.dtsi
index bc655e7332d6..655f06cd716a 100644
--- a/arch/arm/boot/dts/at91sam9260.dtsi
+++ b/arch/arm/boot/dts/at91sam9260.dtsi
@@ -386,7 +386,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
@@ -396,7 +398,9 @@
};

tcb1: timer@fffdc000 {
- compatible = "atmel,at91rm9200-tcb";
+ compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon";
+ #address-cells = <1>;
+ #size-cells = <0>;
reg = <0xfffdc000 0x100>;
interrupts = <26 IRQ_TYPE_LEVEL_HIGH 0
27 IRQ_TYPE_LEVEL_HIGH 0
--
2.15.1

2017-12-19 21:45:51

by Alexandre Belloni

[permalink] [raw]
Subject: [PATCH 07/45] ARM: dts: at91: sam9_l9260: use TCB0 as timers

Use tcb0 for timers as selected in at91_dt_defconfig.

Cc: Raashid Muhammed <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
---
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.15.1

2017-12-20 08:13:55

by Gregory CLEMENT

[permalink] [raw]
Subject: Re: [PATCH 42/45] ARM: dts: at91: vinco: use TCB2 as timers

Hi Alexandre,

On mar., déc. 19 2017, Alexandre Belloni <[email protected]> wrote:

> As TCB2 doesn't have any output pins, use it for timers
>
> Cc: Gregory CLEMENT <[email protected]>
> Signed-off-by: Alexandre Belloni <[email protected]>

Acked-by: Gregory CLEMENT <[email protected]>

Thanks,

Gregory
> ---
> arch/arm/boot/dts/at91-vinco.dts | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/arch/arm/boot/dts/at91-vinco.dts b/arch/arm/boot/dts/at91-vinco.dts
> index 9f6005708ea8..1be9889a2b3a 100644
> --- a/arch/arm/boot/dts/at91-vinco.dts
> +++ b/arch/arm/boot/dts/at91-vinco.dts
> @@ -151,6 +151,18 @@
> status = "okay";
> };
>
> + tcb2: timer@fc024000 {
> + timer@0 {
> + compatible = "atmel,tcb-timer";
> + reg = <0>;
> + };
> +
> + timer@1 {
> + compatible = "atmel,tcb-timer";
> + reg = <1>;
> + };
> + };
> +
> macb1: ethernet@fc028000 {
> phy-mode = "rmii";
> status = "okay";
> --
> 2.15.1
>

--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

2017-12-20 08:14:35

by Nicolas Ferre

[permalink] [raw]
Subject: Re: [PATCH 00/45] Migrate TCB bindings

On 19/12/2017 at 22:31, Alexandre Belloni wrote:
> Hi,
>
> As the bindings were acked by Rob a while ago [1] and I think there is
> consensus on what they look like, I'm planning to apply that series for
> 4.16 so we get a smoother transition for the TCB driver rework.
>
> I've simply removed the PWM binding change that I will submit with the
> driver change itself.
> There is also a small fix in the at91sam9261ek patch.
>
> [1] https://patchwork.kernel.org/patch/9755341/
>
> Cc: Antoine Aubert <[email protected]>
> Cc: [email protected]
> Cc: Douglas Gilbert <[email protected]>
> Cc: Fabio Porcedda <[email protected]>
> Cc: Gregory CLEMENT <[email protected]>
> Cc: Joachim Eastwood <[email protected]>
> Cc: Marek Vasut <[email protected]>
> Cc: Martin Reimann <[email protected]>
> Cc: Peter Rosin <[email protected]>
> Cc: Raashid Muhammed <[email protected]>
> Cc: Rob Herring <[email protected]>
> Cc: Rodolfo Giometti <[email protected]>
> Cc: Sergio Tanzilli <[email protected]>
> Cc: Tim Schendekehl <[email protected]>
>
> Alexandre Belloni (45):
> 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 for timers
> ARM: dts: at91: mpa1600: use TCB0 as timers
> ARM: dts: at91: at91sam9260: TC blocks are also simple-mfd and syscon
> devices
> ARM: dts: at91: at91sam9260ek: use TCB0 as timers
> ARM: dts: at91: sam9_l9260: use TCB0 as timers
> ARM: dts: at91: ethernut5: use TCB0 as timers
> ARM: dts: at91: foxg20: use TCB0 as timers
> ARM: dts: at91: animeo_ip: use TCB0 as timers
> ARM: dts: at91: kizbox: use TCB0 as timers
> ARM: dts: at91: at91sam9g20ek: use TCB0 as timers
> ARM: dts: at91: ge863-pro3: use TCB0 as timers
> ARM: dts: at91: at91sam9261: TC blocks are also simple-mfd and syscon
> devices
> ARM: dts: at91: at91sam9261ek: use TCB0 as timers
> ARM: dts: at91: at91sam9263: TC blocks are also simple-mfd and syscon
> devices
> ARM: dts: at91: at91sam9263ek: use TCB0 as timers
> ARM: dts: at91: calao: use TCB0 as timers
> ARM: dts: at91: at91sam9g45: TC blocks are also simple-mfd and syscon
> devices
> ARM: dts: at91: at91sam9m10g45ek: use TCB0 as timers
> ARM: dts: at91: pm9g45: use TCB0 as timers
> ARM: dts: at91: at91sam9rl: TC blocks are also simple-mfd and syscon
> devices
> ARM: dts: at91: at91sam9rlek: use TCB0 as timers
> ARM: dts: at91: at91sam9n12: TC blocks are also simple-mfd and syscon
> devices
> ARM: dts: at91: at91sam9n12ek: use TCB0 as timers
> ARM: dts: at91: at91sam9x5: TC blocks are also simple-mfd and syscon
> devices
> ARM: dts: at91: at91sam9x5cm: use TCB0 as timers
> ARM: dts: at91: acme/g25: use TCB0 as timers
> ARM: dts: at91: cosino: use TCB0 as timers
> ARM: dts: at91: kizboxmini: use TCB0 as timers
> ARM: dts: at91: sama5d3: TC blocks are also simple-mfd and syscon
> devices
> ARM: dts: at91: sama5d3xek: use TCB0 as timers
> ARM: dts: at91: sama5d3 Xplained: use TCB0 as timers
> ARM: dts: at91: kizbox2: use TCB0 as timers
> ARM: dts: at91: sama5d3xek_cmp: use TCB0 as timers
> ARM: dts: at91: linea/tse850-3: use TCB0 as timers
> 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 timers
> ARM: dts: at91: sama5d4 Xplained: use TCB2 as timers
> ARM: dts: at91: ma5d4: use TCB2 as timers
> ARM: dts: at91: vinco: use TCB2 as timers
> ARM: dts: at91: sama5d2: TC blocks are also simple-mfd and syscon
> devices
> ARM: dts: at91: sama5d2 Xplained: use TCB0 as timers
> ARM: dts: at91: sama5d27_som1_ek: use TCB0 as timers

For the whole series:
Acked-by: Nicolas Ferre <[email protected]>

Thanks, best regards,
Nicolas

> .../devicetree/bindings/arm/atmel-at91.txt | 32 -------------
> .../devicetree/bindings/mfd/atmel-tcb.txt | 56 ++++++++++++++++++++++
> 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 | 12 +++++
> 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-sama5d27_som1_ek.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 | 20 ++++++++
> 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 +++++
> 51 files changed, 575 insertions(+), 51 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/mfd/atmel-tcb.txt
>


--
Nicolas Ferre

2017-12-20 09:03:44

by Nicolas Ferre

[permalink] [raw]
Subject: [PATCH] ARM: dts: at91: sama5d2_ptc_ek: use TCB0 as timers

Use tcb0 for timers as selected in sama5_defconfig.

Signed-off-by: Nicolas Ferre <[email protected]>
---
Hi Alex,

Adding the newly added sama5d2_ptc_ek to the series.
Not tested though.

Regards,
Nicolas

arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts b/arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts
index 186cb03e2672..e603a267bdf1 100644
--- a/arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts
+++ b/arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts
@@ -149,6 +149,18 @@
};
};

+ tcb0: timer@f800c000 {
+ timer0: timer@0 {
+ compatible = "atmel,tcb-timer";
+ reg = <0>;
+ };
+
+ timer1: timer@1 {
+ compatible = "atmel,tcb-timer";
+ reg = <1>;
+ };
+ };
+
uart0: serial@f801c000 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart0_default>;
--
2.9.0

2017-12-20 10:00:12

by Alexandre Belloni

[permalink] [raw]
Subject: Re: [PATCH] ARM: dts: at91: sama5d2_ptc_ek: use TCB0 as timers

On 20/12/2017 at 10:04:40 +0100, Nicolas Ferre wrote:
> Use tcb0 for timers as selected in sama5_defconfig.
>
> Signed-off-by: Nicolas Ferre <[email protected]>
> ---
> Hi Alex,
>
> Adding the newly added sama5d2_ptc_ek to the series.
> Not tested though.
>
> Regards,
> Nicolas
>
> arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
Applied, thanks.

--
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com