Skip to contentSkip to conversation

ARM: add NAND support to Ebang EBAZ4205 board

PATCH In review Michael Walle 2 participants 6 messages Jun 16, 2021 – Jun 21, 2021

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

cover ARM: add NAND support to Ebang EBAZ4205 board

Thanks to Miguel, there is finally a NAND driver for this SoC and we can now support the NAND device on the EBAZ4205.

Btw. I'm not sure how often the PL35x NAND controller is used in SoC and if it qualifies to add it to the multi_v7 defconfig.

Michael Walle (3):
ARM: configs: multi_v7: enable PL35x NAND controller
ARM: dts: zynq: add NAND flash controller node
ARM: dts: ebaz4205: enable NAND support

 arch/arm/boot/dts/zynq-7000.dtsi    | 21 +++++++++++++++++++++
 arch/arm/boot/dts/zynq-ebaz4205.dts | 12 ++++++++++++
 arch/arm/configs/multi_v7_defconfig |  1 +
 3 files changed, 34 insertions(+)
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/3 ARM: configs: multi_v7: enable PL35x NAND controller

After years, linux finally got a driver for the PL35x NAND controller found on the Xilinx Zynq-7000 SoC for example. Enable support for this driver.

---
 arch/arm/configs/multi_v7_defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/configs/multi_v7_defconfig +1 -0
index 52a0400fdd92..8d5ec5986b42 100644
@@ -215,6 +215,7 @@ CONFIG_MTD_NAND_GPMI_NAND=y
 CONFIG_MTD_NAND_VF610_NFC=y
 CONFIG_MTD_NAND_DAVINCI=y
 CONFIG_MTD_NAND_STM32_FMC2=y
+CONFIG_MTD_NAND_PL35X=y
 CONFIG_MTD_SPI_NOR=y
 CONFIG_SPI_ASPEED_SMC=m
 CONFIG_MTD_UBI=y
Signature · 1 line
2.20.1
#2 lore raw

PATCH 2/3 ARM: dts: zynq: add NAND flash controller node

In reply to Michael Walle

Recently, a driver for the ARM Primecell PL35x static memory controller (including NAND controller) was added in linux. Add the corresponding device tree node.

---
 arch/arm/boot/dts/zynq-7000.dtsi | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
arch/arm/boot/dts/zynq-7000.dtsi +21 -0
index df9ad831cf05..47c2a4b14c06 100644
@@ -252,6 +252,27 @@
 			#size-cells = <0>;
 		};
 
+		smcc: memory-controller@e000e000 {
+			compatible = "arm,pl353-smc-r2p1", "arm,primecell";
+			reg = <0xe000e000 0x0001000>;
+			status = "disabled";
+			clock-names = "memclk", "apb_pclk";
+			clocks = <&clkc 11>, <&clkc 44>;
+			ranges = <0x0 0x0 0xe1000000 0x1000000 /* Nand CS region */
+				  0x1 0x0 0xe2000000 0x2000000 /* SRAM/NOR CS0 region */
+				  0x2 0x0 0xe4000000 0x2000000>; /* SRAM/NOR CS1 region */
+			#address-cells = <2>;
+			#size-cells = <1>;
+
+			nfc0: nand-controller@0,0 {
+				compatible = "arm,pl353-nand-r2p1";
+				reg = <0 0 0x1000000>;
+				status = "disabled";
+				#address-cells = <1>;
+				#size-cells = <0>;
+			};
+		};
+
 		sdhci0: mmc@e0100000 {
 			compatible = "arasan,sdhci-8.9a";
 			status = "disabled";
Signature · 1 line
2.20.1
#3 lore raw

PATCH 3/3 ARM: dts: ebaz4205: enable NAND support

In reply to Michael Walle

The board features a 128MiB NAND chip and recently linux gained support for the NAND controller on the Zynq SoC. Thus add the corresponding devicetree nodes.

---
 arch/arm/boot/dts/zynq-ebaz4205.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/boot/dts/zynq-ebaz4205.dts +12 -0
index b0b836aedd76..53fa6dbfd8fd 100644
@@ -48,6 +48,14 @@
 	pinctrl-0 = <&pinctrl_gpio0_default>;
 };
 
+&nfc0 {
+	status = "okay";
+
+	nand@0 {
+		reg = <0>;
+	};
+};
+
 &pinctrl0 {
 	pinctrl_gpio0_default: gpio0-default {
 		mux {
@@ -118,6 +126,10 @@
 	};
 };
 
+&smcc {
+	status = "okay";
+};
+
 &sdhci0 {
 	status = "okay";
 	disable-wp;
Signature · 1 line
2.20.1
#5 lore raw
In reply to Michael Walle
Quoted 11 lines · Michael Walle

Thanks to Miguel, there is finally a NAND driver for this SoC and we can now support the NAND device on the EBAZ4205.

Btw. I'm not sure how often the PL35x NAND controller is used in SoC and if it qualifies to add it to the multi_v7 defconfig.

Michael Walle (3):
ARM: configs: multi_v7: enable PL35x NAND controller
ARM: dts: zynq: add NAND flash controller node
ARM: dts: ebaz4205: enable NAND support

Quoted 5 lines
 arch/arm/boot/dts/zynq-7000.dtsi    | 21 +++++++++++++++++++++
 arch/arm/boot/dts/zynq-ebaz4205.dts | 12 ++++++++++++
 arch/arm/configs/multi_v7_defconfig |  1 +
 3 files changed, 34 insertions(+)

Queue.

Thanks,
Michal