Add common clock support for Broadcom iProc architecture
Subsystems (3)
Ray Jui
maintainerv7 cover Add common clock support for Broadcom iProc architecture
This patchset contains the initial common clock support for Broadcom's iProc family of SoCs. The iProc clock architecture comprises of various PLLs, e.g., ARMPLL, GENPLL, LCPLL0, MIPIPLL, and etc. An onboard crystal serves as the basic reference clock for these PLLs. Each PLL may have several leaf clocks. One special group of clocks is the ASIU clocks, which are dervied directly from the crystal reference clock.
This patchset also contains the basic clock support for the Broadcom Cygnus SoC, which implements the iProc clock architecture
Changes from v6:
- Rebase to v4.1-rc2
- Consolidate iProc PLL and its leaf clocks into a single device node, based on feedback from Mike Turquette. The PLL and its leaf clocks are now exposed a clock consumer through indices of the same device node phandle
- Update iProc device tree binding document based on the above change
- Add SW override support to iProc PLL clocks
Changes from v5:
- Rebase to v4.0-rc4
- Drop of_clk_get_parent_rate helper function from the clock framework
- Get rid of custom "clock-frequency" support in iProc PLL code. Instead, add standard clock set_rate and round_rate support and make use of DT properties "assigned-clocks" and "assigned-clock-rates" to initialize PLL to the desired rate when registering to the clock framework
- Add SW workaround for ASIC bug on MIPI PLL to always read back the same register following a write transaction, to ensure value is written to the correct register
Changes from v4:
- Add of_clk_get_parent_rate helper function into the clock framework
- Switch to use of_clk_get_parent_rate in the iProc PLL clock driver
Changes from v3:
- Fix incorrect use of passing in of_clk_src_onecell_get when adding ARM PLL and other iProc PLLs as clock provider. These PLLs have zero cells in DT and thefore of_clk_src_simple_get should be used instead
- Rename Cygnus MIPI PLL Channel 2 clock from BCM_CYGNUS_MIPIPLL_CH2_UNUSED to BCM_CYGNUS_MIPIPLL_CH2_V3D, since a 3D graphic rendering engine has been integrated into Cygnus revision B0 and has its core clock running off MIPI PLL Channel 2
- Changed default MIPI PLL VCO frequency from 1.75 GHz to 2.1 GHz. This allows us to derive 300 MHz V3D clock from channel 2 through the post divisor
Changes from v2:
- Re-arrange Cygnus clock/pll init functions so each init function is right next to its clock table
- Removed #defines for number of clocks in Cygnus. Have the number of clocks automatically determined based on array size of the clock table
Changes from v1:
- Separate drivers/clk/Makefile change for drivers/clk/bcm out to a standalone patch
Ray Jui (6):
clk: iproc: define Broadcom iProc clock binding
clk: iproc: add initial common clock support
clk: Change bcm clocks build dependency
clk: cygnus: add clock support for Broadcom Cygnus
ARM: dts: enable clock support for Broadcom Cygnus
clk: cygnus: remove Cygnus dummy clock binding
.../devicetree/bindings/clock/bcm-cygnus-clock.txt | 34 - .../bindings/clock/brcm,iproc-clocks.txt | 132 ++++ arch/arm/boot/dts/bcm-cygnus-clock.dtsi | 89 ++- drivers/clk/Makefile | 2 +- drivers/clk/bcm/Kconfig | 9 + drivers/clk/bcm/Makefile | 2 + drivers/clk/bcm/clk-cygnus.c | 265 ++++++++ drivers/clk/bcm/clk-iproc-armpll.c | 282 ++++++++ drivers/clk/bcm/clk-iproc-asiu.c | 276 ++++++++ drivers/clk/bcm/clk-iproc-pll.c | 716 ++++++++++++++++++++ drivers/clk/bcm/clk-iproc.h | 178 +++++ include/dt-bindings/clock/bcm-cygnus.h | 68 ++ 12 files changed, 1990 insertions(+), 63 deletions(-) delete mode 100644 Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt create mode 100644 Documentation/devicetree/bindings/clock/brcm,iproc-clocks.txt create mode 100644 drivers/clk/bcm/clk-cygnus.c create mode 100644 drivers/clk/bcm/clk-iproc-armpll.c create mode 100644 drivers/clk/bcm/clk-iproc-asiu.c create mode 100644 drivers/clk/bcm/clk-iproc-pll.c create mode 100644 drivers/clk/bcm/clk-iproc.h create mode 100644 include/dt-bindings/clock/bcm-cygnus.h
Signature · 1 line
1.7.9.5
Ray Jui
maintainerPATCH v7 1/6 clk: iproc: define Broadcom iProc clock binding
Document the device tree binding for Broadcom iProc architecture based clock controller
--- .../bindings/clock/brcm,iproc-clocks.txt | 132 ++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/brcm,iproc-clocks.txt
Documentation/devicetree/bindings/clock/brcm,iproc-clocks.txt new file +132 -0
@@ -0,0 +1,132 @@ +Broadcom iProc Family Clocks + +This binding uses the common clock binding: + Documentation/devicetree/bindings/clock/clock-bindings.txt + +The iProc clock controller manages clocks that are common to the iProc family. +An SoC from the iProc family may have several PPLs, e.g., ARMPLL, GENPLL, +LCPLL0, MIPIPLL, and etc., all derived from an onboard crystal. Each PLL +comprises of several leaf clocks + +Required properties for a PLL and its leaf clocks: + +- compatible: + Should have a value of the form "brcm,<soc>-<pll>". For example, GENPLL on +Cygnus has a compatible string of "brcm,cygnus-genpll" + +- #clock-cells: + Have a value of <1> since there are more than 1 leaf clock of a given PLL + +- reg: + Define the base and range of the I/O address space that contain the iProc +clock control registers required for the PLL + +- clocks: + The input parent clock phandle for the PLL. For most iProc PLLs, this is an +onboard crystal with a fixed rate + +- clock-output-names: + An ordered list of strings defining the names of the clocks + +Example: + + osc: oscillator { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <25000000>; + }; + + genpll: genpll { + #clock-cells = <1>; + compatible = "brcm,cygnus-genpll"; + reg = <0x0301d000 0x2c>, <0x0301c020 0x4>; + clocks = <&osc>; + clock-output-names = "genpll", "axi21", "250mhz", "ihost_sys", + "enet_sw", "audio_125", "can"; + }; + +Required properties for ASIU clocks: + +ASIU clocks are a special case. These clocks are derived directly from the +reference clock of the onboard crystal + +- compatible: + Should have a value of the form "brcm,<soc>-asiu-clk". For example, ASIU +clocks for Cygnus have a compatible string of "brcm,cygnus-asiu-clk" + +- #clock-cells: + Have a value of <1> since there are more than 1 ASIU clocks + +- reg: + Define the base and range of the I/O address space that contain the iProc +clock control registers required for ASIU clocks + +- clocks: + The input parent clock phandle for the ASIU clock, i.e., the onboard +crystal + +- clock-output-names: + An ordered list of strings defining the names of the ASIU clocks + +Example: + + osc: oscillator { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <25000000>; + }; + + asiu_clks: asiu_clks { + #clock-cells = <1>; + compatible = "brcm,cygnus-asiu-clk"; + reg = <0x0301d048 0xc>, <0x180aa024 0x4>; + clocks = <&osc>; + clock-output-names = "keypad", "adc/touch", "pwm"; + }; + +Cygnus +------ +PLL and leaf clock compatible strings for Cygnus are: + "brcm,cygnus-armpll" + "brcm,cygnus-genpll" + "brcm,cygnus-lcpll0" + "brcm,cygnus-mipipll" + "brcm,cygnus-asiu-clk" + +The following table defines the set of PLL/clock index and ID for Cygnus. +These clock IDs are defined in: + "include/dt-bindings/clock/bcm-cygnus.h" + + Clock Source (Parent) Index ID + --- ----- ----- --------- + crystal N/A N/A N/A + + armpll crystal N/A N/A + + keypad crystal (ASIU) 0 BCM_CYGNUS_ASIU_KEYPAD_CLK + adc/tsc crystal (ASIU) 1 BCM_CYGNUS_ASIU_ADC_CLK + pwm crystal (ASIU) 2 BCM_CYGNUS_ASIU_PWM_CLK + + genpll crystal 0 BCM_CYGNUS_GENPLL + axi21 genpll 1 BCM_CYGNUS_GENPLL_AXI21_CLK + 250mhz genpll 2 BCM_CYGNUS_GENPLL_250MHZ_CLK + ihost_sys genpll 3 BCM_CYGNUS_GENPLL_IHOST_SYS_CLK + enet_sw genpll 4 BCM_CYGNUS_GENPLL_ENET_SW_CLK + audio_125 genpll 5 BCM_CYGNUS_GENPLL_AUDIO_125_CLK + can genpll 6 BCM_CYGNUS_GENPLL_CAN_CLK + + lcpll0 crystal 0 BCM_CYGNUS_LCPLL0 + pcie_phy lcpll0 1 BCM_CYGNUS_LCPLL0_PCIE_PHY_REF_CLK + ddr_phy lcpll0 2 BCM_CYGNUS_LCPLL0_DDR_PHY_CLK + sdio lcpll0 3 BCM_CYGNUS_LCPLL0_SDIO_CLK + usb_phy lcpll0 4 BCM_CYGNUS_LCPLL0_USB_PHY_REF_CLK + smart_card lcpll0 5 BCM_CYGNUS_LCPLL0_SMART_CARD_CLK + ch5_unused lcpll0 6 BCM_CYGNUS_LCPLL0_CH5_UNUSED + + mipipll crystal 0 BCM_CYGNUS_MIPIPLL + ch0_unused mipipll 1 BCM_CYGNUS_MIPIPLL_CH0_UNUSED + ch1_lcd mipipll 2 BCM_CYGNUS_MIPIPLL_CH1_LCD + ch2_v3d mipipll 3 BCM_CYGNUS_MIPIPLL_CH2_V3D + ch3_unused mipipll 4 BCM_CYGNUS_MIPIPLL_CH3_UNUSED + ch4_unused mipipll 5 BCM_CYGNUS_MIPIPLL_CH4_UNUSED + ch5_unused mipipll 6 BCM_CYGNUS_MIPIPLL_CH5_UNUSED
Signature · 1 line
1.7.9.5
Ray Jui
maintainerPATCH v7 2/6 clk: iproc: add initial common clock support
In reply to Ray JuiThis adds basic and generic support for various iProc PLLs and clocks including the ARMPLL, GENPLL, LCPLL, MIPIPLL, and ASIU clocks.
SoCs under the iProc architecture can define their specific register offsets and clock parameters for their PLL and clock controllers. These parameters can be passed as arugments into the generic iProc PLL and clock setup functions
Derived from code originally provided by Jonathan Richardson <[email protected]>
--- drivers/clk/bcm/Kconfig | 9 + drivers/clk/bcm/Makefile | 1 + drivers/clk/bcm/clk-iproc-armpll.c | 282 ++++++++++++++ drivers/clk/bcm/clk-iproc-asiu.c | 276 ++++++++++++++ drivers/clk/bcm/clk-iproc-pll.c | 716 ++++++++++++++++++++++++++++++++++++ drivers/clk/bcm/clk-iproc.h | 178 +++++++++ 6 files changed, 1462 insertions(+) create mode 100644 drivers/clk/bcm/clk-iproc-armpll.c create mode 100644 drivers/clk/bcm/clk-iproc-asiu.c create mode 100644 drivers/clk/bcm/clk-iproc-pll.c create mode 100644 drivers/clk/bcm/clk-iproc.h
drivers/clk/bcm/Kconfig +9 -0
@@ -7,3 +7,12 @@ config CLK_BCM_KONA Enable common clock framework support for Broadcom SoCs using "Kona" style clock control units, including those in the BCM281xx and BCM21664 families. + +config COMMON_CLK_IPROC + bool "Broadcom iProc clock support" + depends on ARCH_BCM_IPROC + depends on COMMON_CLK + default ARCH_BCM_IPROC + help + Enable common clock framework support for Broadcom SoCs + based on the iProc architecture
drivers/clk/bcm/Makefile +1 -0
@@ -2,3 +2,4 @@ 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 obj-$(CONFIG_CLK_BCM_KONA) += clk-bcm21664.o +obj-$(CONFIG_COMMON_CLK_IPROC) += clk-iproc-armpll.o clk-iproc-pll.o clk-iproc-asiu.o
drivers/clk/bcm/clk-iproc-armpll.c new file +282 -0
282 lines not on this page · raw message
drivers/clk/bcm/clk-iproc-asiu.c new file +276 -0
276 lines not on this page · raw message
drivers/clk/bcm/clk-iproc-pll.c new file +716 -0
716 lines not on this page · raw message
drivers/clk/bcm/clk-iproc.h new file +178 -0
178 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Ray Jui
maintainerPATCH v7 3/6 clk: Change bcm clocks build dependency
In reply to Ray JuiThe clock code under drivers/clk/bcm now contains code for both the Broadcom mobile SoCs and the iProc SoCs. Change the the makefile dependency to be under config flag CONFIG_ARCH_BCM that's enabled for both families of SoCs
--- drivers/clk/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/Makefile +1 -1
@@ -45,7 +45,7 @@ obj-$(CONFIG_COMMON_CLK_WM831X) += clk-wm831x.o obj-$(CONFIG_COMMON_CLK_XGENE) += clk-xgene.o obj-$(CONFIG_COMMON_CLK_PWM) += clk-pwm.o obj-$(CONFIG_COMMON_CLK_AT91) += at91/ -obj-$(CONFIG_ARCH_BCM_MOBILE) += bcm/ +obj-$(CONFIG_ARCH_BCM) += bcm/ obj-$(CONFIG_ARCH_BERLIN) += berlin/ obj-$(CONFIG_ARCH_HI3xxx) += hisilicon/ obj-$(CONFIG_ARCH_HIP04) += hisilicon/
Signature · 1 line
1.7.9.5
Ray Jui
maintainerPATCH v7 4/6 clk: cygnus: add clock support for Broadcom Cygnus
In reply to Ray JuiThe Broadcom Cygnus SoC is architected under the iProc architecture. It has the following PLLs: ARMPLL, GENPLL, LCPLL0, MIPIPLL, all dervied from an onboard crystal. Cygnus also has various ASIU clocks that are derived directly from the onboard crystal.
--- drivers/clk/bcm/Makefile | 1 + drivers/clk/bcm/clk-cygnus.c | 265 ++++++++++++++++++++++++++++++++ include/dt-bindings/clock/bcm-cygnus.h | 68 ++++++++ 3 files changed, 334 insertions(+) create mode 100644 drivers/clk/bcm/clk-cygnus.c create mode 100644 include/dt-bindings/clock/bcm-cygnus.h
drivers/clk/bcm/Makefile +1 -0
@@ -3,3 +3,4 @@ obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o obj-$(CONFIG_CLK_BCM_KONA) += clk-bcm281xx.o obj-$(CONFIG_CLK_BCM_KONA) += clk-bcm21664.o obj-$(CONFIG_COMMON_CLK_IPROC) += clk-iproc-armpll.o clk-iproc-pll.o clk-iproc-asiu.o +obj-$(CONFIG_ARCH_BCM_CYGNUS) += clk-cygnus.o
drivers/clk/bcm/clk-cygnus.c new file +265 -0
265 lines not on this page · raw message
include/dt-bindings/clock/bcm-cygnus.h new file +68 -0
68 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Ray Jui
maintainerPATCH v7 5/6 ARM: dts: enable clock support for Broadcom Cygnus
In reply to Ray JuiReplace current device tree dummy clocks with real clock support for Broadcom Cygnus SoC
--- arch/arm/boot/dts/bcm-cygnus-clock.dtsi | 89 +++++++++++++++++++++---------- 1 file changed, 61 insertions(+), 28 deletions(-)
arch/arm/boot/dts/bcm-cygnus-clock.dtsi +61 -28
@@ -36,56 +36,89 @@ clocks { ranges; osc: oscillator { + #clock-cells = <0>; compatible = "fixed-clock"; - #clock-cells = <1>; clock-frequency = <25000000>; }; - apb_clk: apb_clk { - compatible = "fixed-clock"; + /* Cygnus ARM PLL */ + armpll: armpll { #clock-cells = <0>; - clock-frequency = <1000000000>; + compatible = "brcm,cygnus-armpll"; + clocks = <&osc>; + reg = <0x19000000 0x1000>; }; - periph_clk: periph_clk { - compatible = "fixed-clock"; + /* peripheral clock for system timer */ + periph_clk: arm_periph_clk { #clock-cells = <0>; - clock-frequency = <500000000>; + compatible = "fixed-factor-clock"; + clocks = <&armpll>; + clock-div = <2>; + clock-mult = <1>; }; - sdio_clk: lcpll_ch2 { - compatible = "fixed-clock"; + /* APB bus clock */ + apb_clk: apb_clk { #clock-cells = <0>; - clock-frequency = <200000000>; + compatible = "fixed-factor-clock"; + clocks = <&armpll>; + clock-div = <4>; + clock-mult = <1>; }; - axi81_clk: axi81_clk { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <100000000>; + genpll: genpll { + #clock-cells = <1>; + compatible = "brcm,cygnus-genpll"; + reg = <0x0301d000 0x2c>, <0x0301c020 0x4>; + clocks = <&osc>; + clock-output-names = "genpll", "axi21", "250mhz", "ihost_sys", + "enet_sw", "audio_125", "can"; }; - keypad_clk: keypad_clk { - compatible = "fixed-clock"; + /* always 1/2 of the axi21 clock */ + axi41_clk: axi41_clk { #clock-cells = <0>; - clock-frequency = <31806>; + compatible = "fixed-factor-clock"; + clocks = <&genpll 1>; + clock-div = <2>; + clock-mult = <1>; }; - adc_clk: adc_clk { - compatible = "fixed-clock"; + /* always 1/4 of the axi21 clock */ + axi81_clk: axi81_clk { #clock-cells = <0>; - clock-frequency = <1562500>; + compatible = "fixed-factor-clock"; + clocks = <&genpll 1>; + clock-div = <4>; + clock-mult = <1>; }; - pwm_clk: pwm_clk { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <1000000>; + lcpll0: lcpll0 { + #clock-cells = <1>; + compatible = "brcm,cygnus-lcpll0"; + reg = <0x0301d02c 0x1c>, <0x0301c020 0x4>; + clocks = <&osc>; + clock-output-names = "lcpll0", "pcie_phy", "ddr_phy", "sdio", + "usb_phy", "smart_card", "ch5"; }; - lcd_clk: mipipll_ch1 { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <100000000>; + mipipll: mipipll { + #clock-cells = <1>; + compatible = "brcm,cygnus-mipipll"; + reg = <0x180a9800 0x2c>, <0x0301c020 0x4>, <0x180aa024 0x4>; + clocks = <&osc>; + clock-output-names = "mipipll", "ch0_unused", "ch1_lcd", + "ch2_v3d", "ch3_unused", "ch4_unused", + "ch5_unused"; + }; + + asiu_clks: asiu_clks { + #clock-cells = <1>; + compatible = "brcm,cygnus-asiu-clk"; + reg = <0x0301d048 0xc>, <0x180aa024 0x4>; + + clocks = <&osc>; + clock-output-names = "keypad", "adc/touch", "pwm"; }; };
Signature · 1 line
1.7.9.5
PATCH v7 5/6 ARM: dts: enable clock support for Broadcom Cygnus
Quoting Ray Jui (2015-05-05 11:13:22)
Quoted 5 lines
Replace current device tree dummy clocks with real clock support for Broadcom Cygnus SoC
Signed-off-by Ray Jui <[email protected]>Reviewed-by Scott Branden <[email protected]>
Patches 1-4 & 6 are applied to clk-next. You can add my Ack to this patch:
arm-soc guys,
Any chance you can pick this up? Alternatively I can take it through the clk tree with an Ack.
Regards,
Mike
Quoted 129 lines
--- arch/arm/boot/dts/bcm-cygnus-clock.dtsi | 89 +++++++++++++++++++++---------- 1 file changed, 61 insertions(+), 28 deletions(-)arch/arm/boot/dts/bcm-cygnus-clock.dtsi +61
-28@@ -36,56 +36,89 @@ clocks { ranges; osc: oscillator { + #clock-cells = <0>; compatible = "fixed-clock"; - #clock-cells = <1>; clock-frequency = <25000000>; }; - apb_clk: apb_clk { - compatible = "fixed-clock"; + /* Cygnus ARM PLL */ + armpll: armpll { #clock-cells = <0>; - clock-frequency = <1000000000>; + compatible = "brcm,cygnus-armpll"; + clocks = <&osc>; + reg = <0x19000000 0x1000>; }; - periph_clk: periph_clk { - compatible = "fixed-clock"; + /* peripheral clock for system timer */ + periph_clk: arm_periph_clk { #clock-cells = <0>; - clock-frequency = <500000000>; + compatible = "fixed-factor-clock"; + clocks = <&armpll>; + clock-div = <2>; + clock-mult = <1>; }; - sdio_clk: lcpll_ch2 { - compatible = "fixed-clock"; + /* APB bus clock */ + apb_clk: apb_clk { #clock-cells = <0>; - clock-frequency = <200000000>; + compatible = "fixed-factor-clock"; + clocks = <&armpll>; + clock-div = <4>; + clock-mult = <1>; }; - axi81_clk: axi81_clk { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <100000000>; + genpll: genpll { + #clock-cells = <1>; + compatible = "brcm,cygnus-genpll"; + reg = <0x0301d000 0x2c>, <0x0301c020 0x4>; + clocks = <&osc>; + clock-output-names = "genpll", "axi21", "250mhz", "ihost_sys", + "enet_sw", "audio_125", "can"; }; - keypad_clk: keypad_clk { - compatible = "fixed-clock"; + /* always 1/2 of the axi21 clock */ + axi41_clk: axi41_clk { #clock-cells = <0>; - clock-frequency = <31806>; + compatible = "fixed-factor-clock"; + clocks = <&genpll 1>; + clock-div = <2>; + clock-mult = <1>; }; - adc_clk: adc_clk { - compatible = "fixed-clock"; + /* always 1/4 of the axi21 clock */ + axi81_clk: axi81_clk { #clock-cells = <0>; - clock-frequency = <1562500>; + compatible = "fixed-factor-clock"; + clocks = <&genpll 1>; + clock-div = <4>; + clock-mult = <1>; }; - pwm_clk: pwm_clk { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <1000000>; + lcpll0: lcpll0 { + #clock-cells = <1>; + compatible = "brcm,cygnus-lcpll0"; + reg = <0x0301d02c 0x1c>, <0x0301c020 0x4>; + clocks = <&osc>; + clock-output-names = "lcpll0", "pcie_phy", "ddr_phy", "sdio", + "usb_phy", "smart_card", "ch5"; }; - lcd_clk: mipipll_ch1 { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <100000000>; + mipipll: mipipll { + #clock-cells = <1>; + compatible = "brcm,cygnus-mipipll"; + reg = <0x180a9800 0x2c>, <0x0301c020 0x4>, <0x180aa024 0x4>; + clocks = <&osc>; + clock-output-names = "mipipll", "ch0_unused", "ch1_lcd", + "ch2_v3d", "ch3_unused", "ch4_unused", + "ch5_unused"; + }; + + asiu_clks: asiu_clks { + #clock-cells = <1>; + compatible = "brcm,cygnus-asiu-clk"; + reg = <0x0301d048 0xc>, <0x180aa024 0x4>; + + clocks = <&osc>; + clock-output-names = "keypad", "adc/touch", "pwm"; }; };Signature · 1 line
1.7.9.5
Florian Fainelli
AppliedPATCH v7 5/6 ARM: dts: enable clock support for Broadcom Cygnus
Quoted 10 lines · Michael Turquette
Quoting Ray Jui (2015-05-05 11:13:22)
Quoted 5 lines
Replace current device tree dummy clocks with real clock support for Broadcom Cygnus SoC
Signed-off-by Ray Jui <[email protected]>Reviewed-by Scott Branden <[email protected]>Patches 1-4 & 6 are applied to clk-next. You can add my Ack to this patch:
Quoted 6 lines
arm-soc guys,
Any chance you can pick this up? Alternatively I can take it through the clk tree with an Ack.
Applied to devicetree/next, thanks!
Signature · 1 line
Florian
Ray Jui
maintainerPATCH v7 6/6 clk: cygnus: remove Cygnus dummy clock binding
In reply to Ray JuiRemove old Cygnus dummy clock binding document, as it's replaced by Documentation/devicetree/bindings/clock/brcm,iproc-clocks.txt
--- .../devicetree/bindings/clock/bcm-cygnus-clock.txt | 34 -------------------- 1 file changed, 34 deletions(-) delete mode 100644 Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt
Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt deleted +0 -34
@@ -1,34 +0,0 @@ -Broadcom Cygnus Clocks - -This binding uses the common clock binding: -Documentation/devicetree/bindings/clock/clock-bindings.txt - -Currently various "fixed" clocks are declared for peripheral drivers that use -the common clock framework to reference their core clocks. Proper support of -these clocks will be added later - -Device tree example: - - clocks { - #address-cells = <1>; - #size-cells = <1>; - ranges; - - osc: oscillator { - compatible = "fixed-clock"; - #clock-cells = <1>; - clock-frequency = <25000000>; - }; - - apb_clk: apb_clk { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <1000000000>; - }; - - periph_clk: periph_clk { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <500000000>; - }; - };
Signature · 1 line
1.7.9.5
Ray Jui
maintainerHi Mike,
Have you had a chance to review the iProc clock patches? If possible, I'd like to get feedback from you as early as possible so I can make changes if required. It would be really nice if we can get the iProc clock patches going into v4.2.
A lot of our iProc drivers depend on these clock patches.
Thanks,
Ray
Quoted 83 lines · Ray Jui
This patchset contains the initial common clock support for Broadcom's iProc family of SoCs. The iProc clock architecture comprises of various PLLs, e.g., ARMPLL, GENPLL, LCPLL0, MIPIPLL, and etc. An onboard crystal serves as the basic reference clock for these PLLs. Each PLL may have several leaf clocks. One special group of clocks is the ASIU clocks, which are dervied directly from the crystal reference clock.
This patchset also contains the basic clock support for the Broadcom Cygnus SoC, which implements the iProc clock architecture
Changes from v6:
- Rebase to v4.1-rc2
- Consolidate iProc PLL and its leaf clocks into a single device node, based on feedback from Mike Turquette. The PLL and its leaf clocks are now exposed a clock consumer through indices of the same device node phandle
- Update iProc device tree binding document based on the above change
- Add SW override support to iProc PLL clocksChanges from v5:
- Rebase to v4.0-rc4
- Dropof_clk_get_parent_ratehelper function from the clock framework
- Get rid of custom "clock-frequency" support in iProc PLL code. Instead, add standard clockset_rateandround_ratesupport and make use of DT properties "assigned-clocks" and "assigned-clock-rates" to initialize PLL to the desired rate when registering to the clock framework
- Add SW workaround for ASIC bug on MIPI PLL to always read back the same register following a write transaction, to ensure value is written to the correct registerChanges from v4:
- Addof_clk_get_parent_ratehelper function into the clock framework
- Switch to useof_clk_get_parent_ratein the iProc PLL clock driverChanges from v3:
- Fix incorrect use of passing inof_clk_src_onecell_getwhen adding ARM PLL and other iProc PLLs as clock provider. These PLLs have zero cells in DT and theforeof_clk_src_simple_getshould be used instead
- Rename Cygnus MIPI PLL Channel 2 clock fromBCM_CYGNUS_MIPIPLL_CH2_UNUSEDtoBCM_CYGNUS_MIPIPLL_CH2_V3D, since a 3D graphic rendering engine has been integrated into Cygnus revision B0 and has its core clock running off MIPI PLL Channel 2
- Changed default MIPI PLL VCO frequency from 1.75 GHz to 2.1 GHz. This allows us to derive 300 MHz V3D clock from channel 2 through the post divisorChanges from v2:
- Re-arrange Cygnus clock/pll init functions so each init function is right next to its clock table
- Removed #defines for number of clocks in Cygnus. Have the number of clocks automatically determined based on array size of the clock tableChanges from v1:
- Separatedrivers/clk/Makefilechange fordrivers/clk/bcmout to a standalone patchRay Jui (6):
clk: iproc: define Broadcom iProc clock binding
clk: iproc: add initial common clock support
clk: Change bcm clocks build dependency
clk: cygnus: add clock support for Broadcom Cygnus
ARM: dts: enable clock support for Broadcom Cygnus
clk: cygnus: remove Cygnus dummy clock binding.../devicetree/bindings/clock/bcm-cygnus-clock.txt | 34 - .../bindings/clock/brcm,iproc-clocks.txt | 132 ++++ arch/arm/boot/dts/bcm-cygnus-clock.dtsi | 89 ++- drivers/clk/Makefile | 2 +- drivers/clk/bcm/Kconfig | 9 + drivers/clk/bcm/Makefile | 2 + drivers/clk/bcm/clk-cygnus.c | 265 ++++++++ drivers/clk/bcm/clk-iproc-armpll.c | 282 ++++++++ drivers/clk/bcm/clk-iproc-asiu.c | 276 ++++++++ drivers/clk/bcm/clk-iproc-pll.c | 716 ++++++++++++++++++++ drivers/clk/bcm/clk-iproc.h | 178 +++++ include/dt-bindings/clock/bcm-cygnus.h | 68 ++ 12 files changed, 1990 insertions(+), 63 deletions(-) delete mode 100644 Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt create mode 100644 Documentation/devicetree/bindings/clock/brcm,iproc-clocks.txt create mode 100644 drivers/clk/bcm/clk-cygnus.c create mode 100644 drivers/clk/bcm/clk-iproc-armpll.c create mode 100644 drivers/clk/bcm/clk-iproc-asiu.c create mode 100644 drivers/clk/bcm/clk-iproc-pll.c create mode 100644 drivers/clk/bcm/clk-iproc.h create mode 100644 include/dt-bindings/clock/bcm-cygnus.h
Quoted 8 lines · Ray Jui
Hi Mike,
Have you had a chance to review the iProc clock patches? If possible, I'd like to get feedback from you as early as possible so I can make changes if required. It would be really nice if we can get the iProc clock patches going into v4.2.
A lot of our iProc drivers depend on these clock patches.
I would like to take patch 5 (DTS changes) and submit a pull request including it shortly, please let me know if there are additional binding changes that would mandate a new version of this patchset, thanks!
Quoted 89 lines
Thanks,
Ray
Quoted 83 lines · Ray Jui
This patchset contains the initial common clock support for Broadcom's iProc family of SoCs. The iProc clock architecture comprises of various PLLs, e.g., ARMPLL, GENPLL, LCPLL0, MIPIPLL, and etc. An onboard crystal serves as the basic reference clock for these PLLs. Each PLL may have several leaf clocks. One special group of clocks is the ASIU clocks, which are dervied directly from the crystal reference clock.
This patchset also contains the basic clock support for the Broadcom Cygnus SoC, which implements the iProc clock architecture
Changes from v6:
- Rebase to v4.1-rc2
- Consolidate iProc PLL and its leaf clocks into a single device node, based on feedback from Mike Turquette. The PLL and its leaf clocks are now exposed a clock consumer through indices of the same device node phandle
- Update iProc device tree binding document based on the above change
- Add SW override support to iProc PLL clocksChanges from v5:
- Rebase to v4.0-rc4
- Dropof_clk_get_parent_ratehelper function from the clock framework
- Get rid of custom "clock-frequency" support in iProc PLL code. Instead, add standard clockset_rateandround_ratesupport and make use of DT properties "assigned-clocks" and "assigned-clock-rates" to initialize PLL to the desired rate when registering to the clock framework
- Add SW workaround for ASIC bug on MIPI PLL to always read back the same register following a write transaction, to ensure value is written to the correct registerChanges from v4:
- Addof_clk_get_parent_ratehelper function into the clock framework
- Switch to useof_clk_get_parent_ratein the iProc PLL clock driverChanges from v3:
- Fix incorrect use of passing inof_clk_src_onecell_getwhen adding ARM PLL and other iProc PLLs as clock provider. These PLLs have zero cells in DT and theforeof_clk_src_simple_getshould be used instead
- Rename Cygnus MIPI PLL Channel 2 clock fromBCM_CYGNUS_MIPIPLL_CH2_UNUSEDtoBCM_CYGNUS_MIPIPLL_CH2_V3D, since a 3D graphic rendering engine has been integrated into Cygnus revision B0 and has its core clock running off MIPI PLL Channel 2
- Changed default MIPI PLL VCO frequency from 1.75 GHz to 2.1 GHz. This allows us to derive 300 MHz V3D clock from channel 2 through the post divisorChanges from v2:
- Re-arrange Cygnus clock/pll init functions so each init function is right next to its clock table
- Removed #defines for number of clocks in Cygnus. Have the number of clocks automatically determined based on array size of the clock tableChanges from v1:
- Separatedrivers/clk/Makefilechange fordrivers/clk/bcmout to a standalone patchRay Jui (6):
clk: iproc: define Broadcom iProc clock binding
clk: iproc: add initial common clock support
clk: Change bcm clocks build dependency
clk: cygnus: add clock support for Broadcom Cygnus
ARM: dts: enable clock support for Broadcom Cygnus
clk: cygnus: remove Cygnus dummy clock binding.../devicetree/bindings/clock/bcm-cygnus-clock.txt | 34 - .../bindings/clock/brcm,iproc-clocks.txt | 132 ++++ arch/arm/boot/dts/bcm-cygnus-clock.dtsi | 89 ++- drivers/clk/Makefile | 2 +- drivers/clk/bcm/Kconfig | 9 + drivers/clk/bcm/Makefile | 2 + drivers/clk/bcm/clk-cygnus.c | 265 ++++++++ drivers/clk/bcm/clk-iproc-armpll.c | 282 ++++++++ drivers/clk/bcm/clk-iproc-asiu.c | 276 ++++++++ drivers/clk/bcm/clk-iproc-pll.c | 716 ++++++++++++++++++++ drivers/clk/bcm/clk-iproc.h | 178 +++++ include/dt-bindings/clock/bcm-cygnus.h | 68 ++ 12 files changed, 1990 insertions(+), 63 deletions(-) delete mode 100644 Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt create mode 100644 Documentation/devicetree/bindings/clock/brcm,iproc-clocks.txt create mode 100644 drivers/clk/bcm/clk-cygnus.c create mode 100644 drivers/clk/bcm/clk-iproc-armpll.c create mode 100644 drivers/clk/bcm/clk-iproc-asiu.c create mode 100644 drivers/clk/bcm/clk-iproc-pll.c create mode 100644 drivers/clk/bcm/clk-iproc.h create mode 100644 include/dt-bindings/clock/bcm-cygnus.h
Signature · 1 line
Florian
Ray Jui
maintainerHi Mike/Stephen,
Ping. Do you think you will be able to review this patch set some time in the near future?
Thanks!
Ray
Quoted 97 lines · Ray Jui
Hi Mike,
Have you had a chance to review the iProc clock patches? If possible, I'd like to get feedback from you as early as possible so I can make changes if required. It would be really nice if we can get the iProc clock patches going into v4.2.
A lot of our iProc drivers depend on these clock patches.
Thanks,
Ray
Quoted 83 lines · Ray Jui
This patchset contains the initial common clock support for Broadcom's iProc family of SoCs. The iProc clock architecture comprises of various PLLs, e.g., ARMPLL, GENPLL, LCPLL0, MIPIPLL, and etc. An onboard crystal serves as the basic reference clock for these PLLs. Each PLL may have several leaf clocks. One special group of clocks is the ASIU clocks, which are dervied directly from the crystal reference clock.
This patchset also contains the basic clock support for the Broadcom Cygnus SoC, which implements the iProc clock architecture
Changes from v6:
- Rebase to v4.1-rc2
- Consolidate iProc PLL and its leaf clocks into a single device node, based on feedback from Mike Turquette. The PLL and its leaf clocks are now exposed a clock consumer through indices of the same device node phandle
- Update iProc device tree binding document based on the above change
- Add SW override support to iProc PLL clocksChanges from v5:
- Rebase to v4.0-rc4
- Dropof_clk_get_parent_ratehelper function from the clock framework
- Get rid of custom "clock-frequency" support in iProc PLL code. Instead, add standard clockset_rateandround_ratesupport and make use of DT properties "assigned-clocks" and "assigned-clock-rates" to initialize PLL to the desired rate when registering to the clock framework
- Add SW workaround for ASIC bug on MIPI PLL to always read back the same register following a write transaction, to ensure value is written to the correct registerChanges from v4:
- Addof_clk_get_parent_ratehelper function into the clock framework
- Switch to useof_clk_get_parent_ratein the iProc PLL clock driverChanges from v3:
- Fix incorrect use of passing inof_clk_src_onecell_getwhen adding ARM PLL and other iProc PLLs as clock provider. These PLLs have zero cells in DT and theforeof_clk_src_simple_getshould be used instead
- Rename Cygnus MIPI PLL Channel 2 clock fromBCM_CYGNUS_MIPIPLL_CH2_UNUSEDtoBCM_CYGNUS_MIPIPLL_CH2_V3D, since a 3D graphic rendering engine has been integrated into Cygnus revision B0 and has its core clock running off MIPI PLL Channel 2
- Changed default MIPI PLL VCO frequency from 1.75 GHz to 2.1 GHz. This allows us to derive 300 MHz V3D clock from channel 2 through the post divisorChanges from v2:
- Re-arrange Cygnus clock/pll init functions so each init function is right next to its clock table
- Removed #defines for number of clocks in Cygnus. Have the number of clocks automatically determined based on array size of the clock tableChanges from v1:
- Separatedrivers/clk/Makefilechange fordrivers/clk/bcmout to a standalone patchRay Jui (6):
clk: iproc: define Broadcom iProc clock binding
clk: iproc: add initial common clock support
clk: Change bcm clocks build dependency
clk: cygnus: add clock support for Broadcom Cygnus
ARM: dts: enable clock support for Broadcom Cygnus
clk: cygnus: remove Cygnus dummy clock binding.../devicetree/bindings/clock/bcm-cygnus-clock.txt | 34 - .../bindings/clock/brcm,iproc-clocks.txt | 132 ++++ arch/arm/boot/dts/bcm-cygnus-clock.dtsi | 89 ++- drivers/clk/Makefile | 2 +- drivers/clk/bcm/Kconfig | 9 + drivers/clk/bcm/Makefile | 2 + drivers/clk/bcm/clk-cygnus.c | 265 ++++++++ drivers/clk/bcm/clk-iproc-armpll.c | 282 ++++++++ drivers/clk/bcm/clk-iproc-asiu.c | 276 ++++++++ drivers/clk/bcm/clk-iproc-pll.c | 716 ++++++++++++++++++++ drivers/clk/bcm/clk-iproc.h | 178 +++++ include/dt-bindings/clock/bcm-cygnus.h | 68 ++ 12 files changed, 1990 insertions(+), 63 deletions(-) delete mode 100644 Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt create mode 100644 Documentation/devicetree/bindings/clock/brcm,iproc-clocks.txt create mode 100644 drivers/clk/bcm/clk-cygnus.c create mode 100644 drivers/clk/bcm/clk-iproc-armpll.c create mode 100644 drivers/clk/bcm/clk-iproc-asiu.c create mode 100644 drivers/clk/bcm/clk-iproc-pll.c create mode 100644 drivers/clk/bcm/clk-iproc.h create mode 100644 include/dt-bindings/clock/bcm-cygnus.h