From nobody Thu Nov 12 09:51:47 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 4jQFz76nRpz70KHh for ; Thu, 12 Nov 2026 09:51:47 +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 4jQFz71sqtz3GZR for ; Thu, 12 Nov 2026 09:51:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794477107; 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=aWyf/Qjvg3wGpTgnqrlKkHryR1f2HTCCPtUQ5gKHOYc=; b=FqeI5ZxDqjdbNAUhTqPNrqqKywocL6CjzXwl5lYgUHF4rg/rQ5Wm1ku5q4bM2AWc05YwWf +V7f5zasewTaQkt+MVy9F17hakGFBDIVQ7z3cCNktl+fyk4hSrNE1ee8A8Ygo5naIBNsU7 oq6AnIIh1TKYIWxxZfXUOndUwaqzYMGcNgiVVqaqQe9m+qdt/wT89F2odOw3o3iVFblxR/ lh6gTHANaVSta8oUI9az3gBswgiQUnuzZivNkt5p2dNPG4Gq3lbYt5pdI5lLVh+bVyh4Ti 2rW7EeZYbU1833WlluA6L/BnyTbH17N1XKiWCRi72rF1oMuNM1nb3k9UX4WwWQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794477107; b=OeIa7KIr6SBzTwRzAJfRPu36+UPqiVzE14M8xPii83Y4gneXa1kGsh6sr1TYjheBT071X+ GM+3fYr2M92bCiezCLepAjmB8L3HG+nFWV04O3Qid8ZeAX8ZQswAX9z3umFk54ces/wpkI rHl3BtDoxB3nCpvU2RbucTsfY8fPsTgXCNg5OUt0pCXVxaoIK+Wj/xixjpI/j+08mtB0fg xkfThveFCB2LFXw/3CmaxLUgbF4WNmA9ZzCiFYz1YyPpCKYlg5QzoKWkEK4TzcCd82VYLv 9RFSnSzzzD5Fv+6Oe4CNylyWnBsceUz1CwzX9EXbF7eeGGugSNLme3Xx+dSQNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794477107; 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=aWyf/Qjvg3wGpTgnqrlKkHryR1f2HTCCPtUQ5gKHOYc=; b=GR1/w5sG4CpiYiaQUnM3jpNPNetf3NJ3ftqKbN6NJTax5UCPMHTNAhWroYjyLAJvGdAnPR QQwjzGwcdzdN0/m84iSfavM98dfaIeaRxi+lLR6il4qmwbZeRwX1LblNyNvL0ZvLAjmPVB aW9Jeb0ji/f7+/RWiFpJ1m9Z2lvvFDlGSho8MD6/6VLNuTUwIF26M3xi1gf0G91WEt3vGm WflH1vYuNc1u7HDECGfBze5U1zwS7wCYyisanZzLVTKqttf6ScBIEZ0kyVbeHb7AI944GT 5RBPRKUncuaLKR/Ctz0wwqb/JIsFTBPDXXeUggu5+0UA9K42qL7lEUeJsI7KCg== 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 4jQFz71WQhzyC0 for ; Thu, 12 Nov 2026 09:51:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 20170 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 12 Nov 2026 09:51:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 69919babdac7 - main - aw_ccu: h6: Add the IR, W1, RSB and RTC clocks of the R CCU 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: 69919babdac77d403e0570c5fd4e6e37514d3224 Auto-Submitted: auto-generated Date: Thu, 12 Nov 2026 09:51:47 +0000 Message-Id: <6af58c33.20170.4f98dde3@gitrepo.freebsd.org> The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=69919babdac77d403e0570c5fd4e6e37514d3224 commit 69919babdac77d403e0570c5fd4e6e37514d3224 Author: Emmanuel Vadot AuthorDate: 2026-11-10 17:34:48 +0000 Commit: Emmanuel Vadot CommitDate: 2026-11-12 09:47:32 +0000 aw_ccu: h6: Add the IR, W1, RSB and RTC clocks of the R CCU Add the IR and 1-wire module clocks, which are a gate, a mux, a power of two N and a M, the RSB and RTC bus gates and the RSB reset. The manual does not document the registers of the R CCU, the offsets and the fields are the ones used by Linux. Tested on: H6 --- sys/dev/clk/allwinner/ccu_h6_r.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/sys/dev/clk/allwinner/ccu_h6_r.c b/sys/dev/clk/allwinner/ccu_h6_r.c index 4ca5e86cc436..6d473d67301e 100644 --- a/sys/dev/clk/allwinner/ccu_h6_r.c +++ b/sys/dev/clk/allwinner/ccu_h6_r.c @@ -57,6 +57,7 @@ static struct aw_ccung_reset ccu_sun50i_h6_r_resets[] = { CCU_RESET(RST_R_APB1_PWM, 0x13c, 16) CCU_RESET(RST_R_APB2_UART, 0x18c, 16) CCU_RESET(RST_R_APB2_I2C, 0x19c, 16) + CCU_RESET(RST_R_APB2_RSB, 0x1bc, 16) CCU_RESET(RST_R_APB1_IR, 0x1cc, 16) CCU_RESET(RST_R_APB1_W1, 0x1ec, 16) }; @@ -67,8 +68,10 @@ static struct aw_ccung_gate ccu_sun50i_h6_r_gates[] = { CCU_GATE(CLK_R_APB1_PWM, "r_apb1-pwm", "r_apb1", 0x13c, 0) CCU_GATE(CLK_R_APB2_UART, "r_apb1-uart", "r_apb2", 0x18c, 0) CCU_GATE(CLK_R_APB2_I2C, "r_apb1-i2c", "r_apb2", 0x19c, 0) + CCU_GATE(CLK_R_APB2_RSB, "r_apb2-rsb", "r_apb2", 0x1bc, 0) CCU_GATE(CLK_R_APB1_IR, "r_apb1-ir", "r_apb1", 0x1cc, 0) CCU_GATE(CLK_R_APB1_W1, "r_apb1-w1", "r_apb1", 0x1ec, 0) + CCU_GATE(CLK_R_APB1_RTC, "r_apb1-rtc", "r_apb1", 0x20c, 0) }; static const char *ar100_parents[] = {"osc24M", "osc32k", "pll_periph0", "iosc"}; @@ -107,11 +110,36 @@ PREDIV_CLK(r_apb2_clk, CLK_R_APB2, /* id */ 8, 5, 0, AW_CLK_FACTOR_HAS_COND, /* prediv */ 16, 2, 2); /* prediv condition */ +/* + * The IR and 1-wire module clocks. The information about the IR clock + * comes from the BSP and the 1-wire clock is the same. + */ +static const char *r_mod0_parents[] = {"osc32k", "osc24M"}; +NM_CLK(ir_clk, + CLK_IR, "ir", r_mod0_parents, /* id, name, parents */ + 0x1c0, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 5, 0, 0, /* m factor */ + 24, 1, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX); /* flags */ + +NM_CLK(w1_clk, + CLK_W1, "w1", r_mod0_parents, /* id, name, parents */ + 0x1e0, /* offset */ + 8, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* n factor */ + 0, 5, 0, 0, /* m factor */ + 24, 1, /* mux */ + 31, /* gate */ + AW_CLK_HAS_GATE | AW_CLK_HAS_MUX); /* flags */ + static struct aw_ccung_clk clks[] = { { .type = AW_CLK_PREDIV_MUX, .clk.prediv_mux = &ar100_clk}, { .type = AW_CLK_FIXED, .clk.fixed = &r_ahb_clk}, { .type = AW_CLK_DIV, .clk.div = &r_apb1_clk}, { .type = AW_CLK_PREDIV_MUX, .clk.prediv_mux = &r_apb2_clk}, + { .type = AW_CLK_NM, .clk.nm = &ir_clk}, + { .type = AW_CLK_NM, .clk.nm = &w1_clk}, }; static struct ofw_compat_data compat_data[] = {