From patchwork Tue Jul 26 14:36: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: 12929383 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 35A1CC19F29 for ; Tue, 26 Jul 2022 14:37:24 +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=BF0RcEZfFd+UcQ cX7jENFHZow2odzG2SPTD8g5toaUfdILTL2NA5Z8L+bHYtuvljnMrzY3NXyEk9LuPWIT7rSyBssfG slPH6PjfrYLxby2hrAT6F5M2141UxgdxwOeePtih1w1rJM6YLSS+xkGyZAH5ZvHvQfSKnxahFMX5g fX7mHK+ANBJS2+kMopvwQpSy4e6kyor6eVdTMx2etkqrDW+vHFDgBLRRXQa0Hh3P8nM6zt/WP9qRU PLhZ7KfD5031wjNM4+l2Vj6cjLJMIhjIzGCdAUBpq0X+phABA3zaCtPQRZ76qy2U0CSFkB8NhHQ42 zlf36PliCoRRDBiY/s2A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGLgO-000Gx2-Dr; Tue, 26 Jul 2022 14:37:12 +0000 Received: from out203-205-251-27.mail.qq.com ([203.205.251.27]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGLgK-000GtY-Uo for linux-amlogic@lists.infradead.org; Tue, 26 Jul 2022 14:37:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1658846224; bh=EWEPpnkJzYXDEouSUCLZ+x2NT/waXn7X2RwOOX3umWM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=GAz+lI0iqM7cuU0gd/63bkH29WH+xh/LlSJo5Dk0NGAyczQgX2H5Q5GAFGdEVitlb 2LLnoOQ8rBC+UTQL6MPIYIWuC3/+7mhM+3O6tshYcfgA0NIGOxgEvYcJvSd1uapAbi G0VApbf3lraL/+pFDVqzat+NHGJD0+aTTRLOBO/Y= Received: from TS-551.. ([101.229.115.99]) by newxmesmtplogicsvrsza35.qq.com (NewEsmtp) with SMTP id 940102AA; Tue, 26 Jul 2022 22:37:00 +0800 X-QQ-mid: xmsmtpt1658846222tpjjjskf9 Message-ID: X-QQ-XMAILINFO: OYji31yNgomx/qW7SQirxwqmJ5Gz2Lbwucqzu57tvmYBg5nq53GAvsOk4mdpU3 w4whRCNP/kPmMOby3tY4hN49Mpbgh3hHW616RlrfL+a10Fr2nl33fvUm8FfviryoWMjWToFkHm3s v7bpirNL4GvE++NLFskj+zdX70BwiMDyV/muKpzY7J63qVTH9ewAS3G9IJiF062qetwSnsQM0f+Z oBCcIhkAQOT4HsnHp/cOwj2N54TcFF3yfedKiq+VxiopesHmopE2qfirTLBexRObiGe3DlHdLTIL UttkGtVMk50PnxQQbz1t5Vq0LluY+wn1zKlrT7bmPJiUFm1o7c1FEqQ4UMENQuQJ5Q9jUrVvcEA2 24ydf4++Bo9UzXVFShF2Xpn3W+7kYAF9xnJgH72qoy1odIDYlKmT+xwQmHZL/TqKBwzp1dVbAgm6 ML6XJ5znCmNWChcZSQ0+DD2a7FNAp+wteXimN4glXsLB3+2qKPfvnkM/8arCNWcFiv0tZJLNfkOP ce2EePjpLpFHdA6Ugb8JEq7AsOsYopwcJqM2Rqf3prJBbq9irZThAouC6zN0/PkRJQpmjDfTOSYT FrWbGXMQZdvdiShYCV0JuEPiLiX+cWB+H4DHECq8OIKkc3/fRXejfryL1hEzApKUFKzdkpjDl9Tl bRsi64I46eMYGD8FKscm71ig8FceKPAX2SYIG4x8W42OY4Q4+Hh8eCEFfHPpjtO16X0jiCveuDrz mJrAPsThqe5d9debjSGwRzZoDILw3uZMgdfW+bKMiX8GvazYxLTOQYTsuK8sFESiVCIXuyrddG6J kIddCPZFwgoOJcsmTk09iHxpcnh/S2OhSSGvdTHZo0Bm26T7LR9SL4orM+0LmeisKBc0wDELhNE3 7Q3W0ToQPRpwz62kIT8gQhE36wl9cLawcToGRnEBMzAOtapmEtG98ZYCUbXAJTLVZgZwDKmmdM From: Zhang Ning To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, narmstrong@baylibre.com, martin.blumenstingl@googlemail.com, sean@mess.org, christianshewitt@gmail.com, linux-amlogic@lists.infradead.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: Zhang Ning Subject: [v7 1/4] dt-bindings: media: rc: add keymap bindings for MagicBox M16S remote Date: Tue, 26 Jul 2022 22:36:46 +0800 X-OQ-MSGID: <20220726143649.142574-2-zhangn1985@qq.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220726143649.142574-1-zhangn1985@qq.com> References: <20220726143649.142574-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_073709_312571_23BE67AB 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 14:36: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: 12929385 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 359E0C19F28 for ; Tue, 26 Jul 2022 14:37:24 +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=Q18+cfuf3dZFw7heC0sEyfet93Z8Nf/peui9xr8rvmk=; b=KaNuq0Dnh7AFrj 8MR+IV2nLTAj9cW5Wm8gEv6CS1NH8hooqxnKXAzh90zU5VMmVUGg7XfcWTQiksbVBBkyjTLwgFGMd D/8r2PdPTS7g0Gt3h4qPXo7ekL18/eM0lJHyzXENtuAOwPGiOpF8L3A0B6jWK8LWn0v5j9wEHv6Ri MbiXJ+/QUam1A+//FT1WG9uGlLLK5oqhUj/uhJ14YLrUQqESiTrzCjE4hLFrYSPOQlq8L6EYaH+v8 vQb1J3ZIIrt2qFc7+DGZQRhvHz+oemmi+uFKq5K5x+GN/a5DHD36IqiT6kR48hv31YCASCHp2Sdyk u1gj/89HadvoDksxFx2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGLgP-000Gxy-Nf; Tue, 26 Jul 2022 14:37:13 +0000 Received: from out203-205-251-66.mail.qq.com ([203.205.251.66]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGLgL-000GuK-Fu for linux-amlogic@lists.infradead.org; Tue, 26 Jul 2022 14:37:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1658846226; bh=n+2zwg2mfAc6w5NGzL5Tt7QCkWYembSPh6trcGb1UsQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=y8qnz8P2sRQK2nKWwbFA0s0y50ZYmH+eLx7gob2qVonfBR6ZvCv6isJgLcxNopyQW RQFeqNbTtnDx+geiPp+tFzNHfSNDdYaayxQdnffPYXwMNzjgYhUn1ww7iva1Iw7DYD QQFHfzzI1bFnc1aT5AkiQ8I2mZ2gf+J13l2kz+do= Received: from TS-551.. ([101.229.115.99]) by newxmesmtplogicsvrsza35.qq.com (NewEsmtp) with SMTP id 940102AA; Tue, 26 Jul 2022 22:37:00 +0800 X-QQ-mid: xmsmtpt1658846224t7e82lufb Message-ID: X-QQ-XMAILINFO: NkHKfw09D6j80DVVCKg9tfd8cDK2rVIzJozayXGfT7vLIJfl1PppYtKQKMYbWb 2Nk44TnbbVsU0OVZ6d5Rjvsv6taBna42mEomTO7Bu77vV36sGw+NE3HaV4uBksIPsmElBvx2ss2R iOlwaX6Tat82RX4F94ZymYuV6FHS1lzYWOxQXqZXCoaeVd0X+N52Cbycr+e4rLWSx7tAII1lyH9n IgYYeKBVaOk/6UAxWkJa9UG8R3o2KDlWmrwdtZsRhv1w+Tm1igfa4T2358TMRA4m2/eVY45SoBB2 1E19g3A4X/l6mAdmN6icQg8jYbGLO4YdmZ0ZusMfL8op/iO5hZBzYnxO+dpJcMUKzdf9/Fw0kg+3 s41c9wGROQlnzoxqrHXFgwH1vDBJAjEzMxodDeuysno3+3kQhjOTRNWkdohcnqQ0sgpqRv0UlQdq Xjq8JgG5l/Qhi+vxdRHiL3Iubs49atzNeoBNHLbiCE/g8o9BRpL0MEjhmcLN6FtnPeynLsDIFCKi mg5gWmOmSmgJaD5xpC2J936Y8Odu6dgdjFsGgeTtOFSGqsjw+Y5m5fH0XnWecovOiExz+dvGO+9f aPksPqlXcjtVW9VnUDNIBgs1plttSgLSZq551cPCdznlOt07ikNH6u2tOakV1/KK0hDGKtuju+O4 4wDqpoiDo73jcMCjnO+oKBuwoZETrOdV1t5WtkxuPm1f6QYFfOLx+BQEqdMk3rqf+VOsDNBktNd2 98c6aO8bBQ12mj4dFiLBBBYyFo0ISGutwIU47+aopH5/Ictxb2xKdwO5D5u1OdMUXRQFDysi7tMf 3+dx0oKkQMtje6M8nHEGX2xwPsS8vT+eTvh7iALfPRfLt710rNAvkX5PIFi6bRNAhApB5Eya8UMT Ot9Whh+MQTie9MA+ynNDOdRUmT4CMl/hR6pa4WBvr45bRs+sJTGNR83WJ0YrMcWH1RfDTzu8c8yF hu4dZRcwGgPP57EiwSrokwzN23ls+ebTve9QqqBRY= From: Zhang Ning To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, narmstrong@baylibre.com, martin.blumenstingl@googlemail.com, sean@mess.org, christianshewitt@gmail.com, linux-amlogic@lists.infradead.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: Zhang Ning Subject: [v7 2/4] media: rc: add keymap for MagicBox M16S remote Date: Tue, 26 Jul 2022 22:36:47 +0800 X-OQ-MSGID: <20220726143649.142574-3-zhangn1985@qq.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220726143649.142574-1-zhangn1985@qq.com> References: <20220726143649.142574-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_073709_857981_BD95E515 X-CRM114-Status: GOOD ( 13.75 ) 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..a1d9ff30d051 --- /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 14:36: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: 12929382 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 1B30AC3F6B0 for ; Tue, 26 Jul 2022 14:37:24 +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=Oeg/Xl2zD8hXrbjqhqKobp++VN51SL8xaz6I+Q403gA=; b=cnCZBP7HTDdcU2 tcnyeJHQOXtf4qW1gz48tP4O2jDFehwv1XE9n14q20Wgu5AQrg+GhOB1/AkWDv17wzY7oQ39Hq7G2 ZrgIENlqG4rn9qyxZel5rCz2WKeNHLeHfCfbhhN4hSjCi3c+EEtexSuuW1aHhdjpW1LWnLnZNAO1r 48HnvkgALNokK5gmy9O6u8kdoVk77DqOHAiy/zL5HIe4pJhBKERFemQiJzpVbBnpg3lNMiXLU5/VF hXRCCFOlA7fvxsS0iUqcE4Xjm9jWvhcT9TAPycu5a8K5BflZpOYHmNylr2UW3j7Fw4sR4UgRxiXbd pWHXS5TZYzzf5wXxKNQA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGLgP-000Gxl-CU; Tue, 26 Jul 2022 14:37:13 +0000 Received: from out203-205-251-27.mail.qq.com ([203.205.251.27]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGLgL-000Guf-Pa for linux-amlogic@lists.infradead.org; Tue, 26 Jul 2022 14:37:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1658846228; bh=SDiTUsa49Kj+XWBRd5vY//cGbS8xbDMXURqlfRjB/pY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=X5x99KAiSgWrLRjrpn9RbhS3UcD2Cb9Dj5WTxT/Oknn+YBQ9Biu1sghpY/JAMmUZg GXvZfS2sHXbQ14Lw5a9QykiHT4mLGCuq0zuEZY3jz+JZk91FBiIzH/nNiLzHwuimZw n/IMmk4U2W5ZrPTUBZLJ2yaL8RO91VRCo9QjMhOI= Received: from TS-551.. ([101.229.115.99]) by newxmesmtplogicsvrsza35.qq.com (NewEsmtp) with SMTP id 940102AA; Tue, 26 Jul 2022 22:37:00 +0800 X-QQ-mid: xmsmtpt1658846226t4fvze76i Message-ID: X-QQ-XMAILINFO: M0yQCYO1Pk4B0TAKbVJqW4q58eSO8o5dOEIc+8UMgV+tN9UrNI+ckkf207QCxu 071YN2zqXmefRqAG3eDnyiJWg9PQpPamqKVIpSuCsbo320M86x0EJ1jHPPfhyRDdKNjPekAA/gP5 CB6+j2v69V9dOVRarp2wHgmmnoUHiPXXhfwsYjOOwBAN0pKb62AfwFIq4nRwllto/84ojTDVos32 WY2MH10uocjmUghpEEb+1U2DnWgmgYr7M+Jq6xn0y1w0jnf559iu3PP6m0/N6v++oBegmHnbC3i2 VAB2B5hXK0TBbrFMpUhH9QnsVqVHmmd8Ra3AbT8P+cXAwuSgTpO6Sq8R9xS1LneSPd8fly0QKSp8 h/kcIK/kzD5iTmiNMtyFvRGKKipy8zyVcH25xySqeZahq25szf2B//LeImBCnp0jtzgAdg36P32r sgLtixcQ5qd2TSaXFPlimYz1CfZtGtzhxpF530nXKkO0KYW1acmsbnwFZwInasMIvXgqBE2rH7+H s6jXPo0Vy0ArIsj7JAFJeOHXRA5lEt6Ay2U5Wyt1Z4hDFDLP7Hc2Q5aqVJqsxHNdsZ4Y6AdMPyh5 2uSbwwmBa0Ak3e7BRv5mW+tsdf7JxxKcSu6CUr2qMTeRc087JVxkPSWNyRKOQaIcp0yXMvRQljh2 D9jMolret7IsaGP3reSlBmZQSAvJHzO8kkUcy2dXoFB1Kq0+ScOp17A3uU7PzvuXeXaudw76tlmF 7UB/Qanvznm1jP9UHNWEyQi5wLh0WSOEy2KuZXb0+iimJDrPKNCPFl9xCYa+EtqTfc/rbh1eYrX0 G8sr6a9VhRMR0/1nBSEGjC+3ko9bpJja+tedBoUqXQRGXNm8kEGCoYmHJGJo+YWwUx5qzkwnfx2v AFhZPTsrDZc2FurPe03Ezz81YWbxV4SIZMStyWzSJKyBN4WbOb/7+Oyh8xDgYSCfQkohpXAftj4I pL7P9Wu14= From: Zhang Ning To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, narmstrong@baylibre.com, martin.blumenstingl@googlemail.com, sean@mess.org, christianshewitt@gmail.com, linux-amlogic@lists.infradead.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: Zhang Ning Subject: [v7 3/4] dt-bindings: arm: amlogic: add MagicBox M16S bindings Date: Tue, 26 Jul 2022 22:36:48 +0800 X-OQ-MSGID: <20220726143649.142574-4-zhangn1985@qq.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220726143649.142574-1-zhangn1985@qq.com> References: <20220726143649.142574-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_073710_145595_F6342E17 X-CRM114-Status: UNSURE ( 6.50 ) 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 manufactor bindings for Tmall Add the board bindings for Magicbox M16S Tv Box Signed-off-by: Zhang Ning Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/arm/amlogic.yaml | 1 + Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml index 61a6cabb375b..a67af2adf6a5 100644 --- a/Documentation/devicetree/bindings/arm/amlogic.yaml +++ b/Documentation/devicetree/bindings/arm/amlogic.yaml @@ -125,6 +125,7 @@ properties: - libretech,aml-s912-pc - minix,neo-u9h - nexbox,a1 + - tmall,magicbox-m16s - tronsmart,vega-s96 - videostrong,gxm-kiii-pro - wetek,core2 diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 0496773a3c4d..a06477405963 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -1271,6 +1271,8 @@ patternProperties: description: Tianma Micro-electronics Co., Ltd. "^tlm,.*": description: Trusted Logic Mobility + "^tmall,.*": + description: Alibaba Tmall "^tmt,.*": description: Tecon Microprocessor Technologies, LLC. "^topeet,.*": From patchwork Tue Jul 26 14:36: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: 12929384 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 12676C00144 for ; Tue, 26 Jul 2022 14:37:24 +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=kXAlqLL6JSx99G/cj788TjsQ4nJWLYSnmbLn/cWQunw=; b=gB8r66O1dpZ0EH e5WRu/fpKQ9LOvJNU72r1w7tLJCPwiygF+2uwBD+SG0tr0SAA/gxSNU6EumHBWup/SPfqgiJ78Wfs Zh9J/gddxAwyvISmo8NSNJ2URxUXLWVBgMlpvCtnwnVcYvuXPGyiaj7Yu8cpIoagdHTqDLSW7i9ie YqLQiFp3Gtcj+37ocwAkVdz6JnWZCn22CcXAAfACLd5sxYbPbZmkgS2fAidZj9HnmCmgbP+1wVKzF v06prE8NBYFD1mJM1wYGn7N55kP+32/WoPfkdI8VcNmxjHOCHpfw8vrnai6taRyL2Oi2J2en7sxS2 UQDhIYyzMYziiiBxCwUA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGLgR-000Gz5-Ex; Tue, 26 Jul 2022 14:37:15 +0000 Received: from out203-205-251-60.mail.qq.com ([203.205.251.60]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGLgO-000Gw7-0w for linux-amlogic@lists.infradead.org; Tue, 26 Jul 2022 14:37:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1658846230; bh=VxkGhbXjGf37LnI7x26RsBh80K+FEHVEbibSo7zm8cI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=yJGnmzkeSAK0ZLvzPBgNVyjHkLRrUdH7Qn9OrrKJ4dwpsEcFKTJf4KGfcXJuFqGwK 8rNu+KxisAThLZYjZfj6ecQhNwYQEFxhyF0bmNwoNX9DFIV14/q8Qn7ozM2wg/2nW/ lYsK6CZqGRrNYaXbSvZ6+1ZHYwqHbjoCI0plZnc8= Received: from TS-551.. ([101.229.115.99]) by newxmesmtplogicsvrsza35.qq.com (NewEsmtp) with SMTP id 940102AA; Tue, 26 Jul 2022 22:37:00 +0800 X-QQ-mid: xmsmtpt1658846227tk4yqb6fo Message-ID: X-QQ-XMAILINFO: MB5+LsFw85Nos30XMnk6Jb63+VT5ZFymwx5Q//fj4kWrLODFvjX0PoV2LHK8ef ppjO0/t95Xv1Nl1gs6ErWm+W+V87rAsm05QGgCt66FnHwI2DiM4Pw/pHiZHKOte7i7a33wsZEo6p gUCUuLgCB/wS69A3kxEt/dEPmB02n0COvad/6UFFhkOwn+w0g2FSCRDubc6lTVHpMv85hJwwg/40 mRSfiEkh0vFCdy0HCV/sMHMNaaZPM+WaLsSDnqON++mIy/RQ7+Jxaz98oDxA2kyYoiUIbkof1j4Z fetFYQurnGnZueYO+5QG0Htl6Hm4hbYmKrlvpRxIqTMmUZ1RkZiEs9n8wcjt9MfWvAOPeBkixXFX fqptl/HJPVjpSzX8PXJGYvykyBJzKcnyoVW7gcFZdHoI9bTDITh8E56e86jaHkbOj4A+ajRYhTtn z0e4J5ka/elI0LTA7pqoMa032PP82JWBjRhlLILBWKFlaKFvkXSuDnwf0bx3k5Bv1W7r45nHlGPz tmqr2j/VwpO/2horBs14RHGuMrtur4uhRoO7bNGlpfyMrNHqhFhJohmqRzPn3PMqTl8yBm/lv/vG PhGEYVrLOzpKx2aATjER4A2FbDv201I3eHg7B+4qbUDaQkgKXgPIIXL++fCllO//pKgj9ufG2l7r 2h/+ze+6ZTUbOc+G+hPnfF13EbJA6ThG7U1lWQuqUdnWMpdScLd48A1uJaS0NN7hS7kdmWb+6xrf NSvwx0qnQlzmrNN5xiqXDw+kyuR5QCNF6leGzdRyt4k8LNw0sdxJeyvycg7fWj5itj16GTty4Qn+ cA0wBIpLZB7KGYomWrVNY+T0+Fc6IvIMGXtpsHW4GBPDet0lYglSwruDB0SKv05bmrWYljoIjf6B b8Zkf5Lr/N4K2gLaVZBhZfQ99S+ADv+AJstRImDhuh9/W4gh1R8hNZlHssKF/e0afvPOW1ohe5 From: Zhang Ning To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, narmstrong@baylibre.com, martin.blumenstingl@googlemail.com, sean@mess.org, christianshewitt@gmail.com, linux-amlogic@lists.infradead.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: Zhang Ning Subject: [v7 4/4] arm64: dts: meson: Add MagicBox M16S support Date: Tue, 26 Jul 2022 22:36:49 +0800 X-OQ-MSGID: <20220726143649.142574-5-zhangn1985@qq.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220726143649.142574-1-zhangn1985@qq.com> References: <20220726143649.142574-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_073712_394688_FD76C5DA 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 receiver - 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..5ec905b90d87 --- /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 = "tmall,magicbox-m16s", "amlogic,s912", "amlogic,meson-gxm"; + model = "Tmall 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>; +};