diff mbox series

[RFC,v3,11/35] include/dt-bindings/clock/sh7750.h: cpg-sh7750 binding header.

Message ID 953cf1cef945a7081734ebc5304e3820214dca35.1697199949.git.ysato@users.sourceforge.jp (mailing list archive)
State New, archived
Headers show
Series Device Tree support for SH7751 based board | expand

Commit Message

Yoshinori Sato Oct. 14, 2023, 2:53 p.m. UTC
SH7750 CPG driver binding definition.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
 include/dt-bindings/clock/sh7750.h | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 include/dt-bindings/clock/sh7750.h

Comments

Geert Uytterhoeven Oct. 18, 2023, 1:49 p.m. UTC | #1
Hi Sato-san,

On Sat, Oct 14, 2023 at 4:54 PM Yoshinori Sato
<ysato@users.sourceforge.jp> wrote:
> SH7750 CPG driver binding definition.
>
> Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>

Thanks for your patch!

> --- /dev/null
> +++ b/include/dt-bindings/clock/sh7750.h
> @@ -0,0 +1,26 @@
> +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> + *
> + * Copyright 2023 Yoshinori Sato
> + */
> +
> +#ifndef __DT_BINDINGS_CLOCK_SH7750_H__
> +#define __DT_BINDINGS_CLOCK_SH7750_H__
> +
> +#define SH7750_CPG_PLLOUT      0
> +
> +#define SH7750_CPG_FCK         1
> +#define SH7750_CPG_BCK         2
> +#define SH7750_CPG_ICK         3
> +
> +#define SH7750_CPG_SCI_CLK     4
> +#define SH7750_CPG_RTC_CLK     5
> +#define SH7750_CPG_TMU012_CLK  6
> +#define SH7750_CPG_SCIF_CLK    7
> +#define SH7750_CPG_DMAC_CLK    8
> +#define SH7750_CPG_UBC_CLK     9
> +#define SH7750_CPG_SQ_CLK      10

The above 7 clocks are not CPG core clocks, but part of the Power-Down
Modes block.  The documentation calls them MSTPx (Module Stop).

So I'd go for SH7750_MSTP_SCI_CLK etc.
And perhaps drop the "_CLK" suffix?

> +#define SH7750_CPG_INTC_CLK    11
> +#define SH7750_CPG_TMU34_CLK   12
> +#define SH7750_CPG_PCIC_CLK    13

Similarly, but the documentation calls these CSTPx (Clock Stop).
So I'd go for SH7750_CSTP_INTC_CLK etc.

Gr{oetje,eeting}s,

                        Geert
diff mbox series

Patch

diff --git a/include/dt-bindings/clock/sh7750.h b/include/dt-bindings/clock/sh7750.h
new file mode 100644
index 000000000000..10be4eb63bdb
--- /dev/null
+++ b/include/dt-bindings/clock/sh7750.h
@@ -0,0 +1,26 @@ 
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+ *
+ * Copyright 2023 Yoshinori Sato
+ */
+
+#ifndef __DT_BINDINGS_CLOCK_SH7750_H__
+#define __DT_BINDINGS_CLOCK_SH7750_H__
+
+#define SH7750_CPG_PLLOUT	0
+
+#define SH7750_CPG_FCK		1
+#define SH7750_CPG_BCK		2
+#define SH7750_CPG_ICK		3
+
+#define SH7750_CPG_SCI_CLK	4
+#define SH7750_CPG_RTC_CLK	5
+#define SH7750_CPG_TMU012_CLK	6
+#define SH7750_CPG_SCIF_CLK	7
+#define SH7750_CPG_DMAC_CLK	8
+#define SH7750_CPG_UBC_CLK	9
+#define SH7750_CPG_SQ_CLK	10
+#define SH7750_CPG_INTC_CLK	11
+#define SH7750_CPG_TMU34_CLK	12
+#define SH7750_CPG_PCIC_CLK	13
+
+#endif