diff mbox

[v2,06/10] ARM64: dts: rockchip: Add IR receiver to GeekBox

Message ID 1454897859-7601-7-git-send-email-afaerber@suse.de (mailing list archive)
State New, archived
Headers show

Commit Message

Andreas Färber Feb. 8, 2016, 2:17 a.m. UTC
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 v2: New
 
 arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Andreas Färber Feb. 9, 2016, 3:08 a.m. UTC | #1
Am 08.02.2016 um 03:17 schrieb Andreas Färber:
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  v2: New
>  
>  arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts b/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
> index e4523a74050f..e84383fd6f10 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
> @@ -63,6 +63,13 @@
>  		#clock-cells = <0>;
>  	};
>  
> +	ir: ir-receiver {
> +		compatible = "gpio-ir-receiver";
> +		gpios = <&gpio3 30 GPIO_ACTIVE_LOW>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&ir_int>;

		status = "disabled";

Should only be enabled in the new Landingship config. Will fix.

Andreas

P.S. See Heiko, two bugs in the new nodes already, glad I have them
separate. :)

> +	};
> +
>  	leds: gpio-leds {
>  		compatible = "gpio-leds";
>  
[snip]
Julien Chauveau Feb. 9, 2016, 10:45 a.m. UTC | #2
Le 09/02/2016 04:08, Andreas Färber a écrit :
> Am 08.02.2016 um 03:17 schrieb Andreas Färber:
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
>> ---
>>   v2: New
>>   
>>   arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts | 13 +++++++++++++
>>   1 file changed, 13 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts b/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
>> index e4523a74050f..e84383fd6f10 100644
>> --- a/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
>> +++ b/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
>> @@ -63,6 +63,13 @@
>>   		#clock-cells = <0>;
>>   	};
>>   
>> +	ir: ir-receiver {
>> +		compatible = "gpio-ir-receiver";
>> +		gpios = <&gpio3 30 GPIO_ACTIVE_LOW>;
>> +		pinctrl-names = "default";
>> +		pinctrl-0 = <&ir_int>;
> 		status = "disabled";
>
> Should only be enabled in the new Landingship config. Will fix.
>
> Andreas
Actually there's two IR receivers:
- one on the geekbox module (on the bottom side)
- and another one on the landingship.

Both are connected to the same GPIO pin, so you can keep it enabled in 
the main geekbox dts.

About the pinctrl, same remark as for gpio-keys: there's already 
external pull-up resistors on this pin, so it should be better to use 
pcfg_pull_none instead of pcfg_pull_up.

Julien
>
> P.S. See Heiko, two bugs in the new nodes already, glad I have them
> separate. :)
>
>> +	};
>> +
>>   	leds: gpio-leds {
>>   		compatible = "gpio-leds";
>>   
> [snip]
>
diff mbox

Patch

diff --git a/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts b/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
index e4523a74050f..e84383fd6f10 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
@@ -63,6 +63,13 @@ 
 		#clock-cells = <0>;
 	};
 
+	ir: ir-receiver {
+		compatible = "gpio-ir-receiver";
+		gpios = <&gpio3 30 GPIO_ACTIVE_LOW>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&ir_int>;
+	};
+
 	leds: gpio-leds {
 		compatible = "gpio-leds";
 
@@ -252,6 +259,12 @@ 
 };
 
 &pinctrl {
+	ir {
+		ir_int: ir-int {
+			rockchip,pins = <3 30 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+
 	pmic {
 		pmic_sleep: pmic-sleep {
 			rockchip,pins = <0 0 RK_FUNC_2 &pcfg_pull_none>;