From patchwork Tue Jul 26 13:15:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhang Ning X-Patchwork-Id: 12929279 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 56EBFCCA489 for ; Tue, 26 Jul 2022 13:16:08 +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=OQVJ5WxRP3nDpI+S8aMTN1baZ8ntR4pcsNwy2MqoihU=; b=coPqtN1kmP56mG 5tz/nkdaxxremif8bJ/6S+HpiJ4hS8tVaF2dgqooAk1uxlvPFQK66CCh4g0EFAQfl7qZzQlRmZn1e pDZ63lsFVwFbki6vjJ3OqGCXN0rnCYUoRPCxLiNMZLr15ciV7GcivwCJTIQJy0hGkClBn/iC8HWhX hRy7AI0eiBGIx7jCN5jmO1RqLc5rHnSlcbzgUVloiAmKbvawF/8zya2aia0jlONDFKD89hqP7XpJN jeR0H4InwM4qpKXTZ06Y87Y5hvps7v1S/6jGnlD909qj+FtD9hDxJg5NlcW/IlegkZ3Ot2ZsoKXl8 WqkbhmNel8d4f2F1UhpA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGKPj-00HJ0D-Fp; Tue, 26 Jul 2022 13:15:55 +0000 Received: from out203-205-251-53.mail.qq.com ([203.205.251.53]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGKPg-00HIxY-Ul for linux-amlogic@lists.infradead.org; Tue, 26 Jul 2022 13:15:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1658841346; bh=EWEPpnkJzYXDEouSUCLZ+x2NT/waXn7X2RwOOX3umWM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=WacEwwpNVkwnFKz9wuzWDsrGt5jY2nibIfC04YFljq22rapHvGa/Q6BmD0Vh40Y5y CpjYjleK3QxL8lasvYuvC2KQ4pD6/bGxCJ79oqYu5j4P8FhDJoN4rDoJ6ICyjilM5H X3aCNpPQXItQek2ju3U3/fGj1VicwitXJi73W5YI= Received: from TS-551.. ([101.229.115.99]) by newxmesmtplogicsvrsza8.qq.com (NewEsmtp) with SMTP id 3EA1E4DA; Tue, 26 Jul 2022 21:15:42 +0800 X-QQ-mid: xmsmtpt1658841344tu0101qua Message-ID: X-QQ-XMAILINFO: N4r4IakIsd1kDjW+p75ze0sw0vHSeLWbr+ytB5p0pVyQLIdzXiBSx4BXV9LBWy +MBsXHD3LKTNNIUXvmlTnV73xV6y6DVYs4zfoeW9u0Xb7QuCsHHwVO17s2zWG/5E0B/G6LAMrFmS T6vqQCAV7XXCA4KVb/xbFhc/s67wFIZxKf1TvZ8eu1XYn/ny8YHtTTM5uHJ5wZVwZ+7Ffa4bIJAK 7/9nSY4dO0cyWotod5ra5chMpRb8dGKR8i4+882pNdInvM3bUF9GLEK8RivCetG9qyUu44Hu2UtC ApboAXoQMADC4kSQBbkrxr9x1I+6plV4vQkbn3tVocP6egxHHXluTMWzJgaNm4/xSH5GuQ78TZl2 AXSNQWU3TapcR8DbuBdBptIxzl6OpdZc8NF5emwi7kOi7UzcnoWNTxjLv4KkT2K84X0S9fqZmWeO iSuPidf+YDvVz4AqAyrXHZ6sB3GPZBpqFUW6B1E48x7Vj4FXkNlrFPDdrTd1BGcK6acfUn+aYq47 V8noc5U8sbnqGemNPfJ9kSSZSFxx6UrmN5VjV9kHdw4KLmmjV6w6mFYYgILftzr3y4oocxSr87Q0 s6mo8KLfqlksWvjEww7BAlH6xsGYrS3/ePovwThihUePCw37fnUlHn6qYv1Jfgx7b0+GUQhpsvVZ x2MbuhVhJeFcfu+uO6qKuUNwNpHxqT8U6CDtec1TMHjU8vF6k57ZUL7Htc2KnkPZsa4fumQH14zU UYMIatu1kWRoUDEmUs63F9hUuSMHkpmrJuYXOrNXKZumZQj0q36dGeaHffvS/BUpGtSbIgGlInV1 c/3WZz9ypOI7pPQs+/2egxJr3OtbGfdOjcHoheCjxxjjCv5LmVHvcOUcrPPYEoOIYWs+e+sPlN/b opLZDvXhD3NiAaY5jQHow+Qei3mgd8jcTNVauqbMF7kqEswfa7A98ntfuUV8O5hg== From: Zhang Ning To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, narmstrong@baylibre.com, martin.blumenstingl@googlemail.com, sean@mess.org, linux-amlogic@lists.infradead.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: Zhang Ning Subject: [v6 1/4] dt-bindings: media: rc: add keymap bindings for MagicBox M16S remote Date: Tue, 26 Jul 2022 21:15:20 +0800 X-OQ-MSGID: <20220726131523.140581-2-zhangn1985@qq.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220726131523.140581-1-zhangn1985@qq.com> References: <20220726131523.140581-1-zhangn1985@qq.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220726_061553_311423_1C281F9E X-CRM114-Status: UNSURE ( 6.14 ) 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. 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 Tue Jul 26 13:15:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhang Ning X-Patchwork-Id: 12929277 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 61AD8C43334 for ; Tue, 26 Jul 2022 13:16:07 +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=t5Au4C9I1jvImrdPLCsBl+bw/dyuutuo/Z82BoZu3VQ=; b=kB6Fb/UEAwn6gG ARbJ5L9FKsWG4WGdCsfP2czobd7s5k4APeZkHvBP95ZL3L+aQl2ChktbIbxVSDA0WgC9AUmM20OEn NkVanTJ3mNqR7zy9c1m2lkpcyWPKA7f4W1DF3B43e+Mu2z07z6rykLWCSOIuYj2AOLD+Di/2lm4y/ Oe+QYfdgXmtwjtLUZqIlBmyvi0nRxlh852A+pekIoi/8gzeBYl1LfWZo3BSQ6OaW2conpvWIXpMQ9 WanPPXkVHpd6byEWJ4GNrLsFdxqOOHSiGohW9oPpIF87nWf2KRRlNcyPXyq7GSRyVTFUfdzWOX+gK KuwaZBUUm45TvOSfwXcA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGKPk-00HJ0P-13; Tue, 26 Jul 2022 13:15:56 +0000 Received: from out203-205-251-72.mail.qq.com ([203.205.251.72]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGKPg-00HIy5-PT for linux-amlogic@lists.infradead.org; Tue, 26 Jul 2022 13:15:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1658841348; bh=5geWFKNR9AJ6x3qx++pzhLuWNpfTgGlIuLAIHsGBbVQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=zyUx1sm8vTak3BLEf+KTl3D90EKkmrh6gXQR5pKKES4McNYdPYY9dKIuqAAqVuDv/ xB3XSQDJB1k+/xQ56z0NfSzd0srTZOrwxx/WpGABNYWPRVYwgdu7pxUiyOUQ1RVO9a c5VwESYVLTd8wOcrpa1DlsVvi+AX6UXTz5U0/CMM= Received: from TS-551.. ([101.229.115.99]) by newxmesmtplogicsvrsza8.qq.com (NewEsmtp) with SMTP id 3EA1E4DA; Tue, 26 Jul 2022 21:15:42 +0800 X-QQ-mid: xmsmtpt1658841346t3xi8az24 Message-ID: X-QQ-XMAILINFO: MyHh0PQai9FpTpG3FI1lKjNYjEOZwJnjpla9XEmvmmU1mw/EIHI9NmT6pVmmXR cNrFeVeZAb36XNhH5kNFRAaRxrQRqDTNJ6uyYDDJ7UNuTRK5zpwOR+LINFF8mC5B+JOypDosrQSa JlQZNBW+Ao/kxc4mCIayflaJrPB5QRBaQvvvH0HSXbpxSEUerLubJFNQH8qJnviWRB+XNMkLDV79 5nIgDghgBxY+9kYlACpr0H+J49HE6Mo5c0lM71MDW5Wuq8TwZMpswu82FpOQt5QjWcssqpNsVGmd wuxzboQZcuy25Ustc6hhXtE4jae9nWX03s02StSiK1ahD9vCjJCBsYs0GJOtdl//GfrdYR3jrWW+ v0HN0xiEePOLPVO/BIS14OLoD9ruh5+YFh7Mn+ZRj7O82BTdiRTgTPV7UIy8z6nAQ+h8G/JxsepU juJ3c9WjsCw3iCBi+D4d7UQ2swQXZEialJ2RM287WCxuNylQFJvOfp7mtHAg2gskv1PW+MAZU0Nf p5HjWcJvgQ65ImfA83roQhoPdh4x1mU/GT+EaNAFxmnJXCgjfnwf1Q8C8XcKATfVx3Zk/8OTzRvc U2iNOcrJf7Eu0qJJYYvgBmSMTNxPy/65vpGS9iRmONOJ1E8RAnFNvGm888+sJrieRdiUKoEI6KOb clxU8W/OpYzdvfsdAUdTYPbfyqMDXuOzEX/vUmqKVIBNRVdEQ0sDTXEhoHta37XvBuGwQhbcO1nb ZrE1ZNrz4H7aIk9mYvG3h6mecpqsiI5mo3glVLKHs9vCnkdPSSoKAxznk92TcDIEYvqhHMaPs/pb ISsnLXNTs3bHaMxZhsS6XWxhh6tKqKeobYEQpWpDxQx7qUS+WN5rtykSmZhvFEc0ojs3ag/C0+XQ Xss/DLg2K3j1USNxat4o24hOZJc/Q4E/G6n4rCNvJ7MrsUl0PEfNHOGLLmKVfchg== From: Zhang Ning To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, narmstrong@baylibre.com, martin.blumenstingl@googlemail.com, sean@mess.org, linux-amlogic@lists.infradead.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: Zhang Ning Subject: [v6 2/4] media: rc: add keymap for MagicBox M16S remote Date: Tue, 26 Jul 2022 21:15:21 +0800 X-OQ-MSGID: <20220726131523.140581-3-zhangn1985@qq.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220726131523.140581-1-zhangn1985@qq.com> References: <20220726131523.140581-1-zhangn1985@qq.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220726_061553_171490_8C56FCDF X-CRM114-Status: GOOD ( 13.65 ) 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. Signed-off-by: Zhang Ning Signed-off-by: Sean Young --- drivers/media/rc/keymaps/Makefile | 1 + drivers/media/rc/keymaps/rc-magicbox.c | 58 ++++++++++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 60 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..015767429028 --- /dev/null +++ b/drivers/media/rc/keymaps/rc-magicbox.c @@ -0,0 +1,58 @@ +// 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 }, + + /* + * This key labeled "M" is used as magic key in vendor OS, + * and mapped to KEY_MUTE. + */ + { 0x9f8a, KEY_MUTE }, + + { 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_VOLUMEUP }, + { 0x9f5d, KEY_VOLUMEDOWN }, +}; + +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 Tue Jul 26 13:15:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhang Ning X-Patchwork-Id: 12929281 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 53D92CCA47E for ; Tue, 26 Jul 2022 13:16:08 +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=ykXWHU28HFLp8X EhJJalr1qxRE6LVdM8LgPsyuP7jm2Y7cvaNasYxX4pceW5CjPazvK9WRsKmqQnEREyo4kaBSBLO+p MAzx4kIOb/fvtGZ3Ab5rHJ6lnOEBFAiZWTYMzRdlhmqyTqNAHtkldwga2ZOtnls23+yUg8KJlhhuj MJP+eiqUm/HKS1RQrLzTjWs6TsbMEHknHDoL1fmSCJ/2TGIU7AW+hhZT5cc/fnM8X0Xgadsr5cx0Y 4nhhjISpiYlxf2GqzO1He1qc1HEYHQP1eU7I1bUPNQ1b1SJuJ03v0e75pBlaCrxNS+RtSZR9PM9YF 5MNQugkLJXzo3ngA0RWw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGKPn-00HJ2C-Hk; Tue, 26 Jul 2022 13:15:59 +0000 Received: from out203-205-251-82.mail.qq.com ([203.205.251.82]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGKPi-00HIyK-88 for linux-amlogic@lists.infradead.org; Tue, 26 Jul 2022 13:15:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1658841350; bh=L1OKzS/6gJdq6B1s+pyUOL8qpdZ4pWPcZwWD57/I7Q0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=e/9APrkkTvaNZkDiXLZfPt2xFv+AfaxsouTkK8RWcVzhkYkpdGuATh0cqSfBbMH4+ 7zHej0zx/PNGaUx/bLiJ0eQ40Ug7354BDt70FD8zN/ZZH6KnJ9aMBxTII65FU2I4/G uv68MgVPdJwgFaQcZsRxq6gO1snyVSyhZpIqB/QU= Received: from TS-551.. ([101.229.115.99]) by newxmesmtplogicsvrsza8.qq.com (NewEsmtp) with SMTP id 3EA1E4DA; Tue, 26 Jul 2022 21:15:42 +0800 X-QQ-mid: xmsmtpt1658841348ta7zqzl3y Message-ID: X-QQ-XMAILINFO: MmPNY57tR1XncDXGozBu7nckUOHsBH/EavIJZnqZtUD/lfbmEekVUwxuXdIE+P zVu5gKoDIcH/n5io/unx3LtJ2C9oaEy8EKiQKAUY/mPevRZ1gT7W4Eai9iF01Pe/5SgEbGRCxZBA iFe3Xzgqr7Y9PuPFhlmewe/rL+DmNUSQaYRMiU0d13bgZHDpO2JU9facqiId0sm3wLQyfhwNwxGK 0smsMrhPXeMB62eCsQOZ+X86J5BznUvVEPlol9l64iygOxBuOcEkIZzZkFCt84SkGeOKGDanEbSm jNvG9lJU0ulFV44lRmzjqGM1sGLkukWsuqGaYM1873MmRpRuBfTCTL8IK8xRiPpvNbf37f+voeAc PsltSwadlVk0GZoou5L9SHzEgTG2g0ywAKPiUcCND/tLJo74FbSbQpoblEJwjgo2SEaVTnuEDMPz xbB3zvtpd2heQVT/zA1vb2VjLHYYsB3uOaG8JzeAL2EsTfs0US/SuNYaux/maZPPoGpF1GKnTl5H T++iFskvh1gNqhlmV41mdJcHchzWIMNle8au4DshWwxITJ0XyEcMMc+sWfqKTtXEBVQKLhxwpLg5 ntLmBjqPidxgsByuI2ncgQY8dqmA6CUKRatkliWLgKbd0U4S0FQB7n0wG2KMscSMbHpMrQ5EfmOE bKoLuGOkqtQxo6nu3DiLcZFABWIDtZKn2h3NthQ9qcOiHCoYY9iqm4thlITUyiXSFgKBZtPjJLVg XwXOIAhDWw6CXe7XqQ/w1kzyh4JWcJ6zF6OioTKxR31WfmeJmP8BxKmZCuEtpElud0HjCUrq50Rx N8/Xsg8LHYEeH8r5NIsovplkwuf1PGTKAAhKL5CTXoaQWr/kqoChZ2Lekc4nDQ3aYHzbHTmPOCqU PZyZtuWv/HC86DzGnrQfsWX/r65tmbBF4UoTiQ7MHA27OTMGnFjWL46dbi2+15AA== From: Zhang Ning To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, narmstrong@baylibre.com, martin.blumenstingl@googlemail.com, sean@mess.org, linux-amlogic@lists.infradead.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: Zhang Ning Subject: [v6 3/4] dt-bindings: arm: amlogic: add MagicBox M16S bindings Date: Tue, 26 Jul 2022 21:15:22 +0800 X-OQ-MSGID: <20220726131523.140581-4-zhangn1985@qq.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220726131523.140581-1-zhangn1985@qq.com> References: <20220726131523.140581-1-zhangn1985@qq.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220726_061554_656106_6B62BE78 X-CRM114-Status: UNSURE ( 6.28 ) 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 Tue Jul 26 13:15:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhang Ning X-Patchwork-Id: 12929280 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 9CC93CCA48F for ; Tue, 26 Jul 2022 13:16:08 +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=SbcO9mLin6e7PjDnYTgj6OZfQbL0pclCjtWutsfNvfA=; b=1V/ozDUpTAVRZZ 7rt098UXxbEukUe1u4MT9XfbOyHUQQSydlUqiXbpwSdUM2qb3yMTdyu7dSGxng/CaE3t/ux639bkM iV2T/owEU+S4RieiVG1Z2wbP4ZatU28lUC+uv/zg37xicURzPOhoay/trjhm9SlAoXyDeJJ8TNfWe 9/xaVb3YT5GpmmJivUVenMgI82LZXYiMTE2U6CjxT41NcFWCqIAgQqc/RNpBuHlSfHZ67gRphnhvE IpUAiLGEPQUi972LHImCrb5Pl2DRfB4jTB8VF+rkSJLfDiUCmn3+PxPjMVF7dsQrY/beh5B5d+2SS vRu2qfPG3kP9QCmEWX6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGKPo-00HJ2d-8K; Tue, 26 Jul 2022 13:16:00 +0000 Received: from out203-205-251-82.mail.qq.com ([203.205.251.82]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGKPi-00HIyi-87 for linux-amlogic@lists.infradead.org; Tue, 26 Jul 2022 13:15:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1658841352; bh=Ay3uGCdj6UXBUBlX0YszGUrHgL/M41qJVH3zomvxdkE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=uR/CVcHLmwE0qukIFVO/bg5QlN9cqH26rp+WAo00xbLZIhcka0enqeoA8IWbkTSsx 8a4Tt7cBC39wVh22LGPp9oEdJ0P4Dxej8dMiSR4NCOSGpbd2BfFyIIw3g34erF94RM XUWhRMvQW5G3HU7ykPXnlyuL2OHjPRXgD7ow9jSo= Received: from TS-551.. ([101.229.115.99]) by newxmesmtplogicsvrsza8.qq.com (NewEsmtp) with SMTP id 3EA1E4DA; Tue, 26 Jul 2022 21:15:42 +0800 X-QQ-mid: xmsmtpt1658841350td02hp0ix Message-ID: X-QQ-XMAILINFO: MyIXMys/8kCtRE6wXnMXRvfCgYPmk+nx31mr2g5WgCbDD+u5e2a144Tc56yfAz SEUDKDj/glL7LjGIjCd4hZg8DMl36KOv74KO9d42PNdeabfdXCKnE9zBhBsuXZ4I4M+QayqVxh1y tTcGI3EGJpI19vRop3YaD0UeCUtQ2OoNvKS/FGgZq69cBhNdsbafnPbprGb4kjylsnmwnOXQkkz1 A/gm7GaWA57kVaRUse2Ua4cv4bD0cUO776YdpBfgp9zPh6X7dpyVGsDJbtZOHhitZOykgHWOyVQ0 gEbERuUoeuiwwn/esW0boUYZmO7OKuSfWVLUWbR/wZ4NSxza0Cr6BMEsDbqhmWU5pbgzZVzuwiyJ 0fr+mLNoRu/0x5SezVM2wLxJYQ6kVQIPm4esJxUI5QpYMHglmLL2IO95DChWSG/sltE9mVbHULzZ ftwiJRP/E+giRpOIgOxK+ecmikHSVsAxC3PE9AzK1258PUhThSF5fTC3dctVFgTtqwh12Rkn2Tup LWYlHt5ppUPhQh3z+Z0D1VBa3+HddnWtS+sg8dNOC4e3vC7pk6OdLXo2fkHHXiZcR4x9LwTpv5lR X/sYse3LY8PnWWHFUxmTit2A9bGNR0Q70eUFfzLhoaBWKLmrJJpXJ2sDOjH5rSjB2RSoJrjwhOpk 8Q85AI5XydiNY1dWJ3vx2lDAu0eXnVrtLfOd/EdwqCwYedcE9/00IcXcNYN+FtR6Nha3EG8OvrBI lmhnr6FmIN4ZhyNbyQGgE9GRO5dMIBZb0mUVY4oEuDprmP3wEThwe8DU9gZORc5emd4069pmlcVp DarzoW5AP8sft1nEXb0+4Lu2XZOllKI0RZiqLpMGMnDes4kqHYGaRt8UEOerRhFUsTdHRx8wPE1v 7ytIaRTfpSqOgdcJmphoF6RKfv4vsPwkN4zyyMdQEO1y4MOVrbgxXgYrcp2eis1UZT0hQHsfpClP +O3N9IfpDBipQACFATkKekCdw5uZs7W4wv9FakO40= From: Zhang Ning To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, narmstrong@baylibre.com, martin.blumenstingl@googlemail.com, sean@mess.org, linux-amlogic@lists.infradead.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: Zhang Ning Subject: [v6 4/4] arm64: dts: meson: Add MagicBox M16S support Date: Tue, 26 Jul 2022 21:15:23 +0800 X-OQ-MSGID: <20220726131523.140581-5-zhangn1985@qq.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220726131523.140581-1-zhangn1985@qq.com> References: <20220726131523.140581-1-zhangn1985@qq.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220726_061554_651197_34E5A611 X-CRM114-Status: GOOD ( 11.86 ) 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 | 39 +++++++++++++++++++ 2 files changed, 40 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..f1805115b177 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-gxm-magicbox-m16s.dts @@ -0,0 +1,39 @@ +// 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 { + compatible = "gpio-keys-polled"; + poll-interval = <100>; + + key-power { + label = "power"; + linux,code = ; + gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>; + }; + }; +}; + +ðmac { + phy-mode = "rmii"; + phy-handle = <&internal_phy>; +}; + +&ir { + linux,rc-map-name = "rc-magicbox"; +}; + +&sdio_pwrseq { + reset-gpios = <&gpio GPIODV_2 GPIO_ACTIVE_LOW>; +};