From patchwork Mon Apr 3 08:06:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Karl Chan X-Patchwork-Id: 13197783 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 E674AC761A6 for ; Mon, 3 Apr 2023 08:06:45 +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:To:Subject: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=GirQWWQmEIi0ePKI/S3FMf2T0haE6hSw8Gk7Fx6TooY=; b=plZprC2x3bvKcq+HrKJKXZYoXr k3MGgjhE0NjE6jv1HRK+ny0DbAw87T3iiDVpub6MjDB3c36Olj364F83eHbwwopCRZMf6GlayTsoJ LCRWodHdBwjo9FBW2a5ZcJyR70JVl1fm7BAnaOGQqfNH3PyQZtpotYLh3ESrtp2IUBl0odw/wY857 akHzfshFntakFQfESO03DRIOByfwRo7Ru7EmD+SrVfQFqyDbv4JcyG5YFNDOt840e0EucEZQsEglF 6Kuf6v16Gd+rGnIoAk4msDaXdMu1Tt4Xm1xBlaiTH7iq1spShgT9hVXloP6GzUDgfgmypPHNSxLcV jLbBv+nQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pjFCy-00ESic-0h; Mon, 03 Apr 2023 08:06:32 +0000 Received: from sonic310-19.consmr.mail.sg3.yahoo.com ([106.10.244.139]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pjFCv-00EShe-32 for linux-amlogic@lists.infradead.org; Mon, 03 Apr 2023 08:06:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1680509185; bh=z1hCe8UWdO+PiAxvsoBvWXRlk2KHdei98c6I5HZrzu0=; h=Date:From:Subject:To:References:From:Subject:Reply-To; b=fEypYmDdWy5SElX2lTgc09rkfK86EKgn49tiD046vm8liRgnSvhNLbaFZt0Uh0pHAYKdL8B6EbAgrUw//K1sL+74VgwjqHW7qYSCq64PDZSEgDbFHRAZi/83hngvPVyh6ebugpY7DNpr9Mwn+g87rG2PiV9xkg0d4TVfjc+JqUuPWAJrsB6GkMEt7dL2Ar2o7XMoSzYRDv2UxSaGcEaHS28Be/qHKrgg+26FFyA22GMIx82GXyHoXLH2c0unfAZJwNfsCG69sCR+q2L/boG+HujVJ4fDG4tka+lTmbLU3QlWmQdGacPokehV8EtU2J+xXX8h8GPQTGzawGiCJ+lhiA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1680509185; bh=sxobg8AyyQu5FIRnF0B6sbCraqbI1L8P3GB2rda5VtI=; h=X-Sonic-MF:Date:From:Subject:To:From:Subject; b=BJXMUZJ8zoH+LmDeCakWdtFhJbaNEQeSPDgv9Rwsk15CXUXXq7Q6nfjoYl7WFKU1BoyZSt4ydXcjjj7ti8mR3FEG5HrvoJijoaSbKVHYrSNIghD4MY/KLXteD0fHluu0B64bAhq8JY9mp3h253N8F1S5UCGICu8qrjo8/aFGa+GaP2IdL3mRB8BOUOH0202g9aAyk4UEpXVMYFN2rgYexRVBx6zjXmgvu3nRoUep+7iMKzC7u/RpZ9XbeCRTFcNj3/hBpBN+Q1LY2wYkSYudr6IPMbO+sr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HanKBNHu9QIfKUdFs7B7t_QBMHiQrv0cQmd Ng9v6Ju93_qEFajvmED7kxp.pE9IH2kS1eEjXocFKbgumCLWAnHyKO84R4FrfzNp46qUk_OPRNia rvg-- X-Sonic-MF: X-Sonic-ID: c999f8ac-3fe3-4af1-99fe-ee48acce367f Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.sg3.yahoo.com with HTTP; Mon, 3 Apr 2023 08:06:25 +0000 Received: by hermes--production-sg3-6d6fb994f6-qwzcd (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID dd2aefca9c4c2fdfcc115a26afe163e2; Mon, 03 Apr 2023 08:06:22 +0000 (UTC) Message-ID: <8035a445-5a8c-9901-d69f-63d7daa7e2f5@yahoo.com> Date: Mon, 3 Apr 2023 16:06:25 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 From: Karl Chan Subject: [PATCHv2] ARM64: dts: meson-gxl: add support for the Xiaomi Mi Box 3 To: linux-amlogic@lists.infradead.org Content-Language: en-US References: <8035a445-5a8c-9901-d69f-63d7daa7e2f5.ref@yahoo.com> 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_010630_149733_A979D3CA X-CRM114-Status: GOOD ( 11.93 ) 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/8GIB - 1 GiB/4GIB 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 --- Different between v1 and v2: Fixed the copyright header in the device tree Fixed the wrong spec ---  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 Karl Chan . + * 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"; +};