OSDN Git Service

arm64: dts: rockchip: assign clock rate for cpll child clocks on rk3399
authorLin Huang <hl@rock-chips.com>
Tue, 20 Mar 2018 02:06:29 +0000 (10:06 +0800)
committerHeiko Stuebner <heiko@sntech.de>
Mon, 16 Apr 2018 12:13:13 +0000 (14:13 +0200)
These clocks do not assign default clock frequency, and use the
default cru register value to get frequency, so if cpll increase
frequency, these clocks also increase their frequency, that may
exceed their signed off frequency. So assign default clock for
them to avoid it.

NOTE: on none of the boards currently in mainline do we expect
CPLL to be anything other than 800 MHz, but some future boards
might have it. It's still good to be explicit about the clock
rates to make diffing against future boards easier and also to
rely less on BIOS muxing.

Signed-off-by: Lin Huang <hl@rock-chips.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
arch/arm64/boot/dts/rockchip/rk3399.dtsi

index 18f546f..f49bfab 100644 (file)
                <&cru ACLK_PERILP0>, <&cru HCLK_PERILP0>,
                <&cru PCLK_PERILP0>, <&cru ACLK_CCI>,
                <&cru HCLK_PERILP1>, <&cru PCLK_PERILP1>,
-               <&cru ACLK_VIO>;
+               <&cru ACLK_VIO>, <&cru ACLK_HDCP>,
+               <&cru ACLK_GIC_PRE>,
+               <&cru PCLK_DDR>;
        assigned-clock-rates =
                <600000000>, <800000000>,
                <1000000000>,
                <100000000>, <100000000>,
                <50000000>, <800000000>,
                <100000000>, <50000000>,
-               <400000000>;
+               <400000000>, <400000000>,
+               <200000000>,
+               <200000000>;
 };
 
 &emmc_phy {
index 4550c0f..384a0c2 100644 (file)
                reg = <0x0 0xfe320000 0x0 0x4000>;
                interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH 0>;
                max-frequency = <150000000>;
+               assigned-clocks = <&cru HCLK_SD>;
+               assigned-clock-rates = <200000000>;
                clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>,
                         <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>;
                clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
                compatible = "rockchip,rk3399-cdn-dp";
                reg = <0x0 0xfec00000 0x0 0x100000>;
                interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH 0>;
-               assigned-clocks = <&cru SCLK_DP_CORE>;
-               assigned-clock-rates = <100000000>;
+               assigned-clocks = <&cru SCLK_DP_CORE>, <&cru SCLK_SPDIF_REC_DPTX>;
+               assigned-clock-rates = <100000000>, <200000000>;
                clocks = <&cru SCLK_DP_CORE>, <&cru PCLK_DP_CTRL>,
                         <&cru SCLK_SPDIF_REC_DPTX>, <&cru PCLK_VIO_GRF>;
                clock-names = "core-clk", "pclk", "spdif", "grf";
                        <&cru ACLK_PERILP0>, <&cru HCLK_PERILP0>,
                        <&cru PCLK_PERILP0>, <&cru ACLK_CCI>,
                        <&cru HCLK_PERILP1>, <&cru PCLK_PERILP1>,
-                       <&cru ACLK_VIO>;
+                       <&cru ACLK_VIO>, <&cru ACLK_HDCP>,
+                       <&cru ACLK_GIC_PRE>,
+                       <&cru PCLK_DDR>;
                assigned-clock-rates =
                         <594000000>,  <800000000>,
                        <1000000000>,
                         <100000000>,  <100000000>,
                          <50000000>, <600000000>,
                         <100000000>,   <50000000>,
-                        <400000000>;
+                        <400000000>, <400000000>,
+                        <200000000>,
+                        <200000000>;
        };
 
        grf: syscon@ff770000 {