clk: Broadcom BCM63138 support
Subsystems (4)
v4 cover clk: Broadcom BCM63138 support
This patch series adds support for the Broadcom BCM63138 DSL SoCs clocking framework.
Since the HW is identical to the one found in Broadcom iProc SoCs, but the integration is different (obviously), there is still a new compatible string introduced just in case we happen to find issues in the future.
Stephen, could you stage the two patches in a clk-bcm63xx branch that I could later utilize while doing the arm-soc DT pull request?
Thank you!
Florian Fainelli (3):
clk: iproc: Extend binding to cover BCM63138
clk: bcm: Add BCM63138 clock support
ARM: dts: BCM63xx: Add ARMPLL device tree nodes
.../bindings/clock/brcm,iproc-clocks.txt | 5 +++ arch/arm/boot/dts/bcm63138.dtsi | 36 +++++++++++++++++----- drivers/clk/bcm/Kconfig | 10 ++++++ drivers/clk/bcm/Makefile | 1 + drivers/clk/bcm/clk-bcm63xx.c | 22 +++++++++++++ 5 files changed, 66 insertions(+), 8 deletions(-) create mode 100644 drivers/clk/bcm/clk-bcm63xx.c
Signature · 1 line
2.1.0
PATCH v4 1/3 clk: iproc: Extend binding to cover BCM63138
Broadcom BCM63138 DSL SoCs have the same ARMPLL clocking infrastructure as the Cygnus and iProc chips, add a dedicated compatible string and document that the ARMPLL node is a valid node for this chip.
---
No changes in v4
Changes in v3:
- added Rob's Acked-by tag
No changes in v2
Documentation/devicetree/bindings/clock/brcm,iproc-clocks.txt | 5 +++++ 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/clock/brcm,iproc-clocks.txt +5 -0
@@ -208,3 +208,8 @@ These clock IDs are defined in: ch3_unused lcpll_ports 4 BCM_NS2_LCPLL_PORTS_CH3_UNUSED ch4_unused lcpll_ports 5 BCM_NS2_LCPLL_PORTS_CH4_UNUSED ch5_unused lcpll_ports 6 BCM_NS2_LCPLL_PORTS_CH5_UNUSED + +BCM63138 +-------- +PLL and leaf clock compatible strings for BCM63138 are: + "brcm,bcm63138-armpll"
Signature · 1 line
2.1.0
Stephen Boyd
AppliedRe: [PATCH v4 1/3] clk: iproc: Extend binding to cover BCM63138
Quoted 7 lines · Florian Fainelli
Broadcom BCM63138 DSL SoCs have the same ARMPLL clocking infrastructure as the Cygnus and iProc chips, add a dedicated compatible string and document that the ARMPLL node is a valid node for this chip.
Acked-by Rob Herring <[email protected]>Signed-off-by Florian Fainelli <[email protected]>---
Applied to clk-bcm63xx
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH v4 2/3 clk: bcm: Add BCM63138 clock support
In reply to Florian FainelliBCM63138 has a simple clocking domain which is primarily the ARMPLL clocking complex, from which the ARM (CPU), APB and AXI clocks would be derived from.
Since the ARMPLL controller is entirely compatible with the iProc ARM PLL, we just initialize it without additional parameters.
---
No changes in v4
Changes in v3:
- made default depend on ARCH_BCM_63XX per Stephen Boyd's comment
Changes in v2:
- added COMPILE_TEST per Scott Branden's comment
drivers/clk/bcm/Kconfig | 10 ++++++++++ drivers/clk/bcm/Makefile | 1 + drivers/clk/bcm/clk-bcm63xx.c | 22 ++++++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 drivers/clk/bcm/clk-bcm63xx.c
drivers/clk/bcm/Kconfig +10 -0
@@ -1,3 +1,13 @@ +config CLK_BCM_63XX + bool "Broadcom BCM63xx clock support" + depends on ARCH_BCM_63XX || COMPILE_TEST + depends on COMMON_CLK + select COMMON_CLK_IPROC + default ARCH_BCM_63XX + help + Enable common clock framework support for Broadcom BCM63xx DSL SoCs + based on the ARM architecture + config CLK_BCM_KONA bool "Broadcom Kona CCU clock support" depends on ARCH_BCM_MOBILE || COMPILE_TEST
drivers/clk/bcm/Makefile +1 -0
@@ -1,3 +1,4 @@ +obj-$(CONFIG_CLK_BCM_63XX) += clk-bcm63xx.o obj-$(CONFIG_CLK_BCM_KONA) += clk-kona.o obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o obj-$(CONFIG_CLK_BCM_KONA) += clk-bcm281xx.o
drivers/clk/bcm/clk-bcm63xx.c new file +22 -0
@@ -0,0 +1,22 @@ +/* +* Copyright (C) 2015 Broadcom Corporation +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation version 2. +* +* This program is distributed "as is" WITHOUT ANY WARRANTY of any +* kind, whether express or implied; without even the implied warranty +* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ +#include <linux/init.h> +#include <linux/clk-provider.h> +#include <linux/of.h> +#include "clk-iproc.h" + +static void __init bcm63138_armpll_init (struct device_node *node) +{ +iproc_armpll_setup (node); +} +CLK_OF_DECLARE (bcm63138_armpll,"brcm,bcm63138-armpll" , bcm63138_armpll_init);
Signature · 1 line
2.1.0
Stephen Boyd
AppliedRe: [PATCH v4 2/3] clk: bcm: Add BCM63138 clock support
Quoted 9 lines · Florian Fainelli
BCM63138 has a simple clocking domain which is primarily the ARMPLL clocking complex, from which the ARM (CPU), APB and AXI clocks would be derived from.
Since the ARMPLL controller is entirely compatible with the iProc ARM PLL, we just initialize it without additional parameters.
Signed-off-by Florian Fainelli <[email protected]>---
Applied to clk-bcm63xx
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH v4 3/3 ARM: dts: BCM63xx: Add ARMPLL device tree nodes
In reply to Florian FainelliAdd the ARM PLL controller which comes standard with the Cortex-A9 found on the BCM63138 SoCs. This is the same controller as the one found in the Broadcom iProc architecture, however, we have a separate compatible string to indicate the integration difference, since the hardware is different.
---
Changes in v4:
- properly reflect the HW clocking and make it clear that periph_clk is feeding into the ARM PLL clock domain
No changes in v2 or v3
arch/arm/boot/dts/bcm63138.dtsi | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-)
arch/arm/boot/dts/bcm63138.dtsi +28 -8
@@ -43,18 +43,31 @@ #address-cells = <1>; #size-cells = <0>; - arm_timer_clk: arm_timer_clk { - #clock-cells = <0>; - compatible = "fixed-clock"; - clock-frequency = <500000000>; - }; - + /* UBUS peripheral clock */ periph_clk: periph_clk { #clock-cells = <0>; compatible = "fixed-clock"; clock-frequency = <50000000>; clock-output-names = "periph"; }; + + /* peripheral clock for system timer */ + axi_clk: axi_clk { + #clock-cells = <0>; + compatible = "fixed-factor-clock"; + clocks = <&armpll>; + clock-div = <2>; + clock-mult = <1>; + }; + + /* APB bus clock */ + apb_clk: apb_clk { + #clock-cells = <0>; + compatible = "fixed-factor-clock"; + clocks = <&armpll>; + clock-div = <4>; + clock-mult = <1>; + }; }; /* ARM bus */
@@ -93,14 +106,14 @@ compatible = "arm,cortex-a9-global-timer"; reg = <0x1e200 0x20>; interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&arm_timer_clk>; + clocks = <&axi_clk>; }; local_timer: local-timer@1e600 { compatible = "arm,cortex-a9-twd-timer"; reg = <0x1e600 0x20>; interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&arm_timer_clk>; + clocks = <&axi_clk>; }; twd_watchdog: watchdog@1e620 {
@@ -109,6 +122,13 @@ interrupts = <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH>; }; + armpll: armpll { + #clock-cells = <0>; + compatible = "brcm,bcm63138-armpll"; + clocks = <&periph_clk>; + reg = <0x20000 0xf00>; + }; + pmb0: reset-controller@4800c0 { compatible = "brcm,bcm63138-pmb"; reg = <0x4800c0 0x10>;
Signature · 1 line
2.1.0
Florian Fainelli
AppliedRe: [PATCH v4 3/3] ARM: dts: BCM63xx: Add ARMPLL device tree nodes
Quoted 7 lines · Florian Fainelli
Add the ARM PLL controller which comes standard with the Cortex-A9 found on the BCM63138 SoCs. This is the same controller as the one found in the Broadcom iProc architecture, however, we have a separate compatible string to indicate the integration difference, since the hardware is different.
Signed-off-by Florian Fainelli <[email protected]>
Applied to devicetree/next with a merge commit of clk/clk-bcm63xx to resolve dependencies.
Signature · 1 line
Florian
Quoted 9 lines · Florian Fainelli
This patch series adds support for the Broadcom BCM63138 DSL SoCs clocking framework.
Since the HW is identical to the one found in Broadcom iProc SoCs, but the integration is different (obviously), there is still a new compatible string introduced just in case we happen to find issues in the future.
Stephen, could you stage the two patches in a clk-bcm63xx branch that I could later utilize while doing the arm-soc DT pull request?
Stephen, can you queue the first two patches in a topic branch for me to merge as part of the commit adding the DTS changes?
Thanks!
Quoted 16 lines
Thank you!
Florian Fainelli (3):
clk: iproc: Extend binding to cover BCM63138
clk: bcm: Add BCM63138 clock support
ARM: dts: BCM63xx: Add ARMPLL device tree nodes.../bindings/clock/brcm,iproc-clocks.txt | 5 +++ arch/arm/boot/dts/bcm63138.dtsi | 36 +++++++++++++++++----- drivers/clk/bcm/Kconfig | 10 ++++++ drivers/clk/bcm/Makefile | 1 + drivers/clk/bcm/clk-bcm63xx.c | 22 +++++++++++++ 5 files changed, 66 insertions(+), 8 deletions(-) create mode 100644 drivers/clk/bcm/clk-bcm63xx.c
Signature · 1 line
Florian
Quoted 8 lines · Florian Fainelli
Quoted 7 lines · Florian Fainelli
This patch series adds support for the Broadcom BCM63138 DSL SoCs clocking framework.
Since the HW is identical to the one found in Broadcom iProc SoCs, but the integration is different (obviously), there is still a new compatible string introduced just in case we happen to find issues in the future.
Quoted 5 lines
Quoted 2 lines
Stephen, could you stage the two patches in a clk-bcm63xx branch that I could later utilize while doing the arm-soc DT pull request?
Stephen, can you queue the first two patches in a topic branch for me to merge as part of the commit adding the DTS changes?
Well, now that I look back at the changes, you can actually merge the two patches in clk-next, and the DTS changes can come in before or after, it does not really matter, this would not cause breakage or anything. Sorry for the noise.
Quoted 21 lines
Thanks!
Quoted 16 lines
Thank you!
Florian Fainelli (3):
clk: iproc: Extend binding to cover BCM63138
clk: bcm: Add BCM63138 clock support
ARM: dts: BCM63xx: Add ARMPLL device tree nodes.../bindings/clock/brcm,iproc-clocks.txt | 5 +++ arch/arm/boot/dts/bcm63138.dtsi | 36 +++++++++++++++++----- drivers/clk/bcm/Kconfig | 10 ++++++ drivers/clk/bcm/Makefile | 1 + drivers/clk/bcm/clk-bcm63xx.c | 22 +++++++++++++ 5 files changed, 66 insertions(+), 8 deletions(-) create mode 100644 drivers/clk/bcm/clk-bcm63xx.c
Signature · 1 line
Florian
Quoted 12 lines · Florian Fainelli
Quoted 11 lines · Florian Fainelli
Quoted 9 lines · Florian Fainelli
This patch series adds support for the Broadcom BCM63138 DSL SoCs clocking framework.
Since the HW is identical to the one found in Broadcom iProc SoCs, but the integration is different (obviously), there is still a new compatible string introduced just in case we happen to find issues in the future.
Stephen, could you stage the two patches in a clk-bcm63xx branch that I could later utilize while doing the arm-soc DT pull request?
Quoted 7 lines
Quoted 2 lines
Stephen, can you queue the first two patches in a topic branch for me to merge as part of the commit adding the DTS changes?
Well, now that I look back at the changes, you can actually merge the two patches in clk-next, and the DTS changes can come in before or after, it does not really matter, this would not cause breakage or anything. Sorry for the noise.
Really? I thought if the clk patches aren't there then the dts change would cause some clocks to be orphaned. If that's ok with you it's ok with me.
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
Quoted 16 lines · Stephen Boyd
Quoted 15 lines · Florian Fainelli
Quoted 13 lines · Florian Fainelli
Quoted 9 lines · Florian Fainelli
This patch series adds support for the Broadcom BCM63138 DSL SoCs clocking framework.
Since the HW is identical to the one found in Broadcom iProc SoCs, but the integration is different (obviously), there is still a new compatible string introduced just in case we happen to find issues in the future.
Stephen, could you stage the two patches in a clk-bcm63xx branch that I could later utilize while doing the arm-soc DT pull request?
Stephen, can you queue the first two patches in a topic branch for me to merge as part of the commit adding the DTS changes?
Quoted 8 lines
Quoted 4 lines
Well, now that I look back at the changes, you can actually merge the two patches in clk-next, and the DTS changes can come in before or after, it does not really matter, this would not cause breakage or anything. Sorry for the noise.
Really? I thought if the clk patches aren't there then the dts change would cause some clocks to be orphaned. If that's ok with you it's ok with me.
Woah, I guess I was not thinking very clearly yesterday, yes, we need to bundle these changes together, so if you are still okay with the topic branch for me to include as a merge commit, that's fine with me as well.
/me needs to think twice before typing.
Signature · 1 line
Florian
Quoted 22 lines · Florian Fainelli
Quoted 21 lines · Stephen Boyd
Quoted 19 lines · Florian Fainelli
Quoted 8 lines · Florian Fainelli
Quoted 7 lines · Florian Fainelli
This patch series adds support for the Broadcom BCM63138 DSL SoCs clocking framework.
Since the HW is identical to the one found in Broadcom iProc SoCs, but the integration is different (obviously), there is still a new compatible string introduced just in case we happen to find issues in the future.
Quoted 5 lines
Quoted 2 lines
Stephen, could you stage the two patches in a clk-bcm63xx branch that I could later utilize while doing the arm-soc DT pull request?
Stephen, can you queue the first two patches in a topic branch for me to merge as part of the commit adding the DTS changes?
Well, now that I look back at the changes, you can actually merge the two patches in clk-next, and the DTS changes can come in before or after, it does not really matter, this would not cause breakage or anything. Sorry for the noise.
Quoted 7 lines
Quoted 3 lines
Really? I thought if the clk patches aren't there then the dts change would cause some clocks to be orphaned. If that's ok with you it's ok with me.
Woah, I guess I was not thinking very clearly yesterday, yes, we need to bundle these changes together, so if you are still okay with the topic branch for me to include as a merge commit, that's fine with me as well.
Ok. Done.
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project