Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 20/45] ARM: dts: at91: at91sam9m10g45ek: use TCB0 as timers
From: Alexandre Belloni @ 2017-12-19 21:31 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171219213209.13823-1-alexandre.belloni@free-electrons.com>

Use tcb0 for timers as 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/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 at fff7c000 {
+				timer at 0 {
+					compatible = "atmel,tcb-timer";
+					reg = <0>, <1>;
+				};
+
+				timer at 2 {
+					compatible = "atmel,tcb-timer";
+					reg = <2>;
+				};
+			};
+
 			usart1: serial at fff90000 {
 				pinctrl-0 =
 					<&pinctrl_usart1
-- 
2.15.1

^ permalink raw reply related

* [PATCH 19/45] ARM: dts: at91: at91sam9g45: TC blocks are also simple-mfd and syscon devices
From: Alexandre Belloni @ 2017-12-19 21:31 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171219213209.13823-1-alexandre.belloni@free-electrons.com>

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 <alexandre.belloni@free-electrons.com>
---
 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 at 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 at 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

^ permalink raw reply related

* [PATCH 18/45] ARM: dts: at91: calao: use TCB0 as timers
From: Alexandre Belloni @ 2017-12-19 21:31 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171219213209.13823-1-alexandre.belloni@free-electrons.com>

Use tcb0 for timers as selected in at91_dt_defconfig.

[tested on usb_a9g20 and usb_a9263]
Tested-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 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 at fffa0000 {
+				timer at 0 {
+					compatible = "atmel,tcb-timer";
+					reg = <0>, <1>;
+				};
+
+				timer at 2 {
+					compatible = "atmel,tcb-timer";
+					reg = <2>;
+				};
+			};
+
 			usb1: gadget at 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 at fffa0000 {
+				timer at 0 {
+					compatible = "atmel,tcb-timer";
+					reg = <0>, <1>;
+				};
+
+				timer at 2 {
+					compatible = "atmel,tcb-timer";
+					reg = <2>;
+				};
+			};
+
 			dbgu: serial at 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 at fff7c000 {
+				timer at 0 {
+					compatible = "atmel,tcb-timer";
+					reg = <0>, <1>;
+				};
+
+				timer at 2 {
+					compatible = "atmel,tcb-timer";
+					reg = <2>;
+				};
+			};
+
 			usb1: gadget at 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 at fffa0000 {
+				timer at 0 {
+					compatible = "atmel,tcb-timer";
+					reg = <0>, <1>;
+				};
+
+				timer at 2 {
+					compatible = "atmel,tcb-timer";
+					reg = <2>;
+				};
+			};
+
 			macb0: ethernet at 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 at fff7c000 {
+				timer at 0 {
+					compatible = "atmel,tcb-timer";
+					reg = <0>, <1>;
+				};
+
+				timer at 2 {
+					compatible = "atmel,tcb-timer";
+					reg = <2>;
+				};
+			};
+
 			macb0: ethernet at fffbc000 {
 				phy-mode = "rmii";
 				status = "okay";
-- 
2.15.1

^ permalink raw reply related

* [PATCH 17/45] ARM: dts: at91: at91sam9263ek: use TCB0 as timers
From: Alexandre Belloni @ 2017-12-19 21:31 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171219213209.13823-1-alexandre.belloni@free-electrons.com>

Use tcb0 for timers as selected in at91_dt_defconfig.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 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 at fff7c000 {
+				timer at 0 {
+					compatible = "atmel,tcb-timer";
+					reg = <0>, <1>;
+				};
+
+				timer at 2 {
+					compatible = "atmel,tcb-timer";
+					reg = <2>;
+				};
+			};
+
 			usart0: serial at fff8c000 {
 				pinctrl-0 = <
 					&pinctrl_usart0
-- 
2.15.1

^ permalink raw reply related

* [PATCH 16/45] ARM: dts: at91: at91sam9263: TC blocks are also simple-mfd and syscon devices
From: Alexandre Belloni @ 2017-12-19 21:31 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171219213209.13823-1-alexandre.belloni@free-electrons.com>

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 <alexandre.belloni@free-electrons.com>
---
 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 at 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

^ permalink raw reply related

* [PATCH 15/45] ARM: dts: at91: at91sam9261ek: use TCB0 as timers
From: Alexandre Belloni @ 2017-12-19 21:31 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171219213209.13823-1-alexandre.belloni@free-electrons.com>

Use tcb0 for timers as selected in at91_dt_defconfig.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 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 at fffa0000 {
+				timer0: timer at 0 {
+					compatible = "atmel,tcb-timer";
+					reg = <0>, <1>;
+				};
+
+				timer1: timer at 2 {
+					compatible = "atmel,tcb-timer";
+					reg = <2>;
+				};
+			};
+
 			usb1: gadget at fffa4000 {
 				atmel,vbus-gpio = <&pioB 29 GPIO_ACTIVE_HIGH>;
 				status = "okay";
-- 
2.15.1

^ permalink raw reply related

* [PATCH 14/45] ARM: dts: at91: at91sam9261: TC blocks are also simple-mfd and syscon devices
From: Alexandre Belloni @ 2017-12-19 21:31 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171219213209.13823-1-alexandre.belloni@free-electrons.com>

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 <alexandre.belloni@free-electrons.com>
---
 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 at 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

^ permalink raw reply related

* [PATCH 13/45] ARM: dts: at91: ge863-pro3: use TCB0 as timers
From: Alexandre Belloni @ 2017-12-19 21:31 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171219213209.13823-1-alexandre.belloni@free-electrons.com>

Use tcb0 for timers as 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 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 at fffa0000 {
+				timer at 0 {
+					compatible = "atmel,tcb-timer";
+					reg = <0>, <1>;
+				};
+
+				timer at 2 {
+					compatible = "atmel,tcb-timer";
+					reg = <2>;
+				};
+			};
+
 			dbgu: serial at fffff200 {
 				status = "okay";
 			};
-- 
2.15.1

^ permalink raw reply related

* [PATCH 12/45] ARM: dts: at91: at91sam9g20ek: use TCB0 as timers
From: Alexandre Belloni @ 2017-12-19 21:31 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171219213209.13823-1-alexandre.belloni@free-electrons.com>

Use tcb0 for timers as selected in at91_dt_defconfig.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 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 at fffa0000 {
+				timer at 0 {
+					compatible = "atmel,tcb-timer";
+					reg = <0>, <1>;
+				};
+
+				timer at 2 {
+					compatible = "atmel,tcb-timer";
+					reg = <2>;
+				};
+			};
+
 			usart0: serial at fffb0000 {
 				pinctrl-0 =
 					<&pinctrl_usart0
-- 
2.15.1

^ permalink raw reply related

* [PATCH 11/45] ARM: dts: at91: kizbox: use TCB0 as timers
From: Alexandre Belloni @ 2017-12-19 21:31 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171219213209.13823-1-alexandre.belloni@free-electrons.com>

Use tcb0 for timers as 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 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 at fffa0000 {
+				timer at 0 {
+					compatible = "atmel,tcb-timer";
+					reg = <0>, <1>;
+				};
+
+				timer at 2 {
+					compatible = "atmel,tcb-timer";
+					reg = <2>;
+				};
+			};
+
 			macb0: ethernet at fffc4000 {
 				phy-mode = "mii";
 				pinctrl-0 = <&pinctrl_macb_rmii
-- 
2.15.1

^ permalink raw reply related

* [PATCH 10/45] ARM: dts: at91: animeo_ip: use TCB0 as timers
From: Alexandre Belloni @ 2017-12-19 21:31 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171219213209.13823-1-alexandre.belloni@free-electrons.com>

Use tcb0 for timers as selected in at91_dt_defconfig.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 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 at fffa0000 {
+				timer at 0 {
+					compatible = "atmel,tcb-timer";
+					reg = <0>, <1>;
+				};
+
+				timer at 2 {
+					compatible = "atmel,tcb-timer";
+					reg = <2>;
+				};
+			};
+
 			usart0: serial at fffb0000 {
 				pinctrl-0 = <&pinctrl_usart0 &pinctrl_usart0_rts>;
 				linux,rs485-enabled-at-boot-time;
-- 
2.15.1

^ permalink raw reply related

* [PATCH 09/45] ARM: dts: at91: foxg20: use TCB0 as timers
From: Alexandre Belloni @ 2017-12-19 21:31 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171219213209.13823-1-alexandre.belloni@free-electrons.com>

Use tcb0 for timers as 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 at fffa0000 {
+				timer at 0 {
+					compatible = "atmel,tcb-timer";
+					reg = <0>, <1>;
+				};
+
+				timer at 2 {
+					compatible = "atmel,tcb-timer";
+					reg = <2>;
+				};
+			};
+
 			usb1: gadget at fffa4000 {
 				atmel,vbus-gpio = <&pioC 6 GPIO_ACTIVE_HIGH>;
 				status = "okay";
-- 
2.15.1

^ permalink raw reply related

* [PATCH 08/45] ARM: dts: at91: ethernut5: use TCB0 as timers
From: Alexandre Belloni @ 2017-12-19 21:31 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171219213209.13823-1-alexandre.belloni@free-electrons.com>

Use tcb0 for timers as selected in at91_dt_defconfig.

Cc: Martin Reimann <martin.reimann@egnite.de>
Cc: Tim Schendekehl <tim.schendekehl@egnite.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 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 at fffa0000 {
+				timer at 0 {
+					compatible = "atmel,tcb-timer";
+					reg = <0>, <1>;
+				};
+
+				timer at 2 {
+					compatible = "atmel,tcb-timer";
+					reg = <2>;
+				};
+			};
+
 			usart0: serial at fffb0000 {
 				status = "okay";
 			};
-- 
2.15.1

^ permalink raw reply related

* [PATCH 07/45] ARM: dts: at91: sam9_l9260: use TCB0 as timers
From: Alexandre Belloni @ 2017-12-19 21:31 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171219213209.13823-1-alexandre.belloni@free-electrons.com>

Use tcb0 for timers as 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 at fffa0000 {
+				timer at 0 {
+					compatible = "atmel,tcb-timer";
+					reg = <0>, <1>;
+				};
+
+				timer at 2 {
+					compatible = "atmel,tcb-timer";
+					reg = <2>;
+				};
+			};
+
 			mmc0: mmc at fffa8000 {
 				pinctrl-0 = <
 					&pinctrl_board_mmc0
-- 
2.15.1

^ permalink raw reply related

* [PATCH 06/45] ARM: dts: at91: at91sam9260ek: use TCB0 as timers
From: Alexandre Belloni @ 2017-12-19 21:31 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171219213209.13823-1-alexandre.belloni@free-electrons.com>

Use tcb0 for timers as 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 at fffa0000 {
+				timer at 0 {
+					compatible = "atmel,tcb-timer";
+					reg = <0>, <1>;
+				};
+
+				timer at 2 {
+					compatible = "atmel,tcb-timer";
+					reg = <2>;
+				};
+			};
+
 			usb1: gadget at fffa4000 {
 				atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
 				status = "okay";
-- 
2.15.1

^ permalink raw reply related

* [PATCH 05/45] ARM: dts: at91: at91sam9260: TC blocks are also simple-mfd and syscon devices
From: Alexandre Belloni @ 2017-12-19 21:31 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171219213209.13823-1-alexandre.belloni@free-electrons.com>

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 <alexandre.belloni@free-electrons.com>
---
 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 at 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

^ permalink raw reply related

* [PATCH 04/45] ARM: dts: at91: mpa1600: use TCB0 as timers
From: Alexandre Belloni @ 2017-12-19 21:31 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171219213209.13823-1-alexandre.belloni@free-electrons.com>

Use tcb0 for timers as 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 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 at fffa0000 {
+				timer at 0 {
+					compatible = "atmel,tcb-timer";
+					reg = <0>, <1>;
+				};
+
+				timer at 2 {
+					compatible = "atmel,tcb-timer";
+					reg = <2>;
+				};
+			};
+
 			macb0: ethernet at fffbc000 {
 				phy-mode = "rmii";
 				status = "okay";
-- 
2.15.1

^ permalink raw reply related

* [PATCH 03/45] ARM: dts: at91: at91rm9200ek: use TCB0 for timers
From: Alexandre Belloni @ 2017-12-19 21:31 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171219213209.13823-1-alexandre.belloni@free-electrons.com>

Use tcb0 for timers like 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 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 at fffa0000 {
+				timer at 0 {
+					compatible = "atmel,tcb-timer";
+					reg = <0>, <1>;
+				};
+
+				timer at 2 {
+					compatible = "atmel,tcb-timer";
+					reg = <2>;
+				};
+			};
+
 			usb1: gadget at fffb0000 {
 				atmel,vbus-gpio = <&pioD 4 GPIO_ACTIVE_HIGH>;
 				atmel,pullup-gpio = <&pioD 5 GPIO_ACTIVE_HIGH>;
-- 
2.15.1

^ permalink raw reply related

* [PATCH 02/45] ARM: dts: at91: at91rm9200: TC blocks are also simple-mfd and syscon devices
From: Alexandre Belloni @ 2017-12-19 21:31 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171219213209.13823-1-alexandre.belloni@free-electrons.com>

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 <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 da622bf45b4a..ba61893a02a0 100644
--- a/arch/arm/boot/dts/at91rm9200.dtsi
+++ b/arch/arm/boot/dts/at91rm9200.dtsi
@@ -375,7 +375,9 @@
 			};
 
 			tcb0: timer at 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

^ permalink raw reply related

* [PATCH 01/45] ARM: at91: Document new TCB bindings
From: Alexandre Belloni @ 2017-12-19 21:31 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171219213209.13823-1-alexandre.belloni@free-electrons.com>

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 <robh@kernel.org>
Cc: devicetree at vger.kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 .../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 at 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 at 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 at 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 at 0 {
+			compatible = "atmel,tcb-timer";
+			reg = <0>, <1>;
+		};
+
+		timer at 2 {
+			compatible = "atmel,tcb-timer";
+			reg = <2>;
+		};
+	};
+
+One interrupt per TC channel in a TC block:
+	tcb1: timer at 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

^ permalink raw reply related

* [PATCH 00/45] Migrate TCB bindings
From: Alexandre Belloni @ 2017-12-19 21:31 UTC (permalink / raw)
  To: linux-arm-kernel

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 <a.aubert@overkiz.com>
Cc: devicetree at 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: Joachim Eastwood <manabian@gmail.com>
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: Tim Schendekehl <tim.schendekehl@egnite.de>

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

^ permalink raw reply

* [PATCH v2] ARM: dts: sunxi: Add sid for a83t
From: kevans91 at ksu.edu @ 2017-12-19 21:05 UTC (permalink / raw)
  To: linux-arm-kernel

Allwinner a83t has a 1 KB sid block with efuse for security rootkey and
thermal calibration data, add node to describe it.

a83t-sid is not currently supported by nvmem/sunxi-sid, but it is
supported in an external driver for FreeBSD.

Signed-off-by: Kyle Evans <kevans91@ksu.edu>
---

Changes in v2:
 - remove bogus "From:" line in commit text; no functional change

 Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt | 1 +
 arch/arm/boot/dts/sun8i-a83t.dtsi                               | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt b/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt
index d69543701..e319fe5e2 100644
--- a/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt
+++ b/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt
@@ -4,6 +4,7 @@ Required properties:
 - compatible: Should be one of the following:
   "allwinner,sun4i-a10-sid"
   "allwinner,sun7i-a20-sid"
+  "allwinner,sun8i-a83t-sid"
   "allwinner,sun8i-h3-sid"
   "allwinner,sun50i-a64-sid"
 
diff --git a/arch/arm/boot/dts/sun8i-a83t.dtsi b/arch/arm/boot/dts/sun8i-a83t.dtsi
index de5119a2a..cced6e5fb 100644
--- a/arch/arm/boot/dts/sun8i-a83t.dtsi
+++ b/arch/arm/boot/dts/sun8i-a83t.dtsi
@@ -238,6 +238,11 @@
 			#size-cells = <0>;
 		};
 
+		sid: eeprom at 1c14000 {
+			compatible = "allwinner,sun8i-a83t-sid";
+			reg = <0x1c14000 0x400>;
+		};
+
 		usb_otg: usb at 1c19000 {
 			compatible = "allwinner,sun8i-a83t-musb",
 				     "allwinner,sun8i-a33-musb";
-- 
2.15.1

^ permalink raw reply related

* [PATCH] arm64: Stop printing the virtual memory layout
From: Kees Cook @ 2017-12-19 21:04 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171219192810.22537-1-labbott@redhat.com>

On Tue, Dec 19, 2017 at 11:28 AM, Laura Abbott <labbott@redhat.com> wrote:
> Printing kernel addresses should be done in limited circumstances, mostly
> for debugging purposes. Printing out the virtual memory layout at every
> kernel bootup doesn't really fall into this category so delete the prints.
> There are other ways to get the same information.

In looking at this patch, I wonder: is there anything listed here that
is _missing_ from CONFIG_PTDUMP? I would expect all of these to
already be listed there, but I thought I'd ask...

Regardless:

Acked-by: Kees Cook <keescook@chromium.org>

-Kees

>
> Signed-off-by: Laura Abbott <labbott@redhat.com>
> ---
> Follow up to my previous proposal to switch all these to %px
> ---
>  arch/arm64/mm/init.c | 43 -------------------------------------------
>  1 file changed, 43 deletions(-)
>
> diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
> index 5960bef0170d..672094ed7e07 100644
> --- a/arch/arm64/mm/init.c
> +++ b/arch/arm64/mm/init.c
> @@ -599,49 +599,6 @@ void __init mem_init(void)
>
>         mem_init_print_info(NULL);
>
> -#define MLK(b, t) b, t, ((t) - (b)) >> 10
> -#define MLM(b, t) b, t, ((t) - (b)) >> 20
> -#define MLG(b, t) b, t, ((t) - (b)) >> 30
> -#define MLK_ROUNDUP(b, t) b, t, DIV_ROUND_UP(((t) - (b)), SZ_1K)
> -
> -       pr_notice("Virtual kernel memory layout:\n");
> -#ifdef CONFIG_KASAN
> -       pr_notice("    kasan   : 0x%16lx - 0x%16lx   (%6ld GB)\n",
> -               MLG(KASAN_SHADOW_START, KASAN_SHADOW_END));
> -#endif
> -       pr_notice("    modules : 0x%16lx - 0x%16lx   (%6ld MB)\n",
> -               MLM(MODULES_VADDR, MODULES_END));
> -       pr_notice("    vmalloc : 0x%16lx - 0x%16lx   (%6ld GB)\n",
> -               MLG(VMALLOC_START, VMALLOC_END));
> -       pr_notice("      .text : 0x%p" " - 0x%p" "   (%6ld KB)\n",
> -               MLK_ROUNDUP(_text, _etext));
> -       pr_notice("    .rodata : 0x%p" " - 0x%p" "   (%6ld KB)\n",
> -               MLK_ROUNDUP(__start_rodata, __init_begin));
> -       pr_notice("      .init : 0x%p" " - 0x%p" "   (%6ld KB)\n",
> -               MLK_ROUNDUP(__init_begin, __init_end));
> -       pr_notice("      .data : 0x%p" " - 0x%p" "   (%6ld KB)\n",
> -               MLK_ROUNDUP(_sdata, _edata));
> -       pr_notice("       .bss : 0x%p" " - 0x%p" "   (%6ld KB)\n",
> -               MLK_ROUNDUP(__bss_start, __bss_stop));
> -       pr_notice("    fixed   : 0x%16lx - 0x%16lx   (%6ld KB)\n",
> -               MLK(FIXADDR_START, FIXADDR_TOP));
> -       pr_notice("    PCI I/O : 0x%16lx - 0x%16lx   (%6ld MB)\n",
> -               MLM(PCI_IO_START, PCI_IO_END));
> -#ifdef CONFIG_SPARSEMEM_VMEMMAP
> -       pr_notice("    vmemmap : 0x%16lx - 0x%16lx   (%6ld GB maximum)\n",
> -               MLG(VMEMMAP_START, VMEMMAP_START + VMEMMAP_SIZE));
> -       pr_notice("              0x%16lx - 0x%16lx   (%6ld MB actual)\n",
> -               MLM((unsigned long)phys_to_page(memblock_start_of_DRAM()),
> -                   (unsigned long)virt_to_page(high_memory)));
> -#endif
> -       pr_notice("    memory  : 0x%16lx - 0x%16lx   (%6ld MB)\n",
> -               MLM(__phys_to_virt(memblock_start_of_DRAM()),
> -                   (unsigned long)high_memory));
> -
> -#undef MLK
> -#undef MLM
> -#undef MLK_ROUNDUP
> -
>         /*
>          * Check boundaries twice: Some fundamental inconsistencies can be
>          * detected at build time already.
> --
> 2.14.3
>



-- 
Kees Cook
Pixel Security

^ permalink raw reply

* [net-next: PATCH 0/8] Armada 7k/8k PP2 ACPI support
From: Andrew Lunn @ 2017-12-19 20:46 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <CAPv3WKddg82waiapD8JzH0pCsWVTE2iT0LFz7PCYrrDDpXqmbw@mail.gmail.com>

> Of course! v2 will not have such problem, I've been waiting however
> for the feedback about the ACPI representation. Anyway, I'm strongly
> leaning towards using _ADR/_CID objects in PHY's nodes for ACPI, so
> maybe I'll just issue the v2 in order to push the discussion a bit
> forward.
 
Hi Marcin

I know ~0 about ACPI. But what seems to be missing for me is
documentation. You are defining a ABI here, which all future MDIO
busses, PHYs, and to some extent Ethernet switches need to follow. So
i would expect this to be documented somewhere.

How does documentation work in the ACPI world?

    Andrew

^ permalink raw reply

* [PATCH v8 3/9] KVM: arm/arm64: Don't cache the timer IRQ level
From: Christoffer Dall @ 2017-12-19 20:35 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <517ead96-a689-d6f6-564f-67b1cd020daf@arm.com>

On Tue, Dec 19, 2017 at 02:17:38PM +0000, Julien Thierry wrote:
> Hi Christoffer,
> 
> A few nits in the commit message.
> 
> On 13/12/17 10:45, Christoffer Dall wrote:
> >The timer was modeled after a strict idea of modelling an interrupt line
> 
> nit: modelling (also, modeled after a strict idea of modelling?)
> 

Yes, I model the modelling of models of modeled timers.  Is that not
clear?  ;)

> >level in software, meaning that only transitions in the level needed to
> 
> s/needed/need/ ?
> 

ack

> >be reported to the VGIC.  This works well for the timer, because the
> >arch timer code is in complete control of the device and can track the
> >transitions of the line.
> >
> >However, as we are about to support using the HW bit in the VGIC not
> >just for the timer, but also for VFIO which cannot track transitions of
> >the interrupt line, we have to decide on an interface for level
> >triggered mapped interrupts to the GIC, which both the timer and VFIO
> 
> "level triggered interrupts mapped to the GIC" ?
> 

an interface to the GIC for level ...

My writing here is really crap.  Thanks for pointing that out.

> >can use.
> >
> >VFIO only sees an asserting transition of the physical interrupt line,
> >and tells the VGIC when that happens.  That means that part of the
> >interrupt flow is offloaded to the hardware.
> >
> >To use the same interface for VFIO devices and the timer, we therefore
> >have to change the timer (we cannot change VFIO because it doesn't know
> >the details of the device it is assigning to a VM).
> >
> >Luckily, changing the timer is simple, we just need to stop 'caching'
> >the line level, but instead let the VGIC know the state of the timer
> >every time there is a potential change in the line level, and when the
> >line level should be asserted from the timer ISR.  The VGIC can ignore
> >extra notifications using its validate mechanism.
> >
> >Reviewed-by: Andre Przywara <andre.przywara@arm.com>
> >Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
> 
> Reviewed-by: Julien Thierry <julien.thierry@arm.com>
> 

Thanks,
-Christoffer

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox