Modified from https://github.com/armbian/build/raw/refs/heads/main/patch/kernel/archive/rockchip-6.16/patches.armbian/ir-keymap-rk322x-box.patch
Original author: Paolo Sabatino <paolo.sabatino@gmail.com>

diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile
index d04572627cdd..a543bb3ef864 100644
--- a/drivers/media/rc/keymaps/Makefile
+++ b/drivers/media/rc/keymaps/Makefile
@@ -106,6 +106,7 @@ obj-$(CONFIG_RC_MAP) += \
 			rc-rc6-mce.o \
 			rc-real-audio-220-32-keys.o \
 			rc-reddo.o \
+			rc-rk322x-tvbox.o \
 			rc-siemens-gigaset-rc20.o \
 			rc-snapstream-firefly.o \
 			rc-streamzap.o \
diff --git a/drivers/media/rc/keymaps/rc-rk322x-tvbox.c b/drivers/media/rc/keymaps/rc-rk322x-tvbox.c
new file mode 100644
index 00000000000..91e24ee52ee
--- /dev/null
+++ b/drivers/media/rc/keymaps/rc-rk322x-tvbox.c
@@ -0,0 +1,199 @@
+// SPDX-License-Identifier: GPL-2.0+
+// rc-rk322x-tvbox.c - Keytable for various RK322X-based TV box remote controllers
+//
+// Based on https://github.com/rk-unofficial-cfw/LibreELEC.tv/blob/le12-rk322x-wip/packages/sysutils/v4l-utils/keymaps/rockchip_remote.toml
+//
+// Copyright (c) 2022 Paolo Sabatino
+// Copyright (c) 2025 leap123
+
+#include <media/rc-map.h>
+#include <linux/module.h>
+
+static struct rc_map_table rk322x_tvbox[] = {
+	/* Generic 1 */
+	{ 0x140, KEY_POWER },      // Red power button
+	{ 0x155, KEY_POWER2 },     // Gray power button (TV control)
+	{ 0x143, KEY_RED },        // Red    / SETUP
+	{ 0x10f, KEY_GREEN },      // Green  / APP
+	{ 0x118, KEY_YELLOW },     // Yellow / VOL-
+	{ 0x110, KEY_BLUE },       // Blue   / VOL+
+	{ 0x141, KEY_MUTE },
+	{ 0x100, KEY_VENDOR },     // Mouse
+	{ 0x119, KEY_BACK },
+	{ 0x116, KEY_UP },
+	{ 0x151, KEY_LEFT },
+	{ 0x150, KEY_RIGHT },
+	{ 0x11a, KEY_DOWN },
+	{ 0x113, KEY_OK },
+	{ 0x111, KEY_HOME },
+	{ 0x14c, KEY_MENU },
+	{ 0x15a, KEY_PLAYPAUSE },
+	{ 0x14b, KEY_PREVIOUS },
+	{ 0x14f, KEY_NEXT },
+	{ 0x147, KEY_MENU },
+	{ 0x159, KEY_SETUP },      // TV control - SET
+	{ 0x158, KEY_TV },         // TV control - TV IN
+	{ 0x157, KEY_VOLUMEDOWN }, // TV control - VOL-
+	{ 0x156, KEY_VOLUMEUP },   // TV control - VOL+
+	{ 0x101, KEY_NUMERIC_0 },
+	{ 0x14e, KEY_NUMERIC_1 },
+	{ 0x10d, KEY_NUMERIC_2 },
+	{ 0x10c, KEY_NUMERIC_3 },
+	{ 0x14a, KEY_NUMERIC_4 },
+	{ 0x109, KEY_NUMERIC_5 },
+	{ 0x108, KEY_NUMERIC_6 },
+	{ 0x146, KEY_NUMERIC_7 },
+	{ 0x105, KEY_NUMERIC_8 },
+	{ 0x104, KEY_NUMERIC_9 },
+	{ 0x142, KEY_BACKSPACE },
+
+	/* Generic 2 */
+	{ 0x40400d, KEY_OK },
+	{ 0x40404d, KEY_POWER },
+	{ 0x40401e, KEY_PREVIOUSSONG },
+	{ 0x40401f, KEY_NEXTSONG },
+	{ 0x404001, KEY_1 },
+	{ 0x404002, KEY_2 },
+	{ 0x404003, KEY_3 },
+	{ 0x404004, KEY_4 },
+	{ 0x404005, KEY_5 },
+	{ 0x404006, KEY_6 },
+	{ 0x404007, KEY_7 },
+	{ 0x404008, KEY_8 },
+	{ 0x404009, KEY_9 },
+	{ 0x404000, KEY_0 },
+	{ 0x40400c, KEY_BACKSPACE },
+	{ 0x404044, KEY_F6 },
+	{ 0x40401a, KEY_HOME },
+	{ 0x404042, KEY_BACK },
+	{ 0x404045, KEY_MENU },
+	{ 0x40400f, KEY_TEXT },
+	{ 0x404010, KEY_LEFT },
+	{ 0x404011, KEY_RIGHT },
+	{ 0x40400e, KEY_DOWN },
+	{ 0x40400b, KEY_UP },
+	{ 0x40401c, KEY_VOLUMEDOWN },
+	{ 0x404043, KEY_MUTE },
+	{ 0x404015, KEY_VOLUMEUP },
+	{ 0x404053, KEY_F1 },
+	{ 0x40405b, KEY_F2 },
+	{ 0x404057, KEY_F3 },
+	{ 0x404054, KEY_F4 },
+
+	/* Generic 3 */
+	{ 0xcc1d11, KEY_OK },
+	{ 0xcc1d0f, KEY_BACK },
+	{ 0xcc1d07, KEY_UP },
+	{ 0xcc1d44, KEY_DOWN },
+	{ 0xcc1d10, KEY_LEFT },
+	{ 0xcc1d12, KEY_RIGHT },
+	{ 0xcc1d0e, KEY_VOLUMEUP },
+	{ 0xcc1d02, KEY_VOLUMEDOWN },
+	{ 0xcc1d00, KEY_POWER },
+	{ 0xcc1d0c, KEY_MUTE },
+	{ 0xcc1d40, KEY_C },
+	{ 0xcc1d41, KEY_1 },
+	{ 0xcc1d45, KEY_2 },
+	{ 0xcc1d4d, KEY_3 },
+	{ 0xcc1d42, KEY_4 },
+	{ 0xcc1d46, KEY_5 },
+	{ 0xcc1d4e, KEY_6 },
+	{ 0xcc1d43, KEY_7 },
+	{ 0xcc1d47, KEY_8 },
+	{ 0xcc1d4f, KEY_9 },
+	{ 0xcc1d49, KEY_0 },
+	{ 0xcc1d4a, KEY_BACKSPACE },
+	{ 0xcc1d01, KEY_M },
+	{ 0xcc1d05, KEY_T },
+	{ 0xcc1d09, KEY_E },
+	{ 0xcc1d0d, KEY_A },
+	{ 0xcc1d06, KEY_PAGEDOWN },
+	{ 0xcc1d0a, KEY_PAGEUP },
+	{ 0xcc1d03, KEY_HOME },
+	{ 0xcc1d4c, KEY_INFO },
+	{ 0xcc1d48, KEY_O },
+
+	/* OneTV Lite */
+	{ 0x19, KEY_MUTE },
+	{ 0x18, KEY_MEDIA },
+	{ 0x13, KEY_VOLUMEUP },
+	{ 0x17, KEY_VOLUMEDOWN },
+	{ 0x0d, KEY_HOME },
+	{ 0x05, KEY_BACK },
+	{ 0x06, KEY_UP },
+	{ 0x5a, KEY_LEFT },
+	{ 0x1a, KEY_OK },
+	{ 0x1b, KEY_RIGHT },
+	{ 0x16, KEY_DOWN },
+	{ 0x45, KEY_MENU },
+	{ 0x12, KEY_INFO },
+	{ 0x0f, KEY_NUMERIC_0 },
+	{ 0x52, KEY_NUMERIC_1 },
+	{ 0x50, KEY_NUMERIC_2 },
+	{ 0x10, KEY_NUMERIC_3 },
+	{ 0x56, KEY_NUMERIC_4 },
+	{ 0x54, KEY_NUMERIC_5 },
+	{ 0x14, KEY_NUMERIC_6 },
+	{ 0x4e, KEY_NUMERIC_7 },
+	{ 0x4c, KEY_NUMERIC_8 },
+	{ 0x0c, KEY_NUMERIC_9 },
+	{ 0x21, KEY_NUMERIC_STAR },
+	{ 0x51, KEY_BACKSPACE },
+	{ 0x59, KEY_POWER },
+
+	/* Greenet (?) */
+	{ 0xdf1c, KEY_POWER },
+	{ 0xdf4b, KEY_REWIND },
+	{ 0xdf4f, KEY_FORWARD },
+	{ 0xdf01, KEY_PLAYPAUSE },
+	{ 0xdf5f, KEY_MENU },
+	{ 0xdf5d, KEY_VOLUMEUP },
+	{ 0xdf5c, KEY_VOLUMEDOWN },
+	{ 0xdf42, KEY_HOME },
+	{ 0xdf0a, KEY_BACK },
+	{ 0xdf1a, KEY_UP },
+	{ 0xdf48, KEY_DOWN },
+	{ 0xdf07, KEY_RIGHT },
+	{ 0xdf47, KEY_LEFT },
+	{ 0xdf06, KEY_OK },
+	{ 0xdf03, KEY_ANGLE },
+	{ 0xdf18, KEY_CONTEXT_MENU },
+	{ 0xdf54, KEY_1 },
+	{ 0xdf16, KEY_2 },
+	{ 0xdf15, KEY_3 },
+	{ 0xdf50, KEY_4 },
+	{ 0xdf12, KEY_5 },
+	{ 0xdf11, KEY_6 },
+	{ 0xdf4c, KEY_7 },
+	{ 0xdf0e, KEY_8 },
+	{ 0xdf0d, KEY_9 },
+	{ 0xdf41, KEY_MUTE },
+	{ 0xdf0c, KEY_0 },
+	{ 0xdf10, KEY_BACKSPACE },
+};
+
+static struct rc_map_list rk322x_tvbox_map = {
+	.map = {
+		.scan     = rk322x_tvbox,
+		.size     = ARRAY_SIZE(rk322x_tvbox),
+		.rc_proto = RC_PROTO_NEC,	/* Legacy IR type */
+		.name     = RC_MAP_RK322X_TVBOX,
+	}
+};
+
+static int __init init_rc_map_rk322x_tvbox(void)
+{
+	return rc_map_register(&rk322x_tvbox_map);
+}
+
+static void __exit exit_rc_map_rk322x_tvbox(void)
+{
+	rc_map_unregister(&rk322x_tvbox_map);
+}
+
+module_init(init_rc_map_rk322x_tvbox)
+module_exit(exit_rc_map_rk322x_tvbox)
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("leap123 <leap123@canaglie.org>");
+MODULE_DESCRIPTION("Rockchip RK322X-based TV boxes remote controller keytable");
diff --git a/include/media/rc-map.h b/include/media/rc-map.h
index d90e4611b066..14d6a50defed 100644
--- a/include/media/rc-map.h
+++ b/include/media/rc-map.h
@@ -313,6 +313,7 @@ struct rc_map *rc_map_get(const char *name);
 #define RC_MAP_RC6_MCE                   "rc-rc6-mce"
 #define RC_MAP_REAL_AUDIO_220_32_KEYS    "rc-real-audio-220-32-keys"
 #define RC_MAP_REDDO                     "rc-reddo"
+#define RC_MAP_RK322X_TVBOX              "rc-rk322x-tvbox"
 #define RC_MAP_SIEMENS_GIGASET_RC20      "rc-siemens-gigaset-rc20"
 #define RC_MAP_SNAPSTREAM_FIREFLY        "rc-snapstream-firefly"
 #define RC_MAP_STREAMZAP                 "rc-streamzap"
