From patchwork Mon Apr 3 07:47:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Karl Chan X-Patchwork-Id: 13197775 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 4007BC76196 for ; Mon, 3 Apr 2023 07:48:02 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:Subject:To:From:MIME-Version:Date: Message-ID:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Owner; bh=RDiE2Bcpx9P7Rj49keYQeloSEYLF3sKB4EcRKc5KpPU=; b=U1WBFVRLkC9gOdh4Xja3fDKF/b F6hx3XNhX8jQ8CQL+XtqzBYILu/xsddfWInJqKzgC7foud7SvQNX7IdqhVCqLCXsdanqrGTzxxY8B MAW7SV9HdPfNwNa9XyAX6m8RNraeYtHFz8JSwSGdrheRPEjkRip/eKdfGWb/hsRntJdQkfmbYLHP8 4pN42vm0HRPy8Y+UVu6JlfZyrYMXScToBwyubjJ5CpPbRqvYtwji9NZZ9+f5SFmR+c01uyCPMGWPR aAQMefc21CHrt/OX32JudqTT23sTP+g+qCkd4a1KuJbf+7vadVxBLY0RbLJFFsKhsmK8jm0qjgaIv sNuHt4qg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pjEuv-00EQwJ-0G; Mon, 03 Apr 2023 07:47:53 +0000 Received: from sonic301-19.consmr.mail.sg3.yahoo.com ([106.10.242.82]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pjEur-00EQuQ-3D for linux-amlogic@lists.infradead.org; Mon, 03 Apr 2023 07:47:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1680508065; bh=OXQRK5bXKybeS9vHwKKUXze9ExGIFLhZQemsiYB+nDA=; h=Date:From:To:Subject:References:From:Subject:Reply-To; b=AdkINoDGg+uBdXp73xatFod24n3HjSOtXlh/ToPCysg9KSaxa0qERefCtriynir792Y3E4U3iImsb5nHZx4LOoHqQKI6ZdSyO+UsPWpgxvYojoGJE3JW7pW0nVd9aujkkQR/zFJOzoYr69Jm0lB0u7Pcf1FU5zB+ctFMd9huTZFZh54240MQg+l3vdjoXThIbl1KrlK1TfyBoEYOji/4113LlR80m+Ovuz+QG6RkhG8BIyjjWu05Ikc06kSskhlwcvQ2US8GQMwAX7ZHgiAxUQ+uglKSbODEh7gYX2CkMGPPMSU+gF00JBvVYxFZ/Xv6yP3GE2b/WdsXYjMqKfZVYA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1680508065; bh=3VPdRbUSyd4wklvMRQOMxytyEbsRaDi2cpCc/RCljtj=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=UCjQ1KguR95HaeTayr5yLuQgWAkoHuk6urVlZLaVIkTfaCtwAVO+/LKPftnnIo5L3BgmjK/3aRrJFnzq8IZt6yNm833fh1F/OuWmAuLxeiGWEl1fIWByII1eXDwDst2vJXTT8pFaYuurV6tLgiwSc/JwdCSZODp7o9kizo2SJHJibOQFsK0eGEmJxTnFxkYEQ7KScqY+RSQMRK/1aDE/95s7CtJLnmvcX8717kTz9ybXcC6uyEa7LGOk5IJvRPjxy/XY+gYZrvg3ot6bodtVkbfGwzE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_NJQL4HfjRyIZhAjeeNkvZnJjvs98u6HJXE.3c4ZXuj7QWNMGQ16P7 ubjNYFMJyEFyA4wuHXlS_jaA_w6oP3dvuPbTkAbtohgHJlFI0qd5UPrEDqo_n7CJ9eBa7i6_RNUc Vbg-- X-Sonic-MF: X-Sonic-ID: d48fbe53-39d5-49f6-bae6-4baf0993d8cb Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.sg3.yahoo.com with HTTP; Mon, 3 Apr 2023 07:47:45 +0000 Received: by hermes--production-sg3-6d6fb994f6-94jgf (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID d77c3ae78abed58efc2b721c4fff4f18; Mon, 03 Apr 2023 07:47:41 +0000 (UTC) Message-ID: Date: Mon, 3 Apr 2023 15:47:43 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Content-Language: en-US From: Karl Chan To: linux-amlogic@lists.infradead.org Subject: [PATCH] ARM64: dts: meson-gxl: add support for the Xiaomi Mi Box 3 References: X-Mailer: WebService/1.1.21284 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230403_004750_210564_5734B046 X-CRM114-Status: GOOD ( 11.02 ) 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 The Xiaomi Mi Box 3 is a TV box based on the Amlogic S905X chipset. There are two variants: - 2 GiB/16GIB - 1 GiB/8GIB Both variants come with: - 802.11a/b/g/n/ac wifi (BCM4345) - HDMI , AV (CVBS) and spdif optical output - 1x USB (utilizing both USB ports provided by the SoC) The board seems to be very similar to the P212 reference boards, which is why it includes meson-gxl-s905x-p212.dtsi: Signed-off-by: Karl Chan Tested-by: Karl Chan ---  arch/arm64/boot/dts/amlogic/Makefile          |   1 +  .../amlogic/meson-gxl-s905x-xiaomi-once.dts   | 142 ++++++++++++++++++  2 files changed, 143 insertions(+)  create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-xiaomi-once.dts diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile index e213aeebb..904bb1e19 100644 --- a/arch/arm64/boot/dts/amlogic/Makefile +++ b/arch/arm64/boot/dts/amlogic/Makefile @@ -45,6 +45,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc-v2.dtb  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-gxl-s905x-xiaomi-once.dtb  dtb-$(CONFIG_ARCH_MESON) += meson-gxm-gt1-ultimate.dtb  dtb-$(CONFIG_ARCH_MESON) += meson-gxm-khadas-vim2.dtb  dtb-$(CONFIG_ARCH_MESON) += meson-gxm-mecool-kiii-pro.dtb diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-xiaomi-once.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-xiaomi-once.dts new file mode 100644 index 000000000..6169c0dc0 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-xiaomi-once.dts @@ -0,0 +1,142 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2023 exkc + * Based on meson-gxl-s905x-p212.dts + * + */ + +/dts-v1/; + +#include "meson-gxl-s905x-p212.dtsi" +#include + +/ { +    compatible = "xiaomi,once", "amlogic,s905x", "amlogic,meson-gxl"; +    model = "Xiaomi Mi Box 3"; + +    dio2133: analog-amplifier { +        compatible = "simple-audio-amplifier"; +        sound-name-prefix = "AU2"; +        VCC-supply = <&hdmi_5v>; +        enable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>; +    }; + +    cvbs-connector { +        compatible = "composite-video-connector"; + +        port { +            cvbs_connector_in: endpoint { +                remote-endpoint = <&cvbs_vdac_out>; +            }; +        }; +    }; + +    hdmi-connector { +        compatible = "hdmi-connector"; +        type = "a"; + +        port { +            hdmi_connector_in: endpoint { +                remote-endpoint = <&hdmi_tx_tmds_out>; +            }; +        }; +    }; + +    sound { +        compatible = "amlogic,gx-sound-card"; +        model = "XIAOMI-ONCE"; +        audio-aux-devs = <&dio2133>; +        audio-widgets = "Line", "Lineout"; +        audio-routing = "Lineout", "AU2 OUTL", +                "Lineout", "AU2 OUTR"; +        assigned-clocks = <&clkc CLKID_MPLL0>, +                  <&clkc CLKID_MPLL1>, +                  <&clkc CLKID_MPLL2>; +        assigned-clock-parents = <0>, <0>, <0>; +        assigned-clock-rates = <294912000>, +                       <270950400>, +                       <393216000>; +        dai-link-0 { +            sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; +        }; + +        dai-link-1 { +            sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; +            dai-format = "i2s"; +            mclk-fs = <256>; + +            codec-0 { +                sound-dai = <&aiu AIU_HDMI CTRL_I2S>; +            }; + +            codec-1 { +                sound-dai = <&aiu AIU_ACODEC CTRL_I2S>; +            }; +        }; + +        dai-link-2 { +            sound-dai = <&aiu AIU_HDMI CTRL_OUT>; + +            codec-0 { +                sound-dai = <&hdmi_tx>; +            }; +        }; + +        dai-link-3 { +            sound-dai = <&aiu AIU_ACODEC CTRL_OUT>; + +            codec-0 { +                sound-dai = <&acodec>; +            }; +        }; +    }; +}; + +&acodec { +    AVDD-supply = <&vddio_ao18>; +    status = "okay"; +}; + +&aiu { +    status = "okay"; +}; + +&cec_AO { +    status = "okay"; +    pinctrl-0 = <&ao_cec_pins>; +    pinctrl-names = "default"; +    hdmi-phandle = <&hdmi_tx>; +}; + +&cvbs_vdac_port { +    cvbs_vdac_out: endpoint { +        remote-endpoint = <&cvbs_connector_in>; +    }; +}; + +&hdmi_tx { +    status = "okay"; +    pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>; +    pinctrl-names = "default"; +    hdmi-supply = <&hdmi_5v>; +}; + +&hdmi_tx_tmds_port { +    hdmi_tx_tmds_out: endpoint { +        remote-endpoint = <&hdmi_connector_in>; +    }; +}; + +ðmac { +    status = "disabled"; +}; + +&usb { +    status = "okay"; +    dr_mode = "host"; +}; + +/* This UART is brought out to the uarl pad on the pcb*/ +&uart_AO { +    status = "okay"; +};