All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeffy Chen <jeffy.chen@rock-chips.com>
To: linux-kernel@vger.kernel.org, broonie@kernel.org
Cc: briannorris@chromium.org, dianders@chromium.org, heiko@sntech.de,
	Jeffy Chen <jeffy.chen@rock-chips.com>,
	devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org,
	Rob Herring <robh+dt@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	Will Deacon <will.deacon@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>
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@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

WARNING: multiple messages have this Message-ID (diff)
From: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
To: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Cc: briannorris-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org,
	Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Catalin Marinas <catalin.marinas-5wv7dgnIgG8@public.gmane.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-TNX95d0MmH7DzftRWevZcw@public.gmane.org>

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-TNX95d0MmH7DzftRWevZcw@public.gmane.org>

---

 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@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


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

WARNING: multiple messages have this Message-ID (diff)
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: 33+ 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
2017-06-12  6:14 ` Jeffy Chen
2017-06-12  6:14 ` Jeffy Chen [this message]
2017-06-12  6:14   ` [PATCH 2/2] arm64: dts: rockchip: use cs-gpios for cros_ec_spi Jeffy Chen
2017-06-12  6:14   ` Jeffy Chen
2017-06-12  7:15 ` [PATCH 1/2] spi: rockchip: add support for "cs-gpios" dts property Shawn Lin
2017-06-12  7:15   ` Shawn Lin
2017-06-12  7:15   ` Shawn Lin
2017-06-12  8:18   ` Geert Uytterhoeven
2017-06-12  8:18     ` Geert Uytterhoeven
2017-06-12  8:18     ` Geert Uytterhoeven
2017-06-12  8:48     ` jeffy
2017-06-12  8:48       ` jeffy
2017-06-12  8:48       ` jeffy
2017-06-12 16:38     ` Mark Brown
2017-06-12 16:38       ` Mark Brown
2017-06-12 16:38       ` Mark Brown
2017-06-12  8:26   ` jeffy
2017-06-12  8:26     ` jeffy
2017-06-12  8:26     ` jeffy
2017-06-12  8:33     ` jeffy
2017-06-12  8:33       ` jeffy
2017-06-12  8:33       ` jeffy
2017-06-12  8:36     ` Heiko Stübner
2017-06-12  8:36       ` Heiko Stübner
2017-06-12  8:36       ` Heiko Stübner
2017-06-12  9:12       ` jeffy
2017-06-12  9:12         ` jeffy
2017-06-12  9:12         ` jeffy
2017-06-12  9:23         ` Heiko Stübner
2017-06-12  9:23           ` Heiko Stübner
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=briannorris@chromium.org \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=will.deacon@arm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.