diff mbox

[v3,1/8] arm64: dts: qcom: 8x16: Add fixed rate on-board oscillator

Message ID 1445360280-2347-2-git-send-email-georgi.djakov@linaro.org
State New
Headers show

Commit Message

Georgi Djakov Oct. 20, 2015, 4:57 p.m. UTC
Add the on-board XO oscillator. This patch prepares for adding support
for RPM controlled clocks. In order to do smooth transition and support
both cases (RPM clock driver is enabled or nor), we first move the XO to
the DT and change the GCC fixed-rate root clock to a dummy pass-through
clock. Then if the RPM driver is enabled, we set the parent of the XO
clock in the RPM clock driver to xo_board.
The advantage of doing so is that the rate of the XO clock is not hard-
coded in the GCC driver anymore, but comes from the board layout, so
that is why it should be in DT anyway.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
---
 arch/arm64/boot/dts/qcom/msm8916.dtsi |    9 +++++++++
 1 file changed, 9 insertions(+)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Comments

Andy Gross Oct. 22, 2015, 2:52 a.m. UTC | #1
On Tue, Oct 20, 2015 at 07:57:53PM +0300, Georgi Djakov wrote:
> Add the on-board XO oscillator. This patch prepares for adding support
> for RPM controlled clocks. In order to do smooth transition and support
> both cases (RPM clock driver is enabled or nor), we first move the XO to
> the DT and change the GCC fixed-rate root clock to a dummy pass-through
> clock. Then if the RPM driver is enabled, we set the parent of the XO
> clock in the RPM clock driver to xo_board.
> The advantage of doing so is that the rate of the XO clock is not hard-
> coded in the GCC driver anymore, but comes from the board layout, so
> that is why it should be in DT anyway.
> 
> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
> ---

Looks good to me.

Reviewed-by: Andy Gross <agross@codeaurora.org>
diff mbox

Patch

diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index 8748fcca70f4..355a2acea796 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -80,6 +80,15 @@ 
 			     <GIC_PPI 1 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
 	};
 
+	clocks {
+		xo_board: xo_board {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <19200000>;
+			clock-output-names = "xo_board";
+		};
+	};
+
 	soc: soc {
 		#address-cells = <1>;
 		#size-cells = <1>;