All of lore.kernel.org
 help / color / mirror / Atom feed
* [v2] media: rc: fix Meson IR decoder
@ 2016-06-26 21:06 ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-06-26 21:06 UTC (permalink / raw)
  To: b.galvani, linux-media, linux-amlogic
  Cc: linux-arm-kernel, khilman, carlo, mchehab, tobetter, devicetree,
	robh+dt, pawel.moll, mark.rutland

The meson-ir driver uses the wrong offset (at least according to
Amlogic's reference driver as well as the datasheets of the
Meson8b/S805 and GXBB/S905).
This means that we are getting incorrect durations (REG1_TIME_IV)
reported from the hardware.

This problem was also noticed by some people trying to use this on an
ODROID-C1 and ODROID-C2 - the workaround there (probably because the
datasheets were not publicy available yet at that time) was to switch
to ir_raw_event_store_edge (which leaves it up to the kernel to measure
the duration of a pulse). See [0] and [1] for the corresponding
patches.

Please note that I was only able to test this on an GXBB/S905 based
device (due to lack of other hardware).


[0] https://github.com/erdoukki/linux-amlogic-1/commit/969b2e2242fb14a13cb651f9a1cf771b599c958b
[1] http://forum.odroid.com/viewtopic.php?f=135&t=20504

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

* [v2] media: rc: fix Meson IR decoder
@ 2016-06-26 21:06 ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-06-26 21:06 UTC (permalink / raw)
  To: linux-arm-kernel

The meson-ir driver uses the wrong offset (at least according to
Amlogic's reference driver as well as the datasheets of the
Meson8b/S805 and GXBB/S905).
This means that we are getting incorrect durations (REG1_TIME_IV)
reported from the hardware.

This problem was also noticed by some people trying to use this on an
ODROID-C1 and ODROID-C2 - the workaround there (probably because the
datasheets were not publicy available yet at that time) was to switch
to ir_raw_event_store_edge (which leaves it up to the kernel to measure
the duration of a pulse). See [0] and [1] for the corresponding
patches.

Please note that I was only able to test this on an GXBB/S905 based
device (due to lack of other hardware).


[0] https://github.com/erdoukki/linux-amlogic-1/commit/969b2e2242fb14a13cb651f9a1cf771b599c958b
[1] http://forum.odroid.com/viewtopic.php?f=135&t=20504

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

* [v2] media: rc: fix Meson IR decoder
@ 2016-06-26 21:06 ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-06-26 21:06 UTC (permalink / raw)
  To: linus-amlogic

The meson-ir driver uses the wrong offset (at least according to
Amlogic's reference driver as well as the datasheets of the
Meson8b/S805 and GXBB/S905).
This means that we are getting incorrect durations (REG1_TIME_IV)
reported from the hardware.

This problem was also noticed by some people trying to use this on an
ODROID-C1 and ODROID-C2 - the workaround there (probably because the
datasheets were not publicy available yet at that time) was to switch
to ir_raw_event_store_edge (which leaves it up to the kernel to measure
the duration of a pulse). See [0] and [1] for the corresponding
patches.

Please note that I was only able to test this on an GXBB/S905 based
device (due to lack of other hardware).


[0] https://github.com/erdoukki/linux-amlogic-1/commit/969b2e2242fb14a13cb651f9a1cf771b599c958b
[1] http://forum.odroid.com/viewtopic.php?f=135&t=20504

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

* [PATCH v2 1/2] media: rc: meson-ir: fix enabling raw/soft-decoding mode
  2016-06-26 21:06 ` Martin Blumenstingl
  (?)
@ 2016-06-26 21:06   ` Martin Blumenstingl
  -1 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-06-26 21:06 UTC (permalink / raw)
  To: b.galvani, linux-media, linux-amlogic
  Cc: linux-arm-kernel, khilman, carlo, mchehab, tobetter, devicetree,
	robh+dt, pawel.moll, mark.rutland, Martin Blumenstingl

According to the datasheet of Meson8b (S805) and GXBB (S905) the
decoding mode is configured in AO_MF_IR_DEC_REG2 (offset 0x20) using
bits 0-3.
The "duration" field may not be set correctly when any of the hardware
decoding modes. This can happen while a "default" decoding mode
(either set by the bootloader or the chip's default, which uses NEC as
it's default) is used.
While here, I also added defines for the protocols which can be decoded
by the hardware (more work is needed to be actually able to use them
though).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
changes in v1 -> v2:
- fixed subject of the patch to include meson-ir
- fixed double-shifting of the decoder mode values

 drivers/media/rc/meson-ir.c | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/drivers/media/rc/meson-ir.c b/drivers/media/rc/meson-ir.c
index fcc3b82..622a4160 100644
--- a/drivers/media/rc/meson-ir.c
+++ b/drivers/media/rc/meson-ir.c
@@ -32,13 +32,10 @@
 #define IR_DEC_FRAME		0x14
 #define IR_DEC_STATUS		0x18
 #define IR_DEC_REG1		0x1c
+#define IR_DEC_REG2		0x20
 
 #define REG0_RATE_MASK		(BIT(11) - 1)
 
-#define REG1_MODE_MASK		(BIT(7) | BIT(8))
-#define REG1_MODE_NEC		(0 << 7)
-#define REG1_MODE_GENERAL	(2 << 7)
-
 #define REG1_TIME_IV_SHIFT	16
 #define REG1_TIME_IV_MASK	((BIT(13) - 1) << REG1_TIME_IV_SHIFT)
 
@@ -51,6 +48,20 @@
 #define REG1_RESET		BIT(0)
 #define REG1_ENABLE		BIT(15)
 
+#define REG2_DEC_MODE_SHIFT	0
+#define REG2_DEC_MODE_MASK	GENMASK(3, REG2_DEC_MODE_SHIFT)
+#define REG2_DEC_MODE_NEC	0x0
+#define REG2_DEC_MODE_RAW	0x2
+#define REG2_DEC_MODE_THOMSON	0x4
+#define REG2_DEC_MODE_TOSHIBA	0x5
+#define REG2_DEC_MODE_SONY	0x6
+#define REG2_DEC_MODE_RC5	0x7
+#define REG2_DEC_MODE_RC6	0x9
+#define REG2_DEC_MODE_RCMM	0xa
+#define REG2_DEC_MODE_DUOKAN	0xb
+#define REG2_DEC_MODE_COMCAST	0xe
+#define REG2_DEC_MODE_SANYO	0xf
+
 #define STATUS_IR_DEC_IN	BIT(8)
 
 #define MESON_TRATE		10	/* us */
@@ -158,8 +169,9 @@ static int meson_ir_probe(struct platform_device *pdev)
 	/* Reset the decoder */
 	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_RESET, REG1_RESET);
 	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_RESET, 0);
-	/* Set general operation mode */
-	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_MODE_MASK, REG1_MODE_GENERAL);
+	/* Enable raw/soft-decode mode */
+	meson_ir_set_mask(ir, IR_DEC_REG2, REG2_DEC_MODE_MASK,
+			  REG2_DEC_MODE_RAW << REG2_DEC_MODE_SHIFT);
 	/* Set rate */
 	meson_ir_set_mask(ir, IR_DEC_REG0, REG0_RATE_MASK, MESON_TRATE - 1);
 	/* IRQ on rising and falling edges */
-- 
2.9.0

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

* [PATCH v2 1/2] media: rc: meson-ir: fix enabling raw/soft-decoding mode
@ 2016-06-26 21:06   ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-06-26 21:06 UTC (permalink / raw)
  To: linux-arm-kernel

According to the datasheet of Meson8b (S805) and GXBB (S905) the
decoding mode is configured in AO_MF_IR_DEC_REG2 (offset 0x20) using
bits 0-3.
The "duration" field may not be set correctly when any of the hardware
decoding modes. This can happen while a "default" decoding mode
(either set by the bootloader or the chip's default, which uses NEC as
it's default) is used.
While here, I also added defines for the protocols which can be decoded
by the hardware (more work is needed to be actually able to use them
though).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
changes in v1 -> v2:
- fixed subject of the patch to include meson-ir
- fixed double-shifting of the decoder mode values

 drivers/media/rc/meson-ir.c | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/drivers/media/rc/meson-ir.c b/drivers/media/rc/meson-ir.c
index fcc3b82..622a4160 100644
--- a/drivers/media/rc/meson-ir.c
+++ b/drivers/media/rc/meson-ir.c
@@ -32,13 +32,10 @@
 #define IR_DEC_FRAME		0x14
 #define IR_DEC_STATUS		0x18
 #define IR_DEC_REG1		0x1c
+#define IR_DEC_REG2		0x20
 
 #define REG0_RATE_MASK		(BIT(11) - 1)
 
-#define REG1_MODE_MASK		(BIT(7) | BIT(8))
-#define REG1_MODE_NEC		(0 << 7)
-#define REG1_MODE_GENERAL	(2 << 7)
-
 #define REG1_TIME_IV_SHIFT	16
 #define REG1_TIME_IV_MASK	((BIT(13) - 1) << REG1_TIME_IV_SHIFT)
 
@@ -51,6 +48,20 @@
 #define REG1_RESET		BIT(0)
 #define REG1_ENABLE		BIT(15)
 
+#define REG2_DEC_MODE_SHIFT	0
+#define REG2_DEC_MODE_MASK	GENMASK(3, REG2_DEC_MODE_SHIFT)
+#define REG2_DEC_MODE_NEC	0x0
+#define REG2_DEC_MODE_RAW	0x2
+#define REG2_DEC_MODE_THOMSON	0x4
+#define REG2_DEC_MODE_TOSHIBA	0x5
+#define REG2_DEC_MODE_SONY	0x6
+#define REG2_DEC_MODE_RC5	0x7
+#define REG2_DEC_MODE_RC6	0x9
+#define REG2_DEC_MODE_RCMM	0xa
+#define REG2_DEC_MODE_DUOKAN	0xb
+#define REG2_DEC_MODE_COMCAST	0xe
+#define REG2_DEC_MODE_SANYO	0xf
+
 #define STATUS_IR_DEC_IN	BIT(8)
 
 #define MESON_TRATE		10	/* us */
@@ -158,8 +169,9 @@ static int meson_ir_probe(struct platform_device *pdev)
 	/* Reset the decoder */
 	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_RESET, REG1_RESET);
 	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_RESET, 0);
-	/* Set general operation mode */
-	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_MODE_MASK, REG1_MODE_GENERAL);
+	/* Enable raw/soft-decode mode */
+	meson_ir_set_mask(ir, IR_DEC_REG2, REG2_DEC_MODE_MASK,
+			  REG2_DEC_MODE_RAW << REG2_DEC_MODE_SHIFT);
 	/* Set rate */
 	meson_ir_set_mask(ir, IR_DEC_REG0, REG0_RATE_MASK, MESON_TRATE - 1);
 	/* IRQ on rising and falling edges */
-- 
2.9.0

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

* [PATCH v2 1/2] media: rc: meson-ir: fix enabling raw/soft-decoding mode
@ 2016-06-26 21:06   ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-06-26 21:06 UTC (permalink / raw)
  To: linus-amlogic

According to the datasheet of Meson8b (S805) and GXBB (S905) the
decoding mode is configured in AO_MF_IR_DEC_REG2 (offset 0x20) using
bits 0-3.
The "duration" field may not be set correctly when any of the hardware
decoding modes. This can happen while a "default" decoding mode
(either set by the bootloader or the chip's default, which uses NEC as
it's default) is used.
While here, I also added defines for the protocols which can be decoded
by the hardware (more work is needed to be actually able to use them
though).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
changes in v1 -> v2:
- fixed subject of the patch to include meson-ir
- fixed double-shifting of the decoder mode values

 drivers/media/rc/meson-ir.c | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/drivers/media/rc/meson-ir.c b/drivers/media/rc/meson-ir.c
index fcc3b82..622a4160 100644
--- a/drivers/media/rc/meson-ir.c
+++ b/drivers/media/rc/meson-ir.c
@@ -32,13 +32,10 @@
 #define IR_DEC_FRAME		0x14
 #define IR_DEC_STATUS		0x18
 #define IR_DEC_REG1		0x1c
+#define IR_DEC_REG2		0x20
 
 #define REG0_RATE_MASK		(BIT(11) - 1)
 
-#define REG1_MODE_MASK		(BIT(7) | BIT(8))
-#define REG1_MODE_NEC		(0 << 7)
-#define REG1_MODE_GENERAL	(2 << 7)
-
 #define REG1_TIME_IV_SHIFT	16
 #define REG1_TIME_IV_MASK	((BIT(13) - 1) << REG1_TIME_IV_SHIFT)
 
@@ -51,6 +48,20 @@
 #define REG1_RESET		BIT(0)
 #define REG1_ENABLE		BIT(15)
 
+#define REG2_DEC_MODE_SHIFT	0
+#define REG2_DEC_MODE_MASK	GENMASK(3, REG2_DEC_MODE_SHIFT)
+#define REG2_DEC_MODE_NEC	0x0
+#define REG2_DEC_MODE_RAW	0x2
+#define REG2_DEC_MODE_THOMSON	0x4
+#define REG2_DEC_MODE_TOSHIBA	0x5
+#define REG2_DEC_MODE_SONY	0x6
+#define REG2_DEC_MODE_RC5	0x7
+#define REG2_DEC_MODE_RC6	0x9
+#define REG2_DEC_MODE_RCMM	0xa
+#define REG2_DEC_MODE_DUOKAN	0xb
+#define REG2_DEC_MODE_COMCAST	0xe
+#define REG2_DEC_MODE_SANYO	0xf
+
 #define STATUS_IR_DEC_IN	BIT(8)
 
 #define MESON_TRATE		10	/* us */
@@ -158,8 +169,9 @@ static int meson_ir_probe(struct platform_device *pdev)
 	/* Reset the decoder */
 	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_RESET, REG1_RESET);
 	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_RESET, 0);
-	/* Set general operation mode */
-	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_MODE_MASK, REG1_MODE_GENERAL);
+	/* Enable raw/soft-decode mode */
+	meson_ir_set_mask(ir, IR_DEC_REG2, REG2_DEC_MODE_MASK,
+			  REG2_DEC_MODE_RAW << REG2_DEC_MODE_SHIFT);
 	/* Set rate */
 	meson_ir_set_mask(ir, IR_DEC_REG0, REG0_RATE_MASK, MESON_TRATE - 1);
 	/* IRQ on rising and falling edges */
-- 
2.9.0

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

* [PATCH v2 2/2] ARM: dts: meson: fixed size of the meson-ir registers
  2016-06-26 21:06 ` Martin Blumenstingl
  (?)
@ 2016-06-26 21:06   ` Martin Blumenstingl
  -1 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-06-26 21:06 UTC (permalink / raw)
  To: b.galvani, linux-media, linux-amlogic
  Cc: linux-arm-kernel, khilman, carlo, mchehab, tobetter, devicetree,
	robh+dt, pawel.moll, mark.rutland, Martin Blumenstingl

According to the reference driver (and the datasheet of the newer
Meson8b/S805 and GXBB/S905 SoCs) there are 14 registers, each 32 bit
wide.
Adjust the register size to reflect that, as register offset 0x20 is
now also needed by the meson-ir driver.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
changes in v1 -> v2:
- new patch, this is needed because we are now trying to read/write
  offset 0x20 which is beyond the space which was reserved previously
  

 arch/arm/boot/dts/meson.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/meson.dtsi b/arch/arm/boot/dts/meson.dtsi
index 8c77c87..0f5722a 100644
--- a/arch/arm/boot/dts/meson.dtsi
+++ b/arch/arm/boot/dts/meson.dtsi
@@ -147,7 +147,7 @@
 
 		ir_receiver: ir-receiver@c8100480 {
 			compatible= "amlogic,meson6-ir";
-			reg = <0xc8100480 0x20>;
+			reg = <0xc8100480 0x34>;
 			interrupts = <0 15 1>;
 			status = "disabled";
 		};
-- 
2.9.0

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

* [PATCH v2 2/2] ARM: dts: meson: fixed size of the meson-ir registers
@ 2016-06-26 21:06   ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-06-26 21:06 UTC (permalink / raw)
  To: linux-arm-kernel

According to the reference driver (and the datasheet of the newer
Meson8b/S805 and GXBB/S905 SoCs) there are 14 registers, each 32 bit
wide.
Adjust the register size to reflect that, as register offset 0x20 is
now also needed by the meson-ir driver.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
changes in v1 -> v2:
- new patch, this is needed because we are now trying to read/write
  offset 0x20 which is beyond the space which was reserved previously
  

 arch/arm/boot/dts/meson.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/meson.dtsi b/arch/arm/boot/dts/meson.dtsi
index 8c77c87..0f5722a 100644
--- a/arch/arm/boot/dts/meson.dtsi
+++ b/arch/arm/boot/dts/meson.dtsi
@@ -147,7 +147,7 @@
 
 		ir_receiver: ir-receiver at c8100480 {
 			compatible= "amlogic,meson6-ir";
-			reg = <0xc8100480 0x20>;
+			reg = <0xc8100480 0x34>;
 			interrupts = <0 15 1>;
 			status = "disabled";
 		};
-- 
2.9.0

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

* [PATCH v2 2/2] ARM: dts: meson: fixed size of the meson-ir registers
@ 2016-06-26 21:06   ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-06-26 21:06 UTC (permalink / raw)
  To: linus-amlogic

According to the reference driver (and the datasheet of the newer
Meson8b/S805 and GXBB/S905 SoCs) there are 14 registers, each 32 bit
wide.
Adjust the register size to reflect that, as register offset 0x20 is
now also needed by the meson-ir driver.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
changes in v1 -> v2:
- new patch, this is needed because we are now trying to read/write
  offset 0x20 which is beyond the space which was reserved previously
  

 arch/arm/boot/dts/meson.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/meson.dtsi b/arch/arm/boot/dts/meson.dtsi
index 8c77c87..0f5722a 100644
--- a/arch/arm/boot/dts/meson.dtsi
+++ b/arch/arm/boot/dts/meson.dtsi
@@ -147,7 +147,7 @@
 
 		ir_receiver: ir-receiver at c8100480 {
 			compatible= "amlogic,meson6-ir";
-			reg = <0xc8100480 0x20>;
+			reg = <0xc8100480 0x34>;
 			interrupts = <0 15 1>;
 			status = "disabled";
 		};
-- 
2.9.0

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

* [v2] media: rc: fix Meson IR decoder
  2016-06-26 21:06 ` Martin Blumenstingl
                   ` (3 preceding siblings ...)
  (?)
@ 2016-06-27  6:27 ` Neil Armstrong
  2016-06-27 10:53   ` Martin Blumenstingl
  -1 siblings, 1 reply; 112+ messages in thread
From: Neil Armstrong @ 2016-06-27  6:27 UTC (permalink / raw)
  To: linus-amlogic

On 06/26/2016 11:06 PM, Martin Blumenstingl wrote:
> The meson-ir driver uses the wrong offset (at least according to
> Amlogic's reference driver as well as the datasheets of the
> Meson8b/S805 and GXBB/S905).
> This means that we are getting incorrect durations (REG1_TIME_IV)
> reported from the hardware.

Hi,

I'm quite sure the registers are good for meson6 actually, and
it seems reasonable Amlogic made the HW evolve for the Meson8 and GXBB platforms.

> 
> This problem was also noticed by some people trying to use this on an
> ODROID-C1 and ODROID-C2 - the workaround there (probably because the
> datasheets were not publicy available yet at that time) was to switch
> to ir_raw_event_store_edge (which leaves it up to the kernel to measure
> the duration of a pulse). See [0] and [1] for the corresponding
> patches.

Since we are using devicetree, the correct way to achieve this fix is not
to drop support for meson6 (what you do) but add a logic to select the correct
register for meson8 and gxbb if their compatible string are encountered.

> Please note that I was only able to test this on an GXBB/S905 based
> device (due to lack of other hardware).

I made this fix already but lacked time to actually test it on HW :
https://github.com/torvalds/linux/compare/master...superna9999:amlogic/v4.7/ir

My patch is missing the meson8b support, and may need a supplementary compatible check or
a separate dt match table.

Neil

> 
> [0] https://github.com/erdoukki/linux-amlogic-1/commit/969b2e2242fb14a13cb651f9a1cf771b599c958b
> [1] http://forum.odroid.com/viewtopic.php?f=135&t=20504
> 

PS: BTW could you format the cover letter using the git format-patch --cover-letter instead and
add the v2 using the -subject-prefix like :
# git format-patch --cover-letter --signoff --subject-prefix "PATCH v2" -2

> _______________________________________________
> linux-amlogic mailing list
> linux-amlogic at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-amlogic
> 

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

* Re: [v2] media: rc: fix Meson IR decoder
  2016-06-26 21:06 ` Martin Blumenstingl
@ 2016-06-27  6:28   ` Neil Armstrong
  -1 siblings, 0 replies; 112+ messages in thread
From: Neil Armstrong @ 2016-06-27  6:28 UTC (permalink / raw)
  To: Martin Blumenstingl, b.galvani, linux-media
  Cc: mark.rutland, devicetree, pawel.moll, khilman, tobetter, robh+dt,
	carlo, mchehab, linux-arm-kernel



On 06/26/2016 11:06 PM, Martin Blumenstingl wrote:
> The meson-ir driver uses the wrong offset (at least according to
> Amlogic's reference driver as well as the datasheets of the
> Meson8b/S805 and GXBB/S905).
> This means that we are getting incorrect durations (REG1_TIME_IV)
> reported from the hardware.

Hi,

I'm quite sure the registers are good for meson6 actually, and
it seems reasonable Amlogic made the HW evolve for the Meson8 and GXBB platforms.

>
> This problem was also noticed by some people trying to use this on an
> ODROID-C1 and ODROID-C2 - the workaround there (probably because the
> datasheets were not publicy available yet at that time) was to switch
> to ir_raw_event_store_edge (which leaves it up to the kernel to measure
> the duration of a pulse). See [0] and [1] for the corresponding
> patches.

Since we are using devicetree, the correct way to achieve this fix is not
to drop support for meson6 (what you do) but add a logic to select the correct
register for meson8 and gxbb if their compatible string are encountered.

> Please note that I was only able to test this on an GXBB/S905 based
> device (due to lack of other hardware).

I made this fix already but lacked time to actually test it on HW :
https://github.com/torvalds/linux/compare/master...superna9999:amlogic/v4.7/ir

My patch is missing the meson8b support, and may need a supplementary compatible check or
a separate dt match table.

Neil

>
> [0] https://github.com/erdoukki/linux-amlogic-1/commit/969b2e2242fb14a13cb651f9a1cf771b599c958b
> [1] http://forum.odroid.com/viewtopic.php?f=135&t=20504
>

PS: BTW could you format the cover letter using the git format-patch --cover-letter instead and
add the v2 using the -subject-prefix like :
# git format-patch --cover-letter --signoff --subject-prefix "PATCH v2" -2

> _______________________________________________
> linux-amlogic mailing list
> linux-amlogic@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-amlogic
>

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

* [v2] media: rc: fix Meson IR decoder
@ 2016-06-27  6:28   ` Neil Armstrong
  0 siblings, 0 replies; 112+ messages in thread
From: Neil Armstrong @ 2016-06-27  6:28 UTC (permalink / raw)
  To: linux-arm-kernel



On 06/26/2016 11:06 PM, Martin Blumenstingl wrote:
> The meson-ir driver uses the wrong offset (at least according to
> Amlogic's reference driver as well as the datasheets of the
> Meson8b/S805 and GXBB/S905).
> This means that we are getting incorrect durations (REG1_TIME_IV)
> reported from the hardware.

Hi,

I'm quite sure the registers are good for meson6 actually, and
it seems reasonable Amlogic made the HW evolve for the Meson8 and GXBB platforms.

>
> This problem was also noticed by some people trying to use this on an
> ODROID-C1 and ODROID-C2 - the workaround there (probably because the
> datasheets were not publicy available yet at that time) was to switch
> to ir_raw_event_store_edge (which leaves it up to the kernel to measure
> the duration of a pulse). See [0] and [1] for the corresponding
> patches.

Since we are using devicetree, the correct way to achieve this fix is not
to drop support for meson6 (what you do) but add a logic to select the correct
register for meson8 and gxbb if their compatible string are encountered.

> Please note that I was only able to test this on an GXBB/S905 based
> device (due to lack of other hardware).

I made this fix already but lacked time to actually test it on HW :
https://github.com/torvalds/linux/compare/master...superna9999:amlogic/v4.7/ir

My patch is missing the meson8b support, and may need a supplementary compatible check or
a separate dt match table.

Neil

>
> [0] https://github.com/erdoukki/linux-amlogic-1/commit/969b2e2242fb14a13cb651f9a1cf771b599c958b
> [1] http://forum.odroid.com/viewtopic.php?f=135&t=20504
>

PS: BTW could you format the cover letter using the git format-patch --cover-letter instead and
add the v2 using the -subject-prefix like :
# git format-patch --cover-letter --signoff --subject-prefix "PATCH v2" -2

> _______________________________________________
> linux-amlogic mailing list
> linux-amlogic at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-amlogic
>

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

* Re: [PATCH v2 2/2] ARM: dts: meson: fixed size of the meson-ir registers
  2016-06-26 21:06   ` Martin Blumenstingl
  (?)
@ 2016-06-27  8:43     ` Carlo Caione
  -1 siblings, 0 replies; 112+ messages in thread
From: Carlo Caione @ 2016-06-27  8:43 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: b.galvani, linux-media, linux-amlogic, linux-arm-kernel, khilman,
	mchehab, tobetter, devicetree, robh+dt, pawel.moll, mark.rutland

On 26/06/16 23:06, Martin Blumenstingl wrote:
> According to the reference driver (and the datasheet of the newer
> Meson8b/S805 and GXBB/S905 SoCs) there are 14 registers, each 32 bit
> wide.

Then why are you modifying the DTS for the Meson6? As Neil already
suggested, it seems that the hardware has been slightly modified for the
latest SoCs, so this approach is clearly wrong.
Add a new compatible and use of_device_get_match_data() to get the SoC
specific data.

> Adjust the register size to reflect that, as register offset 0x20 is
> now also needed by the meson-ir driver.

According to the AML8726-MX (meson6) datasheet the value of 0x20 is
correct, at least for that hardware.

Cheers,

-- 
Carlo Caione

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

* [PATCH v2 2/2] ARM: dts: meson: fixed size of the meson-ir registers
@ 2016-06-27  8:43     ` Carlo Caione
  0 siblings, 0 replies; 112+ messages in thread
From: Carlo Caione @ 2016-06-27  8:43 UTC (permalink / raw)
  To: linux-arm-kernel

On 26/06/16 23:06, Martin Blumenstingl wrote:
> According to the reference driver (and the datasheet of the newer
> Meson8b/S805 and GXBB/S905 SoCs) there are 14 registers, each 32 bit
> wide.

Then why are you modifying the DTS for the Meson6? As Neil already
suggested, it seems that the hardware has been slightly modified for the
latest SoCs, so this approach is clearly wrong.
Add a new compatible and use of_device_get_match_data() to get the SoC
specific data.

> Adjust the register size to reflect that, as register offset 0x20 is
> now also needed by the meson-ir driver.

According to the AML8726-MX (meson6) datasheet the value of 0x20 is
correct, at least for that hardware.

Cheers,

-- 
Carlo Caione

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

* [PATCH v2 2/2] ARM: dts: meson: fixed size of the meson-ir registers
@ 2016-06-27  8:43     ` Carlo Caione
  0 siblings, 0 replies; 112+ messages in thread
From: Carlo Caione @ 2016-06-27  8:43 UTC (permalink / raw)
  To: linus-amlogic

On 26/06/16 23:06, Martin Blumenstingl wrote:
> According to the reference driver (and the datasheet of the newer
> Meson8b/S805 and GXBB/S905 SoCs) there are 14 registers, each 32 bit
> wide.

Then why are you modifying the DTS for the Meson6? As Neil already
suggested, it seems that the hardware has been slightly modified for the
latest SoCs, so this approach is clearly wrong.
Add a new compatible and use of_device_get_match_data() to get the SoC
specific data.

> Adjust the register size to reflect that, as register offset 0x20 is
> now also needed by the meson-ir driver.

According to the AML8726-MX (meson6) datasheet the value of 0x20 is
correct, at least for that hardware.

Cheers,

-- 
Carlo Caione

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

* [v2] media: rc: fix Meson IR decoder
  2016-06-27  6:27 ` [v2] media: rc: fix Meson IR decoder Neil Armstrong
@ 2016-06-27 10:53   ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-06-27 10:53 UTC (permalink / raw)
  To: linus-amlogic

On Mon, Jun 27, 2016 at 8:27 AM, Neil Armstrong <narmstrong@baylibre.com> wrote:
> I'm quite sure the registers are good for meson6 actually, and
> it seems reasonable Amlogic made the HW evolve for the Meson8 and GXBB platforms.
OK, then from now on I will NOT assume anymore that the reference code
also works on Meson6 platforms. Thanks for clarifying this.

> Since we are using devicetree, the correct way to achieve this fix is not
> to drop support for meson6 (what you do) but add a logic to select the correct
> register for meson8 and gxbb if their compatible string are encountered.

> I made this fix already but lacked time to actually test it on HW :
> https://github.com/torvalds/linux/compare/master...superna9999:amlogic/v4.7/ir
>
> My patch is missing the meson8b support, and may need a supplementary compatible check or
> a separate dt match table.
I can test it on GXBB (only, I do not have Meson8b hardware, but
according to the datasheet the registers are the same).
If you want I can start based on your patch series. Should we add only
a binding for amlogic,meson8b and re-use that in meson-gxbb.dtsi or
should we add both (8b and gxbb) bindings instead?

> PS: BTW could you format the cover letter using the git format-patch --cover-letter instead and
> add the v2 using the -subject-prefix like :
> # git format-patch --cover-letter --signoff --subject-prefix "PATCH v2" -2
sounds like this is what other devs are using as well - thanks for
letting me know

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

* Re: [v2] media: rc: fix Meson IR decoder
  2016-06-26 21:06 ` Martin Blumenstingl
  (?)
  (?)
@ 2016-06-27 12:57     ` Neil Armstrong
  -1 siblings, 0 replies; 112+ messages in thread
From: Neil Armstrong @ 2016-06-27 12:57 UTC (permalink / raw)
  To: Martin Blumenstingl, b.galvani-Re5JQEeQqe8AvxtiuMwx3w,
	linux-media-u79uwXL29TY76Z2rM5mHXA,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
	pawel.moll-5wv7dgnIgG8, khilman-rdvid1DuHRBWk0Htik3J/w,
	tobetter-Re5JQEeQqe8AvxtiuMwx3w, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	carlo-KA+7E9HrN00dnm+yROfE0A, mchehab-DgEjT+Ai2ygdnm+yROfE0A,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On 06/27/2016 12:53 PM, Martin Blumenstingl wrote:
> On Mon, Jun 27, 2016 at 8:27 AM, Neil Armstrong <narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org> wrote:
>> I'm quite sure the registers are good for meson6 actually, and
>> it seems reasonable Amlogic made the HW evolve for the Meson8 and GXBB platforms.
> OK, then from now on I will NOT assume anymore that the reference code
> also works on Meson6 platforms. Thanks for clarifying this.

Yes it's quite safer to assume this !

>> Since we are using devicetree, the correct way to achieve this fix is not
>> to drop support for meson6 (what you do) but add a logic to select the correct
>> register for meson8 and gxbb if their compatible string are encountered.
>
>> I made this fix already but lacked time to actually test it on HW :
>> https://github.com/torvalds/linux/compare/master...superna9999:amlogic/v4.7/ir
>>
>> My patch is missing the meson8b support, and may need a supplementary compatible check or
>> a separate dt match table.
> I can test it on GXBB (only, I do not have Meson8b hardware, but
> according to the datasheet the registers are the same).
> If you want I can start based on your patch series. Should we add only
> a binding for amlogic,meson8b and re-use that in meson-gxbb.dtsi or
> should we add both (8b and gxbb) bindings instead?

Yes, no problem !
Add the two bindings, it's a better practice and we can track more easily which
hardware is really supported from the driver point of view.

>> PS: BTW could you format the cover letter using the git format-patch --cover-letter instead and
>> add the v2 using the -subject-prefix like :
>> # git format-patch --cover-letter --signoff --subject-prefix "PATCH v2" -2
> sounds like this is what other devs are using as well - thanks for
> letting me know
>

Neil

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

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

* Re: [v2] media: rc: fix Meson IR decoder
@ 2016-06-27 12:57     ` Neil Armstrong
  0 siblings, 0 replies; 112+ messages in thread
From: Neil Armstrong @ 2016-06-27 12:57 UTC (permalink / raw)
  To: Martin Blumenstingl, b.galvani, linux-media, linux-amlogic
  Cc: mark.rutland, devicetree, pawel.moll, khilman, tobetter, robh+dt,
	carlo, mchehab, linux-arm-kernel

On 06/27/2016 12:53 PM, Martin Blumenstingl wrote:
> On Mon, Jun 27, 2016 at 8:27 AM, Neil Armstrong <narmstrong@baylibre.com> wrote:
>> I'm quite sure the registers are good for meson6 actually, and
>> it seems reasonable Amlogic made the HW evolve for the Meson8 and GXBB platforms.
> OK, then from now on I will NOT assume anymore that the reference code
> also works on Meson6 platforms. Thanks for clarifying this.

Yes it's quite safer to assume this !

>> Since we are using devicetree, the correct way to achieve this fix is not
>> to drop support for meson6 (what you do) but add a logic to select the correct
>> register for meson8 and gxbb if their compatible string are encountered.
>
>> I made this fix already but lacked time to actually test it on HW :
>> https://github.com/torvalds/linux/compare/master...superna9999:amlogic/v4.7/ir
>>
>> My patch is missing the meson8b support, and may need a supplementary compatible check or
>> a separate dt match table.
> I can test it on GXBB (only, I do not have Meson8b hardware, but
> according to the datasheet the registers are the same).
> If you want I can start based on your patch series. Should we add only
> a binding for amlogic,meson8b and re-use that in meson-gxbb.dtsi or
> should we add both (8b and gxbb) bindings instead?

Yes, no problem !
Add the two bindings, it's a better practice and we can track more easily which
hardware is really supported from the driver point of view.

>> PS: BTW could you format the cover letter using the git format-patch --cover-letter instead and
>> add the v2 using the -subject-prefix like :
>> # git format-patch --cover-letter --signoff --subject-prefix "PATCH v2" -2
> sounds like this is what other devs are using as well - thanks for
> letting me know
>

Neil


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

* [v2] media: rc: fix Meson IR decoder
@ 2016-06-27 12:57     ` Neil Armstrong
  0 siblings, 0 replies; 112+ messages in thread
From: Neil Armstrong @ 2016-06-27 12:57 UTC (permalink / raw)
  To: linux-arm-kernel

On 06/27/2016 12:53 PM, Martin Blumenstingl wrote:
> On Mon, Jun 27, 2016 at 8:27 AM, Neil Armstrong <narmstrong@baylibre.com> wrote:
>> I'm quite sure the registers are good for meson6 actually, and
>> it seems reasonable Amlogic made the HW evolve for the Meson8 and GXBB platforms.
> OK, then from now on I will NOT assume anymore that the reference code
> also works on Meson6 platforms. Thanks for clarifying this.

Yes it's quite safer to assume this !

>> Since we are using devicetree, the correct way to achieve this fix is not
>> to drop support for meson6 (what you do) but add a logic to select the correct
>> register for meson8 and gxbb if their compatible string are encountered.
>
>> I made this fix already but lacked time to actually test it on HW :
>> https://github.com/torvalds/linux/compare/master...superna9999:amlogic/v4.7/ir
>>
>> My patch is missing the meson8b support, and may need a supplementary compatible check or
>> a separate dt match table.
> I can test it on GXBB (only, I do not have Meson8b hardware, but
> according to the datasheet the registers are the same).
> If you want I can start based on your patch series. Should we add only
> a binding for amlogic,meson8b and re-use that in meson-gxbb.dtsi or
> should we add both (8b and gxbb) bindings instead?

Yes, no problem !
Add the two bindings, it's a better practice and we can track more easily which
hardware is really supported from the driver point of view.

>> PS: BTW could you format the cover letter using the git format-patch --cover-letter instead and
>> add the v2 using the -subject-prefix like :
>> # git format-patch --cover-letter --signoff --subject-prefix "PATCH v2" -2
> sounds like this is what other devs are using as well - thanks for
> letting me know
>

Neil

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

* [v2] media: rc: fix Meson IR decoder
@ 2016-06-27 12:57     ` Neil Armstrong
  0 siblings, 0 replies; 112+ messages in thread
From: Neil Armstrong @ 2016-06-27 12:57 UTC (permalink / raw)
  To: linus-amlogic

On 06/27/2016 12:53 PM, Martin Blumenstingl wrote:
> On Mon, Jun 27, 2016 at 8:27 AM, Neil Armstrong <narmstrong@baylibre.com> wrote:
>> I'm quite sure the registers are good for meson6 actually, and
>> it seems reasonable Amlogic made the HW evolve for the Meson8 and GXBB platforms.
> OK, then from now on I will NOT assume anymore that the reference code
> also works on Meson6 platforms. Thanks for clarifying this.

Yes it's quite safer to assume this !

>> Since we are using devicetree, the correct way to achieve this fix is not
>> to drop support for meson6 (what you do) but add a logic to select the correct
>> register for meson8 and gxbb if their compatible string are encountered.
>
>> I made this fix already but lacked time to actually test it on HW :
>> https://github.com/torvalds/linux/compare/master...superna9999:amlogic/v4.7/ir
>>
>> My patch is missing the meson8b support, and may need a supplementary compatible check or
>> a separate dt match table.
> I can test it on GXBB (only, I do not have Meson8b hardware, but
> according to the datasheet the registers are the same).
> If you want I can start based on your patch series. Should we add only
> a binding for amlogic,meson8b and re-use that in meson-gxbb.dtsi or
> should we add both (8b and gxbb) bindings instead?

Yes, no problem !
Add the two bindings, it's a better practice and we can track more easily which
hardware is really supported from the driver point of view.

>> PS: BTW could you format the cover letter using the git format-patch --cover-letter instead and
>> add the v2 using the -subject-prefix like :
>> # git format-patch --cover-letter --signoff --subject-prefix "PATCH v2" -2
> sounds like this is what other devs are using as well - thanks for
> letting me know
>

Neil

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

* [PATCH v3 0/4] Add Meson 8b / GXBB support to the IR driver
  2016-06-26 21:06 ` Martin Blumenstingl
@ 2016-06-28 19:17   ` Martin Blumenstingl
  -1 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-06-28 19:17 UTC (permalink / raw)
  To: linux-amlogic, linux-media
  Cc: robh+dt, mark.rutland, carlo, khilman, mchehab, devicetree,
	narmstrong, Martin Blumenstingl

Newer Amlogic platforms (Meson 8b and GXBB) use a slightly different
register layout for their Infrared Remoete Controller. The decoder mode
is now configured in another register. Without the changes to the
meson-ir driver we are simply getting incorrect "durations" reported
from the hardware (because the hardware is not in time measurement aka
software decode mode).

This problem was also noticed by some people trying to use this on an
ODROID-C1 and ODROID-C2 - the workaround there (probably because the
datasheets were not publicy available yet at that time) was to switch
to ir_raw_event_store_edge (which leaves it up to the kernel to measure
the duration of a pulse). See [0] and [1] for the corresponding
patches.


Changes in v3:
- based on the patches of Neil Armstrong
- depending on the platform either the old (default) or new registers
  (this has to be enabled explicitly by using "amlogic,meson8b-ir" or
  "amlogic,meson-gxbb-ir")
- the changes to arch/arm/boot/dts/meson.dtsi are not part of this
  series anymore, because the size specified there is valid for the
  Meson 6b version of the IR decoder
- Add the IR decoder to meson-gxbb.dtsi and enable it on the supported
  boards


[0] https://github.com/erdoukki/linux-amlogic-1/commit/969b2e2242fb14a13cb651f9a1cf771b599c958b
[1] http://forum.odroid.com/viewtopic.php?f=135&t=20504


Martin Blumenstingl (1):
  ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards

Neil Armstrong (3):
  dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
  media: rc: meson-ir: Add support for newer versions of the IR decoder
  ARM64: meson-gxbb: Add Infrared Remote Controller decoder

 .../devicetree/bindings/media/meson-ir.txt         |  5 +++-
 .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts |  4 +++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi   |  4 +++
 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi      |  4 +++
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi        |  7 ++++++
 drivers/media/rc/meson-ir.c                        | 29 ++++++++++++++++++----
 6 files changed, 47 insertions(+), 6 deletions(-)

-- 
2.9.0

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

* [PATCH v3 0/4] Add Meson 8b / GXBB support to the IR driver
@ 2016-06-28 19:17   ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-06-28 19:17 UTC (permalink / raw)
  To: linus-amlogic

Newer Amlogic platforms (Meson 8b and GXBB) use a slightly different
register layout for their Infrared Remoete Controller. The decoder mode
is now configured in another register. Without the changes to the
meson-ir driver we are simply getting incorrect "durations" reported
from the hardware (because the hardware is not in time measurement aka
software decode mode).

This problem was also noticed by some people trying to use this on an
ODROID-C1 and ODROID-C2 - the workaround there (probably because the
datasheets were not publicy available yet at that time) was to switch
to ir_raw_event_store_edge (which leaves it up to the kernel to measure
the duration of a pulse). See [0] and [1] for the corresponding
patches.


Changes in v3:
- based on the patches of Neil Armstrong
- depending on the platform either the old (default) or new registers
  (this has to be enabled explicitly by using "amlogic,meson8b-ir" or
  "amlogic,meson-gxbb-ir")
- the changes to arch/arm/boot/dts/meson.dtsi are not part of this
  series anymore, because the size specified there is valid for the
  Meson 6b version of the IR decoder
- Add the IR decoder to meson-gxbb.dtsi and enable it on the supported
  boards


[0] https://github.com/erdoukki/linux-amlogic-1/commit/969b2e2242fb14a13cb651f9a1cf771b599c958b
[1] http://forum.odroid.com/viewtopic.php?f=135&t=20504


Martin Blumenstingl (1):
  ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards

Neil Armstrong (3):
  dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
  media: rc: meson-ir: Add support for newer versions of the IR decoder
  ARM64: meson-gxbb: Add Infrared Remote Controller decoder

 .../devicetree/bindings/media/meson-ir.txt         |  5 +++-
 .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts |  4 +++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi   |  4 +++
 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi      |  4 +++
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi        |  7 ++++++
 drivers/media/rc/meson-ir.c                        | 29 ++++++++++++++++++----
 6 files changed, 47 insertions(+), 6 deletions(-)

-- 
2.9.0

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

* [PATCH v3 1/4] dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
  2016-06-28 19:17   ` Martin Blumenstingl
@ 2016-06-28 19:17     ` Martin Blumenstingl
  -1 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-06-28 19:17 UTC (permalink / raw)
  To: linux-amlogic, linux-media
  Cc: robh+dt, mark.rutland, carlo, khilman, mchehab, devicetree,
	narmstrong, Martin Blumenstingl

From: Neil Armstrong <narmstrong@baylibre.com>

New bindings are needed as the register layout on the newer platforms
is slightly different compared to Meson6b.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 Documentation/devicetree/bindings/media/meson-ir.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/media/meson-ir.txt b/Documentation/devicetree/bindings/media/meson-ir.txt
index 407848e..e7e3f3c 100644
--- a/Documentation/devicetree/bindings/media/meson-ir.txt
+++ b/Documentation/devicetree/bindings/media/meson-ir.txt
@@ -1,7 +1,10 @@
 * Amlogic Meson IR remote control receiver
 
 Required properties:
- - compatible	: should be "amlogic,meson6-ir"
+ - compatible	: depending on the platform this should be one of:
+		  - "amlogic,meson6-ir"
+		  - "amlogic,meson8b-ir"
+		  - "amlogic,meson-gxbb-ir"
  - reg		: physical base address and length of the device registers
  - interrupts	: a single specifier for the interrupt from the device
 
-- 
2.9.0

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

* [PATCH v3 1/4] dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
@ 2016-06-28 19:17     ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-06-28 19:17 UTC (permalink / raw)
  To: linus-amlogic

From: Neil Armstrong <narmstrong@baylibre.com>

New bindings are needed as the register layout on the newer platforms
is slightly different compared to Meson6b.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 Documentation/devicetree/bindings/media/meson-ir.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/media/meson-ir.txt b/Documentation/devicetree/bindings/media/meson-ir.txt
index 407848e..e7e3f3c 100644
--- a/Documentation/devicetree/bindings/media/meson-ir.txt
+++ b/Documentation/devicetree/bindings/media/meson-ir.txt
@@ -1,7 +1,10 @@
 * Amlogic Meson IR remote control receiver
 
 Required properties:
- - compatible	: should be "amlogic,meson6-ir"
+ - compatible	: depending on the platform this should be one of:
+		  - "amlogic,meson6-ir"
+		  - "amlogic,meson8b-ir"
+		  - "amlogic,meson-gxbb-ir"
  - reg		: physical base address and length of the device registers
  - interrupts	: a single specifier for the interrupt from the device
 
-- 
2.9.0

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

* [PATCH v3 2/4] media: rc: meson-ir: Add support for newer versions of the IR decoder
  2016-06-28 19:17   ` Martin Blumenstingl
@ 2016-06-28 19:18     ` Martin Blumenstingl
  -1 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-06-28 19:18 UTC (permalink / raw)
  To: linux-amlogic, linux-media
  Cc: robh+dt, mark.rutland, carlo, khilman, mchehab, devicetree,
	narmstrong, Martin Blumenstingl

From: Neil Armstrong <narmstrong@baylibre.com>

Newer SoCs (Meson 8b and GXBB) are using REG2 (offset 0x20) instead of
REG1 to configure the decoder mode. This makes it necessary to
introduce new bindings so the driver knows which register has to be
used.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 drivers/media/rc/meson-ir.c | 29 ++++++++++++++++++++++++-----
 1 file changed, 24 insertions(+), 5 deletions(-)

diff --git a/drivers/media/rc/meson-ir.c b/drivers/media/rc/meson-ir.c
index fcc3b82..003fff0 100644
--- a/drivers/media/rc/meson-ir.c
+++ b/drivers/media/rc/meson-ir.c
@@ -24,6 +24,7 @@
 
 #define DRIVER_NAME		"meson-ir"
 
+/* valid on all Meson platforms */
 #define IR_DEC_LDR_ACTIVE	0x00
 #define IR_DEC_LDR_IDLE		0x04
 #define IR_DEC_LDR_REPEAT	0x08
@@ -32,12 +33,21 @@
 #define IR_DEC_FRAME		0x14
 #define IR_DEC_STATUS		0x18
 #define IR_DEC_REG1		0x1c
+/* only available on Meson 8b and newer */
+#define IR_DEC_REG2		0x20
 
 #define REG0_RATE_MASK		(BIT(11) - 1)
 
-#define REG1_MODE_MASK		(BIT(7) | BIT(8))
-#define REG1_MODE_NEC		(0 << 7)
-#define REG1_MODE_GENERAL	(2 << 7)
+#define DECODE_MODE_NEC		0x0
+#define DECODE_MODE_RAW		0x2
+
+/* Meson 6b uses REG1 to configure the mode */
+#define REG1_MODE_MASK		GENMASK(8, 7)
+#define REG1_MODE_SHIFT		7
+
+/* Meson 8b / GXBB use REG2 to configure the mode */
+#define REG2_MODE_MASK		GENMASK(3, 0)
+#define REG2_MODE_SHIFT		0
 
 #define REG1_TIME_IV_SHIFT	16
 #define REG1_TIME_IV_MASK	((BIT(13) - 1) << REG1_TIME_IV_SHIFT)
@@ -158,8 +168,15 @@ static int meson_ir_probe(struct platform_device *pdev)
 	/* Reset the decoder */
 	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_RESET, REG1_RESET);
 	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_RESET, 0);
-	/* Set general operation mode */
-	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_MODE_MASK, REG1_MODE_GENERAL);
+
+	/* Set general operation mode (= raw/software decoding) */
+	if (of_device_is_compatible(node, "amlogic,meson6-ir"))
+		meson_ir_set_mask(ir, IR_DEC_REG1, REG1_MODE_MASK,
+				  DECODE_MODE_RAW << REG1_MODE_SHIFT);
+	else
+		meson_ir_set_mask(ir, IR_DEC_REG2, REG2_MODE_MASK,
+				  DECODE_MODE_RAW << REG2_MODE_SHIFT);
+
 	/* Set rate */
 	meson_ir_set_mask(ir, IR_DEC_REG0, REG0_RATE_MASK, MESON_TRATE - 1);
 	/* IRQ on rising and falling edges */
@@ -197,6 +214,8 @@ static int meson_ir_remove(struct platform_device *pdev)
 
 static const struct of_device_id meson_ir_match[] = {
 	{ .compatible = "amlogic,meson6-ir" },
+	{ .compatible = "amlogic,meson8b-ir" },
+	{ .compatible = "amlogic,meson-gxbb-ir" },
 	{ },
 };
 
-- 
2.9.0

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

* [PATCH v3 2/4] media: rc: meson-ir: Add support for newer versions of the IR decoder
@ 2016-06-28 19:18     ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-06-28 19:18 UTC (permalink / raw)
  To: linus-amlogic

From: Neil Armstrong <narmstrong@baylibre.com>

Newer SoCs (Meson 8b and GXBB) are using REG2 (offset 0x20) instead of
REG1 to configure the decoder mode. This makes it necessary to
introduce new bindings so the driver knows which register has to be
used.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 drivers/media/rc/meson-ir.c | 29 ++++++++++++++++++++++++-----
 1 file changed, 24 insertions(+), 5 deletions(-)

diff --git a/drivers/media/rc/meson-ir.c b/drivers/media/rc/meson-ir.c
index fcc3b82..003fff0 100644
--- a/drivers/media/rc/meson-ir.c
+++ b/drivers/media/rc/meson-ir.c
@@ -24,6 +24,7 @@
 
 #define DRIVER_NAME		"meson-ir"
 
+/* valid on all Meson platforms */
 #define IR_DEC_LDR_ACTIVE	0x00
 #define IR_DEC_LDR_IDLE		0x04
 #define IR_DEC_LDR_REPEAT	0x08
@@ -32,12 +33,21 @@
 #define IR_DEC_FRAME		0x14
 #define IR_DEC_STATUS		0x18
 #define IR_DEC_REG1		0x1c
+/* only available on Meson 8b and newer */
+#define IR_DEC_REG2		0x20
 
 #define REG0_RATE_MASK		(BIT(11) - 1)
 
-#define REG1_MODE_MASK		(BIT(7) | BIT(8))
-#define REG1_MODE_NEC		(0 << 7)
-#define REG1_MODE_GENERAL	(2 << 7)
+#define DECODE_MODE_NEC		0x0
+#define DECODE_MODE_RAW		0x2
+
+/* Meson 6b uses REG1 to configure the mode */
+#define REG1_MODE_MASK		GENMASK(8, 7)
+#define REG1_MODE_SHIFT		7
+
+/* Meson 8b / GXBB use REG2 to configure the mode */
+#define REG2_MODE_MASK		GENMASK(3, 0)
+#define REG2_MODE_SHIFT		0
 
 #define REG1_TIME_IV_SHIFT	16
 #define REG1_TIME_IV_MASK	((BIT(13) - 1) << REG1_TIME_IV_SHIFT)
@@ -158,8 +168,15 @@ static int meson_ir_probe(struct platform_device *pdev)
 	/* Reset the decoder */
 	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_RESET, REG1_RESET);
 	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_RESET, 0);
-	/* Set general operation mode */
-	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_MODE_MASK, REG1_MODE_GENERAL);
+
+	/* Set general operation mode (= raw/software decoding) */
+	if (of_device_is_compatible(node, "amlogic,meson6-ir"))
+		meson_ir_set_mask(ir, IR_DEC_REG1, REG1_MODE_MASK,
+				  DECODE_MODE_RAW << REG1_MODE_SHIFT);
+	else
+		meson_ir_set_mask(ir, IR_DEC_REG2, REG2_MODE_MASK,
+				  DECODE_MODE_RAW << REG2_MODE_SHIFT);
+
 	/* Set rate */
 	meson_ir_set_mask(ir, IR_DEC_REG0, REG0_RATE_MASK, MESON_TRATE - 1);
 	/* IRQ on rising and falling edges */
@@ -197,6 +214,8 @@ static int meson_ir_remove(struct platform_device *pdev)
 
 static const struct of_device_id meson_ir_match[] = {
 	{ .compatible = "amlogic,meson6-ir" },
+	{ .compatible = "amlogic,meson8b-ir" },
+	{ .compatible = "amlogic,meson-gxbb-ir" },
 	{ },
 };
 
-- 
2.9.0

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

* [PATCH v3 3/4] ARM64: meson-gxbb: Add Infrared Remote Controller decoder
  2016-06-28 19:17   ` Martin Blumenstingl
@ 2016-06-28 19:18     ` Martin Blumenstingl
  -1 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-06-28 19:18 UTC (permalink / raw)
  To: linux-amlogic, linux-media
  Cc: robh+dt, mark.rutland, carlo, khilman, mchehab, devicetree,
	narmstrong, Martin Blumenstingl

From: Neil Armstrong <narmstrong@baylibre.com>

This adds the Infrared Remote Controller node so boards with an IR
remote can simply enable it.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 6c23965..fa88f80 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -213,6 +213,13 @@
 				clocks = <&xtal>;
 				status = "disabled";
 			};
+
+			ir: ir@580 {
+				compatible = "amlogic,meson-gxbb-ir";
+				reg = <0x0 0x00580 0x0 0x40>;
+				interrupts = <GIC_SPI 196 IRQ_TYPE_EDGE_RISING>;
+				status = "disabled";
+			};
 		};
 
 		periphs: periphs@c8834000 {
-- 
2.9.0

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

* [PATCH v3 3/4] ARM64: meson-gxbb: Add Infrared Remote Controller decoder
@ 2016-06-28 19:18     ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-06-28 19:18 UTC (permalink / raw)
  To: linus-amlogic

From: Neil Armstrong <narmstrong@baylibre.com>

This adds the Infrared Remote Controller node so boards with an IR
remote can simply enable it.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 6c23965..fa88f80 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -213,6 +213,13 @@
 				clocks = <&xtal>;
 				status = "disabled";
 			};
+
+			ir: ir at 580 {
+				compatible = "amlogic,meson-gxbb-ir";
+				reg = <0x0 0x00580 0x0 0x40>;
+				interrupts = <GIC_SPI 196 IRQ_TYPE_EDGE_RISING>;
+				status = "disabled";
+			};
 		};
 
 		periphs: periphs at c8834000 {
-- 
2.9.0

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

* [PATCH v3 4/4] ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards
  2016-06-28 19:17   ` Martin Blumenstingl
@ 2016-06-28 19:18     ` Martin Blumenstingl
  -1 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-06-28 19:18 UTC (permalink / raw)
  To: linux-amlogic, linux-media
  Cc: robh+dt, mark.rutland, carlo, khilman, mchehab, devicetree,
	narmstrong, Martin Blumenstingl

Enable the Infrared Remote Controller on boards which have an Infrared
receiver.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts  | 4 ++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi     | 4 ++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index b06bf8a..9a451ce 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -120,3 +120,7 @@
 	vmmc-supply = <&mmc_iv>;
 	voltage-ranges = <1800 3300>;
 };
+
+&ir {
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
index 5dfd849..2650bb7 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
@@ -102,3 +102,7 @@
 	voltage-ranges = <1800 3300>;
 	vmmc-supply = <&mmc_iv>;
 };
+
+&ir {
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
index 54bb7c7..934deb9 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
@@ -60,3 +60,7 @@
 	pinctrl-names = "default";
 
 };
+
+&ir {
+	status = "okay";
+};
-- 
2.9.0

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

* [PATCH v3 4/4] ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards
@ 2016-06-28 19:18     ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-06-28 19:18 UTC (permalink / raw)
  To: linus-amlogic

Enable the Infrared Remote Controller on boards which have an Infrared
receiver.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts  | 4 ++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi     | 4 ++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index b06bf8a..9a451ce 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -120,3 +120,7 @@
 	vmmc-supply = <&mmc_iv>;
 	voltage-ranges = <1800 3300>;
 };
+
+&ir {
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
index 5dfd849..2650bb7 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
@@ -102,3 +102,7 @@
 	voltage-ranges = <1800 3300>;
 	vmmc-supply = <&mmc_iv>;
 };
+
+&ir {
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
index 54bb7c7..934deb9 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
@@ -60,3 +60,7 @@
 	pinctrl-names = "default";
 
 };
+
+&ir {
+	status = "okay";
+};
-- 
2.9.0

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

* Re: [PATCH v3 1/4] dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
  2016-06-28 19:17     ` Martin Blumenstingl
@ 2016-07-01  1:34       ` Rob Herring
  -1 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2016-07-01  1:34 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: linux-amlogic, linux-media, mark.rutland, carlo, khilman,
	mchehab, devicetree, narmstrong

On Tue, Jun 28, 2016 at 09:17:59PM +0200, Martin Blumenstingl wrote:
> From: Neil Armstrong <narmstrong@baylibre.com>
> 
> New bindings are needed as the register layout on the newer platforms
> is slightly different compared to Meson6b.
> 
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> ---
>  Documentation/devicetree/bindings/media/meson-ir.txt | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Acked-by: Rob Herring <robh@kernel.org>

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

* [PATCH v3 1/4] dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
@ 2016-07-01  1:34       ` Rob Herring
  0 siblings, 0 replies; 112+ messages in thread
From: Rob Herring @ 2016-07-01  1:34 UTC (permalink / raw)
  To: linus-amlogic

On Tue, Jun 28, 2016 at 09:17:59PM +0200, Martin Blumenstingl wrote:
> From: Neil Armstrong <narmstrong@baylibre.com>
> 
> New bindings are needed as the register layout on the newer platforms
> is slightly different compared to Meson6b.
> 
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> ---
>  Documentation/devicetree/bindings/media/meson-ir.txt | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Acked-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v3 0/4] Add Meson 8b / GXBB support to the IR driver
  2016-06-28 19:17   ` Martin Blumenstingl
@ 2016-08-08  5:54     ` Kevin Hilman
  -1 siblings, 0 replies; 112+ messages in thread
From: Kevin Hilman @ 2016-08-08  5:54 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: linux-amlogic, linux-media, Rob Herring, Mark Rutland,
	Carlo Caione, mchehab, devicetree, Neil Armstrong

Hi Martin,

On Tue, Jun 28, 2016 at 12:17 PM, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
> Newer Amlogic platforms (Meson 8b and GXBB) use a slightly different
> register layout for their Infrared Remoete Controller. The decoder mode
> is now configured in another register. Without the changes to the
> meson-ir driver we are simply getting incorrect "durations" reported
> from the hardware (because the hardware is not in time measurement aka
> software decode mode).
>
> This problem was also noticed by some people trying to use this on an
> ODROID-C1 and ODROID-C2 - the workaround there (probably because the
> datasheets were not publicy available yet at that time) was to switch
> to ir_raw_event_store_edge (which leaves it up to the kernel to measure
> the duration of a pulse). See [0] and [1] for the corresponding
> patches.

I tried this on meson-gxbb-p200 and I'm not seeing any button press
events with evtest or ir-keytable when using the Amlogic remote that
came with the board.  Below is the register dump you requested on IRC:

[    1.068347] Registered IR keymap rc-empty
[    1.072422] input: meson-ir as
/devices/platform/soc/c8100000.aobus/c8100580.ir/rc/rc0/input0
[    1.080814] rc rc0: meson-ir as
/devices/platform/soc/c8100000.aobus/c8100580.ir/rc/rc0
[    1.088839] input: MCE IR Keyboard/Mouse (meson-ir) as
/devices/virtual/input/input1
[    1.096519] rc rc0: lirc_dev: driver ir-lirc-codec (meson-ir)
registered at minor = 0
[    1.104119] meson-ir c8100580.ir: receiver initialized
[    1.109172] IR: reg 0x00 = 0x01d801ac
[    1.112795] IR: reg 0x04 = 0x00f800ca
[    1.116416] IR: reg 0x08 = 0x007a0066
[    1.120037] IR: reg 0x0c = 0x0044002c
[    1.123660] IR: reg 0x10 = 0x70fa0009
[    1.127278] IR: reg 0x14 = 0x00000000
[    1.130907] IR: reg 0x18 = 0x08915c00
[    1.134527] IR: reg 0x1c = 0x00009f44
[    1.138152] IR: reg 0x20 = 0x00000002

Kevin

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

* [PATCH v3 0/4] Add Meson 8b / GXBB support to the IR driver
@ 2016-08-08  5:54     ` Kevin Hilman
  0 siblings, 0 replies; 112+ messages in thread
From: Kevin Hilman @ 2016-08-08  5:54 UTC (permalink / raw)
  To: linus-amlogic

Hi Martin,

On Tue, Jun 28, 2016 at 12:17 PM, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
> Newer Amlogic platforms (Meson 8b and GXBB) use a slightly different
> register layout for their Infrared Remoete Controller. The decoder mode
> is now configured in another register. Without the changes to the
> meson-ir driver we are simply getting incorrect "durations" reported
> from the hardware (because the hardware is not in time measurement aka
> software decode mode).
>
> This problem was also noticed by some people trying to use this on an
> ODROID-C1 and ODROID-C2 - the workaround there (probably because the
> datasheets were not publicy available yet at that time) was to switch
> to ir_raw_event_store_edge (which leaves it up to the kernel to measure
> the duration of a pulse). See [0] and [1] for the corresponding
> patches.

I tried this on meson-gxbb-p200 and I'm not seeing any button press
events with evtest or ir-keytable when using the Amlogic remote that
came with the board.  Below is the register dump you requested on IRC:

[    1.068347] Registered IR keymap rc-empty
[    1.072422] input: meson-ir as
/devices/platform/soc/c8100000.aobus/c8100580.ir/rc/rc0/input0
[    1.080814] rc rc0: meson-ir as
/devices/platform/soc/c8100000.aobus/c8100580.ir/rc/rc0
[    1.088839] input: MCE IR Keyboard/Mouse (meson-ir) as
/devices/virtual/input/input1
[    1.096519] rc rc0: lirc_dev: driver ir-lirc-codec (meson-ir)
registered at minor = 0
[    1.104119] meson-ir c8100580.ir: receiver initialized
[    1.109172] IR: reg 0x00 = 0x01d801ac
[    1.112795] IR: reg 0x04 = 0x00f800ca
[    1.116416] IR: reg 0x08 = 0x007a0066
[    1.120037] IR: reg 0x0c = 0x0044002c
[    1.123660] IR: reg 0x10 = 0x70fa0009
[    1.127278] IR: reg 0x14 = 0x00000000
[    1.130907] IR: reg 0x18 = 0x08915c00
[    1.134527] IR: reg 0x1c = 0x00009f44
[    1.138152] IR: reg 0x20 = 0x00000002

Kevin

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

* [PATCH v4 0/6] Add Meson 8b / GXBB support to the IR driver
  2016-06-28 19:17   ` Martin Blumenstingl
  (?)
  (?)
@ 2016-08-19 21:55     ` Martin Blumenstingl
  -1 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linux-media, linux-gpio, linux-amlogic, devicetree, narmstrong,
	khilman, carlo
  Cc: mark.rutland, Martin Blumenstingl, catalin.marinas,
	linus.walleij, will.deacon, robh+dt, mchehab, linux-arm-kernel

Newer Amlogic platforms (Meson 8b and GXBB) use a slightly different
register layout for their Infrared Remoete Controller. The decoder mode
is now configured in another register. Without the changes to the
meson-ir driver we are simply getting incorrect "durations" reported
from the hardware (because the hardware is not in time measurement aka
software decode mode).

This problem was also noticed by some people trying to use this on an
ODROID-C1 and ODROID-C2 - the workaround there (probably because the
datasheets were not publicy available yet at that time) was to switch
to ir_raw_event_store_edge (which leaves it up to the kernel to measure
the duration of a pulse). See [0] and [1] for the corresponding
patches.

Changes in v4:
- added support for pinctrl configuration which makes it possible to
  use the IR decoder when doing a cold-boot. Without these pinctrl
  changes the IR decoder was only working when booting into stock
  Android, then rebooting and booting the mainline kernel (with the
  other patches from this series). Thanks to Kevin Hilman for spotting
  this issue.
- rebased dts changes to Kevin's v4.8/integ branch

As discussed on IRC (thanks Neil):

Tested-by: Neil Armstrong <narmstrong@baylibre.com>


[0] https://github.com/erdoukki/linux-amlogic-1/commit/969b2e2242fb14a13cb651f9a1cf771b599c958b
[1] http://forum.odroid.com/viewtopic.php?f=135&t=20504


Martin Blumenstingl (3):
  pinctrl: amlogic: gxbb: add the IR remote pin
  ARM64: dts: amlogic: add the pin for the IR remote
  ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards

Neil Armstrong (3):
  dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
  media: rc: meson-ir: Add support for newer versions of the IR decoder
  ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder

 .../devicetree/bindings/media/meson-ir.txt         |  5 +++-
 .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts |  6 +++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi   |  6 +++++
 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi      |  6 +++++
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi        | 14 +++++++++++
 drivers/media/rc/meson-ir.c                        | 29 ++++++++++++++++++----
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c         |  8 ++++++
 7 files changed, 68 insertions(+), 6 deletions(-)

-- 
2.9.3

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

* [PATCH v4 0/6] Add Meson 8b / GXBB support to the IR driver
@ 2016-08-19 21:55     ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linux-media, linux-gpio, linux-amlogic, devicetree, narmstrong,
	khilman, carlo
  Cc: linux-arm-kernel, linus.walleij, mchehab, will.deacon,
	catalin.marinas, mark.rutland, robh+dt, Martin Blumenstingl

Newer Amlogic platforms (Meson 8b and GXBB) use a slightly different
register layout for their Infrared Remoete Controller. The decoder mode
is now configured in another register. Without the changes to the
meson-ir driver we are simply getting incorrect "durations" reported
from the hardware (because the hardware is not in time measurement aka
software decode mode).

This problem was also noticed by some people trying to use this on an
ODROID-C1 and ODROID-C2 - the workaround there (probably because the
datasheets were not publicy available yet at that time) was to switch
to ir_raw_event_store_edge (which leaves it up to the kernel to measure
the duration of a pulse). See [0] and [1] for the corresponding
patches.

Changes in v4:
- added support for pinctrl configuration which makes it possible to
  use the IR decoder when doing a cold-boot. Without these pinctrl
  changes the IR decoder was only working when booting into stock
  Android, then rebooting and booting the mainline kernel (with the
  other patches from this series). Thanks to Kevin Hilman for spotting
  this issue.
- rebased dts changes to Kevin's v4.8/integ branch

As discussed on IRC (thanks Neil):

Tested-by: Neil Armstrong <narmstrong@baylibre.com>


[0] https://github.com/erdoukki/linux-amlogic-1/commit/969b2e2242fb14a13cb651f9a1cf771b599c958b
[1] http://forum.odroid.com/viewtopic.php?f=135&t=20504


Martin Blumenstingl (3):
  pinctrl: amlogic: gxbb: add the IR remote pin
  ARM64: dts: amlogic: add the pin for the IR remote
  ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards

Neil Armstrong (3):
  dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
  media: rc: meson-ir: Add support for newer versions of the IR decoder
  ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder

 .../devicetree/bindings/media/meson-ir.txt         |  5 +++-
 .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts |  6 +++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi   |  6 +++++
 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi      |  6 +++++
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi        | 14 +++++++++++
 drivers/media/rc/meson-ir.c                        | 29 ++++++++++++++++++----
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c         |  8 ++++++
 7 files changed, 68 insertions(+), 6 deletions(-)

-- 
2.9.3


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

* [PATCH v4 0/6] Add Meson 8b / GXBB support to the IR driver
@ 2016-08-19 21:55     ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linux-arm-kernel

Newer Amlogic platforms (Meson 8b and GXBB) use a slightly different
register layout for their Infrared Remoete Controller. The decoder mode
is now configured in another register. Without the changes to the
meson-ir driver we are simply getting incorrect "durations" reported
from the hardware (because the hardware is not in time measurement aka
software decode mode).

This problem was also noticed by some people trying to use this on an
ODROID-C1 and ODROID-C2 - the workaround there (probably because the
datasheets were not publicy available yet at that time) was to switch
to ir_raw_event_store_edge (which leaves it up to the kernel to measure
the duration of a pulse). See [0] and [1] for the corresponding
patches.

Changes in v4:
- added support for pinctrl configuration which makes it possible to
  use the IR decoder when doing a cold-boot. Without these pinctrl
  changes the IR decoder was only working when booting into stock
  Android, then rebooting and booting the mainline kernel (with the
  other patches from this series). Thanks to Kevin Hilman for spotting
  this issue.
- rebased dts changes to Kevin's v4.8/integ branch

As discussed on IRC (thanks Neil):

Tested-by: Neil Armstrong <narmstrong@baylibre.com>


[0] https://github.com/erdoukki/linux-amlogic-1/commit/969b2e2242fb14a13cb651f9a1cf771b599c958b
[1] http://forum.odroid.com/viewtopic.php?f=135&t=20504


Martin Blumenstingl (3):
  pinctrl: amlogic: gxbb: add the IR remote pin
  ARM64: dts: amlogic: add the pin for the IR remote
  ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards

Neil Armstrong (3):
  dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
  media: rc: meson-ir: Add support for newer versions of the IR decoder
  ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder

 .../devicetree/bindings/media/meson-ir.txt         |  5 +++-
 .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts |  6 +++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi   |  6 +++++
 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi      |  6 +++++
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi        | 14 +++++++++++
 drivers/media/rc/meson-ir.c                        | 29 ++++++++++++++++++----
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c         |  8 ++++++
 7 files changed, 68 insertions(+), 6 deletions(-)

-- 
2.9.3

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

* [PATCH v4 0/6] Add Meson 8b / GXBB support to the IR driver
@ 2016-08-19 21:55     ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linus-amlogic

Newer Amlogic platforms (Meson 8b and GXBB) use a slightly different
register layout for their Infrared Remoete Controller. The decoder mode
is now configured in another register. Without the changes to the
meson-ir driver we are simply getting incorrect "durations" reported
from the hardware (because the hardware is not in time measurement aka
software decode mode).

This problem was also noticed by some people trying to use this on an
ODROID-C1 and ODROID-C2 - the workaround there (probably because the
datasheets were not publicy available yet at that time) was to switch
to ir_raw_event_store_edge (which leaves it up to the kernel to measure
the duration of a pulse). See [0] and [1] for the corresponding
patches.

Changes in v4:
- added support for pinctrl configuration which makes it possible to
  use the IR decoder when doing a cold-boot. Without these pinctrl
  changes the IR decoder was only working when booting into stock
  Android, then rebooting and booting the mainline kernel (with the
  other patches from this series). Thanks to Kevin Hilman for spotting
  this issue.
- rebased dts changes to Kevin's v4.8/integ branch

As discussed on IRC (thanks Neil):

Tested-by: Neil Armstrong <narmstrong@baylibre.com>


[0] https://github.com/erdoukki/linux-amlogic-1/commit/969b2e2242fb14a13cb651f9a1cf771b599c958b
[1] http://forum.odroid.com/viewtopic.php?f=135&t=20504


Martin Blumenstingl (3):
  pinctrl: amlogic: gxbb: add the IR remote pin
  ARM64: dts: amlogic: add the pin for the IR remote
  ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards

Neil Armstrong (3):
  dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
  media: rc: meson-ir: Add support for newer versions of the IR decoder
  ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder

 .../devicetree/bindings/media/meson-ir.txt         |  5 +++-
 .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts |  6 +++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi   |  6 +++++
 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi      |  6 +++++
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi        | 14 +++++++++++
 drivers/media/rc/meson-ir.c                        | 29 ++++++++++++++++++----
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c         |  8 ++++++
 7 files changed, 68 insertions(+), 6 deletions(-)

-- 
2.9.3

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

* [PATCH v4 1/6] pinctrl: amlogic: gxbb: add the IR remote pin
  2016-08-19 21:55     ` Martin Blumenstingl
  (?)
  (?)
@ 2016-08-19 21:55       ` Martin Blumenstingl
  -1 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linux-media, linux-gpio, linux-amlogic, devicetree, narmstrong,
	khilman, carlo
  Cc: mark.rutland, Martin Blumenstingl, catalin.marinas,
	linus.walleij, will.deacon, robh+dt, mchehab, linux-arm-kernel

This adds the IR remote receiver to the AO domain devices.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
index cb4d6ad..8fffb31 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
@@ -225,6 +225,8 @@ static const unsigned int i2c_sda_ao_pins[] = {PIN(GPIOAO_5, 0) };
 static const unsigned int i2c_slave_sck_ao_pins[] = {PIN(GPIOAO_4, 0) };
 static const unsigned int i2c_slave_sda_ao_pins[] = {PIN(GPIOAO_5, 0) };
 
+static const unsigned int ir_in_ao_pins[] = {PIN(GPIOAO_7, 0) };
+
 static struct meson_pmx_group meson_gxbb_periphs_groups[] = {
 	GPIO_GROUP(GPIOZ_0, EE_OFF),
 	GPIO_GROUP(GPIOZ_1, EE_OFF),
@@ -432,6 +434,7 @@ static struct meson_pmx_group meson_gxbb_aobus_groups[] = {
 	GROUP(i2c_sda_ao,	0,	5),
 	GROUP(i2c_slave_sck_ao, 0,	2),
 	GROUP(i2c_slave_sda_ao, 0,	1),
+	GROUP(ir_in_ao,		0,	0),
 };
 
 static const char * const gpio_periphs_groups[] = {
@@ -521,6 +524,10 @@ static const char * const i2c_slave_ao_groups[] = {
 	"i2c_slave_sdk_ao", "i2c_slave_sda_ao",
 };
 
+static const char * const ir_in_ao_groups[] = {
+	"ir_in_ao",
+};
+
 static struct meson_pmx_func meson_gxbb_periphs_functions[] = {
 	FUNCTION(gpio_periphs),
 	FUNCTION(emmc),
@@ -537,6 +544,7 @@ static struct meson_pmx_func meson_gxbb_aobus_functions[] = {
 	FUNCTION(uart_ao_b),
 	FUNCTION(i2c_ao),
 	FUNCTION(i2c_slave_ao),
+	FUNCTION(ir_in_ao),
 };
 
 static struct meson_bank meson_gxbb_periphs_banks[] = {
-- 
2.9.3

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

* [PATCH v4 1/6] pinctrl: amlogic: gxbb: add the IR remote pin
@ 2016-08-19 21:55       ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linux-media, linux-gpio, linux-amlogic, devicetree, narmstrong,
	khilman, carlo
  Cc: linux-arm-kernel, linus.walleij, mchehab, will.deacon,
	catalin.marinas, mark.rutland, robh+dt, Martin Blumenstingl

This adds the IR remote receiver to the AO domain devices.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
index cb4d6ad..8fffb31 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
@@ -225,6 +225,8 @@ static const unsigned int i2c_sda_ao_pins[] = {PIN(GPIOAO_5, 0) };
 static const unsigned int i2c_slave_sck_ao_pins[] = {PIN(GPIOAO_4, 0) };
 static const unsigned int i2c_slave_sda_ao_pins[] = {PIN(GPIOAO_5, 0) };
 
+static const unsigned int ir_in_ao_pins[] = {PIN(GPIOAO_7, 0) };
+
 static struct meson_pmx_group meson_gxbb_periphs_groups[] = {
 	GPIO_GROUP(GPIOZ_0, EE_OFF),
 	GPIO_GROUP(GPIOZ_1, EE_OFF),
@@ -432,6 +434,7 @@ static struct meson_pmx_group meson_gxbb_aobus_groups[] = {
 	GROUP(i2c_sda_ao,	0,	5),
 	GROUP(i2c_slave_sck_ao, 0,	2),
 	GROUP(i2c_slave_sda_ao, 0,	1),
+	GROUP(ir_in_ao,		0,	0),
 };
 
 static const char * const gpio_periphs_groups[] = {
@@ -521,6 +524,10 @@ static const char * const i2c_slave_ao_groups[] = {
 	"i2c_slave_sdk_ao", "i2c_slave_sda_ao",
 };
 
+static const char * const ir_in_ao_groups[] = {
+	"ir_in_ao",
+};
+
 static struct meson_pmx_func meson_gxbb_periphs_functions[] = {
 	FUNCTION(gpio_periphs),
 	FUNCTION(emmc),
@@ -537,6 +544,7 @@ static struct meson_pmx_func meson_gxbb_aobus_functions[] = {
 	FUNCTION(uart_ao_b),
 	FUNCTION(i2c_ao),
 	FUNCTION(i2c_slave_ao),
+	FUNCTION(ir_in_ao),
 };
 
 static struct meson_bank meson_gxbb_periphs_banks[] = {
-- 
2.9.3


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

* [PATCH v4 1/6] pinctrl: amlogic: gxbb: add the IR remote pin
@ 2016-08-19 21:55       ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linux-arm-kernel

This adds the IR remote receiver to the AO domain devices.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
index cb4d6ad..8fffb31 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
@@ -225,6 +225,8 @@ static const unsigned int i2c_sda_ao_pins[] = {PIN(GPIOAO_5, 0) };
 static const unsigned int i2c_slave_sck_ao_pins[] = {PIN(GPIOAO_4, 0) };
 static const unsigned int i2c_slave_sda_ao_pins[] = {PIN(GPIOAO_5, 0) };
 
+static const unsigned int ir_in_ao_pins[] = {PIN(GPIOAO_7, 0) };
+
 static struct meson_pmx_group meson_gxbb_periphs_groups[] = {
 	GPIO_GROUP(GPIOZ_0, EE_OFF),
 	GPIO_GROUP(GPIOZ_1, EE_OFF),
@@ -432,6 +434,7 @@ static struct meson_pmx_group meson_gxbb_aobus_groups[] = {
 	GROUP(i2c_sda_ao,	0,	5),
 	GROUP(i2c_slave_sck_ao, 0,	2),
 	GROUP(i2c_slave_sda_ao, 0,	1),
+	GROUP(ir_in_ao,		0,	0),
 };
 
 static const char * const gpio_periphs_groups[] = {
@@ -521,6 +524,10 @@ static const char * const i2c_slave_ao_groups[] = {
 	"i2c_slave_sdk_ao", "i2c_slave_sda_ao",
 };
 
+static const char * const ir_in_ao_groups[] = {
+	"ir_in_ao",
+};
+
 static struct meson_pmx_func meson_gxbb_periphs_functions[] = {
 	FUNCTION(gpio_periphs),
 	FUNCTION(emmc),
@@ -537,6 +544,7 @@ static struct meson_pmx_func meson_gxbb_aobus_functions[] = {
 	FUNCTION(uart_ao_b),
 	FUNCTION(i2c_ao),
 	FUNCTION(i2c_slave_ao),
+	FUNCTION(ir_in_ao),
 };
 
 static struct meson_bank meson_gxbb_periphs_banks[] = {
-- 
2.9.3

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

* [PATCH v4 1/6] pinctrl: amlogic: gxbb: add the IR remote pin
@ 2016-08-19 21:55       ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linus-amlogic

This adds the IR remote receiver to the AO domain devices.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
index cb4d6ad..8fffb31 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
@@ -225,6 +225,8 @@ static const unsigned int i2c_sda_ao_pins[] = {PIN(GPIOAO_5, 0) };
 static const unsigned int i2c_slave_sck_ao_pins[] = {PIN(GPIOAO_4, 0) };
 static const unsigned int i2c_slave_sda_ao_pins[] = {PIN(GPIOAO_5, 0) };
 
+static const unsigned int ir_in_ao_pins[] = {PIN(GPIOAO_7, 0) };
+
 static struct meson_pmx_group meson_gxbb_periphs_groups[] = {
 	GPIO_GROUP(GPIOZ_0, EE_OFF),
 	GPIO_GROUP(GPIOZ_1, EE_OFF),
@@ -432,6 +434,7 @@ static struct meson_pmx_group meson_gxbb_aobus_groups[] = {
 	GROUP(i2c_sda_ao,	0,	5),
 	GROUP(i2c_slave_sck_ao, 0,	2),
 	GROUP(i2c_slave_sda_ao, 0,	1),
+	GROUP(ir_in_ao,		0,	0),
 };
 
 static const char * const gpio_periphs_groups[] = {
@@ -521,6 +524,10 @@ static const char * const i2c_slave_ao_groups[] = {
 	"i2c_slave_sdk_ao", "i2c_slave_sda_ao",
 };
 
+static const char * const ir_in_ao_groups[] = {
+	"ir_in_ao",
+};
+
 static struct meson_pmx_func meson_gxbb_periphs_functions[] = {
 	FUNCTION(gpio_periphs),
 	FUNCTION(emmc),
@@ -537,6 +544,7 @@ static struct meson_pmx_func meson_gxbb_aobus_functions[] = {
 	FUNCTION(uart_ao_b),
 	FUNCTION(i2c_ao),
 	FUNCTION(i2c_slave_ao),
+	FUNCTION(ir_in_ao),
 };
 
 static struct meson_bank meson_gxbb_periphs_banks[] = {
-- 
2.9.3

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

* [PATCH v4 2/6] ARM64: dts: amlogic: add the pin for the IR remote
  2016-08-19 21:55     ` Martin Blumenstingl
  (?)
  (?)
@ 2016-08-19 21:55         ` Martin Blumenstingl
  -1 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linux-media-u79uwXL29TY76Z2rM5mHXA,
	linux-gpio-u79uwXL29TY76Z2rM5mHXA,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	narmstrong-rdvid1DuHRBWk0Htik3J/w,
	khilman-rdvid1DuHRBWk0Htik3J/w, carlo-KA+7E9HrN00dnm+yROfE0A
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linus.walleij-QSEj5FYQhm4dnm+yROfE0A,
	mchehab-DgEjT+Ai2ygdnm+yROfE0A, will.deacon-5wv7dgnIgG8,
	catalin.marinas-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, Martin Blumenstingl

Signed-off-by: Martin Blumenstingl <martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 4f42316..72df302 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -210,6 +210,13 @@
 						function = "uart_ao";
 					};
 				};
+
+				ir_in_ao_pins: ir_in_ao {
+					mux {
+						groups = "ir_in_ao";
+						function = "ir_in_ao";
+					};
+				};
 			};
 
 			uart_AO: serial@4c0 {
-- 
2.9.3

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

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

* [PATCH v4 2/6] ARM64: dts: amlogic: add the pin for the IR remote
@ 2016-08-19 21:55         ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linux-media, linux-gpio, linux-amlogic, devicetree, narmstrong,
	khilman, carlo
  Cc: linux-arm-kernel, linus.walleij, mchehab, will.deacon,
	catalin.marinas, mark.rutland, robh+dt, Martin Blumenstingl

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 4f42316..72df302 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -210,6 +210,13 @@
 						function = "uart_ao";
 					};
 				};
+
+				ir_in_ao_pins: ir_in_ao {
+					mux {
+						groups = "ir_in_ao";
+						function = "ir_in_ao";
+					};
+				};
 			};
 
 			uart_AO: serial@4c0 {
-- 
2.9.3


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

* [PATCH v4 2/6] ARM64: dts: amlogic: add the pin for the IR remote
@ 2016-08-19 21:55         ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 4f42316..72df302 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -210,6 +210,13 @@
 						function = "uart_ao";
 					};
 				};
+
+				ir_in_ao_pins: ir_in_ao {
+					mux {
+						groups = "ir_in_ao";
+						function = "ir_in_ao";
+					};
+				};
 			};
 
 			uart_AO: serial at 4c0 {
-- 
2.9.3

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

* [PATCH v4 2/6] ARM64: dts: amlogic: add the pin for the IR remote
@ 2016-08-19 21:55         ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linus-amlogic

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 4f42316..72df302 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -210,6 +210,13 @@
 						function = "uart_ao";
 					};
 				};
+
+				ir_in_ao_pins: ir_in_ao {
+					mux {
+						groups = "ir_in_ao";
+						function = "ir_in_ao";
+					};
+				};
 			};
 
 			uart_AO: serial at 4c0 {
-- 
2.9.3

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

* [PATCH v4 3/6] dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
  2016-08-19 21:55     ` Martin Blumenstingl
  (?)
  (?)
@ 2016-08-19 21:55         ` Martin Blumenstingl
  -1 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linux-media-u79uwXL29TY76Z2rM5mHXA,
	linux-gpio-u79uwXL29TY76Z2rM5mHXA,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	narmstrong-rdvid1DuHRBWk0Htik3J/w,
	khilman-rdvid1DuHRBWk0Htik3J/w, carlo-KA+7E9HrN00dnm+yROfE0A
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linus.walleij-QSEj5FYQhm4dnm+yROfE0A,
	mchehab-DgEjT+Ai2ygdnm+yROfE0A, will.deacon-5wv7dgnIgG8,
	catalin.marinas-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, Martin Blumenstingl

From: Neil Armstrong <narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>

New bindings are needed as the register layout on the newer platforms
is slightly different compared to Meson6b.

Signed-off-by: Neil Armstrong <narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 Documentation/devicetree/bindings/media/meson-ir.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/media/meson-ir.txt b/Documentation/devicetree/bindings/media/meson-ir.txt
index 407848e..e7e3f3c 100644
--- a/Documentation/devicetree/bindings/media/meson-ir.txt
+++ b/Documentation/devicetree/bindings/media/meson-ir.txt
@@ -1,7 +1,10 @@
 * Amlogic Meson IR remote control receiver
 
 Required properties:
- - compatible	: should be "amlogic,meson6-ir"
+ - compatible	: depending on the platform this should be one of:
+		  - "amlogic,meson6-ir"
+		  - "amlogic,meson8b-ir"
+		  - "amlogic,meson-gxbb-ir"
  - reg		: physical base address and length of the device registers
  - interrupts	: a single specifier for the interrupt from the device
 
-- 
2.9.3

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

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

* [PATCH v4 3/6] dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
@ 2016-08-19 21:55         ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linux-media, linux-gpio, linux-amlogic, devicetree, narmstrong,
	khilman, carlo
  Cc: linux-arm-kernel, linus.walleij, mchehab, will.deacon,
	catalin.marinas, mark.rutland, robh+dt, Martin Blumenstingl

From: Neil Armstrong <narmstrong@baylibre.com>

New bindings are needed as the register layout on the newer platforms
is slightly different compared to Meson6b.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/media/meson-ir.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/media/meson-ir.txt b/Documentation/devicetree/bindings/media/meson-ir.txt
index 407848e..e7e3f3c 100644
--- a/Documentation/devicetree/bindings/media/meson-ir.txt
+++ b/Documentation/devicetree/bindings/media/meson-ir.txt
@@ -1,7 +1,10 @@
 * Amlogic Meson IR remote control receiver
 
 Required properties:
- - compatible	: should be "amlogic,meson6-ir"
+ - compatible	: depending on the platform this should be one of:
+		  - "amlogic,meson6-ir"
+		  - "amlogic,meson8b-ir"
+		  - "amlogic,meson-gxbb-ir"
  - reg		: physical base address and length of the device registers
  - interrupts	: a single specifier for the interrupt from the device
 
-- 
2.9.3


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

* [PATCH v4 3/6] dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
@ 2016-08-19 21:55         ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linux-arm-kernel

From: Neil Armstrong <narmstrong@baylibre.com>

New bindings are needed as the register layout on the newer platforms
is slightly different compared to Meson6b.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/media/meson-ir.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/media/meson-ir.txt b/Documentation/devicetree/bindings/media/meson-ir.txt
index 407848e..e7e3f3c 100644
--- a/Documentation/devicetree/bindings/media/meson-ir.txt
+++ b/Documentation/devicetree/bindings/media/meson-ir.txt
@@ -1,7 +1,10 @@
 * Amlogic Meson IR remote control receiver
 
 Required properties:
- - compatible	: should be "amlogic,meson6-ir"
+ - compatible	: depending on the platform this should be one of:
+		  - "amlogic,meson6-ir"
+		  - "amlogic,meson8b-ir"
+		  - "amlogic,meson-gxbb-ir"
  - reg		: physical base address and length of the device registers
  - interrupts	: a single specifier for the interrupt from the device
 
-- 
2.9.3

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

* [PATCH v4 3/6] dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
@ 2016-08-19 21:55         ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linus-amlogic

From: Neil Armstrong <narmstrong@baylibre.com>

New bindings are needed as the register layout on the newer platforms
is slightly different compared to Meson6b.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/media/meson-ir.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/media/meson-ir.txt b/Documentation/devicetree/bindings/media/meson-ir.txt
index 407848e..e7e3f3c 100644
--- a/Documentation/devicetree/bindings/media/meson-ir.txt
+++ b/Documentation/devicetree/bindings/media/meson-ir.txt
@@ -1,7 +1,10 @@
 * Amlogic Meson IR remote control receiver
 
 Required properties:
- - compatible	: should be "amlogic,meson6-ir"
+ - compatible	: depending on the platform this should be one of:
+		  - "amlogic,meson6-ir"
+		  - "amlogic,meson8b-ir"
+		  - "amlogic,meson-gxbb-ir"
  - reg		: physical base address and length of the device registers
  - interrupts	: a single specifier for the interrupt from the device
 
-- 
2.9.3

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

* [PATCH v4 4/6] media: rc: meson-ir: Add support for newer versions of the IR decoder
  2016-08-19 21:55     ` Martin Blumenstingl
  (?)
@ 2016-08-19 21:55       ` Martin Blumenstingl
  -1 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linux-media, linux-gpio, linux-amlogic, devicetree, narmstrong,
	khilman, carlo
  Cc: linux-arm-kernel, linus.walleij, mchehab, will.deacon,
	catalin.marinas, mark.rutland, robh+dt, Martin Blumenstingl

From: Neil Armstrong <narmstrong@baylibre.com>

Newer SoCs (Meson 8b and GXBB) are using REG2 (offset 0x20) instead of
REG1 to configure the decoder mode. This makes it necessary to
introduce new bindings so the driver knows which register has to be
used.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 drivers/media/rc/meson-ir.c | 29 ++++++++++++++++++++++++-----
 1 file changed, 24 insertions(+), 5 deletions(-)

diff --git a/drivers/media/rc/meson-ir.c b/drivers/media/rc/meson-ir.c
index fcc3b82..003fff0 100644
--- a/drivers/media/rc/meson-ir.c
+++ b/drivers/media/rc/meson-ir.c
@@ -24,6 +24,7 @@
 
 #define DRIVER_NAME		"meson-ir"
 
+/* valid on all Meson platforms */
 #define IR_DEC_LDR_ACTIVE	0x00
 #define IR_DEC_LDR_IDLE		0x04
 #define IR_DEC_LDR_REPEAT	0x08
@@ -32,12 +33,21 @@
 #define IR_DEC_FRAME		0x14
 #define IR_DEC_STATUS		0x18
 #define IR_DEC_REG1		0x1c
+/* only available on Meson 8b and newer */
+#define IR_DEC_REG2		0x20
 
 #define REG0_RATE_MASK		(BIT(11) - 1)
 
-#define REG1_MODE_MASK		(BIT(7) | BIT(8))
-#define REG1_MODE_NEC		(0 << 7)
-#define REG1_MODE_GENERAL	(2 << 7)
+#define DECODE_MODE_NEC		0x0
+#define DECODE_MODE_RAW		0x2
+
+/* Meson 6b uses REG1 to configure the mode */
+#define REG1_MODE_MASK		GENMASK(8, 7)
+#define REG1_MODE_SHIFT		7
+
+/* Meson 8b / GXBB use REG2 to configure the mode */
+#define REG2_MODE_MASK		GENMASK(3, 0)
+#define REG2_MODE_SHIFT		0
 
 #define REG1_TIME_IV_SHIFT	16
 #define REG1_TIME_IV_MASK	((BIT(13) - 1) << REG1_TIME_IV_SHIFT)
@@ -158,8 +168,15 @@ static int meson_ir_probe(struct platform_device *pdev)
 	/* Reset the decoder */
 	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_RESET, REG1_RESET);
 	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_RESET, 0);
-	/* Set general operation mode */
-	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_MODE_MASK, REG1_MODE_GENERAL);
+
+	/* Set general operation mode (= raw/software decoding) */
+	if (of_device_is_compatible(node, "amlogic,meson6-ir"))
+		meson_ir_set_mask(ir, IR_DEC_REG1, REG1_MODE_MASK,
+				  DECODE_MODE_RAW << REG1_MODE_SHIFT);
+	else
+		meson_ir_set_mask(ir, IR_DEC_REG2, REG2_MODE_MASK,
+				  DECODE_MODE_RAW << REG2_MODE_SHIFT);
+
 	/* Set rate */
 	meson_ir_set_mask(ir, IR_DEC_REG0, REG0_RATE_MASK, MESON_TRATE - 1);
 	/* IRQ on rising and falling edges */
@@ -197,6 +214,8 @@ static int meson_ir_remove(struct platform_device *pdev)
 
 static const struct of_device_id meson_ir_match[] = {
 	{ .compatible = "amlogic,meson6-ir" },
+	{ .compatible = "amlogic,meson8b-ir" },
+	{ .compatible = "amlogic,meson-gxbb-ir" },
 	{ },
 };
 
-- 
2.9.3

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

* [PATCH v4 4/6] media: rc: meson-ir: Add support for newer versions of the IR decoder
@ 2016-08-19 21:55       ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linux-arm-kernel

From: Neil Armstrong <narmstrong@baylibre.com>

Newer SoCs (Meson 8b and GXBB) are using REG2 (offset 0x20) instead of
REG1 to configure the decoder mode. This makes it necessary to
introduce new bindings so the driver knows which register has to be
used.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 drivers/media/rc/meson-ir.c | 29 ++++++++++++++++++++++++-----
 1 file changed, 24 insertions(+), 5 deletions(-)

diff --git a/drivers/media/rc/meson-ir.c b/drivers/media/rc/meson-ir.c
index fcc3b82..003fff0 100644
--- a/drivers/media/rc/meson-ir.c
+++ b/drivers/media/rc/meson-ir.c
@@ -24,6 +24,7 @@
 
 #define DRIVER_NAME		"meson-ir"
 
+/* valid on all Meson platforms */
 #define IR_DEC_LDR_ACTIVE	0x00
 #define IR_DEC_LDR_IDLE		0x04
 #define IR_DEC_LDR_REPEAT	0x08
@@ -32,12 +33,21 @@
 #define IR_DEC_FRAME		0x14
 #define IR_DEC_STATUS		0x18
 #define IR_DEC_REG1		0x1c
+/* only available on Meson 8b and newer */
+#define IR_DEC_REG2		0x20
 
 #define REG0_RATE_MASK		(BIT(11) - 1)
 
-#define REG1_MODE_MASK		(BIT(7) | BIT(8))
-#define REG1_MODE_NEC		(0 << 7)
-#define REG1_MODE_GENERAL	(2 << 7)
+#define DECODE_MODE_NEC		0x0
+#define DECODE_MODE_RAW		0x2
+
+/* Meson 6b uses REG1 to configure the mode */
+#define REG1_MODE_MASK		GENMASK(8, 7)
+#define REG1_MODE_SHIFT		7
+
+/* Meson 8b / GXBB use REG2 to configure the mode */
+#define REG2_MODE_MASK		GENMASK(3, 0)
+#define REG2_MODE_SHIFT		0
 
 #define REG1_TIME_IV_SHIFT	16
 #define REG1_TIME_IV_MASK	((BIT(13) - 1) << REG1_TIME_IV_SHIFT)
@@ -158,8 +168,15 @@ static int meson_ir_probe(struct platform_device *pdev)
 	/* Reset the decoder */
 	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_RESET, REG1_RESET);
 	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_RESET, 0);
-	/* Set general operation mode */
-	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_MODE_MASK, REG1_MODE_GENERAL);
+
+	/* Set general operation mode (= raw/software decoding) */
+	if (of_device_is_compatible(node, "amlogic,meson6-ir"))
+		meson_ir_set_mask(ir, IR_DEC_REG1, REG1_MODE_MASK,
+				  DECODE_MODE_RAW << REG1_MODE_SHIFT);
+	else
+		meson_ir_set_mask(ir, IR_DEC_REG2, REG2_MODE_MASK,
+				  DECODE_MODE_RAW << REG2_MODE_SHIFT);
+
 	/* Set rate */
 	meson_ir_set_mask(ir, IR_DEC_REG0, REG0_RATE_MASK, MESON_TRATE - 1);
 	/* IRQ on rising and falling edges */
@@ -197,6 +214,8 @@ static int meson_ir_remove(struct platform_device *pdev)
 
 static const struct of_device_id meson_ir_match[] = {
 	{ .compatible = "amlogic,meson6-ir" },
+	{ .compatible = "amlogic,meson8b-ir" },
+	{ .compatible = "amlogic,meson-gxbb-ir" },
 	{ },
 };
 
-- 
2.9.3

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

* [PATCH v4 4/6] media: rc: meson-ir: Add support for newer versions of the IR decoder
@ 2016-08-19 21:55       ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linus-amlogic

From: Neil Armstrong <narmstrong@baylibre.com>

Newer SoCs (Meson 8b and GXBB) are using REG2 (offset 0x20) instead of
REG1 to configure the decoder mode. This makes it necessary to
introduce new bindings so the driver knows which register has to be
used.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 drivers/media/rc/meson-ir.c | 29 ++++++++++++++++++++++++-----
 1 file changed, 24 insertions(+), 5 deletions(-)

diff --git a/drivers/media/rc/meson-ir.c b/drivers/media/rc/meson-ir.c
index fcc3b82..003fff0 100644
--- a/drivers/media/rc/meson-ir.c
+++ b/drivers/media/rc/meson-ir.c
@@ -24,6 +24,7 @@
 
 #define DRIVER_NAME		"meson-ir"
 
+/* valid on all Meson platforms */
 #define IR_DEC_LDR_ACTIVE	0x00
 #define IR_DEC_LDR_IDLE		0x04
 #define IR_DEC_LDR_REPEAT	0x08
@@ -32,12 +33,21 @@
 #define IR_DEC_FRAME		0x14
 #define IR_DEC_STATUS		0x18
 #define IR_DEC_REG1		0x1c
+/* only available on Meson 8b and newer */
+#define IR_DEC_REG2		0x20
 
 #define REG0_RATE_MASK		(BIT(11) - 1)
 
-#define REG1_MODE_MASK		(BIT(7) | BIT(8))
-#define REG1_MODE_NEC		(0 << 7)
-#define REG1_MODE_GENERAL	(2 << 7)
+#define DECODE_MODE_NEC		0x0
+#define DECODE_MODE_RAW		0x2
+
+/* Meson 6b uses REG1 to configure the mode */
+#define REG1_MODE_MASK		GENMASK(8, 7)
+#define REG1_MODE_SHIFT		7
+
+/* Meson 8b / GXBB use REG2 to configure the mode */
+#define REG2_MODE_MASK		GENMASK(3, 0)
+#define REG2_MODE_SHIFT		0
 
 #define REG1_TIME_IV_SHIFT	16
 #define REG1_TIME_IV_MASK	((BIT(13) - 1) << REG1_TIME_IV_SHIFT)
@@ -158,8 +168,15 @@ static int meson_ir_probe(struct platform_device *pdev)
 	/* Reset the decoder */
 	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_RESET, REG1_RESET);
 	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_RESET, 0);
-	/* Set general operation mode */
-	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_MODE_MASK, REG1_MODE_GENERAL);
+
+	/* Set general operation mode (= raw/software decoding) */
+	if (of_device_is_compatible(node, "amlogic,meson6-ir"))
+		meson_ir_set_mask(ir, IR_DEC_REG1, REG1_MODE_MASK,
+				  DECODE_MODE_RAW << REG1_MODE_SHIFT);
+	else
+		meson_ir_set_mask(ir, IR_DEC_REG2, REG2_MODE_MASK,
+				  DECODE_MODE_RAW << REG2_MODE_SHIFT);
+
 	/* Set rate */
 	meson_ir_set_mask(ir, IR_DEC_REG0, REG0_RATE_MASK, MESON_TRATE - 1);
 	/* IRQ on rising and falling edges */
@@ -197,6 +214,8 @@ static int meson_ir_remove(struct platform_device *pdev)
 
 static const struct of_device_id meson_ir_match[] = {
 	{ .compatible = "amlogic,meson6-ir" },
+	{ .compatible = "amlogic,meson8b-ir" },
+	{ .compatible = "amlogic,meson-gxbb-ir" },
 	{ },
 };
 
-- 
2.9.3

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

* [PATCH v4 5/6] ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder
  2016-08-19 21:55     ` Martin Blumenstingl
  (?)
@ 2016-08-19 21:55       ` Martin Blumenstingl
  -1 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linux-media, linux-gpio, linux-amlogic, devicetree, narmstrong,
	khilman, carlo
  Cc: linux-arm-kernel, linus.walleij, mchehab, will.deacon,
	catalin.marinas, mark.rutland, robh+dt, Martin Blumenstingl

From: Neil Armstrong <narmstrong@baylibre.com>

This adds the Infrared Remote Controller node so boards with an IR
remote can simply enable it.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 72df302..7070719 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -226,6 +226,13 @@
 				clocks = <&xtal>;
 				status = "disabled";
 			};
+
+			ir: ir@580 {
+				compatible = "amlogic,meson-gxbb-ir";
+				reg = <0x0 0x00580 0x0 0x40>;
+				interrupts = <GIC_SPI 196 IRQ_TYPE_EDGE_RISING>;
+				status = "disabled";
+			};
 		};
 
 		periphs: periphs@c8834000 {
-- 
2.9.3

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

* [PATCH v4 5/6] ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder
@ 2016-08-19 21:55       ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linux-arm-kernel

From: Neil Armstrong <narmstrong@baylibre.com>

This adds the Infrared Remote Controller node so boards with an IR
remote can simply enable it.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 72df302..7070719 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -226,6 +226,13 @@
 				clocks = <&xtal>;
 				status = "disabled";
 			};
+
+			ir: ir at 580 {
+				compatible = "amlogic,meson-gxbb-ir";
+				reg = <0x0 0x00580 0x0 0x40>;
+				interrupts = <GIC_SPI 196 IRQ_TYPE_EDGE_RISING>;
+				status = "disabled";
+			};
 		};
 
 		periphs: periphs at c8834000 {
-- 
2.9.3

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

* [PATCH v4 5/6] ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder
@ 2016-08-19 21:55       ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linus-amlogic

From: Neil Armstrong <narmstrong@baylibre.com>

This adds the Infrared Remote Controller node so boards with an IR
remote can simply enable it.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 72df302..7070719 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -226,6 +226,13 @@
 				clocks = <&xtal>;
 				status = "disabled";
 			};
+
+			ir: ir at 580 {
+				compatible = "amlogic,meson-gxbb-ir";
+				reg = <0x0 0x00580 0x0 0x40>;
+				interrupts = <GIC_SPI 196 IRQ_TYPE_EDGE_RISING>;
+				status = "disabled";
+			};
 		};
 
 		periphs: periphs at c8834000 {
-- 
2.9.3

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

* [PATCH v4 6/6] ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards
  2016-08-19 21:55     ` Martin Blumenstingl
  (?)
  (?)
@ 2016-08-19 21:55         ` Martin Blumenstingl
  -1 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linux-media-u79uwXL29TY76Z2rM5mHXA,
	linux-gpio-u79uwXL29TY76Z2rM5mHXA,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	narmstrong-rdvid1DuHRBWk0Htik3J/w,
	khilman-rdvid1DuHRBWk0Htik3J/w, carlo-KA+7E9HrN00dnm+yROfE0A
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linus.walleij-QSEj5FYQhm4dnm+yROfE0A,
	mchehab-DgEjT+Ai2ygdnm+yROfE0A, will.deacon-5wv7dgnIgG8,
	catalin.marinas-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, Martin Blumenstingl

Enable the Infrared Remote Controller on boards which have an Infrared
receiver.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts  | 6 ++++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi     | 6 ++++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 6 ++++++
 3 files changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index cba3ea1..9900b87 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -161,3 +161,9 @@
 	vmmc-supply = <&vcc3v3>;
 	vmmcq-sumpply = <&vcc1v8>;
 };
+
+&ir {
+	status = "okay";
+	pinctrl-0 = <&ir_in_ao_pins>;
+	pinctrl-names = "default";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
index e118754..dc007fe 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
@@ -143,3 +143,9 @@
 	vmmc-supply = <&vcc_3v3>;
 	vmmcq-sumpply = <&vddio_boot>;
 };
+
+&ir {
+	status = "okay";
+	pinctrl-0 = <&ir_in_ao_pins>;
+	pinctrl-names = "default";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
index 54bb7c7..45cd3ae 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
@@ -60,3 +60,9 @@
 	pinctrl-names = "default";
 
 };
+
+&ir {
+	status = "okay";
+	pinctrl-0 = <&ir_in_ao_pins>;
+	pinctrl-names = "default";
+};
-- 
2.9.3

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

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

* [PATCH v4 6/6] ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards
@ 2016-08-19 21:55         ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linux-media, linux-gpio, linux-amlogic, devicetree, narmstrong,
	khilman, carlo
  Cc: linux-arm-kernel, linus.walleij, mchehab, will.deacon,
	catalin.marinas, mark.rutland, robh+dt, Martin Blumenstingl

Enable the Infrared Remote Controller on boards which have an Infrared
receiver.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts  | 6 ++++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi     | 6 ++++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 6 ++++++
 3 files changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index cba3ea1..9900b87 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -161,3 +161,9 @@
 	vmmc-supply = <&vcc3v3>;
 	vmmcq-sumpply = <&vcc1v8>;
 };
+
+&ir {
+	status = "okay";
+	pinctrl-0 = <&ir_in_ao_pins>;
+	pinctrl-names = "default";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
index e118754..dc007fe 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
@@ -143,3 +143,9 @@
 	vmmc-supply = <&vcc_3v3>;
 	vmmcq-sumpply = <&vddio_boot>;
 };
+
+&ir {
+	status = "okay";
+	pinctrl-0 = <&ir_in_ao_pins>;
+	pinctrl-names = "default";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
index 54bb7c7..45cd3ae 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
@@ -60,3 +60,9 @@
 	pinctrl-names = "default";
 
 };
+
+&ir {
+	status = "okay";
+	pinctrl-0 = <&ir_in_ao_pins>;
+	pinctrl-names = "default";
+};
-- 
2.9.3


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

* [PATCH v4 6/6] ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards
@ 2016-08-19 21:55         ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linux-arm-kernel

Enable the Infrared Remote Controller on boards which have an Infrared
receiver.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts  | 6 ++++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi     | 6 ++++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 6 ++++++
 3 files changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index cba3ea1..9900b87 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -161,3 +161,9 @@
 	vmmc-supply = <&vcc3v3>;
 	vmmcq-sumpply = <&vcc1v8>;
 };
+
+&ir {
+	status = "okay";
+	pinctrl-0 = <&ir_in_ao_pins>;
+	pinctrl-names = "default";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
index e118754..dc007fe 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
@@ -143,3 +143,9 @@
 	vmmc-supply = <&vcc_3v3>;
 	vmmcq-sumpply = <&vddio_boot>;
 };
+
+&ir {
+	status = "okay";
+	pinctrl-0 = <&ir_in_ao_pins>;
+	pinctrl-names = "default";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
index 54bb7c7..45cd3ae 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
@@ -60,3 +60,9 @@
 	pinctrl-names = "default";
 
 };
+
+&ir {
+	status = "okay";
+	pinctrl-0 = <&ir_in_ao_pins>;
+	pinctrl-names = "default";
+};
-- 
2.9.3

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

* [PATCH v4 6/6] ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards
@ 2016-08-19 21:55         ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-19 21:55 UTC (permalink / raw)
  To: linus-amlogic

Enable the Infrared Remote Controller on boards which have an Infrared
receiver.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts  | 6 ++++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi     | 6 ++++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 6 ++++++
 3 files changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index cba3ea1..9900b87 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -161,3 +161,9 @@
 	vmmc-supply = <&vcc3v3>;
 	vmmcq-sumpply = <&vcc1v8>;
 };
+
+&ir {
+	status = "okay";
+	pinctrl-0 = <&ir_in_ao_pins>;
+	pinctrl-names = "default";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
index e118754..dc007fe 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
@@ -143,3 +143,9 @@
 	vmmc-supply = <&vcc_3v3>;
 	vmmcq-sumpply = <&vddio_boot>;
 };
+
+&ir {
+	status = "okay";
+	pinctrl-0 = <&ir_in_ao_pins>;
+	pinctrl-names = "default";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
index 54bb7c7..45cd3ae 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
@@ -60,3 +60,9 @@
 	pinctrl-names = "default";
 
 };
+
+&ir {
+	status = "okay";
+	pinctrl-0 = <&ir_in_ao_pins>;
+	pinctrl-names = "default";
+};
-- 
2.9.3

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

* Re: [PATCH v4 1/6] pinctrl: amlogic: gxbb: add the IR remote pin
  2016-08-19 21:55       ` Martin Blumenstingl
  (?)
@ 2016-08-19 22:23         ` Kevin Hilman
  -1 siblings, 0 replies; 112+ messages in thread
From: Kevin Hilman @ 2016-08-19 22:23 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: linux-media, linux-gpio, linux-amlogic, devicetree, narmstrong,
	carlo, linux-arm-kernel, linus.walleij, mchehab, will.deacon,
	catalin.marinas, mark.rutland, robh+dt

Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:

> This adds the IR remote receiver to the AO domain devices.

nit Re: Subject: should specify IR remote *input* pin.

> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> ---
>  drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
> index cb4d6ad..8fffb31 100644
> --- a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
> +++ b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
> @@ -225,6 +225,8 @@ static const unsigned int i2c_sda_ao_pins[] = {PIN(GPIOAO_5, 0) };
>  static const unsigned int i2c_slave_sck_ao_pins[] = {PIN(GPIOAO_4, 0) };
>  static const unsigned int i2c_slave_sda_ao_pins[] = {PIN(GPIOAO_5, 0) };
>  
> +static const unsigned int ir_in_ao_pins[] = {PIN(GPIOAO_7, 0) };
> +

I'm trying to keep the names here so they match the datasheet, which
calls this remote_input_ao.  Please update throughout the patch.

Otherwise looks good to me.  Feel free to add

Reviewed-by: Kevin Hilman <khilman@baylibre.com>

and Linus W can queue it up.

Thanks,

Kevin

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

* [PATCH v4 1/6] pinctrl: amlogic: gxbb: add the IR remote pin
@ 2016-08-19 22:23         ` Kevin Hilman
  0 siblings, 0 replies; 112+ messages in thread
From: Kevin Hilman @ 2016-08-19 22:23 UTC (permalink / raw)
  To: linux-arm-kernel

Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:

> This adds the IR remote receiver to the AO domain devices.

nit Re: Subject: should specify IR remote *input* pin.

> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> ---
>  drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
> index cb4d6ad..8fffb31 100644
> --- a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
> +++ b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
> @@ -225,6 +225,8 @@ static const unsigned int i2c_sda_ao_pins[] = {PIN(GPIOAO_5, 0) };
>  static const unsigned int i2c_slave_sck_ao_pins[] = {PIN(GPIOAO_4, 0) };
>  static const unsigned int i2c_slave_sda_ao_pins[] = {PIN(GPIOAO_5, 0) };
>  
> +static const unsigned int ir_in_ao_pins[] = {PIN(GPIOAO_7, 0) };
> +

I'm trying to keep the names here so they match the datasheet, which
calls this remote_input_ao.  Please update throughout the patch.

Otherwise looks good to me.  Feel free to add

Reviewed-by: Kevin Hilman <khilman@baylibre.com>

and Linus W can queue it up.

Thanks,

Kevin

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

* [PATCH v4 1/6] pinctrl: amlogic: gxbb: add the IR remote pin
@ 2016-08-19 22:23         ` Kevin Hilman
  0 siblings, 0 replies; 112+ messages in thread
From: Kevin Hilman @ 2016-08-19 22:23 UTC (permalink / raw)
  To: linus-amlogic

Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:

> This adds the IR remote receiver to the AO domain devices.

nit Re: Subject: should specify IR remote *input* pin.

> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> ---
>  drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
> index cb4d6ad..8fffb31 100644
> --- a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
> +++ b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
> @@ -225,6 +225,8 @@ static const unsigned int i2c_sda_ao_pins[] = {PIN(GPIOAO_5, 0) };
>  static const unsigned int i2c_slave_sck_ao_pins[] = {PIN(GPIOAO_4, 0) };
>  static const unsigned int i2c_slave_sda_ao_pins[] = {PIN(GPIOAO_5, 0) };
>  
> +static const unsigned int ir_in_ao_pins[] = {PIN(GPIOAO_7, 0) };
> +

I'm trying to keep the names here so they match the datasheet, which
calls this remote_input_ao.  Please update throughout the patch.

Otherwise looks good to me.  Feel free to add

Reviewed-by: Kevin Hilman <khilman@baylibre.com>

and Linus W can queue it up.

Thanks,

Kevin

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

* Re: [PATCH v4 4/6] media: rc: meson-ir: Add support for newer versions of the IR decoder
  2016-08-19 21:55       ` Martin Blumenstingl
  (?)
  (?)
@ 2016-08-19 22:28         ` Kevin Hilman
  -1 siblings, 0 replies; 112+ messages in thread
From: Kevin Hilman @ 2016-08-19 22:28 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: linux-media, linux-gpio, linux-amlogic, devicetree, narmstrong,
	carlo, linux-arm-kernel, linus.walleij, mchehab, will.deacon,
	catalin.marinas, mark.rutland, robh+dt

Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:

> From: Neil Armstrong <narmstrong@baylibre.com>
>
> Newer SoCs (Meson 8b and GXBB) are using REG2 (offset 0x20) instead of
> REG1 to configure the decoder mode. This makes it necessary to
> introduce new bindings so the driver knows which register has to be
> used.
>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

Acked-by: Kevin Hilman <khilman@baylibre.com>

Mauro, are you the one to pick up new media/rc drivers?  Or if you
prefer, with your ack, I'll take this along with the DT and submit via
arm-soc.

Thanks,

Kevin

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

* Re: [PATCH v4 4/6] media: rc: meson-ir: Add support for newer versions of the IR decoder
@ 2016-08-19 22:28         ` Kevin Hilman
  0 siblings, 0 replies; 112+ messages in thread
From: Kevin Hilman @ 2016-08-19 22:28 UTC (permalink / raw)
  To: Martin Blumenstingl, Mauro Carvalho Chehab
  Cc: linux-media, linux-gpio, linux-amlogic, devicetree, narmstrong,
	carlo, linux-arm-kernel, linus.walleij, mchehab, will.deacon,
	catalin.marinas, mark.rutland, robh+dt

Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:

> From: Neil Armstrong <narmstrong@baylibre.com>
>
> Newer SoCs (Meson 8b and GXBB) are using REG2 (offset 0x20) instead of
> REG1 to configure the decoder mode. This makes it necessary to
> introduce new bindings so the driver knows which register has to be
> used.
>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

Acked-by: Kevin Hilman <khilman@baylibre.com>

Mauro, are you the one to pick up new media/rc drivers?  Or if you
prefer, with your ack, I'll take this along with the DT and submit via
arm-soc.

Thanks,

Kevin

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

* [PATCH v4 4/6] media: rc: meson-ir: Add support for newer versions of the IR decoder
@ 2016-08-19 22:28         ` Kevin Hilman
  0 siblings, 0 replies; 112+ messages in thread
From: Kevin Hilman @ 2016-08-19 22:28 UTC (permalink / raw)
  To: linux-arm-kernel

Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:

> From: Neil Armstrong <narmstrong@baylibre.com>
>
> Newer SoCs (Meson 8b and GXBB) are using REG2 (offset 0x20) instead of
> REG1 to configure the decoder mode. This makes it necessary to
> introduce new bindings so the driver knows which register has to be
> used.
>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

Acked-by: Kevin Hilman <khilman@baylibre.com>

Mauro, are you the one to pick up new media/rc drivers?  Or if you
prefer, with your ack, I'll take this along with the DT and submit via
arm-soc.

Thanks,

Kevin

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

* [PATCH v4 4/6] media: rc: meson-ir: Add support for newer versions of the IR decoder
@ 2016-08-19 22:28         ` Kevin Hilman
  0 siblings, 0 replies; 112+ messages in thread
From: Kevin Hilman @ 2016-08-19 22:28 UTC (permalink / raw)
  To: linus-amlogic

Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:

> From: Neil Armstrong <narmstrong@baylibre.com>
>
> Newer SoCs (Meson 8b and GXBB) are using REG2 (offset 0x20) instead of
> REG1 to configure the decoder mode. This makes it necessary to
> introduce new bindings so the driver knows which register has to be
> used.
>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

Acked-by: Kevin Hilman <khilman@baylibre.com>

Mauro, are you the one to pick up new media/rc drivers?  Or if you
prefer, with your ack, I'll take this along with the DT and submit via
arm-soc.

Thanks,

Kevin

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

* [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver
  2016-06-28 19:17   ` Martin Blumenstingl
  (?)
  (?)
@ 2016-08-20  9:53     ` Martin Blumenstingl
  -1 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:53 UTC (permalink / raw)
  To: linux-media, linux-gpio, linux-amlogic, devicetree, narmstrong,
	linus.walleij, khilman, carlo
  Cc: mark.rutland, Martin Blumenstingl, catalin.marinas, will.deacon,
	b.galvani, robh+dt, mchehab, linux-arm-kernel

Newer Amlogic platforms (Meson 8b and GXBB) use a slightly different
register layout for their Infrared Remoete Controller. The decoder mode
is now configured in another register. Without the changes to the
meson-ir driver we are simply getting incorrect "durations" reported
from the hardware (because the hardware is not in time measurement aka
software decode mode).

This problem was also noticed by some people trying to use this on an
ODROID-C1 and ODROID-C2 - the workaround there (probably because the
datasheets were not publicy available yet at that time) was to switch
to ir_raw_event_store_edge (which leaves it up to the kernel to measure
the duration of a pulse). See [0] and [1] for the corresponding
patches.

Changes in v5:
- changed pin function and group names to remote_input_ao so they match
  with the datasheet


Tested-by: Neil Armstrong <narmstrong@baylibre.com>


[0] https://github.com/erdoukki/linux-amlogic-1/commit/969b2e2242fb14a13cb651f9a1cf771b599c958b
[1] http://forum.odroid.com/viewtopic.php?f=135&t=20504


Martin Blumenstingl (3):
  pinctrl: amlogic: gxbb: add the IR remote input pin
  ARM64: dts: amlogic: add the input pin for the IR remote
  ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards

Neil Armstrong (3):
  dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
  media: rc: meson-ir: Add support for newer versions of the IR decoder
  ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder

 .../devicetree/bindings/media/meson-ir.txt         |  5 +++-
 .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts |  6 +++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi   |  6 +++++
 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi      |  6 +++++
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi        | 14 +++++++++++
 drivers/media/rc/meson-ir.c                        | 29 ++++++++++++++++++----
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c         |  8 ++++++
 7 files changed, 68 insertions(+), 6 deletions(-)

-- 
2.9.3

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

* [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver
@ 2016-08-20  9:53     ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:53 UTC (permalink / raw)
  To: linux-media, linux-gpio, linux-amlogic, devicetree, narmstrong,
	linus.walleij, khilman, carlo
  Cc: linux-arm-kernel, mchehab, will.deacon, catalin.marinas,
	mark.rutland, robh+dt, b.galvani, Martin Blumenstingl

Newer Amlogic platforms (Meson 8b and GXBB) use a slightly different
register layout for their Infrared Remoete Controller. The decoder mode
is now configured in another register. Without the changes to the
meson-ir driver we are simply getting incorrect "durations" reported
from the hardware (because the hardware is not in time measurement aka
software decode mode).

This problem was also noticed by some people trying to use this on an
ODROID-C1 and ODROID-C2 - the workaround there (probably because the
datasheets were not publicy available yet at that time) was to switch
to ir_raw_event_store_edge (which leaves it up to the kernel to measure
the duration of a pulse). See [0] and [1] for the corresponding
patches.

Changes in v5:
- changed pin function and group names to remote_input_ao so they match
  with the datasheet


Tested-by: Neil Armstrong <narmstrong@baylibre.com>


[0] https://github.com/erdoukki/linux-amlogic-1/commit/969b2e2242fb14a13cb651f9a1cf771b599c958b
[1] http://forum.odroid.com/viewtopic.php?f=135&t=20504


Martin Blumenstingl (3):
  pinctrl: amlogic: gxbb: add the IR remote input pin
  ARM64: dts: amlogic: add the input pin for the IR remote
  ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards

Neil Armstrong (3):
  dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
  media: rc: meson-ir: Add support for newer versions of the IR decoder
  ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder

 .../devicetree/bindings/media/meson-ir.txt         |  5 +++-
 .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts |  6 +++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi   |  6 +++++
 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi      |  6 +++++
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi        | 14 +++++++++++
 drivers/media/rc/meson-ir.c                        | 29 ++++++++++++++++++----
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c         |  8 ++++++
 7 files changed, 68 insertions(+), 6 deletions(-)

-- 
2.9.3


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

* [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver
@ 2016-08-20  9:53     ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:53 UTC (permalink / raw)
  To: linux-arm-kernel

Newer Amlogic platforms (Meson 8b and GXBB) use a slightly different
register layout for their Infrared Remoete Controller. The decoder mode
is now configured in another register. Without the changes to the
meson-ir driver we are simply getting incorrect "durations" reported
from the hardware (because the hardware is not in time measurement aka
software decode mode).

This problem was also noticed by some people trying to use this on an
ODROID-C1 and ODROID-C2 - the workaround there (probably because the
datasheets were not publicy available yet at that time) was to switch
to ir_raw_event_store_edge (which leaves it up to the kernel to measure
the duration of a pulse). See [0] and [1] for the corresponding
patches.

Changes in v5:
- changed pin function and group names to remote_input_ao so they match
  with the datasheet


Tested-by: Neil Armstrong <narmstrong@baylibre.com>


[0] https://github.com/erdoukki/linux-amlogic-1/commit/969b2e2242fb14a13cb651f9a1cf771b599c958b
[1] http://forum.odroid.com/viewtopic.php?f=135&t=20504


Martin Blumenstingl (3):
  pinctrl: amlogic: gxbb: add the IR remote input pin
  ARM64: dts: amlogic: add the input pin for the IR remote
  ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards

Neil Armstrong (3):
  dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
  media: rc: meson-ir: Add support for newer versions of the IR decoder
  ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder

 .../devicetree/bindings/media/meson-ir.txt         |  5 +++-
 .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts |  6 +++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi   |  6 +++++
 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi      |  6 +++++
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi        | 14 +++++++++++
 drivers/media/rc/meson-ir.c                        | 29 ++++++++++++++++++----
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c         |  8 ++++++
 7 files changed, 68 insertions(+), 6 deletions(-)

-- 
2.9.3

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

* [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver
@ 2016-08-20  9:53     ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:53 UTC (permalink / raw)
  To: linus-amlogic

Newer Amlogic platforms (Meson 8b and GXBB) use a slightly different
register layout for their Infrared Remoete Controller. The decoder mode
is now configured in another register. Without the changes to the
meson-ir driver we are simply getting incorrect "durations" reported
from the hardware (because the hardware is not in time measurement aka
software decode mode).

This problem was also noticed by some people trying to use this on an
ODROID-C1 and ODROID-C2 - the workaround there (probably because the
datasheets were not publicy available yet at that time) was to switch
to ir_raw_event_store_edge (which leaves it up to the kernel to measure
the duration of a pulse). See [0] and [1] for the corresponding
patches.

Changes in v5:
- changed pin function and group names to remote_input_ao so they match
  with the datasheet


Tested-by: Neil Armstrong <narmstrong@baylibre.com>


[0] https://github.com/erdoukki/linux-amlogic-1/commit/969b2e2242fb14a13cb651f9a1cf771b599c958b
[1] http://forum.odroid.com/viewtopic.php?f=135&t=20504


Martin Blumenstingl (3):
  pinctrl: amlogic: gxbb: add the IR remote input pin
  ARM64: dts: amlogic: add the input pin for the IR remote
  ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards

Neil Armstrong (3):
  dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
  media: rc: meson-ir: Add support for newer versions of the IR decoder
  ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder

 .../devicetree/bindings/media/meson-ir.txt         |  5 +++-
 .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts |  6 +++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi   |  6 +++++
 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi      |  6 +++++
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi        | 14 +++++++++++
 drivers/media/rc/meson-ir.c                        | 29 ++++++++++++++++++----
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c         |  8 ++++++
 7 files changed, 68 insertions(+), 6 deletions(-)

-- 
2.9.3

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

* [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver
  2016-08-19 21:55     ` Martin Blumenstingl
  (?)
  (?)
@ 2016-08-20  9:54       ` Martin Blumenstingl
  -1 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linux-media, linux-gpio, linux-amlogic, devicetree, narmstrong,
	linus.walleij, khilman, carlo
  Cc: mark.rutland, Martin Blumenstingl, catalin.marinas, will.deacon,
	b.galvani, robh+dt, mchehab, linux-arm-kernel

Newer Amlogic platforms (Meson 8b and GXBB) use a slightly different
register layout for their Infrared Remoete Controller. The decoder mode
is now configured in another register. Without the changes to the
meson-ir driver we are simply getting incorrect "durations" reported
from the hardware (because the hardware is not in time measurement aka
software decode mode).

This problem was also noticed by some people trying to use this on an
ODROID-C1 and ODROID-C2 - the workaround there (probably because the
datasheets were not publicy available yet at that time) was to switch
to ir_raw_event_store_edge (which leaves it up to the kernel to measure
the duration of a pulse). See [0] and [1] for the corresponding
patches.

Changes in v5:
- changed pin function and group names to remote_input_ao so they match
  with the datasheet


Tested-by: Neil Armstrong <narmstrong@baylibre.com>


[0] https://github.com/erdoukki/linux-amlogic-1/commit/969b2e2242fb14a13cb651f9a1cf771b599c958b
[1] http://forum.odroid.com/viewtopic.php?f=135&t=20504


Martin Blumenstingl (3):
  pinctrl: amlogic: gxbb: add the IR remote input pin
  ARM64: dts: amlogic: add the input pin for the IR remote
  ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards

Neil Armstrong (3):
  dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
  media: rc: meson-ir: Add support for newer versions of the IR decoder
  ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder

 .../devicetree/bindings/media/meson-ir.txt         |  5 +++-
 .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts |  6 +++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi   |  6 +++++
 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi      |  6 +++++
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi        | 14 +++++++++++
 drivers/media/rc/meson-ir.c                        | 29 ++++++++++++++++++----
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c         |  8 ++++++
 7 files changed, 68 insertions(+), 6 deletions(-)

-- 
2.9.3

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

* [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver
@ 2016-08-20  9:54       ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linux-media, linux-gpio, linux-amlogic, devicetree, narmstrong,
	linus.walleij, khilman, carlo
  Cc: linux-arm-kernel, mchehab, will.deacon, catalin.marinas,
	mark.rutland, robh+dt, b.galvani, Martin Blumenstingl

Newer Amlogic platforms (Meson 8b and GXBB) use a slightly different
register layout for their Infrared Remoete Controller. The decoder mode
is now configured in another register. Without the changes to the
meson-ir driver we are simply getting incorrect "durations" reported
from the hardware (because the hardware is not in time measurement aka
software decode mode).

This problem was also noticed by some people trying to use this on an
ODROID-C1 and ODROID-C2 - the workaround there (probably because the
datasheets were not publicy available yet at that time) was to switch
to ir_raw_event_store_edge (which leaves it up to the kernel to measure
the duration of a pulse). See [0] and [1] for the corresponding
patches.

Changes in v5:
- changed pin function and group names to remote_input_ao so they match
  with the datasheet


Tested-by: Neil Armstrong <narmstrong@baylibre.com>


[0] https://github.com/erdoukki/linux-amlogic-1/commit/969b2e2242fb14a13cb651f9a1cf771b599c958b
[1] http://forum.odroid.com/viewtopic.php?f=135&t=20504


Martin Blumenstingl (3):
  pinctrl: amlogic: gxbb: add the IR remote input pin
  ARM64: dts: amlogic: add the input pin for the IR remote
  ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards

Neil Armstrong (3):
  dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
  media: rc: meson-ir: Add support for newer versions of the IR decoder
  ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder

 .../devicetree/bindings/media/meson-ir.txt         |  5 +++-
 .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts |  6 +++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi   |  6 +++++
 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi      |  6 +++++
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi        | 14 +++++++++++
 drivers/media/rc/meson-ir.c                        | 29 ++++++++++++++++++----
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c         |  8 ++++++
 7 files changed, 68 insertions(+), 6 deletions(-)

-- 
2.9.3


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

* [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver
@ 2016-08-20  9:54       ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linux-arm-kernel

Newer Amlogic platforms (Meson 8b and GXBB) use a slightly different
register layout for their Infrared Remoete Controller. The decoder mode
is now configured in another register. Without the changes to the
meson-ir driver we are simply getting incorrect "durations" reported
from the hardware (because the hardware is not in time measurement aka
software decode mode).

This problem was also noticed by some people trying to use this on an
ODROID-C1 and ODROID-C2 - the workaround there (probably because the
datasheets were not publicy available yet at that time) was to switch
to ir_raw_event_store_edge (which leaves it up to the kernel to measure
the duration of a pulse). See [0] and [1] for the corresponding
patches.

Changes in v5:
- changed pin function and group names to remote_input_ao so they match
  with the datasheet


Tested-by: Neil Armstrong <narmstrong@baylibre.com>


[0] https://github.com/erdoukki/linux-amlogic-1/commit/969b2e2242fb14a13cb651f9a1cf771b599c958b
[1] http://forum.odroid.com/viewtopic.php?f=135&t=20504


Martin Blumenstingl (3):
  pinctrl: amlogic: gxbb: add the IR remote input pin
  ARM64: dts: amlogic: add the input pin for the IR remote
  ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards

Neil Armstrong (3):
  dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
  media: rc: meson-ir: Add support for newer versions of the IR decoder
  ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder

 .../devicetree/bindings/media/meson-ir.txt         |  5 +++-
 .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts |  6 +++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi   |  6 +++++
 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi      |  6 +++++
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi        | 14 +++++++++++
 drivers/media/rc/meson-ir.c                        | 29 ++++++++++++++++++----
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c         |  8 ++++++
 7 files changed, 68 insertions(+), 6 deletions(-)

-- 
2.9.3

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

* [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver
@ 2016-08-20  9:54       ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linus-amlogic

Newer Amlogic platforms (Meson 8b and GXBB) use a slightly different
register layout for their Infrared Remoete Controller. The decoder mode
is now configured in another register. Without the changes to the
meson-ir driver we are simply getting incorrect "durations" reported
from the hardware (because the hardware is not in time measurement aka
software decode mode).

This problem was also noticed by some people trying to use this on an
ODROID-C1 and ODROID-C2 - the workaround there (probably because the
datasheets were not publicy available yet at that time) was to switch
to ir_raw_event_store_edge (which leaves it up to the kernel to measure
the duration of a pulse). See [0] and [1] for the corresponding
patches.

Changes in v5:
- changed pin function and group names to remote_input_ao so they match
  with the datasheet


Tested-by: Neil Armstrong <narmstrong@baylibre.com>


[0] https://github.com/erdoukki/linux-amlogic-1/commit/969b2e2242fb14a13cb651f9a1cf771b599c958b
[1] http://forum.odroid.com/viewtopic.php?f=135&t=20504


Martin Blumenstingl (3):
  pinctrl: amlogic: gxbb: add the IR remote input pin
  ARM64: dts: amlogic: add the input pin for the IR remote
  ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards

Neil Armstrong (3):
  dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
  media: rc: meson-ir: Add support for newer versions of the IR decoder
  ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder

 .../devicetree/bindings/media/meson-ir.txt         |  5 +++-
 .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts |  6 +++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi   |  6 +++++
 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi      |  6 +++++
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi        | 14 +++++++++++
 drivers/media/rc/meson-ir.c                        | 29 ++++++++++++++++++----
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c         |  8 ++++++
 7 files changed, 68 insertions(+), 6 deletions(-)

-- 
2.9.3

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

* [PATCH v5 1/6] pinctrl: amlogic: gxbb: add the IR remote input pin
  2016-08-20  9:54       ` Martin Blumenstingl
  (?)
  (?)
@ 2016-08-20  9:54         ` Martin Blumenstingl
  -1 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linux-media, linux-gpio, linux-amlogic, devicetree, narmstrong,
	linus.walleij, khilman, carlo
  Cc: mark.rutland, Martin Blumenstingl, catalin.marinas, will.deacon,
	b.galvani, robh+dt, mchehab, linux-arm-kernel

This adds the IR remote receiver to the AO domain devices.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
---
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
index cb4d6ad..ff900d1 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
@@ -225,6 +225,8 @@ static const unsigned int i2c_sda_ao_pins[] = {PIN(GPIOAO_5, 0) };
 static const unsigned int i2c_slave_sck_ao_pins[] = {PIN(GPIOAO_4, 0) };
 static const unsigned int i2c_slave_sda_ao_pins[] = {PIN(GPIOAO_5, 0) };
 
+static const unsigned int remote_input_ao_pins[] = {PIN(GPIOAO_7, 0) };
+
 static struct meson_pmx_group meson_gxbb_periphs_groups[] = {
 	GPIO_GROUP(GPIOZ_0, EE_OFF),
 	GPIO_GROUP(GPIOZ_1, EE_OFF),
@@ -432,6 +434,7 @@ static struct meson_pmx_group meson_gxbb_aobus_groups[] = {
 	GROUP(i2c_sda_ao,	0,	5),
 	GROUP(i2c_slave_sck_ao, 0,	2),
 	GROUP(i2c_slave_sda_ao, 0,	1),
+	GROUP(remote_input_ao,	0,	0),
 };
 
 static const char * const gpio_periphs_groups[] = {
@@ -521,6 +524,10 @@ static const char * const i2c_slave_ao_groups[] = {
 	"i2c_slave_sdk_ao", "i2c_slave_sda_ao",
 };
 
+static const char * const remote_input_ao_groups[] = {
+	"remote_input_ao",
+};
+
 static struct meson_pmx_func meson_gxbb_periphs_functions[] = {
 	FUNCTION(gpio_periphs),
 	FUNCTION(emmc),
@@ -537,6 +544,7 @@ static struct meson_pmx_func meson_gxbb_aobus_functions[] = {
 	FUNCTION(uart_ao_b),
 	FUNCTION(i2c_ao),
 	FUNCTION(i2c_slave_ao),
+	FUNCTION(remote_input_ao),
 };
 
 static struct meson_bank meson_gxbb_periphs_banks[] = {
-- 
2.9.3

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

* [PATCH v5 1/6] pinctrl: amlogic: gxbb: add the IR remote input pin
@ 2016-08-20  9:54         ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linux-media, linux-gpio, linux-amlogic, devicetree, narmstrong,
	linus.walleij, khilman, carlo
  Cc: linux-arm-kernel, mchehab, will.deacon, catalin.marinas,
	mark.rutland, robh+dt, b.galvani, Martin Blumenstingl

This adds the IR remote receiver to the AO domain devices.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
---
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
index cb4d6ad..ff900d1 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
@@ -225,6 +225,8 @@ static const unsigned int i2c_sda_ao_pins[] = {PIN(GPIOAO_5, 0) };
 static const unsigned int i2c_slave_sck_ao_pins[] = {PIN(GPIOAO_4, 0) };
 static const unsigned int i2c_slave_sda_ao_pins[] = {PIN(GPIOAO_5, 0) };
 
+static const unsigned int remote_input_ao_pins[] = {PIN(GPIOAO_7, 0) };
+
 static struct meson_pmx_group meson_gxbb_periphs_groups[] = {
 	GPIO_GROUP(GPIOZ_0, EE_OFF),
 	GPIO_GROUP(GPIOZ_1, EE_OFF),
@@ -432,6 +434,7 @@ static struct meson_pmx_group meson_gxbb_aobus_groups[] = {
 	GROUP(i2c_sda_ao,	0,	5),
 	GROUP(i2c_slave_sck_ao, 0,	2),
 	GROUP(i2c_slave_sda_ao, 0,	1),
+	GROUP(remote_input_ao,	0,	0),
 };
 
 static const char * const gpio_periphs_groups[] = {
@@ -521,6 +524,10 @@ static const char * const i2c_slave_ao_groups[] = {
 	"i2c_slave_sdk_ao", "i2c_slave_sda_ao",
 };
 
+static const char * const remote_input_ao_groups[] = {
+	"remote_input_ao",
+};
+
 static struct meson_pmx_func meson_gxbb_periphs_functions[] = {
 	FUNCTION(gpio_periphs),
 	FUNCTION(emmc),
@@ -537,6 +544,7 @@ static struct meson_pmx_func meson_gxbb_aobus_functions[] = {
 	FUNCTION(uart_ao_b),
 	FUNCTION(i2c_ao),
 	FUNCTION(i2c_slave_ao),
+	FUNCTION(remote_input_ao),
 };
 
 static struct meson_bank meson_gxbb_periphs_banks[] = {
-- 
2.9.3


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

* [PATCH v5 1/6] pinctrl: amlogic: gxbb: add the IR remote input pin
@ 2016-08-20  9:54         ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linux-arm-kernel

This adds the IR remote receiver to the AO domain devices.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
---
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
index cb4d6ad..ff900d1 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
@@ -225,6 +225,8 @@ static const unsigned int i2c_sda_ao_pins[] = {PIN(GPIOAO_5, 0) };
 static const unsigned int i2c_slave_sck_ao_pins[] = {PIN(GPIOAO_4, 0) };
 static const unsigned int i2c_slave_sda_ao_pins[] = {PIN(GPIOAO_5, 0) };
 
+static const unsigned int remote_input_ao_pins[] = {PIN(GPIOAO_7, 0) };
+
 static struct meson_pmx_group meson_gxbb_periphs_groups[] = {
 	GPIO_GROUP(GPIOZ_0, EE_OFF),
 	GPIO_GROUP(GPIOZ_1, EE_OFF),
@@ -432,6 +434,7 @@ static struct meson_pmx_group meson_gxbb_aobus_groups[] = {
 	GROUP(i2c_sda_ao,	0,	5),
 	GROUP(i2c_slave_sck_ao, 0,	2),
 	GROUP(i2c_slave_sda_ao, 0,	1),
+	GROUP(remote_input_ao,	0,	0),
 };
 
 static const char * const gpio_periphs_groups[] = {
@@ -521,6 +524,10 @@ static const char * const i2c_slave_ao_groups[] = {
 	"i2c_slave_sdk_ao", "i2c_slave_sda_ao",
 };
 
+static const char * const remote_input_ao_groups[] = {
+	"remote_input_ao",
+};
+
 static struct meson_pmx_func meson_gxbb_periphs_functions[] = {
 	FUNCTION(gpio_periphs),
 	FUNCTION(emmc),
@@ -537,6 +544,7 @@ static struct meson_pmx_func meson_gxbb_aobus_functions[] = {
 	FUNCTION(uart_ao_b),
 	FUNCTION(i2c_ao),
 	FUNCTION(i2c_slave_ao),
+	FUNCTION(remote_input_ao),
 };
 
 static struct meson_bank meson_gxbb_periphs_banks[] = {
-- 
2.9.3

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

* [PATCH v5 1/6] pinctrl: amlogic: gxbb: add the IR remote input pin
@ 2016-08-20  9:54         ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linus-amlogic

This adds the IR remote receiver to the AO domain devices.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
---
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
index cb4d6ad..ff900d1 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
@@ -225,6 +225,8 @@ static const unsigned int i2c_sda_ao_pins[] = {PIN(GPIOAO_5, 0) };
 static const unsigned int i2c_slave_sck_ao_pins[] = {PIN(GPIOAO_4, 0) };
 static const unsigned int i2c_slave_sda_ao_pins[] = {PIN(GPIOAO_5, 0) };
 
+static const unsigned int remote_input_ao_pins[] = {PIN(GPIOAO_7, 0) };
+
 static struct meson_pmx_group meson_gxbb_periphs_groups[] = {
 	GPIO_GROUP(GPIOZ_0, EE_OFF),
 	GPIO_GROUP(GPIOZ_1, EE_OFF),
@@ -432,6 +434,7 @@ static struct meson_pmx_group meson_gxbb_aobus_groups[] = {
 	GROUP(i2c_sda_ao,	0,	5),
 	GROUP(i2c_slave_sck_ao, 0,	2),
 	GROUP(i2c_slave_sda_ao, 0,	1),
+	GROUP(remote_input_ao,	0,	0),
 };
 
 static const char * const gpio_periphs_groups[] = {
@@ -521,6 +524,10 @@ static const char * const i2c_slave_ao_groups[] = {
 	"i2c_slave_sdk_ao", "i2c_slave_sda_ao",
 };
 
+static const char * const remote_input_ao_groups[] = {
+	"remote_input_ao",
+};
+
 static struct meson_pmx_func meson_gxbb_periphs_functions[] = {
 	FUNCTION(gpio_periphs),
 	FUNCTION(emmc),
@@ -537,6 +544,7 @@ static struct meson_pmx_func meson_gxbb_aobus_functions[] = {
 	FUNCTION(uart_ao_b),
 	FUNCTION(i2c_ao),
 	FUNCTION(i2c_slave_ao),
+	FUNCTION(remote_input_ao),
 };
 
 static struct meson_bank meson_gxbb_periphs_banks[] = {
-- 
2.9.3

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

* [PATCH v5 2/6] ARM64: dts: amlogic: add the input pin for the IR remote
  2016-08-20  9:54       ` Martin Blumenstingl
  (?)
  (?)
@ 2016-08-20  9:54           ` Martin Blumenstingl
  -1 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linux-media-u79uwXL29TY76Z2rM5mHXA,
	linux-gpio-u79uwXL29TY76Z2rM5mHXA,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	narmstrong-rdvid1DuHRBWk0Htik3J/w,
	linus.walleij-QSEj5FYQhm4dnm+yROfE0A,
	khilman-rdvid1DuHRBWk0Htik3J/w, carlo-KA+7E9HrN00dnm+yROfE0A
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	mchehab-DgEjT+Ai2ygdnm+yROfE0A, will.deacon-5wv7dgnIgG8,
	catalin.marinas-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, b.galvani-Re5JQEeQqe8AvxtiuMwx3w,
	Martin Blumenstingl

Signed-off-by: Martin Blumenstingl <martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 4f42316..96f4574 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -210,6 +210,13 @@
 						function = "uart_ao";
 					};
 				};
+
+				remote_input_ao_pins: remote_input_ao {
+					mux {
+						groups = "remote_input_ao";
+						function = "remote_input_ao";
+					};
+				};
 			};
 
 			uart_AO: serial@4c0 {
-- 
2.9.3

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

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

* [PATCH v5 2/6] ARM64: dts: amlogic: add the input pin for the IR remote
@ 2016-08-20  9:54           ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linux-media, linux-gpio, linux-amlogic, devicetree, narmstrong,
	linus.walleij, khilman, carlo
  Cc: linux-arm-kernel, mchehab, will.deacon, catalin.marinas,
	mark.rutland, robh+dt, b.galvani, Martin Blumenstingl

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 4f42316..96f4574 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -210,6 +210,13 @@
 						function = "uart_ao";
 					};
 				};
+
+				remote_input_ao_pins: remote_input_ao {
+					mux {
+						groups = "remote_input_ao";
+						function = "remote_input_ao";
+					};
+				};
 			};
 
 			uart_AO: serial@4c0 {
-- 
2.9.3


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

* [PATCH v5 2/6] ARM64: dts: amlogic: add the input pin for the IR remote
@ 2016-08-20  9:54           ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 4f42316..96f4574 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -210,6 +210,13 @@
 						function = "uart_ao";
 					};
 				};
+
+				remote_input_ao_pins: remote_input_ao {
+					mux {
+						groups = "remote_input_ao";
+						function = "remote_input_ao";
+					};
+				};
 			};
 
 			uart_AO: serial at 4c0 {
-- 
2.9.3

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

* [PATCH v5 2/6] ARM64: dts: amlogic: add the input pin for the IR remote
@ 2016-08-20  9:54           ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linus-amlogic

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 4f42316..96f4574 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -210,6 +210,13 @@
 						function = "uart_ao";
 					};
 				};
+
+				remote_input_ao_pins: remote_input_ao {
+					mux {
+						groups = "remote_input_ao";
+						function = "remote_input_ao";
+					};
+				};
 			};
 
 			uart_AO: serial at 4c0 {
-- 
2.9.3

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

* [PATCH v5 3/6] dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
  2016-08-20  9:54       ` Martin Blumenstingl
  (?)
  (?)
@ 2016-08-20  9:54         ` Martin Blumenstingl
  -1 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linux-media, linux-gpio, linux-amlogic, devicetree, narmstrong,
	linus.walleij, khilman, carlo
  Cc: mark.rutland, Martin Blumenstingl, catalin.marinas, will.deacon,
	b.galvani, robh+dt, mchehab, linux-arm-kernel

From: Neil Armstrong <narmstrong@baylibre.com>

New bindings are needed as the register layout on the newer platforms
is slightly different compared to Meson6b.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/media/meson-ir.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/media/meson-ir.txt b/Documentation/devicetree/bindings/media/meson-ir.txt
index 407848e..e7e3f3c 100644
--- a/Documentation/devicetree/bindings/media/meson-ir.txt
+++ b/Documentation/devicetree/bindings/media/meson-ir.txt
@@ -1,7 +1,10 @@
 * Amlogic Meson IR remote control receiver
 
 Required properties:
- - compatible	: should be "amlogic,meson6-ir"
+ - compatible	: depending on the platform this should be one of:
+		  - "amlogic,meson6-ir"
+		  - "amlogic,meson8b-ir"
+		  - "amlogic,meson-gxbb-ir"
  - reg		: physical base address and length of the device registers
  - interrupts	: a single specifier for the interrupt from the device
 
-- 
2.9.3

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

* [PATCH v5 3/6] dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
@ 2016-08-20  9:54         ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linux-media, linux-gpio, linux-amlogic, devicetree, narmstrong,
	linus.walleij, khilman, carlo
  Cc: linux-arm-kernel, mchehab, will.deacon, catalin.marinas,
	mark.rutland, robh+dt, b.galvani, Martin Blumenstingl

From: Neil Armstrong <narmstrong@baylibre.com>

New bindings are needed as the register layout on the newer platforms
is slightly different compared to Meson6b.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/media/meson-ir.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/media/meson-ir.txt b/Documentation/devicetree/bindings/media/meson-ir.txt
index 407848e..e7e3f3c 100644
--- a/Documentation/devicetree/bindings/media/meson-ir.txt
+++ b/Documentation/devicetree/bindings/media/meson-ir.txt
@@ -1,7 +1,10 @@
 * Amlogic Meson IR remote control receiver
 
 Required properties:
- - compatible	: should be "amlogic,meson6-ir"
+ - compatible	: depending on the platform this should be one of:
+		  - "amlogic,meson6-ir"
+		  - "amlogic,meson8b-ir"
+		  - "amlogic,meson-gxbb-ir"
  - reg		: physical base address and length of the device registers
  - interrupts	: a single specifier for the interrupt from the device
 
-- 
2.9.3


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

* [PATCH v5 3/6] dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
@ 2016-08-20  9:54         ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linux-arm-kernel

From: Neil Armstrong <narmstrong@baylibre.com>

New bindings are needed as the register layout on the newer platforms
is slightly different compared to Meson6b.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/media/meson-ir.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/media/meson-ir.txt b/Documentation/devicetree/bindings/media/meson-ir.txt
index 407848e..e7e3f3c 100644
--- a/Documentation/devicetree/bindings/media/meson-ir.txt
+++ b/Documentation/devicetree/bindings/media/meson-ir.txt
@@ -1,7 +1,10 @@
 * Amlogic Meson IR remote control receiver
 
 Required properties:
- - compatible	: should be "amlogic,meson6-ir"
+ - compatible	: depending on the platform this should be one of:
+		  - "amlogic,meson6-ir"
+		  - "amlogic,meson8b-ir"
+		  - "amlogic,meson-gxbb-ir"
  - reg		: physical base address and length of the device registers
  - interrupts	: a single specifier for the interrupt from the device
 
-- 
2.9.3

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

* [PATCH v5 3/6] dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
@ 2016-08-20  9:54         ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linus-amlogic

From: Neil Armstrong <narmstrong@baylibre.com>

New bindings are needed as the register layout on the newer platforms
is slightly different compared to Meson6b.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/media/meson-ir.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/media/meson-ir.txt b/Documentation/devicetree/bindings/media/meson-ir.txt
index 407848e..e7e3f3c 100644
--- a/Documentation/devicetree/bindings/media/meson-ir.txt
+++ b/Documentation/devicetree/bindings/media/meson-ir.txt
@@ -1,7 +1,10 @@
 * Amlogic Meson IR remote control receiver
 
 Required properties:
- - compatible	: should be "amlogic,meson6-ir"
+ - compatible	: depending on the platform this should be one of:
+		  - "amlogic,meson6-ir"
+		  - "amlogic,meson8b-ir"
+		  - "amlogic,meson-gxbb-ir"
  - reg		: physical base address and length of the device registers
  - interrupts	: a single specifier for the interrupt from the device
 
-- 
2.9.3

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

* [PATCH v5 4/6] media: rc: meson-ir: Add support for newer versions of the IR decoder
  2016-08-20  9:54       ` Martin Blumenstingl
  (?)
@ 2016-08-20  9:54         ` Martin Blumenstingl
  -1 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linux-media, linux-gpio, linux-amlogic, devicetree, narmstrong,
	linus.walleij, khilman, carlo
  Cc: linux-arm-kernel, mchehab, will.deacon, catalin.marinas,
	mark.rutland, robh+dt, b.galvani, Martin Blumenstingl

From: Neil Armstrong <narmstrong@baylibre.com>

Newer SoCs (Meson 8b and GXBB) are using REG2 (offset 0x20) instead of
REG1 to configure the decoder mode. This makes it necessary to
introduce new bindings so the driver knows which register has to be
used.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Kevin Hilman <khilman@baylibre.com>
---
 drivers/media/rc/meson-ir.c | 29 ++++++++++++++++++++++++-----
 1 file changed, 24 insertions(+), 5 deletions(-)

diff --git a/drivers/media/rc/meson-ir.c b/drivers/media/rc/meson-ir.c
index fcc3b82..003fff0 100644
--- a/drivers/media/rc/meson-ir.c
+++ b/drivers/media/rc/meson-ir.c
@@ -24,6 +24,7 @@
 
 #define DRIVER_NAME		"meson-ir"
 
+/* valid on all Meson platforms */
 #define IR_DEC_LDR_ACTIVE	0x00
 #define IR_DEC_LDR_IDLE		0x04
 #define IR_DEC_LDR_REPEAT	0x08
@@ -32,12 +33,21 @@
 #define IR_DEC_FRAME		0x14
 #define IR_DEC_STATUS		0x18
 #define IR_DEC_REG1		0x1c
+/* only available on Meson 8b and newer */
+#define IR_DEC_REG2		0x20
 
 #define REG0_RATE_MASK		(BIT(11) - 1)
 
-#define REG1_MODE_MASK		(BIT(7) | BIT(8))
-#define REG1_MODE_NEC		(0 << 7)
-#define REG1_MODE_GENERAL	(2 << 7)
+#define DECODE_MODE_NEC		0x0
+#define DECODE_MODE_RAW		0x2
+
+/* Meson 6b uses REG1 to configure the mode */
+#define REG1_MODE_MASK		GENMASK(8, 7)
+#define REG1_MODE_SHIFT		7
+
+/* Meson 8b / GXBB use REG2 to configure the mode */
+#define REG2_MODE_MASK		GENMASK(3, 0)
+#define REG2_MODE_SHIFT		0
 
 #define REG1_TIME_IV_SHIFT	16
 #define REG1_TIME_IV_MASK	((BIT(13) - 1) << REG1_TIME_IV_SHIFT)
@@ -158,8 +168,15 @@ static int meson_ir_probe(struct platform_device *pdev)
 	/* Reset the decoder */
 	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_RESET, REG1_RESET);
 	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_RESET, 0);
-	/* Set general operation mode */
-	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_MODE_MASK, REG1_MODE_GENERAL);
+
+	/* Set general operation mode (= raw/software decoding) */
+	if (of_device_is_compatible(node, "amlogic,meson6-ir"))
+		meson_ir_set_mask(ir, IR_DEC_REG1, REG1_MODE_MASK,
+				  DECODE_MODE_RAW << REG1_MODE_SHIFT);
+	else
+		meson_ir_set_mask(ir, IR_DEC_REG2, REG2_MODE_MASK,
+				  DECODE_MODE_RAW << REG2_MODE_SHIFT);
+
 	/* Set rate */
 	meson_ir_set_mask(ir, IR_DEC_REG0, REG0_RATE_MASK, MESON_TRATE - 1);
 	/* IRQ on rising and falling edges */
@@ -197,6 +214,8 @@ static int meson_ir_remove(struct platform_device *pdev)
 
 static const struct of_device_id meson_ir_match[] = {
 	{ .compatible = "amlogic,meson6-ir" },
+	{ .compatible = "amlogic,meson8b-ir" },
+	{ .compatible = "amlogic,meson-gxbb-ir" },
 	{ },
 };
 
-- 
2.9.3

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

* [PATCH v5 4/6] media: rc: meson-ir: Add support for newer versions of the IR decoder
@ 2016-08-20  9:54         ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linux-arm-kernel

From: Neil Armstrong <narmstrong@baylibre.com>

Newer SoCs (Meson 8b and GXBB) are using REG2 (offset 0x20) instead of
REG1 to configure the decoder mode. This makes it necessary to
introduce new bindings so the driver knows which register has to be
used.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Kevin Hilman <khilman@baylibre.com>
---
 drivers/media/rc/meson-ir.c | 29 ++++++++++++++++++++++++-----
 1 file changed, 24 insertions(+), 5 deletions(-)

diff --git a/drivers/media/rc/meson-ir.c b/drivers/media/rc/meson-ir.c
index fcc3b82..003fff0 100644
--- a/drivers/media/rc/meson-ir.c
+++ b/drivers/media/rc/meson-ir.c
@@ -24,6 +24,7 @@
 
 #define DRIVER_NAME		"meson-ir"
 
+/* valid on all Meson platforms */
 #define IR_DEC_LDR_ACTIVE	0x00
 #define IR_DEC_LDR_IDLE		0x04
 #define IR_DEC_LDR_REPEAT	0x08
@@ -32,12 +33,21 @@
 #define IR_DEC_FRAME		0x14
 #define IR_DEC_STATUS		0x18
 #define IR_DEC_REG1		0x1c
+/* only available on Meson 8b and newer */
+#define IR_DEC_REG2		0x20
 
 #define REG0_RATE_MASK		(BIT(11) - 1)
 
-#define REG1_MODE_MASK		(BIT(7) | BIT(8))
-#define REG1_MODE_NEC		(0 << 7)
-#define REG1_MODE_GENERAL	(2 << 7)
+#define DECODE_MODE_NEC		0x0
+#define DECODE_MODE_RAW		0x2
+
+/* Meson 6b uses REG1 to configure the mode */
+#define REG1_MODE_MASK		GENMASK(8, 7)
+#define REG1_MODE_SHIFT		7
+
+/* Meson 8b / GXBB use REG2 to configure the mode */
+#define REG2_MODE_MASK		GENMASK(3, 0)
+#define REG2_MODE_SHIFT		0
 
 #define REG1_TIME_IV_SHIFT	16
 #define REG1_TIME_IV_MASK	((BIT(13) - 1) << REG1_TIME_IV_SHIFT)
@@ -158,8 +168,15 @@ static int meson_ir_probe(struct platform_device *pdev)
 	/* Reset the decoder */
 	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_RESET, REG1_RESET);
 	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_RESET, 0);
-	/* Set general operation mode */
-	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_MODE_MASK, REG1_MODE_GENERAL);
+
+	/* Set general operation mode (= raw/software decoding) */
+	if (of_device_is_compatible(node, "amlogic,meson6-ir"))
+		meson_ir_set_mask(ir, IR_DEC_REG1, REG1_MODE_MASK,
+				  DECODE_MODE_RAW << REG1_MODE_SHIFT);
+	else
+		meson_ir_set_mask(ir, IR_DEC_REG2, REG2_MODE_MASK,
+				  DECODE_MODE_RAW << REG2_MODE_SHIFT);
+
 	/* Set rate */
 	meson_ir_set_mask(ir, IR_DEC_REG0, REG0_RATE_MASK, MESON_TRATE - 1);
 	/* IRQ on rising and falling edges */
@@ -197,6 +214,8 @@ static int meson_ir_remove(struct platform_device *pdev)
 
 static const struct of_device_id meson_ir_match[] = {
 	{ .compatible = "amlogic,meson6-ir" },
+	{ .compatible = "amlogic,meson8b-ir" },
+	{ .compatible = "amlogic,meson-gxbb-ir" },
 	{ },
 };
 
-- 
2.9.3

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

* [PATCH v5 4/6] media: rc: meson-ir: Add support for newer versions of the IR decoder
@ 2016-08-20  9:54         ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linus-amlogic

From: Neil Armstrong <narmstrong@baylibre.com>

Newer SoCs (Meson 8b and GXBB) are using REG2 (offset 0x20) instead of
REG1 to configure the decoder mode. This makes it necessary to
introduce new bindings so the driver knows which register has to be
used.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Kevin Hilman <khilman@baylibre.com>
---
 drivers/media/rc/meson-ir.c | 29 ++++++++++++++++++++++++-----
 1 file changed, 24 insertions(+), 5 deletions(-)

diff --git a/drivers/media/rc/meson-ir.c b/drivers/media/rc/meson-ir.c
index fcc3b82..003fff0 100644
--- a/drivers/media/rc/meson-ir.c
+++ b/drivers/media/rc/meson-ir.c
@@ -24,6 +24,7 @@
 
 #define DRIVER_NAME		"meson-ir"
 
+/* valid on all Meson platforms */
 #define IR_DEC_LDR_ACTIVE	0x00
 #define IR_DEC_LDR_IDLE		0x04
 #define IR_DEC_LDR_REPEAT	0x08
@@ -32,12 +33,21 @@
 #define IR_DEC_FRAME		0x14
 #define IR_DEC_STATUS		0x18
 #define IR_DEC_REG1		0x1c
+/* only available on Meson 8b and newer */
+#define IR_DEC_REG2		0x20
 
 #define REG0_RATE_MASK		(BIT(11) - 1)
 
-#define REG1_MODE_MASK		(BIT(7) | BIT(8))
-#define REG1_MODE_NEC		(0 << 7)
-#define REG1_MODE_GENERAL	(2 << 7)
+#define DECODE_MODE_NEC		0x0
+#define DECODE_MODE_RAW		0x2
+
+/* Meson 6b uses REG1 to configure the mode */
+#define REG1_MODE_MASK		GENMASK(8, 7)
+#define REG1_MODE_SHIFT		7
+
+/* Meson 8b / GXBB use REG2 to configure the mode */
+#define REG2_MODE_MASK		GENMASK(3, 0)
+#define REG2_MODE_SHIFT		0
 
 #define REG1_TIME_IV_SHIFT	16
 #define REG1_TIME_IV_MASK	((BIT(13) - 1) << REG1_TIME_IV_SHIFT)
@@ -158,8 +168,15 @@ static int meson_ir_probe(struct platform_device *pdev)
 	/* Reset the decoder */
 	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_RESET, REG1_RESET);
 	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_RESET, 0);
-	/* Set general operation mode */
-	meson_ir_set_mask(ir, IR_DEC_REG1, REG1_MODE_MASK, REG1_MODE_GENERAL);
+
+	/* Set general operation mode (= raw/software decoding) */
+	if (of_device_is_compatible(node, "amlogic,meson6-ir"))
+		meson_ir_set_mask(ir, IR_DEC_REG1, REG1_MODE_MASK,
+				  DECODE_MODE_RAW << REG1_MODE_SHIFT);
+	else
+		meson_ir_set_mask(ir, IR_DEC_REG2, REG2_MODE_MASK,
+				  DECODE_MODE_RAW << REG2_MODE_SHIFT);
+
 	/* Set rate */
 	meson_ir_set_mask(ir, IR_DEC_REG0, REG0_RATE_MASK, MESON_TRATE - 1);
 	/* IRQ on rising and falling edges */
@@ -197,6 +214,8 @@ static int meson_ir_remove(struct platform_device *pdev)
 
 static const struct of_device_id meson_ir_match[] = {
 	{ .compatible = "amlogic,meson6-ir" },
+	{ .compatible = "amlogic,meson8b-ir" },
+	{ .compatible = "amlogic,meson-gxbb-ir" },
 	{ },
 };
 
-- 
2.9.3

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

* [PATCH v5 5/6] ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder
  2016-08-20  9:54       ` Martin Blumenstingl
  (?)
@ 2016-08-20  9:54         ` Martin Blumenstingl
  -1 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linux-media, linux-gpio, linux-amlogic, devicetree, narmstrong,
	linus.walleij, khilman, carlo
  Cc: linux-arm-kernel, mchehab, will.deacon, catalin.marinas,
	mark.rutland, robh+dt, b.galvani, Martin Blumenstingl

From: Neil Armstrong <narmstrong@baylibre.com>

This adds the Infrared Remote Controller node so boards with an IR
remote can simply enable it.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 96f4574..1cdc059 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -226,6 +226,13 @@
 				clocks = <&xtal>;
 				status = "disabled";
 			};
+
+			ir: ir@580 {
+				compatible = "amlogic,meson-gxbb-ir";
+				reg = <0x0 0x00580 0x0 0x40>;
+				interrupts = <GIC_SPI 196 IRQ_TYPE_EDGE_RISING>;
+				status = "disabled";
+			};
 		};
 
 		periphs: periphs@c8834000 {
-- 
2.9.3


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

* [PATCH v5 5/6] ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder
@ 2016-08-20  9:54         ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linux-arm-kernel

From: Neil Armstrong <narmstrong@baylibre.com>

This adds the Infrared Remote Controller node so boards with an IR
remote can simply enable it.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 96f4574..1cdc059 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -226,6 +226,13 @@
 				clocks = <&xtal>;
 				status = "disabled";
 			};
+
+			ir: ir at 580 {
+				compatible = "amlogic,meson-gxbb-ir";
+				reg = <0x0 0x00580 0x0 0x40>;
+				interrupts = <GIC_SPI 196 IRQ_TYPE_EDGE_RISING>;
+				status = "disabled";
+			};
 		};
 
 		periphs: periphs at c8834000 {
-- 
2.9.3

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

* [PATCH v5 5/6] ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder
@ 2016-08-20  9:54         ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linus-amlogic

From: Neil Armstrong <narmstrong@baylibre.com>

This adds the Infrared Remote Controller node so boards with an IR
remote can simply enable it.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 96f4574..1cdc059 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -226,6 +226,13 @@
 				clocks = <&xtal>;
 				status = "disabled";
 			};
+
+			ir: ir at 580 {
+				compatible = "amlogic,meson-gxbb-ir";
+				reg = <0x0 0x00580 0x0 0x40>;
+				interrupts = <GIC_SPI 196 IRQ_TYPE_EDGE_RISING>;
+				status = "disabled";
+			};
 		};
 
 		periphs: periphs at c8834000 {
-- 
2.9.3

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

* [PATCH v5 6/6] ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards
  2016-08-20  9:54       ` Martin Blumenstingl
  (?)
  (?)
@ 2016-08-20  9:54           ` Martin Blumenstingl
  -1 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linux-media-u79uwXL29TY76Z2rM5mHXA,
	linux-gpio-u79uwXL29TY76Z2rM5mHXA,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	narmstrong-rdvid1DuHRBWk0Htik3J/w,
	linus.walleij-QSEj5FYQhm4dnm+yROfE0A,
	khilman-rdvid1DuHRBWk0Htik3J/w, carlo-KA+7E9HrN00dnm+yROfE0A
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	mchehab-DgEjT+Ai2ygdnm+yROfE0A, will.deacon-5wv7dgnIgG8,
	catalin.marinas-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, b.galvani-Re5JQEeQqe8AvxtiuMwx3w,
	Martin Blumenstingl

Enable the Infrared Remote Controller on boards which have an Infrared
receiver.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts  | 6 ++++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi     | 6 ++++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 6 ++++++
 3 files changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index cba3ea1..d4823f4 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -161,3 +161,9 @@
 	vmmc-supply = <&vcc3v3>;
 	vmmcq-sumpply = <&vcc1v8>;
 };
+
+&ir {
+	status = "okay";
+	pinctrl-0 = <&remote_input_ao_pins>;
+	pinctrl-names = "default";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
index e118754..4538e5a 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
@@ -143,3 +143,9 @@
 	vmmc-supply = <&vcc_3v3>;
 	vmmcq-sumpply = <&vddio_boot>;
 };
+
+&ir {
+	status = "okay";
+	pinctrl-0 = <&remote_input_ao_pins>;
+	pinctrl-names = "default";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
index 54bb7c7..560770e 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
@@ -60,3 +60,9 @@
 	pinctrl-names = "default";
 
 };
+
+&ir {
+	status = "okay";
+	pinctrl-0 = <&remote_input_ao_pins>;
+	pinctrl-names = "default";
+};
-- 
2.9.3

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

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

* [PATCH v5 6/6] ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards
@ 2016-08-20  9:54           ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linux-media, linux-gpio, linux-amlogic, devicetree, narmstrong,
	linus.walleij, khilman, carlo
  Cc: linux-arm-kernel, mchehab, will.deacon, catalin.marinas,
	mark.rutland, robh+dt, b.galvani, Martin Blumenstingl

Enable the Infrared Remote Controller on boards which have an Infrared
receiver.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts  | 6 ++++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi     | 6 ++++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 6 ++++++
 3 files changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index cba3ea1..d4823f4 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -161,3 +161,9 @@
 	vmmc-supply = <&vcc3v3>;
 	vmmcq-sumpply = <&vcc1v8>;
 };
+
+&ir {
+	status = "okay";
+	pinctrl-0 = <&remote_input_ao_pins>;
+	pinctrl-names = "default";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
index e118754..4538e5a 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
@@ -143,3 +143,9 @@
 	vmmc-supply = <&vcc_3v3>;
 	vmmcq-sumpply = <&vddio_boot>;
 };
+
+&ir {
+	status = "okay";
+	pinctrl-0 = <&remote_input_ao_pins>;
+	pinctrl-names = "default";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
index 54bb7c7..560770e 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
@@ -60,3 +60,9 @@
 	pinctrl-names = "default";
 
 };
+
+&ir {
+	status = "okay";
+	pinctrl-0 = <&remote_input_ao_pins>;
+	pinctrl-names = "default";
+};
-- 
2.9.3


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

* [PATCH v5 6/6] ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards
@ 2016-08-20  9:54           ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linux-arm-kernel

Enable the Infrared Remote Controller on boards which have an Infrared
receiver.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts  | 6 ++++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi     | 6 ++++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 6 ++++++
 3 files changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index cba3ea1..d4823f4 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -161,3 +161,9 @@
 	vmmc-supply = <&vcc3v3>;
 	vmmcq-sumpply = <&vcc1v8>;
 };
+
+&ir {
+	status = "okay";
+	pinctrl-0 = <&remote_input_ao_pins>;
+	pinctrl-names = "default";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
index e118754..4538e5a 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
@@ -143,3 +143,9 @@
 	vmmc-supply = <&vcc_3v3>;
 	vmmcq-sumpply = <&vddio_boot>;
 };
+
+&ir {
+	status = "okay";
+	pinctrl-0 = <&remote_input_ao_pins>;
+	pinctrl-names = "default";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
index 54bb7c7..560770e 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
@@ -60,3 +60,9 @@
 	pinctrl-names = "default";
 
 };
+
+&ir {
+	status = "okay";
+	pinctrl-0 = <&remote_input_ao_pins>;
+	pinctrl-names = "default";
+};
-- 
2.9.3

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

* [PATCH v5 6/6] ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards
@ 2016-08-20  9:54           ` Martin Blumenstingl
  0 siblings, 0 replies; 112+ messages in thread
From: Martin Blumenstingl @ 2016-08-20  9:54 UTC (permalink / raw)
  To: linus-amlogic

Enable the Infrared Remote Controller on boards which have an Infrared
receiver.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts  | 6 ++++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi     | 6 ++++++
 arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 6 ++++++
 3 files changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index cba3ea1..d4823f4 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -161,3 +161,9 @@
 	vmmc-supply = <&vcc3v3>;
 	vmmcq-sumpply = <&vcc1v8>;
 };
+
+&ir {
+	status = "okay";
+	pinctrl-0 = <&remote_input_ao_pins>;
+	pinctrl-names = "default";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
index e118754..4538e5a 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
@@ -143,3 +143,9 @@
 	vmmc-supply = <&vcc_3v3>;
 	vmmcq-sumpply = <&vddio_boot>;
 };
+
+&ir {
+	status = "okay";
+	pinctrl-0 = <&remote_input_ao_pins>;
+	pinctrl-names = "default";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
index 54bb7c7..560770e 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
@@ -60,3 +60,9 @@
 	pinctrl-names = "default";
 
 };
+
+&ir {
+	status = "okay";
+	pinctrl-0 = <&remote_input_ao_pins>;
+	pinctrl-names = "default";
+};
-- 
2.9.3

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

* Re: [PATCH v5 1/6] pinctrl: amlogic: gxbb: add the IR remote input pin
  2016-08-20  9:54         ` Martin Blumenstingl
  (?)
  (?)
@ 2016-08-22 13:51             ` Linus Walleij
  -1 siblings, 0 replies; 112+ messages in thread
From: Linus Walleij @ 2016-08-22 13:51 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: linux-media-u79uwXL29TY76Z2rM5mHXA,
	linux-gpio-u79uwXL29TY76Z2rM5mHXA, open list:ARM/Amlogic Meson...,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Neil Armstrong, Kevin Hilman,
	Carlo Caione, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	mchehab-DgEjT+Ai2ygdnm+yROfE0A, Will Deacon, Catalin Marinas,
	Mark Rutland, Rob Herring, Beniamino Galvani

On Sat, Aug 20, 2016 at 11:54 AM, Martin Blumenstingl
<martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:

> This adds the IR remote receiver to the AO domain devices.
>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
> Reviewed-by: Kevin Hilman <khilman-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>

Patch applied.

Yours,
Linus Walleij
--
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

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

* Re: [PATCH v5 1/6] pinctrl: amlogic: gxbb: add the IR remote input pin
@ 2016-08-22 13:51             ` Linus Walleij
  0 siblings, 0 replies; 112+ messages in thread
From: Linus Walleij @ 2016-08-22 13:51 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: linux-media, linux-gpio, open list:ARM/Amlogic Meson...,
	devicetree, Neil Armstrong, Kevin Hilman, Carlo Caione,
	linux-arm-kernel, mchehab, Will Deacon, Catalin Marinas,
	Mark Rutland, Rob Herring, Beniamino Galvani

On Sat, Aug 20, 2016 at 11:54 AM, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:

> This adds the IR remote receiver to the AO domain devices.
>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Reviewed-by: Kevin Hilman <khilman@baylibre.com>

Patch applied.

Yours,
Linus Walleij

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

* [PATCH v5 1/6] pinctrl: amlogic: gxbb: add the IR remote input pin
@ 2016-08-22 13:51             ` Linus Walleij
  0 siblings, 0 replies; 112+ messages in thread
From: Linus Walleij @ 2016-08-22 13:51 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Aug 20, 2016 at 11:54 AM, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:

> This adds the IR remote receiver to the AO domain devices.
>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Reviewed-by: Kevin Hilman <khilman@baylibre.com>

Patch applied.

Yours,
Linus Walleij

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

* [PATCH v5 1/6] pinctrl: amlogic: gxbb: add the IR remote input pin
@ 2016-08-22 13:51             ` Linus Walleij
  0 siblings, 0 replies; 112+ messages in thread
From: Linus Walleij @ 2016-08-22 13:51 UTC (permalink / raw)
  To: linus-amlogic

On Sat, Aug 20, 2016 at 11:54 AM, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:

> This adds the IR remote receiver to the AO domain devices.
>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Reviewed-by: Kevin Hilman <khilman@baylibre.com>

Patch applied.

Yours,
Linus Walleij

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

* Re: [PATCH v5 2/6] ARM64: dts: amlogic: add the input pin for the IR remote
  2016-08-20  9:54           ` Martin Blumenstingl
  (?)
  (?)
@ 2016-08-22 13:52               ` Linus Walleij
  -1 siblings, 0 replies; 112+ messages in thread
From: Linus Walleij @ 2016-08-22 13:52 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: linux-media-u79uwXL29TY76Z2rM5mHXA,
	linux-gpio-u79uwXL29TY76Z2rM5mHXA, open list:ARM/Amlogic Meson...,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Neil Armstrong, Kevin Hilman,
	Carlo Caione, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	mchehab-DgEjT+Ai2ygdnm+yROfE0A, Will Deacon, Catalin Marinas,
	Mark Rutland, Rob Herring, Beniamino Galvani

On Sat, Aug 20, 2016 at 11:54 AM, Martin Blumenstingl
<martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:

> Signed-off-by: Martin Blumenstingl <martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>

Acked-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

Merge this through the ARM SoC tree.

Yours,
Linus Walleij
--
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

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

* Re: [PATCH v5 2/6] ARM64: dts: amlogic: add the input pin for the IR remote
@ 2016-08-22 13:52               ` Linus Walleij
  0 siblings, 0 replies; 112+ messages in thread
From: Linus Walleij @ 2016-08-22 13:52 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: linux-media, linux-gpio, open list:ARM/Amlogic Meson...,
	devicetree, Neil Armstrong, Kevin Hilman, Carlo Caione,
	linux-arm-kernel, mchehab, Will Deacon, Catalin Marinas,
	Mark Rutland, Rob Herring, Beniamino Galvani

On Sat, Aug 20, 2016 at 11:54 AM, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:

> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Merge this through the ARM SoC tree.

Yours,
Linus Walleij

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

* [PATCH v5 2/6] ARM64: dts: amlogic: add the input pin for the IR remote
@ 2016-08-22 13:52               ` Linus Walleij
  0 siblings, 0 replies; 112+ messages in thread
From: Linus Walleij @ 2016-08-22 13:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Aug 20, 2016 at 11:54 AM, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:

> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Merge this through the ARM SoC tree.

Yours,
Linus Walleij

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

* [PATCH v5 2/6] ARM64: dts: amlogic: add the input pin for the IR remote
@ 2016-08-22 13:52               ` Linus Walleij
  0 siblings, 0 replies; 112+ messages in thread
From: Linus Walleij @ 2016-08-22 13:52 UTC (permalink / raw)
  To: linus-amlogic

On Sat, Aug 20, 2016 at 11:54 AM, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:

> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Merge this through the ARM SoC tree.

Yours,
Linus Walleij

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

* Re: [PATCH v4 4/6] media: rc: meson-ir: Add support for newer versions of the IR decoder
  2016-08-19 22:28         ` Kevin Hilman
  (?)
@ 2016-08-25 12:41           ` Mauro Carvalho Chehab
  -1 siblings, 0 replies; 112+ messages in thread
From: Mauro Carvalho Chehab @ 2016-08-25 12:41 UTC (permalink / raw)
  To: Kevin Hilman
  Cc: Martin Blumenstingl, Mauro Carvalho Chehab, linux-media,
	linux-gpio, linux-amlogic, devicetree, narmstrong, carlo,
	linux-arm-kernel, linus.walleij, will.deacon, catalin.marinas,
	mark.rutland, robh+dt

Em Fri, 19 Aug 2016 15:28:22 -0700
Kevin Hilman <khilman@baylibre.com> escreveu:

> Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:
> 
> > From: Neil Armstrong <narmstrong@baylibre.com>
> >
> > Newer SoCs (Meson 8b and GXBB) are using REG2 (offset 0x20) instead of
> > REG1 to configure the decoder mode. This makes it necessary to
> > introduce new bindings so the driver knows which register has to be
> > used.
> >
> > Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> > Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>  
> 
> Acked-by: Kevin Hilman <khilman@baylibre.com>
> 
> Mauro, are you the one to pick up new media/rc drivers?  Or if you
> prefer, with your ack, I'll take this along with the DT and submit via
> arm-soc.

I generally pick new media rc drivers, but in the specific case of this
patchset, it is just adding a few extra lines to existing drivers, and
most of the work are actually at the ARM tree.

So, feel free to merge via arm-soc with my ack:

Acked-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

> 
> Thanks,
> 
> Kevin
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



Thanks,
Mauro

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

* [PATCH v4 4/6] media: rc: meson-ir: Add support for newer versions of the IR decoder
@ 2016-08-25 12:41           ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 112+ messages in thread
From: Mauro Carvalho Chehab @ 2016-08-25 12:41 UTC (permalink / raw)
  To: linux-arm-kernel

Em Fri, 19 Aug 2016 15:28:22 -0700
Kevin Hilman <khilman@baylibre.com> escreveu:

> Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:
> 
> > From: Neil Armstrong <narmstrong@baylibre.com>
> >
> > Newer SoCs (Meson 8b and GXBB) are using REG2 (offset 0x20) instead of
> > REG1 to configure the decoder mode. This makes it necessary to
> > introduce new bindings so the driver knows which register has to be
> > used.
> >
> > Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> > Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>  
> 
> Acked-by: Kevin Hilman <khilman@baylibre.com>
> 
> Mauro, are you the one to pick up new media/rc drivers?  Or if you
> prefer, with your ack, I'll take this along with the DT and submit via
> arm-soc.

I generally pick new media rc drivers, but in the specific case of this
patchset, it is just adding a few extra lines to existing drivers, and
most of the work are actually at the ARM tree.

So, feel free to merge via arm-soc with my ack:

Acked-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

> 
> Thanks,
> 
> Kevin
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



Thanks,
Mauro

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

* [PATCH v4 4/6] media: rc: meson-ir: Add support for newer versions of the IR decoder
@ 2016-08-25 12:41           ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 112+ messages in thread
From: Mauro Carvalho Chehab @ 2016-08-25 12:41 UTC (permalink / raw)
  To: linus-amlogic

Em Fri, 19 Aug 2016 15:28:22 -0700
Kevin Hilman <khilman@baylibre.com> escreveu:

> Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:
> 
> > From: Neil Armstrong <narmstrong@baylibre.com>
> >
> > Newer SoCs (Meson 8b and GXBB) are using REG2 (offset 0x20) instead of
> > REG1 to configure the decoder mode. This makes it necessary to
> > introduce new bindings so the driver knows which register has to be
> > used.
> >
> > Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> > Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>  
> 
> Acked-by: Kevin Hilman <khilman@baylibre.com>
> 
> Mauro, are you the one to pick up new media/rc drivers?  Or if you
> prefer, with your ack, I'll take this along with the DT and submit via
> arm-soc.

I generally pick new media rc drivers, but in the specific case of this
patchset, it is just adding a few extra lines to existing drivers, and
most of the work are actually at the ARM tree.

So, feel free to merge via arm-soc with my ack:

Acked-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

> 
> Thanks,
> 
> Kevin
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



Thanks,
Mauro

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

* Re: [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver
  2016-08-20  9:54       ` Martin Blumenstingl
  (?)
  (?)
@ 2016-08-29 19:28           ` Kevin Hilman
  -1 siblings, 0 replies; 112+ messages in thread
From: Kevin Hilman @ 2016-08-29 19:28 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: linux-media-u79uwXL29TY76Z2rM5mHXA,
	linux-gpio-u79uwXL29TY76Z2rM5mHXA,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	narmstrong-rdvid1DuHRBWk0Htik3J/w,
	linus.walleij-QSEj5FYQhm4dnm+yROfE0A,
	carlo-KA+7E9HrN00dnm+yROfE0A,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	mchehab-DgEjT+Ai2ygdnm+yROfE0A, will.deacon-5wv7dgnIgG8,
	catalin.marinas-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, b.galvani-Re5JQEeQqe8AvxtiuMwx3w

Martin Blumenstingl <martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> writes:

> Newer Amlogic platforms (Meson 8b and GXBB) use a slightly different
> register layout for their Infrared Remoete Controller. The decoder mode
> is now configured in another register. Without the changes to the
> meson-ir driver we are simply getting incorrect "durations" reported
> from the hardware (because the hardware is not in time measurement aka
> software decode mode).
>
> This problem was also noticed by some people trying to use this on an
> ODROID-C1 and ODROID-C2 - the workaround there (probably because the
> datasheets were not publicy available yet at that time) was to switch
> to ir_raw_event_store_edge (which leaves it up to the kernel to measure
> the duration of a pulse). See [0] and [1] for the corresponding
> patches.
>
> Changes in v5:
> - changed pin function and group names to remote_input_ao so they match
>   with the datasheet
>
> Tested-by: Neil Armstrong <narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>

Thanks for the respin.  I'll take the driver and DT/bindings through the
arm-soc tree and Linus has taken the pinctrl patch.

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

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

* Re: [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver
@ 2016-08-29 19:28           ` Kevin Hilman
  0 siblings, 0 replies; 112+ messages in thread
From: Kevin Hilman @ 2016-08-29 19:28 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: linux-media, linux-gpio, linux-amlogic, devicetree, narmstrong,
	linus.walleij, carlo, linux-arm-kernel, mchehab, will.deacon,
	catalin.marinas, mark.rutland, robh+dt, b.galvani

Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:

> Newer Amlogic platforms (Meson 8b and GXBB) use a slightly different
> register layout for their Infrared Remoete Controller. The decoder mode
> is now configured in another register. Without the changes to the
> meson-ir driver we are simply getting incorrect "durations" reported
> from the hardware (because the hardware is not in time measurement aka
> software decode mode).
>
> This problem was also noticed by some people trying to use this on an
> ODROID-C1 and ODROID-C2 - the workaround there (probably because the
> datasheets were not publicy available yet at that time) was to switch
> to ir_raw_event_store_edge (which leaves it up to the kernel to measure
> the duration of a pulse). See [0] and [1] for the corresponding
> patches.
>
> Changes in v5:
> - changed pin function and group names to remote_input_ao so they match
>   with the datasheet
>
> Tested-by: Neil Armstrong <narmstrong@baylibre.com>

Thanks for the respin.  I'll take the driver and DT/bindings through the
arm-soc tree and Linus has taken the pinctrl patch.

Kevin

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

* [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver
@ 2016-08-29 19:28           ` Kevin Hilman
  0 siblings, 0 replies; 112+ messages in thread
From: Kevin Hilman @ 2016-08-29 19:28 UTC (permalink / raw)
  To: linux-arm-kernel

Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:

> Newer Amlogic platforms (Meson 8b and GXBB) use a slightly different
> register layout for their Infrared Remoete Controller. The decoder mode
> is now configured in another register. Without the changes to the
> meson-ir driver we are simply getting incorrect "durations" reported
> from the hardware (because the hardware is not in time measurement aka
> software decode mode).
>
> This problem was also noticed by some people trying to use this on an
> ODROID-C1 and ODROID-C2 - the workaround there (probably because the
> datasheets were not publicy available yet at that time) was to switch
> to ir_raw_event_store_edge (which leaves it up to the kernel to measure
> the duration of a pulse). See [0] and [1] for the corresponding
> patches.
>
> Changes in v5:
> - changed pin function and group names to remote_input_ao so they match
>   with the datasheet
>
> Tested-by: Neil Armstrong <narmstrong@baylibre.com>

Thanks for the respin.  I'll take the driver and DT/bindings through the
arm-soc tree and Linus has taken the pinctrl patch.

Kevin

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

* [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver
@ 2016-08-29 19:28           ` Kevin Hilman
  0 siblings, 0 replies; 112+ messages in thread
From: Kevin Hilman @ 2016-08-29 19:28 UTC (permalink / raw)
  To: linus-amlogic

Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:

> Newer Amlogic platforms (Meson 8b and GXBB) use a slightly different
> register layout for their Infrared Remoete Controller. The decoder mode
> is now configured in another register. Without the changes to the
> meson-ir driver we are simply getting incorrect "durations" reported
> from the hardware (because the hardware is not in time measurement aka
> software decode mode).
>
> This problem was also noticed by some people trying to use this on an
> ODROID-C1 and ODROID-C2 - the workaround there (probably because the
> datasheets were not publicy available yet at that time) was to switch
> to ir_raw_event_store_edge (which leaves it up to the kernel to measure
> the duration of a pulse). See [0] and [1] for the corresponding
> patches.
>
> Changes in v5:
> - changed pin function and group names to remote_input_ao so they match
>   with the datasheet
>
> Tested-by: Neil Armstrong <narmstrong@baylibre.com>

Thanks for the respin.  I'll take the driver and DT/bindings through the
arm-soc tree and Linus has taken the pinctrl patch.

Kevin

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

end of thread, other threads:[~2016-08-29 19:28 UTC | newest]

Thread overview: 112+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-26 21:06 [v2] media: rc: fix Meson IR decoder Martin Blumenstingl
2016-06-26 21:06 ` Martin Blumenstingl
2016-06-26 21:06 ` Martin Blumenstingl
2016-06-26 21:06 ` [PATCH v2 1/2] media: rc: meson-ir: fix enabling raw/soft-decoding mode Martin Blumenstingl
2016-06-26 21:06   ` Martin Blumenstingl
2016-06-26 21:06   ` Martin Blumenstingl
2016-06-26 21:06 ` [PATCH v2 2/2] ARM: dts: meson: fixed size of the meson-ir registers Martin Blumenstingl
2016-06-26 21:06   ` Martin Blumenstingl
2016-06-26 21:06   ` Martin Blumenstingl
2016-06-27  8:43   ` Carlo Caione
2016-06-27  8:43     ` Carlo Caione
2016-06-27  8:43     ` Carlo Caione
2016-06-27  6:27 ` [v2] media: rc: fix Meson IR decoder Neil Armstrong
2016-06-27 10:53   ` Martin Blumenstingl
2016-06-27  6:28 ` Neil Armstrong
2016-06-27  6:28   ` Neil Armstrong
     [not found] ` <20160626210622.5257-1-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2016-06-27 12:57   ` Neil Armstrong
2016-06-27 12:57     ` Neil Armstrong
2016-06-27 12:57     ` Neil Armstrong
2016-06-27 12:57     ` Neil Armstrong
2016-06-28 19:17 ` [PATCH v3 0/4] Add Meson 8b / GXBB support to the IR driver Martin Blumenstingl
2016-06-28 19:17   ` Martin Blumenstingl
2016-06-28 19:17   ` [PATCH v3 1/4] dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings Martin Blumenstingl
2016-06-28 19:17     ` Martin Blumenstingl
2016-07-01  1:34     ` Rob Herring
2016-07-01  1:34       ` Rob Herring
2016-06-28 19:18   ` [PATCH v3 2/4] media: rc: meson-ir: Add support for newer versions of the IR decoder Martin Blumenstingl
2016-06-28 19:18     ` Martin Blumenstingl
2016-06-28 19:18   ` [PATCH v3 3/4] ARM64: meson-gxbb: Add Infrared Remote Controller decoder Martin Blumenstingl
2016-06-28 19:18     ` Martin Blumenstingl
2016-06-28 19:18   ` [PATCH v3 4/4] ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards Martin Blumenstingl
2016-06-28 19:18     ` Martin Blumenstingl
2016-08-08  5:54   ` [PATCH v3 0/4] Add Meson 8b / GXBB support to the IR driver Kevin Hilman
2016-08-08  5:54     ` Kevin Hilman
2016-08-19 21:55   ` [PATCH v4 0/6] " Martin Blumenstingl
2016-08-19 21:55     ` Martin Blumenstingl
2016-08-19 21:55     ` Martin Blumenstingl
2016-08-19 21:55     ` Martin Blumenstingl
2016-08-19 21:55     ` [PATCH v4 1/6] pinctrl: amlogic: gxbb: add the IR remote pin Martin Blumenstingl
2016-08-19 21:55       ` Martin Blumenstingl
2016-08-19 21:55       ` Martin Blumenstingl
2016-08-19 21:55       ` Martin Blumenstingl
2016-08-19 22:23       ` Kevin Hilman
2016-08-19 22:23         ` Kevin Hilman
2016-08-19 22:23         ` Kevin Hilman
     [not found]     ` <20160819215547.20063-1-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2016-08-19 21:55       ` [PATCH v4 2/6] ARM64: dts: amlogic: add the pin for the IR remote Martin Blumenstingl
2016-08-19 21:55         ` Martin Blumenstingl
2016-08-19 21:55         ` Martin Blumenstingl
2016-08-19 21:55         ` Martin Blumenstingl
2016-08-19 21:55       ` [PATCH v4 3/6] dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings Martin Blumenstingl
2016-08-19 21:55         ` Martin Blumenstingl
2016-08-19 21:55         ` Martin Blumenstingl
2016-08-19 21:55         ` Martin Blumenstingl
2016-08-19 21:55       ` [PATCH v4 6/6] ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards Martin Blumenstingl
2016-08-19 21:55         ` Martin Blumenstingl
2016-08-19 21:55         ` Martin Blumenstingl
2016-08-19 21:55         ` Martin Blumenstingl
2016-08-19 21:55     ` [PATCH v4 4/6] media: rc: meson-ir: Add support for newer versions of the IR decoder Martin Blumenstingl
2016-08-19 21:55       ` Martin Blumenstingl
2016-08-19 21:55       ` Martin Blumenstingl
2016-08-19 22:28       ` Kevin Hilman
2016-08-19 22:28         ` Kevin Hilman
2016-08-19 22:28         ` Kevin Hilman
2016-08-19 22:28         ` Kevin Hilman
2016-08-25 12:41         ` Mauro Carvalho Chehab
2016-08-25 12:41           ` Mauro Carvalho Chehab
2016-08-25 12:41           ` Mauro Carvalho Chehab
2016-08-19 21:55     ` [PATCH v4 5/6] ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder Martin Blumenstingl
2016-08-19 21:55       ` Martin Blumenstingl
2016-08-19 21:55       ` Martin Blumenstingl
2016-08-20  9:54     ` [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver Martin Blumenstingl
2016-08-20  9:54       ` Martin Blumenstingl
2016-08-20  9:54       ` Martin Blumenstingl
2016-08-20  9:54       ` Martin Blumenstingl
2016-08-20  9:54       ` [PATCH v5 1/6] pinctrl: amlogic: gxbb: add the IR remote input pin Martin Blumenstingl
2016-08-20  9:54         ` Martin Blumenstingl
2016-08-20  9:54         ` Martin Blumenstingl
2016-08-20  9:54         ` Martin Blumenstingl
     [not found]         ` <20160820095424.636-2-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2016-08-22 13:51           ` Linus Walleij
2016-08-22 13:51             ` Linus Walleij
2016-08-22 13:51             ` Linus Walleij
2016-08-22 13:51             ` Linus Walleij
2016-08-20  9:54       ` [PATCH v5 3/6] dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings Martin Blumenstingl
2016-08-20  9:54         ` Martin Blumenstingl
2016-08-20  9:54         ` Martin Blumenstingl
2016-08-20  9:54         ` Martin Blumenstingl
2016-08-20  9:54       ` [PATCH v5 4/6] media: rc: meson-ir: Add support for newer versions of the IR decoder Martin Blumenstingl
2016-08-20  9:54         ` Martin Blumenstingl
2016-08-20  9:54         ` Martin Blumenstingl
2016-08-20  9:54       ` [PATCH v5 5/6] ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder Martin Blumenstingl
2016-08-20  9:54         ` Martin Blumenstingl
2016-08-20  9:54         ` Martin Blumenstingl
     [not found]       ` <20160820095424.636-1-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2016-08-20  9:54         ` [PATCH v5 2/6] ARM64: dts: amlogic: add the input pin for the IR remote Martin Blumenstingl
2016-08-20  9:54           ` Martin Blumenstingl
2016-08-20  9:54           ` Martin Blumenstingl
2016-08-20  9:54           ` Martin Blumenstingl
     [not found]           ` <20160820095424.636-3-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2016-08-22 13:52             ` Linus Walleij
2016-08-22 13:52               ` Linus Walleij
2016-08-22 13:52               ` Linus Walleij
2016-08-22 13:52               ` Linus Walleij
2016-08-20  9:54         ` [PATCH v5 6/6] ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards Martin Blumenstingl
2016-08-20  9:54           ` Martin Blumenstingl
2016-08-20  9:54           ` Martin Blumenstingl
2016-08-20  9:54           ` Martin Blumenstingl
2016-08-29 19:28         ` [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver Kevin Hilman
2016-08-29 19:28           ` Kevin Hilman
2016-08-29 19:28           ` Kevin Hilman
2016-08-29 19:28           ` Kevin Hilman
2016-08-20  9:53   ` Martin Blumenstingl
2016-08-20  9:53     ` Martin Blumenstingl
2016-08-20  9:53     ` Martin Blumenstingl
2016-08-20  9:53     ` Martin Blumenstingl

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.