Skip to contentSkip to conversation

Sync UDMA bindings from kernel

PATCH New Vignesh Raghavendra 2 participants 5 messages Jul 7, 2020 – Jul 14, 2020

Subsystems (4)
lore
Share & tools
lore

Vignesh Raghavendra

author maintainer
#0 lore raw

v3 cover Sync UDMA bindings from kernel

UDMA DT bindings have deviated from kernel's DT for AM654 and J721e. This series updates UDMA driver and sync DT bindings

Tested OSPI and CPSW on AM654 and J721e after the changes

v3:
Drop unused PSIL entries in 1/3 and compile files that are required for given SoC to reduce memory footprint.

v2:
Collect R-by
Update patch 2/3 to note about DT incompatibility

Vignesh Raghavendra (3):
dma: ti: Add static PSIL endpoint information
dma: ti: k3-udma: Update driver to use static endpoint Data
arm: dts: k3-am65/j721e: Sync DMA DT bindings from Kernel DT

 arch/arm/dts/k3-am65-mcu.dtsi                 |  44 ++++++
 arch/arm/dts/k3-am654-base-board-u-boot.dtsi  | 121 ++-------------
 .../k3-j721e-common-proc-board-u-boot.dtsi    | 118 ++------------
 arch/arm/dts/k3-j721e-mcu-wakeup.dtsi         |  43 ++++++
 drivers/dma/ti/Kconfig                        |   4 +
 drivers/dma/ti/Makefile                       |   4 +
 drivers/dma/ti/k3-psil-am654.c                |  89 +++++++++++
 drivers/dma/ti/k3-psil-j721e.c                |  47 ++++++
 drivers/dma/ti/k3-psil-priv.h                 |  43 ++++++
 drivers/dma/ti/k3-psil.c                      |  42 +++++
 drivers/dma/ti/k3-psil.h                      |  67 ++++++++
 drivers/dma/ti/k3-udma.c                      | 145 ++++++++++++------
 include/dt-bindings/dma/k3-udma.h             |  31 ----
 13 files changed, 510 insertions(+), 288 deletions(-)
 create mode 100644 drivers/dma/ti/k3-psil-am654.c
 create mode 100644 drivers/dma/ti/k3-psil-j721e.c
 create mode 100644 drivers/dma/ti/k3-psil-priv.h
 create mode 100644 drivers/dma/ti/k3-psil.c
 create mode 100644 drivers/dma/ti/k3-psil.h
 delete mode 100644 include/dt-bindings/dma/k3-udma.h
Signature · 1 line
2.27.0
author maintainer
#1 lore raw

PATCH v3 1/3 dma: ti: Add static PSIL endpoint information

Much of PSIL endpoint configuration for a given SoC can be known at compile time, therefore pass them for platform specific data instead of DT.

Add per SoC's specific PSIL endpoint data. This is to bring driver in sync with upstream DT.

---
 drivers/dma/ti/Kconfig         |  3 ++
 drivers/dma/ti/Makefile        |  4 ++
 drivers/dma/ti/k3-psil-am654.c | 89 ++++++++++++++++++++++++++++++++++
 drivers/dma/ti/k3-psil-j721e.c | 47 ++++++++++++++++++
 drivers/dma/ti/k3-psil-priv.h  | 43 ++++++++++++++++
 drivers/dma/ti/k3-psil.c       | 42 ++++++++++++++++
 drivers/dma/ti/k3-psil.h       | 67 +++++++++++++++++++++++++
 7 files changed, 295 insertions(+)
 create mode 100644 drivers/dma/ti/k3-psil-am654.c
 create mode 100644 drivers/dma/ti/k3-psil-j721e.c
 create mode 100644 drivers/dma/ti/k3-psil-priv.h
 create mode 100644 drivers/dma/ti/k3-psil.c
 create mode 100644 drivers/dma/ti/k3-psil.h
drivers/dma/ti/Kconfig +3 -0
index 3d5498326c..9d7a1efb2b 100644
@@ -12,3 +12,6 @@ config TI_K3_NAVSS_UDMA
         help
           Support for UDMA used in K3 devices.
 endif
+
+config TI_K3_PSIL
+	bool
drivers/dma/ti/Makefile +4 -0
index de2f9ac91a..4ea9c626cc 100644
@@ -1,3 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0+
 
 obj-$(CONFIG_TI_K3_NAVSS_UDMA) += k3-udma.o
+obj-$(CONFIG_TI_K3_PSIL) += k3-psil-data.o
+k3-psil-data-y += k3-psil.o
+k3-psil-data-$(CONFIG_SOC_K3_AM6) += k3-psil-am654.o
+k3-psil-data-$(CONFIG_SOC_K3_J721E) += k3-psil-j721e.o
drivers/dma/ti/k3-psil-am654.c new file +89 -0

89 lines not on this page · raw message

drivers/dma/ti/k3-psil-j721e.c new file +47 -0

47 lines not on this page · raw message

drivers/dma/ti/k3-psil-priv.h new file +43 -0

43 lines not on this page · raw message

drivers/dma/ti/k3-psil.c new file +42 -0

42 lines not on this page · raw message

drivers/dma/ti/k3-psil.h new file +67 -0

67 lines not on this page · raw message

Signature · 1 line
2.27.0
author maintainer
#2 lore raw

PATCH v3 2/3 dma: ti: k3-udma: Update driver to use static endpoint Data

In reply to Vignesh Raghavendra

Update driver to use static PSIL endpoint Data instead of DT. This will allow DT bindings to be in sync with kernel's DT.

Note that this patch breaks networking and OSPI boot as driver changes are not backward compatible with existing DT. Subsequent commit will update the DT to make it compatible with updated driver.

---
 drivers/dma/ti/Kconfig   |   1 +
 drivers/dma/ti/k3-udma.c | 145 +++++++++++++++++++++++++++------------
 2 files changed, 103 insertions(+), 43 deletions(-)
drivers/dma/ti/Kconfig +1 -0
index 9d7a1efb2b..9cbd5f334d 100644
@@ -8,6 +8,7 @@ config TI_K3_NAVSS_UDMA
         select DMA
         select TI_K3_NAVSS_RINGACC
         select TI_K3_NAVSS_PSILCFG
+        select TI_K3_PSIL
         default n
         help
           Support for UDMA used in K3 devices.
drivers/dma/ti/k3-udma.c +102 -43

199 lines not on this page · raw message

Signature · 1 line
2.27.0
author maintainer
#3 lore raw

PATCH v3 3/3 arm: dts: k3-am65/j721e: Sync DMA DT bindings from Kernel DT

In reply to Vignesh Raghavendra

Sync DT bindings from kernel DT and move them to out of -u-boot.dtsi files.

---
 arch/arm/dts/k3-am65-mcu.dtsi                 |  44 +++++++
 arch/arm/dts/k3-am654-base-board-u-boot.dtsi  | 121 ++----------------
 .../k3-j721e-common-proc-board-u-boot.dtsi    | 118 ++---------------
 arch/arm/dts/k3-j721e-mcu-wakeup.dtsi         |  43 +++++++
 include/dt-bindings/dma/k3-udma.h             |  31 -----
 5 files changed, 112 insertions(+), 245 deletions(-)
 delete mode 100644 include/dt-bindings/dma/k3-udma.h
arch/arm/dts/k3-am65-mcu.dtsi +44 -0
index bc9a87210d..d1a9fb5de6 100644
@@ -102,4 +102,48 @@
 			#size-cells = <0>;
 		};
 	};
+
+	mcu_navss {
+		compatible = "simple-mfd";
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+		dma-coherent;
+		dma-ranges;
+
+		ti,sci-dev-id = <119>;
+
+		mcu_ringacc: ringacc at 2b800000 {
+			compatible = "ti,am654-navss-ringacc";
+			reg =	<0x0 0x2b800000 0x0 0x400000>,
+				<0x0 0x2b000000 0x0 0x400000>,
+				<0x0 0x28590000 0x0 0x100>,
+				<0x0 0x2a500000 0x0 0x40000>;
+			reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target";
+			ti,num-rings = <286>;
+			ti,sci-rm-range-gp-rings = <0x2>; /* GP ring range */
+			ti,dma-ring-reset-quirk;
+			ti,sci = <&dmsc>;
+			ti,sci-dev-id = <195>;
+		};
+
+		mcu_udmap: dma-controller at 285c0000 {
+			compatible = "ti,am654-navss-mcu-udmap";
+			reg =	<0x0 0x285c0000 0x0 0x100>,
+				<0x0 0x2a800000 0x0 0x40000>,
+				<0x0 0x2aa00000 0x0 0x40000>;
+			reg-names = "gcfg", "rchanrt", "tchanrt";
+			#dma-cells = <1>;
+
+			ti,sci = <&dmsc>;
+			ti,sci-dev-id = <194>;
+			ti,ringacc = <&mcu_ringacc>;
+
+			ti,sci-rm-range-tchan = <0x1>, /* TX_HCHAN */
+						<0x2>; /* TX_CHAN */
+			ti,sci-rm-range-rchan = <0x3>, /* RX_HCHAN */
+						<0x4>; /* RX_CHAN */
+			ti,sci-rm-range-rflow = <0x5>; /* GP RFLOW */
+		};
+	};
 };
arch/arm/dts/k3-am654-base-board-u-boot.dtsi +13 -108

150 lines not on this page · raw message

arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi +12 -106

149 lines not on this page · raw message

arch/arm/dts/k3-j721e-mcu-wakeup.dtsi +43 -0

47 lines not on this page · raw message

include/dt-bindings/dma/k3-udma.h deleted +0 -31
deleted file mode 100644
index 670e1232b4..0000000000
@@ -1,31 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- *  Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com
- */
-
-#ifndef __DT_TI_UDMA_H
-#define __DT_TI_UDMA_H
-
-#define UDMA_TR_MODE		0
-#define UDMA_PKT_MODE		1
-
-#define UDMA_DIR_TX		0
-#define UDMA_DIR_RX		1
-
-#define PSIL_STATIC_TR_NONE	0
-#define PSIL_STATIC_TR_XY	1
-#define PSIL_STATIC_TR_MCAN	2
-
-#define UDMA_PDMA_TR_XY(id)				\
-	ti,psil-config##id {				\
-		linux,udma-mode = <UDMA_TR_MODE>;	\
-		statictr-type = <PSIL_STATIC_TR_XY>;	\
-	}
-
-#define UDMA_PDMA_PKT_XY(id)				\
-	ti,psil-config##id {				\
-		linux,udma-mode = <UDMA_PKT_MODE>;	\
-		statictr-type = <PSIL_STATIC_TR_XY>;	\
-	}
-
-#endif /* __DT_TI_UDMA_H */
Signature · 1 line
2.27.0
#4 lore raw

v3 cover Sync UDMA bindings from kernel

In reply to Vignesh Raghavendra
Quoted 4 lines · Vignesh Raghavendra

UDMA DT bindings have deviated from kernel's DT for AM654 and J721e. This series updates UDMA driver and sync DT bindings

Tested OSPI and CPSW on AM654 and J721e after the changes

Applied to u-boot-ti.

Thanks and regards,
Lokesh