linux-postmarketos-amlogic: add FiberHome HG680-P DTS

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8944>
This commit is contained in:
Stanley 2026-07-02 23:01:56 +07:00 committed by The Friendly Meow (merge) Bot
parent 34d14fbc86
commit 977381df0c
No known key found for this signature in database
2 changed files with 252 additions and 1 deletions

View file

@ -0,0 +1,249 @@
From fcaedf20d6626cded661efc717cd5e365739e6b6 Mon Sep 17 00:00:00 2001
From: Stanley Ang <me@stanley.id>
Date: Thu, 2 Jul 2026 22:46:07 +0700
Subject: [PATCH] arm64: dts: amlogic: add support for FiberHome HG680-P
The FiberHome HG680-P is an S905X-based IPTV set-top box. Based on the P212 DTS with the following differences:
- No Bluetooth
- SDIO bus runs at 100 MHz instead of 50 MHz
- WiFi is Realtek RTL8189FTV (SDIO ID 0x024c:0xF179)
---
arch/arm64/boot/dts/amlogic/Makefile | 1 +
.../meson-gxl-s905x-fiberhome-hg680p.dts | 216 ++++++++++++++++++
2 files changed, 217 insertions(+)
create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-fiberhome-hg680p.dts
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
index 57bc440fa55cca..fe130e0b6e1068 100644
--- a/arch/arm64/boot/dts/amlogic/Makefile
+++ b/arch/arm64/boot/dts/amlogic/Makefile
@@ -65,6 +65,7 @@ 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
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-x96-mini.dtb
+dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-fiberhome-hg680p.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-zte-b860h.dtb
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-fiberhome-hg680p.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-fiberhome-hg680p.dts
new file mode 100644
index 00000000000000..40c31fa539e99a
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-fiberhome-hg680p.dts
@@ -0,0 +1,216 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2026 Stanley Ang <me@stanley.id>
+ *
+ * Based on meson-gxl-s905x-p212.dts and meson-gxl-s905x-vero4k.dts:
+ * - Copyright (c) 2016 Endless Computers, Inc.
+ * Author: Carlo Caione <carlo@endlessm.com>
+ * - Copyright (c) 2024 Christian Hewitt <christianshewitt@gmail.com>
+ */
+
+/dts-v1/;
+
+#include "meson-gxl-s905x-p212.dtsi"
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/sound/meson-aiu.h>
+
+/ {
+ compatible = "fiberhome,hg680p", "amlogic,s905x", "amlogic,meson-gxl";
+ model = "FiberHome HG680P";
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-power-green {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_POWER;
+ gpios = <&gpio GPIOH_8 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ panic-indicator;
+ };
+
+ led-power-red {
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_POWER;
+ gpios = <&gpio GPIOH_9 GPIO_ACTIVE_HIGH>;
+ default-state = "off";
+ };
+
+ led-lan-red {
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_LAN;
+ gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "netdev";
+ };
+
+ led-ir {
+ color = <LED_COLOR_ID_RED>;
+ function = "ir";
+ gpios = <&gpio_ao GPIOAO_6 GPIO_ACTIVE_HIGH>;
+ default-state = "off";
+ };
+ };
+
+ dio2122h: 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 = "HG680-P";
+ audio-aux-devs = <&dio2122h>;
+ 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";
+
+ clocks = <&clkc CLKID_MPLL0>,
+ <&clkc CLKID_MPLL1>,
+ <&clkc CLKID_MPLL2>;
+
+ 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>;
+ };
+};
+
+&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>;
+ };
+};
+
+&ethmac {
+ phy-mode = "rmii";
+ phy-handle = <&internal_phy>;
+};
+
+/* RTL8189FTV needs max-frequency set to 100 MHz */
+&sd_emmc_a {
+ max-frequency = <100000000>;
+};
+
+/* RTL8189FTV has no Bluetooth; drop the brcm node from p212.dtsi */
+&uart_A {
+ status = "disabled";
+ /delete-node/ bluetooth;
+};
+
+/* This UART is brought out to the DB9 connector */
+&uart_AO {
+ status = "okay";
+};

View file

@ -4,7 +4,7 @@
maintainer="Ferass El Hafidi <funderscore@postmarketos.org>"
pkgname=linux-postmarketos-amlogic
pkgver=7.1.1
pkgrel=1
pkgrel=2
pkgdesc="Mainline kernel for Amlogic devices"
arch="aarch64"
_carch="arm64"
@ -62,6 +62,7 @@ source="
0020-sdio-improve-wifi-speed.patch
0021-WORKAROUND-meson-plane-disable-afbc-32x8.patch
0022-arm64-dts-amlogic-add-zte-b860h-v1v2.patch
0023-arm64-dts-amlogic-add-fiberhome-hg680p.patch
"
builddir="$srcdir/linux-$pkgver"
@ -114,4 +115,5 @@ d21d3ac5e7e86e8df1b7634fa4f3ebaab47aaced021ec034d84f9478ee986707360db413d81b9f16
f6fb37ac0aa876f8d95ed598be20263417d8522a3c1f48a4ce148f95e6c6774664048064f4a96ff7f90ba3b4f71695ba8c51df2da3310bb820f627991d288851 0020-sdio-improve-wifi-speed.patch
3d38202c1b5b56f25c16664924b72e6041e7911e71985a028b91c7151758659a2e662009c06342a0fddd8d829df03d6feb8ee929c550fde74a16f955cb01ae30 0021-WORKAROUND-meson-plane-disable-afbc-32x8.patch
4a8bbd4d3c00e760ceb6e02eedd590b4dc20641276e4f9058c932d1cc0a2bbfa4a1b122296f052b6dfad6d01a155b7dc28a925f9c6982dfc7b9ebf2ea0ad2a86 0022-arm64-dts-amlogic-add-zte-b860h-v1v2.patch
c85b997a9c6bc9190550a933f0bfd75bb834efc570869e6c6b9d8a2b8f93cf16f5f0bb6672b0451d4f1c7aa7878b32407b2d5007588fb1adeb5432028a6e2c8e 0023-arm64-dts-amlogic-add-fiberhome-hg680p.patch
"