Add New IR Remote Controller in Android 9

Good morning! I have an issue when adding a new IR remote to Android 9,
I have read the article Add support for a new IR remote controller
but from the log file :

meson-remote c8100580.rc: invalid custom:0xa758f708
[ 337.335124@1] meson-remote c8100580.rc: cur_custom is nulll
[ 337.340633@1] meson-remote c8100580.rc: no valid key to handle

from the log invalid custom code.

and i was change the custom_map in …/common/arch/arm64/boot/dts/amlogic/mesongxl.dtsi

custom_maps:custom_maps {
mapnum = <1>;
map0 = <&map_0>;
map_0: map_0{
mapname = “khadas-ir”;
customcode = <0xf708>;
release_delay = <20>;
fn_key_scancode = <0x60>;
cursor_left_scancode = <0x03>;
cursor_right_scancode = <0x02>;
cursor_up_scancode = <0x00>;
cursor_down_scancode = <0x01>;
cursor_ok_scancode = <0x1F>;
size = <4>; /keymap size/
keymap = <REMOTE_KEY(0x00,103)
REMOTE_KEY(0x01,108)
REMOTE_KEY(0x03,105)
REMOTE_KEY(0x02,106)>;
};
};

Thanks

any suggestion? Thanks

@yossi Hello , Maybe @Terry can hely you .

hi @Terry any suggestion to add the new IR Remote controller in android 9?

The valid dts file is arch/arm/boot/dts/amlogic/mesongxl.dtsi and not arch/arm64/boot/dts/amlogic/mesongxl.dtsi

i was editted in
arch/arm/boot/dts/amlogic/mesongxl.dtsi
and the configuration :
meson-remote {
compatible = “amlogic, aml_remote”;
dev_name = “meson-remote”;
status = “okay”;
remote_ao_offset = <0x580>; /* 0x400 + (0x20 + idx)<<2 – old ; 0x400 + (0x60 +idx)<<2 --new */
interrupts = <0 196 1>;
pinctrl-names = “default”;
pinctrl-0 = <&remote_pins>;
};

common/drivers/amlogic/input/remote/Makefile
obj-$(CONFIG_MESON_REMOTE) += remote.o
remote-objs := remote_main.o remote_func.o

common/arch/arm/config
CONFIG_MESON_REMOTE=y

and modify device/khadas/kvim/files/remote.conf and device/khadas/common/products/mbox/Vendor_0001_Product_0001.kl

but the new remote cannot function.

We did’t use the file remote.conf. And you only need to modify the file mesongxl.dtsi