From patchwork Sat Jun 22 13:51:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13708333 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 DD7CAC27C53 for ; Sat, 22 Jun 2024 13:51: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:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uHzl4MwuFngdikQtVMYaHto5rBiRITgYfZqHrowGR9I=; b=UDYdVVZ0SpQfezaz6pExgxpkDd fGooRCbkjLM+Uz3Tj5mqNJCLKrTzFM2ZYNRDHNpM40L9MM8AvXlyvwWru9TtgdOCQtbta7TUmJRdC YVouwTU3kz3NJL5hFeIegWKj6e5hgUcyvP1RfjBe4hU6njbqKRNsrXwzk5/JfErZUJT+SACCwYblo 4zhNoaDJPLrWePWgUqj1ReCw0vjYPnsFd7RbDgJzfncrMw5UgfghW3X3xghMT9cv/FrP+M+JIM0qh NH1yJjrr6XmqemI7ySCPSMdQv/iixmuNQYLRzF3QLEEEMRJ2IfruY5hhQdXfxaerw43mzJA8PiltN HvU7eXsQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sL19P-0000000CBhj-1KuX; Sat, 22 Jun 2024 13:51:31 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sL19K-0000000CBgS-2745; Sat, 22 Jun 2024 13:51:27 +0000 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a6fe81a5838so40757766b.3; Sat, 22 Jun 2024 06:51:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719064285; x=1719669085; 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=uHzl4MwuFngdikQtVMYaHto5rBiRITgYfZqHrowGR9I=; b=aPOyegZVSIic7T1sfQe2aIMKCxQSrvNZ9jcZzX6aS+sw3sH5CW4LF0s+YQUDAMFvDc MnnYJ8vvfQeVEWIDo4WmRNycFK4fZljGbKf3a6mTuviPXoRGTN2LF7zKms2KgpEMZGBI NdPoBdPt1vTkTdzk98tTkJ+HMLU8k28+xXdC+leKanVtb9+0RklSV2WDW+EDx1iVJW64 LQLGKKytst9RiLeYGHnMZUeh6wOdYFrZOHL4B88rkkmLl4lrhGnImwupbglZTDXB9CRp +c7uyVFCaMdE/mneyXeFYc9/OHVNufu3EXeA6+Tgt7NcNT7fTfD7g39s+Lis2X6Yn7r6 0Jbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719064285; x=1719669085; 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=uHzl4MwuFngdikQtVMYaHto5rBiRITgYfZqHrowGR9I=; b=rDDlNeFZEzxa6uN4YmgjgWYIfpZFSAnNAcoOiuxVSsBifezRIILcxfTtwSgVpVdu3F 4mpfyQLaxDkXpZ+xARYyDQXM23KKVsTZsfjm9Dl3cvD5g6YgV3wDQDvqbEwO8sz8eGjk ICgI4WsqdxZD8eSr2kKDEstXiYp4p+FVLGww3AEJJyRIi58p9c5bQavDvDv0h22HIDDF 0Omks97PDQvVCyoM3Dr1MFJq4Tc54s5A1xHwW2Wpk8Z5tcEVkQSBGyC9c7sBCyMzUthI vXfJgjAQWZQuLA8SAsoROrA+GskCHDEvjC0yleN03/pePhE1B4ab7HzmdzBJa347xY3F bAiQ== X-Forwarded-Encrypted: i=1; AJvYcCWm3ndS0JCHklacFKgvwMiNj2IEMTenpuYYqenBoRbpiZoT7t5OuuaMlf1LrElyI3krU68Zz67DMk/b7oeWg/rNp4UuZxAVZvDMko9ckwRKq73ftBTGdfUMq3e1ST1YYQkE7i3bgjjxrStvjLFUQ3aIwamFsijOQA== X-Gm-Message-State: AOJu0YzuKCCQDn4UEHFbuIOKFlFAXxHjNFZH8oyEzVX89m2asYaPKQON jLiOSd6Qwj9f8MTz1dyKyHLvlrE1ZjEvPbxvbIH1ZOWtYGJmicB7 X-Google-Smtp-Source: AGHT+IE+Zxw78stR9QStsQNFVET5Qx3HUyik4804xY/OS9p8eyU8Pg2jp976lY4k7Yxk+SK8FvuIGQ== X-Received: by 2002:a17:907:c206:b0:a71:ddb0:5206 with SMTP id a640c23a62f3a-a71ddb0527cmr54659066b.60.1719064284789; Sat, 22 Jun 2024 06:51:24 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6fcf428bc0sm199398866b.8.2024.06.22.06.51.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jun 2024 06:51:24 -0700 (PDT) From: Christian Hewitt To: 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, Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Christian Hewitt , Sam Nazarko Subject: [PATCH v2 2/2] arm64: dts: meson: add support for OSMC Vero 4K Date: Sat, 22 Jun 2024 13:51:17 +0000 Message-Id: <20240622135117.2608890-2-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240622135117.2608890-1-christianshewitt@gmail.com> References: <20240622135117.2608890-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240622_065126_573972_A7DF3A47 X-CRM114-Status: GOOD ( 13.82 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=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 --- Changes since v1: - Move audio clocks under sound node as requested by Neil - Fix makefile changes - Rebase against for-next arch/arm64/boot/dts/amlogic/Makefile | 1 + .../dts/amlogic/meson-gxl-s905x-vero4k.dts | 199 ++++++++++++++++++ 2 files changed, 200 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 0746e01b5853..9fe3d6bba9b1 100644 --- a/arch/arm64/boot/dts/amlogic/Makefile +++ b/arch/arm64/boot/dts/amlogic/Makefile @@ -62,6 +62,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-vero4k.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxlx-s905l-p271.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-gt1-ultimate.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-khadas-vim2.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..de996e930b82 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-vero4k.dts @@ -0,0 +1,199 @@ +// 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"; + 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_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>; +}; + +&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"; +};