arm64: dts: r8a7795: salvator-x: IPMMU test code V2
Subsystems (2)
Magnus Damm
maintainercover arm64: dts: r8a7795: salvator-x: IPMMU test code V2
arm64: dts: r8a7795: salvator-x: IPMMU test code V2
[PATCH/RFC 01/05] arm64: dts: r8a7795: Add IPMMU device nodes [PATCH/RFC 02/05] arm64: dts: r8a7795: Enable IPMMU-MM [PATCH/RFC 03/05] arm64: dts: r8a7795: Hook up SYS-DMAC to IPMMU [PATCH/RFC 04/05] arm64: dts: r8a7795: Enable IPMMU-DS0 [PATCH/RFC 05/05] arm64: dts: salvator-x: External SCIF3/HSCIF3 loop
Hook up r8a7795 IPMMU to SYS-DMAC and also tie in the external SCIF3/HSCIF3 loop back adapter via DT. Previous version posted as:
[PATCH/RFC 00/03] ARM: shmobile: r8a7795 Salvator-X IPMMU test code
The DT binding for r8a7795 has been accepted for upstream merge and this series implements support following such format:
d4e42e7 iommu/ipmmu-vmsa: Add r8a7795 DT binding
Even though the DT binding has been accepted I prefer to hold off for a bit longer before merging patch 1-4 upstream.
---
Developed on top of next-20160315 and:
[PATCH v2 00/04] iommu/ipmmu-vmsa: IPMMU multi-arch update V2 [PATCH 00/04] iommu/ipmmu-vmsa: IPMMU CONFIG_IOMMU_DMA update [PATCH 00/10] iommu/ipmmu-vmsa: Initial r8a7795 support
No special run time or compile time dependencies apart from IPMMU DT binding change in the driver that can be merged independently from this series.
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 26 +++ arch/arm64/boot/dts/renesas/r8a7795.dtsi | 155 +++++++++++++++++++- 2 files changed, 179 insertions(+), 2 deletions(-)
Magnus Damm
maintainerPATCH 1/5 arm64: dts: r8a7795: Add IPMMU device nodes
From: Magnus Damm <[email protected]>
Add r8a7795 IPMMU nodes and keep all disabled by default.
---
arch/arm64/boot/dts/renesas/r8a7795.dtsi | 113 ++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+)
arch/arm64/boot/dts/renesas/r8a7795.dtsi +113 -0
@@ -373,6 +373,119 @@ power-domains = <&cpg>; }; + ipmmu_vi: mmu@febd0000 { + compatible = "renesas,ipmmu-r8a7795"; + reg = <0 0xfebd0000 0 0x1000>; /* IPMMU-VI */ + renesas,ipmmu-main = <&ipmmu_mm 11>; + #iommu-cells = <1>; + status = "disabled"; + }; + + ipmmu_vp: mmu@fe990000 { + compatible = "renesas,ipmmu-r8a7795"; + reg = <0 0xfe990000 0 0x1000>; /* IPMMU-VP */ + renesas,ipmmu-main = <&ipmmu_mm 12>; + #iommu-cells = <1>; + status = "disabled"; + }; + + ipmmu_vc0: mmu@fe6b0000 { + compatible = "renesas,ipmmu-r8a7795"; + reg = <0 0xfe6b0000 0 0x1000>; /* IPMMU-VC0 */ + renesas,ipmmu-main = <&ipmmu_mm 9>; + #iommu-cells = <1>; + status = "disabled"; + }; + + ipmmu_vc1: mmu@fe6f0000 { + compatible = "renesas,ipmmu-r8a7795"; + reg = <0 0xfe6f0000 0 0x1000>; /* IPMMU-VC1 */ + renesas,ipmmu-main = <&ipmmu_mm 10>; + #iommu-cells = <1>; + status = "disabled"; + }; + + ipmmu_pv0: mmu@fd800000 { + compatible = "renesas,ipmmu-r8a7795"; + reg = <0 0xfd800000 0 0x1000>; /* IPMMU-PV0 */ + renesas,ipmmu-main = <&ipmmu_mm 6>; + #iommu-cells = <1>; + status = "disabled"; + }; + + ipmmu_ir: mmu@ff8b0000 { + compatible = "renesas,ipmmu-r8a7795"; + reg = <0 0xff8b0000 0 0x1000>; /* IPMMU-IR */ + renesas,ipmmu-main = <&ipmmu_mm 3>; + #iommu-cells = <1>; + status = "disabled"; + }; + + ipmmu_hc: mmu@e6570000 { + compatible = "renesas,ipmmu-r8a7795"; + reg = <0 0xe6570000 0 0x1000>; /* IPMMU-HC */ + renesas,ipmmu-main = <&ipmmu_mm 2>; + #iommu-cells = <1>; + status = "disabled"; + }; + + ipmmu_rt: mmu@ffc80000 { + compatible = "renesas,ipmmu-r8a7795"; + reg = <0 0xffc80000 0 0x1000>; /* IPMMU-RT */ + renesas,ipmmu-main = <&ipmmu_mm 7>; + #iommu-cells = <1>; + status = "disabled"; + }; + + ipmmu_mp0: mmu@ec670000 { + compatible = "renesas,ipmmu-r8a7795"; + reg = <0 0xec670000 0 0x1000>; /* IPMMU-MP0 */ + renesas,ipmmu-main = <&ipmmu_mm 4>; + #iommu-cells = <1>; + status = "disabled"; + }; + + ipmmu_mp1: mmu@ec680000 { + compatible = "renesas,ipmmu-r8a7795"; + reg = <0 0xec680000 0 0x1000>; /* IPMMU-MP1 */ + renesas,ipmmu-main = <&ipmmu_mm 5>; + #iommu-cells = <1>; + status = "disabled"; + }; + + ipmmu_sy: mmu@e7730000 { + compatible = "renesas,ipmmu-r8a7795"; + reg = <0 0xe7730000 0 0x1000>; /* IPMMU-SY */ + renesas,ipmmu-main = <&ipmmu_mm 8>; + #iommu-cells = <1>; + status = "disabled"; + }; + + ipmmu_ds0: mmu@e6740000 { + compatible = "renesas,ipmmu-r8a7795"; + reg = <0 0xe6740000 0 0x1000>; /* IPMMU-DS0 */ + renesas,ipmmu-main = <&ipmmu_mm 0>; + #iommu-cells = <1>; + status = "disabled"; + }; + + ipmmu_ds1: mmu@e7740000 { + compatible = "renesas,ipmmu-r8a7795"; + reg = <0 0xe7740000 0 0x1000>; /* IPMMU-DS1 */ + renesas,ipmmu-main = <&ipmmu_mm 1>; + #iommu-cells = <1>; + status = "disabled"; + }; + + ipmmu_mm: mmu@e67b0000 { + compatible = "renesas,ipmmu-r8a7795"; + reg = <0 0xe67b0000 0 0x1000>; /* IPMMU-MM */ + interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>; + #iommu-cells = <1>; + status = "disabled"; + }; + dmac0: dma-controller@e6700000 { compatible = "renesas,dmac-r8a7795", "renesas,rcar-dmac";
Magnus Damm
maintainerPATCH 2/5 arm64: dts: r8a7795: Enable IPMMU-MM
In reply to Magnus DammFrom: Magnus Damm <[email protected]>
Enable r8a7795 IPMMU-MM node to allow the IPMMU main device to be probed in case of driver support exists.
---
arch/arm64/boot/dts/renesas/r8a7795.dtsi | 1 - 1 file changed, 1 deletion(-)
arch/arm64/boot/dts/renesas/r8a7795.dtsi +0 -1
@@ -483,7 +483,6 @@ interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>; #iommu-cells = <1>; - status = "disabled"; }; dmac0: dma-controller@e6700000 {
Magnus Damm
maintainerPATCH 3/5 arm64: dts: r8a7795: Hook up SYS-DMAC to IPMMU
In reply to Magnus DammFrom: Magnus Damm <[email protected]>
Hook up r8a7795 DMAC nodes to IPMMU-MP1, IPMMU-DS0 and IPMMU-DS1.
---
arch/arm64/boot/dts/renesas/r8a7795.dtsi | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+)
arch/arm64/boot/dts/renesas/r8a7795.dtsi +40 -0
@@ -319,6 +319,14 @@ power-domains = <&cpg>; #dma-cells = <1>; dma-channels = <16>; + iommus = <&ipmmu_mp1 0>, <&ipmmu_mp1 1>, + <&ipmmu_mp1 2>, <&ipmmu_mp1 3>, + <&ipmmu_mp1 4>, <&ipmmu_mp1 5>, + <&ipmmu_mp1 6>, <&ipmmu_mp1 7>, + <&ipmmu_mp1 8>, <&ipmmu_mp1 9>, + <&ipmmu_mp1 10>, <&ipmmu_mp1 11>, + <&ipmmu_mp1 12>, <&ipmmu_mp1 13>, + <&ipmmu_mp1 14>, <&ipmmu_mp1 15>; }; audma1: dma-controller@ec720000 {
@@ -351,6 +359,14 @@ power-domains = <&cpg>; #dma-cells = <1>; dma-channels = <16>; + iommus = <&ipmmu_mp1 16>, <&ipmmu_mp1 17>, + <&ipmmu_mp1 18>, <&ipmmu_mp1 19>, + <&ipmmu_mp1 20>, <&ipmmu_mp1 21>, + <&ipmmu_mp1 22>, <&ipmmu_mp1 23>, + <&ipmmu_mp1 24>, <&ipmmu_mp1 25>, + <&ipmmu_mp1 26>, <&ipmmu_mp1 27>, + <&ipmmu_mp1 28>, <&ipmmu_mp1 29>, + <&ipmmu_mp1 30>, <&ipmmu_mp1 31>; }; pfc: pfc@e6060000 {
@@ -517,6 +533,14 @@ power-domains = <&cpg>; #dma-cells = <1>; dma-channels = <16>; + iommus = <&ipmmu_ds0 0>, <&ipmmu_ds0 1>, + <&ipmmu_ds0 2>, <&ipmmu_ds0 3>, + <&ipmmu_ds0 4>, <&ipmmu_ds0 5>, + <&ipmmu_ds0 6>, <&ipmmu_ds0 7>, + <&ipmmu_ds0 8>, <&ipmmu_ds0 9>, + <&ipmmu_ds0 10>, <&ipmmu_ds0 11>, + <&ipmmu_ds0 12>, <&ipmmu_ds0 13>, + <&ipmmu_ds0 14>, <&ipmmu_ds0 15>; }; dmac1: dma-controller@e7300000 {
@@ -550,6 +574,14 @@ power-domains = <&cpg>; #dma-cells = <1>; dma-channels = <16>; + iommus = <&ipmmu_ds1 0>, <&ipmmu_ds1 1>, + <&ipmmu_ds1 2>, <&ipmmu_ds1 3>, + <&ipmmu_ds1 4>, <&ipmmu_ds1 5>, + <&ipmmu_ds1 6>, <&ipmmu_ds1 7>, + <&ipmmu_ds1 8>, <&ipmmu_ds1 9>, + <&ipmmu_ds1 10>, <&ipmmu_ds1 11>, + <&ipmmu_ds1 12>, <&ipmmu_ds1 13>, + <&ipmmu_ds1 14>, <&ipmmu_ds1 15>; }; dmac2: dma-controller@e7310000 {
@@ -583,6 +615,14 @@ power-domains = <&cpg>; #dma-cells = <1>; dma-channels = <16>; + iommus = <&ipmmu_ds1 16>, <&ipmmu_ds1 17>, + <&ipmmu_ds1 18>, <&ipmmu_ds1 19>, + <&ipmmu_ds1 20>, <&ipmmu_ds1 21>, + <&ipmmu_ds1 22>, <&ipmmu_ds1 23>, + <&ipmmu_ds1 24>, <&ipmmu_ds1 25>, + <&ipmmu_ds1 26>, <&ipmmu_ds1 27>, + <&ipmmu_ds1 28>, <&ipmmu_ds1 29>, + <&ipmmu_ds1 30>, <&ipmmu_ds1 31>; }; avb: ethernet@e6800000 {
Magnus Damm
maintainerPATCH 5/5 arm64: dts: salvator-x: External SCIF3/HSCIF3 loop
In reply to Magnus DammFrom: Magnus Damm <[email protected]>
Add SCIF3 and HSCIF3 as two new serial ports to the r8a7795 Salvator-X DT file.
---
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 26 ++++++++++++++++++++ 1 file changed, 26 insertions(+)
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts +26 -0
@@ -42,6 +42,8 @@ aliases { serial0 = &scif2; serial1 = &scif1; + serial2 = &scif3; + serial3 = &hscif3; ethernet0 = &avb; };
@@ -153,6 +155,14 @@ renesas,groups = "scif2_data_a"; renesas,function = "scif2"; }; + scif3_pins: scif3 { /* TX: 1_11, RX: 1_8 */ + renesas,groups = "scif3_data_b"; + renesas,function = "scif3"; + }; + hscif3_pins: hscif3 { /* TX: 2_8, RX: 2_7 */ + renesas,groups = "hscif3_data_d"; + renesas,function = "hscif3"; + }; scif_clk_pins: scif_clk { renesas,groups = "scif_clk_a"; renesas,function = "scif_clk";
@@ -205,6 +215,22 @@ pinctrl-names = "default"; status = "okay"; +}; + +&scif3 { + pinctrl-0 = <&scif3_pins>; + pinctrl-names = "default"; + + status = "okay"; +}; + +/* SCIF3 TX -> HSCIF3 RX, HSCIF3 TX -> SCIF3 RX */ + +&hscif3 { + pinctrl-0 = <&hscif3_pins>; + pinctrl-names = "default"; + + status = "okay"; }; &scif2 {