* [PATCH v4 0/6] Add Meson 8b / GXBB support to the IR driver
[not found] <20160628191802.21227-1-martin.blumenstingl@googlemail.com>
@ 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
` (6 more replies)
2016-08-20 9:53 ` Martin Blumenstingl
1 sibling, 7 replies; 21+ 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] 21+ messages in thread
* [PATCH v4 1/6] pinctrl: amlogic: gxbb: add the IR remote pin
2016-08-19 21:55 ` [PATCH v4 0/6] Add Meson 8b / GXBB support to the IR driver Martin Blumenstingl
@ 2016-08-19 21:55 ` Martin Blumenstingl
2016-08-19 22:23 ` Kevin Hilman
2016-08-19 21:55 ` [PATCH v4 2/6] ARM64: dts: amlogic: add the pin for the IR remote Martin Blumenstingl
` (5 subsequent siblings)
6 siblings, 1 reply; 21+ 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] 21+ messages in thread
* [PATCH v4 2/6] ARM64: dts: amlogic: add the pin for the IR remote
2016-08-19 21:55 ` [PATCH v4 0/6] Add Meson 8b / GXBB support to the IR driver 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 ` [PATCH v4 3/6] dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings Martin Blumenstingl
` (4 subsequent siblings)
6 siblings, 0 replies; 21+ 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] 21+ messages in thread
* [PATCH v4 3/6] dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
2016-08-19 21:55 ` [PATCH v4 0/6] Add Meson 8b / GXBB support to the IR driver 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 ` [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 ` [PATCH v4 4/6] media: rc: meson-ir: Add support for newer versions of the IR decoder Martin Blumenstingl
` (3 subsequent siblings)
6 siblings, 0 replies; 21+ 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] 21+ 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 ` [PATCH v4 0/6] Add Meson 8b / GXBB support to the IR driver Martin Blumenstingl
` (2 preceding siblings ...)
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 22:28 ` Kevin Hilman
2016-08-19 21:55 ` [PATCH v4 5/6] ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder Martin Blumenstingl
` (2 subsequent siblings)
6 siblings, 1 reply; 21+ 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] 21+ messages in thread
* [PATCH v4 5/6] ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder
2016-08-19 21:55 ` [PATCH v4 0/6] Add Meson 8b / GXBB support to the IR driver Martin Blumenstingl
` (3 preceding siblings ...)
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 ` [PATCH v4 6/6] ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards Martin Blumenstingl
2016-08-20 9:54 ` [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver Martin Blumenstingl
6 siblings, 0 replies; 21+ 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] 21+ messages in thread
* [PATCH v4 6/6] ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards
2016-08-19 21:55 ` [PATCH v4 0/6] Add Meson 8b / GXBB support to the IR driver Martin Blumenstingl
` (4 preceding siblings ...)
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-20 9:54 ` [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver Martin Blumenstingl
6 siblings, 0 replies; 21+ 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] 21+ messages in thread
* [PATCH v4 1/6] pinctrl: amlogic: gxbb: add the IR remote pin
2016-08-19 21:55 ` [PATCH v4 1/6] pinctrl: amlogic: gxbb: add the IR remote pin Martin Blumenstingl
@ 2016-08-19 22:23 ` Kevin Hilman
0 siblings, 0 replies; 21+ 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] 21+ 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 ` [PATCH v4 4/6] media: rc: meson-ir: Add support for newer versions of the IR decoder Martin Blumenstingl
@ 2016-08-19 22:28 ` Kevin Hilman
2016-08-25 12:41 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 21+ 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] 21+ messages in thread
* [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver
[not found] <20160628191802.21227-1-martin.blumenstingl@googlemail.com>
2016-08-19 21:55 ` [PATCH v4 0/6] Add Meson 8b / GXBB support to the IR driver Martin Blumenstingl
@ 2016-08-20 9:53 ` Martin Blumenstingl
1 sibling, 0 replies; 21+ 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] 21+ messages in thread
* [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver
2016-08-19 21:55 ` [PATCH v4 0/6] Add Meson 8b / GXBB support to the IR driver Martin Blumenstingl
` (5 preceding siblings ...)
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-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
` (6 more replies)
6 siblings, 7 replies; 21+ 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] 21+ messages in thread
* [PATCH v5 1/6] pinctrl: amlogic: gxbb: add the IR remote input pin
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-22 13:51 ` Linus Walleij
2016-08-20 9:54 ` [PATCH v5 2/6] ARM64: dts: amlogic: add the input pin for the IR remote Martin Blumenstingl
` (5 subsequent siblings)
6 siblings, 1 reply; 21+ 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] 21+ messages in thread
* [PATCH v5 2/6] ARM64: dts: amlogic: add the input pin for the IR remote
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 ` [PATCH v5 1/6] pinctrl: amlogic: gxbb: add the IR remote input pin Martin Blumenstingl
@ 2016-08-20 9:54 ` Martin Blumenstingl
2016-08-22 13:52 ` Linus Walleij
2016-08-20 9:54 ` [PATCH v5 3/6] dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings Martin Blumenstingl
` (4 subsequent siblings)
6 siblings, 1 reply; 21+ 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] 21+ messages in thread
* [PATCH v5 3/6] dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
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 ` [PATCH v5 1/6] pinctrl: amlogic: gxbb: add the IR remote input pin Martin Blumenstingl
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 ` [PATCH v5 4/6] media: rc: meson-ir: Add support for newer versions of the IR decoder Martin Blumenstingl
` (3 subsequent siblings)
6 siblings, 0 replies; 21+ 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] 21+ 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 ` [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver Martin Blumenstingl
` (2 preceding siblings ...)
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 ` [PATCH v5 5/6] ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder Martin Blumenstingl
` (2 subsequent siblings)
6 siblings, 0 replies; 21+ 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] 21+ messages in thread
* [PATCH v5 5/6] ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder
2016-08-20 9:54 ` [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver Martin Blumenstingl
` (3 preceding siblings ...)
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 ` [PATCH v5 6/6] ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards Martin Blumenstingl
2016-08-29 19:28 ` [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver Kevin Hilman
6 siblings, 0 replies; 21+ 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] 21+ messages in thread
* [PATCH v5 6/6] ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards
2016-08-20 9:54 ` [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver Martin Blumenstingl
` (4 preceding siblings ...)
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-29 19:28 ` [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver Kevin Hilman
6 siblings, 0 replies; 21+ 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] 21+ messages in thread
* [PATCH v5 1/6] pinctrl: amlogic: gxbb: add the IR remote input pin
2016-08-20 9:54 ` [PATCH v5 1/6] pinctrl: amlogic: gxbb: add the IR remote input pin Martin Blumenstingl
@ 2016-08-22 13:51 ` Linus Walleij
0 siblings, 0 replies; 21+ 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] 21+ messages in thread
* [PATCH v5 2/6] ARM64: dts: amlogic: add the input pin for the IR remote
2016-08-20 9:54 ` [PATCH v5 2/6] ARM64: dts: amlogic: add the input pin for the IR remote Martin Blumenstingl
@ 2016-08-22 13:52 ` Linus Walleij
0 siblings, 0 replies; 21+ 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] 21+ 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
@ 2016-08-25 12:41 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 21+ 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] 21+ messages in thread
* [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver
2016-08-20 9:54 ` [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver Martin Blumenstingl
` (5 preceding siblings ...)
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-29 19:28 ` Kevin Hilman
6 siblings, 0 replies; 21+ 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] 21+ messages in thread
end of thread, other threads:[~2016-08-29 19:28 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20160628191802.21227-1-martin.blumenstingl@googlemail.com>
2016-08-19 21:55 ` [PATCH v4 0/6] Add Meson 8b / GXBB support to the IR driver Martin Blumenstingl
2016-08-19 21:55 ` [PATCH v4 1/6] pinctrl: amlogic: gxbb: add the IR remote pin Martin Blumenstingl
2016-08-19 22:23 ` Kevin Hilman
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 ` [PATCH v4 3/6] dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings 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 22:28 ` Kevin Hilman
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 ` [PATCH v4 6/6] ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards 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 ` [PATCH v5 1/6] pinctrl: amlogic: gxbb: add the IR remote input pin Martin Blumenstingl
2016-08-22 13:51 ` Linus Walleij
2016-08-20 9:54 ` [PATCH v5 2/6] ARM64: dts: amlogic: add the input pin for the IR remote Martin Blumenstingl
2016-08-22 13:52 ` 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 ` [PATCH v5 4/6] media: rc: meson-ir: Add support for newer versions of the IR decoder 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 ` [PATCH v5 6/6] ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards Martin Blumenstingl
2016-08-29 19:28 ` [PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver Kevin Hilman
2016-08-20 9:53 ` Martin Blumenstingl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).