devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 2/3] dt-bindings: spi/rockchip: add "cs-gpios" optional property
       [not found] ` <1497411483-23377-1-git-send-email-jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2017-06-14  3:38   ` Jeffy Chen
  2017-06-18 14:05     ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Jeffy Chen @ 2017-06-14  3:38 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	broonie-DgEjT+Ai2ygdnm+yROfE0A
  Cc: briannorris-F7+t8E8rja9g9hUCZPvPmw,
	dianders-F7+t8E8rja9g9hUCZPvPmw, heiko-4mtYJXux2i+zQB+pC5nmwQ,
	Jeffy Chen, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-spi-u79uwXL29TY76Z2rM5mHXA,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Rob Herring,
	Mark Rutland, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Update document devicetree bindings to support "cs-gpios" property.

Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
---

Changes in v3: None
Changes in v2: None

 Documentation/devicetree/bindings/spi/spi-rockchip.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/spi/spi-rockchip.txt b/Documentation/devicetree/bindings/spi/spi-rockchip.txt
index 83da493..d0be2e6 100644
--- a/Documentation/devicetree/bindings/spi/spi-rockchip.txt
+++ b/Documentation/devicetree/bindings/spi/spi-rockchip.txt
@@ -25,6 +25,7 @@ Required Properties:
 
 Optional Properties:
 
+- cs-gpios : Specifies the gpio pins to be used for chipselects.
 - dmas: DMA specifiers for tx and rx dma. See the DMA client binding,
 		Documentation/devicetree/bindings/dma/dma.txt
 - dma-names: DMA request names should include "tx" and "rx" if present.
@@ -48,6 +49,7 @@ Example:
 		#address-cells = <1>;
 		#size-cells = <0>;
 		interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
+		cs-gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>;
 		clocks = <&cru SCLK_SPI0>, <&cru PCLK_SPI0>;
 		clock-names = "spiclk", "apb_pclk";
 		pinctrl-0 = <&spi1_pins>;
-- 
2.1.4


--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v3 3/3] arm64: dts: rockchip: use cs-gpios for cros_ec_spi
       [not found] <1497411483-23377-1-git-send-email-jeffy.chen@rock-chips.com>
       [not found] ` <1497411483-23377-1-git-send-email-jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2017-06-14  3:38 ` Jeffy Chen
  1 sibling, 0 replies; 3+ messages in thread
From: Jeffy Chen @ 2017-06-14  3:38 UTC (permalink / raw)
  To: linux-kernel, broonie
  Cc: briannorris, dianders, heiko, Jeffy Chen, devicetree,
	linux-rockchip, Rob Herring, linux-arm-kernel, Will Deacon,
	Mark Rutland, Catalin Marinas

The cros_ec requires CS line to be active after last message. But the CS
would be toggled when powering off/on rockchip spi, which breaks ec xfer.
Use GPIO CS to prevent that.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---

Changes in v3: None
Changes in v2:
Fix wrong pinconf for spi5_cs0.

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

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
index eb50593..b34a51d 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
@@ -790,6 +790,8 @@ ap_i2c_audio: &i2c8 {
 &spi5 {
 	status = "okay";
 
+	cs-gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>;
+
 	cros_ec: ec@0 {
 		compatible = "google,cros-ec-spi";
 		reg = <0>;
@@ -813,6 +815,10 @@ ap_i2c_audio: &i2c8 {
 	};
 };
 
+&spi5_cs0 {
+	rockchip,pins = <RK_GPIO2 23 RK_FUNC_GPIO &pcfg_output_high>;
+};
+
 &tsadc {
 	status = "okay";
 
-- 
2.1.4

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

* Re: [PATCH v3 2/3] dt-bindings: spi/rockchip: add "cs-gpios" optional property
  2017-06-14  3:38   ` [PATCH v3 2/3] dt-bindings: spi/rockchip: add "cs-gpios" optional property Jeffy Chen
@ 2017-06-18 14:05     ` Rob Herring
  0 siblings, 0 replies; 3+ messages in thread
From: Rob Herring @ 2017-06-18 14:05 UTC (permalink / raw)
  To: Jeffy Chen
  Cc: linux-kernel, broonie, briannorris, dianders, heiko, devicetree,
	linux-spi, linux-rockchip, Mark Rutland, linux-arm-kernel

On Wed, Jun 14, 2017 at 11:38:02AM +0800, Jeffy Chen wrote:
> Update document devicetree bindings to support "cs-gpios" property.
> 
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> ---
> 
> Changes in v3: None
> Changes in v2: None
> 
>  Documentation/devicetree/bindings/spi/spi-rockchip.txt | 2 ++
>  1 file changed, 2 insertions(+)

Acked-by: Rob Herring <robh@kernel.org>

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

end of thread, other threads:[~2017-06-18 14:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1497411483-23377-1-git-send-email-jeffy.chen@rock-chips.com>
     [not found] ` <1497411483-23377-1-git-send-email-jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2017-06-14  3:38   ` [PATCH v3 2/3] dt-bindings: spi/rockchip: add "cs-gpios" optional property Jeffy Chen
2017-06-18 14:05     ` Rob Herring
2017-06-14  3:38 ` [PATCH v3 3/3] arm64: dts: rockchip: use cs-gpios for cros_ec_spi Jeffy Chen

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).