From patchwork Sun Jul 24 14:17:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhang Ning X-Patchwork-Id: 12927556 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 70049CCA48E for ; Sun, 24 Jul 2022 14:18:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:Subject:Cc:To:From:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jR74YRI0mqtYWiCVlmuWxm/ItF78fyY6FFU9W02aB5s=; b=MKhKrkxRxGCkD6 YFO7k1u7xhQw5vDNoKo1h1BuRg0Nzj8NeQ8/70GQAAUov9wqhcAls8zN0jFVQBMrfOlu6z+4mEMtm yJN3hynwE+SuqsfDhQTOJZzYNLU2f3eEorm6YTTCtIDSeFqyu8cjV+SAxl5Tl7oAzVGKo4K2w47Ot VzN0HAbmEqSRch9fjsbpU25tcXe3jUfGy2DCc68EjBut/XCugY1VYyY1linC0hTYZfrZSEAO4HRkO 1Z1Bub/r4nBN6RGgCCOJl7aO9kU91szAZ3xvNUFFyW9b0rDefnZSMDXflaATzVUo2+ju27+74VC0o rKNFZs3pX2cJ4XnUeQAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFcQy-006WJi-7w; Sun, 24 Jul 2022 14:18:16 +0000 Received: from out203-205-221-173.mail.qq.com ([203.205.221.173]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFcQv-006WFN-CM for linux-amlogic@lists.infradead.org; Sun, 24 Jul 2022 14:18:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1658672288; bh=HwPm1P5MGd+5ePBYlxQmryWZ6ALrW2k2UKDUNj8/Sqw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=KKNSyZpYvSwbxtMSscOtnZABoCXeJaoy0bKyKbvBfz1QqAHaQA+xGqlOU1Sa4BaXL JawdsfcmIEZD0pCrheynKN95FXk+YUAoNIHkg4+wMJ12TJmbrukSExwuV6JsImyaff flRTn7kCsmw8LdYNwL31SAyHirHWQ3dZ8cDrmhs0= Received: from TS-551.. ([101.229.115.105]) by newxmesmtplogicsvrszc13.qq.com (NewEsmtp) with SMTP id 48289623; Sun, 24 Jul 2022 22:18:02 +0800 X-QQ-mid: xmsmtpt1658672285t7ayqw671 Message-ID: X-QQ-XMAILINFO: Nd3+k7TdeYPal1x1ETGdkkEt2Bl55Ux47eb/i3QYn3RvtC9/fQDm/tF5QnHw1S 85CgkUUxMGfMtiMAPhylxmfu1ZvBMz6WgL9WZ7ypJSTPKEqoeQu0Apn8tVM4lR+/pKnnWTFW8wHF BuU0ykeTA6EB3nebm1BqgjZv5LyOtNeuheid8W2tYNrv/OydaoVi/6JE8DIitX577lAd/le6DzsT axdwHRTIILM/2vi2tYou5YA1dBnn24y2mOkQWrU8sN6VgxXMd3JEeNNfy09pdXt+c4uNiwPxFcwv jImL0RU8MiAFTQEoTOCADL7G5bgBPpYPJxKSJtZHz+zt8QDz/ZGZm2btUZbVq6AJbAoZ9PMfQHPc oKh0MKI83iKEf0EQheol4VykswLsbQFxlrojKZ6FkfCHBh9QdKyVDqNx+vI7wfRxp9Gi8hsC2OiR jqM8rkNAMtxgKkYC/B3WXGdVi9+1c5zuU4Z3aA2Ma/Tz0f/RPaSxUFQvC1IJeKzPgZ6xxDpMzhkz J8SmTCKIc+k2hfJ0bZUghqRC64o2qM/UfXUKS0UCaUKZHp98s8CunT1mv0pE71wH7rb/xTj30LX2 dLiDbRnMy6her7FLY8Sx6YsUMRH1JoUgGNGsI4SbYkr4F+PqHZIRYPM0/S4R2UHFzTvxl1+rAc5E FuR4cBG4tDW/Siw1tWME8kDeRkQ95jmK0jZx9M3+afsABRhmU61hFJYgGMvFCcceZtRThym2zJtP 50ZKuCadj/AyMBeh+om66jK6r9Pdl28D9bnmQbsB2o8KfAPtVZP+SCKOM1ozek6J7o5qdtVGS+58 2a/pjTkF56Sq/X0g1co1s27G2Vf+QuF6R4SDIZdHaeaF0vQ6RjSVSxbcMuI61Eb294h7j0zdA1V9 RKDXs1xNrDLzLEA02gxu5JVSC8VydkFf83IrCxlsUrhusN8TH//NVpXzRqM51hqzohAioTnE19 From: Zhang Ning To: martin.blumenstingl@googlemail.com, narmstrong@baylibre.com, linux-amlogic@lists.infradead.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, sean@mess.org, devicetree@vger.kernel.org, linux-media@vger.kernel.org Cc: Zhang Ning Subject: [v4 1/4] media: rc: add keymap for MagicBox M16S remote Date: Sun, 24 Jul 2022 22:17:46 +0800 X-OQ-MSGID: <20220724141749.131724-2-zhangn1985@qq.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220724141749.131724-1-zhangn1985@qq.com> References: <20220724141749.131724-1-zhangn1985@qq.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220724_071813_773396_6D1D5825 X-CRM114-Status: UNSURE ( 6.13 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org MagicBox M16S Tv box shipped with a simple NEC remote. it has a key labeled "M", used as Magic key in vendor OS. Ths has mapped to KEY_MUTE. Signed-off-by: Zhang Ning --- Documentation/devicetree/bindings/media/rc.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/media/rc.yaml b/Documentation/devicetree/bindings/media/rc.yaml index d4c541c4b164..6491d1bdbac7 100644 --- a/Documentation/devicetree/bindings/media/rc.yaml +++ b/Documentation/devicetree/bindings/media/rc.yaml @@ -90,6 +90,7 @@ properties: - rc-kworld-plus-tv-analog - rc-leadtek-y04g0051 - rc-lme2510 + - rc-magicbox - rc-manli - rc-mecool-kii-pro - rc-mecool-kiii-pro From patchwork Sun Jul 24 14:17:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhang Ning X-Patchwork-Id: 12927553 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1F0E5C433EF for ; Sun, 24 Jul 2022 14:18:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:Subject:Cc:To:From:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wDgU+UCCgAw8YLDUeOSezetJn0p5Mpk9s0SVPXy8Dz4=; b=gmeonM1pxCzvZU h2LTS2xB+hoHNTZ8V6VNvoUfpMbVy/LZtPKYKMLYbDy1z3sh5YU4Vx5/eh5zeVBAWck5txoTo1g0/ RvEbkiG0Yctqfz05dphtIX/jIjzcYwwXlhYWyIyBh/6u7wIXTEgpraHWcgzm9M1DUl3BkRKD3pXHc yHgFkKdWZHDhZEtLuOd7ZIu86JixtVECPd9DR9P+PrKU58Jtu0/6N9H41srW+hWomSofHhTTugIHh nOfyRLNbKnIVkOLuNHfDtKL68NtqMcTWGDCMqiwB/zCY+C6EJJz6bhlzNDiK3sPwGQtCP5wm1CbqN H2cr+1FYCO1zv7KFjX5g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFcQx-006WJM-Sn; Sun, 24 Jul 2022 14:18:15 +0000 Received: from out203-205-221-205.mail.qq.com ([203.205.221.205]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFcQt-006WFW-W6 for linux-amlogic@lists.infradead.org; Sun, 24 Jul 2022 14:18:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1658672289; bh=DbWKrvR10r1zE4/Lc/OCMOhqelIuyqNB4MkXAJpJ3i0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=fdGZqv0G12h9OADddYr6/hQDq8CpyT56VQ6SdY7JEPT+Q8fV/dGzlD8KsrRu0iAZm rT5bRHTSb0KXNG8MCBERrwbZyjm/M/Uw5i8qTXJyW/t3mPOUpyeZXorxOiWOqAS9f3 oXo0Y1cHoQHyWItoDIypMSFX/TmJ9ZrcF5Xj+z+w= Received: from TS-551.. ([101.229.115.105]) by newxmesmtplogicsvrszc13.qq.com (NewEsmtp) with SMTP id 48289623; Sun, 24 Jul 2022 22:18:02 +0800 X-QQ-mid: xmsmtpt1658672287t2ej74n9e Message-ID: X-QQ-XMAILINFO: MzYTHVlhOHw4ADZUBRIsvqjxotTTCL5nBEFw9NM9N7u+6L1XhJ1NkMndty8/DQ 9b358AqP2Me759huPa6CstyZr9lmQCMHBTFW8LwaL7y69azQhkY7Ow46GtT/B42+ktLWnySbomjG 8o/QVXE+aMMRwlVK9gZcwjEke8cps/lqHQA0GJDZ0n7J6zpTvra7iS1Swnemx45fNA6VUeD9mUaU nnqYwxTN7hS0ZvHG9rdtG0W0GnjbKF/vSpGm5wMebnkB4KoLD3RPMQyGwgaZT9EMWiEbCSbWzeVk p4FX7nkgnqmZ/EEIyirIAoOOsX2MQegqJSzDjBUOzyzXSxgQc81sm5WLo41Yogn15vsyGxWkqdbK CtdCHQwdUARxX17YVZC4ddPXvrS64NAfVFGlXe3eM7XVsnyE+vw8TZn4DIqDgp+OCeQbORg641+L nsZGOUHJxbpP/WooxKCfTzCIZV++rkLXDzbCx3X6TwFIbqXsUNj7MouxjwcwUy4i9OujDp2Z/3DR A150n70Rz38Rz2IruIARXtAieE+kcSfgHKrCprzoaBqqmLPNZKXBh39GcGPXz4rcgVVIqC0h2vTH J4UtNG02nNG+vRSoHqZgshCMJ+9lj7dcw0uKN0koA1VBzcDCzbZ7/2+80tTZnOwOLJ3Kcp9JFONg uxJeGLq5x+1bd2O+gvrAEqjkIbzAYyxiYNUvfht2CamJNIm7/z7uCa5GIqPI7JTFJKGvXmQDv3ur e0La7QWx/bpcz9+nOL2iIjsdtP7eJgtYqTJDXBfPHhO4fdoSmBG/QzauS2ObyG29+XW8lKNq3VOp OoNqdg725GZ5CS2jtCJfhb2M9cfU/ga5Gb7enKkI+fneDq5n/zTmdtsWZRqu8MF6NCcDo2+GvfQt HKQ5VD7+JdWyZqHDoln5Weyq5bOHxNPYq/YgrMHfbWDBMlMpYMffPjGW101J/TSxxpdWTbPr3g From: Zhang Ning To: martin.blumenstingl@googlemail.com, narmstrong@baylibre.com, linux-amlogic@lists.infradead.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, sean@mess.org, devicetree@vger.kernel.org, linux-media@vger.kernel.org Cc: Zhang Ning Subject: [v4 2/4] media: rc: add keymap for MagicBox M16S remote Date: Sun, 24 Jul 2022 22:17:47 +0800 X-OQ-MSGID: <20220724141749.131724-3-zhangn1985@qq.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220724141749.131724-1-zhangn1985@qq.com> References: <20220724141749.131724-1-zhangn1985@qq.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220724_071812_359021_09CFCC86 X-CRM114-Status: GOOD ( 13.00 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org MagicBox M16S Tv box shipped with a simple NEC remote. it has a key labeled "M", used as Magic key in vendor OS. Ths has mapped to KEY_MUTE. Signed-off-by: Zhang Ning --- drivers/media/rc/keymaps/Makefile | 1 + drivers/media/rc/keymaps/rc-magicbox.c | 55 ++++++++++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 57 insertions(+) create mode 100644 drivers/media/rc/keymaps/rc-magicbox.c diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile index f513ff5caf4e..02c1c2150f03 100644 --- a/drivers/media/rc/keymaps/Makefile +++ b/drivers/media/rc/keymaps/Makefile @@ -71,6 +71,7 @@ obj-$(CONFIG_RC_MAP) += \ rc-kworld-plus-tv-analog.o \ rc-leadtek-y04g0051.o \ rc-lme2510.o \ + rc-magicbox.o \ rc-manli.o \ rc-mecool-kiii-pro.o \ rc-mecool-kii-pro.o \ diff --git a/drivers/media/rc/keymaps/rc-magicbox.c b/drivers/media/rc/keymaps/rc-magicbox.c new file mode 100644 index 000000000000..8383fc7b10c3 --- /dev/null +++ b/drivers/media/rc/keymaps/rc-magicbox.c @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: GPL-2.0+ +// +// Copyright (C) 2022 Zhang Ning + +/* + * Keytable for the MagicBox M16S remote control + */ + +#include +#include + + +static struct rc_map_table magicbox[] = { + { 0x9f57, KEY_POWER }, + { 0x9f8a, KEY_MUTE }, // M + + { 0x9f43, KEY_UP }, + { 0x9f0a, KEY_DOWN }, + { 0x9f06, KEY_LEFT }, + { 0x9f0e, KEY_RIGHT }, + { 0x9f02, KEY_OK }, + + { 0x9f47, KEY_HOME }, + { 0x9f4f, KEY_BACK }, + { 0x9f16, KEY_MENU }, + + { 0x9fff, KEY_VOLUMEDOWN }, + { 0x9f5d, KEY_VOLUMEUP }, + +}; + +static struct rc_map_list magicbox_map = { + .map = { + .scan = magicbox, + .size = ARRAY_SIZE(magicbox), + .rc_proto = RC_PROTO_NEC, + .name = RC_MAP_MAGICBOX, + } +}; + +static int __init init_rc_map_magicbox(void) +{ + return rc_map_register(&magicbox_map); +} + +static void __exit exit_rc_map_magicbox(void) +{ + rc_map_unregister(&magicbox_map); +} + +module_init(init_rc_map_magicbox) +module_exit(exit_rc_map_magicbox) + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Zhang Ning "); diff --git a/include/media/rc-map.h b/include/media/rc-map.h index 793b54342dff..656217b8e91b 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h @@ -277,6 +277,7 @@ struct rc_map *rc_map_get(const char *name); #define RC_MAP_KWORLD_PLUS_TV_ANALOG "rc-kworld-plus-tv-analog" #define RC_MAP_LEADTEK_Y04G0051 "rc-leadtek-y04g0051" #define RC_MAP_LME2510 "rc-lme2510" +#define RC_MAP_MAGICBOX "rc-magicbox" #define RC_MAP_MANLI "rc-manli" #define RC_MAP_MECOOL_KII_PRO "rc-mecool-kii-pro" #define RC_MAP_MECOOL_KIII_PRO "rc-mecool-kiii-pro" From patchwork Sun Jul 24 14:17:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhang Ning X-Patchwork-Id: 12927555 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8359ECCA48C for ; Sun, 24 Jul 2022 14:18:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:Subject:Cc:To:From:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qHvya1UHugtad/tyX+PDoUg8pJ4GkTmhMubJ+xKJBJY=; b=LFSxCAROeFcE3R gh6TU3uMsLycagB4Cfm6cmGiq/Rj904CKOV78iNpaQXrQkIS9G96HKJEWrQNPyBQ2YqsJn4ExQHpD JVMOGB1r0e0LNrQ/AfBg3k4yF38PRamcCX9FlhdExA3oVinX+/kOG57YFyyGhEFHvbaCFq90vEizN R3hsmAbLs2rr7795VAn8JQgxnNqZipDH5glbfvcZqEZImSJ+aGxjWYKYJ2cYq+kFnNrG+w4myZe5Q VL/GMH0hi6TuQ2Wv/mT0rdgNnd32m0PuV1toa065bB1RvO0ow0uq/JqAqrbJndOrBtiT/TxzidNDj nC1SnwYBVG9c/+jKWB+A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFcQy-006WK9-IL; Sun, 24 Jul 2022 14:18:16 +0000 Received: from out203-205-221-210.mail.qq.com ([203.205.221.210]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFcQv-006WG0-V8 for linux-amlogic@lists.infradead.org; Sun, 24 Jul 2022 14:18:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1658672291; bh=L1OKzS/6gJdq6B1s+pyUOL8qpdZ4pWPcZwWD57/I7Q0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ogWtgC1fHoaCYZExRntimstLPouBGTTWK04s6zoRsbkl4VAYyCuRj1zDIrylxroxe oFVtAlELowPE7pUAH7PlmqVcWar+r6lngRmHVoulPGWDWv3a5UIBrPkB5R/2jwobZL nSHejgNHPs8pWnzzgjck4Hy1FwIHeo79ifFGmAQk= Received: from TS-551.. ([101.229.115.105]) by newxmesmtplogicsvrszc13.qq.com (NewEsmtp) with SMTP id 48289623; Sun, 24 Jul 2022 22:18:02 +0800 X-QQ-mid: xmsmtpt1658672289t5u02m7fl Message-ID: X-QQ-XMAILINFO: NMGzQWUSIfvT64zCJXMjPgARHr0foPJA9mYz7wPb5fmMtYm91fepmgDW7YJSis 9E8zoe4xjJRKl/91HAF4QpHG5XeTaZR+pJDAJm4ULQ5JPkrrEcp6NLsIY0yXXOIqDfLEhmD7+p27 C/LF5T0kOfpPlHS+whePAp5ejMLykNzEoEFkJsW1wBNgqiF2HuaQff53ehILBwVk5pmJB4qmd6+g O0ftnAtW+JQssKxkKXw5Jz1ShtP0sU+ZXWR+i3mQnWwF4pVDvWI7bNHQR19mvG4Dx7+h8qlxVd7H zDTolJT6Rt7WxEkHOT3GWOlEJV8fbVb7v9DRro1b++RlLlxyo9dKOBOolSWezI3sRSoUmEcplwDG vFG4SRAkw9ldPLwtjeioTnBeKayahBxOVCAz448y12zKjGOmyZuu1jnEeaJOXTUnLRoghSFZhurx 2jYvSe8nKmUaJ5gZXuIhFvFuxzwDAiB9qjvIEXGQ850TOseDlCh5nzhoxHwMbuUqWAKnie+w9bTz tOR2iRz2v+28H0K3IYe1d5sbIdPR5yzc/OMdZcTVSoOkO0vgBfjjnl3yOGiOfZOj6rP3NB+T77Z0 msJublRaybuDDXWOrekTXB10NGiS86JQEUt7rOZubDcNL46/a/SE7eqF8+QWYWXZbutwJH382nZK ZJMaoYZIWpW0T7F37mjIucu41w1cbfokNUiG9j5HubUbmZ42Hib45pxdHYZR5nUOjM1ZdAWuDAUR eYkFBIEqfvPR0UDglnpbkC4owEdFEDSwZSMzDgtF7u0+PSf98X5Ekque6m5GhrmLrn0mpt8XrAuy EWcXz6RtjguQS2/ElWX3Q+PwgP39RvggvlJxKctwbIAfanOKf2Cp6Vy9ha6frqmNGXso/WEnWsNM ifrjToeWUjlsaYEg1yHPk+i7tm/+qOhjGgksPQqA9/0SF78eH9AihGGbZZGP9u/uYIDgRdfU4b0T AKWObXv3mGCuxZaxsnaA== From: Zhang Ning To: martin.blumenstingl@googlemail.com, narmstrong@baylibre.com, linux-amlogic@lists.infradead.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, sean@mess.org, devicetree@vger.kernel.org, linux-media@vger.kernel.org Cc: Zhang Ning Subject: [v4 3/4] dt-bindings: arm: add Magicbox M16S bindings Date: Sun, 24 Jul 2022 22:17:48 +0800 X-OQ-MSGID: <20220724141749.131724-4-zhangn1985@qq.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220724141749.131724-1-zhangn1985@qq.com> References: <20220724141749.131724-1-zhangn1985@qq.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220724_071814_329209_2365E9C3 X-CRM114-Status: UNSURE ( 5.99 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Add the board binding for Magicbox M16S Tv Box Signed-off-by: Zhang Ning --- Documentation/devicetree/bindings/arm/amlogic.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml index 61a6cabb375b..3eac16a4de68 100644 --- a/Documentation/devicetree/bindings/arm/amlogic.yaml +++ b/Documentation/devicetree/bindings/arm/amlogic.yaml @@ -123,6 +123,7 @@ properties: - khadas,vim2 - kingnovel,r-box-pro - libretech,aml-s912-pc + - magicbox,m16s - minix,neo-u9h - nexbox,a1 - tronsmart,vega-s96 From patchwork Sun Jul 24 14:17:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhang Ning X-Patchwork-Id: 12927554 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B3BB0C43334 for ; Sun, 24 Jul 2022 14:18:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:Subject:Cc:To:From:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bw5iZtnEiW75IC4vzh0vib7Lr2GS9j5uZ2cgQJdfuGY=; b=tXdpGznSnhrd3D tARyHjrPB89GhilC4x3D7hqeV4boiEhXrEUn0nME5KsIU4Dxg3Rwnh9lVfoOOZ31Me/PqxVL2aSRj T2/rBQL9fNivFXznEtpS837BHHLI9XbV76b+quA/UbiX6MHXEMPyQZ5ACM/Gn1jP/dhTmJBU6gZNH bcL9ChMpBzEkuBg5H46ZzejsQsW2NrqD3C6qTvSAdMM3qu+Ubhb7YHJb08TOwm0b1y0bq9hIRLWQh r+wPsGFJxQclX6aX+EBiCel+Cc8doBSqv8hrdeRgyA/BhJ1Eo2N3dBqakoRwu/eQ/JhNffgu5nX4U GasogaKU3ziR6GECDYPQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFcR0-006WM9-Sy; Sun, 24 Jul 2022 14:18:18 +0000 Received: from out203-205-251-73.mail.qq.com ([203.205.251.73]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFcQx-006WHD-O6 for linux-amlogic@lists.infradead.org; Sun, 24 Jul 2022 14:18:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1658672293; bh=8aApajzEktIG6Zsp/DJOg+Sx9VlGRE26o0ibiFJZVlI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=i46R+rE1M43YMggNnv90wujLs6bMojaFZ+zpN2ZNSpWrLJlby/FusMGj/LAK7QF6o 7O+haa4p2EJnSuPbyECqnmvSS5Hnen9IAwCSJAsdk+zse2EwTYYl8PMdQSUVw2Uosu CN18kcXkqsdQCPd6Yo1NWMk9+JROoRX+KBppVNSU= Received: from TS-551.. ([101.229.115.105]) by newxmesmtplogicsvrszc13.qq.com (NewEsmtp) with SMTP id 48289623; Sun, 24 Jul 2022 22:18:02 +0800 X-QQ-mid: xmsmtpt1658672291t0r5bgcdz Message-ID: X-QQ-XMAILINFO: M0yQCYO1Pk4BOayfUrq5rfDfRwVDsX5gyYZ0UITeKys8486O1c/KX3YTRKEFYl FMmCJHLLQjR5Yi1+80+pFkILHOR8LKJXZ0jfV8wjHmVK+2LoyYgL3EM2K9E0qxrjJNDIIDJ5Gf4S S5CLAQ9drMbGPX+7/6o5Wv3eXMlqRXIoumkRAiUsnImXLJzy8WBmtN8SC0D84kHqwLqla3IfSwKb TjRjxBL7eIYhGmf3h2N4F0w5L4LqGCWhi7MBVWYg9yo4mmuOXINq/Mx9IihJVq2SKfbJhFdTvqnO Ec1hE8Sb2t6eGl52TatHb0OLcUQj4CGUhHL+D+0JiMJKY9icQp/bfJVRqi7AmL+NHtb6sHTq/AUd 2dZBbx2i0CV3zQv8+Mf4TGBzc0PLu6/xFrV8XA5tRvd0LsZ1LrPmJZrp6aubpB1BeKgXPSz5d0ij VzaPY2HAsPzBFYxzHZyWo1x/xz0XJD9ye25p2FqSE1kaR8ak+VknCtQ3707WRgCY6FSI3FiTs6Yo /4SRQPoZebS6OSaxfvyF9WDuJw7SOB7hDUsnQVtw8YyISQSXe3cDYpQr8rjk2IVQSzAIVVySIxTe Dz8t3v+X2KylceMN+NhqN+AdNrQ2dd3UbJb0YxIHv8/SO5IbofXMJR/X43yilAA092U3hDlKpkw+ vOmo1SLeLD0Y5iltPrSbIkzUnXd/8Cb92TPZOUvzNIaQG9U4w29aWZxBwpaWu0vZcSg9ajo3arIO WjQw4AOSmLsiNOVYDvXjjhXnT/xp/INWEZZFOkhpa8rXCgffymJutI40eesmqStVPIhhRy/57jGV wuO5EjLERnpSF4e3QlKFTr18S8v7LAPS5/ZnzdFxlZu2qCH/NQbXUNt21YVyE8KjKPQOHu4+qNva iIc5S51DmBl0pYnwWRDNYGsDiYM41yA5evovGpPbvt4C1JHGpIqYaJ2eyUpjGKRQ== From: Zhang Ning To: martin.blumenstingl@googlemail.com, narmstrong@baylibre.com, linux-amlogic@lists.infradead.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, sean@mess.org, devicetree@vger.kernel.org, linux-media@vger.kernel.org Cc: Zhang Ning Subject: [v4 4/4] arm64: dts: meson: Add MagicBox M16S support Date: Sun, 24 Jul 2022 22:17:49 +0800 X-OQ-MSGID: <20220724141749.131724-5-zhangn1985@qq.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220724141749.131724-1-zhangn1985@qq.com> References: <20220724141749.131724-1-zhangn1985@qq.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220724_071816_109003_857A8B8E X-CRM114-Status: GOOD ( 11.59 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org MagicBox M16S or MagicBox 3Pro is popular Tv box in China. with spec: - Amlogic S912-H (S912 with dolby and dts) - 2G ddr3 - 16G emmc - Marvell sd8897 BT/wifi module - 100M ethernet - IR reciever - 4K HDMI - AV out - Rest hole - 5V2A power input - white LED it's q201_v1 according u-boot log. and it's almost same as Q201 reference design. add a simple dts to support this Tv box. Signed-off-by: Zhang Ning --- arch/arm64/boot/dts/amlogic/Makefile | 1 + .../dts/amlogic/meson-gxm-magicbox-m16s.dts | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-magicbox-m16s.dts diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile index 8773211df50e..e0907fb41829 100644 --- a/arch/arm64/boot/dts/amlogic/Makefile +++ b/arch/arm64/boot/dts/amlogic/Makefile @@ -44,6 +44,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-nexbox-a95x.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-p212.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-khadas-vim2.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-gxm-magicbox-m16s.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-mecool-kiii-pro.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-minix-neo-u9h.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-nexbox-a1.dtb diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-magicbox-m16s.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-magicbox-m16s.dts new file mode 100644 index 000000000000..69e72687ac9c --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-gxm-magicbox-m16s.dts @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2022 Zhang Ning + */ + +/dts-v1/; + +#include "meson-gxm.dtsi" +#include "meson-gx-p23x-q20x.dtsi" +#include + +/ { + compatible = "magicbox,m16s", "amlogic,s912", "amlogic,meson-gxm"; + model = "MagicBox M16S"; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <100>; + + button-power { + label = "power"; + linux,code = ; + gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>; + }; + }; +}; +ðmac { + phy-mode = "rmii"; + phy-handle = <&internal_phy>; +}; + +&sdio_pwrseq { + reset-gpios = <&gpio GPIODV_2 GPIO_ACTIVE_LOW>; +}; + +&ir { + linux,rc-map-name = "rc-magicbox"; +};