Skip to contentSkip to conversation

ARM: at91/dt: at91sam9m10g45ek add rtc node

PATCH In review Erik van Luijk 3 participants 5 messages Sep 2, 2014 – Sep 18, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: at91/dt: at91sam9m10g45ek add rtc node

---
 arch/arm/boot/dts/at91sam9g45.dtsi     | 7 +++++++
 arch/arm/boot/dts/at91sam9m10g45ek.dts | 3 +++
 2 files changed, 10 insertions(+)
arch/arm/boot/dts/at91sam9g45.dtsi +7 -0
index 932a669..bf62c18 100644
@@ -1070,6 +1070,13 @@
 				status = "disabled";
 			};
 
+			rtc at fffffdb0 {
+				compatible = "atmel,at91rm9200-rtc";
+				reg = <0xfffffdb0 0x30>;
+				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+				status = "disabled";
+			};
+
 			spi0: spi at fffa4000 {
 				#address-cells = <1>;
 				#size-cells = <0>;
arch/arm/boot/dts/at91sam9m10g45ek.dts +3 -0
index 96ccc7d..2dd2347 100644
@@ -70,6 +70,9 @@
 
 			watchdog at fffffd40 {
 				status = "okay";
+
+			rtc at fffffdb0 {
+				status = "okay";
 			};
 
 			mmc0: mmc at fff80000 {
Signature · 1 line
1.9.1
Acked-by on v1 1/1
#1 lore raw

Hi Erik,

Quoted 1 line · On Tue, 2 Sep 2014 12:52:12 +0200 Erik van Luijk <[email protected]> wrote:

Except for the nitpicks you'll find below, you have my

Quoted 10 lines
---
 arch/arm/boot/dts/at91sam9g45.dtsi     | 7 +++++++
 arch/arm/boot/dts/at91sam9m10g45ek.dts | 3 +++
 2 files changed, 10 insertions(+)
arch/arm/boot/dts/at91sam9g45.dtsi +0 -0
index 932a669..bf62c18 100644

arch/arm/boot/dts/at91sam9g45.dtsi line 1075

Quoted 6 lines
arch/arm/boot/dts/at91sam9g45.dtsi +3 -0
@@ -1070,6 +1070,13 @@
 				status = "disabled";
 			};
 
+			rtc at fffffdb0 {
+				compatible = "atmel,at91rm9200-rtc";
+				reg = <0xfffffdb0 0x30>;

The RTC registers goes from 0xfffffdb0 to 0xfffffdc0, which means the size is 0x10 and not 0x30. This is not important here, because the following region is marked as reserved, but we prefer to keep the DT consistent with the datasheet.

Quoted 12 lines
arch/arm/boot/dts/at91sam9g45.dtsi +4 -0
+				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+				status = "disabled";
+			};
+
 			spi0: spi at fffa4000 {
 				#address-cells = <1>;
 				#size-cells = <0>;
arch/arm/boot/dts/at91sam9m10g45ek.dts +0 -0
index 96ccc7d..2dd2347 100644

arch/arm/boot/dts/at91sam9m10g45ek.dts line 75

Quoted 6 lines
arch/arm/boot/dts/at91sam9m10g45ek.dts +3 -0
@@ -70,6 +70,9 @@
 
 			watchdog at fffffd40 {
 				status = "okay";
+
+			rtc at fffffdb0 {
+				status = "okay";

Try to keep SoC and board changes in distinct commits.

arch/arm/boot/dts/at91sam9m10g45ek.dts line 78

Quoted 3 lines
arch/arm/boot/dts/at91sam9m10g45ek.dts +0 -0
 			};
 
 			mmc0: mmc at fff80000 {

Best Regards,

Boris

Signature · 3 lines
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#2 lore raw

Hi Boris, Nicolas,

Boris BREZILLON schreef op 2-9-2014 om 18:33:

Quoted 9 lines

Hi Erik,

Quoted 1 line · On Tue, 2 Sep 2014 12:52:12 +0200 Erik van Luijk <[email protected]> wrote:

Except for the nitpicks you'll find below, you have my

Quoted 8 lines

Review

Quoted 6 lines
---
 arch/arm/boot/dts/at91sam9g45.dtsi     | 7 +++++++
 arch/arm/boot/dts/at91sam9m10g45ek.dts | 3 +++
 2 files changed, 10 insertions(+)
(quoted diff) +0 -0

b/arch/arm/boot/dts/at91sam9g45.dtsi

Quoted 7 lines
Quoted 7 lines

index 932a669..bf62c18 100644

arch/arm/boot/dts/at91sam9g45.dtsi +0 -0
@@ -1070,6 +1070,13 @@
                 status = "disabled";
             };
 
Quoted 8 lines

arch/arm/boot/dts/at91sam9g45.dtsi line 1075

Quoted 3 lines
arch/arm/boot/dts/at91sam9g45.dtsi +3 -0
+            rtc at fffffdb0 {
+                compatible = "atmel,at91rm9200-rtc";
+                reg = <0xfffffdb0 0x30>;

The RTC registers goes from 0xfffffdb0 to 0xfffffdc0, which means the size is 0x10 and not 0x30. This is not important here, because the following region is marked as reserved, but we prefer to keep the DT consistent with the datasheet.

This is an inconsistency in the datasheet of the AT91SAM9G45 (and at least also
AT91SAM9G15, AT91SAM9G25, AT91SAM9G35 and AT91SAM9M10).
In the memory map (fig. 5-1) there is room for 16 bytes.
But in the 'Real-time Clock (RTC) User Interface' (table 15-1) there is room for
48 bytes (0x30) excluding the Reserved Registers (which don't belong to the RTC
on the AT91SAM9M10). Perhaps Nicolas can draw some attention to this at Atmel.

Quoted 9 lines

Review

Quoted 9 lines
arch/arm/boot/dts/at91sam9g45.dtsi +4 -0
+                interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                status = "disabled";
+            };
+
             spi0: spi at fffa4000 {
                 #address-cells = <1>;
                 #size-cells = <0>;
(quoted diff) +0 -0

b/arch/arm/boot/dts/at91sam9m10g45ek.dts

Quoted 5 lines
Quoted 5 lines

index 96ccc7d..2dd2347 100644

arch/arm/boot/dts/at91sam9m10g45ek.dts +0 -0
@@ -70,6 +70,9 @@
 
Quoted 7 lines

arch/arm/boot/dts/at91sam9m10g45ek.dts line 75

Quoted 5 lines
arch/arm/boot/dts/at91sam9m10g45ek.dts +3 -0
             watchdog at fffffd40 {
                 status = "okay";
+
+            rtc at fffffdb0 {
+                status = "okay";

Try to keep SoC and board changes in distinct commits.

Understood.

Quoted 10 lines

arch/arm/boot/dts/at91sam9m10g45ek.dts line 78

Quoted 4 lines
arch/arm/boot/dts/at91sam9m10g45ek.dts +0 -0
             };
 
             mmc0: mmc at fff80000 {

Best Regards,

Boris

Regards,

Erik

#3 lore raw
Quoted 38 lines · On Wed, 03 Sep 2014 08:09:28 +0200 Erik van Luijk <[email protected]> wrote:

Hi Boris, Nicolas,

Boris BREZILLON schreef op 2-9-2014 om 18:33:

Quoted 9 lines

Hi Erik,

Quoted 1 line · On Tue, 2 Sep 2014 12:52:12 +0200 Erik van Luijk <[email protected]> wrote:

Except for the nitpicks you'll find below, you have my

Quoted 8 lines

Review

Quoted 6 lines
---
 arch/arm/boot/dts/at91sam9g45.dtsi     | 7 +++++++
 arch/arm/boot/dts/at91sam9m10g45ek.dts | 3 +++
 2 files changed, 10 insertions(+)
(quoted diff) +0 -0

b/arch/arm/boot/dts/at91sam9g45.dtsi

Quoted 7 lines
Quoted 7 lines

index 932a669..bf62c18 100644

arch/arm/boot/dts/at91sam9g45.dtsi +0 -0
@@ -1070,6 +1070,13 @@
                 status = "disabled";
             };
 
Quoted 8 lines

arch/arm/boot/dts/at91sam9g45.dtsi line 1075

Quoted 3 lines
arch/arm/boot/dts/at91sam9g45.dtsi +3 -0
+            rtc at fffffdb0 {
+                compatible = "atmel,at91rm9200-rtc";
+                reg = <0xfffffdb0 0x30>;

The RTC registers goes from 0xfffffdb0 to 0xfffffdc0, which means the size is 0x10 and not 0x30. This is not important here, because the following region is marked as reserved, but we prefer to keep the DT consistent with the datasheet.

Quoted 10 lines

This is an inconsistency in the datasheet of the AT91SAM9G45 (and at least also
AT91SAM9G15, AT91SAM9G25, AT91SAM9G35 and AT91SAM9M10).
In the memory map (fig. 5-1) there is room for 16 bytes.
But in the 'Real-time Clock (RTC) User Interface' (table 15-1) there is room for
48 bytes (0x30) excluding the Reserved Registers (which don't belong to the RTC
on the AT91SAM9M10). Perhaps Nicolas can draw some attention to this at Atmel.

Indeed, I only had a look at the memory map. Given this input, you should keep your definition ;-).

Quoted 40 lines
Quoted 10 lines

Review

Quoted 10 lines
arch/arm/boot/dts/at91sam9g45.dtsi +4 -0
+                interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                status = "disabled";
+            };
+
             spi0: spi at fffa4000 {
                 #address-cells = <1>;
                 #size-cells = <0>;
(quoted diff) +0 -0

b/arch/arm/boot/dts/at91sam9m10g45ek.dts

Quoted 5 lines
Quoted 5 lines

index 96ccc7d..2dd2347 100644

arch/arm/boot/dts/at91sam9m10g45ek.dts +0 -0
@@ -70,6 +70,9 @@
 
Quoted 7 lines

arch/arm/boot/dts/at91sam9m10g45ek.dts line 75

Quoted 5 lines
arch/arm/boot/dts/at91sam9m10g45ek.dts +3 -0
             watchdog at fffffd40 {
                 status = "okay";
+
+            rtc at fffffdb0 {
+                status = "okay";

Try to keep SoC and board changes in distinct commits.

Understood.

Quoted 10 lines

arch/arm/boot/dts/at91sam9m10g45ek.dts line 78

Quoted 4 lines
arch/arm/boot/dts/at91sam9m10g45ek.dts +0 -0
             };
 
             mmc0: mmc at fff80000 {

Best Regards,

Boris

Regards,

Erik

Signature · 3 lines
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
Acked-by on v1 1/1
#4 lore raw
In reply to Erik van Luijk

On 02/09/2014 12:52, Erik van Luijk :

Quoted 1 line

and added to the at91-3.18-dt3 branch.

I also sent your remarks to the Documentation department in Atmel:
thanks a lot for your help.

Quoted 28 lines
---
 arch/arm/boot/dts/at91sam9g45.dtsi     | 7 +++++++
 arch/arm/boot/dts/at91sam9m10g45ek.dts | 3 +++
 2 files changed, 10 insertions(+)
arch/arm/boot/dts/at91sam9g45.dtsi +7 -0
index 932a669..bf62c18 100644
@@ -1070,6 +1070,13 @@
 				status = "disabled";
 			};
 
+			rtc at fffffdb0 {
+				compatible = "atmel,at91rm9200-rtc";
+				reg = <0xfffffdb0 0x30>;
+				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+				status = "disabled";
+			};
+
 			spi0: spi at fffa4000 {
 				#address-cells = <1>;
 				#size-cells = <0>;
arch/arm/boot/dts/at91sam9m10g45ek.dts +0 -0
index 96ccc7d..2dd2347 100644

arch/arm/boot/dts/at91sam9m10g45ek.dts line 72

Quoted 3 lines
arch/arm/boot/dts/at91sam9m10g45ek.dts +0 -0
@@ -70,6 +70,9 @@
 
 			watchdog at fffffd40 {
 				status = "okay";

BTW, there was an issue here: "};" missing..

I corrected it.

Quoted 7 lines
arch/arm/boot/dts/at91sam9m10g45ek.dts +3 -0
+
+			rtc at fffffdb0 {
+				status = "okay";
 			};
 
 			mmc0: mmc at fff80000 {
Signature · 1 line
Nicolas Ferre