public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/2] Airoha EN7581 clock additions
@ 2026-01-08 18:31 Benjamin Larsson
  2026-01-08 18:31 ` [PATCH 1/2] dt-bindings: clock: add IDs for EN7581 Benjamin Larsson
  2026-01-08 18:31 ` [PATCH 2/2] clk: en7523: Add several clocks " Benjamin Larsson
  0 siblings, 2 replies; 4+ messages in thread
From: Benjamin Larsson @ 2026-01-08 18:31 UTC (permalink / raw)
  To: b.larsson, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-clk, linux-kernel,
	devicetree
  Cc: Benjamin Larsson

Add aditional clocks to the clock driver.

Benjamin Larsson (2):
  dt-bindings: clock: add IDs for EN7581
  clk: en7523: Add several clocks for EN7581

 drivers/clk/clk-en7523.c               | 56 ++++++++++++++++++++++++++
 include/dt-bindings/clock/en7523-clk.h |  5 +++
 2 files changed, 61 insertions(+)

-- 
2.51.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] dt-bindings: clock: add IDs for EN7581
  2026-01-08 18:31 [PATCH v1 0/2] Airoha EN7581 clock additions Benjamin Larsson
@ 2026-01-08 18:31 ` Benjamin Larsson
  2026-01-08 20:31   ` Krzysztof Kozlowski
  2026-01-08 18:31 ` [PATCH 2/2] clk: en7523: Add several clocks " Benjamin Larsson
  1 sibling, 1 reply; 4+ messages in thread
From: Benjamin Larsson @ 2026-01-08 18:31 UTC (permalink / raw)
  To: b.larsson, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-clk, linux-kernel,
	devicetree
  Cc: Benjamin Larsson

Add ID for tod_soe, tod_gen, efuse, aes_xpon and fe.

Signed-off-by: Benjamin Larsson <benjamin.larsson@genexis.eu>
---
 include/dt-bindings/clock/en7523-clk.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/dt-bindings/clock/en7523-clk.h b/include/dt-bindings/clock/en7523-clk.h
index edfa64045f52..dee2490b6242 100644
--- a/include/dt-bindings/clock/en7523-clk.h
+++ b/include/dt-bindings/clock/en7523-clk.h
@@ -13,5 +13,10 @@
 #define EN7523_CLK_PCIE		7
 
 #define EN7581_CLK_EMMC		8
+#define EN7581_CLK_TOD_SOE	9
+#define EN7581_CLK_TOD_GEN	10
+#define EN7581_CLK_EFUSE	11
+#define EN7581_CLK_AES_XPON	12
+#define EN7581_CLK_FE		13
 
 #endif /* _DT_BINDINGS_CLOCK_AIROHA_EN7523_H_ */
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] clk: en7523: Add several clocks for EN7581
  2026-01-08 18:31 [PATCH v1 0/2] Airoha EN7581 clock additions Benjamin Larsson
  2026-01-08 18:31 ` [PATCH 1/2] dt-bindings: clock: add IDs for EN7581 Benjamin Larsson
@ 2026-01-08 18:31 ` Benjamin Larsson
  1 sibling, 0 replies; 4+ messages in thread
From: Benjamin Larsson @ 2026-01-08 18:31 UTC (permalink / raw)
  To: b.larsson, Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-clk, linux-kernel,
	devicetree
  Cc: Benjamin Larsson

Add tod_soe, tod_gen, efuse, aes_xpon and fe clocks.

Signed-off-by: Benjamin Larsson <benjamin.larsson@genexis.eu>
---
 drivers/clk/clk-en7523.c | 56 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/drivers/clk/clk-en7523.c b/drivers/clk/clk-en7523.c
index 08cc8e5acf43..1c7d1c315b86 100644
--- a/drivers/clk/clk-en7523.c
+++ b/drivers/clk/clk-en7523.c
@@ -23,6 +23,7 @@
 #define REG_GSW_CLK_DIV_SEL		0x1b4
 #define REG_EMI_CLK_DIV_SEL		0x1b8
 #define REG_BUS_CLK_DIV_SEL		0x1bc
+#define REG_FE_CLK_DIV_SEL		0x1c0
 #define REG_SPI_CLK_DIV_SEL		0x1c4
 #define REG_SPI_CLK_FREQ_SEL		0x1c8
 #define REG_NPU_CLK_DIV_SEL		0x1fc
@@ -93,6 +94,11 @@ static const u32 bus7581_base[] = { 600000000, 540000000 };
 static const u32 npu7581_base[] = { 800000000, 750000000, 720000000, 600000000 };
 static const u32 crypto_base[] = { 540000000, 480000000 };
 static const u32 emmc7581_base[] = { 200000000, 150000000 };
+static const u32 tod_soe7581_base[] = { 540000000, 480000000, 400000000, 400000000 };
+static const u32 tod_gen7581_base[] = { 400000000, 200000000, 150000000, 400000000 };
+static const u32 efuse7581_base[] = { 200000000, 100000000 };
+static const u32 aes_xpon7581_base[] = { 400000000, 200000000 };
+static const u32 fe7581_base[] = { 600000000, 540000000, 480000000, 400000000 };
 
 static const struct en_clk_desc en7523_base_clks[] = {
 	{
@@ -292,6 +298,56 @@ static const struct en_clk_desc en7581_base_clks[] = {
 		.base_shift = 12,
 		.base_values = emmc7581_base,
 		.n_base_values = ARRAY_SIZE(emmc7581_base),
+	}, {
+		.id = EN7581_CLK_TOD_SOE,
+		.name = "tod_soe",
+
+		.base_reg = REG_CRYPTO_CLKSRC2,
+		.base_bits = 2,
+		.base_shift = 6,
+		.base_values = tod_soe7581_base,
+		.n_base_values = ARRAY_SIZE(tod_soe7581_base),
+	}, {
+		.id = EN7581_CLK_TOD_GEN,
+		.name = "tod_gen",
+
+		.base_reg = REG_CRYPTO_CLKSRC2,
+		.base_bits = 2,
+		.base_shift = 4,
+		.base_values = tod_gen7581_base,
+		.n_base_values = ARRAY_SIZE(tod_gen7581_base),
+	}, {
+		.id = EN7581_CLK_EFUSE,
+		.name = "efuse",
+
+		.base_reg = REG_CRYPTO_CLKSRC2,
+		.base_bits = 1,
+		.base_shift = 3,
+		.base_values = efuse7581_base,
+		.n_base_values = ARRAY_SIZE(efuse7581_base),
+	}, {
+		.id = EN7581_CLK_AES_XPON,
+		.name = "aes_xpon",
+
+		.base_reg = REG_CRYPTO_CLKSRC2,
+		.base_bits = 1,
+		.base_shift = 1,
+		.base_values = aes_xpon7581_base,
+		.n_base_values = ARRAY_SIZE(aes_xpon7581_base),
+	}, {
+		.id = EN7581_CLK_FE,
+		.name = "fe",
+
+		.base_reg = REG_FE_CLK_DIV_SEL,
+		.base_bits = 2,
+		.base_shift = 8,
+		.base_values = fe7581_base,
+		.n_base_values = ARRAY_SIZE(fe7581_base),
+
+		.div_bits = 3,
+		.div_shift = 0,
+		.div_step = 1,
+		.div_offset = 1,
 	}
 };
 
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] dt-bindings: clock: add IDs for EN7581
  2026-01-08 18:31 ` [PATCH 1/2] dt-bindings: clock: add IDs for EN7581 Benjamin Larsson
@ 2026-01-08 20:31   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-08 20:31 UTC (permalink / raw)
  To: Benjamin Larsson, b.larsson, Michael Turquette, Stephen Boyd,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-clk,
	linux-kernel, devicetree

On 08/01/2026 19:31, Benjamin Larsson wrote:
> Add ID for tod_soe, tod_gen, efuse, aes_xpon and fe.
> 
> Signed-off-by: Benjamin Larsson <benjamin.larsson@genexis.eu>
> ---
>  include/dt-bindings/clock/en7523-clk.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-01-08 20:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-08 18:31 [PATCH v1 0/2] Airoha EN7581 clock additions Benjamin Larsson
2026-01-08 18:31 ` [PATCH 1/2] dt-bindings: clock: add IDs for EN7581 Benjamin Larsson
2026-01-08 20:31   ` Krzysztof Kozlowski
2026-01-08 18:31 ` [PATCH 2/2] clk: en7523: Add several clocks " Benjamin Larsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox