Skip to contentSkip to conversation

DMA dts changes for hi3660

PATCH RESEND In review John Stultz 2 participants 5 messages Apr 4, 2019 – Apr 15, 2019

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

cover DMA dts changes for hi3660

Here are a few dts changes which didn't get picked up for the last merge window to enable support for code changes that did land in v5.1.

Let me know if you have any objecitons or feedback!

thanks
-john

Cc Tanglei Han <[email protected]>
Cc Zhuangluan Su <[email protected]>
Cc Ryan Grachek <[email protected]>
Cc Manivannan Sadhasivam <[email protected]>
Cc Wei Xu <[email protected]>
Cc Rob Herring <[email protected]>
Cc Mark Rutland <[email protected]>

John Stultz (2):
arm64: dts: hi3660: Add dma to uart nodes
arm64: dts: hi3660: Fixup unofficial dma-min-chan to dma-channel-mask

Youlin Wang (1):
arm64: dts: hi3660: Add hisi asp dma device

 arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH RESEND 1/3 arm64: dts: hi3660: Add dma to uart nodes

Try to add DMA support to the uart nodes following the assignments made in the dts from the victoria vendor kernel here:
https://consumer.huawei.com/en/opensource/detail/?siteCode=worldwide&keywords=p10&fileType=openSourceSoftware&pageSize=10&curPage=1

---
v3:
* Remove dma enablment on uart0 which would use reserved channel 0

---
 arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/hisilicon/hi3660.dtsi +8 -0
index 1734675..37a997a 100644
@@ -484,6 +484,8 @@
 			compatible = "arm,pl011", "arm,primecell";
 			reg = <0x0 0xfdf00000 0x0 0x1000>;
 			interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
+			dma-names = "rx", "tx";
+			dmas =  <&dma0 2 &dma0 3>;
 			clocks = <&crg_ctrl HI3660_CLK_GATE_UART1>,
 				 <&crg_ctrl HI3660_CLK_GATE_UART1>;
 			clock-names = "uartclk", "apb_pclk";
@@ -496,6 +498,8 @@
 			compatible = "arm,pl011", "arm,primecell";
 			reg = <0x0 0xfdf03000 0x0 0x1000>;
 			interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
+			dma-names = "rx", "tx";
+			dmas =  <&dma0 4 &dma0 5>;
 			clocks = <&crg_ctrl HI3660_CLK_GATE_UART2>,
 				 <&crg_ctrl HI3660_PCLK>;
 			clock-names = "uartclk", "apb_pclk";
@@ -520,6 +524,8 @@
 			compatible = "arm,pl011", "arm,primecell";
 			reg = <0x0 0xfdf01000 0x0 0x1000>;
 			interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
+			dma-names = "rx", "tx";
+			dmas =  <&dma0 6 &dma0 7>;
 			clocks = <&crg_ctrl HI3660_CLK_GATE_UART4>,
 				 <&crg_ctrl HI3660_CLK_GATE_UART4>;
 			clock-names = "uartclk", "apb_pclk";
@@ -532,6 +538,8 @@
 			compatible = "arm,pl011", "arm,primecell";
 			reg = <0x0 0xfdf05000 0x0 0x1000>;
 			interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
+			dma-names = "rx", "tx";
+			dmas =  <&dma0 8 &dma0 9>;
 			clocks = <&crg_ctrl HI3660_CLK_GATE_UART5>,
 				 <&crg_ctrl HI3660_CLK_GATE_UART5>;
 			clock-names = "uartclk", "apb_pclk";
Signature · 1 line
2.7.4
#2 lore raw

PATCH RESEND 2/3 arm64: dts: hi3660: Add hisi asp dma device

In reply to John Stultz

From: Youlin Wang <[email protected]>

Add asp-dma device to hi3660 dts

---
v2: Removed undocumented bindings

---
 arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm64/boot/dts/hisilicon/hi3660.dtsi +10 -0
index 37a997a..7f92049 100644
@@ -573,6 +573,16 @@
 			dma-type = "hi3660_dma";
 		};
 
+		asp_dmac: dma-controller@e804b000 {
+			compatible = "hisilicon,hisi-pcm-asp-dma-1.0";
+			reg = <0x0 0xe804b000 0x0 0x1000>;
+			#dma-cells = <1>;
+			dma-channels = <16>;
+			dma-requests = <32>;
+			interrupts = <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "asp_dma_irq";
+		};
+
 		rtc0: rtc@fff04000 {
 			compatible = "arm,pl031", "arm,primecell";
 			reg = <0x0 0Xfff04000 0x0 0x1000>;
Signature · 1 line
2.7.4
#3 lore raw

PATCH RESEND 3/3 arm64: dts: hi3660: Fixup unofficial dma-min-chan to dma-channel-mask

In reply to John Stultz

A undocumented and unimplemented binding got into the hi3660 dtsi, and this switches that binding to the now documented one.

Cc Tanglei Han <[email protected]>
Cc Zhuangluan Su <[email protected]>
Cc Ryan Grachek <[email protected]>
Cc Manivannan Sadhasivam <[email protected]>
Cc Wei Xu <[email protected]>
Cc Rob Herring <[email protected]>
Cc Mark Rutland <[email protected]>

---
v3: Renamed to hisi-dma-avail-chan
v4: Renamed to dma-channel-mask

---
 arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/hisilicon/hi3660.dtsi +1 -1
index 7f92049..7a49aa9 100644
@@ -566,7 +566,7 @@
 			#dma-cells = <1>;
 			dma-channels = <16>;
 			dma-requests = <32>;
-			dma-min-chan = <1>;
+			dma-channel-mask = <0xfffe>;
 			interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&crg_ctrl HI3660_CLK_GATE_DMAC>;
 			dma-no-cci;
Signature · 1 line
2.7.4
maintainer
#4 lore raw
In reply to John Stultz

Hi John,

Quoted 24 lines · John Stultz

Here are a few dts changes which didn't get picked up for the last merge window to enable support for code changes that did land in v5.1.

Let me know if you have any objecitons or feedback!

thanks
-john

Cc Tanglei Han <[email protected]>
Cc Zhuangluan Su <[email protected]>
Cc Ryan Grachek <[email protected]>
Cc Manivannan Sadhasivam <[email protected]>
Cc Wei Xu <[email protected]>
Cc Rob Herring <[email protected]>
Cc Mark Rutland <[email protected]>

John Stultz (2):
arm64: dts: hi3660: Add dma to uart nodes
arm64: dts: hi3660: Fixup unofficial dma-min-chan to dma-channel-mask

Quoted 6 lines

Youlin Wang (1):
arm64: dts: hi3660: Add hisi asp dma device

 arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

Thanks!
Applied the series to the hisilicon dts tree.

Best Regards,
Wei