arm64: dts: rockchip: Provide power-domains for sd/sdio/emmc/pcie
authorShawn Lin <shawn.lin@rock-chips.com>
Mon, 1 Aug 2016 07:26:26 +0000 (15:26 +0800)
committerGerrit Code Review <gerrit@rock-chips.com>
Mon, 8 Aug 2016 03:37:18 +0000 (11:37 +0800)
The PM domain will be "powered on" once we have registered our PM domain
with genpd and when the device (dw_mmc etc) gets attached to the domain.
The attach occurs when the platform bus'->probe() function get invoked
for the device.

Genpd monitors each device within the domain. To allow it to "power
off", all devices in same domain needs to be runtime PM enabled and
runtime PM suspended.

Due to this, we should be able to deploy genpd support+an updated
DTB, without first having to deploying runtime PM support in the
related drivers. In other words, we could be able to work on these
things almost independently of each other。

So let's only provide power-domains to each devices' node to make
power policy collect the unreferenced ones once avaiable.

But please KEEP IN MIND that this patch doesn't mean we don't support
rpm or any genpd control related stuff on the future, which in other
words means that could be available later.

Change-Id: I1c7b2fdecb7f203d2c35e47892ae5296cfb32884
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
arch/arm64/boot/dts/rockchip/rk3399.dtsi

index 9a4374a..3f792cf 100644 (file)
                         <&cru SCLK_SDIO_DRV>, <&cru SCLK_SDIO_SAMPLE>;
                clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
                fifo-depth = <0x100>;
+               power-domains = <&power RK3399_PD_SDIOAUDIO>;
                status = "disabled";
        };
 
                         <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>;
                clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
                fifo-depth = <0x100>;
+               power-domains = <&power RK3399_PD_SD>;
                status = "disabled";
        };
 
                assigned-clock-rates = <200000000>;
                phys = <&emmc_phy>;
                phy-names = "phy_arasan";
+               power-domains = <&power RK3399_PD_EMMC>;
                status = "disabled";
        };
 
                pcie-conf = <0xe220>;
                pcie-status = <0xe2a4>;
                pcie-laneoff = <0xe214>;
+               power-domains = <&power RK3399_PD_PERIHP>;
                msi-parent = <&its>;
                #interrupt-cells = <1>;
                interrupt-map-mask = <0 0 0 7>;