Skip to contentSkip to conversation

arm64: dts: ti: k3-am64-main: Add GPMC & ELM nodes

PATCH Superseded Roger Quadros 2 participants 5 messages Feb 4, 2022 – Feb 28, 2022

Subsystems (2)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v3 cover arm64: dts: ti: k3-am64-main: Add GPMC & ELM nodes

Hi Nishanth,

This series adds GPMC and ELM controller device tree nodes to AM64 SoC's dtsi file.

Changelog:
v3
- Rebased to v5.17-rc1

v2
- Fix register sizes for GPMC node.
- Disable GPMC and ELM nodes in board files. They will be enabled in NAND card device tree overlay.

cheers,
-roger

Roger Quadros (2):
arm64: dts: ti: k3-am64-main: Add GPMC memory controller node
arm64: dts: ti: k3-am64-main: Add ELM (Error Location Module) node

 arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 28 ++++++++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am642-evm.dts  |  8 +++++++
 arch/arm64/boot/dts/ti/k3-am642-sk.dts   |  8 +++++++
 3 files changed, 44 insertions(+)
Signature · 1 line
2.17.1
#1 lore raw

PATCH v3 1/2 arm64: dts: ti: k3-am64-main: Add GPMC memory controller node

The GPMC is a unified memory controller dedicated for interfacing with external memory devices like
- Asynchronous SRAM-like memories and ASICs
- Asynchronous, synchronous, and page mode burst NOR flash
- NAND flash
- Pseudo-SRAM devices

---
 arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 19 +++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am642-evm.dts  |  4 ++++
 arch/arm64/boot/dts/ti/k3-am642-sk.dts   |  4 ++++
 3 files changed, 27 insertions(+)
arch/arm64/boot/dts/ti/k3-am64-main.dtsi +19 -0
index 012011dc619a..94ea5c304d73 100644
@@ -1289,4 +1289,23 @@
 		interrupt-names = "int0", "int1";
 		bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
 	};
+
+	gpmc0: memory-controller@3b000000 {
+		compatible = "ti,am64-gpmc";
+		power-domains = <&k3_pds 80 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 80 0>;
+		clock-names = "fck";
+		reg = <0x00 0x03b000000 0x00 0x400>,
+		      <0x00 0x050000000 0x00 0x8000000>;
+		reg-names = "cfg", "data";
+		interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
+		gpmc,num-cs = <3>;
+		gpmc,num-waitpins = <2>;
+		#address-cells = <2>;
+		#size-cells = <1>;
+		interrupt-controller;
+		#interrupt-cells = <2>;
+		gpio-controller;
+		#gpio-cells = <2>;
+	};
 };
arch/arm64/boot/dts/ti/k3-am642-evm.dts +4 -0
index e94ae178b1ae..6bd0c0876865 100644
@@ -678,3 +678,7 @@
 	pinctrl-0 = <&main_mcan1_pins_default>;
 	phys = <&transceiver2>;
 };
+
+&gpmc0 {
+	status = "disabled";
+};
arch/arm64/boot/dts/ti/k3-am642-sk.dts +4 -0
index a9785bec12df..40706aa61514 100644
@@ -533,3 +533,7 @@
 &main_mcan1 {
 	status = "disabled";
 };
+
+&gpmc0 {
+	status = "disabled";
+};
Signature · 1 line
2.17.1
maintainer Reviewed-by on v3 1/2
#2 lore raw

Re: [PATCH v3 1/2] arm64: dts: ti: k3-am64-main: Add GPMC memory controller node

Quoted 7 lines · Roger Quadros

The GPMC is a unified memory controller dedicated for interfacing with external memory devices like
- Asynchronous SRAM-like memories and ASICs
- Asynchronous, synchronous, and page mode burst NOR flash
- NAND flash
- Pseudo-SRAM devices

Quoted 7 lines
---
 arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 19 +++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am642-evm.dts  |  4 ++++
 arch/arm64/boot/dts/ti/k3-am642-sk.dts   |  4 ++++
 3 files changed, 27 insertions(+)

[...]

Regards
Vignesh

#3 lore raw

PATCH v3 2/2 arm64: dts: ti: k3-am64-main: Add ELM (Error Location Module) node

In reply to Roger Quadros

The ELM module is used for GPMC NAND accesses for detecting and correcting errors during reads due to NAND bitflips errors.

4-, 8-, and 16-bit error-correction levels are supported using the BCH (Bose-ChaudhurI-Hocquenghem) algorithm.

---
 arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 9 +++++++++
 arch/arm64/boot/dts/ti/k3-am642-evm.dts  | 4 ++++
 arch/arm64/boot/dts/ti/k3-am642-sk.dts   | 4 ++++
 3 files changed, 17 insertions(+)
arch/arm64/boot/dts/ti/k3-am64-main.dtsi +9 -0
index 94ea5c304d73..b17620e999a5 100644
@@ -1308,4 +1308,13 @@
 		gpio-controller;
 		#gpio-cells = <2>;
 	};
+
+	elm0: ecc@25010000 {
+		compatible = "ti,am3352-elm";
+		reg = <0x00 0x25010000 0x00 0x2000>;
+		interrupts = <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>;
+		power-domains = <&k3_pds 54 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 54 0>;
+		clock-names = "fck";
+	};
 };
arch/arm64/boot/dts/ti/k3-am642-evm.dts +4 -0
index 6bd0c0876865..0252218282c2 100644
@@ -682,3 +682,7 @@
 &gpmc0 {
 	status = "disabled";
 };
+
+&elm0 {
+	status = "disabled";
+};
arch/arm64/boot/dts/ti/k3-am642-sk.dts +4 -0
index 40706aa61514..1d91b7ec8912 100644
@@ -537,3 +537,7 @@
 &gpmc0 {
 	status = "disabled";
 };
+
+&elm0 {
+	status = "disabled";
+};
Signature · 1 line
2.17.1
#4 lore raw

Re: [PATCH v3 2/2] arm64: dts: ti: k3-am64-main: Add ELM (Error Location Module) node

Quoted 2 lines · Roger Quadros

The ELM module is used for GPMC NAND accesses for detecting and correcting errors during reads due to NAND bitflips errors.

[...]

arch/arm64/boot/dts/ti/k3-am64-main.dtsi line 1313

Quoted 12 lines
arch/arm64/boot/dts/ti/k3-am64-main.dtsi +3 -0
index 94ea5c304d73..b17620e999a5 100644
@@ -1308,4 +1308,13 @@
 		gpio-controller;
 		#gpio-cells = <2>;
 	};
+
+	elm0: ecc@25010000 {
+		compatible = "ti,am3352-elm";

Sorry, this binding needs to move to YAML before patch can be applied.

arch/arm64/boot/dts/ti/k3-am64-main.dtsi line 1320

Quoted 7 lines
arch/arm64/boot/dts/ti/k3-am64-main.dtsi +6 -0
+		reg = <0x00 0x25010000 0x00 0x2000>;
+		interrupts = <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>;
+		power-domains = <&k3_pds 54 TI_SCI_PD_EXCLUSIVE>;
+		clocks = <&k3_clks 54 0>;
+		clock-names = "fck";
+	};
 };

[...]

Regards
Vignesh