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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F17DC433EF for ; Wed, 12 Jan 2022 02:27:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348819AbiALC1q (ORCPT ); Tue, 11 Jan 2022 21:27:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348724AbiALC1l (ORCPT ); Tue, 11 Jan 2022 21:27:41 -0500 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C628C06173F; Tue, 11 Jan 2022 18:27:40 -0800 (PST) Received: by mail-ed1-x52f.google.com with SMTP id u25so4029136edf.1; Tue, 11 Jan 2022 18:27:40 -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; bh=SNa+j7/TwcP4VUtNhzibteAqwPTDSMTlSS3cYR6qMFQ=; b=U0+h1wXbzY5FpnpNy7X5kjXNkag3rzvNeqi27aGagm0B7YLvSqSZNd0tpK9CxamQWd i4iYlOAjfU2cpbWY+qOBJXGqlxvmeENKbgYmKSupkhR86KZ7ejQg2eAR8JtahUXNE/W7 Dbt01NtduyTMUfvhrzZ2Ph1IZy7SFMhJaPUwmeXQYjoeOn6qPIFoD3XQLsGjD1XXp9o5 OskSgk4xWEFlK6RdQ1m3qlKbwT9eMhW3cyeoxRGYwkCgebYbr667ZgJb3psNHam5zYmb V2J6kAfn4zGUbfSYV/wfAagtfM02h4IpFzd+5AdVCxUc2Mgd3I7mkXNgCu/vBauXGwLY Lcpg== 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; bh=SNa+j7/TwcP4VUtNhzibteAqwPTDSMTlSS3cYR6qMFQ=; b=mYjK7CZ83jd6GaFUOA/VgC/WCysST48nE4mLbSonD8ZDbxXSUDD7htFtz7+w4YN+K/ QYEeQp8XQwv0EiUwlSIEk6sHL2VYqFK0fDJgfPS5TdbyvN0HGxVafhaePXlanXkIS2CL WhHUA8dyyXxuoiNsbpmNrBgs1bPMrwAxY3qtAMtGZqJSXwxyyf7bSbIihq3mU++ZOfbc tx4NsDK7AQxZ5Cn4MSyXx7etrtSV8JZf21TiUK0jAtouwA0KF+I2gJzqtGM6ntfBHWoo iNFbrQVCm6l8Dyh27WDoRX06TWA8JLRufqF+5IK71c7717o3tx12SecLCO7ba9+iTjU7 K9sg== X-Gm-Message-State: AOAM531U+eMRm9wPq3jFzlmi0nT4bwbC6ZWFRYC2tPA2FEJeRf2W0OJx d9URUtfvwohdu+jH1jjaROc= X-Google-Smtp-Source: ABdhPJzvFGiWoX4W2o2s4uHZQPISZivJLar95CkhPK9B7hN6BJAR4kdmwZ2mLiLbfoHCBxuPKYFokg== X-Received: by 2002:a05:6402:51cc:: with SMTP id r12mr6874849edd.92.1641954458939; Tue, 11 Jan 2022 18:27:38 -0800 (PST) Received: from localhost.localdomain ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id ky10sm4041772ejc.151.2022.01.11.18.27.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jan 2022 18:27:38 -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: [PATCH v3 9/9] arm64: dts: meson: add initial device-tree for H96-Max Date: Wed, 12 Jan 2022 02:27:13 +0000 Message-Id: <20220112022713.25962-10-christianshewitt@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220112022713.25962-1-christianshewitt@gmail.com> References: <20220112022713.25962-1-christianshewitt@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Haochuangyi H96-Max is based on the Amlogic S905X3 reference design with the following specs: - 4GB DDR4 RAM - 32/64/128GB eMMC - HDMI 2.1 video - S/PDIF optical output - AV output - 10/100/1000 Base-T Ethernet - AP6356S Wireless (802.11 a/b/g/n/ac, BT 4.1) - 1x USB 2.0 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 Signed-off-by: Christian Hewitt Tested-by: Benoit Masson --- arch/arm64/boot/dts/amlogic/Makefile | 1 + .../boot/dts/amlogic/meson-sm1-h96-max.dts | 145 ++++++++++++++++++ 2 files changed, 146 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-h96-max.dts diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile index e87adc6593df..868d74044072 100644 --- a/arch/arm64/boot/dts/amlogic/Makefile +++ b/arch/arm64/boot/dts/amlogic/Makefile @@ -54,6 +54,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-wetek-core2.dtb dtb-$(CONFIG_ARCH_MESON) += meson-sm1-a95xf3-air.dtb dtb-$(CONFIG_ARCH_MESON) += meson-sm1-a95xf3-air-gbit.dtb dtb-$(CONFIG_ARCH_MESON) += meson-sm1-bananapi-m5.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-sm1-h96-max.dtb 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 diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-h96-max.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-h96-max.dts new file mode 100644 index 000000000000..0f6660e68e72 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-sm1-h96-max.dts @@ -0,0 +1,145 @@ +// 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 = "haochuangyi,h96-max", "amlogic,sm1"; + model = "Shenzhen Haochuangyi Technology Co., Ltd H96 Max"; + + sound { + compatible = "amlogic,axg-sound-card"; + model = "H96-MAX"; + 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"; +}; + +&tdmif_b { + status = "okay"; +}; + +&tdmout_b { + status = "okay"; +}; + +&tohdmitx { + status = "okay"; +}; + +&uart_A { + status = "okay"; + + pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; + pinctrl-names = "default"; + uart-has-rtscts; + + bluetooth { + compatible = "brcm,bcm43438-bt"; + shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; + max-speed = <2000000>; + clocks = <&wifi32k>; + clock-names = "lpo"; + }; +}; -- 2.17.1