linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* arm64: dts: rockchip: add SdioAudio pd control for rk3399
@ 2017-06-30  6:01 Caesar Wang
  2017-06-30 20:41 ` Heiko Stuebner
  0 siblings, 1 reply; 2+ messages in thread
From: Caesar Wang @ 2017-06-30  6:01 UTC (permalink / raw)
  To: heiko
  Cc: devicetree, linux-rockchip, linux-kernel, linux-arm-kernel,
	dianders, zhangqing, Caesar Wang

The SdioAudio power domain includes the i2s/spdif/spi5/sdio.

So this patch adds the pd control for rk3399 i2s/spdif/spi5/sdio, in order
to save more power consumption.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
---

Changes note:
- As the Jeffy fixes the spi'cs issue recently as follows:
aa09938 spi: rockchip: Disable Runtime PM when chip select is asserted
c863795 spi: rockchip: Set GPIO_SS flag to enable Slave Select with GPIO CS
c351587 spi: rockchip: fix error handling when probe
- Posted this CL to support the SdioAudio power domain as commnets on
  https://chromium-review.googlesource.com/#/c/378562/

 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 33e17d7..a1dd0da 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -289,6 +289,7 @@
 		fifo-depth = <0x100>;
 		resets = <&cru SRST_SDIO0>;
 		reset-names = "reset";
+		power-domains = <&power RK3399_PD_SDIOAUDIO>;
 		status = "disabled";
 	};
 
@@ -678,6 +679,7 @@
 		pinctrl-0 = <&spi5_clk &spi5_tx &spi5_rx &spi5_cs0>;
 		#address-cells = <1>;
 		#size-cells = <0>;
+		power-domains = <&power RK3399_PD_SDIOAUDIO>;
 		status = "disabled";
 	};
 
@@ -952,6 +954,11 @@
 					 <&cru SCLK_SDMMC>;
 				pm_qos = <&qos_sd>;
 			};
+			pd_sdioaudio@RK3399_PD_SDIOAUDIO {
+				reg = <RK3399_PD_SDIOAUDIO>;
+				clocks = <&cru HCLK_SDIO>;
+				pm_qos = <&qos_sdioaudio>;
+			};
 			pd_vio@RK3399_PD_VIO {
 				reg = <RK3399_PD_VIO>;
 				#address-cells = <1>;
@@ -1372,6 +1379,7 @@
 		clocks = <&cru SCLK_SPDIF_8CH>, <&cru HCLK_SPDIF>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&spdif_bus>;
+		power-domains = <&power RK3399_PD_SDIOAUDIO>;
 		status = "disabled";
 	};
 
@@ -1386,6 +1394,7 @@
 		clocks = <&cru SCLK_I2S0_8CH>, <&cru HCLK_I2S0_8CH>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&i2s0_8ch_bus>;
+		power-domains = <&power RK3399_PD_SDIOAUDIO>;
 		status = "disabled";
 	};
 
@@ -1399,6 +1408,7 @@
 		clocks = <&cru SCLK_I2S1_8CH>, <&cru HCLK_I2S1_8CH>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&i2s1_2ch_bus>;
+		power-domains = <&power RK3399_PD_SDIOAUDIO>;
 		status = "disabled";
 	};
 
@@ -1410,6 +1420,7 @@
 		dma-names = "tx", "rx";
 		clock-names = "i2s_clk", "i2s_hclk";
 		clocks = <&cru SCLK_I2S2_8CH>, <&cru HCLK_I2S2_8CH>;
+		power-domains = <&power RK3399_PD_SDIOAUDIO>;
 		status = "disabled";
 	};
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: arm64: dts: rockchip: add SdioAudio pd control for rk3399
  2017-06-30  6:01 arm64: dts: rockchip: add SdioAudio pd control for rk3399 Caesar Wang
@ 2017-06-30 20:41 ` Heiko Stuebner
  0 siblings, 0 replies; 2+ messages in thread
From: Heiko Stuebner @ 2017-06-30 20:41 UTC (permalink / raw)
  To: Caesar Wang
  Cc: devicetree, linux-rockchip, linux-kernel, linux-arm-kernel,
	dianders, zhangqing

Hi Caesar,

Am Freitag, 30. Juni 2017, 14:01:53 CEST schrieb Caesar Wang:

subject was missing the "[PATCH]" prefix. While not necessary for applying,
having it makes it easier to find stuff in an inbox :-) .


> The SdioAudio power domain includes the i2s/spdif/spi5/sdio.
> 
> So this patch adds the pd control for rk3399 i2s/spdif/spi5/sdio, in order
> to save more power consumption.
> 
> Signed-off-by: Caesar Wang <wxt@rock-chips.com>
> ---
> 
> Changes note:
> - As the Jeffy fixes the spi'cs issue recently as follows:
> aa09938 spi: rockchip: Disable Runtime PM when chip select is asserted
> c863795 spi: rockchip: Set GPIO_SS flag to enable Slave Select with GPIO CS
> c351587 spi: rockchip: fix error handling when probe

as these are in Mark's tree for 4.13, I've now applied your patch for 4.14
but moved the power-domains property for sdio and spi5 to a better sort
position.


Heiko

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-30 20:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-30  6:01 arm64: dts: rockchip: add SdioAudio pd control for rk3399 Caesar Wang
2017-06-30 20:41 ` Heiko Stuebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).