Skip to contentSkip to conversation

dt-bindings: reset: imx7: Add support for i.MX8MM

PATCH Superseded [email protected] 2 participants 6 messages Jul 4, 2019 – Jul 5, 2019

Subsystems (3)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/2 dt-bindings: reset: imx7: Add support for i.MX8MM

From: Anson Huang <[email protected]>

i.MX8MM can reuse i.MX8MQ's reset driver, update the compatible property and related info to support i.MX8MM.

---
Changes since V2:
- Add separate line for i.MX8MM in case anything different later for i.MX8MM.

---
 Documentation/devicetree/bindings/reset/fsl,imx7-src.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/reset/fsl,imx7-src.txt +4 -2
index 13e0951..c2489e4 100644
@@ -8,6 +8,7 @@ Required properties:
 - compatible:
 	- For i.MX7 SoCs should be "fsl,imx7d-src", "syscon"
 	- For i.MX8MQ SoCs should be "fsl,imx8mq-src", "syscon"
+	- For i.MX8MM SoCs should be "fsl,imx8mm-src", "fsl,imx8mq-src", "syscon"
 - reg: should be register base and length as documented in the
   datasheet
 - interrupts: Should contain SRC interrupt
@@ -46,5 +47,6 @@ Example:
 
 
 For list of all valid reset indices see
-<dt-bindings/reset/imx7-reset.h> for i.MX7 and
-<dt-bindings/reset/imx8mq-reset.h> for i.MX8MQ
+<dt-bindings/reset/imx7-reset.h> for i.MX7,
+<dt-bindings/reset/imx8mq-reset.h> for i.MX8MQ and
+<dt-bindings/reset/imx8mq-reset.h> for i.MX8MM
Signature · 1 line
2.7.4
#1 lore raw

PATCH v3 2/2 arm64: dts: imx8mm: Add "fsl,imx8mq-src" as src's fallback compatible

From: Anson Huang <[email protected]>

i.MX8MM can reuse i.MX8MQ's src driver, add "fsl,imx8mq-src" as src's fallback compatible to enable it.

---
No changes.

---
 arch/arm64/boot/dts/freescale/imx8mm.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/imx8mm.dtsi +1 -1
index 172bb6f..1870c89 100644
@@ -520,7 +520,7 @@
 			};
 
 			src: reset-controller@30390000 {
-				compatible = "fsl,imx8mm-src", "syscon";
+				compatible = "fsl,imx8mm-src", "fsl,imx8mq-src", "syscon";
 				reg = <0x30390000 0x10000>;
 				interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
 				#reset-cells = <1>;
Signature · 1 line
2.7.4
maintainer
#2 lore raw
In reply to [email protected]

Hi Anson,

Quoted 26 lines · On Thu, 2019-07-04 at 17:44 +0800, [email protected] wrote:

From: Anson Huang <[email protected]>

i.MX8MM can reuse i.MX8MQ's reset driver, update the compatible property and related info to support i.MX8MM.

---
Changes since V2:
- Add separate line for i.MX8MM in case anything different later for i.MX8MM.

---
 Documentation/devicetree/bindings/reset/fsl,imx7-src.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/reset/fsl,imx7-src.txt +1 -0
index 13e0951..c2489e4 100644
@@ -8,6 +8,7 @@ Required properties:
 - compatible:
 	- For i.MX7 SoCs should be "fsl,imx7d-src", "syscon"
 	- For i.MX8MQ SoCs should be "fsl,imx8mq-src", "syscon"
+	- For i.MX8MM SoCs should be "fsl,imx8mm-src", "fsl,imx8mq-src", "syscon"
 - reg: should be register base and length as documented in the
   datasheet
 - interrupts: Should contain SRC interrupt

Documentation/devicetree/bindings/reset/fsl,imx7-src.txt Example: · line 52

Quoted 8 lines
Documentation/devicetree/bindings/reset/fsl,imx7-src.txt +3 -2
@@ -46,5 +47,6 @@ Example:
 
 
 For list of all valid reset indices see
-<dt-bindings/reset/imx7-reset.h> for i.MX7 and
-<dt-bindings/reset/imx8mq-reset.h> for i.MX8MQ
+<dt-bindings/reset/imx7-reset.h> for i.MX7,
+<dt-bindings/reset/imx8mq-reset.h> for i.MX8MQ and
+<dt-bindings/reset/imx8mq-reset.h> for i.MX8MM

The last line is misleading, as that file contains reset indices that are invalid for i.MX8MM.

regards
Philipp

#3 lore raw

Hi, Philipp

Quoted 38 lines · On Thu, 2019-07-04 at 17:44 +0800, [email protected] wrote:
Quoted 9 lines

From: Anson Huang <[email protected]>

i.MX8MM can reuse i.MX8MQ's reset driver, update the compatible property and related info to support i.MX8MM.

---
Changes since V2:
- Add separate line for i.MX8MM in case anything different later for

i.MX8MM.

Quoted 10 lines
---
 Documentation/devicetree/bindings/reset/fsl,imx7-src.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/reset/fsl,imx7-src.txt +0 -0
index 13e0951..c2489e4 100644

Documentation/devicetree/bindings/reset/fsl,imx7-src.txt Required properties: · line 11

Quoted 4 lines
Documentation/devicetree/bindings/reset/fsl,imx7-src.txt +1 -0
@@ -8,6 +8,7 @@ Required properties:
 - compatible:
 	- For i.MX7 SoCs should be "fsl,imx7d-src", "syscon"
 	- For i.MX8MQ SoCs should be "fsl,imx8mq-src", "syscon"
+	- For i.MX8MM SoCs should be "fsl,imx8mm-src", "fsl,imx8mq-src",

"syscon"

Quoted 11 lines
Documentation/devicetree/bindings/reset/fsl,imx7-src.txt +0 -0
 - reg: should be register base and length as documented in the
   datasheet
 - interrupts: Should contain SRC interrupt @@ -46,5 +47,6 @@ Example:

For list of all valid reset indices see
-<dt-bindings/reset/imx7-reset.h> for i.MX7 and -<dt-bindings/reset/imx8mq-reset.h> for i.MX8MQ +<dt-bindings/reset/imx7-reset.h> for i.MX7, +<dt-bindings/reset/imx8mq-reset.h> for i.MX8MQ and +<dt-bindings/reset/imx8mq-reset.h> for i.MX8MM

Quoted 2 lines

The last line is misleading, as that file contains reset indices that are invalid for i.MX8MM.

What is your suggestion about this line? Just NOT change it? Or adding a new file imx8mm-reset.h but still use the IMX8MQ_RESET_ as prefix ? Or keep what I changed, but adding some comments in those macros that i.MX8MM does NOT support?

Thanks,
Anson.

Quoted 3 lines

regards
Philipp

maintainer
#4 lore raw

Hi Anson,

Quoted 42 lines · Anson Huang

Hi, Philipp

Quoted 40 lines · On Thu, 2019-07-04 at 17:44 +0800, [email protected] wrote:
Quoted 9 lines

From: Anson Huang <[email protected]>

i.MX8MM can reuse i.MX8MQ's reset driver, update the compatible property and related info to support i.MX8MM.

---
Changes since V2:
- Add separate line for i.MX8MM in case anything different later for

i.MX8MM.

Quoted 10 lines
---
 Documentation/devicetree/bindings/reset/fsl,imx7-src.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/reset/fsl,imx7-src.txt +0 -0
index 13e0951..c2489e4 100644

Documentation/devicetree/bindings/reset/fsl,imx7-src.txt Required properties: · line 11

Quoted 4 lines
Documentation/devicetree/bindings/reset/fsl,imx7-src.txt +1 -0
@@ -8,6 +8,7 @@ Required properties:
 - compatible:
 	- For i.MX7 SoCs should be "fsl,imx7d-src", "syscon"
 	- For i.MX8MQ SoCs should be "fsl,imx8mq-src", "syscon"
+	- For i.MX8MM SoCs should be "fsl,imx8mm-src", "fsl,imx8mq-src",

"syscon"

Quoted 11 lines
Documentation/devicetree/bindings/reset/fsl,imx7-src.txt +0 -0
 - reg: should be register base and length as documented in the
   datasheet
 - interrupts: Should contain SRC interrupt @@ -46,5 +47,6 @@ Example:

For list of all valid reset indices see
-<dt-bindings/reset/imx7-reset.h> for i.MX7 and -<dt-bindings/reset/imx8mq-reset.h> for i.MX8MQ +<dt-bindings/reset/imx7-reset.h> for i.MX7, +<dt-bindings/reset/imx8mq-reset.h> for i.MX8MQ and +<dt-bindings/reset/imx8mq-reset.h> for i.MX8MM

Quoted 4 lines
Quoted 2 lines

The last line is misleading, as that file contains reset indices that are invalid for i.MX8MM.

What is your suggestion about this line?

I would prefer to add an imx8mm-reset.h with only the existing reset bits, using the IMX8MM_RESET_ prefix. That would make it easy to spot errors in the dtsi (anything starting with IMX8MQ_ is potentially wrong).

Quoted 1 line

Just NOT change it?

The change is good in principle. It just should point to an imx8mm- reset.h with only the existing resets on i.MX8MM, or imx8mq-reset.h should be modified to actually make clear which resets are valid on i.MX8MM.

Quoted 2 lines

Or adding a new file imx8mm-reset.h but still use the IMX8MQ_RESET_ as prefix ?

I don't think you should redefine the same macros in imx8mm-reset.h. In this case using IMX8MM_RESET_ would be better.

Quoted 2 lines

Or keep what I changed, but adding some comments in those macros that i.MX8MM does NOT support?

That would be acceptable as well.

regards
Philipp

#5 lore raw

Hi, Philipp

Quoted 64 lines · Anson Huang
Quoted 45 lines

Hi, Philipp

Quoted 43 lines · On Thu, 2019-07-04 at 17:44 +0800, [email protected] wrote:
Quoted 10 lines

From: Anson Huang <[email protected]>

i.MX8MM can reuse i.MX8MQ's reset driver, update the compatible property and related info to support i.MX8MM.

---
Changes since V2:
- Add separate line for i.MX8MM in case anything different later
for

i.MX8MM.

Quoted 12 lines
---
 Documentation/devicetree/bindings/reset/fsl,imx7-src.txt | 6
++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/reset/fsl,imx7-src.txt b/Documentation/devicetree/bindings/reset/fsl,imx7-src.txt index 13e0951..c2489e4 100644

Documentation/devicetree/bindings/reset/fsl,imx7-src.txt Required properties: · line 11

Quoted 4 lines
Documentation/devicetree/bindings/reset/fsl,imx7-src.txt +1 -0
@@ -8,6 +8,7 @@ Required properties:
 - compatible:
 	- For i.MX7 SoCs should be "fsl,imx7d-src", "syscon"
 	- For i.MX8MQ SoCs should be "fsl,imx8mq-src", "syscon"
+	- For i.MX8MM SoCs should be "fsl,imx8mm-src", "fsl,imx8mq-src",

"syscon"

Quoted 11 lines
Documentation/devicetree/bindings/reset/fsl,imx7-src.txt +0 -0
 - reg: should be register base and length as documented in the
   datasheet
 - interrupts: Should contain SRC interrupt @@ -46,5 +47,6 @@ Example:

For list of all valid reset indices see
-<dt-bindings/reset/imx7-reset.h> for i.MX7 and -<dt-bindings/reset/imx8mq-reset.h> for i.MX8MQ +<dt-bindings/reset/imx7-reset.h> for i.MX7, +<dt-bindings/reset/imx8mq-reset.h> for i.MX8MQ and +<dt-bindings/reset/imx8mq-reset.h> for i.MX8MM

Quoted 4 lines
Quoted 2 lines

The last line is misleading, as that file contains reset indices that are invalid for i.MX8MM.

What is your suggestion about this line?

I would prefer to add an imx8mm-reset.h with only the existing reset bits, using the IMX8MM_RESET_ prefix. That would make it easy to spot errors in the dtsi (anything starting with IMX8MQ_ is potentially wrong).

Quoted 1 line

Just NOT change it?

The change is good in principle. It just should point to an imx8mm- reset.h with only the existing resets on i.MX8MM, or imx8mq-reset.h should be modified to actually make clear which resets are valid on i.MX8MM.

Quoted 2 lines

Or adding a new file imx8mm-reset.h but still use the IMX8MQ_RESET_ as prefix ?

Quoted 7 lines

I don't think you should redefine the same macros in imx8mm-reset.h. In this case using IMX8MM_RESET_ would be better.

Quoted 2 lines

Or keep what I changed, but adding some comments in those macros that i.MX8MM does NOT support?

That would be acceptable as well.

I will go this way, thanks for suggestion.

Anson.

Quoted 3 lines

regards
Philipp