From nobody Thu Nov 12 09:51:45 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jQFz54V9cz70KL6 for ; Thu, 12 Nov 2026 09:51:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jQFz51cKXz3Gc9 for ; Thu, 12 Nov 2026 09:51:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794477105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=11G/Bg4gbKiMcCZNS++d38KbCJr4od0Q5LZfxMkALhM=; b=FqetWyApHBizOLgyc0FejKGConEZojZqGy6U6sYOMiO/+5axb3E42u9h6kfiiz/RQKz4c2 qWQqOmvtuwZFm1w5MiaIbOyby25AQ7Wh4nqhIxhTCsqMqTed00QWETrEM7fngMXKqHQ8BZ hKAyJnk4PCLlH3FyMRDgLRnyy99V1SI0azRaBDDJArBjZiZEsFEai8EDVNcjNYUoTbZ5wN 950B2GmwyftVmn4qz0A3Qn3VoEoimz4k11N7ms/W5CoT8hKMV37nx2BQqYAn0DewFIRQKL MxAJgwhTAdUsrfSnQyLOIl7q/lRU++H7KfUlInLzDfye7KrwRgmtyO1xFJ84Ng== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794477105; b=cgQPHM+dk8LaJL/a7B43NRG3AI2NEjtzZPmSdrgyWDWnGvynVClJo8D3JE9M+ggpUtxDtK c8oS6/EE/j7/CUt9t8OOylyjaL/3JqdxGmH8xfz4DieuS5jmx5Vcqr8zx3xWLElh94k+/6 313mQG0m0gMDcKPSwEZZDvDugGGcta2b7qwiXVhcPxsib3UGG8JLAea4P9Y6ovARV58BSh M6ONRhBCUISoqd5cqrlBAjzXWBBtCmQTsFPWvuxJ42kYUZMOIACu9uRpW8FP6zQUcvt7cu aI2dU72Q801Gj+JJsENf+iILWz4lZGAjdW6bJYnrNWVFKnEa1/scp3GGGKPhDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794477105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=11G/Bg4gbKiMcCZNS++d38KbCJr4od0Q5LZfxMkALhM=; b=wc+0u56Pr/zJuCNRYnhfT61EIrSDntlgJddUJtRVp+w25Vg274hBEOX/mt21is9dfNqDbp CFdngfDZhVsqTyIfXdo4ITtnBJWpv7KzeZmdoRRB7JWjouAAklEwl4cpvkZo5hNYKD9lvF mTloxTw52MGE/qlxFHNdDwr4IdF7k9dSQ9RbMfEaSMNXgPfDS2xyms8+drg2qu8C4qWvw4 LaEyoS/y1LYMTXP98Ihcx9ICkQgBTdr3+1BRdMRtRUD0aUahVXNOsLFvzoQGRADZi2dVfH 4Rf/sbEKFIx7ffi8m4uyxbN0yIlO3Sos10ENdhmOX9jkgTHZvWVJQ+5yihz65Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jQFz50tPFzxhv for ; Thu, 12 Nov 2026 09:51:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f958 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 12 Nov 2026 09:51:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 4b958e7d8129 - main - aw_ccu: h6: Add the PCIe clocks List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4b958e7d8129c377983be6ec2e25593292bb4df7 Auto-Submitted: auto-generated Date: Thu, 12 Nov 2026 09:51:45 +0000 Message-Id: <6af58c31.1f958.1090c49d@gitrepo.freebsd.org> The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=4b958e7d8129c377983be6ec2e25593292bb4df7 commit 4b958e7d8129c377983be6ec2e25593292bb4df7 Author: Emmanuel Vadot AuthorDate: 2026-11-10 17:26:16 +0000 Commit: Emmanuel Vadot CommitDate: 2026-11-12 09:47:32 +0000 aw_ccu: h6: Add the PCIe clocks Add the 100MHz reference clock, which is PLL_PERIPH0(4X) divided by 24, its two gates, the MAXI and AUX clocks, and the bus gate and the two resets of PCIe. Tested on: H6 --- sys/dev/clk/allwinner/ccu_h6.c | 44 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/sys/dev/clk/allwinner/ccu_h6.c b/sys/dev/clk/allwinner/ccu_h6.c index f5bac63420ba..2a9d7895d8c5 100644 --- a/sys/dev/clk/allwinner/ccu_h6.c +++ b/sys/dev/clk/allwinner/ccu_h6.c @@ -188,6 +188,10 @@ static struct aw_ccung_reset h6_ccu_resets[] = { CCU_RESET(RST_BUS_EHCI3, 0xa8c, 23) CCU_RESET(RST_BUS_OTG, 0xa8c, 24) + /* PCIE_BGR_REG */ + CCU_RESET(RST_BUS_PCIE, 0xabc, 16) + CCU_RESET(RST_PCIE_POWERUP, 0xabc, 17) + /* HDMI_BGR_REG */ CCU_RESET(RST_BUS_HDMI, 0xb1c, 16) CCU_RESET(RST_BUS_HDMI_SUB, 0xb1c, 17) @@ -327,6 +331,13 @@ static struct aw_ccung_gate h6_ccu_gates[] = { CCU_GATE(CLK_BUS_EHCI3, "bus-ehci3", "ahb3", 0xa8c, 7) CCU_GATE(CLK_BUS_OTG, "bus-otg", "ahb3", 0xa8c, 8) + /* PCIE_REF_CLK_REG */ + CCU_GATE(CLK_PCIE_REF, "pcie-ref", "pcie-ref-100M", 0xab0, 31) + CCU_GATE(CLK_PCIE_REF_OUT, "pcie-ref-out", "pcie-ref", 0xab0, 30) + + /* PCIE_BGR_REG */ + CCU_GATE(CLK_BUS_PCIE, "bus-pcie", "psi_ahb1_ahb2", 0xabc, 0) + /* HDMI_SLOW_CLK_REG */ CCU_GATE(CLK_HDMI_SLOW, "hdmi-slow", "osc24M", 0xb04, 31) @@ -832,6 +843,35 @@ M_CLK(hdcp_clk, 31, /* gate */ AW_CLK_HAS_GATE | AW_CLK_HAS_MUX); /* flags */ +/* PLL_PERIPH0(4X) divided by 24 is the 100MHz reference clock of PCIe */ +static const char *pcie_ref_100m_parents[] = {"pll_periph0_4x"}; +FIXED_CLK(pcie_ref_100m_clk, + CLK_PCIE_REF_100M, /* id */ + "pcie-ref-100M", /* name */ + pcie_ref_100m_parents, /* parent */ + 0, /* freq */ + 1, /* mult */ + 24, /* div */ + 0); /* flags */ + +static const char *pcie_maxi_parents[] = {"pll_periph0"}; +M_CLK(pcie_maxi_clk, + CLK_PCIE_MAXI, "pcie-maxi", pcie_maxi_parents, /* id, name, parents */ + 0xab4, /* offset */ + 0, 4, 0, 0, /* m factor */ + 0, 0, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE); /* flags */ + +static const char *pcie_aux_parents[] = {"osc24M"}; +M_CLK(pcie_aux_clk, + CLK_PCIE_AUX, "pcie-aux", pcie_aux_parents, /* id, name, parents */ + 0xab8, /* offset */ + 0, 5, 0, 0, /* m factor */ + 0, 0, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE); /* flags */ + static struct aw_ccung_clk h6_ccu_clks[] = { { .type = AW_CLK_NP, .clk.np = &pll_cpux_clk}, { .type = AW_CLK_NMM, .clk.nmm = &pll_ddr0_clk}, @@ -870,6 +910,10 @@ static struct aw_ccung_clk h6_ccu_clks[] = { { .type = AW_CLK_NM, .clk.nm = &emce_clk}, { .type = AW_CLK_M, .clk.m = &vp9_clk}, + { .type = AW_CLK_FIXED, .clk.fixed = &pcie_ref_100m_clk}, + { .type = AW_CLK_M, .clk.m = &pcie_maxi_clk}, + { .type = AW_CLK_M, .clk.m = &pcie_aux_clk}, + { .type = AW_CLK_M, .clk.m = &hdmi_clk}, { .type = AW_CLK_M, .clk.m = &tcon_lcd0_clk}, { .type = AW_CLK_NM, .clk.nm = &tcon_tv0_clk},