在 2023/8/25 20:19, Neil Armstrong 写道:
On 25/08/2023 13:53, zelong dong wrote:
From: Zelong Dong <zelong.dong@xxxxxxxxxxx>
Meson IR Controller supports hardware decoder in Meson-S4 and later
SoC. So far, protocol NEC could be decoded by hardware decoder.
Signed-off-by: Zelong Dong <zelong.dong@xxxxxxxxxxx>
---
drivers/media/rc/meson-ir.c | 522 +++++++++++++++++++++++++++++++-----
1 file changed, 451 insertions(+), 71 deletions(-)
<snip>
It looks pretty good now, so far I'm ok with it:
Reviewed-by: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
I think some test reports would be needed to be sure it doesn't regress
existing HW.
Thanks,
Neil
Sorry for my late reply, I spent a long time looking for development boards.
I searched Meson-IR DT Node from all the Amlogic DT, only 4 DTSI as follow:
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
arch/arm64/boot/dts/amlogic/meson-axg.dtsi
arch/arm64/boot/dts/amlogic/meson-gx.dtsi
arch/arm/boot/dts/amlogic/meson.dtsi
So I planned to sample the boards to test:
arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts
arch/arm/boot/dts/amlogic/meson8b-odroidc1.dts
Unfortunately, meson-gxl-s905x-p212 & meson8b-odroidc1 are too old to be
find.
there are only 2 boards I got, meson-g12a-u200 & meson-axg-s400, and
they worked.
[ 0.943097] IR NEC protocol handler initialized
[ 0.943146] IR RC5(x/sz) protocol handler initialized
[ 0.947029] IR RC6 protocol handler initialized
[ 0.951508] IR RCMM protocol handler initialized
[ 0.956080] IR XMP protocol handler initialized
[ 0.961266] Registered IR keymap rc-empty
[ 0.964674] rc rc0: meson-ir as
/devices/platform/soc/ff800000.bus/ff808000.ir/rc/rc0
[ 0.972437] input: meson-ir as
/devices/platform/soc/ff800000.bus/ff808000.ir/rc/rc0/input0
[ 0.980983] rc rc0: sw decoder init
[ 0.984089] meson-ir ff808000.ir: receiver initialized
# cd /sys/devices/platform/soc/ff800000.bus/ff808000.ir/rc/rc0/
# cat protocols
rc-5 nec rc-6 rc-5-sz xmp rc-mm
# echo nec > protocols
# hexdump /dev/input/event0
0000000 0069 0000 3180 0005 0004 0004 011b 0000
0000010 0069 0000 3180 0005 0000 0000 0000 0000
0000020 0069 0000 fc80 0005 0004 0004 011b 0000
0000030 0069 0000 fc80 0005 0000 0000 0000 0000
0000040 0069 0000 92db 0007 0004 0004 011b 0000
0000050 0069 0000 92db 0007 0000 0000 0000 0000
0000060 0069 0000 388b 0009 0004 0004 011b 0000
0000070 0069 0000 388b 0009 0000 0000 0000 0000
0000080 0069 0000 de72 000a 0004 0004 011b 0000
0000090 0069 0000 de72 000a 0000 0000 0000 0000