From patchwork Sun Jul 24 23:17:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhang Ning X-Patchwork-Id: 12927657 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 8E078CCA47C for ; Sun, 24 Jul 2022 23:17:50 +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=kZFqFb99cY/CsX8wugRHI5F8/KsahnIHZpnTo4oLQok=; b=bMhGUPRGFxFAHD nVnvAiI+wvkrMrf8hBaRNiC2oArH+/ij1WcG9hYUgt9or85UQSDejLx1KdbOwYk3p1j/yZZw3B2Kg bxAy8wrJ+VBRZRmWu0MsVV8Ks9CyLacUfq50furdsklaISPEtUPGuafhqDdtq57Kz8Ul6kjqZC7kv uX1xgVVQ2vTkGoA7pYHpneIxf0FHnbU7pGG1NeaftM/oQF72gYxcpFjNxZsRR1nez8v7nY/9HKTTY qrF8PYVLkzh9F9bwSEVqsgx1+SQE3WdN4xj3ghFVfxt8dOA0b/aOz0cip0YUXjD9jWeFpxoMxsxBj TZHthtI1fZU0Jgz+vZaQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFkqn-00G797-Bo; Sun, 24 Jul 2022 23:17:29 +0000 Received: from out203-205-221-242.mail.qq.com ([203.205.221.242]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFkqk-00G74C-7P for linux-amlogic@lists.infradead.org; Sun, 24 Jul 2022 23:17:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1658704635; bh=J39Z1mCOc1zgflRoXQ1Oqew0bOU1Y6ajn8bnBVdrdx8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=xJKrXC/WRv38X9OF6X3Ou61RB1wpjrIkpXFoZirkUFf6CAjJeB+ennKBc+jfe1cHK FsWYQ4ZhraudDCrl+hQcNVG4Xo7S4MMF9Xkn89twyq80ucf6lm7ShtKDuoxJcwNCkk O2MwZXsPfkq+K7h2k21G32k24LCsQB5zT9A+gl0U= Received: from TS-551.. ([101.229.115.99]) by newxmesmtplogicsvrsza5.qq.com (NewEsmtp) with SMTP id 44B2EEC3; Mon, 25 Jul 2022 07:17:11 +0800 X-QQ-mid: xmsmtpt1658704633ta4h90ky8 Message-ID: X-QQ-XMAILINFO: MR/iVh5QLeieS78pybFYrF+3ZbhuzDKohQMS1yIneQoknP595g5qCnlN6rHZow +rvzWKx5P+KifTVv2RUsrtuPgX9Jo4QtnDu2Rg/T3/TYjvA3H70+1AcHaDDoKVyd+C89oZLiNuyn XAOJuIyz/UeEKU37a/jygNXJC7VJFbtmCK9Vy8FIRACR9f1PptALxeUAUwL96a7jua0frg4EMVYX zQxGZCGhWTKQR8bt0dP8nSCS9ixXK5A/pyoYR1dILZiOVXQIvZBmKL2J24xxjFHNkZXEyKjMUb49 ioc/1bJVp23TpiN72foE40/flfv8GBg2U/xr4CDHJZsmlRF+tCoOE0uyg+wZgB0/1f75336i0rVG GA2CzRbRTEaKYWO9W+W7a+GMYTQRXJq6/c6iu9HB3CoW8gfwq3tshFMijN2kOBIlltQoFrq/IlDz UtaXLsy9J0AeL4SeldQ8CkX8lb2C3gYwGPUTlP0GdhWeUIbdG61BiIC0+fz9t7mZwgK0fcV5GCB+ zoJSNYcbVQ+HDczS0mdX6NR0W7VGIjmc7cZmUuxFGYGCq93cguWvKprOGiWRW67MejWZLImi7SUK VQA7KnF72XdXZBCAq+DN07+X4l4naPdeuKYytBT23BwnuoYSsFh+5JQapc6qUrd3zQeU83cTao7n kk9mY6eE5d6vkN22oGcgRM0o0eOFJXoWJKYDa+keE+tOZhOfL/it+/9Ui6QbCfd5f3451ckr3Gaz Xl4eUTn7mZFGCoTzNEjVG4Bk9pTpZPx/M3vJxFC8oH+XrEKLuIxQjlYgyHMEmzPDDFqQ4D/5plel xBLa3GqNtGNiMoqn5sQtpATvGDx2o4KCgaPuhrXFYB9bVrwlPrcwm8salogJzNrZ/A9dQ9Hs10iX oUoQP/fjgxvg5z5Vk86Dyrw/k1NhZmv0ygoXGsjTo6+XgQVt4AU/k= 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: [v5 1/4] media: rc: add keymap for MagicBox M16S remote Date: Mon, 25 Jul 2022 07:17:01 +0800 X-OQ-MSGID: <20220724231704.132472-2-zhangn1985@qq.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220724231704.132472-1-zhangn1985@qq.com> References: <20220724231704.132472-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_161726_841036_C3864005 X-CRM114-Status: UNSURE ( 6.67 ) 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. This 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 23:17:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhang Ning X-Patchwork-Id: 12927661 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 CE516C43334 for ; Sun, 24 Jul 2022 23:17:52 +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=cYUVfo/5btXXdjbtV77J9Zbn+jKB8hUBxq3B/z5lFWQ=; b=V8xeJlRG1NkxZC rxGsZdQ5xFo0J17cS7GdpTKDpagkEP3B59+j5/fP1FlVHcSL76y8U7oNqVymg4lSBPwnJNhsUaBDK JLrKo5H62f2fmnTf/i+M8ihktNFj/GSVyZUgyUZNLB2bwRmUIl6zynmr+92S14vJ4tRRnRrJ4HKmq h/VBMVkhx2a1pgo5Hv/z0O/69FWP8MEaMVY1JHLnLL7bMtx2BrQpAIwCdqNQlAJGppSkIVJnOsaIb 60EgKNkKZJqNiyWUB0RxoZ3qcaVUFsPEIXMciVXlBmSXe2xdaGwgv+KR29MzYI+Z5U0NGOKf/WKrd uU/544np+rPzXhLbhQyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFkqo-00G7A8-11; Sun, 24 Jul 2022 23:17:30 +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 1oFkql-00G74Q-Ke for linux-amlogic@lists.infradead.org; Sun, 24 Jul 2022 23:17:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1658704637; bh=int5LufGeXMqPTw/9z6fnqzHjTwREl6lTVHUKxYTTPE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=VVm4tEqpCqHQFvsvSbaQXjvLQFig6OdsWw9gByEl6HcViJXORdi1KttSxFWmVh2rg 7L/Ju2GQ8qu+ri5J2TnTLWCjnzMy1UxL71SKxfX4rK/BZUrUrbRCVpIpxrqyJi6oHW Z/caEhvgJR7ZIpWyCnhLF4tPuJmyrgDiXfiAQL2A= Received: from TS-551.. ([101.229.115.99]) by newxmesmtplogicsvrsza5.qq.com (NewEsmtp) with SMTP id 44B2EEC3; Mon, 25 Jul 2022 07:17:11 +0800 X-QQ-mid: xmsmtpt1658704635tszjjy3wr Message-ID: X-QQ-XMAILINFO: OZZSS56D9fAjD8jntV4C0BxKXORVqVJFyVA5JNVVSZJY8HZc2hg2REfL/ZzBxJ W1zcqwOkzEOULVOvZ6bt0Z9E0HfUXcM6W4xpycNSTQPWLyKeBlkII1Yc+xFk9eiou5U2CG9R6VR7 9HFZugqwz/RE5rEMFkypoStxn3LZHHHkp7r136pMLarmHIKEq2zrC8YWqaNzYhLcVXu1dnGVxyqw hmoAMXYUYLH85AgdbhPWO64/Zq7y3SA5+HDKG2cl/vh0J+entGEQJ/r/3YgUshrKt1soSx+/acIa S3B5ntvlxM7veK1SPFJ0wxynC+D98tQKbjUFH5PQa5rhRZMAMnRB88Y9/bNgqs7wGaqg8UPQ/eQ1 /adl6VqLFJiJXAAHSCjS9Ssk2WY/gM9zC4+evVKWyLi1c1XwNtAkCc/ybeNaJ3IGZ43GwTaHI9XU n2L+SwUiAOFroSgG4SPto+cZ0JtT0CSvIPnKA304pKyxu4Znr5Ci58h75C9l7ufCG2EvCxyZZX5R 3fA4Pxv0wcqqCHStlGYBzCwwih3o3M+gyxJFkKm0bmv/k6mI7wI9WaDL7160UK+OfcctPFPJWGI3 iW08Zh5NqoetV8BB0/hhGJQ7YmNJEuSgo2vHeWkmWfrKSoYQnrfH0SCHnWaaPtyiZLTZ+QtQzB0v QZwL8ya7x4QuePxok0EdjRwfrsL/1Ui9K/9VSCNzHUN+AHl4XFm8sV5Xb7sfZ8LEIVd6nomD+I5r 5hWeMZiWhvn+EZKUr1xtongUU+57L1KlHO4VSD2IM1lX/feg5HsuK8noJ65HODch8TOLtqJxGzaL uf7r2H+L9f+uiN1IGEld863MQW+LN43Zf2SxIz5FshvRva/VIUXoUMIONjnnGrOrED7Oog37s17h dD5B5SujCnQZLjZmBQXWPxecfAOA8W4R4a1Xebk7Mic1Yu8afY8l/+DilSdGZHXw== 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: [v5 2/4] media: rc: add keymap for MagicBox M16S remote Date: Mon, 25 Jul 2022 07:17:02 +0800 X-OQ-MSGID: <20220724231704.132472-3-zhangn1985@qq.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220724231704.132472-1-zhangn1985@qq.com> References: <20220724231704.132472-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_161728_017951_EA635802 X-CRM114-Status: GOOD ( 13.44 ) 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. This has mapped to KEY_MUTE. Signed-off-by: Zhang Ning --- drivers/media/rc/keymaps/Makefile | 1 + drivers/media/rc/keymaps/rc-magicbox.c | 53 ++++++++++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 55 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..b4fc1856a9e7 --- /dev/null +++ b/drivers/media/rc/keymaps/rc-magicbox.c @@ -0,0 +1,53 @@ +// 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 23:17:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhang Ning X-Patchwork-Id: 12927659 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 67334CCA48C for ; Sun, 24 Jul 2022 23:17:51 +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=NKM1aaq5wHEheI lNqH1ODWqbceW5ueGxXPv3w52MvBF1ZMg/37geXIJY5k0rT9w+KeIL1HUmT7lCkubko+by42QyAbC PJUCXMb1BYisq1IkhW989I8FP3CBCk57DWOfm0t3iba9kOKufgLadtPfiKvcVHnOYEaZh9axYSV7M soxgeDdwczsafeLAaQkFlYHXERLLJygecNDZcGj1ysNtc8juMD97trxusECSnbv54SMA29LGOvwvQ nBM8qt+E0uDEVx9rSIPMDYOKVvJ3aGWlVujTdV6uehrHfU/b/7UJXEqrgx9llc/AHe2+hgx/5mal0 nmAIqjxAC6yrNNc+KioQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFkqr-00G7B4-Jx; Sun, 24 Jul 2022 23:17:33 +0000 Received: from out162-62-57-210.mail.qq.com ([162.62.57.210]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFkqm-00G750-Uv for linux-amlogic@lists.infradead.org; Sun, 24 Jul 2022 23:17:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1658704639; bh=L1OKzS/6gJdq6B1s+pyUOL8qpdZ4pWPcZwWD57/I7Q0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=aKcMHKKr89pvMidpyqSGVJyB2DNOtXUoN1YKvrks73Coald6ssayCqxiEUPJpK+fq weTxxp2v2rMNJkL5ItdhlpXArpH534MQl8AR2qTSpvxRivuBYAIdjiOhaLcfkNR+u6 s7xjdYmjnHwQeH75VZpDIufUvCQ9Niw1Spij3zgw= Received: from TS-551.. ([101.229.115.99]) by newxmesmtplogicsvrsza5.qq.com (NewEsmtp) with SMTP id 44B2EEC3; Mon, 25 Jul 2022 07:17:11 +0800 X-QQ-mid: xmsmtpt1658704637tkm6cmfhb Message-ID: X-QQ-XMAILINFO: NkHKfw09D6j80DVVCKg9tfcXd06+TlTodnvuvb2gIWrwi1pDNXZADJzdje/jft 4HmgJTX7s5Mdt+bPpPlrK94j5g9fiA0d90qfbpJc32x4nzz3n0Y0mdL+R8O6w7jdQbKOt+Opsidp 9San3fW+8CoRIrCZY0BOUpP0exNwMHRvrJsHtBgTWxiFSWbtRp1RtcrneNH/j+WWfjYaxQPOmpaj 3J+Lc8JwpsOdxtCA1lVuc4xXzj8mEaNDeMBYeKQOhKqxv9rj+VAuod3wlQZ0rMDv52mi9N0PRAxm VcME0PIX7s0qBcDLGccyzwvGtLmYSnYzVst0ojBpPLPVZ7tw6XJfyg+mcjtwkSNB5EeEqttgDRzC DiFPnes/8yUnFgHlU++NByR0dxnbpjGwDqaCNyJnoyT13xeMEQuT56YhxRnof2jgEly1o7/o7mpt DPQdZBqf9re8zt/xGthExoIqzegxPvkNBcgM1v/sjnhtRHfx5Qk1AAfGRJHV2sDug566TSsuTVNn 5p+XWQLEtnUct8+l3/c0RYSRQWBO/RsPp5BWVCJrrsZc5fH/L3pF2/MajKywLRf/MVv60VsM48+B TuAHXvX2ITFYb4V1dy2Q6L2xuKWGU0apfL7R8f5aZvUCfWmaeUrrDWiyxEJNNvLvS4TeN9iYZz1w x9kZiwviBPSSRLZdFGvxtRxShXVbGjmLuL117b+Es/2yqzkv+PY5A7KZIDXo3VC+TLXwgOnWhrMa cutsMDJx+bIz2eOv6+9WQdj0IBMF5fIzeaGk/DRc3yZFa6OyusqslgAPbIf4tAkEw05+a/c0c3k3 Kz3xNxEhseU58Hn8hAXZlsX6IIQ0fbxQMR9AjB88kyzvMcMMkQmO58UDO1IxvAZnbBW5l0N7PAZH 5yMmyEzQK9VIvKwe5nogrf5XZvCZHHocsnrXuG8rg9SMtWp3PQ6oPe4M9nzbXB1LCHdMdoE9gJ 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: [v5 3/4] dt-bindings: arm: add Magicbox M16S bindings Date: Mon, 25 Jul 2022 07:17:03 +0800 X-OQ-MSGID: <20220724231704.132472-4-zhangn1985@qq.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220724231704.132472-1-zhangn1985@qq.com> References: <20220724231704.132472-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_161729_508206_3F68CA64 X-CRM114-Status: UNSURE ( 6.31 ) 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 23:17:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhang Ning X-Patchwork-Id: 12927658 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 8B203C43334 for ; Sun, 24 Jul 2022 23:17:50 +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=gZp1Zxx93MkOj2 e7gbO8oRWeT5mdKsBfaLgP3IURVfTwX3Ek6IY/duIy1xp0spH4OMBHMCm66Rge6LhQrg7dp0DORVb iGzkpMuIH/7Bec/Pu90QFtPcNwkFBlrHMYuge6JhjXUSymenUmx6191189vdmRS5irWMs1zCo8qTd u2vGdg5ccmEKAZqfEL/sf1xc3aYayZqrtVnbFsoUat1AEz9zQci8BEj2NWBnMtNDoPt1pvUgCfaAg f/WlUb+dnRLNkpxPaUiKt5N+XE1/g+gl1v0gYyLD5z64U4kDKTAoyzBfxPdmDt8nAJOHZb8zRF//8 Jg3NEP+MoEi5Tc5Lfggg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFkqr-00G7Av-A8; Sun, 24 Jul 2022 23:17:33 +0000 Received: from out162-62-58-211.mail.qq.com ([162.62.58.211]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFkqm-00G752-3W for linux-amlogic@lists.infradead.org; Sun, 24 Jul 2022 23:17:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1658704640; bh=8aApajzEktIG6Zsp/DJOg+Sx9VlGRE26o0ibiFJZVlI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=sAwTs0CpHdJ9H2egM2JwCPhtyQgvZrN9AB+1uyslKN8L1N/T8pWQkUk3fKmApM6UB xnCo0BkU21xlEt+Hdbz0GqnIx3pvnX/QKmHKtCfvuOFeEe8s0fjVVxntAz+5WdZ5mf dD9DrovF/oIk3hNARbK+d6MgEb07UOE7WN0seV6U= Received: from TS-551.. ([101.229.115.99]) by newxmesmtplogicsvrsza5.qq.com (NewEsmtp) with SMTP id 44B2EEC3; Mon, 25 Jul 2022 07:17:11 +0800 X-QQ-mid: xmsmtpt1658704638tc2eswaci Message-ID: X-QQ-XMAILINFO: OKkKo7I1HxIe0XFJ+V02CZDLlqyBJ2EqOeVb35jiqyZHUdzZQ7KtjcfSnqqk8u gH5rbU0yd5E8+yHJVC4LVFONp4FzeCRos5eugP0etwEAa35UJoab4LPZtQAkKRvVCqb0uRI2F3C/ +gz7yXHkKmSTr/ZGr5gW20KsihfbjxI9kWEy7gEjhajpp/b4COZwAE17OtI3t/u6Zyu6b0HcDyRW F0ehg8A2s8Aib24OMCFAjiAIH8RjP6frtWkrROSkc19eBT4VUB3edr/w8rBam7+99ZhUyo2/96+J +405m93PUUh0nlFIJ7eFk8Z3mkeFCnB6oIZW8BeiwloKGipkh1ZMr/KYZe3gykCA85S7peRoUP9p oVMH/syBL07sXbThJG/FWfnr/7T3HCtd7ekgCIX1g6azq7X85lGc7b3LDtVnwdN5zDUe+gokZWj/ VvgEeViR/Z6SzFT+Q2fwB5bjNE3HwhTwP5pWdOn/7wSQsIcngn/T+Z0xlA/gT3Q/hOsTq+faA8ci l8/pj/5XScuOomMCniPtRUCMi6VBEfYaMQCR3VsiqbKZnHIBJ9mbikKLAvoIXEBbOkB1WRo62Hmd XD1K7CBna09poEL5towOUYWXOUFE2d9FcibkMJrkSlDdEtmZPx0UPwn1RXqbauUJsciniF+xCIKD UJm1J9Mo1PliXgp/bfNIEt3NGLE2ne7vqPSnHfXCEV/IUNhzNmYZh+T3Ta/Zu8T3En6MOmHZZBrs EVvdZEo5JOzIBk1kObFB2cKDwQtROQ1C6jTTezCiJCG/PIvRoiLcLDKLDGWssNqkKn+R91VqmXsc nxPGob6Z1Wllsp1skf35uUoMgv7xyhZ2PP/x/GGv7YotQUH/P4SgpREmMxxhOIaFi4FR6LABGAyC fhuJfaLoIWGPLr+XdGWuDmCBl243j91zd0PtwcDmW2Rdh8xyyv+KKYa3MiyCxr9g8PAh6OTdYBN9 IxyDxb5gQ= 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: [v5 4/4] arm64: dts: meson: Add MagicBox M16S support Date: Mon, 25 Jul 2022 07:17:04 +0800 X-OQ-MSGID: <20220724231704.132472-5-zhangn1985@qq.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220724231704.132472-1-zhangn1985@qq.com> References: <20220724231704.132472-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_161728_612456_C0DB4291 X-CRM114-Status: GOOD ( 12.01 ) 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"; +};