Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 872e47f7 authored by Stephen Boyd's avatar Stephen Boyd
Browse files

Merge branches 'clk-qcom-rpmh', 'clk-npcm7xx', 'clk-of-parent-count' and...

Merge branches 'clk-qcom-rpmh', 'clk-npcm7xx', 'clk-of-parent-count' and 'clk-qcom-rcg-fix' into clk-next

* clk-qcom-rpmh:
  dt-bindings: clock: Introduce QCOM RPMh clock bindings

* clk-npcm7xx:
  clk: npcm7xx: fix return value check in npcm7xx_clk_init()
  clk: npcm7xx: add clock controller
  dt-binding: clk: npcm750: Add binding for Nuvoton NPCM7XX Clock

* clk-of-parent-count:
  pinctrl: sunxi: Use of_clk_get_parent_count() instead of open coding
  soc/tegra: pmc: Use of_clk_get_parent_count() instead of open coding
  soc: rockchip: power-domain: Use of_clk_get_parent_count() instead of open coding
  ARM: timer-sp: Use of_clk_get_parent_count() instead of open coding
  clk: Extract OF clock helpers in <linux/of_clk.h>

* clk-qcom-rcg-fix:
  clk: qcom: Base rcg parent rate off plan frequency
Loading
Loading
Loading
Loading
+100 −0
Original line number 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";
	};
+22 −0
Original line number Diff line number Diff line
Qualcomm Technologies, Inc. RPMh Clocks
-------------------------------------------------------

Resource Power Manager Hardened (RPMh) manages shared resources on
some Qualcomm Technologies Inc. SoCs. It accepts clock requests from
other hardware subsystems via RSC to control clocks.

Required properties :
- compatible : shall contain "qcom,sdm845-rpmh-clk"

- #clock-cells : must contain 1

Example :

#include <dt-bindings/clock/qcom,rpmh.h>

	&apps_rsc {
		rpmhcc: clock-controller {
			compatible = "qcom,sdm845-rpmh-clk";
			#clock-cells = <1>;
		};
	};
+1 −0
Original line number Diff line number Diff line
@@ -3556,6 +3556,7 @@ F: drivers/clk/
X:	drivers/clk/clkdev.c
F:	include/linux/clk-pr*
F:	include/linux/clk/
F:	include/linux/of_clk.h

COMMON INTERNET FILE SYSTEM (CIFS)
M:	Steve French <sfrench@samba.org>
+1 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ obj-$(CONFIG_CLK_HSDK) += clk-hsdk-pll.o
obj-$(CONFIG_COMMON_CLK_MAX77686)	+= clk-max77686.o
obj-$(CONFIG_ARCH_MOXART)		+= clk-moxart.o
obj-$(CONFIG_ARCH_NOMADIK)		+= clk-nomadik.o
obj-$(CONFIG_ARCH_NPCM7XX)	    	+= clk-npcm7xx.o
obj-$(CONFIG_ARCH_NSPIRE)		+= clk-nspire.o
obj-$(CONFIG_COMMON_CLK_OXNAS)		+= clk-oxnas.o
obj-$(CONFIG_COMMON_CLK_PALMAS)		+= clk-palmas.o
+656 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading