From patchwork Thu Mar 13 23:10:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer_via_B4_Relay?= X-Patchwork-Id: 14015979 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 0DFF7C282DE for ; Thu, 13 Mar 2025 23:17:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To: References:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version: Subject:Date:From:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Mj9yElEDhSNDVRCljNKtW2rK3cuOmT54qoaeELZwr1I=; b=dRJPefmHEMZUhlusYR8oZeY0Qp fnhC7u+5wQ2K8DJO9qDPOXtIZkCXUwQ5Ar+4GQl3m/WLGXflwAh18/BZOR+MTB2dfhsYzTUyUVzr4 PAEcUL4P7htirzPbV/UvsjKMKztAgVBSyXg1oZTf+2ujxS+1OWgg7LQIVkyp4yW21x1qX09y4LeU7 0ine0sdb7n2h+8N2ffxdqBZFYSMkKLrvbtDGQf/i8+MiL0+Y6+SiaAgg9Is7b4iQZNlVM66VCqnMq s32Im2YZUcuAtbKxaUvTZGNsbjxE2sqeAWmM412wCKd5okSjXgqFM91AFPkfn+cMqnv1NmCtrCwDZ 1EDD/veg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tsrnr-0000000CgpN-0R2q; Thu, 13 Mar 2025 23:17:27 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tsrhe-0000000CgFm-3WKO; Thu, 13 Mar 2025 23:11:04 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 1D6B4A4879C; Thu, 13 Mar 2025 23:05:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 2E3B9C4CEEA; Thu, 13 Mar 2025 23:11:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741907461; bh=KS2yDSQRD5SU3vS+jOOmaz2xUBc5Ay1LiOZbJ7uVdFk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=a59F3BN171SoZoup7W9FWYHJcR8PQGpl6JPxtnoxyZPBNUjWX6rbyR5Zu8vUTs0dL xDTyYTJVxLzo6fJsnxgq8j/xXYfawBkAVLJViLcpnrbQhf+aUieNVKa5WOP8GDtjQJ LdkTVIl6BjSgVU2KZd4c9hx11KNuv232dgdYMm7aQuhT/ZveugX3t7hgO11CMQ2r3e CO+nZkt+tjBBdn04FXZ6ICJHAv8PWgdSMnl5AoFGbCgd0umHu0eMU4hpYxDkAY+Ppc 9/7pjZlrHrw7WJkZ99quN7C7gqQLSjvy5OU/bzpzlnTcLFuPqnnte1tObQL+Aqieol Ynoat3pThlyWQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15474C35FF1; Thu, 13 Mar 2025 23:11:01 +0000 (UTC) From: =?utf-8?q?J=2E_Neusch=C3=A4fer_via_B4_Relay?= Date: Fri, 14 Mar 2025 00:10:59 +0100 Subject: [PATCH v2 1/2] dt-bindings: arm: amlogic: Add Ugoos AM3 MIME-Version: 1.0 Message-Id: <20250314-ugoos-am3-v2-1-422104b0cec5@posteo.net> References: <20250314-ugoos-am3-v2-0-422104b0cec5@posteo.net> In-Reply-To: <20250314-ugoos-am3-v2-0-422104b0cec5@posteo.net> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Martin Blumenstingl , Jerome Brunet , Kevin Hilman Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, =?utf-8?q?J=2E_Neusch=C3=A4fer?= , Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1741907460; l=1023; i=j.ne@posteo.net; s=20240329; h=from:subject:message-id; bh=5cSMNKg21bi7irPRvrIi1guYYUp67v6kD7IHJg+8xbU=; b=S/2RElaFOIwhwBy1p6gnq2FHNtTl0Uwx3R6e3so2rZAQV8z0N2wsMMgJYBCTdflA9hpgYFjTm AQ6jHvEW98wCFgHgmzwBOhBDYAHDhGe0ZIp8jON8TyS/urBQ8mzmEyr X-Developer-Key: i=j.ne@posteo.net; a=ed25519; pk=NIe0bK42wNaX/C4bi6ezm7NJK0IQE+8MKBm7igFMIS4= X-Endpoint-Received: by B4 Relay for j.ne@posteo.net/20240329 with auth_id=156 X-Original-From: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250313_161102_944243_6B69AB7E X-CRM114-Status: UNSURE ( 6.79 ) X-CRM114-Notice: Please train this message. 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: , Reply-To: j.ne@posteo.net Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: "J. Neuschäfer" The Ugoos AM3 is a small set-top box based on the Amlogic S912 SoC. https://ugoos.com/ugoos-am3-16g Acked-by: Krzysztof Kozlowski Signed-off-by: J. Neuschäfer --- V2: - fix vendor name in patch subject - add Krzysztof's ACK --- Documentation/devicetree/bindings/arm/amlogic.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml index 0647851ae1f55a27bfb148252532bcf15ca905bf..779568f158ce985e1d12fbee73418549cfc58705 100644 --- a/Documentation/devicetree/bindings/arm/amlogic.yaml +++ b/Documentation/devicetree/bindings/arm/amlogic.yaml @@ -127,6 +127,7 @@ properties: - minix,neo-u9h - nexbox,a1 - tronsmart,vega-s96 + - ugoos,am3 - videostrong,gxm-kiii-pro - wetek,core2 - const: amlogic,s912 From patchwork Thu Mar 13 23:11:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer_via_B4_Relay?= X-Patchwork-Id: 14015974 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 02E00C282DE for ; Thu, 13 Mar 2025 23:14:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To: References:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version: Subject:Date:From:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zvo974srqKQy8kGv850fu2thWP4wn6v1rVYJegmoA+c=; b=l5m8ZX4+MRZziyEBNUzVpjQt2a YAE4c5RafUXWTa2O3aV7Lx/4pWFERsN3xb5y58j8rDBMj+BH1hrQODrp9oUwLmOGbdFN2KJJqIGJl D+hZmMdyvemtpOQnjgPCozsdv7jZh5RBcfEv2YLaKbkwJUuwI581naNU+wvn3vmiQP1oIUhxFPTPC JZ+amELWICzso//hXMV2C0jT97lYR3NOKZDpj4Bl7uaKUqQbOFnsg9F3HEjtFRmQRqlto1XBGk8v0 bXK1zVQiSLweU2TqKfapbTGBd27H3R49QRiFZC+lUdRsX6PGEj39/4frXHuttUdUnyQXrzA3oVFGL OLk4hnmg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tsrkb-0000000CgbS-1pTu; Thu, 13 Mar 2025 23:14:05 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tsrhe-0000000CgFW-0XrJ; Thu, 13 Mar 2025 23:11:03 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id BA4D05C0F92; Thu, 13 Mar 2025 23:08:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 34D95C4CEE5; Thu, 13 Mar 2025 23:11:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741907461; bh=1YMIKyMyiIHxQT9I7V2KJ6dMxmvfNZry8pelzl171bk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=WRivEGXLxLFhUVLhb8SVLsLpNF5wTkbdJSqFqyyt/rBP6V3/P62tkW38b1A3YXoCt WoEd8ReVQPFO3sD4JZsXYhbT64HNKzn8PHtsUjZk2xSIXvFKHY4ViBNKUjC9VGn7z9 x+cZE4CYVTJqlHUr5Knv8ng+xxMKhDttGCmDjN+3HCnSRUJOsgpqypVkkAt4/fe5MG 1gq6aUoUQ/YUsHU3FjmS3A2IF9Rbps5GY/PI0G6+pmfr62dg1VLUJbZHPSUzO7Du2R 2OuoWRP6JvGGGcYmbDDYxOweHHPTukHrsOEGidsK3g6PFyYBZmbg933xMq1MTlF35M Ula9PhlWrvvpA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 289C9C35FF6; Thu, 13 Mar 2025 23:11:01 +0000 (UTC) From: =?utf-8?q?J=2E_Neusch=C3=A4fer_via_B4_Relay?= Date: Fri, 14 Mar 2025 00:11:00 +0100 Subject: [PATCH v2 2/2] arm64: dts: amlogic: Add Ugoos AM3 MIME-Version: 1.0 Message-Id: <20250314-ugoos-am3-v2-2-422104b0cec5@posteo.net> References: <20250314-ugoos-am3-v2-0-422104b0cec5@posteo.net> In-Reply-To: <20250314-ugoos-am3-v2-0-422104b0cec5@posteo.net> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Martin Blumenstingl , Jerome Brunet , Kevin Hilman Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1741907460; l=4596; i=j.ne@posteo.net; s=20240329; h=from:subject:message-id; bh=m3invKokLgdJ1eCdXuhwHYci6oBGOULnHFVI8Wy8tiI=; b=h5PCF4nsdbjTbwVFveX7lFEADyFz+xxk+07lMMMq6sLw/WUAvtmvQjLPr91KEmOCSjRsUAvKy uwyGgJ5YPgnBYGmkPOb8gWawgVEoEbBrfGGWI2N4hsP9SLcMLXum8OY X-Developer-Key: i=j.ne@posteo.net; a=ed25519; pk=NIe0bK42wNaX/C4bi6ezm7NJK0IQE+8MKBm7igFMIS4= X-Endpoint-Received: by B4 Relay for j.ne@posteo.net/20240329 with auth_id=156 X-Original-From: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250313_161102_283191_568C5DA5 X-CRM114-Status: GOOD ( 17.09 ) 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: , Reply-To: j.ne@posteo.net Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: "J. Neuschäfer" The Ugoos AM3 is a small set-top box based on the Amlogic S912 SoC, with a board design that is very close to the Q20x development boards. The MMC max-frequency properties are copied from the downstream device tree. https://ugoos.com/ugoos-am3-16g The following functionality has been tested and is known to work: - debug serial port - "update" button inside the case - USB host mode, on all three ports - HDMI video/audio output - eMMC, MicroSD, and SDIO WLAN - S/PDIF audio output - Ethernet - Infrared remote control input The following functionality doesn't seem to work: - USB role switching and device mode on the "OTG" port - case LED Signed-off-by: J. Neuschäfer --- V2: - Fix vendor name in patch subject - Remove incorrect override of SDIO pwrseq reset line --- arch/arm64/boot/dts/amlogic/Makefile | 1 + .../arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi | 2 +- .../arm64/boot/dts/amlogic/meson-gxm-ugoos-am3.dts | 91 ++++++++++++++++++++++ 3 files changed, 93 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile index 2fbda8419c65a3056410ac45ca3ddaceb69ea4f5..bf2bc14528bfa27e8d6ae2730085fc356d6c6dd8 100644 --- a/arch/arm64/boot/dts/amlogic/Makefile +++ b/arch/arm64/boot/dts/amlogic/Makefile @@ -76,6 +76,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q200.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q201.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-rbox-pro.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-libretech-pc.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-gxm-ugoos-am3.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-vega-s96.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-wetek-core2.dtb dtb-$(CONFIG_ARCH_MESON) += meson-s4-s805x2-aq222.dtb diff --git a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi index 45ccddd1aaf0546632c81a52c8917a923beae883..4223b26f7d0f3aa47e42e9434d24f73b20441981 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi @@ -97,7 +97,7 @@ sdio_pwrseq: sdio-pwrseq { clock-names = "ext_clock"; }; - cvbs-connector { + cvbs_connector: cvbs-connector { compatible = "composite-video-connector"; port { diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-ugoos-am3.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-ugoos-am3.dts new file mode 100644 index 0000000000000000000000000000000000000000..ba871f3f53bb99b47b325bae228b59b722c5123b --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-gxm-ugoos-am3.dts @@ -0,0 +1,91 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2025 J. Neuschäfer + * + * Debug UART (3.3V, 115200 baud) at the corner of the board: + * (4) (3) (2) [1] + * Vcc RXD TXD GND + */ + +/dts-v1/; + +#include +#include + +#include "meson-gxm.dtsi" +#include "meson-gx-p23x-q20x.dtsi" + +/ { + compatible = "ugoos,am3", "amlogic,s912", "amlogic,meson-gxm"; + model = "Ugoos AM3"; + + adc-keys { + compatible = "adc-keys"; + io-channels = <&saradc 0>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <1710000>; + + button-function { + label = "Update"; + linux,code = ; + press-threshold-microvolt = <10000>; + }; + }; +}; + +&cvbs_connector { + /* Not used on this board */ + status = "disabled"; +}; + +ðmac { + pinctrl-0 = <ð_pins>; + pinctrl-names = "default"; + + /* Select external PHY by default */ + phy-handle = <&external_phy>; + + amlogic,tx-delay-ns = <2>; + + /* External PHY is in RGMII */ + phy-mode = "rgmii"; + + status = "okay"; +}; + +&external_mdio { + external_phy: ethernet-phy@0 { + /* Realtek RTL8211F (0x001cc916) */ + reg = <0>; + + reset-assert-us = <10000>; + reset-deassert-us = <80000>; + reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>; + + interrupt-parent = <&gpio_intc>; + /* MAC_INTR on GPIOZ_15 */ + interrupts = <25 IRQ_TYPE_LEVEL_LOW>; + }; +}; + +&i2c_B { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c_b_pins>; + + rtc: rtc@51 { + compatible = "haoyu,hym8563"; + reg = <0x51>; + #clock-cells = <0>; + }; +}; + +/* WLAN: Atheros 10k (QCA9377) */ +&sd_emmc_a { + max-frequency = <200000000>; +}; + +/* eMMC */ +&sd_emmc_c { + max-frequency = <100000000>; +};