Skip to contentSkip to conversation

IR remote (input) support for Odroid-C1 and cleanups

PATCH New Martin Blumenstingl 2 participants 4 messages May 6, 2018 – May 9, 2018

Subsystems (2)
lore
Share & tools
lore

Martin Blumenstingl

author reviewer
#0 lore raw

cover IR remote (input) support for Odroid-C1 and cleanups

While testing my Odroid-C1 I found that the IR remote receiver was still disabled. While enabling it I saw that the nodes in meson8b-odroidc1.dts were not sorted alphabetically.

This small series:
- first cleans up the sort order of the nodes in meson8b-odroidc1.dts
- then adds the configuration for GPIOAO_7 so it's routed to the SoCs "IR receiver" and enables that in meson8b-odroidc1.dts

Martin Blumenstingl (2):
ARM: dts: meson8b: odroid-c1: sort nodes alphabetically
ARM: dts: meson8b: odroid-c1: enable the IR receiver

 arch/arm/boot/dts/meson8b-odroidc1.dts | 68 ++++++++++++++------------
 arch/arm/boot/dts/meson8b.dtsi         |  7 +++
 2 files changed, 44 insertions(+), 31 deletions(-)
Signature · 1 line
2.17.0
author reviewer
#1 lore raw

PATCH 1/2 ARM: dts: meson8b: odroid-c1: sort nodes alphabetically

This makes it easier to find existing nodes. No functional changes.

---
 arch/arm/boot/dts/meson8b-odroidc1.dts | 68 +++++++++++++-------------
 1 file changed, 34 insertions(+), 34 deletions(-)
arch/arm/boot/dts/meson8b-odroidc1.dts +34 -34
index 3a5603d95b70..7d8ad468a25b 100644
@@ -103,10 +103,34 @@
 	};
 };
 
-&uart_AO {
+&ethmac {
 	status = "okay";
-	pinctrl-0 = <&uart_ao_a_pins>;
+
+	snps,reset-gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>;
+	snps,reset-active-low;
+	snps,reset-delays-us = <0 10000 30000>;
+
+	pinctrl-0 = <&eth_rgmii_pins>;
 	pinctrl-names = "default";
+
+	phy-mode = "rgmii";
+	phy-handle = <&eth_phy>;
+	amlogic,tx-delay-ns = <4>;
+
+	mdio {
+		compatible = "snps,dwmac-mdio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/* Realtek RTL8211F (0x001cc916) */
+		eth_phy: ethernet-phy at 0 {
+			reg = <0>;
+			eee-broken-1000t;
+			interrupt-parent = <&gpio_intc>;
+			/* GPIOH_3 */
+			interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
+		};
+	};
 };
 
 &gpio_ao {
@@ -124,14 +148,6 @@
 	};
 };
 
-&usb1_phy {
-	status = "okay";
-};
-
-&usb1 {
-	status = "okay";
-};
-
 &sdio {
 	status = "okay";
 
@@ -158,32 +174,16 @@
 	};
 };
 
-&ethmac {
+&uart_AO {
 	status = "okay";
-
-	snps,reset-gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>;
-	snps,reset-active-low;
-	snps,reset-delays-us = <0 10000 30000>;
-
-	pinctrl-0 = <&eth_rgmii_pins>;
+	pinctrl-0 = <&uart_ao_a_pins>;
 	pinctrl-names = "default";
+};
 
-	phy-mode = "rgmii";
-	phy-handle = <&eth_phy>;
-	amlogic,tx-delay-ns = <4>;
-
-	mdio {
-		compatible = "snps,dwmac-mdio";
-		#address-cells = <1>;
-		#size-cells = <0>;
+&usb1_phy {
+	status = "okay";
+};
 
-		/* Realtek RTL8211F (0x001cc916) */
-		eth_phy: ethernet-phy at 0 {
-			reg = <0>;
-			eee-broken-1000t;
-			interrupt-parent = <&gpio_intc>;
-			/* GPIOH_3 */
-			interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
-		};
-	};
+&usb1 {
+	status = "okay";
 };
Signature · 1 line
2.17.0
author reviewer
#2 lore raw

PATCH 2/2 ARM: dts: meson8b: odroid-c1: enable the IR receiver

In reply to Martin Blumenstingl

The Odroid-C1 comes with an IR receiver. It is connected to the GPIOAO_7 pin and thus using the SoC's internal IR decoder.

---
 arch/arm/boot/dts/meson8b-odroidc1.dts | 6 ++++++
 arch/arm/boot/dts/meson8b.dtsi         | 7 +++++++
 2 files changed, 13 insertions(+)
arch/arm/boot/dts/meson8b-odroidc1.dts +6 -0
index 7d8ad468a25b..ef3177d3da3d 100644
@@ -148,6 +148,12 @@
 	};
 };
 
+&ir_receiver {
+	status = "okay";
+	pinctrl-0 = <&ir_recv_pins>;
+	pinctrl-names = "default";
+};
+
 &sdio {
 	status = "okay";
 
arch/arm/boot/dts/meson8b.dtsi +7 -0
index 5deff6819f7d..91fc8d784803 100644
@@ -148,6 +148,13 @@
 				function = "uart_ao";
 			};
 		};
+
+		ir_recv_pins: remote {
+			mux {
+				groups = "remote_input";
+				function = "remote";
+			};
+		};
 	};
 };
 
Signature · 1 line
2.17.0
maintainer Applied
#3 lore raw

cover IR remote (input) support for Odroid-C1 and cleanups

In reply to Martin Blumenstingl
Quoted 6 lines · Martin Blumenstingl

While testing my Odroid-C1 I found that the IR remote receiver was still disabled. While enabling it I saw that the nodes in meson8b-odroidc1.dts were not sorted alphabetically.

This small series:
- first cleans up the sort order of the nodes in meson8b-odroidc1.dts

Nice, thanks!

Quoted 2 lines

- then adds the configuration for GPIOAO_7 so it's routed to the SoCs "IR receiver" and enables that in meson8b-odroidc1.dts

Applied both to v4.17/dt,

Thanks,

Kevin

Quoted 8 lines

Martin Blumenstingl (2):
ARM: dts: meson8b: odroid-c1: sort nodes alphabetically
ARM: dts: meson8b: odroid-c1: enable the IR receiver

 arch/arm/boot/dts/meson8b-odroidc1.dts | 68 ++++++++++++++------------
 arch/arm/boot/dts/meson8b.dtsi         |  7 +++
 2 files changed, 44 insertions(+), 31 deletions(-)