Skip to contentSkip to conversation

dt-bindings: documentation: add clock bindings information for Stratix10

PATCH Superseded Dinh Nguyen 2 participants 6 messages Feb 5, 2018 – Feb 12, 2018

Subsystems (4)

v3 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

Dinh Nguyen

author maintainer
#0 lore raw

PATCH v3 1/3 dt-bindings: documentation: add clock bindings information for Stratix10

Document that Stratix10 clock bindings, and add the clock header file. The clock header is an enumeration of all the different clocks on the Stratix10 platform.

---
v3:
- s/intc/intel for correct vendor prefix
- fixup node name to "intel,stratix10-clkmgr"
- document the required fixed-clock for oscillators v2:
- use a single binding for the clock controller

---
 .../devicetree/bindings/clock/intc_stratix10.txt   | 47 ++++++++++++
 include/dt-bindings/clock/stratix10-clock.h        | 85 ++++++++++++++++++++++
 2 files changed, 132 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/intc_stratix10.txt
 create mode 100644 include/dt-bindings/clock/stratix10-clock.h
Documentation/devicetree/bindings/clock/intc_stratix10.txt new file +47 -0
new file mode 100644
index 0000000..8d218f4
@@ -0,0 +1,47 @@
+Device Tree Clock bindings for Intel's SoCFPGA Stratix10 platform
+
+This binding uses the common clock binding[1].
+
+[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
+
+Required properties:
+- compatible : shall be
+	"intel,stratix10-clkmgr"
+
+- reg : shall be the control register offset from CLOCK_MANAGER's base for the clock.
+
+- #clock-cells : from common clock binding, shall be set to 1.
+
+- clocks : Should contain fixed-clock sources, such as oscillators.
+
+Example:
+	clkmgr: clock-controller at ffd10000 {
+		compatible = "intel,stratix10-clkmgr";
+		reg = <0xffd10000 0x1000>;
+		#clock-cells = <1>;
+
+		clocks {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			cb_intosc_hs_div2_clk: cb_intosc_hs_div2_clk {
+				#clock-cells = <0>;
+				compatible = "fixed-clock";
+			};
+
+			cb_intosc_ls_clk: cb_intosc_ls_clk {
+				#clock-cells = <0>;
+				compatible = "fixed-clock";
+			};
+
+			f2s_free_clk: f2s_free_clk {
+				#clock-cells = <0>;
+				compatible = "fixed-clock";
+			};
+
+			osc1: osc1 {
+				#clock-cells = <0>;
+				compatible = "fixed-clock";
+			};
+		};
+	};
include/dt-bindings/clock/stratix10-clock.h new file +85 -0

85 lines not on this page · raw message

Signature · 1 line
2.7.4
author maintainer
#1 lore raw

PATCH v3 2/3 arm64: dts: stratix10: use clock bindings for the Stratix10 platform

Use the clock bindings for the Stratix10 SoC. This includes changing the old binding of "intc,clk-s10-mgr" to "intel,stratix10-clkmgr". The reason that this can be done is that there are currently no clock driver for Stratix10, thus there are no consumers of the old binding. So changing the binding will not break any legacy code.

---
v3:
- use the correct vendor prefix
- explain the binding change
v2:
- use a single clock binding for the clock controller

---
 arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi  | 50 +++++++++++++++++++++-
 .../boot/dts/altera/socfpga_stratix10_socdk.dts    | 10 +++++
 2 files changed, 58 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi +48 -2
index c89d0c30..b472352 100644
@@ -17,6 +17,7 @@
 /dts-v1/;
 #include <dt-bindings/reset/altr,rst-mgr-s10.h>
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/clock/stratix10-clock.h>
 
 / {
 	compatible = "altr,socfpga-stratix10";
@@ -92,9 +93,35 @@
 		interrupt-parent = <&intc>;
 		ranges = <0 0 0 0xffffffff>;
 
-		clkmgr at ffd1000 {
-			compatible = "altr,clk-mgr";
+		clkmgr: clock-controller at ffd10000 {
+			compatible = "intel,stratix10-clkmgr";
 			reg = <0xffd10000 0x1000>;
+			#clock-cells = <1>;
+
+			clocks {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				cb_intosc_hs_div2_clk: cb_intosc_hs_div2_clk {
+					#clock-cells = <0>;
+					compatible = "fixed-clock";
+				};
+
+				cb_intosc_ls_clk: cb_intosc_ls_clk {
+					#clock-cells = <0>;
+					compatible = "fixed-clock";
+				};
+
+				f2s_free_clk: f2s_free_clk {
+					#clock-cells = <0>;
+					compatible = "fixed-clock";
+				};
+
+				osc1: osc1 {
+					#clock-cells = <0>;
+					compatible = "fixed-clock";
+				};
+			};
 		};
 
 		gmac0: ethernet at ff800000 {
@@ -105,6 +132,8 @@
 			mac-address = [00 00 00 00 00 00];
 			resets = <&rst EMAC0_RESET>;
 			reset-names = "stmmaceth";
+			clocks = <&clkmgr STRATIX10_EMAC0_CLK>;
+			clock-names = "stmmaceth";
 			status = "disabled";
 		};
 
@@ -116,6 +145,8 @@
 			mac-address = [00 00 00 00 00 00];
 			resets = <&rst EMAC1_RESET>;
 			reset-names = "stmmaceth";
+			clocks = <&clkmgr STRATIX10_EMAC1_CLK>;
+			clock-names = "stmmaceth";
 			status = "disabled";
 		};
 
@@ -127,6 +158,8 @@
 			mac-address = [00 00 00 00 00 00];
 			resets = <&rst EMAC2_RESET>;
 			reset-names = "stmmaceth";
+			clocks = <&clkmgr STRATIX10_EMAC2_CLK>;
+			clock-names = "stmmaceth";
 			status = "disabled";
 		};
 
@@ -229,6 +262,9 @@
 			fifo-depth = <0x400>;
 			resets = <&rst SDMMC_RESET>;
 			reset-names = "reset";
+			clocks = <&clkmgr STRATIX10_L4_MP_CLK>,
+				 <&clkmgr STRATIX10_SDMMC_CLK>;
+			clock-names = "biu", "ciu";
 			status = "disabled";
 		};
 
@@ -288,24 +324,32 @@
 			compatible = "snps,dw-apb-timer";
 			interrupts = <0 113 4>;
 			reg = <0xffc03000 0x100>;
+			clocks = <&clkmgr STRATIX10_L4_SP_CLK>;
+			clock-names = "timer";
 		};
 
 		timer1: timer1 at ffc03100 {
 			compatible = "snps,dw-apb-timer";
 			interrupts = <0 114 4>;
 			reg = <0xffc03100 0x100>;
+			clocks = <&clkmgr STRATIX10_L4_SP_CLK>;
+			clock-names = "timer";
 		};
 
 		timer2: timer2 at ffd00000 {
 			compatible = "snps,dw-apb-timer";
 			interrupts = <0 115 4>;
 			reg = <0xffd00000 0x100>;
+			clocks = <&clkmgr STRATIX10_L4_SP_CLK>;
+			clock-names = "timer";
 		};
 
 		timer3: timer3 at ffd00100 {
 			compatible = "snps,dw-apb-timer";
 			interrupts = <0 116 4>;
 			reg = <0xffd00100 0x100>;
+			clocks = <&clkmgr STRATIX10_L4_SP_CLK>;
+			clock-names = "timer";
 		};
 
 		uart0: serial0 at ffc02000 {
@@ -315,6 +359,7 @@
 			reg-shift = <2>;
 			reg-io-width = <4>;
 			resets = <&rst UART0_RESET>;
+			clocks = <&clkmgr STRATIX10_L4_SP_CLK>;
 			status = "disabled";
 		};
 
@@ -325,6 +370,7 @@
 			reg-shift = <2>;
 			reg-io-width = <4>;
 			resets = <&rst UART1_RESET>;
+			clocks = <&clkmgr STRATIX10_L4_SP_CLK>;
 			status = "disabled";
 		};
 
arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts +10 -0
index 0007564..4d2d471 100644
@@ -50,6 +50,16 @@
 		/* We expect the bootloader to fill in the reg */
 		reg = <0 0 0 0>;
 	};
+
+	soc {
+		clkmgr at ffd10000 {
+			clocks {
+				osc1 {
+					clock-frequency = <25000000>;
+				};
+			};
+		};
+	};
 };
 
 &gpio1 {
Signature · 1 line
2.7.4
author maintainer
#2 lore raw

PATCH v3 3/3 clk: socfpga: stratix10: add clock driver for Stratix10 platform

In reply to Dinh Nguyen

Add a clock driver for the Stratix10 SoC. The driver is similar to the Cyclone5/Arria10 platforms, with the exception that this driver only uses one single clock binding.

---
v3:
- use fixed binding "intel,stratix10-clkmgr"
- Fix up SPDX license header
v2:
- Use a single clock binding

---
 drivers/clk/Makefile                 |   1 +
 drivers/clk/socfpga/Makefile         |   5 +
 drivers/clk/socfpga/clk-gate-s10.c   | 104 ++++++++++++
 drivers/clk/socfpga/clk-periph-s10.c | 149 ++++++++++++++++
 drivers/clk/socfpga/clk-pll-s10.c    | 141 +++++++++++++++
 drivers/clk/socfpga/clk-s10.c        | 320 +++++++++++++++++++++++++++++++++++
 drivers/clk/socfpga/clk.h            |   4 +
 drivers/clk/socfpga/stratix10-clk.h  |  87 ++++++++++
 8 files changed, 811 insertions(+)
 create mode 100644 drivers/clk/socfpga/clk-gate-s10.c
 create mode 100644 drivers/clk/socfpga/clk-periph-s10.c
 create mode 100644 drivers/clk/socfpga/clk-pll-s10.c
 create mode 100644 drivers/clk/socfpga/clk-s10.c
 create mode 100644 drivers/clk/socfpga/stratix10-clk.h
drivers/clk/Makefile +1 -0
index 71ec41e..80ab422 100644
@@ -88,6 +88,7 @@ obj-$(CONFIG_ARCH_SOCFPGA)		+= socfpga/
 obj-$(CONFIG_PLAT_SPEAR)		+= spear/
 obj-$(CONFIG_ARCH_SPRD)			+= sprd/
 obj-$(CONFIG_ARCH_STI)			+= st/
+obj-$(CONFIG_ARCH_STRATIX10)		+= socfpga/
 obj-$(CONFIG_ARCH_SUNXI)		+= sunxi/
 obj-$(CONFIG_ARCH_SUNXI)		+= sunxi-ng/
 obj-$(CONFIG_ARCH_TEGRA)		+= tegra/
drivers/clk/socfpga/Makefile +5 -0
index 9146c20..87ef977 100644
@@ -1,6 +1,11 @@
 # SPDX-License-Identifier: GPL-2.0
+ifeq ($(CONFIG_ARCH_SOCFPGA),y)
 obj-y += clk.o
 obj-y += clk-gate.o
 obj-y += clk-pll.o
 obj-y += clk-periph.o
 obj-y += clk-pll-a10.o clk-periph-a10.o clk-gate-a10.o
+else
+obj-y += clk-s10.o
+obj-y += clk-pll-s10.o clk-periph-s10.o clk-gate-s10.o
+endif
drivers/clk/socfpga/clk-gate-s10.c new file +104 -0

104 lines not on this page · raw message

drivers/clk/socfpga/clk-periph-s10.c new file +149 -0

149 lines not on this page · raw message

drivers/clk/socfpga/clk-pll-s10.c new file +141 -0

141 lines not on this page · raw message

drivers/clk/socfpga/clk-s10.c new file +320 -0

320 lines not on this page · raw message

drivers/clk/socfpga/clk.h +4 -0
index 9cf1230..26c3a26 100644
@@ -54,9 +54,11 @@ struct socfpga_gate_clk {
 	char *parent_name;
 	u32 fixed_div;
 	void __iomem *div_reg;
+	void __iomem *bypass_reg;
 	struct regmap *sys_mgr_base_addr;
 	u32 width;	/* only valid if div_reg != 0 */
 	u32 shift;	/* only valid if div_reg != 0 */
+	u32 bypass_shift;      /* only valid if bypass_reg != 0 */
 	u32 clk_phase[2];
 };
 
@@ -65,8 +67,10 @@ struct socfpga_periph_clk {
 	char *parent_name;
 	u32 fixed_div;
 	void __iomem *div_reg;
+	void __iomem *bypass_reg;
 	u32 width;      /* only valid if div_reg != 0 */
 	u32 shift;      /* only valid if div_reg != 0 */
+	u32 bypass_shift;      /* only valid if bypass_reg != 0 */
 };
 
 #endif /* SOCFPGA_CLK_H */
drivers/clk/socfpga/stratix10-clk.h new file +87 -0

87 lines not on this page · raw message

Signature · 1 line
2.7.4
maintainer
#3 lore raw

PATCH v3 1/3 dt-bindings: documentation: add clock bindings information for Stratix10

In reply to Dinh Nguyen
Quoted 42 lines · Dinh Nguyen

Document that Stratix10 clock bindings, and add the clock header file. The clock header is an enumeration of all the different clocks on the Stratix10 platform.

---
v3:
- s/intc/intel for correct vendor prefix
- fixup node name to "intel,stratix10-clkmgr"
- document the required fixed-clock for oscillators v2:
- use a single binding for the clock controller

---
 .../devicetree/bindings/clock/intc_stratix10.txt   | 47 ++++++++++++
 include/dt-bindings/clock/stratix10-clock.h        | 85 ++++++++++++++++++++++
 2 files changed, 132 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/intc_stratix10.txt
 create mode 100644 include/dt-bindings/clock/stratix10-clock.h
Documentation/devicetree/bindings/clock/intc_stratix10.txt new file +17 -0
new file mode 100644
index 0000000..8d218f4
@@ -0,0 +1,47 @@
+Device Tree Clock bindings for Intel's SoCFPGA Stratix10 platform
+
+This binding uses the common clock binding[1].
+
+[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
+
+Required properties:
+- compatible : shall be
+	"intel,stratix10-clkmgr"
+
+- reg : shall be the control register offset from CLOCK_MANAGER's base for the clock.
+
+- #clock-cells : from common clock binding, shall be set to 1.
+
+- clocks : Should contain fixed-clock sources, such as oscillators.
+
+Example:

Documentation/devicetree/bindings/clock/intc_stratix10.txt line 27

Quoted 10 lines
Documentation/devicetree/bindings/clock/intc_stratix10.txt new file +10 -0
+	clkmgr: clock-controller at ffd10000 {
+		compatible = "intel,stratix10-clkmgr";
+		reg = <0xffd10000 0x1000>;
+		#clock-cells = <1>;
+
+		clocks {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			cb_intosc_hs_div2_clk: cb_intosc_hs_div2_clk {

Don't use '_' in node names.

Documentation/devicetree/bindings/clock/intc_stratix10.txt line 29

Quoted 2 lines
Documentation/devicetree/bindings/clock/intc_stratix10.txt new file +2 -0
+				#clock-cells = <0>;
+				compatible = "fixed-clock";

fixed clock with no frequency?

Quoted 24 lines
Documentation/devicetree/bindings/clock/intc_stratix10.txt new file +18 -0
+			};
+
+			cb_intosc_ls_clk: cb_intosc_ls_clk {
+				#clock-cells = <0>;
+				compatible = "fixed-clock";
+			};
+
+			f2s_free_clk: f2s_free_clk {
+				#clock-cells = <0>;
+				compatible = "fixed-clock";
+			};
+
+			osc1: osc1 {
+				#clock-cells = <0>;
+				compatible = "fixed-clock";
+			};
+		};
+	};
include/dt-bindings/clock/stratix10-clock.h new file +0 -0
new file mode 100644
index 0000000..bbbd9fd

include/dt-bindings/clock/stratix10-clock.h line 2

Quoted 2 lines
include/dt-bindings/clock/stratix10-clock.h new file +2 -0
@@ -0,0 +1,85 @@
+/*
+ * SPDX-License-Identifier:	GPL-2.0

This should be first line. Sorry, it's a moving target.

Quoted 53 lines
include/dt-bindings/clock/stratix10-clock.h new file +53 -0
+ *
+ * Copyright (C) 2017, Intel Corporation
+ */
+
+#ifndef __STRATIX10_CLOCK_H
+#define __STRATIX10_CLOCK_H
+
+/* fixed rate clocks */
+#define STRATIX10_OSC1			0
+#define STRATIX10_CB_INTOSC_HS_DIV2_CLK	1
+#define STRATIX10_CB_INTOSC_LS_CLK	2
+#define STRATIX10_F2S_FREE_CLK		3
+
+/* fixed factor clocks */
+#define STRATIX10_L4_SYS_FREE_CLK	4
+#define STRATIX10_MPU_PERIPH_CLK	5
+#define STRATIX10_MPU_L2RAM_CLK		6
+#define STRATIX10_SDMMC_CIU_CLK		7
+
+/* PLL clocks */
+#define STRATIX10_MAIN_PLL_CLK		8
+#define STRATIX10_PERIPH_PLL_CLK	9
+#define STRATIX10_BOOT_CLK		10
+
+/* Periph clocks */
+#define STRATIX10_MAIN_MPU_BASE_CLK	11
+#define STRATIX10_MAIN_NOC_BASE_CLK	12
+#define STRATIX10_MAIN_EMACA_CLK	13
+#define STRATIX10_MAIN_EMACB_CLK	14
+#define STRATIX10_MAIN_EMAC_PTP_CLK	15
+#define STRATIX10_MAIN_GPIO_DB_CLK	16
+#define STRATIX10_MAIN_SDMMC_CLK	17
+#define STRATIX10_MAIN_S2F_USR0_CLK	18
+#define STRATIX10_MAIN_S2F_USR1_CLK	19
+#define STRATIX10_MAIN_PSI_REF_CLK	20
+
+#define STRATIX10_PERI_MPU_BASE_CLK	21
+#define STRATIX10_PERI_NOC_BASE_CLK	22
+#define STRATIX10_PERI_EMACA_CLK	23
+#define STRATIX10_PERI_EMACB_CLK	24
+#define STRATIX10_PERI_EMAC_PTP_CLK	25
+#define STRATIX10_PERI_GPIO_DB_CLK	26
+#define STRATIX10_PERI_SDMMC_CLK	27
+#define STRATIX10_PERI_S2F_USR0_CLK	28
+#define STRATIX10_PERI_S2F_USR1_CLK	29
+#define STRATIX10_PERI_PSI_REF_CLK	30
+
+#define STRATIX10_MPU_FREE_CLK		31
+#define STRATIX10_NOC_FREE_CLK		32
+#define STRATIX10_S2F_USR0_CLK		33
+#define STRATIX10_NOC_CLK		34
+#define STRATIX10_EMAC_A_FREE_CLK	35
+#define STRATIX10_EMAC_B_FREE_CLK	36

include/dt-bindings/clock/stratix10-clock.h line 65

Quoted 10 lines
include/dt-bindings/clock/stratix10-clock.h new file +10 -0
+#define STRATIX10_EMAC_PTP_FREE_CLK	37
+#define STRATIX10_GPIO_DB_FREE_CLK	38
+#define STRATIX10_SDMMC_FREE_CLK	39
+#define STRATIX10_S2F_USER1_FREE_CLK	40
+#define STRATIX10_PSI_REF_FREE_CLK	41
+
+/* Gate clocks */
+#define STRATIX10_MPU_CLK		42
+#define STRATIX10_L4_MAIN_CLK		43
+#define	STRATIX10_L4_MP_CLK		44

A stray tab...

Quoted 23 lines
include/dt-bindings/clock/stratix10-clock.h new file +20 -0
+#define STRATIX10_L4_SP_CLK		45
+#define STRATIX10_CS_AT_CLK		46
+#define STRATIX10_CS_TRACE_CLK		47
+#define STRATIX10_CS_PDBG_CLK		48
+#define STRATIX10_CS_TIMER_CLK		49
+#define STRATIX10_S2F_USER0_CLK		50
+#define STRATIX10_S2F_USER1_CLK		51
+#define STRATIX10_EMAC0_CLK		52
+#define STRATIX10_EMAC1_CLK		53
+#define STRATIX10_EMAC2_CLK		54
+#define STRATIX10_EMAC_PTP_CLK		55
+#define STRATIX10_GPIO_DB_CLK		56
+#define STRATIX10_SDMMC_CLK		57
+#define STRATIX10_PSI_REF_CLK		58
+#define STRATIX10_USB_CLK		59
+#define STRATIX10_SPI_M_CLK		60
+#define STRATIX10_NAND_CLK		61
+#define STRATIX10_NUM_CLKS		62
+
+#endif	/* __STRATIX10_CLOCK_H */
Signature · 1 line
2.7.4
author maintainer
#4 lore raw

PATCH v3 1/3 dt-bindings: documentation: add clock bindings information for Stratix10

Hi Rob,

Quoted 47 lines · Rob Herring
Quoted 46 lines · Dinh Nguyen

Document that Stratix10 clock bindings, and add the clock header file. The clock header is an enumeration of all the different clocks on the Stratix10 platform.

---
v3:
- s/intc/intel for correct vendor prefix
- fixup node name to "intel,stratix10-clkmgr"
- document the required fixed-clock for oscillators v2:
- use a single binding for the clock controller

---
 .../devicetree/bindings/clock/intc_stratix10.txt   | 47 ++++++++++++
 include/dt-bindings/clock/stratix10-clock.h        | 85 ++++++++++++++++++++++
 2 files changed, 132 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/intc_stratix10.txt
 create mode 100644 include/dt-bindings/clock/stratix10-clock.h
Documentation/devicetree/bindings/clock/intc_stratix10.txt new file +21 -0
new file mode 100644
index 0000000..8d218f4
@@ -0,0 +1,47 @@
+Device Tree Clock bindings for Intel's SoCFPGA Stratix10 platform
+
+This binding uses the common clock binding[1].
+
+[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
+
+Required properties:
+- compatible : shall be
+	"intel,stratix10-clkmgr"
+
+- reg : shall be the control register offset from CLOCK_MANAGER's base for the clock.
+
+- #clock-cells : from common clock binding, shall be set to 1.
+
+- clocks : Should contain fixed-clock sources, such as oscillators.
+
+Example:
+	clkmgr: clock-controller at ffd10000 {
+		compatible = "intel,stratix10-clkmgr";
+		reg = <0xffd10000 0x1000>;
+		#clock-cells = <1>;
Quoted 9 lines

Documentation/devicetree/bindings/clock/intc_stratix10.txt line 27

Quoted 6 lines
Documentation/devicetree/bindings/clock/intc_stratix10.txt new file +6 -0
+
+		clocks {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			cb_intosc_hs_div2_clk: cb_intosc_hs_div2_clk {

Don't use '_' in node names.

Ok..

Quoted 4 lines

Documentation/devicetree/bindings/clock/intc_stratix10.txt line 29

Quoted 2 lines
Documentation/devicetree/bindings/clock/intc_stratix10.txt new file +2 -0
+				#clock-cells = <0>;
+				compatible = "fixed-clock";

fixed clock with no frequency?

The frequency gets populated in the board's dts file. This provides for the scenario where different boards might use different oscillator frequencies.

So in socfpga_stratix10, I would have:

soc {
	clock-controller at ffd10000 {
		clocks {
			osc1 {
				clock-frequency = <25000000>;
			};
		};
	};
};

Thanks,
Dinh

maintainer
#5 lore raw

PATCH v3 1/3 dt-bindings: documentation: add clock bindings information for Stratix10

Quoted 63 lines · Dinh Nguyen

Hi Rob,

Quoted 47 lines · Rob Herring
Quoted 46 lines · Dinh Nguyen

Document that Stratix10 clock bindings, and add the clock header file. The clock header is an enumeration of all the different clocks on the Stratix10 platform.

---
v3:
- s/intc/intel for correct vendor prefix
- fixup node name to "intel,stratix10-clkmgr"
- document the required fixed-clock for oscillators v2:
- use a single binding for the clock controller

---
 .../devicetree/bindings/clock/intc_stratix10.txt   | 47 ++++++++++++
 include/dt-bindings/clock/stratix10-clock.h        | 85 ++++++++++++++++++++++
 2 files changed, 132 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/intc_stratix10.txt
 create mode 100644 include/dt-bindings/clock/stratix10-clock.h
Documentation/devicetree/bindings/clock/intc_stratix10.txt new file +21 -0
new file mode 100644
index 0000000..8d218f4
@@ -0,0 +1,47 @@
+Device Tree Clock bindings for Intel's SoCFPGA Stratix10 platform
+
+This binding uses the common clock binding[1].
+
+[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
+
+Required properties:
+- compatible : shall be
+    "intel,stratix10-clkmgr"
+
+- reg : shall be the control register offset from CLOCK_MANAGER's base for the clock.
+
+- #clock-cells : from common clock binding, shall be set to 1.
+
+- clocks : Should contain fixed-clock sources, such as oscillators.
+
+Example:
+    clkmgr: clock-controller at ffd10000 {
+            compatible = "intel,stratix10-clkmgr";
+            reg = <0xffd10000 0x1000>;
+            #clock-cells = <1>;
Quoted 9 lines

Documentation/devicetree/bindings/clock/intc_stratix10.txt line 27

Quoted 6 lines
Documentation/devicetree/bindings/clock/intc_stratix10.txt new file +6 -0
+
+            clocks {
+                    #address-cells = <1>;
+                    #size-cells = <0>;
+
+                    cb_intosc_hs_div2_clk: cb_intosc_hs_div2_clk {

Don't use '_' in node names.

Ok..

Quoted 8 lines
Quoted 4 lines

Documentation/devicetree/bindings/clock/intc_stratix10.txt line 29

Quoted 2 lines
Documentation/devicetree/bindings/clock/intc_stratix10.txt new file +2 -0
+                            #clock-cells = <0>;
+                            compatible = "fixed-clock";

fixed clock with no frequency?

The frequency gets populated in the board's dts file. This provides for the scenario where different boards might use different oscillator frequencies.

That is irrelevant for examples. The SoC vs. board file split is outside the scope of the binding (i.e. not part of the ABI). Well, at least until it is done with overlays.

Rob