clk: hi6220: Add the hi655x's pmic clock
PATCH v3 1/2 clk: hi6220: Add the hi655x's pmic clock
The hi655x multi function device is a PMIC providing regulators.
The PMIC also provides a clock for the WiFi and the Bluetooth, let's implement this clock in order to add it in the hi655x MFD and allow proper wireless initialization.
---
Changelog:
V3:
- Removed mfd hi655x fold from V2
- Fixed #clock-cells
- Used struct clk_init_data on the stack
- Swapped lookup name for devm_clk_hw_register
V2:
- Added COMPILE_TEST option, compiled on x86
- Removed useless parenthesis
- Used of_clk_hw_simple_get() instead of deref dance
- Do bailout if the clock-names is not specified
- Rollback on error
- Folded mfd line change and binding
- Added #clock-cells binding documentation
- Added #clock-cells in the DT
V1: initial post
--- drivers/clk/Kconfig | 8 +++ drivers/clk/Makefile | 1 + drivers/clk/clk-hi655x.c | 136 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 145 insertions(+) create mode 100644 drivers/clk/clk-hi655x.c
drivers/clk/Kconfig +8 -0
@@ -47,6 +47,14 @@ config COMMON_CLK_RK808 clocked at 32KHz each. Clkout1 is always on, Clkout2 can off by control register. +config COMMON_CLK_HI655X + tristate "Clock driver for Hi655x" + depends on MFD_HI655X_PMIC || COMPILE_TEST + ---help--- + This driver supports the hi655x PMIC clock. This + multi-function device has one fixed-rate oscillator, clocked + at 32KHz. + config COMMON_CLK_SCPI tristate "Clock driver controlled via SCPI interface" depends on ARM_SCPI_PROTOCOL || COMPILE_TEST
drivers/clk/Makefile +1 -0
@@ -36,6 +36,7 @@ obj-$(CONFIG_COMMON_CLK_PALMAS) += clk-palmas.o obj-$(CONFIG_COMMON_CLK_PWM) += clk-pwm.o obj-$(CONFIG_CLK_QORIQ) += clk-qoriq.o obj-$(CONFIG_COMMON_CLK_RK808) += clk-rk808.o +obj-$(CONFIG_COMMON_CLK_HI655X) += clk-hi655x.o obj-$(CONFIG_COMMON_CLK_S2MPS11) += clk-s2mps11.o obj-$(CONFIG_COMMON_CLK_SCPI) += clk-scpi.o obj-$(CONFIG_COMMON_CLK_SI5351) += clk-si5351.o
drivers/clk/clk-hi655x.c new file +136 -0
136 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v3 2/2 ARM64: dts: hi6220-hikey: Add clock binding for the pmic mfd
--- Documentation/devicetree/bindings/mfd/hisilicon,hi655x.txt | 6 ++++++ arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 1 + 2 files changed, 7 insertions(+)
Documentation/devicetree/bindings/mfd/hisilicon,hi655x.txt +6 -0
@@ -16,6 +16,11 @@ Required properties: - reg: Base address of PMIC on Hi6220 SoC. - interrupt-controller: Hi655x has internal IRQs (has own IRQ domain). - pmic-gpios: The GPIO used by PMIC IRQ. +- #clock-cells: From common clock binding; shall be set to 0 + +Optional properties: +- clock-output-names: From common clock binding to override the + default output clock name Example: pmic: pmic at f8000000 {
@@ -24,4 +29,5 @@ Example: interrupt-controller; #interrupt-cells = <2>; pmic-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>; + #clock-cells = <0>; }
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +1 -0
@@ -325,6 +325,7 @@ pmic: pmic at f8000000 { compatible = "hisilicon,hi655x-pmic"; reg = <0x0 0xf8000000 0x0 0x1000>; + #clock-cells = <0>; interrupt-controller; #interrupt-cells = <2>; pmic-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
Signature · 1 line
1.9.1
Re: [PATCH V3 2/2] ARM64: dts: hi6220-hikey: Add clock binding for the pmic mfd
On Mon, Apr 17, 2017 at 07:19:26PM +0200, Daniel Lezcano wrote:
Commit msg?
Quoted 5 lines
Signed-off-by Daniel Lezcano <[email protected]>--- Documentation/devicetree/bindings/mfd/hisilicon,hi655x.txt | 6 ++++++ arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 1 + 2 files changed, 7 insertions(+)
Otherwise,
Re: [PATCH V3 2/2] ARM64: dts: hi6220-hikey: Add clock binding for the pmic mfd
In reply to Daniel LezcanoQuoted 6 lines · Daniel Lezcano
Signed-off-by Daniel Lezcano <[email protected]>--- Documentation/devicetree/bindings/mfd/hisilicon,hi655x.txt | 6 ++++++ arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 1 + 2 files changed, 7 insertions(+)
I take it this goes through arm-soc? Not sure why I'm on To:
line.
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
Stephen Boyd
AppliedQuoted 8 lines · Daniel Lezcano
The hi655x multi function device is a PMIC providing regulators.
The PMIC also provides a clock for the WiFi and the Bluetooth, let's implement this clock in order to add it in the hi655x MFD and allow proper wireless initialization.
Signed-off-by Daniel Lezcano <[email protected]>---
Applied to clk-next
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH v3 2/2 ARM64: dts: hi6220-hikey: Add clock binding for the pmic mfd
In reply to Stephen BoydQuoted 10 lines · Stephen Boyd
Quoted 6 lines · Daniel Lezcano
Signed-off-by Daniel Lezcano <[email protected]>--- Documentation/devicetree/bindings/mfd/hisilicon,hi655x.txt | 6 ++++++ arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 1 + 2 files changed, 7 insertions(+)I take it this goes through arm-soc? Not sure why I'm on To:
line.
Probably it should go through Lee's tree.
Signature · 5 lines
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
Re: [PATCH V3 2/2] ARM64: dts: hi6220-hikey: Add clock binding for the pmic mfd
Quoted 9 lines · Daniel Lezcano
Quoted 8 lines · Stephen Boyd
Quoted 6 lines · Daniel Lezcano
Signed-off-by Daniel Lezcano <[email protected]>--- Documentation/devicetree/bindings/mfd/hisilicon,hi655x.txt | 6 ++++++ arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 1 + 2 files changed, 7 insertions(+)
Quoted 4 lines
Quoted 2 lines
I take it this goes through arm-soc? Not sure why I'm on To:
line.Probably it should go through Lee's tree.
Unlikely.
The document and the DTS change should really have gone separately, but to save you from having to mess around so close to the merge window:
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH V3 2/2] ARM64: dts: hi6220-hikey: Add clock binding for the pmic mfd
Quoted 14 lines · Lee Jones
Quoted 12 lines · Daniel Lezcano
Quoted 10 lines · Stephen Boyd
Quoted 6 lines · Daniel Lezcano
Signed-off-by Daniel Lezcano <[email protected]>--- Documentation/devicetree/bindings/mfd/hisilicon,hi655x.txt | 6 ++++++ arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 1 + 2 files changed, 7 insertions(+)I take it this goes through arm-soc? Not sure why I'm on To:
line.
Quoted 8 lines
Quoted 1 line
Probably it should go through Lee's tree.
Unlikely.
The document and the DTS change should really have gone separately, but to save you from having to mess around so close to the merge window:
Acked-by Lee Jones <[email protected]>
Thanks Lee.
Usually, I take the DT changes (including doc) with the timers changes with the maintainer and Rob's blessing. So the DT and the driver changes are aligned in my tree and make the submission changes easier.
I agree mixing the patches for different destinations into a single patchset is fuzzy, I will take care next time to separate the patches.
-- Daniel
Quoted 5 lines
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Signature · 5 lines
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
Re: [PATCH V3 2/2] ARM64: dts: hi6220-hikey: Add clock binding for the pmic mfd
Quoted 22 lines · Daniel Lezcano
Quoted 21 lines · Lee Jones
Quoted 9 lines · Daniel Lezcano
Quoted 8 lines · Stephen Boyd
Quoted 6 lines · Daniel Lezcano
Signed-off-by Daniel Lezcano <[email protected]>--- Documentation/devicetree/bindings/mfd/hisilicon,hi655x.txt | 6 ++++++ arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 1 + 2 files changed, 7 insertions(+)Quoted 4 lines
Quoted 2 lines
I take it this goes through arm-soc? Not sure why I'm on To:
line.Probably it should go through Lee's tree.
Unlikely.
The document and the DTS change should really have gone separately, but to save you from having to mess around so close to the merge window:
Quoted 7 lines
Quoted 1 line
Acked-by Lee Jones <[email protected]>Thanks Lee.
Usually, I take the DT changes (including doc) with the timers changes with the maintainer and Rob's blessing. So the DT and the driver changes are aligned in my tree and make the submission changes easier.
The binding docs go with the bindings, not the DTS changes.
Quoted 2 lines
I agree mixing the patches for different destinations into a single patchset is fuzzy, I will take care next time to separate the patches.
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH V3 2/2] ARM64: dts: hi6220-hikey: Add clock binding for the pmic mfd
In reply to Lee JonesQuoted 14 lines · Lee Jones
Quoted 12 lines · Daniel Lezcano
Quoted 10 lines · Stephen Boyd
Quoted 6 lines · Daniel Lezcano
Signed-off-by Daniel Lezcano <[email protected]>--- Documentation/devicetree/bindings/mfd/hisilicon,hi655x.txt | 6 ++++++ arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 1 + 2 files changed, 7 insertions(+)I take it this goes through arm-soc? Not sure why I'm on To:
line.
Quoted 8 lines
Quoted 1 line
Probably it should go through Lee's tree.
Unlikely.
The document and the DTS change should really have gone separately, but to save you from having to mess around so close to the merge window:
Acked-by Lee Jones <[email protected]>
So who is supposed to take this patch? Xu? Rob?
Signature · 5 lines
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
Re: [PATCH V3 2/2] ARM64: dts: hi6220-hikey: Add clock binding for the pmic mfd
Quoted 17 lines · Daniel Lezcano
Quoted 16 lines · Lee Jones
Quoted 13 lines · Daniel Lezcano
Quoted 10 lines · Stephen Boyd
Quoted 6 lines · Daniel Lezcano
Signed-off-by Daniel Lezcano <[email protected]>--- Documentation/devicetree/bindings/mfd/hisilicon,hi655x.txt | 6 ++++++ arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 1 + 2 files changed, 7 insertions(+)I take it this goes through arm-soc? Not sure why I'm on To:
line.Probably it should go through Lee's tree.
Quoted 8 lines
Quoted 6 lines
Unlikely.
The document and the DTS change should really have gone separately, but to save you from having to mess around so close to the merge window:
Acked-by Lee Jones <[email protected]>So who is supposed to take this patch? Xu? Rob?
The DTS file changes should normally go through the platform maintainer and from there to arm-soc, to minimize the risk for patch conflicts.
For binding changes, conflicts are much rarer, so we any of the tree (arm-soc, driver subsystem, or devicetree) works equally well IMHO. In this particular case,keeping the two together is best, so please send it to Wei Xu with the added chagnelog and Acks.
Arnd