From patchwork Tue Nov 30 06:05:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 12646395 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 714AFC433FE for ; Tue, 30 Nov 2021 06:06:42 +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=FhjnUGO+5Cbd7wghgdOVxWIqP0HO2VPOAawIS/+/7jg=; b=StWEoaDxpuMolN +h/7mHMM82il24eitgy4KbGMjk9ApXDwhWdljrDoGN7V9HLWVeSD8PihYY1jxbNinjDjEUyy+ZubO jdZHYiGqEuS3stSpbVE/iSdIJmpMB88bzVmQmhWFZRp4RUJaZrgwWidRhw4N2D13vCgG0n+AajSl1 2ScziOf+uYRAbBQzNqi0e1+ibfabh4UmQqYl3m5TmLP3GUuS0qj1Bx5wMWxglyTSEC59WPWVc5dMb HgjTNkfKOsgKNpuT5DcihnbD3WbmMhiUztHnSkzyCmoaXcFP6ohE0VcmLdcZI2J2wgeAl2sZbFFWa /3SmXcL9Jn7yOqwEBj7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrwHl-003iO9-3H; Tue, 30 Nov 2021 06:06:37 +0000 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrwGl-003hxM-Iz; Tue, 30 Nov 2021 06:05:37 +0000 Received: by mail-ed1-x52b.google.com with SMTP id l25so81793215eda.11; Mon, 29 Nov 2021 22:05:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aTIpHt4abFxiwEWu16rsOsGtzLsE5A+z1Ris+tROnSk=; b=FvROx5aIIMa8cktQfVQXAf/onwmI+1uEipiNStcFWnKSD416lwNL07vVabk651Zkpk vc/X8Eg53LVvl2zMR8sMnn8wugAx1+dcZIZEhty/P9Ws43cg++XDbu6KUEeroWC3VJrp uLeECNOk1XjQwJx/sv9jcARvy7YNU4oz7vwKNT8F/KFVk7f+9iDRJb1CzkKkmbze5377 28S6yPbYnvA+LBP+jMSrFG5iD9x44xQxCCxVSOoGb4xouMe8OzspLSR6mHIdwX1NT6DR AW6tJP4PDgCy05o4sFM7LwCGUP05EqA6VaXO0VKvgX3pFEvTIuX0fkqFXmxp3jDOeiku QHFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aTIpHt4abFxiwEWu16rsOsGtzLsE5A+z1Ris+tROnSk=; b=51ZgE7CLhMYb+72wnQF3BxDRzy+PH/0nMyScVVnwhDI/ADfFaF9qlM0QFxH43pGHwq N1ZTOs/6lYJpvlUjSUvtRT1Fdia0vGxemi0hHwUki4wvTfr8Jprgv5D2TfVmWJZW/F7z eFG6hJS55IcMKpYTgMK8M9xaN63xt8KkiB5k7ow3ugmSzQ367+BOUh5d5iB+j4pmO4Co si6dMCtpTDj+E6vKlZdNxjH5YXL7kxgqsXxcb0PRMWQriG7eoItpK7UCQhHfsqZvOAcP 706JqCn69QiHFUeaVWb1+8+lzo/YmiRXmy5Mnp4D5HcPRDuD1ak9FtqXUzYYQKlbFGEi KhAw== X-Gm-Message-State: AOAM531Sc+fcRdMkXh7dcexFvTvSdZ7GX7TydOOlnfEIXMqcgPWlz8+K k6j5oZhPkufCDshUP5kmauQ= X-Google-Smtp-Source: ABdhPJx/7zdmGJGv4UlZCKtRPafPbYKVivXJWnQQ14/91uu6R1sQJhFsogni4mQbHRCVECQuPD+nfQ== X-Received: by 2002:a05:6402:90c:: with SMTP id g12mr80777174edz.217.1638252333807; Mon, 29 Nov 2021 22:05:33 -0800 (PST) Received: from localhost.localdomain ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id e1sm10542153edc.27.2021.11.29.22.05.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Nov 2021 22:05:33 -0800 (PST) From: Christian Hewitt To: Rob Herring , Mark Rutland , Kevin Hilman , Neil Armstrong , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Christian Hewitt , Benoit Masson Subject: [RFC PATCH 3/9] arm64: dts: meson: add initial device-trees for X96-AIR Date: Tue, 30 Nov 2021 06:05:17 +0000 Message-Id: <20211130060523.19161-4-christianshewitt@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211130060523.19161-1-christianshewitt@gmail.com> References: <20211130060523.19161-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211129_220535_661413_0D8F4C30 X-CRM114-Status: GOOD ( 16.30 ) 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 Amediatek X96-AIR is based on Amlogic S905X3 reference board designs and ships in multiple configurations: – 4GB DDR3 + 64GB eMMC + WiFi a/b/g/n/ac + BT + Gb Ethernet – 4GB DDR3 + 32GB eMMC + WiFi a/b/g/n/ac + BT + Gb Ethernet – 4GB DDR3 + 32GB eMMC + WiFi b/g/n (no BT) + 10/100 Ethernet – 2GB DDR3 + 16GB eMMC + WiFi b/g/n (no BT) + 10/100 Ethernet ... - HDMI 2.1 video - S/PDIF optical output - AV output - 2x USB 2.0 inc. OTG port - 1x USB 3.0 port - IR receiver - 1x micro SD card slot (internal) - 1x Reset/Update button (in AV jack) - 7-segment VFD The device-tree with -100 suffix supports models with 10/100 Ethernet and with -1000 suffix supports models with Gigabit Ethernet. Signed-off-by: Christian Hewitt Tested-by: Martin Blumenstingl # Tested-by: Piotr Oniszczuk # --- arch/arm64/boot/dts/amlogic/Makefile | 2 + .../dts/amlogic/meson-sm1-x96-air-100.dts | 112 +++++++++++++++ .../dts/amlogic/meson-sm1-x96-air-1000.dts | 133 ++++++++++++++++++ 3 files changed, 247 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-100.dts create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-1000.dts diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile index 5148cd9e5146..a0c1a7fbae57 100644 --- a/arch/arm64/boot/dts/amlogic/Makefile +++ b/arch/arm64/boot/dts/amlogic/Makefile @@ -56,4 +56,6 @@ dtb-$(CONFIG_ARCH_MESON) += meson-sm1-khadas-vim3l.dtb dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-c4.dtb dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-hc4.dtb dtb-$(CONFIG_ARCH_MESON) += meson-sm1-sei610.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-sm1-x96-air-100.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-sm1-x96-air-1000.dtb dtb-$(CONFIG_ARCH_MESON) += meson-a1-ad401.dtb diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-100.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-100.dts new file mode 100644 index 000000000000..d9e5bc98a46a --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-100.dts @@ -0,0 +1,112 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 BayLibre SAS. All rights reserved. + * Copyright (c) 2020 Christian Hewitt + */ + +/dts-v1/; + +#include "meson-sm1-ac2xx.dtsi" +#include + +/ { + compatible = "amediatech,x96-air-100", "amlogic,sm1"; + model = "Shenzhen Amediatech Technology Co., Ltd X96 Air"; + + sound { + compatible = "amlogic,axg-sound-card"; + model = "X96-AIR"; + audio-aux-devs = <&tdmout_b>; + audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", + "TDMOUT_B IN 1", "FRDDR_B OUT 1", + "TDMOUT_B IN 2", "FRDDR_C OUT 1", + "TDM_B Playback", "TDMOUT_B OUT"; + + assigned-clocks = <&clkc CLKID_MPLL2>, + <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>; + assigned-clock-parents = <0>, <0>, <0>; + assigned-clock-rates = <294912000>, + <270950400>, + <393216000>; + status = "okay"; + + dai-link-0 { + sound-dai = <&frddr_a>; + }; + + dai-link-1 { + sound-dai = <&frddr_b>; + }; + + dai-link-2 { + sound-dai = <&frddr_c>; + }; + + /* 8ch hdmi interface */ + dai-link-3 { + sound-dai = <&tdmif_b>; + dai-format = "i2s"; + dai-tdm-slot-tx-mask-0 = <1 1>; + dai-tdm-slot-tx-mask-1 = <1 1>; + dai-tdm-slot-tx-mask-2 = <1 1>; + dai-tdm-slot-tx-mask-3 = <1 1>; + mclk-fs = <256>; + + codec { + sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; + }; + }; + + /* hdmi glue */ + dai-link-4 { + sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; + + codec { + sound-dai = <&hdmi_tx>; + }; + }; + }; +}; + +&arb { + status = "okay"; +}; + +&clkc_audio { + status = "okay"; +}; + +ðmac { + status = "okay"; + phy-handle = <&internal_ephy>; + phy-mode = "rmii"; +}; + +&frddr_a { + status = "okay"; +}; + +&frddr_b { + status = "okay"; +}; + +&frddr_c { + status = "okay"; +}; + +&ir { + linux,rc-map-name = "rc-beelink-gs1"; +}; + +&tdmif_b { + status = "okay"; +}; + +&tdmout_b { + status = "okay"; +}; + +&tohdmitx { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-1000.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-1000.dts new file mode 100644 index 000000000000..8047c6b116fe --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-1000.dts @@ -0,0 +1,133 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 BayLibre SAS. All rights reserved. + * Copyright (c) 2020 Christian Hewitt + */ + +/dts-v1/; + +#include "meson-sm1-ac2xx.dtsi" +#include + +/ { + compatible = "amediatech,x96-air-1000", "amlogic,sm1"; + model = "Shenzhen Amediatech Technology Co., Ltd X96 Air"; + + sound { + compatible = "amlogic,axg-sound-card"; + model = "X96-AIR"; + audio-aux-devs = <&tdmout_b>; + audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", + "TDMOUT_B IN 1", "FRDDR_B OUT 1", + "TDMOUT_B IN 2", "FRDDR_C OUT 1", + "TDM_B Playback", "TDMOUT_B OUT"; + + assigned-clocks = <&clkc CLKID_MPLL2>, + <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>; + assigned-clock-parents = <0>, <0>, <0>; + assigned-clock-rates = <294912000>, + <270950400>, + <393216000>; + status = "okay"; + + dai-link-0 { + sound-dai = <&frddr_a>; + }; + + dai-link-1 { + sound-dai = <&frddr_b>; + }; + + dai-link-2 { + sound-dai = <&frddr_c>; + }; + + /* 8ch hdmi interface */ + dai-link-3 { + sound-dai = <&tdmif_b>; + dai-format = "i2s"; + dai-tdm-slot-tx-mask-0 = <1 1>; + dai-tdm-slot-tx-mask-1 = <1 1>; + dai-tdm-slot-tx-mask-2 = <1 1>; + dai-tdm-slot-tx-mask-3 = <1 1>; + mclk-fs = <256>; + + codec { + sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; + }; + }; + + /* hdmi glue */ + dai-link-4 { + sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; + + codec { + sound-dai = <&hdmi_tx>; + }; + }; + }; +}; + +&arb { + status = "okay"; +}; + +&clkc_audio { + status = "okay"; +}; + +ðmac { + status = "okay"; + + pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; + pinctrl-names = "default"; + phy-mode = "rgmii-txid"; + phy-handle = <&external_phy>; + + rx-internal-delay-ps = <800>; +}; + +&ext_mdio { + external_phy: ethernet-phy@0 { + /* Realtek RTL8211F (0x001cc916) */ + reg = <0>; + max-speed = <1000>; + + reset-assert-us = <10000>; + reset-deassert-us = <80000>; + reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; + + interrupt-parent = <&gpio_intc>; + /* MAC_INTR on GPIOZ_14 */ + interrupts = <26 IRQ_TYPE_LEVEL_LOW>; + }; +}; + +&frddr_a { + status = "okay"; +}; + +&frddr_b { + status = "okay"; +}; + +&frddr_c { + status = "okay"; +}; + +&ir { + linux,rc-map-name = "rc-x96max"; +}; + +&tdmif_b { + status = "okay"; +}; + +&tdmout_b { + status = "okay"; +}; + +&tohdmitx { + status = "okay"; +};