Skip to contentSkip to conversation

arm64: dts: renesas: r8a77970: Update IPMMU DS1 bit number

PATCH In review Magnus Damm 3 participants 7 messages Mar 20, 2018 – Mar 22, 2018

Subsystems (2)
lore
Share & tools
lore

Magnus Damm

author maintainer
#0 lore raw

PATCH 1/1 arm64: dts: renesas: r8a77970: Update IPMMU DS1 bit number

From: Magnus Damm <[email protected]>

Judging by "R-Car-Gen3-rev0.80" IPMMU IMSSTR register documentation for [R-Car V3M] the DS1 bit field should be bit 0.

Update the ipmmu-main property to make it match the data sheet.

---
Based on top of renesas-drivers-2018-03-13-v4.16-rc5

 arch/arm64/boot/dts/renesas/r8a77970.dtsi |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/renesas/r8a77970.dtsi +1 -1
@@ -160,7 +160,7 @@
 		ipmmu_ds1: mmu@e7740000 {
 			compatible = "renesas,ipmmu-r8a77970";
 			reg = <0 0xe7740000 0 0x1000>;
-			renesas,ipmmu-main = <&ipmmu_mm 1>;
+			renesas,ipmmu-main = <&ipmmu_mm 0>;
 			power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
 			#iommu-cells = <1>;
 		};
#1 lore raw
Quoted 6 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Judging by "R-Car-Gen3-rev0.80" IPMMU IMSSTR register documentation for [R-Car V3M] the DS1 bit field should be bit 0.

Update the ipmmu-main property to make it match the data sheet.

Thanks, I have confirmed this. Apologies for this error.

AFIK this IP block is currently unused, I wonder if it, ipmmu_mm and ipmmu_rt should have status = "disabled" added.

For now I have applied this change to v4.18 with the following tag:

Fixes ce3b52a1595b ("arm64: dts: renesas: r8a77970: Add IPMMU device

nodes")

Quoted 19 lines

---
Based on top of renesas-drivers-2018-03-13-v4.16-rc5

 arch/arm64/boot/dts/renesas/r8a77970.dtsi |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/renesas/r8a77970.dtsi +1 -1
@@ -160,7 +160,7 @@
 		ipmmu_ds1: mmu@e7740000 {
 			compatible = "renesas,ipmmu-r8a77970";
 			reg = <0 0xe7740000 0 0x1000>;
-			renesas,ipmmu-main = <&ipmmu_mm 1>;
+			renesas,ipmmu-main = <&ipmmu_mm 0>;
 			power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
 			#iommu-cells = <1>;
 		};
#2 lore raw
Quoted 6 lines · Simon Horman
Quoted 5 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Judging by "R-Car-Gen3-rev0.80" IPMMU IMSSTR register documentation for [R-Car V3M] the DS1 bit field should be bit 0.

Quoted 6 lines
Quoted 1 line

Update the ipmmu-main property to make it match the data sheet.

Thanks, I have confirmed this. Apologies for this error.

AFIK this IP block is currently unused, I wonder if it, ipmmu_mm and ipmmu_rt should have status = "disabled" added.

Sorry, I take that back, I now see the nodes used elsewhere in the same DT file.

Quoted 26 lines

For now I have applied this change to v4.18 with the following tag:

Fixes ce3b52a1595b ("arm64: dts: renesas: r8a77970: Add IPMMU device

nodes")

Quoted 19 lines

---
Based on top of renesas-drivers-2018-03-13-v4.16-rc5

 arch/arm64/boot/dts/renesas/r8a77970.dtsi |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/renesas/r8a77970.dtsi +1 -1
@@ -160,7 +160,7 @@
 		ipmmu_ds1: mmu@e7740000 {
 			compatible = "renesas,ipmmu-r8a77970";
 			reg = <0 0xe7740000 0 0x1000>;
-			renesas,ipmmu-main = <&ipmmu_mm 1>;
+			renesas,ipmmu-main = <&ipmmu_mm 0>;
 			power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
 			#iommu-cells = <1>;
 		};
author maintainer
#3 lore raw

Hi Simon,

Quoted 9 lines · Simon Horman
Quoted 8 lines · Simon Horman
Quoted 6 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Judging by "R-Car-Gen3-rev0.80" IPMMU IMSSTR register documentation for [R-Car V3M] the DS1 bit field should be bit 0.

Update the ipmmu-main property to make it match the data sheet.

Quoted 7 lines
Quoted 4 lines

Thanks, I have confirmed this. Apologies for this error.

AFIK this IP block is currently unused, I wonder if it, ipmmu_mm and ipmmu_rt should have status = "disabled" added.

Sorry, I take that back, I now see the nodes used elsewhere in the same DT file.

Thanks for your help! My opinion is that for R-Car Gen3 we don't really need to keep any IPMMU nodes in disabled state in DT. This since the whitelist code in the IPMMU driver will include software policy handling to during runtime make sure only desired devices get enabled.

Cheers,

/ magnus

#4 lore raw
Quoted 17 lines · Magnus Damm

Hi Simon,

Quoted 14 lines · Simon Horman
Quoted 12 lines · Simon Horman
Quoted 6 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Judging by "R-Car-Gen3-rev0.80" IPMMU IMSSTR register documentation for [R-Car V3M] the DS1 bit field should be bit 0.

Update the ipmmu-main property to make it match the data sheet.

Thanks, I have confirmed this. Apologies for this error.

AFIK this IP block is currently unused, I wonder if it, ipmmu_mm and ipmmu_rt should have status = "disabled" added.

Quoted 8 lines
Quoted 2 lines

Sorry, I take that back, I now see the nodes used elsewhere in the same DT file.

Thanks for your help! My opinion is that for R-Car Gen3 we don't really need to keep any IPMMU nodes in disabled state in DT. This since the whitelist code in the IPMMU driver will include software policy handling to during runtime make sure only desired devices get enabled.

Agreed

#5 lore raw
In reply to Magnus Damm

Hi Magnus,

Quoted 15 lines · Magnus Damm
Quoted 14 lines · Simon Horman
Quoted 12 lines · Simon Horman
Quoted 6 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Judging by "R-Car-Gen3-rev0.80" IPMMU IMSSTR register documentation for [R-Car V3M] the DS1 bit field should be bit 0.

Update the ipmmu-main property to make it match the data sheet.

Thanks, I have confirmed this. Apologies for this error.

AFIK this IP block is currently unused, I wonder if it, ipmmu_mm and ipmmu_rt should have status = "disabled" added.

Quoted 8 lines
Quoted 2 lines

Sorry, I take that back, I now see the nodes used elsewhere in the same DT file.

Thanks for your help! My opinion is that for R-Car Gen3 we don't really need to keep any IPMMU nodes in disabled state in DT. This since the whitelist code in the IPMMU driver will include software policy handling to during runtime make sure only desired devices get enabled.

Good, DT == hardware description taking over again.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Reviewed-by on v1 1/1
#6 lore raw
In reply to Magnus Damm
Quoted 8 lines · Magnus Damm

From: Magnus Damm <[email protected]>

Judging by "R-Car-Gen3-rev0.80" IPMMU IMSSTR register documentation for [R-Car V3M] the DS1 bit field should be bit 0.

Update the ipmmu-main property to make it match the data sheet.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds