[PATCH] arm: dts: add nand device in sun7i-a20-haoyu-marsboard.dts

Conley Lee conleylee at foxmail.com
Mon Sep 1 02:05:21 PDT 2025


The Haoyu MarsBoard-A20 comes with an 8G Hynix NAND flash,
and this commit adds this NAND device in the device tree.

Signed-off-by: Conley Lee <conleylee at foxmail.com>
---
 .../allwinner/sun7i-a20-haoyu-marsboard.dts   | 67 +++++++++++++++++++
 1 file changed, 67 insertions(+)

diff --git a/arch/arm/boot/dts/allwinner/sun7i-a20-haoyu-marsboard.dts b/arch/arm/boot/dts/allwinner/sun7i-a20-haoyu-marsboard.dts
index 097e479c2..62d775c4f 100644
--- a/arch/arm/boot/dts/allwinner/sun7i-a20-haoyu-marsboard.dts
+++ b/arch/arm/boot/dts/allwinner/sun7i-a20-haoyu-marsboard.dts
@@ -118,6 +118,58 @@ gmac_txerr: gmac-txerr-pin {
 		pins = "PA17";
 		function = "gmac";
 	};
+
+	nand_pins_a: nand_base0 at 0 {
+		pins = "PC0", "PC1", "PC2",
+		"PC5", "PC8", "PC9", "PC10",
+		"PC11", "PC12", "PC13", "PC14",
+		"PC15", "PC16";
+		function = "nand0";
+		drive-strength = <10>;
+	};
+
+	nand_cs0_pins_a: nand_cs at 0 {
+		pins = "PC4";
+		function = "nand0";
+		drive-strength = <10>;
+		bias-pull-up;
+	};
+
+	nand_cs1_pins_a: nand_cs at 1 {
+		pins = "PC3";
+		function = "nand0";
+		drive-strength = <10>;
+		bias-pull-up;
+	};
+
+	nand_cs2_pins_a: nand_cs at 2 {
+		pins = "PC17";
+		function = "nand0";
+		drive-strength = <10>;
+		bias-pull-up;
+	};
+
+	nand_cs3_pins_a: nand_cs at 3 {
+		pins = "PC18";
+		function = "nand0";
+		drive-strength = <10>;
+		bias-pull-up;
+	};
+
+	nand_rb0_pins_a: nand_rb at 0 {
+		pins = "PC6";
+		function = "nand0";
+		drive-strength = <10>;
+		bias-pull-up;
+	};
+
+	nand_rb1_pins_a: nand_rb at 1 {
+		pins = "PC7";
+		function = "nand0";
+		drive-strength = <10>;
+		bias-pull-up;
+	};
+
 };
 
 &reg_ahci_5v {
@@ -180,3 +232,18 @@ &usbphy {
 	usb2_vbus-supply = <&reg_usb2_vbus>;
 	status = "okay";
 };
+
+&nfc {
+	pinctrl-names = "default";
+	pinctrl-0 = <&nand_pins_a>, <&nand_cs0_pins_a>, <&nand_rb0_pins_a>, <&nand_cs1_pins_a>, <&nand_rb1_pins_a>;
+	status = "okay";
+
+	nand at 0 {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		reg = <0>;
+		allwinner,rb = <0>;
+		nand-ecc-mode = "hw";
+		nand-on-flash-bbt;
+	};
+};
-- 
2.25.1




More information about the linux-arm-kernel mailing list