Skip to contentSkip to conversation

add RTC support for Armada 370 and Armada XP

PATCH Superseded Gregory CLEMENT 4 participants 11 messages Dec 12, 2012 – Jan 10, 2013

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

v2 cover add RTC support for Armada 370 and Armada XP

Hello,

This small patch set adds RTC support for Armada 370 and Armada XP. It was successfully tested on the evaluation board. The third patch add the lacking documentation for the device tree binding and was already taken by Grant Likely, I keep this one in the series for coherency. The only differences with the previous patch set was the add of the Acked-by from Andrew Lunn and a new small patch to update of the mvebu_configuration. I also split the patch wich add the RTC support in two part, one for the RTC subsytem and on for mach-mvebu. This series is 3.9 material.

Alessandro,
could you take the first patches if you agree with it?

Jason,

I wait for a while if there any feedback, then I will send you a git pull request. If I understood well your workflow I will do 2 git pull one for dt and one for defconfig.

Thanks

Gregory CLEMENT (4):
rtc: Add support of rtc-mv for MVEBU SoCs
arm: mvebu: Add RTC support for Armada 370 and Armada XP
rtc: rtc-mv: Add the device tree binding documentation
arm: mvebu: Update defconfig with Marvell RTC support

 .../devicetree/bindings/rtc/orion-rtc.txt          |   18 ++++++++++++++++++
 arch/arm/boot/dts/armada-370-xp.dtsi               |    6 ++++++
 arch/arm/configs/mvebu_defconfig                   |    1 +
 drivers/rtc/Kconfig                                |    2 +-
 4 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/rtc/orion-rtc.txt
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v2 1/4 rtc: Add support of rtc-mv for MVEBU SoCs

The Armada 370 and Armada XP Socs have the same controller that the one used in the orion platforms. This patch enables the selection of rtc-mv with mvebu platforms.

---
 drivers/rtc/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/Kconfig +1 -1
index 19c03ab..9356f75 100644
@@ -994,7 +994,7 @@ config RTC_DRV_TX4939
 
 config RTC_DRV_MV
 	tristate "Marvell SoC RTC"
-	depends on ARCH_KIRKWOOD || ARCH_DOVE
+	depends on ARCH_KIRKWOOD || ARCH_DOVE || ARCH_MVEBU
 	help
 	  If you say yes here you will get support for the in-chip RTC
 	  that can be found in some of Marvell's SoC devices, such as
Signature · 1 line
1.7.9.5
Applied
#2 lore raw

PATCH v2 1/4 rtc: Add support of rtc-mv for MVEBU SoCs

Quoted 9 lines · Gregory CLEMENT

The Armada 370 and Armada XP Socs have the same controller that the one used in the orion platforms. This patch enables the selection of rtc-mv with mvebu platforms.

---
 drivers/rtc/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to mvebu/drivers

thx,

Jason.

#3 lore raw

PATCH v2 2/4 arm: mvebu: Add RTC support for Armada 370 and Armada XP

In reply to Gregory CLEMENT

The Armada 370 and Armada XP Socs have the same controller that the one used in the orion platforms. This patch updates the device tree for these SoCs.

---
 arch/arm/boot/dts/armada-370-xp.dtsi |    6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/boot/dts/armada-370-xp.dtsi +6 -0
index cf6c48a..86dccfa 100644
@@ -129,6 +129,12 @@
 			clocks = <&coreclk 0>;
 			status = "disabled";
 		};
+
+		rtc at 10300 {
+			compatible = "marvell,orion-rtc";
+			reg = <0xd0010300 0x20>;
+			interrupts = <50>;
+		};
 	};
 };
 
Signature · 1 line
1.7.9.5
Applied
#4 lore raw

PATCH v2 2/4 arm: mvebu: Add RTC support for Armada 370 and Armada XP

Quoted 9 lines · Gregory CLEMENT

The Armada 370 and Armada XP Socs have the same controller that the one used in the orion platforms. This patch updates the device tree for these SoCs.

---
 arch/arm/boot/dts/armada-370-xp.dtsi |    6 ++++++
 1 file changed, 6 insertions(+)

Applied to mvebu/dt

thx,

Jason.

#5 lore raw

PATCH v2 3/4 rtc: rtc-mv: Add the device tree binding documentation

In reply to Gregory CLEMENT

The support was already written, but the binding documentation was lacking.

---
 .../devicetree/bindings/rtc/orion-rtc.txt          |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/orion-rtc.txt
Documentation/devicetree/bindings/rtc/orion-rtc.txt new file +18 -0
new file mode 100644
index 0000000..3bf63ff
@@ -0,0 +1,18 @@
+* Mvebu Real Time Clock
+
+RTC controller for the Kirkwood, the Dove, the Armada 370 and the
+Armada XP SoCs
+
+Required properties:
+- compatible : Should be "marvell,orion-rtc"
+- reg: physical base address of the controller and length of memory mapped
+  region.
+- interrupts: IRQ line for the RTC.
+
+Example:
+
+rtc at 10300 {
+        compatible = "marvell,orion-rtc";
+        reg = <0xd0010300 0x20>;
+        interrupts = <50>;
+};
Signature · 1 line
1.7.9.5
#6 lore raw

PATCH v2 4/4 arm: mvebu: Update defconfig with Marvell RTC support

In reply to Gregory CLEMENT

The RTC class driver is already part of the mvebu_defconfig but the Marvell internal RTC not yet. Now that its support is added for mvebu let's update the config file.

---
 arch/arm/configs/mvebu_defconfig |    1 +
 1 file changed, 1 insertion(+)
arch/arm/configs/mvebu_defconfig +1 -0
index a702fb3..87a5bed 100644
@@ -41,6 +41,7 @@ CONFIG_GPIO_SYSFS=y
 # CONFIG_USB_SUPPORT is not set
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_S35390A=y
+CONFIG_RTC_DRV_MV=y
 CONFIG_DMADEVICES=y
 CONFIG_MV_XOR=y
 # CONFIG_IOMMU_SUPPORT is not set
Signature · 1 line
1.7.9.5
Applied
#7 lore raw

PATCH v2 4/4 arm: mvebu: Update defconfig with Marvell RTC support

Quoted 8 lines · Gregory CLEMENT

The RTC class driver is already part of the mvebu_defconfig but the Marvell internal RTC not yet. Now that its support is added for mvebu let's update the config file.

---
 arch/arm/configs/mvebu_defconfig |    1 +
 1 file changed, 1 insertion(+)

Applied to mvebu/boards

thx,

Jason.

#8 lore raw

v2 cover add RTC support for Armada 370 and Armada XP

In reply to Gregory CLEMENT
Quoted 12 lines · Gregory CLEMENT

Hello,

This small patch set adds RTC support for Armada 370 and Armada XP. It was successfully tested on the evaluation board. The third patch add the lacking documentation for the device tree binding and was already taken by Grant Likely, I keep this one in the series for coherency. The only differences with the previous patch set was the add of the Acked-by from Andrew Lunn and a new small patch to update of the mvebu_configuration. I also split the patch wich add the RTC support in two part, one for the RTC subsytem and on for mach-mvebu. This series is 3.9 material.

Quoted 2 lines

Alessandro,
could you take the first patches if you agree with it?

Oups, I meant the first one not the first patches.

Quoted 23 lines

Jason,

I wait for a while if there any feedback, then I will send you a git pull request. If I understood well your workflow I will do 2 git pull one for dt and one for defconfig.

Thanks

Gregory CLEMENT (4):
rtc: Add support of rtc-mv for MVEBU SoCs
arm: mvebu: Add RTC support for Armada 370 and Armada XP
rtc: rtc-mv: Add the device tree binding documentation
arm: mvebu: Update defconfig with Marvell RTC support

 .../devicetree/bindings/rtc/orion-rtc.txt          |   18 ++++++++++++++++++
 arch/arm/boot/dts/armada-370-xp.dtsi               |    6 ++++++
 arch/arm/configs/mvebu_defconfig                   |    1 +
 drivers/rtc/Kconfig                                |    2 +-
 4 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/rtc/orion-rtc.txt
Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#9 lore raw

v2 cover add RTC support for Armada 370 and Armada XP

Quoted 12 lines · On Wednesday 12 December 2012 10:10:00 Gregory CLEMENT wrote:
Quoted 11 lines · Gregory CLEMENT

Hello,

This small patch set adds RTC support for Armada 370 and Armada XP. It was successfully tested on the evaluation board. The third patch add the lacking documentation for the device tree binding and was already taken by Grant Likely, I keep this one in the series for coherency. The only differences with the previous patch set was the add of the Acked-by from Andrew Lunn and a new small patch to update of the mvebu_configuration. I also split the patch wich add the RTC support in two part, one for the RTC subsytem and on for mach-mvebu. This series is 3.9 material.

on RD-A370-A1

Signature · 1 line
Florian
#10 lore raw

v2 cover add RTC support for Armada 370 and Armada XP

In reply to Gregory CLEMENT
Quoted 9 lines · Gregory CLEMENT

This small patch set adds RTC support for Armada 370 and Armada XP. It was successfully tested on the evaluation board. The third patch add the lacking documentation for the device tree binding and was already taken by Grant Likely, I keep this one in the series for coherency. The only differences with the previous patch set was the add of the Acked-by from Andrew Lunn and a new small patch to update of the mvebu_configuration. I also split the patch wich add the RTC support in two part, one for the RTC subsytem and on for mach-mvebu. This series is 3.9 material.

Nice and small!