linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] Allwiner A64/H6 IR support
@ 2019-05-25 18:09 Clément Péron
  2019-05-25 18:09 ` [PATCH 01/10] dt-bindings: media: A31 compatible Clément Péron
                   ` (9 more replies)
  0 siblings, 10 replies; 15+ messages in thread
From: Clément Péron @ 2019-05-25 18:09 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Rob Herring, Mark Rutland, Maxime Ripard,
	Chen-Yu Tsai
  Cc: linux-media, devicetree, linux-arm-kernel, linux-kernel,
	Clément Péron

Hi,

A64 IR support series[1] pointed out that an A31 bindinds should be
introduced.

This series introduce the A31 compatible bindings, then switch it on
the already existing board.

Finally introduce A64 and H6 support.

Regards,
Clément

[1] https://lore.kernel.org/patchwork/patch/1031390/#1221464

Clément Péron (8):
  dt-bindings: media: A31 compatible
  media: rc: sunxi: Add A31 compatible
  ARM: dts: sunxi: prefer A31 instead of A13 for ir
  dt-bindings: media: sunxi-ir: Add A64 compatible
  dt-bindings: media: sunxi-ir: Add H6 compatible
  arm64: dts: allwiner: h6: Add IR receiver node
  arm64: dts: allwinner: h6: Enable IR on H6 boards
  arm64: defconfig: enable IR SUNXI option

Igors Makejevs (1):
  arm64: dts: allwinner: a64: Add IR node

Jernej Skrabec (1):
  arm64: dts: allwinner: a64: Enable IR on Orange Pi Win

 .../devicetree/bindings/media/sunxi-ir.txt    |  7 ++++++-
 arch/arm/boot/dts/sun6i-a31.dtsi              |  2 +-
 arch/arm/boot/dts/sun8i-a83t.dtsi             |  2 +-
 arch/arm/boot/dts/sun9i-a80.dtsi              |  2 +-
 arch/arm/boot/dts/sunxi-h3-h5.dtsi            |  2 +-
 .../dts/allwinner/sun50i-a64-orangepi-win.dts |  4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 18 ++++++++++++++++++
 .../dts/allwinner/sun50i-h6-beelink-gs1.dts   |  4 ++++
 .../dts/allwinner/sun50i-h6-orangepi.dtsi     |  4 ++++
 .../boot/dts/allwinner/sun50i-h6-pine-h64.dts |  4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi  | 19 +++++++++++++++++++
 arch/arm64/configs/defconfig                  |  1 +
 drivers/media/rc/sunxi-cir.c                  |  1 +
 13 files changed, 65 insertions(+), 5 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 01/10] dt-bindings: media: A31 compatible
  2019-05-25 18:09 [PATCH 00/10] Allwiner A64/H6 IR support Clément Péron
@ 2019-05-25 18:09 ` Clément Péron
  2019-05-26 19:02   ` Maxime Ripard
  2019-05-25 18:09 ` [PATCH 02/10] media: rc: sunxi: Add " Clément Péron
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 15+ messages in thread
From: Clément Péron @ 2019-05-25 18:09 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Rob Herring, Mark Rutland, Maxime Ripard,
	Chen-Yu Tsai
  Cc: linux-media, devicetree, linux-arm-kernel, linux-kernel,
	Clément Péron

Since Allwiner A31 all the SoC have a differente memory mapping.

Introduce this bindings to make a difference since this generation.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 Documentation/devicetree/bindings/media/sunxi-ir.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/media/sunxi-ir.txt b/Documentation/devicetree/bindings/media/sunxi-ir.txt
index 278098987edb..53e88ebb53fe 100644
--- a/Documentation/devicetree/bindings/media/sunxi-ir.txt
+++ b/Documentation/devicetree/bindings/media/sunxi-ir.txt
@@ -1,7 +1,10 @@
 Device-Tree bindings for SUNXI IR controller found in sunXi SoC family
 
 Required properties:
-- compatible	    : "allwinner,sun4i-a10-ir" or "allwinner,sun5i-a13-ir"
+- compatible	    :
+	"allwinner,sun4i-a10-ir"
+	"allwinner,sun5i-a13-ir"
+	"allwinner,sun6i-a31-ir"
 - clocks	    : list of clock specifiers, corresponding to
 		      entries in clock-names property;
 - clock-names	    : should contain "apb" and "ir" entries;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 02/10] media: rc: sunxi: Add A31 compatible
  2019-05-25 18:09 [PATCH 00/10] Allwiner A64/H6 IR support Clément Péron
  2019-05-25 18:09 ` [PATCH 01/10] dt-bindings: media: A31 compatible Clément Péron
@ 2019-05-25 18:09 ` Clément Péron
  2019-05-25 18:09 ` [PATCH 03/10] ARM: dts: sunxi: prefer A31 instead of A13 for ir Clément Péron
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Clément Péron @ 2019-05-25 18:09 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Rob Herring, Mark Rutland, Maxime Ripard,
	Chen-Yu Tsai
  Cc: linux-media, devicetree, linux-arm-kernel, linux-kernel,
	Clément Péron

A31 have a different memory mapping so add the compatible
we will need it later.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 drivers/media/rc/sunxi-cir.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/rc/sunxi-cir.c b/drivers/media/rc/sunxi-cir.c
index 307e44714ea0..29ac33b68596 100644
--- a/drivers/media/rc/sunxi-cir.c
+++ b/drivers/media/rc/sunxi-cir.c
@@ -319,6 +319,7 @@ static int sunxi_ir_remove(struct platform_device *pdev)
 static const struct of_device_id sunxi_ir_match[] = {
 	{ .compatible = "allwinner,sun4i-a10-ir", },
 	{ .compatible = "allwinner,sun5i-a13-ir", },
+	{ .compatible = "allwinner,sun6i-a31-ir", },
 	{},
 };
 MODULE_DEVICE_TABLE(of, sunxi_ir_match);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 03/10] ARM: dts: sunxi: prefer A31 instead of A13 for ir
  2019-05-25 18:09 [PATCH 00/10] Allwiner A64/H6 IR support Clément Péron
  2019-05-25 18:09 ` [PATCH 01/10] dt-bindings: media: A31 compatible Clément Péron
  2019-05-25 18:09 ` [PATCH 02/10] media: rc: sunxi: Add " Clément Péron
@ 2019-05-25 18:09 ` Clément Péron
  2019-05-25 18:09 ` [PATCH 04/10] dt-bindings: media: sunxi-ir: Add A64 compatible Clément Péron
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Clément Péron @ 2019-05-25 18:09 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Rob Herring, Mark Rutland, Maxime Ripard,
	Chen-Yu Tsai
  Cc: linux-media, devicetree, linux-arm-kernel, linux-kernel,
	Clément Péron

Since A31 memory mapping of the IR driver has changed.

Prefer the A31 bindings instead of A13.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 arch/arm/boot/dts/sun6i-a31.dtsi   | 2 +-
 arch/arm/boot/dts/sun8i-a83t.dtsi  | 2 +-
 arch/arm/boot/dts/sun9i-a80.dtsi   | 2 +-
 arch/arm/boot/dts/sunxi-h3-h5.dtsi | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi
index c04efad81bbc..110622b30796 100644
--- a/arch/arm/boot/dts/sun6i-a31.dtsi
+++ b/arch/arm/boot/dts/sun6i-a31.dtsi
@@ -1351,7 +1351,7 @@
 		};
 
 		ir: ir@1f02000 {
-			compatible = "allwinner,sun5i-a13-ir";
+			compatible = "allwinner,sun6i-a31-ir";
 			clocks = <&apb0_gates 1>, <&ir_clk>;
 			clock-names = "apb", "ir";
 			resets = <&apb0_rst 1>;
diff --git a/arch/arm/boot/dts/sun8i-a83t.dtsi b/arch/arm/boot/dts/sun8i-a83t.dtsi
index 392b0cabbf0d..8d603f3309f2 100644
--- a/arch/arm/boot/dts/sun8i-a83t.dtsi
+++ b/arch/arm/boot/dts/sun8i-a83t.dtsi
@@ -1067,7 +1067,7 @@
 
 		r_cir: ir@1f02000 {
 			compatible = "allwinner,sun8i-a83t-ir",
-				"allwinner,sun5i-a13-ir";
+				"allwinner,sun6i-a31-ir";
 			clocks = <&r_ccu CLK_APB0_IR>, <&r_ccu CLK_IR>;
 			clock-names = "apb", "ir";
 			resets = <&r_ccu RST_APB0_IR>;
diff --git a/arch/arm/boot/dts/sun9i-a80.dtsi b/arch/arm/boot/dts/sun9i-a80.dtsi
index 0c1eec9000e3..310cd972ee5b 100644
--- a/arch/arm/boot/dts/sun9i-a80.dtsi
+++ b/arch/arm/boot/dts/sun9i-a80.dtsi
@@ -1167,7 +1167,7 @@
 		};
 
 		r_ir: ir@8002000 {
-			compatible = "allwinner,sun5i-a13-ir";
+			compatible = "allwinner,sun6i-a31-ir";
 			interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&r_ir_pins>;
diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
index 84977d4eb97a..f0f5ba349c1b 100644
--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi
+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
@@ -822,7 +822,7 @@
 		};
 
 		ir: ir@1f02000 {
-			compatible = "allwinner,sun5i-a13-ir";
+			compatible = "allwinner,sun6i-a31-ir";
 			clocks = <&r_ccu CLK_APB0_IR>, <&r_ccu CLK_IR>;
 			clock-names = "apb", "ir";
 			resets = <&r_ccu RST_APB0_IR>;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 04/10] dt-bindings: media: sunxi-ir: Add A64 compatible
  2019-05-25 18:09 [PATCH 00/10] Allwiner A64/H6 IR support Clément Péron
                   ` (2 preceding siblings ...)
  2019-05-25 18:09 ` [PATCH 03/10] ARM: dts: sunxi: prefer A31 instead of A13 for ir Clément Péron
@ 2019-05-25 18:09 ` Clément Péron
  2019-05-26 19:04   ` Maxime Ripard
  2019-05-25 18:09 ` [PATCH 05/10] arm64: dts: allwinner: a64: Add IR node Clément Péron
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 15+ messages in thread
From: Clément Péron @ 2019-05-25 18:09 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Rob Herring, Mark Rutland, Maxime Ripard,
	Chen-Yu Tsai
  Cc: linux-media, devicetree, linux-arm-kernel, linux-kernel,
	Clément Péron

There is some minor differences between A31 and A64 driver.

But A31 IR driver is compatible with A64.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 Documentation/devicetree/bindings/media/sunxi-ir.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/media/sunxi-ir.txt b/Documentation/devicetree/bindings/media/sunxi-ir.txt
index 53e88ebb53fe..da5aeba843de 100644
--- a/Documentation/devicetree/bindings/media/sunxi-ir.txt
+++ b/Documentation/devicetree/bindings/media/sunxi-ir.txt
@@ -5,6 +5,7 @@ Required properties:
 	"allwinner,sun4i-a10-ir"
 	"allwinner,sun5i-a13-ir"
 	"allwinner,sun6i-a31-ir"
+	"allwinner,sun50i-a64-ir", "allwinner,sun6i-a31-ir"
 - clocks	    : list of clock specifiers, corresponding to
 		      entries in clock-names property;
 - clock-names	    : should contain "apb" and "ir" entries;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 05/10] arm64: dts: allwinner: a64: Add IR node
  2019-05-25 18:09 [PATCH 00/10] Allwiner A64/H6 IR support Clément Péron
                   ` (3 preceding siblings ...)
  2019-05-25 18:09 ` [PATCH 04/10] dt-bindings: media: sunxi-ir: Add A64 compatible Clément Péron
@ 2019-05-25 18:09 ` Clément Péron
  2019-05-25 18:09 ` [PATCH 06/10] arm64: dts: allwinner: a64: Enable IR on Orange Pi Win Clément Péron
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Clément Péron @ 2019-05-25 18:09 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Rob Herring, Mark Rutland, Maxime Ripard,
	Chen-Yu Tsai
  Cc: linux-media, devicetree, linux-arm-kernel, linux-kernel,
	Igors Makejevs, Jernej Skrabec, Clément Péron

From: Igors Makejevs <git_bb@bwzone.com>

IR peripheral is completely compatible with A31 one.

Signed-off-by: Igors Makejevs <git_bb@bwzone.com>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 8c5b521e6389..b22b0aa89515 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -1072,6 +1072,19 @@
 			#size-cells = <0>;
 		};
 
+		r_ir: ir@1f02000 {
+			compatible = "allwinner,sun50i-a64-ir",
+				     "allwinner,sun6i-a31-ir";
+			reg = <0x01f02000 0x400>;
+			clocks = <&r_ccu CLK_APB0_IR>, <&r_ccu CLK_IR>;
+			clock-names = "apb", "ir";
+			resets = <&r_ccu RST_APB0_IR>;
+			interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&r_ir_rx_pin>;
+			status = "disabled";
+		};
+
 		r_pwm: pwm@1f03800 {
 			compatible = "allwinner,sun50i-a64-pwm",
 				     "allwinner,sun5i-a13-pwm";
@@ -1099,6 +1112,11 @@
 				function = "s_i2c";
 			};
 
+			r_ir_rx_pin: r-ir-rx-pin {
+				pins = "PL11";
+				function = "s_cir_rx";
+			};
+
 			r_pwm_pin: r-pwm-pin {
 				pins = "PL10";
 				function = "s_pwm";
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 06/10] arm64: dts: allwinner: a64: Enable IR on Orange Pi Win
  2019-05-25 18:09 [PATCH 00/10] Allwiner A64/H6 IR support Clément Péron
                   ` (4 preceding siblings ...)
  2019-05-25 18:09 ` [PATCH 05/10] arm64: dts: allwinner: a64: Add IR node Clément Péron
@ 2019-05-25 18:09 ` Clément Péron
  2019-05-25 18:09 ` [PATCH 07/10] dt-bindings: media: sunxi-ir: Add H6 compatible Clément Péron
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Clément Péron @ 2019-05-25 18:09 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Rob Herring, Mark Rutland, Maxime Ripard,
	Chen-Yu Tsai
  Cc: linux-media, devicetree, linux-arm-kernel, linux-kernel,
	Jernej Skrabec, Clément Péron

From: Jernej Skrabec <jernej.skrabec@siol.net>

OrangePi Win board contains IR receiver. Enable it.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
index 510f661229dc..e05191b71adf 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
@@ -180,6 +180,10 @@
 	status = "okay";
 };
 
+&r_ir {
+	status = "okay";
+};
+
 &r_rsb {
 	status = "okay";
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 07/10] dt-bindings: media: sunxi-ir: Add H6 compatible
  2019-05-25 18:09 [PATCH 00/10] Allwiner A64/H6 IR support Clément Péron
                   ` (5 preceding siblings ...)
  2019-05-25 18:09 ` [PATCH 06/10] arm64: dts: allwinner: a64: Enable IR on Orange Pi Win Clément Péron
@ 2019-05-25 18:09 ` Clément Péron
  2019-05-25 18:09 ` [PATCH 08/10] arm64: dts: allwiner: h6: Add IR receiver node Clément Péron
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Clément Péron @ 2019-05-25 18:09 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Rob Herring, Mark Rutland, Maxime Ripard,
	Chen-Yu Tsai
  Cc: linux-media, devicetree, linux-arm-kernel, linux-kernel,
	Clément Péron

There is some minor differences between A31 or A64 and H6 driver.

But A31 IR driver is compatible with H6.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 Documentation/devicetree/bindings/media/sunxi-ir.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/media/sunxi-ir.txt b/Documentation/devicetree/bindings/media/sunxi-ir.txt
index da5aeba843de..dc959ce84528 100644
--- a/Documentation/devicetree/bindings/media/sunxi-ir.txt
+++ b/Documentation/devicetree/bindings/media/sunxi-ir.txt
@@ -6,6 +6,7 @@ Required properties:
 	"allwinner,sun5i-a13-ir"
 	"allwinner,sun6i-a31-ir"
 	"allwinner,sun50i-a64-ir", "allwinner,sun6i-a31-ir"
+	"allwinner,sun50i-h6-ir", "allwinner,sun6i-a31-ir"
 - clocks	    : list of clock specifiers, corresponding to
 		      entries in clock-names property;
 - clock-names	    : should contain "apb" and "ir" entries;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 08/10] arm64: dts: allwiner: h6: Add IR receiver node
  2019-05-25 18:09 [PATCH 00/10] Allwiner A64/H6 IR support Clément Péron
                   ` (6 preceding siblings ...)
  2019-05-25 18:09 ` [PATCH 07/10] dt-bindings: media: sunxi-ir: Add H6 compatible Clément Péron
@ 2019-05-25 18:09 ` Clément Péron
  2019-05-25 18:09 ` [PATCH 09/10] arm64: dts: allwinner: h6: Enable IR on H6 boards Clément Péron
  2019-05-25 18:09 ` [PATCH 10/10] arm64: defconfig: enable IR SUNXI option Clément Péron
  9 siblings, 0 replies; 15+ messages in thread
From: Clément Péron @ 2019-05-25 18:09 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Rob Herring, Mark Rutland, Maxime Ripard,
	Chen-Yu Tsai
  Cc: linux-media, devicetree, linux-arm-kernel, linux-kernel,
	Clément Péron

Allwiner H6 IR is similar to A31 and can use same driver.

Add support for it.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
index 16c5c3d0fd81..649cbdfe452e 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
@@ -647,6 +647,25 @@
 				pins = "PL0", "PL1";
 				function = "s_i2c";
 			};
+
+			r_ir_rx_pin: r-ir-rx-pin {
+				pins = "PL9";
+				function = "s_cir_rx";
+			};
+		};
+
+		r_ir: ir@7040000 {
+				compatible = "allwinner,sun50i-h6-ir",
+					     "allwinner,sun6i-a31-ir";
+				reg = <0x07040000 0x400>;
+				interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&r_ccu CLK_R_APB1_IR>,
+					 <&r_ccu CLK_IR>;
+				clock-names = "apb", "ir";
+				resets = <&r_ccu RST_R_APB1_IR>;
+				pinctrl-names = "default";
+				pinctrl-0 = <&r_ir_rx_pin>;
+				status = "disabled";
 		};
 
 		r_i2c: i2c@7081400 {
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 09/10] arm64: dts: allwinner: h6: Enable IR on H6 boards
  2019-05-25 18:09 [PATCH 00/10] Allwiner A64/H6 IR support Clément Péron
                   ` (7 preceding siblings ...)
  2019-05-25 18:09 ` [PATCH 08/10] arm64: dts: allwiner: h6: Add IR receiver node Clément Péron
@ 2019-05-25 18:09 ` Clément Péron
  2019-05-25 18:09 ` [PATCH 10/10] arm64: defconfig: enable IR SUNXI option Clément Péron
  9 siblings, 0 replies; 15+ messages in thread
From: Clément Péron @ 2019-05-25 18:09 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Rob Herring, Mark Rutland, Maxime Ripard,
	Chen-Yu Tsai
  Cc: linux-media, devicetree, linux-arm-kernel, linux-kernel,
	Clément Péron

Beelink GS1, OrangePi H6 boards and Pine H64  have an IR receiver.

Enable it in their device-tree.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi   | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts    | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
index 0dc33c90dd60..680dc29cb089 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
@@ -232,6 +232,10 @@
 	};
 };
 
+&r_ir {
+	status = "okay";
+};
+
 &r_pio {
 	/*
 	 * PL0 and PL1 are used for PMIC I2C
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
index 62e27948a3fa..ec9b6a578e3f 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
@@ -189,6 +189,10 @@
 	};
 };
 
+&r_ir {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_ph_pins>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
index 4802902e128f..ae12ee4fcc77 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
@@ -247,6 +247,10 @@
 	};
 };
 
+&r_ir {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_ph_pins>;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 10/10] arm64: defconfig: enable IR SUNXI option
  2019-05-25 18:09 [PATCH 00/10] Allwiner A64/H6 IR support Clément Péron
                   ` (8 preceding siblings ...)
  2019-05-25 18:09 ` [PATCH 09/10] arm64: dts: allwinner: h6: Enable IR on H6 boards Clément Péron
@ 2019-05-25 18:09 ` Clément Péron
  9 siblings, 0 replies; 15+ messages in thread
From: Clément Péron @ 2019-05-25 18:09 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Rob Herring, Mark Rutland, Maxime Ripard,
	Chen-Yu Tsai
  Cc: linux-media, devicetree, linux-arm-kernel, linux-kernel,
	Clément Péron

Enable CONFIG_IR_SUNXI option for ARM64, so that the Allwinner A64/H6 SoCs
can use their IR receiver controller.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 4d583514258c..5128029100d2 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -460,6 +460,7 @@ CONFIG_RC_CORE=m
 CONFIG_RC_DECODERS=y
 CONFIG_RC_DEVICES=y
 CONFIG_IR_MESON=m
+CONFIG_IR_SUNXI=m
 CONFIG_MEDIA_SUPPORT=m
 CONFIG_MEDIA_CAMERA_SUPPORT=y
 CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH 01/10] dt-bindings: media: A31 compatible
  2019-05-25 18:09 ` [PATCH 01/10] dt-bindings: media: A31 compatible Clément Péron
@ 2019-05-26 19:02   ` Maxime Ripard
  2019-05-26 19:08     ` Clément Péron
  0 siblings, 1 reply; 15+ messages in thread
From: Maxime Ripard @ 2019-05-26 19:02 UTC (permalink / raw)
  To: Clément Péron
  Cc: Mauro Carvalho Chehab, Rob Herring, Mark Rutland, Chen-Yu Tsai,
	linux-media, devicetree, linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 421 bytes --]

On Sat, May 25, 2019 at 08:09:14PM +0200, Clément Péron wrote:
> Since Allwiner A31 all the SoC have a differente memory mapping.
>
> Introduce this bindings to make a difference since this generation.
>
> Signed-off-by: Clément Péron <peron.clem@gmail.com>

Mentionning what those differences are would be great

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 04/10] dt-bindings: media: sunxi-ir: Add A64 compatible
  2019-05-25 18:09 ` [PATCH 04/10] dt-bindings: media: sunxi-ir: Add A64 compatible Clément Péron
@ 2019-05-26 19:04   ` Maxime Ripard
  2019-05-26 19:15     ` Clément Péron
  0 siblings, 1 reply; 15+ messages in thread
From: Maxime Ripard @ 2019-05-26 19:04 UTC (permalink / raw)
  To: Clément Péron
  Cc: Mauro Carvalho Chehab, Rob Herring, Mark Rutland, Chen-Yu Tsai,
	linux-media, devicetree, linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 982 bytes --]

On Sat, May 25, 2019 at 08:09:17PM +0200, Clément Péron wrote:
> There is some minor differences between A31 and A64 driver.
>
> But A31 IR driver is compatible with A64.
>
> Signed-off-by: Clément Péron <peron.clem@gmail.com>
> ---
>  Documentation/devicetree/bindings/media/sunxi-ir.txt | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/media/sunxi-ir.txt b/Documentation/devicetree/bindings/media/sunxi-ir.txt
> index 53e88ebb53fe..da5aeba843de 100644
> --- a/Documentation/devicetree/bindings/media/sunxi-ir.txt
> +++ b/Documentation/devicetree/bindings/media/sunxi-ir.txt
> @@ -5,6 +5,7 @@ Required properties:
>  	"allwinner,sun4i-a10-ir"
>  	"allwinner,sun5i-a13-ir"
>  	"allwinner,sun6i-a31-ir"
> +	"allwinner,sun50i-a64-ir", "allwinner,sun6i-a31-ir"

I guess resets is mandatory for the A31 onwards too, right?

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 01/10] dt-bindings: media: A31 compatible
  2019-05-26 19:02   ` Maxime Ripard
@ 2019-05-26 19:08     ` Clément Péron
  0 siblings, 0 replies; 15+ messages in thread
From: Clément Péron @ 2019-05-26 19:08 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Mauro Carvalho Chehab, Rob Herring, Mark Rutland, Chen-Yu Tsai,
	linux-media, devicetree, linux-arm-kernel, linux-kernel

Hi Maxime,

On Sun, 26 May 2019 at 21:02, Maxime Ripard <maxime.ripard@bootlin.com> wrote:
>
> On Sat, May 25, 2019 at 08:09:14PM +0200, Clément Péron wrote:
> > Since Allwiner A31 all the SoC have a differente memory mapping.
> >
> > Introduce this bindings to make a difference since this generation.
> >
> > Signed-off-by: Clément Péron <peron.clem@gmail.com>
>
> Mentionning what those differences are would be great

Will do,
Thanks for the review,
Clément

>
> Maxime
>
> --
> Maxime Ripard, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com, "Missing dma-requests, using %u.\n",
> > -                      DMA_CHAN_MAX_DRQ_A31);
> > -             sdc->max_request = DMA_CHAN_MAX_DRQ_A31;
> > +                      DMA_CHAN_MA

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 04/10] dt-bindings: media: sunxi-ir: Add A64 compatible
  2019-05-26 19:04   ` Maxime Ripard
@ 2019-05-26 19:15     ` Clément Péron
  0 siblings, 0 replies; 15+ messages in thread
From: Clément Péron @ 2019-05-26 19:15 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Mauro Carvalho Chehab, Rob Herring, Mark Rutland, Chen-Yu Tsai,
	linux-media, devicetree, linux-arm-kernel, linux-kernel

Hi Maxime,

On Sun, 26 May 2019 at 21:04, Maxime Ripard <maxime.ripard@bootlin.com> wrote:
>
> On Sat, May 25, 2019 at 08:09:17PM +0200, Clément Péron wrote:
> > There is some minor differences between A31 and A64 driver.
> >
> > But A31 IR driver is compatible with A64.
> >
> > Signed-off-by: Clément Péron <peron.clem@gmail.com>
> > ---
> >  Documentation/devicetree/bindings/media/sunxi-ir.txt | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/Documentation/devicetree/bindings/media/sunxi-ir.txt b/Documentation/devicetree/bindings/media/sunxi-ir.txt
> > index 53e88ebb53fe..da5aeba843de 100644
> > --- a/Documentation/devicetree/bindings/media/sunxi-ir.txt
> > +++ b/Documentation/devicetree/bindings/media/sunxi-ir.txt
> > @@ -5,6 +5,7 @@ Required properties:
> >       "allwinner,sun4i-a10-ir"
> >       "allwinner,sun5i-a13-ir"
> >       "allwinner,sun6i-a31-ir"
> > +     "allwinner,sun50i-a64-ir", "allwinner,sun6i-a31-ir"
>
> I guess resets is mandatory for the A31 onwards too, right?

Indeed, I will add this information in the device-tree bindings.
Ideally, we should also introduce a quirks with a "has_reset" property.

Thanks for your review,
Clément

>
> Maxime
>
> --
> Maxime Ripard, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-05-26 19:16 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-25 18:09 [PATCH 00/10] Allwiner A64/H6 IR support Clément Péron
2019-05-25 18:09 ` [PATCH 01/10] dt-bindings: media: A31 compatible Clément Péron
2019-05-26 19:02   ` Maxime Ripard
2019-05-26 19:08     ` Clément Péron
2019-05-25 18:09 ` [PATCH 02/10] media: rc: sunxi: Add " Clément Péron
2019-05-25 18:09 ` [PATCH 03/10] ARM: dts: sunxi: prefer A31 instead of A13 for ir Clément Péron
2019-05-25 18:09 ` [PATCH 04/10] dt-bindings: media: sunxi-ir: Add A64 compatible Clément Péron
2019-05-26 19:04   ` Maxime Ripard
2019-05-26 19:15     ` Clément Péron
2019-05-25 18:09 ` [PATCH 05/10] arm64: dts: allwinner: a64: Add IR node Clément Péron
2019-05-25 18:09 ` [PATCH 06/10] arm64: dts: allwinner: a64: Enable IR on Orange Pi Win Clément Péron
2019-05-25 18:09 ` [PATCH 07/10] dt-bindings: media: sunxi-ir: Add H6 compatible Clément Péron
2019-05-25 18:09 ` [PATCH 08/10] arm64: dts: allwiner: h6: Add IR receiver node Clément Péron
2019-05-25 18:09 ` [PATCH 09/10] arm64: dts: allwinner: h6: Enable IR on H6 boards Clément Péron
2019-05-25 18:09 ` [PATCH 10/10] arm64: defconfig: enable IR SUNXI option Clément Péron

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).