Skip to content

Commit b33f8cf

Browse files
neuschaefersuperna9999
authored andcommitted
arm64: dts: amlogic: Add Ugoos AM3
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 Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: J. Neuschäfer <j.ne@posteo.net> Link: https://lore.kernel.org/r/20250613-ugoos-am3-v3-2-f8a43e6bbfdb@posteo.net Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
1 parent ef491ab commit b33f8cf

3 files changed

Lines changed: 93 additions & 1 deletion

File tree

arch/arm64/boot/dts/amlogic/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q200.dtb
8080
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q201.dtb
8181
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-rbox-pro.dtb
8282
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-libretech-pc.dtb
83+
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-ugoos-am3.dtb
8384
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-vega-s96.dtb
8485
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-wetek-core2.dtb
8586
dtb-$(CONFIG_ARCH_MESON) += meson-s4-s805x2-aq222.dtb

arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
clock-names = "ext_clock";
9898
};
9999

100-
cvbs-connector {
100+
cvbs_connector: cvbs-connector {
101101
compatible = "composite-video-connector";
102102

103103
port {
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
/*
3+
* Copyright (C) 2025 J. Neuschäfer <j.ne@posteo.net>
4+
*
5+
* Debug UART (3.3V, 115200 baud) at the corner of the board:
6+
* (4) (3) (2) [1]
7+
* Vcc RXD TXD GND
8+
*/
9+
10+
/dts-v1/;
11+
12+
#include <dt-bindings/input/input.h>
13+
#include <dt-bindings/interrupt-controller/amlogic,meson-g12a-gpio-intc.h>
14+
15+
#include "meson-gxm.dtsi"
16+
#include "meson-gx-p23x-q20x.dtsi"
17+
18+
/ {
19+
compatible = "ugoos,am3", "amlogic,s912", "amlogic,meson-gxm";
20+
model = "Ugoos AM3";
21+
22+
adc-keys {
23+
compatible = "adc-keys";
24+
io-channels = <&saradc 0>;
25+
io-channel-names = "buttons";
26+
keyup-threshold-microvolt = <1710000>;
27+
28+
button-function {
29+
label = "Update";
30+
linux,code = <KEY_VENDOR>;
31+
press-threshold-microvolt = <10000>;
32+
};
33+
};
34+
};
35+
36+
&cvbs_connector {
37+
/* Not used on this board */
38+
status = "disabled";
39+
};
40+
41+
&ethmac {
42+
pinctrl-0 = <&eth_pins>;
43+
pinctrl-names = "default";
44+
45+
/* Select external PHY by default */
46+
phy-handle = <&external_phy>;
47+
48+
amlogic,tx-delay-ns = <2>;
49+
50+
/* External PHY is in RGMII */
51+
phy-mode = "rgmii";
52+
53+
status = "okay";
54+
};
55+
56+
&external_mdio {
57+
external_phy: ethernet-phy@0 {
58+
/* Realtek RTL8211F (0x001cc916) */
59+
reg = <0>;
60+
61+
reset-assert-us = <10000>;
62+
reset-deassert-us = <80000>;
63+
reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
64+
65+
interrupt-parent = <&gpio_intc>;
66+
/* MAC_INTR on GPIOZ_15 */
67+
interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
68+
};
69+
};
70+
71+
&i2c_B {
72+
status = "okay";
73+
pinctrl-names = "default";
74+
pinctrl-0 = <&i2c_b_pins>;
75+
76+
rtc: rtc@51 {
77+
compatible = "haoyu,hym8563";
78+
reg = <0x51>;
79+
#clock-cells = <0>;
80+
};
81+
};
82+
83+
/* WLAN: Atheros 10k (QCA9377) */
84+
&sd_emmc_a {
85+
max-frequency = <200000000>;
86+
};
87+
88+
/* eMMC */
89+
&sd_emmc_c {
90+
max-frequency = <100000000>;
91+
};

0 commit comments

Comments
 (0)