linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jeffy.chen@rock-chips.com (Jeffy Chen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] arm64: dts: rockchip: use cs-gpios for cros_ec_spi
Date: Mon, 12 Jun 2017 14:14:16 +0800	[thread overview]
Message-ID: <1497248057-16550-2-git-send-email-jeffy.chen@rock-chips.com> (raw)
In-Reply-To: <1497248057-16550-1-git-send-email-jeffy.chen@rock-chips.com>

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>

---

 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..329a634 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 at 0 {
 		compatible = "google,cros-ec-spi";
 		reg = <0>;
@@ -813,6 +815,10 @@ ap_i2c_audio: &i2c8 {
 	};
 };
 
+&spi5_cs0 {
+	rockchip,pins = <2 23 RK_FUNC_GPIO &pcfg_pull_up>;
+};
+
 &tsadc {
 	status = "okay";
 
-- 
2.1.4

  reply	other threads:[~2017-06-12  6:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-12  6:14 [PATCH 1/2] spi: rockchip: add support for "cs-gpios" dts property Jeffy Chen
2017-06-12  6:14 ` Jeffy Chen [this message]
2017-06-12  7:15 ` Shawn Lin
2017-06-12  8:18   ` Geert Uytterhoeven
2017-06-12  8:48     ` jeffy
2017-06-12 16:38     ` Mark Brown
2017-06-12  8:26   ` jeffy
2017-06-12  8:33     ` jeffy
2017-06-12  8:36     ` Heiko Stübner
2017-06-12  9:12       ` jeffy
2017-06-12  9:23         ` Heiko Stübner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1497248057-16550-2-git-send-email-jeffy.chen@rock-chips.com \
    --to=jeffy.chen@rock-chips.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).