From: "H. Nikolaus Schaller" <hns@goldelico.com>
To: Stephen Boyd <sboyd@kernel.org>,
Brian Masney <bmasney+clk@redhat.com>,
Jerome Brunet <jbrunet+clk@baylibre.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Paul Cercueil <paul@crapouillou.net>
Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org,
letux-kernel@openphoenux.org, kernel@pyra-handheld.com,
"H. Nikolaus Schaller" <hns@goldelico.com>,
Paul Boddie <paul@boddie.org.uk>
Subject: [PATCH 1/4] dt-bindings: clock: Add Ingenic X1600 CGU bindings
Date: Sun, 25 Oct 2026 20:18:24 +0100 [thread overview]
Message-ID: <13abd95aaab56ce5c9dc565db7f0198162b0c166.1792955907.git.hns@goldelico.com> (raw)
In-Reply-To: <cover.1792955907.git.hns@goldelico.com>
Add the device tree bindings and the clock ID definitions for the
Clock Generation Unit (CGU) of the Ingenic X1600 SoC.
The clock layout features specific I2S handling. To properly support
the I2S controllers on the X1600 without relying on complex compound
dividers that are not yet natively supported by the drivers, split
the structures to explicitly describe the additional I2S divider
fields. This design accounts for the current driver limitations
regarding division encoding while matching the hardware's internal
gating architecture.
Furthermore, introduce dedicated I2S0 RX and TX clock definitions to
allow independent and precise routing for I2S stream usage.
Co-developed-by: Paul Boddie <paul@boddie.org.uk>
Signed-off-by: Paul Boddie <paul@boddie.org.uk>
Co-developed-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
.../bindings/clock/ingenic,cgu.yaml | 2 +
include/dt-bindings/clock/ingenic,x1600-cgu.h | 64 +++++++++++++++++++
2 files changed, 66 insertions(+)
create mode 100644 include/dt-bindings/clock/ingenic,x1600-cgu.h
diff --git a/Documentation/devicetree/bindings/clock/ingenic,cgu.yaml b/Documentation/devicetree/bindings/clock/ingenic,cgu.yaml
index 509df06b9c9d8..c622131c5c49b 100644
--- a/Documentation/devicetree/bindings/clock/ingenic,cgu.yaml
+++ b/Documentation/devicetree/bindings/clock/ingenic,cgu.yaml
@@ -28,6 +28,7 @@ select:
- ingenic,jz4770-cgu
- ingenic,jz4780-cgu
- ingenic,x1000-cgu
+ - ingenic,x1600-cgu
- ingenic,x1830-cgu
required:
- compatible
@@ -58,6 +59,7 @@ properties:
- ingenic,jz4770-cgu
- ingenic,jz4780-cgu
- ingenic,x1000-cgu
+ - ingenic,x1600-cgu
- ingenic,x1830-cgu
- const: simple-mfd
minItems: 1
diff --git a/include/dt-bindings/clock/ingenic,x1600-cgu.h b/include/dt-bindings/clock/ingenic,x1600-cgu.h
new file mode 100644
index 0000000000000..a0001a63a6b54
--- /dev/null
+++ b/include/dt-bindings/clock/ingenic,x1600-cgu.h
@@ -0,0 +1,64 @@
+/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
+/*
+ * This header provides clock numbers for the ingenic,x1600-cgu DT binding.
+ *
+ * They are roughly ordered as:
+ * - external clocks
+ * - PLLs
+ * - muxes/dividers in the order they appear in the x1600 programmers manual
+ * - gates in order of their bit in the CLKGR* registers
+ */
+
+#ifndef __DT_BINDINGS_CLOCK_X1600_CGU_H__
+#define __DT_BINDINGS_CLOCK_X1600_CGU_H__
+
+/*
+ * beware of unwritten rules:
+ * - list must start with 0
+ * - list must not have "holes"
+ * - all clock parents must have lower number than a clock itself so that
+ * parents are initialized before
+ */
+
+#define X1600_CLK_EXCLK 0
+#define X1600_CLK_RTCLK 1
+#define X1600_CLK_12M 2
+#define X1600_CLK_APLL 3
+#define X1600_CLK_EPLL 4
+#define X1600_CLK_MPLL 5
+#define X1600_CLK_SCLKA 6
+#define X1600_CLK_CPUMUX 7
+#define X1600_CLK_CPU 8
+#define X1600_CLK_L2CACHE 9
+#define X1600_CLK_AHB0 10
+#define X1600_CLK_AHB2PMUX 11
+#define X1600_CLK_AHB2 12
+#define X1600_CLK_PCLK 13
+#define X1600_CLK_DDR 14
+#define X1600_CLK_I2S0 15
+#define X1600_CLK_I2S1 16
+#define X1600_CLK_LCDPIXCLK 17
+#define X1600_CLK_MAC 18
+#define X1600_CLK_MSC0 19
+#define X1600_CLK_MSC1 20
+#define X1600_CLK_SSI0 21
+#define X1600_CLK_CIMMCLK 22
+#define X1600_CLK_EXCLK_DIV512 23
+#define X1600_CLK_RTC 24
+#define X1600_CLK_OTGPHY 25
+#define X1600_CLK_NEMC 26
+#define X1600_CLK_OTG0 27
+#define X1600_CLK_SMB0 28
+#define X1600_CLK_SMB1 29
+#define X1600_CLK_AIC 30
+#define X1600_CLK_SADC 31
+#define X1600_CLK_UART0 32
+#define X1600_CLK_UART1 33
+#define X1600_CLK_UART2 34
+#define X1600_CLK_UART3 35
+#define X1600_CLK_PDMA 36
+#define X1600_CLK_AES 37
+#define X1600_CLK_I2S0_RX 38
+#define X1600_CLK_I2S0_TX 39
+
+#endif /* __DT_BINDINGS_CLOCK_X1600_CGU_H__ */
--
2.56.0
next prev parent reply other threads:[~2026-10-25 19:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-25 19:18 [PATCH 0/4] clk / clocksource: Add Ingenic X1600 SoC support H. Nikolaus Schaller
2026-10-25 19:18 ` H. Nikolaus Schaller [this message]
2026-10-30 11:24 ` [PATCH 1/4] dt-bindings: clock: Add Ingenic X1600 CGU bindings Krzysztof Kozlowski
2026-10-30 11:24 ` Krzysztof Kozlowski
2026-10-30 12:06 ` H. Nikolaus Schaller
2026-10-25 19:18 ` [PATCH 2/4] clk: ingenic: Add Ingenic X1600 CGU clock driver support H. Nikolaus Schaller
2026-10-26 10:16 ` kernel test robot
2026-11-11 21:43 ` Brian Masney
2026-11-11 21:51 ` H. Nikolaus Schaller
2026-10-25 19:18 ` [PATCH 3/4] clk: ingenic: jz4760-cgu: Adapt calc_m_n_od() to core framework changes H. Nikolaus Schaller
2026-10-25 22:54 ` Paul Cercueil
2026-10-25 19:18 ` [PATCH 4/4] clk: ingenic: x1000-cgu: " H. Nikolaus Schaller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=13abd95aaab56ce5c9dc565db7f0198162b0c166.1792955907.git.hns@goldelico.com \
--to=hns@goldelico.com \
--cc=bmasney+clk@redhat.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jbrunet+clk@baylibre.com \
--cc=kernel@pyra-handheld.com \
--cc=krzk+dt@kernel.org \
--cc=letux-kernel@openphoenux.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=paul@boddie.org.uk \
--cc=paul@crapouillou.net \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®