diff mbox series

[U-Boot,v2,16/20] sunxi: dts: enable NAND on NES classic

Message ID 20180222133350.8033-17-miquel.raynal@bootlin.com
State Superseded
Delegated to: Jagannadha Sutradharudu Teki
Headers show
Series Bring NAND support to Nintendo NES Classic | expand

Commit Message

Miquel Raynal Feb. 22, 2018, 1:33 p.m. UTC
Let the Nintendo NES Classic use the Macronix NAND chip on it.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 arch/arm/dts/sun8i-a23-a33.dtsi                        | 18 ++++++++++++++++++
 .../arm/dts/sun8i-r16-nintendo-nes-classic-edition.dts | 14 ++++++++++++++
 2 files changed, 32 insertions(+)

Comments

Maxime Ripard Feb. 22, 2018, 1:59 p.m. UTC | #1
Hi,

On Thu, Feb 22, 2018 at 02:33:46PM +0100, Miquel Raynal wrote:
> Let the Nintendo NES Classic use the Macronix NAND chip on it.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  arch/arm/dts/sun8i-a23-a33.dtsi                        | 18 ++++++++++++++++++
>  .../arm/dts/sun8i-r16-nintendo-nes-classic-edition.dts | 14 ++++++++++++++
>  2 files changed, 32 insertions(+)
> 
> diff --git a/arch/arm/dts/sun8i-a23-a33.dtsi b/arch/arm/dts/sun8i-a23-a33.dtsi
> index ea50dda75a..c0053ad649 100644
> --- a/arch/arm/dts/sun8i-a23-a33.dtsi
> +++ b/arch/arm/dts/sun8i-a23-a33.dtsi
> @@ -289,6 +289,24 @@
>  				function = "uart1";
>  			};
>  
> +			nand_pins_a: nand-base0@0 {
> +				allwinner,pins = "PC0", "PC1", "PC2",
> +				"PC5", "PC8", "PC9", "PC10",
> +				"PC11", "PC12", "PC13", "PC14",
> +				"PC15";
> +				allwinner,function = "nand0";
> +			};
> +
> +			nand_cs0_pins_a: nand-cs@0 {
> +				allwinner,pins = "PC4";
> +				allwinner,function = "nand0";
> +			};
> +
> +			nand_rb0_pins_a: nand-rb@0 {
> +				allwinner,pins = "PC6";
> +				allwinner,function = "nand0";
> +			};
> +

This is the old-style binding that is now deprecated, you should
favour the new one (with function and pins instead of
allwinner,function and allwinner,pins).

The indentation of the nand pins in your first group is weird too.

Maxime
diff mbox series

Patch

diff --git a/arch/arm/dts/sun8i-a23-a33.dtsi b/arch/arm/dts/sun8i-a23-a33.dtsi
index ea50dda75a..c0053ad649 100644
--- a/arch/arm/dts/sun8i-a23-a33.dtsi
+++ b/arch/arm/dts/sun8i-a23-a33.dtsi
@@ -289,6 +289,24 @@ 
 				function = "uart1";
 			};
 
+			nand_pins_a: nand-base0@0 {
+				allwinner,pins = "PC0", "PC1", "PC2",
+				"PC5", "PC8", "PC9", "PC10",
+				"PC11", "PC12", "PC13", "PC14",
+				"PC15";
+				allwinner,function = "nand0";
+			};
+
+			nand_cs0_pins_a: nand-cs@0 {
+				allwinner,pins = "PC4";
+				allwinner,function = "nand0";
+			};
+
+			nand_rb0_pins_a: nand-rb@0 {
+				allwinner,pins = "PC6";
+				allwinner,function = "nand0";
+			};
+
 			mmc0_pins_a: mmc0@0 {
 				pins = "PF0", "PF1", "PF2",
 				       "PF3", "PF4", "PF5";
diff --git a/arch/arm/dts/sun8i-r16-nintendo-nes-classic-edition.dts b/arch/arm/dts/sun8i-r16-nintendo-nes-classic-edition.dts
index dce688ec8e..72a8505d94 100644
--- a/arch/arm/dts/sun8i-r16-nintendo-nes-classic-edition.dts
+++ b/arch/arm/dts/sun8i-r16-nintendo-nes-classic-edition.dts
@@ -61,3 +61,17 @@ 
 	pinctrl-0 = <&uart0_pins_a>;
 	status = "okay";
 };
+
+&nfc {
+	pinctrl-names = "default";
+	pinctrl-0 = <&nand_pins_a &nand_cs0_pins_a &nand_rb0_pins_a>;
+	status = "okay";
+
+	nand@0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		reg = <0>;
+		allwinner,rb = <0>;
+		nand-ecc-mode = "hw";
+	};
+};