Browse Source

ARM: tegra: add clock source of PMC to device trees

Adding the bindings of the clock source of PMC in DT.

Signed-off-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Joseph Lo 12 years ago
parent
commit
7021d12205

+ 28 - 1
Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.txt

@@ -1,9 +1,15 @@
 NVIDIA Tegra Power Management Controller (PMC)
 NVIDIA Tegra Power Management Controller (PMC)
 
 
-Properties:
+Required properties:
 - name : Should be pmc
 - name : Should be pmc
 - compatible : Should contain "nvidia,tegra<chip>-pmc".
 - compatible : Should contain "nvidia,tegra<chip>-pmc".
 - reg : Offset and length of the register set for the device
 - reg : Offset and length of the register set for the device
+- clocks : Must contain an entry for each entry in clock-names.
+- clock-names : Must include the following entries:
+  "pclk" (The Tegra clock of that name),
+  "clk32k_in" (The 32KHz clock input to Tegra).
+
+Optional properties:
 - nvidia,invert-interrupt : If present, inverts the PMU interrupt signal.
 - nvidia,invert-interrupt : If present, inverts the PMU interrupt signal.
   The PMU is an external Power Management Unit, whose interrupt output
   The PMU is an external Power Management Unit, whose interrupt output
   signal is fed into the PMC. This signal is optionally inverted, and then
   signal is fed into the PMC. This signal is optionally inverted, and then
@@ -12,8 +18,29 @@ Properties:
 
 
 Example:
 Example:
 
 
+/ SoC dts including file
 pmc@7000f400 {
 pmc@7000f400 {
 	compatible = "nvidia,tegra20-pmc";
 	compatible = "nvidia,tegra20-pmc";
 	reg = <0x7000e400 0x400>;
 	reg = <0x7000e400 0x400>;
+	clocks = <&tegra_car 110>, <&clk32k_in>;
+	clock-names = "pclk", "clk32k_in";
 	nvidia,invert-interrupt;
 	nvidia,invert-interrupt;
 };
 };
+
+/ Tegra board dts file
+{
+	...
+	clocks {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		clk32k_in: clock {
+			compatible = "fixed-clock";
+			reg=<0>;
+			#clock-cells = <0>;
+			clock-frequency = <32768>;
+		};
+	};
+	...
+};

+ 13 - 0
arch/arm/boot/dts/tegra114-dalmore.dts

@@ -18,4 +18,17 @@
 	pmc {
 	pmc {
 		nvidia,invert-interrupt;
 		nvidia,invert-interrupt;
 	};
 	};
+
+	clocks {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		clk32k_in: clock {
+			compatible = "fixed-clock";
+			reg=<0>;
+			#clock-cells = <0>;
+			clock-frequency = <32768>;
+		};
+	};
 };
 };

+ 13 - 0
arch/arm/boot/dts/tegra114-pluto.dts

@@ -18,4 +18,17 @@
 	pmc {
 	pmc {
 		nvidia,invert-interrupt;
 		nvidia,invert-interrupt;
 	};
 	};
+
+	clocks {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		clk32k_in: clock {
+			compatible = "fixed-clock";
+			reg=<0>;
+			#clock-cells = <0>;
+			clock-frequency = <32768>;
+		};
+	};
 };
 };

+ 2 - 0
arch/arm/boot/dts/tegra114.dtsi

@@ -101,6 +101,8 @@
 	pmc {
 	pmc {
 		compatible = "nvidia,tegra114-pmc";
 		compatible = "nvidia,tegra114-pmc";
 		reg = <0x7000e400 0x400>;
 		reg = <0x7000e400 0x400>;
+		clocks = <&tegra_car 261>, <&clk32k_in>;
+		clock-names = "pclk", "clk32k_in";
 	};
 	};
 
 
 	iommu {
 	iommu {

+ 13 - 0
arch/arm/boot/dts/tegra20-colibri-512.dtsi

@@ -447,6 +447,19 @@
 		cd-gpios = <&gpio 23 1>; /* gpio PC7 */
 		cd-gpios = <&gpio 23 1>; /* gpio PC7 */
 	};
 	};
 
 
+	clocks {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		clk32k_in: clock {
+			compatible = "fixed-clock";
+			reg=<0>;
+			#clock-cells = <0>;
+			clock-frequency = <32768>;
+		};
+	};
+
 	sound {
 	sound {
 		compatible = "nvidia,tegra-audio-wm9712-colibri_t20",
 		compatible = "nvidia,tegra-audio-wm9712-colibri_t20",
 			         "nvidia,tegra-audio-wm9712";
 			         "nvidia,tegra-audio-wm9712";

+ 13 - 0
arch/arm/boot/dts/tegra20-harmony.dts

@@ -451,6 +451,19 @@
 		bus-width = <8>;
 		bus-width = <8>;
 	};
 	};
 
 
+	clocks {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		clk32k_in: clock {
+			compatible = "fixed-clock";
+			reg=<0>;
+			#clock-cells = <0>;
+			clock-frequency = <32768>;
+		};
+	};
+
 	kbc {
 	kbc {
 		status = "okay";
 		status = "okay";
 		nvidia,debounce-delay-ms = <2>;
 		nvidia,debounce-delay-ms = <2>;

+ 13 - 0
arch/arm/boot/dts/tegra20-paz00.dts

@@ -447,6 +447,19 @@
 		bus-width = <8>;
 		bus-width = <8>;
 	};
 	};
 
 
+	clocks {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		clk32k_in: clock {
+			compatible = "fixed-clock";
+			reg=<0>;
+			#clock-cells = <0>;
+			clock-frequency = <32768>;
+		};
+	};
+
 	gpio-keys {
 	gpio-keys {
 		compatible = "gpio-keys";
 		compatible = "gpio-keys";
 
 

+ 13 - 0
arch/arm/boot/dts/tegra20-seaboard.dts

@@ -595,6 +595,19 @@
 		bus-width = <8>;
 		bus-width = <8>;
 	};
 	};
 
 
+	clocks {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		clk32k_in: clock {
+			compatible = "fixed-clock";
+			reg=<0>;
+			#clock-cells = <0>;
+			clock-frequency = <32768>;
+		};
+	};
+
 	gpio-keys {
 	gpio-keys {
 		compatible = "gpio-keys";
 		compatible = "gpio-keys";
 
 

+ 13 - 0
arch/arm/boot/dts/tegra20-tamonten.dtsi

@@ -471,6 +471,19 @@
 		status = "okay";
 		status = "okay";
 	};
 	};
 
 
+	clocks {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		clk32k_in: clock {
+			compatible = "fixed-clock";
+			reg=<0>;
+			#clock-cells = <0>;
+			clock-frequency = <32768>;
+		};
+	};
+
 	regulators {
 	regulators {
 		compatible = "simple-bus";
 		compatible = "simple-bus";
 
 

+ 13 - 0
arch/arm/boot/dts/tegra20-trimslice.dts

@@ -330,6 +330,19 @@
 		bus-width = <4>;
 		bus-width = <4>;
 	};
 	};
 
 
+	clocks {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		clk32k_in: clock {
+			compatible = "fixed-clock";
+			reg=<0>;
+			#clock-cells = <0>;
+			clock-frequency = <32768>;
+		};
+	};
+
 	poweroff {
 	poweroff {
 		compatible = "gpio-poweroff";
 		compatible = "gpio-poweroff";
 		gpios = <&gpio 191 1>; /* gpio PX7, active low */
 		gpios = <&gpio 191 1>; /* gpio PX7, active low */

+ 13 - 0
arch/arm/boot/dts/tegra20-ventana.dts

@@ -531,6 +531,19 @@
 		bus-width = <8>;
 		bus-width = <8>;
 	};
 	};
 
 
+	clocks {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		clk32k_in: clock {
+			compatible = "fixed-clock";
+			reg=<0>;
+			#clock-cells = <0>;
+			clock-frequency = <32768>;
+		};
+	};
+
 	regulators {
 	regulators {
 		compatible = "simple-bus";
 		compatible = "simple-bus";
 		#address-cells = <1>;
 		#address-cells = <1>;

+ 13 - 0
arch/arm/boot/dts/tegra20-whistler.dts

@@ -520,6 +520,19 @@
 		bus-width = <8>;
 		bus-width = <8>;
 	};
 	};
 
 
+	clocks {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		clk32k_in: clock {
+			compatible = "fixed-clock";
+			reg=<0>;
+			#clock-cells = <0>;
+			clock-frequency = <32768>;
+		};
+	};
+
 	kbc {
 	kbc {
 		status = "okay";
 		status = "okay";
 		nvidia,debounce-delay-ms = <20>;
 		nvidia,debounce-delay-ms = <20>;

+ 2 - 0
arch/arm/boot/dts/tegra20.dtsi

@@ -417,6 +417,8 @@
 	pmc {
 	pmc {
 		compatible = "nvidia,tegra20-pmc";
 		compatible = "nvidia,tegra20-pmc";
 		reg = <0x7000e400 0x400>;
 		reg = <0x7000e400 0x400>;
+		clocks = <&tegra_car 110>, <&clk32k_in>;
+		clock-names = "pclk", "clk32k_in";
 	};
 	};
 
 
 	memory-controller@7000f000 {
 	memory-controller@7000f000 {

+ 13 - 0
arch/arm/boot/dts/tegra30-beaver.dts

@@ -268,6 +268,19 @@
 		bus-width = <8>;
 		bus-width = <8>;
 	};
 	};
 
 
+	clocks {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		clk32k_in: clock {
+			compatible = "fixed-clock";
+			reg=<0>;
+			#clock-cells = <0>;
+			clock-frequency = <32768>;
+		};
+	};
+
 	regulators {
 	regulators {
 		compatible = "simple-bus";
 		compatible = "simple-bus";
 		#address-cells = <1>;
 		#address-cells = <1>;

+ 13 - 0
arch/arm/boot/dts/tegra30-cardhu.dtsi

@@ -322,6 +322,19 @@
 		bus-width = <8>;
 		bus-width = <8>;
 	};
 	};
 
 
+	clocks {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		clk32k_in: clock {
+			compatible = "fixed-clock";
+			reg=<0>;
+			#clock-cells = <0>;
+			clock-frequency = <32768>;
+		};
+	};
+
 	regulators {
 	regulators {
 		compatible = "simple-bus";
 		compatible = "simple-bus";
 		#address-cells = <1>;
 		#address-cells = <1>;

+ 2 - 0
arch/arm/boot/dts/tegra30.dtsi

@@ -426,6 +426,8 @@
 	pmc {
 	pmc {
 		compatible = "nvidia,tegra30-pmc";
 		compatible = "nvidia,tegra30-pmc";
 		reg = <0x7000e400 0x400>;
 		reg = <0x7000e400 0x400>;
+		clocks = <&tegra_car 218>, <&clk32k_in>;
+		clock-names = "pclk", "clk32k_in";
 	};
 	};
 
 
 	memory-controller {
 	memory-controller {