From patchwork Tue Apr 25 16:56:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karl Chan X-Patchwork-Id: 13223529 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 C0268C6FD18 for ; Tue, 25 Apr 2023 16:57:35 +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: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=oXgqqA8562J7bAKV90Ob8GVyTlAZhKIXyiETHoFRs3E=; b=vugp4g12k4GQxl divtJpvRpNlP8+hHG8cmXBNHxUNPwzZ8HnpWtcoufwWjutMCZtV3XVmhKKiLwJgWRv7SdRuUTspsH IX9Ffaja3GuRAenZ9e4BUKEfd5zJak5nNiYx2+Sz+qBU7LrvQz+amJJNqBypy2iMibs66KNKXzhYr hCzL5gym7Nv44egkX/oOkvEuYlMJvNYlaI1xSmSQsz4UzxTk3IfkEh8j6ycBc9lSyC5XoIF8Ksmv0 4IY3IdgikYqRPQI02ea30aDauYRFww3yaurJWeGBT7psAJhFq7DKs1iqTgOs+CpxTdZlVJODvHS9g LKjoVLqXyUc8Cj82hdtQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1prLyp-001jRi-27; Tue, 25 Apr 2023 16:57:27 +0000 Received: from new-shark9.inbox.lv ([194.152.32.89]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1prLym-001jPW-1W; Tue, 25 Apr 2023 16:57:25 +0000 Received: from shark3.inbox.lv (shark3 [10.0.1.83]) by new-shark9.inbox.lv (Postfix) with ESMTP id 187FA48052F; Tue, 25 Apr 2023 19:57:23 +0300 (EEST) Received: from shark3.inbox.lv (localhost [127.0.0.1]) by shark3-out.inbox.lv (Postfix) with ESMTP id 081BD28018F; Tue, 25 Apr 2023 19:57:23 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=inbox.lv; s=p20220324; t=1682441843; x=1682443643; bh=lBR6HTqHzgUoGzc6OeC2Zmr/AmFRAGLoGdUpO8fVKuA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:X-ESPOL: From:Date:To:Cc:Message-ID:Subject:Reply-To; b=kDxf8oLZ/uot97+ZDSyqMQpF9tzhBwVz6dXrdGjp/3PdpNpCCUwXvpDEO0EE6w4QY F1AC6PENWOnHs8Q6UtEWxhgWP0aXNXhBpOQYzwqYJgTq07NSuy/KwgWjZYMd+lSI5y sJ0Kz/4SNqMArdTeQaXEMoMFgIQyaWDo88hZ3znk= Received: from localhost (localhost [127.0.0.1]) by shark3-in.inbox.lv (Postfix) with ESMTP id F401328018D; Tue, 25 Apr 2023 19:57:22 +0300 (EEST) Received: from shark3.inbox.lv ([127.0.0.1]) by localhost (shark3.inbox.lv [127.0.0.1]) (spamfilter, port 35) with ESMTP id ujduB6TBSSOC; Tue, 25 Apr 2023 19:57:22 +0300 (EEST) Received: from mail.inbox.lv (pop1 [127.0.0.1]) by shark3-in.inbox.lv (Postfix) with ESMTP id AF02728018A; Tue, 25 Apr 2023 19:57:22 +0300 (EEST) From: Karl Chan To: linux-amlogic@lists.infradead.org Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, neil.armstrong@linaro.org, khilman@baylibre.com, jbrunet@baylibre.com, martin.blumenstingl@googlemail.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Karl Chan" Subject: [PATCH v5 1/2] dt-bindings: arm: amlogic: add Xiaomi Mi box 3 binding Date: Wed, 26 Apr 2023 00:56:23 +0800 Message-Id: <20230425165624.11999-2-exkcmailist@inbox.lv> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230425165624.11999-1-exkcmailist@inbox.lv> References: <20230425165624.11999-1-exkcmailist@inbox.lv> MIME-Version: 1.0 X-Virus-Scanned: OK X-ESPOL: EZqEOgIB4BlLvMKgKZpu5uH6z9GvNCkuvCbmvcM9qS0Zt6+jx9N0dmeVEoHtGgW4bg== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230425_095724_663160_445CB774 X-CRM114-Status: UNSURE ( 5.83 ) 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 From: "Karl Chan" Add the board binding for the Xiaomi Mi box 3 Android Set-Top Box device. Signed-off-by: Karl Chan Acked-by: Rob Herring Reviewed-by: Martin Blumenstingl --- 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 b634d5b04e15..bc4da146a5de 100644 --- a/Documentation/devicetree/bindings/arm/amlogic.yaml +++ b/Documentation/devicetree/bindings/arm/amlogic.yaml @@ -99,6 +99,7 @@ properties: - libretech,aml-s905x-cc - libretech,aml-s905x-cc-v2 - nexbox,a95x + - xiaomi,mibox3 - const: amlogic,s905x - const: amlogic,meson-gxl From patchwork Tue Apr 25 16:56:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karl Chan X-Patchwork-Id: 13223530 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 B1B21C6FD18 for ; Tue, 25 Apr 2023 16:57:47 +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: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=X59c+QS9dvyAiixiwtCcKFISdB2hFXd0a6MRuPRun0A=; b=XIb20Hv/IRj2NO LoJYvLEWcDnkgAEaFQdVPr2LSnDn46on1jqGUIhBV4n0vCFcavFQvfR29EY+ieLWNckY02gdZAJ6k X8bT8/i/OGl+42APsNhYxSFM6ag17Ftv9h26lPUFLSsanPtzG1xFHanyGv2Er+xfsYfeZDncnhFtW 10hQ3Jtjwl9qPTMiO/78OOmb/G0UNNfERFtTTrDwtk64DmJvNGr3T65KlSRWAvnA04dkUyH72Rl05 RLiFSem0A7JhSkJtXSwdpZBVFXjt09nfjUxDBhUDrH29hc5OUoeH9YICi2BvsV4fCIym8/TI/OpMs 4QxzeCSgw5rkqtZ6z9+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1prLz2-001jXn-22; Tue, 25 Apr 2023 16:57:40 +0000 Received: from new-shark9.inbox.lv ([194.152.32.89]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1prLyz-001jVh-27; Tue, 25 Apr 2023 16:57:39 +0000 Received: from shark4.inbox.lv (shark4 [10.0.1.84]) by new-shark9.inbox.lv (Postfix) with ESMTP id 3D33448052F; Tue, 25 Apr 2023 19:57:36 +0300 (EEST) Received: from shark4.inbox.lv (localhost [127.0.0.1]) by shark4-out.inbox.lv (Postfix) with ESMTP id 2A91AC019F; Tue, 25 Apr 2023 19:57:36 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=inbox.lv; s=p20220324; t=1682441856; x=1682443656; bh=N4QLC3QqIvchn657Wxt7eP3a7y150FC3JaximBoSfDU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:X-ESPOL: From:Date:To:Cc:Message-ID:Subject:Reply-To; b=EeygvSMQ9SRP1XDZrZrXfOjx8/0PT3DWWEn0JS8+szCPpWraKWuGIiCBXVCZBeTzT kiUN3YmSg83XsHGMgMPYeWbJeP1r9lKP+6cXCkhPVs5zk0hgArdXKLTZyipEJEtLke WHGVykwdMQLvU+jgiSgvOz2oNN4qiaHME974/z58= Received: from localhost (localhost [127.0.0.1]) by shark4-in.inbox.lv (Postfix) with ESMTP id 22246C019B; Tue, 25 Apr 2023 19:57:36 +0300 (EEST) Received: from shark4.inbox.lv ([127.0.0.1]) by localhost (shark4.inbox.lv [127.0.0.1]) (spamfilter, port 35) with ESMTP id o76Iws7qvmcN; Tue, 25 Apr 2023 19:57:35 +0300 (EEST) Received: from mail.inbox.lv (pop1 [127.0.0.1]) by shark4-in.inbox.lv (Postfix) with ESMTP id 9FCDDC018A; Tue, 25 Apr 2023 19:57:35 +0300 (EEST) From: Karl Chan To: linux-amlogic@lists.infradead.org Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, neil.armstrong@linaro.org, khilman@baylibre.com, jbrunet@baylibre.com, martin.blumenstingl@googlemail.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Karl Chan" Subject: [PATCH v5 2/2] arm64: dts: meson-gxl: add support for Xiaomi Mi box 3 Date: Wed, 26 Apr 2023 00:56:24 +0800 Message-Id: <20230425165624.11999-3-exkcmailist@inbox.lv> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230425165624.11999-1-exkcmailist@inbox.lv> References: <20230425165624.11999-1-exkcmailist@inbox.lv> MIME-Version: 1.0 X-Virus-Scanned: OK X-ESPOL: EZeEAiZdmGU1y83GUJgOlO7lx8rRIlciuy/6x7gy6nVYqsqhvtp3bm2LGYXtBwu+bg== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230425_095737_864112_1D1639AD X-CRM114-Status: GOOD ( 13.74 ) 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 From: "Karl Chan" The Xiaomi Mi box 3 is a TV box based on the Amlogic S905X chipset. There are two variants: - 2 GiB/8GIB - 1 GiB/4GIB Both variants come with: - 802.11a/b/g/n/ac wifi (BCM4345) - HDMI , AV (CVBS) and S/PDIF optical output - 1x USB Signed-off-by: Karl Chan Reviewed-by: Martin Blumenstingl --- arch/arm64/boot/dts/amlogic/Makefile | 1 + .../amlogic/meson-gxl-s905x-xiaomi-mibox3.dts | 138 ++++++++++++++++++ list | 1 + 3 files changed, 140 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-xiaomi-mibox3.dts create mode 100644 list diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile index ccf1ba57fa87..774e7c3638bb 100644 --- a/arch/arm64/boot/dts/amlogic/Makefile +++ b/arch/arm64/boot/dts/amlogic/Makefile @@ -48,6 +48,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-mibox3.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-mibox3.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-xiaomi-mibox3.dts new file mode 100644 index 000000000000..acc4b12ffe0f --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-xiaomi-mibox3.dts @@ -0,0 +1,138 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2016 Endless Computers, Inc. + * Author: Carlo Caione + * Copyright (c) 2023 Karl Chan + */ + +/dts-v1/; + +#include "meson-gxl-s905x-p212.dtsi" +#include + +/ { + compatible = "xiaomi,mibox3", "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-MIBOX3"; + 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>; + }; +}; + +ðmac { + status = "disabled"; +}; + +&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>; + }; +}; + +/* This UART is brought out to the uart pad on upper left of the pcb */ +&uart_AO { + status = "okay"; +}; +