Commit 6419945e authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull clk updates from Stephen Boyd:
 "This time we have a good set of changes to the core framework that do
  some general cleanups, but nothing too major. The majority of the diff
  goes to two SoCs, Actions Semi and Qualcomm. A brand new driver is
  introduced for Actions Semi so it takes up some lines to add all the
  different types, and the Qualcomm diff is there because we add support
  for two SoCs and it's quite a bit of data.

  Otherwise the big driver updates are on TI Davinci and Amlogic
  platforms. And then the long tail of driver updates for various fixes
  and stuff follows after that.

  Core:
   - debugfs cleanups removing error checking and an unused provider API
   - Removal of a clk init typedef that isn't used
   - Usage of match_string() to simplify parent string name matching
   - OF clk helpers moved to their own file (linux/of_clk.h)
   - Make clk warnings more readable across kernel versions

  New Drivers:
   - Qualcomm SDM845 GCC and Video clk controllers
   - Qualcomm MSM8998 GCC
   - Actions Semi S900 SoC support
   - Nuvoton npcm750 microcontroller clks
   - Amlogic axg AO clock controller

  Removed Drivers:
   - Deprecated Rockchip clk-gate driver

  Updates:
   - debugfs functions stopped checking return values
   - Support for the MSIOF module clocks on Rensas R-Car M3-N
   - Support for the new Rensas RZ/G1C and R-Car E3 SoCs
   - Qualcomm GDSC, RCG, and PLL updates for clk changes in new SoCs
   - Berlin and Amlogic SPDX tagging
   - Usage of of_clk_get_parent_count() in more places
   - Proper implementation of the CDEV1/2 clocks on Tegra20
   - Allwinner H6 PRCM clock support and R40 EMAC support
   - Add critical flag to meson8b's fdiv2 as temporary fixup for ethernet
   - Round closest support for meson's mpll driver
   - Support for meson8b nand clocks and gxbb video decoder clocks
   - Mediatek mali clks
   - STM32MP1 fixes
   - Uniphier LD11/LD20 stream demux system clock"

* tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (134 commits)
  clk: qcom: Export clk_fabia_pll_configure()
  clk: bcm: Update and add Stingray clock entries
  dt-bindings: clk: Update Stingray binding doc
  clk-si544: Properly round requested frequency to nearest match
  clk: ingenic: jz4770: Add 150us delay after enabling VPU clock
  clk: ingenic: jz4770: Enable power of AHB1 bus after ungating VPU clock
  clk: ingenic: jz4770: Modify C1CLK clock to disable CPU clock stop on idle
  clk: ingenic: jz4770: Change OTG from custom to standard gated clock
  clk: ingenic: Support specifying "wait for clock stable" delay
  clk: ingenic: Add support for clocks whose gate bit is inverted
  clk: use match_string() helper
  clk: bcm2835: use match_string() helper
  clk: Return void from debug_init op
  clk: remove clk_debugfs_add_file()
  clk: tegra: no need to check return value of debugfs_create functions
  clk: davinci: no need to check return value of debugfs_create functions
  clk: bcm2835: no need to check return value of debugfs_create functions
  clk: no need to check return value of debugfs_create functions
  clk: imx6: add EPIT clock support
  clk: mvebu: use correct bit for 98DX3236 NAND
  ...
parents d60dafdc 55913c2d
Loading
Loading
Loading
Loading
+30 −0
Original line number Original line Diff line number Diff line
MediaTek g3dsys controller
============================

The MediaTek g3dsys controller provides various clocks and reset controller to
the GPU.

Required Properties:

- compatible: Should be:
	- "mediatek,mt2701-g3dsys", "syscon":
		for MT2701 SoC
	- "mediatek,mt7623-g3dsys", "mediatek,mt2701-g3dsys", "syscon":
		for MT7623 SoC
- #clock-cells: Must be 1
- #reset-cells: Must be 1

The g3dsys controller uses the common clk binding from
Documentation/devicetree/bindings/clock/clock-bindings.txt
The available clocks are defined in dt-bindings/clock/mt*-clk.h.

Example:

g3dsys: clock-controller@13000000 {
	compatible = "mediatek,mt7623-g3dsys",
		     "mediatek,mt2701-g3dsys",
		     "syscon";
	reg = <0 0x13000000 0 0x200>;
	#clock-cells = <1>;
	#reset-cells = <1>;
};
+47 −0
Original line number Original line Diff line number Diff line
* Actions S900 Clock Management Unit (CMU)

The Actions S900 clock management unit generates and supplies clock to various
controllers within the SoC. The clock binding described here is applicable to
S900 SoC.

Required Properties:

- compatible: should be "actions,s900-cmu"
- reg: physical base address of the controller and length of memory mapped
  region.
- clocks: Reference to the parent clocks ("hosc", "losc")
- #clock-cells: should be 1.

Each clock is assigned an identifier, and client nodes can use this identifier
to specify the clock which they consume.

All available clocks are defined as preprocessor macros in
dt-bindings/clock/actions,s900-cmu.h header and can be used in device
tree sources.

External clocks:

The hosc clock used as input for the plls is generated outside the SoC. It is
expected that it is defined using standard clock bindings as "hosc".

Actions S900 CMU also requires one more clock:
 - "losc" - internal low frequency oscillator

Example: Clock Management Unit node:

        cmu: clock-controller@e0160000 {
                compatible = "actions,s900-cmu";
                reg = <0x0 0xe0160000 0x0 0x1000>;
                clocks = <&hosc>, <&losc>;
                #clock-cells = <1>;
        };

Example: UART controller node that consumes clock generated by the clock
management unit:

        uart: serial@e012a000 {
                compatible = "actions,s900-uart", "actions,owl-uart";
                reg = <0x0 0xe012a000 0x0 0x2000>;
                interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&cmu CLK_UART5>;
        };
+1 −0
Original line number Original line Diff line number Diff line
@@ -9,6 +9,7 @@ Required Properties:
	- GXBB (S905) : "amlogic,meson-gxbb-aoclkc"
	- GXBB (S905) : "amlogic,meson-gxbb-aoclkc"
	- GXL (S905X, S905D) : "amlogic,meson-gxl-aoclkc"
	- GXL (S905X, S905D) : "amlogic,meson-gxl-aoclkc"
	- GXM (S912) : "amlogic,meson-gxm-aoclkc"
	- GXM (S912) : "amlogic,meson-gxm-aoclkc"
	- AXG (A113D, A113X) : "amlogic,meson-axg-aoclkc"
	followed by the common "amlogic,meson-gx-aoclkc"
	followed by the common "amlogic,meson-gx-aoclkc"


- #clock-cells: should be 1.
- #clock-cells: should be 1.
+14 −12
Original line number Original line Diff line number Diff line
@@ -276,36 +276,38 @@ These clock IDs are defined in:
    clk_ts_500_ref	genpll2		2	BCM_SR_GENPLL2_TS_500_REF_CLK
    clk_ts_500_ref	genpll2		2	BCM_SR_GENPLL2_TS_500_REF_CLK
    clk_125_nitro	genpll2		3	BCM_SR_GENPLL2_125_NITRO_CLK
    clk_125_nitro	genpll2		3	BCM_SR_GENPLL2_125_NITRO_CLK
    clk_chimp		genpll2		4	BCM_SR_GENPLL2_CHIMP_CLK
    clk_chimp		genpll2		4	BCM_SR_GENPLL2_CHIMP_CLK
    clk_nic_flash	genpll2		5	BCM_SR_GENPLL2_NIC_FLASH
    clk_nic_flash	genpll2		5	BCM_SR_GENPLL2_NIC_FLASH_CLK
    clk_fs		genpll2		6	BCM_SR_GENPLL2_FS_CLK


    genpll3		crystal		0	BCM_SR_GENPLL3
    genpll3		crystal		0	BCM_SR_GENPLL3
    clk_hsls		genpll3		1	BCM_SR_GENPLL3_HSLS_CLK
    clk_hsls		genpll3		1	BCM_SR_GENPLL3_HSLS_CLK
    clk_sdio		genpll3		2	BCM_SR_GENPLL3_SDIO_CLK
    clk_sdio		genpll3		2	BCM_SR_GENPLL3_SDIO_CLK


    genpll4		crystal		0	BCM_SR_GENPLL4
    genpll4		crystal		0	BCM_SR_GENPLL4
    ccn			genpll4		1	BCM_SR_GENPLL4_CCN_CLK
    clk_ccn		genpll4		1	BCM_SR_GENPLL4_CCN_CLK
    clk_tpiu_pll	genpll4		2	BCM_SR_GENPLL4_TPIU_PLL_CLK
    clk_tpiu_pll	genpll4		2	BCM_SR_GENPLL4_TPIU_PLL_CLK
    noc_clk		genpll4		3	BCM_SR_GENPLL4_NOC_CLK
    clk_noc		genpll4		3	BCM_SR_GENPLL4_NOC_CLK
    clk_chclk_fs4	genpll4		4	BCM_SR_GENPLL4_CHCLK_FS4_CLK
    clk_chclk_fs4	genpll4		4	BCM_SR_GENPLL4_CHCLK_FS4_CLK
    clk_bridge_fscpu	genpll4		5	BCM_SR_GENPLL4_BRIDGE_FSCPU_CLK
    clk_bridge_fscpu	genpll4		5	BCM_SR_GENPLL4_BRIDGE_FSCPU_CLK



    genpll5		crystal		0	BCM_SR_GENPLL5
    genpll5		crystal		0	BCM_SR_GENPLL5
    fs4_hf_clk		genpll5		1	BCM_SR_GENPLL5_FS4_HF_CLK
    clk_fs4_hf		genpll5		1	BCM_SR_GENPLL5_FS4_HF_CLK
    crypto_ae_clk	genpll5		2	BCM_SR_GENPLL5_CRYPTO_AE_CLK
    clk_crypto_ae	genpll5		2	BCM_SR_GENPLL5_CRYPTO_AE_CLK
    raid_ae_clk		genpll5		3	BCM_SR_GENPLL5_RAID_AE_CLK
    clk_raid_ae		genpll5		3	BCM_SR_GENPLL5_RAID_AE_CLK


    genpll6		crystal		0	BCM_SR_GENPLL6
    genpll6		crystal		0	BCM_SR_GENPLL6
    48_usb		genpll6		1	BCM_SR_GENPLL6_48_USB_CLK
    clk_48_usb		genpll6		1	BCM_SR_GENPLL6_48_USB_CLK


    lcpll0		crystal		0	BCM_SR_LCPLL0
    lcpll0		crystal		0	BCM_SR_LCPLL0
    clk_sata_refp 	lcpll0		1	BCM_SR_LCPLL0_SATA_REFP_CLK
    clk_sata_refp 	lcpll0		1	BCM_SR_LCPLL0_SATA_REFP_CLK
    clk_sata_refn	lcpll0		2	BCM_SR_LCPLL0_SATA_REFN_CLK
    clk_sata_refn	lcpll0		2	BCM_SR_LCPLL0_SATA_REFN_CLK
    clk_usb_ref		lcpll0		3	BCM_SR_LCPLL0_USB_REF_CLK
    clk_sata_350	lcpll0		3	BCM_SR_LCPLL0_SATA_350_CLK
    sata_refpn		lcpll0		3	BCM_SR_LCPLL0_SATA_REFPN_CLK
    clk_sata_500	lcpll0		4	BCM_SR_LCPLL0_SATA_500_CLK


    lcpll1		crystal		0	BCM_SR_LCPLL1
    lcpll1		crystal		0	BCM_SR_LCPLL1
    wan 		lcpll1		1	BCM_SR_LCPLL0_WAN_CLK
    clk_wan		lcpll1		1	BCM_SR_LCPLL1_WAN_CLK
    clk_usb_ref		lcpll1		2	BCM_SR_LCPLL1_USB_REF_CLK
    clk_crmu_ts		lcpll1		3	BCM_SR_LCPLL1_CRMU_TS_CLK


    lcpll_pcie		crystal		0	BCM_SR_LCPLL_PCIE
    lcpll_pcie		crystal		0	BCM_SR_LCPLL_PCIE
    pcie_phy_ref 	lcpll1		1	BCM_SR_LCPLL_PCIE_PHY_REF_CLK
    clk_pcie_phy_ref	lcpll1		1	BCM_SR_LCPLL_PCIE_PHY_REF_CLK
+100 −0
Original line number Original line Diff line number Diff line
* Nuvoton NPCM7XX Clock Controller

Nuvoton Poleg BMC NPCM7XX contains an integrated clock controller, which
generates and supplies clocks to all modules within the BMC.

External clocks:

There are six fixed clocks that are generated outside the BMC. All clocks are of
a known fixed value that cannot be changed. clk_refclk, clk_mcbypck and
clk_sysbypck are inputs to the clock controller.
clk_rg1refck, clk_rg2refck and clk_xin are external clocks suppling the
network. They are set on the device tree, but not used by the clock module. The
network devices use them directly.
Example can be found below.

All available clocks are defined as preprocessor macros in:
dt-bindings/clock/nuvoton,npcm7xx-clock.h
and can be reused as DT sources.

Required Properties of clock controller:

	- compatible: "nuvoton,npcm750-clk" : for clock controller of Nuvoton
		  Poleg BMC NPCM750

	- reg: physical base address of the clock controller and length of
		memory mapped region.

	- #clock-cells: should be 1.

Example: Clock controller node:

	clk: clock-controller@f0801000 {
		compatible = "nuvoton,npcm750-clk";
		#clock-cells = <1>;
		reg = <0xf0801000 0x1000>;
		clock-names = "refclk", "sysbypck", "mcbypck";
		clocks = <&clk_refclk>, <&clk_sysbypck>, <&clk_mcbypck>;
	};

Example: Required external clocks for network:

	/* external reference clock */
	clk_refclk: clk-refclk {
		compatible = "fixed-clock";
		#clock-cells = <0>;
		clock-frequency = <25000000>;
		clock-output-names = "refclk";
	};

	/* external reference clock for cpu. float in normal operation */
	clk_sysbypck: clk-sysbypck {
		compatible = "fixed-clock";
		#clock-cells = <0>;
		clock-frequency = <800000000>;
		clock-output-names = "sysbypck";
	};

	/* external reference clock for MC. float in normal operation */
	clk_mcbypck: clk-mcbypck {
		compatible = "fixed-clock";
		#clock-cells = <0>;
		clock-frequency = <800000000>;
		clock-output-names = "mcbypck";
	};

	 /* external clock signal rg1refck, supplied by the phy */
	clk_rg1refck: clk-rg1refck {
		compatible = "fixed-clock";
		#clock-cells = <0>;
		clock-frequency = <125000000>;
		clock-output-names = "clk_rg1refck";
	};

	 /* external clock signal rg2refck, supplied by the phy */
	clk_rg2refck: clk-rg2refck {
		compatible = "fixed-clock";
		#clock-cells = <0>;
		clock-frequency = <125000000>;
		clock-output-names = "clk_rg2refck";
	};

	clk_xin: clk-xin {
		compatible = "fixed-clock";
		#clock-cells = <0>;
		clock-frequency = <50000000>;
		clock-output-names = "clk_xin";
	};


Example: GMAC controller node that consumes two clocks: a generated clk by the
clock controller and a fixed clock from DT (clk_rg1refck).

	ethernet0: ethernet@f0802000 {
		compatible = "snps,dwmac";
		reg = <0xf0802000 0x2000>;
		interrupts = <0 14 4>;
		interrupt-names = "macirq";
		clocks	= <&clk_rg1refck>, <&clk NPCM7XX_CLK_AHB>;
		clock-names = "stmmaceth", "clk_gmac";
	};
Loading