Skip to contentSkip to conversation

ARTPEC-6 ARM SoC device tree updates

PATCH In review Niklas Cassel 2 participants 12 messages Feb 21, 2018 – Mar 7, 2018 Device tree bindings

lore
Share & tools
lore
#0 lore raw

v2 cover ARTPEC-6 ARM SoC device tree updates

Hello,

Here comes some ARTPEC-6 ARM SoC device tree updates.

Regards,
Niklas

Niklas Cassel (8):
ARM: dts: artpec: disable Accelerator Coherency Port
ARM: dts: artpec: use 1 GiB RAM
ARM: dts: artpec: remove 0x prefix from clkctrl unit address
ARM: dts: artpec: migrate ethernet to stmmac binding
ARM: dts: artpec: add and utilize artpec6 pin controller
ARM: dts: artpec: add and utilize nbpfaxi DMA controllers
ARM: dts: artpec: add disabled node for PCIe endpoint mode
ARM: dts: artpec: add node for hardware crypto accelerator

 arch/arm/boot/dts/artpec6-devboard.dts |   3 +-
 arch/arm/boot/dts/artpec6.dtsi         | 163 +++++++++++++++++++++++++++++++--
 2 files changed, 155 insertions(+), 11 deletions(-)
Signature · 1 line
2.14.2
#1 lore raw

PATCH v2 1/8 ARM: dts: artpec: disable Accelerator Coherency Port

Accesses via 0x80000000 go through the ACP instead of using the DDR directly.

Unfortunately the ACP has proven to be the cause of complete system hangs. Disabling the ACP makes these problems go away.

---
 arch/arm/boot/dts/artpec6.dtsi | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm/boot/dts/artpec6.dtsi +1 -2
index 2ed11773048d..d9776a97d8ff 100644
@@ -185,8 +185,7 @@
 		#address-cells = <0x1>;
 		#size-cells = <0x1>;
 		ranges;
-		dma-ranges = <0x80000000 0x00000000 0x40000000>;
-		dma-coherent;
+		dma-ranges;
 
 		ethernet: ethernet at f8010000 {
 			clock-names = "phy_ref_clk", "apb_pclk";
Signature · 1 line
2.14.2
#2 lore raw

PATCH v2 2/8 ARM: dts: artpec: use 1 GiB RAM

In reply to Niklas Cassel

There has never been an artpec6 devboard produced
with less than 1 GiB RAM.

Increase the default value to 1 GiB RAM, so that we can netboot with large initramfs without going OOM.

---
 arch/arm/boot/dts/artpec6-devboard.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/artpec6-devboard.dts +1 -1
index 9dfe845694cf..502f3de6dc5b 100644
@@ -26,7 +26,7 @@
 
 	memory {
 		device_type = "memory";
-		reg = <0x0 0x10000000>;
+		reg = <0x0 0x40000000>;
 	};
 };
 
Signature · 1 line
2.14.2
#3 lore raw

PATCH v2 3/8 ARM: dts: artpec: remove 0x prefix from clkctrl unit address

In reply to Niklas Cassel

Remove 0x prefix from clkctrl unit address.

This silences the following dtc warning:
Warning (unit_address_format):
Node /clkctrl at 0xf8000000 unit name should not have leading "0x"

---
 arch/arm/boot/dts/artpec6.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/artpec6.dtsi +1 -1
index d9776a97d8ff..f4b39738f1ac 100644
@@ -98,7 +98,7 @@
 		clock-frequency = <125000000>;
 	};
 
-	clkctrl: clkctrl at 0xf8000000 {
+	clkctrl: clkctrl at f8000000 {
 		#clock-cells = <1>;
 		compatible = "axis,artpec6-clkctrl";
 		reg = <0xf8000000 0x48>;
Signature · 1 line
2.14.2
#4 lore raw

PATCH v2 4/8 ARM: dts: artpec: migrate ethernet to stmmac binding

In reply to Niklas Cassel

The snps,dwc-qos-ethernet binding is still supported as a glue layer in the stmmac driver.
However, since the snps,dwc-qos-ethernet binding is now deprecated, migrate to stmmac's native binding.

At the same time, enable features supported by the stmmac driver, such as PTP, LPI, and an additional tx queue.

---
 arch/arm/boot/dts/artpec6-devboard.dts |  1 +
 arch/arm/boot/dts/artpec6.dtsi         | 42 ++++++++++++++++++++++++++++------
 2 files changed, 36 insertions(+), 7 deletions(-)
arch/arm/boot/dts/artpec6-devboard.dts +1 -0
index 502f3de6dc5b..d20d95359b28 100644
@@ -59,6 +59,7 @@
 	mdio {
 		#address-cells = <0x1>;
 		#size-cells = <0x0>;
+		compatible = "snps,dwmac-mdio";
 		phy1: phy at 0 {
 			compatible = "ethernet-phy-ieee802.3-c22";
 			device_type = "ethernet-phy";
arch/arm/boot/dts/artpec6.dtsi +35 -7

54 lines not on this page · raw message

Signature · 1 line
2.14.2
#5 lore raw

PATCH v2 5/8 ARM: dts: artpec: add and utilize artpec6 pin controller

In reply to Niklas Cassel

Add node for the pin controller used in the artpec6 SoC, and start using it for the exising UARTs.

---
 arch/arm/boot/dts/artpec6.dtsi | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
arch/arm/boot/dts/artpec6.dtsi +34 -0
index 981aecd27b0b..7a6d8f39823a 100644
@@ -180,6 +180,32 @@
 		status = "disabled";
 	};
 
+	pinctrl: pinctrl at f801d000 {
+		compatible = "axis,artpec6-pinctrl";
+		reg = <0xf801d000 0x400>;
+
+		pinctrl_uart0: uart0grp {
+			function = "uart0";
+			groups = "uart0grp2";
+			bias-pull-up;
+		};
+		pinctrl_uart1: uart1grp {
+			function = "uart1";
+			groups = "uart1grp0";
+			bias-pull-up;
+		};
+		pinctrl_uart2: uart2grp {
+			function = "uart2";
+			groups = "uart2grp1";
+			bias-pull-up;
+		};
+		pinctrl_uart3: uart3grp {
+			function = "uart3";
+			groups = "uart3grp0";
+			bias-pull-up;
+		};
+	};
+
 	amba at 0 {
 		compatible = "simple-bus";
 		#address-cells = <0x1>;
@@ -238,6 +264,8 @@
 			clocks = <&clkctrl ARTPEC6_CLK_UART_REFCLK>,
 				<&clkctrl ARTPEC6_CLK_UART_PCLK>;
 			clock-names = "uart_clk", "apb_pclk";
+			pinctrl-names = "default";
+			pinctrl-0 = <&pinctrl_uart0>;
 			status = "disabled";
 		};
 		uart1: serial at f8037000 {
@@ -247,6 +275,8 @@
 			clocks = <&clkctrl ARTPEC6_CLK_UART_REFCLK>,
 				<&clkctrl ARTPEC6_CLK_UART_PCLK>;
 			clock-names = "uart_clk", "apb_pclk";
+			pinctrl-names = "default";
+			pinctrl-0 = <&pinctrl_uart1>;
 			status = "disabled";
 		};
 		uart2: serial at f8038000 {
@@ -256,6 +286,8 @@
 			clocks = <&clkctrl ARTPEC6_CLK_UART_REFCLK>,
 				<&clkctrl ARTPEC6_CLK_UART_PCLK>;
 			clock-names = "uart_clk", "apb_pclk";
+			pinctrl-names = "default";
+			pinctrl-0 = <&pinctrl_uart2>;
 			status = "disabled";
 		};
 		uart3: serial at f8039000 {
@@ -265,6 +297,8 @@
 			clocks = <&clkctrl ARTPEC6_CLK_UART_REFCLK>,
 				<&clkctrl ARTPEC6_CLK_UART_PCLK>;
 			clock-names = "uart_clk", "apb_pclk";
+			pinctrl-names = "default";
+			pinctrl-0 = <&pinctrl_uart3>;
 			status = "disabled";
 		};
 	};
Signature · 1 line
2.14.2
#6 lore raw

PATCH v2 6/8 ARM: dts: artpec: add and utilize nbpfaxi DMA controllers

In reply to Niklas Cassel

Add nodes for the nbpfaxi DMA controllers used in the artpec6 SoC, and start using them for the exising UARTs.

---
 arch/arm/boot/dts/artpec6.dtsi | 58 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)
arch/arm/boot/dts/artpec6.dtsi +58 -0
index 7a6d8f39823a..1c46df0c03ce 100644
@@ -41,6 +41,7 @@
  */
 
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/dma/nbpfaxi.h>
 #include <dt-bindings/clock/axis,artpec6-clkctrl.h>
 #include "skeleton.dtsi"
 
@@ -213,6 +214,51 @@
 		ranges;
 		dma-ranges;
 
+		dma0: dma at f8019000 {
+			compatible = "renesas,nbpfaxi64dmac8b16";
+			reg = <0xf8019000 0x400>;
+			interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>, /* error */
+				     <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "error",
+					  "ch0", "ch1", "ch2", "ch3",
+					  "ch4", "ch5", "ch6", "ch7",
+					  "ch8", "ch9", "ch10", "ch12",
+					  "ch12", "ch13", "ch14", "ch15";
+			clocks = <&clkctrl ARTPEC6_CLK_DMA_ACLK>;
+			#dma-cells = <2>;
+			dma-channels = <8>;
+			dma-requests = <8>;
+		};
+		dma1: dma at f8019400 {
+			compatible = "renesas,nbpfaxi64dmac8b16";
+			reg = <0xf8019400 0x400>;
+			interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>, /* error */
+				     <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "error",
+					  "ch0", "ch1", "ch2", "ch3",
+					  "ch4", "ch5", "ch6", "ch7",
+					  "ch8", "ch9", "ch10", "ch12",
+					  "ch12", "ch13", "ch14", "ch15";
+			clocks = <&clkctrl ARTPEC6_CLK_DMA_ACLK>;
+			#dma-cells = <2>;
+			dma-channels = <8>;
+			dma-requests = <8>;
+		};
+
 		ethernet: ethernet at f8010000 {
 			clock-names = "stmmaceth", "ptp_ref";
 			clocks = <&clkctrl ARTPEC6_CLK_ETH_ACLK>,
@@ -266,6 +312,9 @@
 			clock-names = "uart_clk", "apb_pclk";
 			pinctrl-names = "default";
 			pinctrl-0 = <&pinctrl_uart0>;
+			dmas = <&dma0 4 (NBPF_SLAVE_RQ_HIGH | NBPF_SLAVE_RQ_LEVEL)>,
+			       <&dma0 5 (NBPF_SLAVE_RQ_HIGH | NBPF_SLAVE_RQ_LEVEL)>;
+			dma-names = "rx", "tx";
 			status = "disabled";
 		};
 		uart1: serial at f8037000 {
@@ -277,6 +326,9 @@
 			clock-names = "uart_clk", "apb_pclk";
 			pinctrl-names = "default";
 			pinctrl-0 = <&pinctrl_uart1>;
+			dmas = <&dma0 6 (NBPF_SLAVE_RQ_HIGH | NBPF_SLAVE_RQ_LEVEL)>,
+			       <&dma0 7 (NBPF_SLAVE_RQ_HIGH | NBPF_SLAVE_RQ_LEVEL)>;
+			dma-names = "rx", "tx";
 			status = "disabled";
 		};
 		uart2: serial at f8038000 {
@@ -288,6 +340,9 @@
 			clock-names = "uart_clk", "apb_pclk";
 			pinctrl-names = "default";
 			pinctrl-0 = <&pinctrl_uart2>;
+			dmas = <&dma1 0 (NBPF_SLAVE_RQ_HIGH | NBPF_SLAVE_RQ_LEVEL)>,
+			       <&dma1 1 (NBPF_SLAVE_RQ_HIGH | NBPF_SLAVE_RQ_LEVEL)>;
+			dma-names = "rx", "tx";
 			status = "disabled";
 		};
 		uart3: serial at f8039000 {
@@ -299,6 +354,9 @@
 			clock-names = "uart_clk", "apb_pclk";
 			pinctrl-names = "default";
 			pinctrl-0 = <&pinctrl_uart3>;
+			dmas = <&dma1 2 (NBPF_SLAVE_RQ_HIGH | NBPF_SLAVE_RQ_LEVEL)>,
+			       <&dma1 3 (NBPF_SLAVE_RQ_HIGH | NBPF_SLAVE_RQ_LEVEL)>;
+			dma-names = "rx", "tx";
 			status = "disabled";
 		};
 	};
Signature · 1 line
2.14.2
#7 lore raw

PATCH v2 7/8 ARM: dts: artpec: add disabled node for PCIe endpoint mode

In reply to Niklas Cassel

The PCIe controller in the artpec6 SoC supports both root complex and endpoint mode, however, the controller can only be used in one of the modes.

Both pci nodes are disabled by default. A DTS file can enable one of them, depending on what mode it wants to run.

---
Changes since V1:
removed unused properties "interrupts" and "interrupt-names"

 arch/arm/boot/dts/artpec6.dtsi | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm/boot/dts/artpec6.dtsi +18 -0
index 1c46df0c03ce..b7720be8afb1 100644
@@ -154,6 +154,10 @@
 		interrupt-affinity = <&cpu0>, <&cpu1>;
 	};
 
+	/*
+	 * Both pci nodes cannot be enabled at the same time,
+	 * leave the unwanted node as disabled.
+	 */
 	pcie: pcie at f8050000 {
 		compatible = "axis,artpec6-pcie", "snps,dw-pcie";
 		reg = <0xf8050000 0x2000
@@ -181,6 +185,20 @@
 		status = "disabled";
 	};
 
+	pcie_ep: pcie_ep@f8050000 {
+		compatible = "axis,artpec6-pcie-ep", "snps,dw-pcie";
+		reg = <0xf8050000 0x2000
+		       0xf8051000 0x2000
+		       0xf8040000 0x1000
+		       0xc0000000 0x20000000>;
+		reg-names = "dbi", "dbi2", "phy", "addr_space";
+		num-ib-windows = <6>;
+		num-ob-windows = <2>;
+		num-lanes = <2>;
+		axis,syscon-pcie = <&syscon>;
+		status = "disabled";
+	};
+
 	pinctrl: pinctrl at f801d000 {
 		compatible = "axis,artpec6-pinctrl";
 		reg = <0xf801d000 0x400>;
Signature · 1 line
2.14.2
#8 lore raw

PATCH v2 8/8 ARM: dts: artpec: add node for hardware crypto accelerator

In reply to Niklas Cassel

Add node for the hardware crypto acceleration used in the artpec6 SoC.

---
 arch/arm/boot/dts/artpec6.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/boot/dts/artpec6.dtsi +6 -0
index b7720be8afb1..3e4115c2cd75 100644
@@ -232,6 +232,12 @@
 		ranges;
 		dma-ranges;
 
+		crypto at f4264000 {
+			compatible = "axis,artpec6-crypto";
+			reg = <0xf4264000 0x4000>;
+			interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
+		};
+
 		dma0: dma at f8019000 {
 			compatible = "renesas,nbpfaxi64dmac8b16";
 			reg = <0xf8019000 0x400>;
Signature · 1 line
2.14.2
#9 lore raw
In reply to Niklas Cassel
Quoted 4 lines · Niklas Cassel

Hello,

Here comes some ARTPEC-6 ARM SoC device tree updates.

Quoted 9 lines

Niklas Cassel (8):
ARM: dts: artpec: disable Accelerator Coherency Port
ARM: dts: artpec: use 1 GiB RAM
ARM: dts: artpec: remove 0x prefix from clkctrl unit address
ARM: dts: artpec: migrate ethernet to stmmac binding
ARM: dts: artpec: add and utilize artpec6 pin controller
ARM: dts: artpec: add and utilize nbpfaxi DMA controllers
ARM: dts: artpec: add disabled node for PCIe endpoint mode
ARM: dts: artpec: add node for hardware crypto accelerator

For a series eight patches, a pull request would save me some work, but I applied it anyway.

Are you sure that the first three patches shouldn't be applied to stable backports?

Arnd

#10 lore raw
Quoted 15 lines · Arnd Bergmann
Quoted 4 lines · Niklas Cassel

Hello,

Here comes some ARTPEC-6 ARM SoC device tree updates.

Quoted 9 lines

Niklas Cassel (8):
ARM: dts: artpec: disable Accelerator Coherency Port
ARM: dts: artpec: use 1 GiB RAM
ARM: dts: artpec: remove 0x prefix from clkctrl unit address
ARM: dts: artpec: migrate ethernet to stmmac binding
ARM: dts: artpec: add and utilize artpec6 pin controller
ARM: dts: artpec: add and utilize nbpfaxi DMA controllers
ARM: dts: artpec: add disabled node for PCIe endpoint mode
ARM: dts: artpec: add node for hardware crypto accelerator

Quoted 2 lines

For a series eight patches, a pull request would save me some work, but I applied it anyway.

Thank you Arnd.
You will receive pull requests in the future.

Quoted 3 lines

Are you sure that the first three patches shouldn't be applied to stable backports?

The only DTS available upstream is for the ARTPEC-6 devboard. Considering that ARTPEC-6 devboards are only used in-house, I don't see a reason to backport anything from this series.

Best regards,
Niklas

#11 lore raw
Quoted 23 lines · Niklas Cassel
Quoted 15 lines · Arnd Bergmann
Quoted 4 lines · Niklas Cassel

Hello,

Here comes some ARTPEC-6 ARM SoC device tree updates.

Quoted 9 lines

Niklas Cassel (8):
ARM: dts: artpec: disable Accelerator Coherency Port
ARM: dts: artpec: use 1 GiB RAM
ARM: dts: artpec: remove 0x prefix from clkctrl unit address
ARM: dts: artpec: migrate ethernet to stmmac binding
ARM: dts: artpec: add and utilize artpec6 pin controller
ARM: dts: artpec: add and utilize nbpfaxi DMA controllers
ARM: dts: artpec: add disabled node for PCIe endpoint mode
ARM: dts: artpec: add node for hardware crypto accelerator

Quoted 2 lines

For a series eight patches, a pull request would save me some work, but I applied it anyway.

Thank you Arnd.
You will receive pull requests in the future.

Quoted 1 line
Quoted 6 lines
Quoted 2 lines

Are you sure that the first three patches shouldn't be applied to stable backports?

The only DTS available upstream is for the ARTPEC-6 devboard. Considering that ARTPEC-6 devboards are only used in-house, I don't see a reason to backport anything from this series.

Ok, makes sense. Thanks for checking!

Arnd