From patchwork Thu Jun 6 09:54:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13688225 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 55E14C27C55 for ; Thu, 6 Jun 2024 09:54:39 +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:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Dzm60Bm2gFOV9vM9H4KAx3JrriEagBhIV0v+QtV8Wfs=; b=V3MStR/pzi2lmM Dz57f55+5+CY53JbQ3qtvSA41SqFIU60CTcZ9lprjd8+WtTodWFaCOeDhy/wLTsTw96DOMa86VtW1 GgW7tJpL/I8/hbYBVmrRXxlRACu3iNgiQpde7bkUJlT6vqHTZWxmG3JT4sRK03YJco5wQIToLMRdk bNlH4BGKOCsb+mOl9rMhTLgx3T4ydylFoebC5Ke4XA0Kc7dS8mMM8PMZrhk01X0iajz84jRKjuBGJ W+OrAxMZKcUfZiFbnatY0A5k6HCtSf1CBzMeoaMdybZNopKT5g0XU/OyLZ+MuiTmblV/aRIWn8doq R2VAqCxpWUlAmmSBkHig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sF9pK-00000009IEN-1qDN; Thu, 06 Jun 2024 09:54:34 +0000 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sF9pF-00000009IBx-14uh; Thu, 06 Jun 2024 09:54:30 +0000 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-52b88335dd7so932121e87.1; Thu, 06 Jun 2024 02:54:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717667667; x=1718272467; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Whn2w+VTi4qPZ5FGXEXha21o8nVB5Tk2U6db+I1W52s=; b=SBjNpqW6qzkQW5KhgYylfR18Ut/BBwyI091F8QjCKyPgz+311t5P2dqlI+iyHJynvt 5d6VmRkDFdwfCnvffuGYczOiHCMq7IdrIGEi+hxOJDDC9CG5/3O7stINK4gloLWM+DgL cUefNg819PCwmvgMn+Y4QdR9U1lxm8imu8ZwTum73CJ9sTvxWw8XXxYjF5cHZrRo6q38 TNf6HERm1LF3xVYYZGZsFPj4TircDo7tl4H4kczHTtWTT3w6c/BcKLrBw4mBxD49iCVA S25BXw/3uD2bvjGxt+BgKo4vbw1vW9gHq9h6Zt0B6Sxd5ZKvUlV7toEiulhaArf8wIGR lcKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717667667; x=1718272467; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Whn2w+VTi4qPZ5FGXEXha21o8nVB5Tk2U6db+I1W52s=; b=uzGu3bknOAhvZB4W7vZJyHyct0smj4h0HhQ7BvIkBHonNDFmwl6SI+SzRADx754dO4 k/UxFxR2bosq7ceVUS+9XRV5sSqr4NcbRpRwDyn/dotiyrCzBCrAzj3cXNKo2WN2IZ/j Ls91IZUB2JldSirnXgxF+0FMTNFDDYGhCCrUh2nYh4aMgQPNbK5aS8B8rmC3YzMLzl9G O87C84yXBREf3PRB0mbrqFRCMV8BdvtcU0P8s7xiEb2VOpLbtw3p8Tun46ZEUMCoZZVS F+WuwB6A33qcZRlA9Ab8U4+fT14vlj5LJK9/Ku3QGQbG2ENvm9eNv4qorOjs9FMK4QUc wZrA== X-Forwarded-Encrypted: i=1; AJvYcCVUF+pZMG+nT6UgWdXLUpii9Rj4eNwuq1AKxKB6BB88rElrcBdk7HpNVpgkxfjrT4WjJFmwXCw/JTGo24oMjA22pE4+AfrL+yzzPSEL6ZGv+hGdvl2seLQccTKfgKTI8tofTbCDiC0DBObhSTTCulGCW5ahsNkI4A== X-Gm-Message-State: AOJu0Yz+vi3MqRkZu8oJAhbrv7Q5irDJFE0ewsX0T8566VSw5ZGprIua /wrwuXwJpAexMXp9cJDItiFAufFStWF3wCHk+HC9VmANJy3oLglI X-Google-Smtp-Source: AGHT+IFZhf67e4fW0zgYeBIiAIwklUJsAE33gFJ9wJ7BeLDDaR/lfu9ABqO+rTIRLE9sjC8E8IyQuA== X-Received: by 2002:ac2:499d:0:b0:51c:bd90:e60b with SMTP id 2adb3069b0e04-52bab4c854dmr3056595e87.25.1717667667390; Thu, 06 Jun 2024 02:54:27 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42158148ffasm51454325e9.38.2024.06.06.02.54.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 02:54:26 -0700 (PDT) From: Christian Hewitt To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] arm64: dts: meson: add support for OSMC Vero 4K Date: Thu, 6 Jun 2024 09:54:19 +0000 Message-Id: <20240606095419.3950015-2-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240606095419.3950015-1-christianshewitt@gmail.com> References: <20240606095419.3950015-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240606_025429_335580_A0DED3F2 X-CRM114-Status: GOOD ( 14.44 ) 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 OSMC Vero 4K device is based on the Amlogic S905X (P212) reference design with the following specifications: - 2GB DDR4 RAM - 16GB eMMC - HDMI 2.1 video - S/PDIF optical output - AV output - 10/100 Ethernet - AP6255 Wireless (802.11 a/b/g/n/ac, BT 4.2) - 2x USB 2.0 ports (1x OTG) - IR receiver (internal) - IR extender port (external) - 1x micro SD card slot - 1x Power LED (red) - 1x Reset button (in AV jack) Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong --- arch/arm64/boot/dts/amlogic/Makefile | 7 + .../dts/amlogic/meson-gxl-s905x-vero4k.dts | 202 ++++++++++++++++++ 2 files changed, 209 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-vero4k.dts diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile index 4addcae2c54e..78941ddd3136 100644 --- a/arch/arm64/boot/dts/amlogic/Makefile +++ b/arch/arm64/boot/dts/amlogic/Makefile @@ -55,6 +55,13 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p231.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-phicomm-n1.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-sml5442tw.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-vero4k-plus.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-hwacom-amazetv.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-khadas-vim.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc-v2.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-vero4k.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-jethome-jethub-j80.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-p281.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-tx3-mini.dtb diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-vero4k.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-vero4k.dts new file mode 100644 index 000000000000..b325cd75a792 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-vero4k.dts @@ -0,0 +1,202 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2024 Christian Hewitt + */ + +/dts-v1/; + +#include "meson-gxl-s905x-p212.dtsi" +#include +#include +#include + +/ { + compatible = "osmc,vero4k", "amlogic,s905x", "amlogic,meson-gxl"; + model = "OSMC Vero 4K"; + + reserved-memory { + /* 32 MiB reserved for ARM Trusted Firmware (BL32) */ + secmon_reserved_bl32: secmon@5300000 { + reg = <0x0 0x05300000 0x0 0x2000000>; + no-map; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + button { + label = "power"; + linux,code = ; + gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led-standby { + color = ; + function = LED_FUNCTION_POWER; + gpios = <&gpio GPIODV_24 GPIO_ACTIVE_LOW>; + default-state = "off"; + panic-indicator; + }; + }; + + dio2133: analog-amplifier { + compatible = "simple-audio-amplifier"; + sound-name-prefix = "AU2"; + VCC-supply = <&hdmi_5v>; + enable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>; + }; + + spdif_dit: audio-codec-0 { + #sound-dai-cells = <0>; + compatible = "linux,spdif-dit"; + sound-name-prefix = "DIT"; + }; + + 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 = "VERO4K"; + audio-aux-devs = <&dio2133>; + audio-widgets = "Line", "Lineout"; + audio-routing = "AU2 INL", "ACODEC LOLP", + "AU2 INR", "ACODEC LORP", + "AU2 INL", "ACODEC LOLN", + "AU2 INR", "ACODEC LORN", + "Lineout", "AU2 OUTL", + "Lineout", "AU2 OUTR"; + + dai-link-0 { + sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; + }; + + dai-link-1 { + sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>; + }; + + dai-link-2 { + 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-3 { + sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>; + + codec-0 { + sound-dai = <&spdif_dit>; + }; + }; + + dai-link-4 { + sound-dai = <&aiu AIU_HDMI CTRL_OUT>; + + codec-0 { + sound-dai = <&hdmi_tx>; + }; + }; + + dai-link-5 { + sound-dai = <&aiu AIU_ACODEC CTRL_OUT>; + + codec-0 { + sound-dai = <&acodec>; + }; + }; + }; +}; + +&acodec { + AVDD-supply = <&vddio_ao18>; + status = "okay"; +}; + +&aiu { + status = "okay"; + pinctrl-0 = <&spdif_out_h_pins>; + pinctrl-names = "default"; +}; + +&cec_AO { + status = "okay"; + pinctrl-0 = <&ao_cec_pins>; + pinctrl-names = "default"; + hdmi-phandle = <&hdmi_tx>; +}; + +&clkc { + assigned-clocks = <&clkc CLKID_MPLL0>, + <&clkc CLKID_MPLL1>, + <&clkc CLKID_MPLL2>; + assigned-clock-parents = <0>, <0>, <0>; + assigned-clock-rates = <294912000>, + <270950400>, + <393216000>; +}; + +&cvbs_vdac_port { + cvbs_vdac_out: endpoint { + remote-endpoint = <&cvbs_connector_in>; + }; +}; + +ðmac { + phy-mode = "rmii"; + phy-handle = <&internal_phy>; +}; + +&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>; + }; +}; + +&internal_phy { + pinctrl-0 = <ð_link_led_pins>, <ð_act_led_pins>; + pinctrl-names = "default"; +}; + +/* This UART is brought out to the DB9 connector */ +&uart_AO { + status = "okay"; +};