ARM: dts: exynos: Add timer node for exynos5420
Subsystems (2)
cover ARM: dts: exynos: Add timer node for exynos5420
On ODROID XU3, after having all the Exynos5422 cores detected as started in HYP mode with a patch[1], KVM still won't work because it needs the Generic Timer Architecture. It's defined in other exynos5 models (5250, 5440) DTs, but not the 542x/5800, so I just added it.
Actually this timer was defined in ODROID Hardkernel's repository [2], so I took its clock-frequency value too (which isn't provided by firmware/U-Boot).
KVM now works on ODROID XU3 with kernel v4.5 plus these changes.
regards,
Adel Belhouane.
[1] from Brian Kim:
https://gist.github.com/bkrepo/6f4eea33be133ad306e3
[2]
https://github.com/hardkernel/linux/blob/odroidxu3-3.10.y/arch/arm/boot/dts/exynos5422-odroidxu3.dts
Adel Belhouane (1):
ARM: dts: exynos: Add timer node for exynos5420
arch/arm/boot/dts/exynos5420.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)
Signature · 1 line
2.1.4
PATCH 1/1 ARM: dts: exynos: Add timer node for exynos5420
This patch adds timer node for exynos542x/5800.
Generic Timer Architecture is needed by KVM.
--- arch/arm/boot/dts/exynos5420.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm/boot/dts/exynos5420.dtsi +10 -0
@@ -1140,6 +1140,16 @@ power-domains = <&disp_pd>; #iommu-cells = <0>; }; + + timer { + compatible = "arm,cortex-a15-timer", + "arm,armv7-timer"; + interrupts = <1 13 0xf08>, + <1 14 0xf08>, + <1 11 0xf08>, + <1 10 0xf08>; + clock-frequency = <24000000>; + }; }; &dp {
Signature · 1 line
2.1.4
Hi Adel,
Quoted 20 lines · Adel Belhouane
This patch adds timer node for exynos542x/5800.
Generic Timer Architecture is needed by KVM.Signed-off-by Adel Belhouane <[email protected]>--- arch/arm/boot/dts/exynos5420.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)arch/arm/boot/dts/exynos5420.dtsi +3
-0@@ -1140,6 +1140,16 @@ power-domains = <&disp_pd>; #iommu-cells = <0>; }; + + timer { + compatible = "arm,cortex-a15-timer",
arch/arm/boot/dts/exynos5420.dtsi line 1155
Quoted 10 lines
arch/arm/boot/dts/exynos5420.dtsi +7
-0+ "arm,armv7-timer"; + interrupts = <1 13 0xf08>, + <1 14 0xf08>, + <1 11 0xf08>, + <1 10 0xf08>; + clock-frequency = <24000000>; + }; }; &dp {
Did you test this arch_timer after deleting the MCT Device Tree node from dts file?
As I knew, the generic arch time uses same H/W with MCT device in Exynos SoC. So, If we remove the MCT device-tree node from dts, the arch timer is not working. Just, I tested it on Exynos3250 SoC.
Best Regards,
Chanwoo Choi
Quoted 10 lines · Chanwoo Choi
Hi Adel,
Quoted 1 line · Adel Belhouane
This patch adds timer node for exynos542x/5800.
Did you test this
arch_timerafter deleting the MCT Device Tree node from dts file?As I knew, the generic arch time uses same H/W with MCT device in Exynos SoC. So, If we remove the MCT device-tree node from dts, the arch timer is not working. Just, I tested it on Exynos3250 SoC.
I got the same conclusion you got: it doesn't boot without the MCT definition. But I'm not asking to change the MCT interface with the Arch Timer interface (even if I understand it would give faster results for some usages from the thread Krysztof Kozlowski gave before), I'm just asking for both. The usage conflict was resolved with the commit 1d80415db64b that prevents the MCT interface from resetting the (same hardware) timer thus no more disrupting the Arch Timer interface.
The goal is enabling KVM.
best regards,
Adel Belhouane.
Quoted 11 lines · Adel Belhouane
On ODROID XU3, after having all the Exynos5422 cores detected as started in HYP mode with a patch[1], KVM still won't work because it needs the Generic Timer Architecture. It's defined in other exynos5 models (5250, 5440) DTs, but not the 542x/5800, so I just added it.
Actually this timer was defined in ODROID Hardkernel's repository [2], so I took its clock-frequency value too (which isn't provided by
firmware/U-Boot).KVM now works on ODROID XU3 with kernel v4.5 plus these changes.
Quoted 8 lines
regards,
Adel Belhouane.[1] from Brian Kim:
https://gist.github.com/bkrepo/6f4eea33be133ad306e3[2]
https://github.com/hardkernel/linux/blob/odroidxu3-3.10.y/arch/arm/boot/dts/exynos5422-odroidxu3.dts
Please look at this thread:
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-July/359806.html
Unfortunately I do not have any more details about this.
Best regards,
Krzysztof
Quoted 4 lines · Krzysztof Kozlowski
Please look at this thread:
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-July/359806.htmlUnfortunately I do not have any more details about this.
So I understand MCT and Arch Timer use the same hardware timer and there were issues when the MCT interface reset it at boot and during resume and the Arch Timer consumers didn't expect it. In this thread there were links [1] to a patch to have the MCT not writing the timer anymore, thus allowing the two interfaces to co-exist.
This patch was applied in commit 1d80415db64b. So no problem is to be expected when using both interfaces at the same time.
I can see exynos5250 got its Arch Timer definition for KVM:
- From the description of commit 2b7da98870bc
ARM: dts: Add architected timer nodes for exynos5250 [...]
This is required by KVM.
So is there something else blocking adding this definition for 542x/5800 considering its effect is enabling KVM ?
[1]
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/257350.html
=> https://chromium-review.googlesource.com/#/c/200298/
=> https://chromium-review.googlesource.com/#/c/201143/
for 3.8
[2]
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/258622.html
best regards,
Adel
Quoted 17 lines · Adel Belhouane
Quoted 4 lines · Krzysztof Kozlowski
Please look at this thread:
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-July/359806.htmlUnfortunately I do not have any more details about this.
So I understand MCT and Arch Timer use the same hardware timer and there were issues when the MCT interface reset it at boot and during resume and the Arch Timer consumers didn't expect it. In this thread there were links [1] to a patch to have the MCT not writing the timer anymore, thus allowing the two interfaces to co-exist.
This patch was applied in commit
1d80415db64b. So no problem is to be expected when using both interfaces at the same time.I can see exynos5250 got its Arch Timer definition for KVM:
Quoted 7 lines
- From the description of commit
2b7da98870bc
ARM: dts: Add architected timer nodes for exynos5250 [...]
This is required by KVM.So is there something else blocking adding this definition for 542x/5800 considering its effect is enabling KVM ?
Yeah, this is blocking:
Quoted 9 lines
Doug Anderson:
According to Samsung, there are issues where using cp15 could sometimes return the wrong value, especially if you happen to read it while on an A7 instead of an A15.Kukjin Kim:
One more thing, if you change it for your own private platform, it's > up to you but if not, i.e., for mass product, please don't change it. Because it's not guaranteed even you haven't seen its failure...
Best regards,
Krzysztof
Quoted 20 lines · Krzysztof Kozlowski
Quoted 4 lines · Adel Belhouane
Quoted 3 lines · Krzysztof Kozlowski
Please look at this thread:
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-July/359806.htmlQuoted 8 lines
Quoted 1 line
Unfortunately I do not have any more details about this.
This patch was applied in commit
1d80415db64b. So no problem is to be expected when using both interfaces at the same time.So is there something else blocking adding this definition for 542x/5800 considering its effect is enabling KVM ?
Yeah, this is blocking:
Quoted 4 lines
Doug Anderson:
According to Samsung, there are issues where using cp15 could sometimes return the wrong value, especially if you happen to read it while on an A7 instead of an A15.
Quoted 8 lines
Quoted 4 lines
Kukjin Kim:
One more thing, if you change it for your own private platform, it's > up to you but if not, i.e., for mass product, please don't change it. Because it's not guaranteed even you haven't seen its failure...Best regards,
Krzysztof
It seems I jumped to an other thread while reading the link you gave and didn't manage to read till the end. Now I get it. Thanks for your replies.
best regards,
Adel.