Add pl031 RTC support for Hi6220/HiKey
Subsystems (3)
cover Add pl031 RTC support for Hi6220/HiKey
This patchset enables the pl031 RTC on the Hi6220 SoC.
I'd like to submit it for review and consideration to be merged. (But I've not gotten much feedback on it. Do I have the right people cc'ed?)
Michael/Wei: If you don't object to this, can I get an ack from one of you so the other can take the change through their tree?
thanks
-john
Zhangfei Gao (2):
clk: hi6220: Add RTC clock for pl031
arm64: dts: hi6220: Add pl031 RTC support
arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 16 ++++++++++++++++ drivers/clk/hisilicon/clk-hi6220.c | 2 ++ include/dt-bindings/clock/hi6220-clock.h | 5 +++-- 3 files changed, 21 insertions(+), 2 deletions(-)
Signature · 1 line
1.9.1
PATCH RESEND 1/2 clk: hi6220: Add RTC clock for pl031
From: Zhangfei Gao <[email protected]>
Adds clk support for the pl031 RTC on hi6220
--- drivers/clk/hisilicon/clk-hi6220.c | 2 ++ include/dt-bindings/clock/hi6220-clock.h | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-)
drivers/clk/hisilicon/clk-hi6220.c +2 -0
@@ -68,6 +68,8 @@ static struct hisi_gate_clock hi6220_separated_gate_clks_ao[] __initdata = { { HI6220_TIMER7_PCLK, "timer7_pclk", "clk_tcxo", CLK_SET_RATE_PARENT|CLK_IGNORE_UNUSED, 0x630, 22, 0, }, { HI6220_TIMER8_PCLK, "timer8_pclk", "clk_tcxo", CLK_SET_RATE_PARENT|CLK_IGNORE_UNUSED, 0x630, 23, 0, }, { HI6220_UART0_PCLK, "uart0_pclk", "clk_tcxo", CLK_SET_RATE_PARENT|CLK_IGNORE_UNUSED, 0x630, 24, 0, }, + { HI6220_RTC0_PCLK, "rtc0_pclk", "clk_tcxo", CLK_SET_RATE_PARENT|CLK_IGNORE_UNUSED, 0x630, 25, 0, }, + { HI6220_RTC1_PCLK, "rtc1_pclk", "clk_tcxo", CLK_SET_RATE_PARENT|CLK_IGNORE_UNUSED, 0x630, 26, 0, }, };static void __init hi6220_clk_ao_init (struct device_node *np)
include/dt-bindings/clock/hi6220-clock.h +3 -2
@@ -55,8 +55,9 @@#define HI6220_TIMER7_PCLK 34#define HI6220_TIMER8_PCLK 35#define HI6220_UART0_PCLK 36 - -#define HI6220_AO_NR_CLKS 37 +#define HI6220_RTC0_PCLK 37 +#define HI6220_RTC1_PCLK 38 +#define HI6220_AO_NR_CLKS 39/* clk in Hi6220 systrl */ /* gate clock */
Signature · 1 line
1.9.1
PATCH RESEND 2/2 arm64: dts: hi6220: Add pl031 RTC support
In reply to John StultzFrom: Zhangfei Gao <[email protected]>
Add pl031 rtc0 and rtc1 support to hi6220 dtsi
[jstultz: Forward ported and tweaked commit description,
added rtc1 entry as suggested by Guodong]
--- arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/hisilicon/hi6220.dtsi +16 -0
@@ -336,6 +336,22 @@ clock-names = "timer1", "timer2", "apb_pclk"; }; + rtc0: rtc@f8003000 { + compatible = "arm,pl031", "arm,primecell"; + reg = <0x0 0xf8003000 0x0 0x1000>; + interrupts = <0 12 4>; + clocks = <&ao_ctrl HI6220_RTC0_PCLK>; + clock-names = "apb_pclk"; + }; + + rtc1: rtc@f8004000 { + compatible = "arm,pl031", "arm,primecell"; + reg = <0x0 0xf8004000 0x0 0x1000>; + interrupts = <0 8 4>; + clocks = <&ao_ctrl HI6220_RTC1_PCLK>; + clock-names = "apb_pclk"; + }; + pmx0: pinmux@f7010000 { compatible = "pinctrl-single"; reg = <0x0 0xf7010000 0x0 0x27c>;
Signature · 1 line
1.9.1
Re: [RESEND][PATCH 2/2] arm64: dts: hi6220: Add pl031 RTC support
Hi John,
Quoted 25 lines · John Stultz
From: Zhangfei Gao <[email protected]>
Add pl031 rtc0 and rtc1 support to hi6220 dtsi
Cc Michael Turquette <[email protected]>Cc Stephen Boyd <[email protected]>Cc Rob Herring <[email protected]>Cc Pawel Moll <[email protected]>Cc Wei Xu <[email protected]>Cc Guodong Xu <[email protected]>Signed-off-by Zhangfei Gao <[email protected]>[jstultz: Forward ported and tweaked commit description,
added rtc1 entry as suggested by Guodong]Signed-off-by John Stultz <[email protected]>--- arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)arch/arm64/boot/dts/hisilicon/hi6220.dtsi +0
-0@@ -336,6 +336,22 @@ clock-names = "timer1", "timer2", "apb_pclk"; };
arch/arm64/boot/dts/hisilicon/hi6220.dtsi line 347
Quoted 10 lines
arch/arm64/boot/dts/hisilicon/hi6220.dtsi +9
-0+ rtc0: rtc@f8003000 { + compatible = "arm,pl031", "arm,primecell"; + reg = <0x0 0xf8003000 0x0 0x1000>; + interrupts = <0 12 4>; + clocks = <&ao_ctrl HI6220_RTC0_PCLK>; + clock-names = "apb_pclk"; + }; + + rtc1: rtc@f8004000 {
Sorry for the late reply.
Thanks for the patch!
Except the indent of the rtc1, the others is fine to me.
As what Stephen said in the cover letter works for me.
Best Regards,
Wei
Quoted 11 lines
arch/arm64/boot/dts/hisilicon/hi6220.dtsi +7
-0+ compatible = "arm,pl031", "arm,primecell"; + reg = <0x0 0xf8004000 0x0 0x1000>; + interrupts = <0 8 4>; + clocks = <&ao_ctrl HI6220_RTC1_PCLK>; + clock-names = "apb_pclk"; + }; + pmx0: pinmux@f7010000 { compatible = "pinctrl-single"; reg = <0x0 0xf7010000 0x0 0x27c>;
Quoted 5 lines · John Stultz
This patchset enables the pl031 RTC on the Hi6220 SoC.
I'd like to submit it for review and consideration to be merged. (But I've not gotten much feedback on it. Do I have the right people cc'ed?)
Yes. One issue is the DT header causes dependency problems as either clk or arm-soc maintainers have to take everything. I think it is desired that you don't use defines in the dts file, so arm-soc can take it and Michael/Stephen can take the clock changes.
Send the dts file change to [email protected] if you can't get any response from the sub-arch maintainer.
Rob
Quoted 27 lines
Michael/Wei: If you don't object to this, can I get an ack from one of you so the other can take the change through their tree?
thanks
-johnCc Michael Turquette <[email protected]>Cc Stephen Boyd <[email protected]>Cc Rob Herring <[email protected]>Cc Pawel Moll <[email protected]>Cc Wei Xu <[email protected]>Cc Guodong Xu <[email protected]>Cc Zhangfei Gao <[email protected]>Zhangfei Gao (2):
clk: hi6220: Add RTC clock for pl031
arm64: dts: hi6220: Add pl031 RTC supportarch/arm64/boot/dts/hisilicon/hi6220.dtsi | 16 ++++++++++++++++ drivers/clk/hisilicon/clk-hi6220.c | 2 ++ include/dt-bindings/clock/hi6220-clock.h | 5 +++-- 3 files changed, 21 insertions(+), 2 deletions(-)--
1.9.1
Quoted 7 lines · Rob Herring
Quoted 5 lines · John Stultz
This patchset enables the pl031 RTC on the Hi6220 SoC.
I'd like to submit it for review and consideration to be merged. (But I've not gotten much feedback on it. Do I have the right people cc'ed?)
Quoted 7 lines
Yes. One issue is the DT header causes dependency problems as either clk or arm-soc maintainers have to take everything. I think it is desired that you don't use defines in the dts file, so arm-soc can take it and Michael/Stephen can take the clock changes.
Send the dts file change to [email protected] if you can't get any response from the sub-arch maintainer.
We can also provide a stable branch from clk tree based on v4.7-rc1 that you base the next patch on while sending through arm-soc. That sort of design has been working for a few cycles now.
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
Quoted 13 lines · Stephen Boyd
Quoted 12 lines · Rob Herring
Quoted 5 lines · John Stultz
This patchset enables the pl031 RTC on the Hi6220 SoC.
I'd like to submit it for review and consideration to be merged. (But I've not gotten much feedback on it. Do I have the right people cc'ed?)
Yes. One issue is the DT header causes dependency problems as either clk or arm-soc maintainers have to take everything. I think it is desired that you don't use defines in the dts file, so arm-soc can take it and Michael/Stephen can take the clock changes.
Quoted 7 lines
Quoted 2 lines
Send the dts file change to [email protected] if you can't get any response from the sub-arch maintainer.
We can also provide a stable branch from clk tree based on v4.7-rc1 that you base the next patch on while sending through arm-soc. That sort of design has been working for a few cycles now.
This is fine by me. So do you mind queuing the first patch up?
Also, Since Wei acked the second patch (modulo a whitespace fix which I'll be resending here shortly), would you want to simply to take both, or should Wei still pull your branch in and include it into this tree with the second patch?
I'll resend the set here in a bit, but please let me know which you'd prefer so we don't end up with confusion around all the options of who's doing what. :)
thanks
-john