Skip to contentSkip to conversation

dt-bindings: firmware: imx: Move system control into dt-binding headfile

PATCH Applied Anson Huang 3 participants 5 messages Apr 26, 2020 – May 13, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v5 1/2 dt-bindings: firmware: imx: Move system control into dt-binding headfile

From: Dong Aisheng <[email protected]>

i.MX8 SoCs DTS file needs system control macro definitions, so move them into dt-binding headfile, then include/linux/firmware/imx/types.h can be removed and those drivers using it should be changed accordingly.

---
Changes since V4:
- Use another patch for new added system controls and PM clock types.

---
 drivers/firmware/imx/imx-scu.c          |  1 -
 drivers/thermal/imx_sc_thermal.c        |  2 +-
 include/dt-bindings/firmware/imx/rsrc.h | 51 ++++++++++++++++++++++++++
 include/linux/firmware/imx/sci.h        |  1 -
 include/linux/firmware/imx/types.h      | 65 ---------------------------------
 5 files changed, 52 insertions(+), 68 deletions(-)
 delete mode 100644 include/linux/firmware/imx/types.h
drivers/firmware/imx/imx-scu.c +0 -1
index f71eaa5..f3340fa 100644
@@ -8,7 +8,6 @@
  */
 
 #include <linux/err.h>
-#include <linux/firmware/imx/types.h>
 #include <linux/firmware/imx/ipc.h>
 #include <linux/firmware/imx/sci.h>
 #include <linux/interrupt.h>
drivers/thermal/imx_sc_thermal.c +1 -1
index b2b68c9..b01d28e 100644
@@ -3,9 +3,9 @@
  * Copyright 2018-2020 NXP.
  */
 
+#include <dt-bindings/firmware/imx/rsrc.h>
 #include <linux/err.h>
 #include <linux/firmware/imx/sci.h>
-#include <linux/firmware/imx/types.h>
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
include/dt-bindings/firmware/imx/rsrc.h +51 -0

55 lines not on this page · raw message

include/linux/firmware/imx/sci.h +0 -1
index 17ba4e4..3fa418a 100644
@@ -11,7 +11,6 @@
 #define _SC_SCI_H
 
 #include <linux/firmware/imx/ipc.h>
-#include <linux/firmware/imx/types.h>
 
 #include <linux/firmware/imx/svc/misc.h>
 #include <linux/firmware/imx/svc/pm.h>
include/linux/firmware/imx/types.h deleted +0 -65

65 lines not on this page · raw message

Signature · 1 line
2.7.4
#1 lore raw

PATCH v5 2/2 dt-bindings: firmware: imx: Add more system controls and PM clock types

From: Dong Aisheng <[email protected]>

Add more system controls and PM clock types for usage.

---
New patch.

---
 include/dt-bindings/firmware/imx/rsrc.h | 35 ++++++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)
include/dt-bindings/firmware/imx/rsrc.h +34 -1
index cdcda00..54278d5 100644
@@ -548,6 +548,23 @@
 #define IMX_SC_R_LAST			546
 
 /*
+ * Defines for SC PM CLK
+ */
+#define IMX_SC_PM_CLK_SLV_BUS		0	/* Slave bus clock */
+#define IMX_SC_PM_CLK_MST_BUS		1	/* Master bus clock */
+#define IMX_SC_PM_CLK_PER		2	/* Peripheral clock */
+#define IMX_SC_PM_CLK_PHY		3	/* Phy clock */
+#define IMX_SC_PM_CLK_MISC		4	/* Misc clock */
+#define IMX_SC_PM_CLK_MISC0		0	/* Misc 0 clock */
+#define IMX_SC_PM_CLK_MISC1		1	/* Misc 1 clock */
+#define IMX_SC_PM_CLK_MISC2		2	/* Misc 2 clock */
+#define IMX_SC_PM_CLK_MISC3		3	/* Misc 3 clock */
+#define IMX_SC_PM_CLK_MISC4		4	/* Misc 4 clock */
+#define IMX_SC_PM_CLK_CPU		2	/* CPU clock */
+#define IMX_SC_PM_CLK_PLL		4	/* PLL */
+#define IMX_SC_PM_CLK_BYPASS		4	/* Bypass clock */
+
+/*
  * Defines for SC CONTROL
  */
 #define IMX_SC_C_TEMP				0
@@ -596,6 +613,22 @@
 #define IMX_SC_C_RST0				43
 #define IMX_SC_C_RST1				44
 #define IMX_SC_C_SEL0				45
-#define IMX_SC_C_LAST				46
+#define IMX_SC_C_CALIB0				46
+#define IMX_SC_C_CALIB1				47
+#define IMX_SC_C_CALIB2				48
+#define IMX_SC_C_IPG_DEBUG			49
+#define IMX_SC_C_IPG_DOZE			50
+#define IMX_SC_C_IPG_WAIT			51
+#define IMX_SC_C_IPG_STOP			52
+#define IMX_SC_C_IPG_STOP_MODE			53
+#define IMX_SC_C_IPG_STOP_ACK			54
+#define IMX_SC_C_SYNC_CTRL			55
+#define IMX_SC_C_OFS_AUDIO_ALT			56
+#define IMX_SC_C_DSP_BYP			57
+#define IMX_SC_C_CLK_GEN_EN			58
+#define IMX_SC_C_INTF_SEL			59
+#define IMX_SC_C_RXC_DLY			60
+#define IMX_SC_C_TIMER_SEL			61
+#define IMX_SC_C_LAST				62
 
 #endif /* __DT_BINDINGS_RSCRC_IMX_H */
Signature · 1 line
2.7.4
#2 lore raw
In reply to Anson Huang

Hi Anson,

sorry for jumping in..

Quoted 26 lines · Anson Huang

From: Dong Aisheng <[email protected]>

i.MX8 SoCs DTS file needs system control macro definitions, so move them into dt-binding headfile, then include/linux/firmware/imx/types.h can be removed and those drivers using it should be changed accordingly.

---
Changes since V4:
- Use another patch for new added system controls and PM clock types.

---
 drivers/firmware/imx/imx-scu.c          |  1 -
 drivers/thermal/imx_sc_thermal.c        |  2 +-
 include/dt-bindings/firmware/imx/rsrc.h | 51 ++++++++++++++++++++++++++
 include/linux/firmware/imx/sci.h        |  1 -
 include/linux/firmware/imx/types.h      | 65 ---------------------------------
 5 files changed, 52 insertions(+), 68 deletions(-)
 delete mode 100644 include/linux/firmware/imx/types.h
drivers/firmware/imx/imx-scu.c +0 -0
index f71eaa5..f3340fa 100644

drivers/firmware/imx/imx-scu.c line 13

Quoted 7 lines
drivers/firmware/imx/imx-scu.c +0 -1
@@ -8,7 +8,6 @@
  */
 
 #include <linux/err.h>
-#include <linux/firmware/imx/types.h>
 #include <linux/firmware/imx/ipc.h>
 #include <linux/firmware/imx/sci.h>
 #include <linux/interrupt.h>

You don't need this anymore here or was it a needless include?

Regards,
Marco

#3 lore raw

Hi, Marco

Quoted 37 lines

Subject: Re: [PATCH V5 1/2] dt-bindings: firmware: imx: Move system control into dt-binding headfile

Hi Anson,

sorry for jumping in..

Quoted 9 lines · Anson Huang

From: Dong Aisheng <[email protected]>

i.MX8 SoCs DTS file needs system control macro definitions, so move them into dt-binding headfile, then include/linux/firmware/imx/types.h can be removed and those drivers using it should be changed accordingly.

Quoted 7 lines

---
Changes since V4:
- Use another patch for new added system controls and PM clock types.

---
 drivers/firmware/imx/imx-scu.c          |  1 -
 drivers/thermal/imx_sc_thermal.c        |  2 +-
 include/dt-bindings/firmware/imx/rsrc.h | 51

++++++++++++++++++++++++++

Quoted 12 lines
 include/linux/firmware/imx/sci.h        |  1 -
 include/linux/firmware/imx/types.h      | 65 ---------------------------------
 5 files changed, 52 insertions(+), 68 deletions(-)  delete mode

100644 include/linux/firmware/imx/types.h

(quoted diff) +0 -0

b/drivers/firmware/imx/imx-scu.c index f71eaa5..f3340fa 100644

drivers/firmware/imx/imx-scu.c +0 -0
@@ -8,7 +8,6 @@
  */
 
Quoted 6 lines
Quoted 4 lines
drivers/firmware/imx/imx-scu.c +0 -1
 #include <linux/err.h>
-#include <linux/firmware/imx/types.h>  #include

<linux/firmware/imx/ipc.h> #include <linux/firmware/imx/sci.h> #include <linux/interrupt.h>

You don't need this anymore here or was it a needless include?

I don't need this anymore, and since it is going to be removed, so this include also needs to be removed.

Thanks,
Anson

Applied
#4 lore raw
In reply to Anson Huang
Quoted 9 lines · Anson Huang

From: Dong Aisheng <[email protected]>

i.MX8 SoCs DTS file needs system control macro definitions, so move them into dt-binding headfile, then include/linux/firmware/imx/types.h can be removed and those drivers using it should be changed accordingly.

Applied both, thanks.