dt-bindings: dma: fsl-edma: fix ls1028a-edma compatible
Subsystems (4)
PATCH 1/2 dt-bindings: dma: fsl-edma: fix ls1028a-edma compatible
The bootloader will fix up the IOMMU entries only on nodes with the compatible "fsl,vf610-edma". Thus make this compatible string mandatory for the ls1028a-edma.
While at it, fix the "fsl,fsl," typo.
--- Documentation/devicetree/bindings/dma/fsl-edma.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/dma/fsl-edma.txt +2 -1
@@ -10,7 +10,8 @@ Required properties: - compatible : - "fsl,vf610-edma" for eDMA used similar to that on Vybrid vf610 SoC - "fsl,imx7ulp-edma" for eDMA2 used similar to that on i.mx7ulp - - "fsl,fsl,ls1028a-edma" for eDMA used similar to that on Vybrid vf610 SoC + - "fsl,ls1028a-edma" followed by "fsl,vf610-edma" for eDMA used on the + LS1028A SoC. - reg : Specifies base physical address(s) and size of the eDMA registers. The 1st region is eDMA control register's address and size. The 2nd and the 3rd regions are programmable channel multiplexing
Signature · 1 line
2.20.1
PATCH 2/2 arm64: dts: ls1028a: add "fsl,vf610-edma" compatible
The bootloader does the IOMMU fixup and dynamically adds the "iommus" property to devices according to its compatible string. In case of the eDMA controller this property is missing. Add it. After that the IOMMU will work with the eDMA core.
--- arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +1 -1
@@ -447,7 +447,7 @@ edma0: dma-controller@22c0000 { #dma-cells = <2>; - compatible = "fsl,ls1028a-edma"; + compatible = "fsl,ls1028a-edma", "fsl,vf610-edma"; reg = <0x0 0x22c0000 0x0 0x10000>, <0x0 0x22d0000 0x0 0x10000>, <0x0 0x22e0000 0x0 0x10000>;
Signature · 1 line
2.20.1
RE: [EXT] [PATCH 2/2] arm64: dts: ls1028a: add "fsl,vf610-edma" compatible
Quoted 32 lines
-----Original Message-----
From: Michael Walle <[email protected]>
Sent: 2020年3月7日 4:54
To: [email protected]; [email protected]; [email protected]; [email protected]
Cc: Vinod Koul <[email protected]>; Rob Herring <[email protected]>; Mark Rutland <[email protected]>; Shawn Guo <[email protected]>; Leo Li <[email protected]>; Peng Ma <[email protected]>; Michael Walle <[email protected]>
Subject: [EXT] [PATCH 2/2] arm64: dts: ls1028a: add "fsl,vf610-edma" compatibleCaution: EXT Email
The bootloader does the IOMMU fixup and dynamically adds the "iommus" property to devices according to its compatible string. In case of the eDMA controller this property is missing. Add it. After that the IOMMU will work with the eDMA core.
Signed-off-by Michael Walle <[email protected]>---
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +0
-0
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi line 451
Quoted 6 lines
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +2
-1@@ -447,7 +447,7 @@ edma0: dma-controller@22c0000 { #dma-cells = <2>; - compatible = "fsl,ls1028a-edma"; + compatible = "fsl,ls1028a-edma", + "fsl,vf610-edma";
Hi Michael,
You should change it on bootloader instead of kernel, Some Reg of LS1028a is different from others, So we used compatible "fsl,ls1028a-edm" to distinguish " fsl,vf610-edma".
Thanks,
Peng
Quoted 5 lines
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +0
-1reg = <0x0 0x22c0000 0x0 0x10000>, <0x0 0x22d0000 0x0 0x10000>, <0x0 0x22e0000 0x0 0x10000>; --2.20.1
Re: [EXT] [PATCH 2/2] arm64: dts: ls1028a: add "fsl,vf610-edma" compatible
Hi Peng,
Am 2020-03-07 03:09, schrieb Peng Ma:
Quoted 38 lines
Quoted 30 lines
-----Original Message-----
From: Michael Walle <[email protected]>
Sent: 2020年3月7日 4:54
To: [email protected]; [email protected]; [email protected]; [email protected]
Cc: Vinod Koul <[email protected]>; Rob Herring <[email protected]>; Mark Rutland <[email protected]>; Shawn Guo <[email protected]>; Leo Li <[email protected]>; Peng Ma <[email protected]>; Michael Walle <[email protected]>
Subject: [EXT] [PATCH 2/2] arm64: dts: ls1028a: add "fsl,vf610-edma" compatibleCaution: EXT Email
The bootloader does the IOMMU fixup and dynamically adds the "iommus" property to devices according to its compatible string. In case of the eDMA controller this property is missing. Add it. After that the IOMMU will work with the eDMA core.
Signed-off-by Michael Walle <[email protected]>---
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +0
-0arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi line 451
Quoted 6 lines
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +2
-1@@ -447,7 +447,7 @@ edma0: dma-controller@22c0000 { #dma-cells = <2>; - compatible = "fsl,ls1028a-edma"; + compatible = "fsl,ls1028a-edma", + "fsl,vf610-edma";Hi Michael,
Quoted 4 lines
You should change it on bootloader instead of kernel, Some Reg of LS1028a is different
from others, So we used compatible "fsl,ls1028a-edm" to distinguish " fsl,vf610-edma".
Yes this might be the right thing to do. So since it is NXPs bootloader feel free to fix that ;) Looking at the u-boot code right now, I don't even know it that is the right fix at all. The fixup code in u-boot is SoC independent (its in fsl_icid.h and is enabled with CONFIG_LSCH3, ie your chassis version). For example, the sdhc fixup will scan the nodes for "compatible = fsl,esdhc", which is also the secondary compatible for the "ls1028a-esdhc" compatible.
And here is another reason to have it this way: we need backwards compatibility, the are already boards out there whose bootloader will fix-up the "old" node. Thus I don't see any other possibilty.
-michael
Quoted 8 lines
Thanks,
PengQuoted 5 lines
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +0
-1reg = <0x0 0x22c0000 0x0 0x10000>, <0x0 0x22d0000 0x0 0x10000>, <0x0 0x22e0000 0x0 0x10000>; --2.20.1
RE: [EXT] [PATCH 2/2] arm64: dts: ls1028a: add "fsl,vf610-edma" compatible
Quoted 70 lines
-----Original Message-----
From: Michael Walle <[email protected]>
Sent: 2020年3月7日 17:26
To: Peng Ma <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Vinod Koul <[email protected]>; Rob Herring <[email protected]>; Mark Rutland <[email protected]>; Shawn Guo <[email protected]>; Leo Li <[email protected]>
Subject: Re: [EXT] [PATCH 2/2] arm64: dts: ls1028a: add "fsl,vf610-edma" compatibleCaution: EXT Email
Hi Peng,
Am 2020-03-07 03:09, schrieb Peng Ma:
Quoted 7 lines
Quoted 7 lines
-----Original Message-----
From: Michael Walle <[email protected]>
Sent: 2020年3月7日 4:54
To: [email protected]; [email protected]; [email protected]; [email protected]
Cc: Vinod Koul <[email protected]>; Rob Herring <[email protected]>; Mark Rutland <[email protected]>; Shawn GuoQuoted 31 lines
Quoted 23 lines
Leo Li <[email protected]>; Peng Ma <[email protected]>; Michael Walle <[email protected]>
Subject: [EXT] [PATCH 2/2] arm64: dts: ls1028a: add "fsl,vf610-edma" compatibleCaution: EXT Email
The bootloader does the IOMMU fixup and dynamically adds the "iommus" property to devices according to its compatible string. In case of the eDMA controller this property is missing. Add it. After that the IOMMU will work with the eDMA core.
Signed-off-by Michael Walle <[email protected]>---
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +0
-0arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi line 451
Quoted 6 lines
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +2
-1@@ -447,7 +447,7 @@ edma0: dma-controller@22c0000 { #dma-cells = <2>; - compatible = "fsl,ls1028a-edma"; + compatible = "fsl,ls1028a-edma", + "fsl,vf610-edma";Hi Michael,
Quoted 4 lines
You should change it on bootloader instead of kernel, Some Reg of LS1028a is different from others, So we used compatible "fsl,ls1028a-edm" to distinguish "
fsl,vf610-edma".Yes this might be the right thing to do. So since it is NXPs bootloader feel free to fix that ;) Looking at the u-boot code right now, I don't even know it that is the right fix at all. The fixup code in u-boot is SoC independent (its in
fsl_icid.hand is enabled withCONFIG_LSCH3, ie your chassis version). For example, the sdhc fixup will scan the nodes for "compatible = fsl,esdhc", which is also the secondary compatible for the "ls1028a-esdhc" compatible.
Quoted 4 lines
And here is another reason to have it this way: we need backwards compatibility, the are already boards out there whose bootloader will fix-up the "old" node. Thus I don't see any other possibilty.
[Peng Ma] OK, There is non fixed on uboot.
I will fix it on uboot, if you want to use now, please change the uboot as below:
arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c +1 -1
@@ -14,7 +14,7 @@ struct icid_id_table icid_tbl[] = {SET_SDHC_ICID (1 ,FSL_SDMMC_STREAM_ID ),SET_SDHC_ICID (2 ,FSL_SDMMC2_STREAM_ID ),SET_SATA_ICID (1 ,"fsl,ls1028a-ahci" ,FSL_SATA1_STREAM_ID ), -SET_EDMA_ICID (FSL_EDMA_STREAM_ID ), +SET_EDMA_ICID_LS1028 (FSL_EDMA_STREAM_ID ),SET_QDMA_ICID ("fsl,ls1028a-qdma" ,FSL_DMA_STREAM_ID ),SET_GPU_ICID ("fsl,ls1028a-gpu" ,FSL_GPU_STREAM_ID ), SET_DISPLAY_ICID(FSL_DISPLAY_STREAM_ID),
arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h +4 -0
@@ -144,6 +144,10 @@ extern int fman_icid_tbl_sz;SET_GUR_ICID ("fsl,vf610-edma" , streamid, spare3_amqr,\ EDMA_BASE_ADDR) +#define SET_EDMA_ICID_LS1028 (streamid) \ + SET_GUR_ICID("fsl,ls1028a-edma", streamid, spare3_amqr,\ + EDMA_BASE_ADDR) +#define SET_GPU_ICID (compat, streamid) \ SET_GUR_ICID(compat, streamid, misc1_amqr,\ GPU_BASE_ADDR)
BR,
Peng
Quoted 10 lines
-michael
Quoted 8 lines
Thanks,
PengQuoted 5 lines
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +0
-1reg = <0x0 0x22c0000 0x0 0x10000>, <0x0 0x22d0000 0x0 0x10000>, <0x0 0x22e0000 0x0 0x10000>; --2.20.1
Re: [EXT] [PATCH 2/2] arm64: dts: ls1028a: add "fsl,vf610-edma" compatible
Hi Peng,
Am 2020-03-07 11:32, schrieb Peng Ma:
Quoted 68 lines
Quoted 68 lines
-----Original Message-----
From: Michael Walle <[email protected]>
Sent: 2020年3月7日 17:26
To: Peng Ma <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Vinod Koul <[email protected]>; Rob Herring <[email protected]>; Mark Rutland <[email protected]>; Shawn Guo <[email protected]>; Leo Li <[email protected]>
Subject: Re: [EXT] [PATCH 2/2] arm64: dts: ls1028a: add "fsl,vf610-edma" compatibleCaution: EXT Email
Hi Peng,
Am 2020-03-07 03:09, schrieb Peng Ma:
Quoted 7 lines
Quoted 7 lines
-----Original Message-----
From: Michael Walle <[email protected]>
Sent: 2020年3月7日 4:54
To: [email protected]; [email protected]; [email protected]; [email protected]
Cc: Vinod Koul <[email protected]>; Rob Herring <[email protected]>; Mark Rutland <[email protected]>; Shawn GuoQuoted 31 lines
Quoted 23 lines
Leo Li <[email protected]>; Peng Ma <[email protected]>; Michael Walle <[email protected]>
Subject: [EXT] [PATCH 2/2] arm64: dts: ls1028a: add "fsl,vf610-edma" compatibleCaution: EXT Email
The bootloader does the IOMMU fixup and dynamically adds the "iommus" property to devices according to its compatible string. In case of the eDMA controller this property is missing. Add it. After that the IOMMU will work with the eDMA core.
Signed-off-by Michael Walle <[email protected]>---
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +0
-0arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi line 451
Quoted 6 lines
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +2
-1@@ -447,7 +447,7 @@ edma0: dma-controller@22c0000 { #dma-cells = <2>; - compatible = "fsl,ls1028a-edma"; + compatible = "fsl,ls1028a-edma", + "fsl,vf610-edma";Hi Michael,
Quoted 4 lines
You should change it on bootloader instead of kernel, Some Reg of LS1028a is different from others, So we used compatible "fsl,ls1028a-edm" to distinguish "
fsl,vf610-edma".Yes this might be the right thing to do. So since it is NXPs bootloader feel free to fix that ;) Looking at the u-boot code right now, I don't even know it that is the right fix at all. The fixup code in u-boot is SoC independent (its in
fsl_icid.hand is enabled withCONFIG_LSCH3, ie your chassis version). For example, the sdhc fixup will scan the nodes for "compatible = fsl,esdhc", which is also the secondary compatible for the "ls1028a-esdhc" compatible.
Quoted 7 lines
Quoted 4 lines
And here is another reason to have it this way: we need backwards compatibility, the are already boards out there whose bootloader will fix-up the "old" node. Thus I don't see any other possibilty.
[Peng Ma] OK, There is non fixed on uboot.
I will fix it on uboot, if you want to use now, please change the uboot as below:
As I told you, I cannot be changed for shipped bootloaders. While it can be changed for newer ones, I would really like to retain backwards compatibility. And so should you.
That being said, I don't see a problem in having both compatibles. Linux will use the ls1028a-emda one and u-boot will fix up the "older" vf610-edma one.
Unfortunately, this patch will not only affect eDMA but all other drivers which uses eDMA, eg. sound, lpuart, i2c and maybe DSPI.
-michael
Quoted 44 lines
arch/arm/cpu/armv8/fsl-layerscape/ls1028_ids.c +1
-1@@ -14,7 +14,7 @@ struct icid_id_table icid_tbl[] = {SET_SDHC_ICID (1 ,FSL_SDMMC_STREAM_ID ),SET_SDHC_ICID (2 ,FSL_SDMMC2_STREAM_ID ),SET_SATA_ICID (1 ,"fsl,ls1028a-ahci" ,FSL_SATA1_STREAM_ID ), -SET_EDMA_ICID (FSL_EDMA_STREAM_ID ), +SET_EDMA_ICID_LS1028 (FSL_EDMA_STREAM_ID ),SET_QDMA_ICID ("fsl,ls1028a-qdma" ,FSL_DMA_STREAM_ID ),SET_GPU_ICID ("fsl,ls1028a-gpu" ,FSL_GPU_STREAM_ID ), SET_DISPLAY_ICID(FSL_DISPLAY_STREAM_ID),arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h +4
-0@@ -144,6 +144,10 @@ extern int fman_icid_tbl_sz;SET_GUR_ICID ("fsl,vf610-edma" , streamid, spare3_amqr,\ EDMA_BASE_ADDR) +#define SET_EDMA_ICID_LS1028 (streamid) \ + SET_GUR_ICID("fsl,ls1028a-edma", streamid, spare3_amqr,\ + EDMA_BASE_ADDR) +#define SET_GPU_ICID (compat, streamid) \ SET_GUR_ICID(compat, streamid, misc1_amqr,\ GPU_BASE_ADDR)BR,
PengQuoted 10 lines
-michael
Quoted 8 lines
Thanks,
PengQuoted 5 lines
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +0
-1reg = <0x0 0x22c0000 0x0 0x10000>, <0x0 0x22d0000 0x0 0x10000>, <0x0 0x22e0000 0x0 0x10000>; --2.20.1
Re: [PATCH 2/2] arm64: dts: ls1028a: add "fsl,vf610-edma" compatible
In reply to Michael WalleHi all,
Am 2020-03-06 21:54, schrieb Michael Walle:
Quoted 6 lines
The bootloader does the IOMMU fixup and dynamically adds the "iommus" property to devices according to its compatible string. In case of the eDMA controller this property is missing. Add it. After that the IOMMU will work with the eDMA core.
Signed-off-by Michael Walle <[email protected]>
Is it possible to have this merged, so it gets into the merge window for 5.7? As I explained in this thread [1], without this compatible all boards with enabled IOMMU (and who have either sound, lpuart or i2c enabled), doesn't work.
-michael
[1] https://lore.kernel.org/linux-devicetree/[email protected]/
Quoted 18 lines
--- arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +1
-1@@ -447,7 +447,7 @@ edma0: dma-controller@22c0000 { #dma-cells = <2>; - compatible = "fsl,ls1028a-edma"; + compatible = "fsl,ls1028a-edma", "fsl,vf610-edma"; reg = <0x0 0x22c0000 0x0 0x10000>, <0x0 0x22d0000 0x0 0x10000>, <0x0 0x22e0000 0x0 0x10000>;
Quoted 4 lines · Michael Walle
The bootloader will fix up the IOMMU entries only on nodes with the compatible "fsl,vf610-edma". Thus make this compatible string mandatory for the ls1028a-edma.
Quoted 8 lines
While at it, fix the "fsl,fsl," typo.
Signed-off-by Michael Walle <[email protected]>Fixes d8c1bdb5288d ("dt-bindings: dma: fsl-edma: add new fsl,fsl,ls1028a-edma")--- Documentation/devicetree/bindings/dma/fsl-edma.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Shawn Guo
AppliedQuoted 8 lines · Michael Walle
The bootloader will fix up the IOMMU entries only on nodes with the compatible "fsl,vf610-edma". Thus make this compatible string mandatory for the ls1028a-edma.
While at it, fix the "fsl,fsl," typo.
Signed-off-by Michael Walle <[email protected]>Fixes d8c1bdb5288d ("dt-bindings: dma: fsl-edma: add new fsl,fsl,ls1028a-edma")
Applied both. Will try to send for 5.7-rc inclusion.
Shawn
Hi Shawn Guo,
Am 2020-04-13 16:18, schrieb Shawn Guo:
Quoted 11 lines · Michael Walle
Quoted 8 lines
The bootloader will fix up the IOMMU entries only on nodes with the compatible "fsl,vf610-edma". Thus make this compatible string mandatory for the ls1028a-edma.
While at it, fix the "fsl,fsl," typo.
Signed-off-by Michael Walle <[email protected]>Fixes d8c1bdb5288d ("dt-bindings: dma: fsl-edma: add new fsl,fsl,ls1028a-edma")Applied both. Will try to send for 5.7-rc inclusion.
Are there any news on the inclusion? Unfortunately, I also forgot the fixes tag on patch 2/2, so it won't end up in v5.7.x.
-michael