Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1575452 > unrolled thread

[PATCH] arm64: dts: Enable ir-spi in the tm2 and tm2e boards

Started byAndi Shyti <andi.shyti@samsung.com>
First post2017-02-07 09:20 +0100
Last post2017-02-07 22:20 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH] arm64: dts: Enable ir-spi in the tm2 and tm2e boards Andi Shyti <andi.shyti@samsung.com> - 2017-02-07 09:20 +0100
    Re: [PATCH] arm64: dts: Enable ir-spi in the tm2 and tm2e boards Krzysztof Kozlowski <krzk@kernel.org> - 2017-02-07 22:20 +0100

#1575452 — [PATCH] arm64: dts: Enable ir-spi in the tm2 and tm2e boards

FromAndi Shyti <andi.shyti@samsung.com>
Date2017-02-07 09:20 +0100
Subject[PATCH] arm64: dts: Enable ir-spi in the tm2 and tm2e boards
Message-ID<t89ah-kj-7@gated-at.bofh.it>
Add the device tree node for the ir-spi driver which enable the
ir led for remote controlling.

This patch sets first the GPR3[3] gpio line as a regulator-fixed
for enabling an external regulator which powers the IR LED.

Removes also the default assignment of the GPG3[5] and GPG3[7]
related to the SPI3 line.

Signed-off-by: Andi Shyti <andi.shyti@samsung.com>
---
 .../boot/dts/exynos/exynos5433-tm2-common.dtsi     | 27 ++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
index 098ad557fee3..c61df2318d8b 100644
--- a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
@@ -106,6 +106,13 @@
 		};
 	};
 
+	irda_regulator: irda-regulator {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpr3 3 0>;
+		regulator-name = "irda_regulator";
+	};
+
 	sound {
 		compatible = "samsung,tm2-audio";
 		audio-codec = <&wm5110>;
@@ -1073,8 +1080,6 @@
 
 		PIN(INPUT, gpg3-0, DOWN, FAST_SR1);
 		PIN(INPUT, gpg3-1, DOWN, FAST_SR1);
-		PIN(INPUT, gpg3-5, DOWN, FAST_SR1);
-		PIN(INPUT, gpg3-7, DOWN, FAST_SR1);
 	};
 };
 
@@ -1152,6 +1157,24 @@
 	};
 };
 
+&spi_3 {
+	status = "okay";
+	no-cs-readback;
+
+	irled@0 {
+		compatible = "ir-spi-led";
+		reg = <0x0>;
+		spi-max-frequency = <5000000>;
+		power-supply = <&irda_regulator>;
+		duty-cycle = <60>;
+		led-active-low;
+
+		controller-data {
+			samsung,spi-feedback-delay = <0>;
+		};
+	};
+};
+
 &timer {
 	clock-frequency = <24000000>;
 };
-- 
2.11.0

[toc] | [next] | [standalone]


#1576065

FromKrzysztof Kozlowski <krzk@kernel.org>
Date2017-02-07 22:20 +0100
Message-ID<t8ll7-86g-1@gated-at.bofh.it>
In reply to#1575452
On Tue, Feb 07, 2017 at 05:13:25PM +0900, Andi Shyti wrote:
> Add the device tree node for the ir-spi driver which enable the
> ir led for remote controlling.
> 
> This patch sets first the GPR3[3] gpio line as a regulator-fixed
> for enabling an external regulator which powers the IR LED.
> 
> Removes also the default assignment of the GPG3[5] and GPG3[7]
> related to the SPI3 line.
> 
> Signed-off-by: Andi Shyti <andi.shyti@samsung.com>
> ---
>  .../boot/dts/exynos/exynos5433-tm2-common.dtsi     | 27 ++++++++++++++++++++--
>  1 file changed, 25 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
> index 098ad557fee3..c61df2318d8b 100644
> --- a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
> +++ b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi
> @@ -106,6 +106,13 @@
>  		};
>  	};
>  
> +	irda_regulator: irda-regulator {
> +		compatible = "regulator-fixed";
> +		enable-active-high;
> +		gpio = <&gpr3 3 0>;

GPIO_ACTIVE_HIGH

> +		regulator-name = "irda_regulator";
> +	};
> +
>  	sound {
>  		compatible = "samsung,tm2-audio";
>  		audio-codec = <&wm5110>;
> @@ -1073,8 +1080,6 @@
>  
>  		PIN(INPUT, gpg3-0, DOWN, FAST_SR1);
>  		PIN(INPUT, gpg3-1, DOWN, FAST_SR1);
> -		PIN(INPUT, gpg3-5, DOWN, FAST_SR1);
> -		PIN(INPUT, gpg3-7, DOWN, FAST_SR1);

I think gpg3-5 would be missing its configuration. It is not present in
spi3 bus pins. Is it a chip select pin? If you remove the default
configuration, it will still work as input-pull down because no one is
setting different config. Why you need to touch gpg3-5?


Best regards,
Krzysztof

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web