Created
May 21, 2013 18:38
-
-
Save proxy-sander/5622174 to your computer and use it in GitHub Desktop.
changes I made to the device tree to get nand working on linux-3.9-at91
Note: one of the pinctrl-0 additions may not be required
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi | |
index 6086b23..0181e21 100644 | |
--- a/arch/arm/boot/dts/at91sam9x5.dtsi | |
+++ b/arch/arm/boot/dts/at91sam9x5.dtsi | |
@@ -238,35 +238,45 @@ | |
}; | |
nand { | |
- pinctrl_nand: nand-0 { | |
- atmel,pins = | |
- <3 0 0x1 0x0 /* PD0 periph A Read Enable */ | |
- 3 1 0x1 0x0 /* PD1 periph A Write Enable */ | |
- 3 2 0x1 0x0 /* PD2 periph A Address Latch Enable */ | |
- 3 3 0x1 0x0 /* PD3 periph A Command Latch Enable */ | |
- 3 4 0x0 0x1 /* PD4 gpio Chip Enable pin pull_up */ | |
- 3 5 0x0 0x1 /* PD5 gpio RDY/BUSY pin pull_up */ | |
- 3 6 0x1 0x0 /* PD6 periph A Data bit 0 */ | |
- 3 7 0x1 0x0 /* PD7 periph A Data bit 1 */ | |
- 3 8 0x1 0x0 /* PD8 periph A Data bit 2 */ | |
- 3 9 0x1 0x0 /* PD9 periph A Data bit 3 */ | |
- 3 10 0x1 0x0 /* PD10 periph A Data bit 4 */ | |
- 3 11 0x1 0x0 /* PD11 periph A Data bit 5 */ | |
- 3 12 0x1 0x0 /* PD12 periph A Data bit 6 */ | |
- 3 13 0x1 0x0>; /* PD13 periph A Data bit 7 */ | |
- }; | |
- | |
- pinctrl_nand_16bits: nand_16bits-0 { | |
- atmel,pins = | |
- <3 14 0x1 0x0 /* PD14 periph A Data bit 8 */ | |
- 3 15 0x1 0x0 /* PD15 periph A Data bit 9 */ | |
- 3 16 0x1 0x0 /* PD16 periph A Data bit 10 */ | |
- 3 17 0x1 0x0 /* PD17 periph A Data bit 11 */ | |
- 3 18 0x1 0x0 /* PD18 periph A Data bit 12 */ | |
- 3 19 0x1 0x0 /* PD19 periph A Data bit 13 */ | |
- 3 20 0x1 0x0 /* PD20 periph A Data bit 14 */ | |
- 3 21 0x1 0x0>; /* PD21 periph A Data bit 15 */ | |
+ pinctrl_nand_rdy_enable: nand_rdy_enable-0 { | |
+ atmel,pins = | |
+ <3 5 0x0 0x1 /* PD5 gpio RDY pin pull_up */ | |
+ 3 4 0x0 0x1>; /* PD4 gpio enable pin pull_up */ | |
+ }; | |
+ | |
+ pinctrl_nand_oe_we_ale_cle: nand_oe_we_ale_cle-0 { | |
+ atmel,pins = | |
+ <3 0 0x1 0x1 /* PD0 periph A with pullup */ | |
+ 3 1 0x1 0x1 /* PD1 periph A with pullup */ | |
+ 3 2 0x1 0x1 /* PD2 periph A with pullup */ | |
+ 3 3 0x1 0x1>; /* PD3 periph A with pullup */ | |
+ }; | |
+ | |
+ pinctrl_nand_bus_on_d16_8bit: nand_bus_on_d16_8bit-0 { | |
+ atmel,pins = | |
+ <3 6 0x1 0x1 /* PD6 periph A with pullup */ | |
+ 3 7 0x1 0x1 /* PD7 periph A with pullup */ | |
+ 3 8 0x1 0x1 /* PD8 periph A with pullup */ | |
+ 3 9 0x1 0x1 /* PD9 periph A with pullup */ | |
+ 3 10 0x1 0x1 /* PD10 periph A with pullup */ | |
+ 3 11 0x1 0x1 /* PD11 periph A with pullup */ | |
+ 3 12 0x1 0x1 /* PD12 periph A with pullup */ | |
+ 3 13 0x1 0x1>; /* PD13 periph A with pullup */ | |
+ }; | |
+ | |
+ pinctrl_nand_bus_on_d16_16bit: nand_bus_on_d16_16bit-0 { | |
+ atmel,pins = | |
+ <3 14 0x1 0x1 /* PD14 periph A with pullup */ | |
+ 3 15 0x1 0x1 /* PD15 periph A with pullup */ | |
+ 3 16 0x1 0x1 /* PD16 periph A with pullup */ | |
+ 3 17 0x1 0x1 /* PD17 periph A with pullup */ | |
+ 3 18 0x1 0x1 /* PD18 periph A with pullup */ | |
+ 3 19 0x1 0x1 /* PD19 periph A with pullup */ | |
+ 3 20 0x1 0x1 /* PD20 periph A with pullup */ | |
+ 3 21 0x1 0x1>; /* PD21 periph A with pullup */ | |
}; | |
+ | |
+ | |
}; | |
macb0 { | |
@@ -641,7 +651,7 @@ | |
atmel,nand-addr-offset = <21>; | |
atmel,nand-cmd-offset = <22>; | |
pinctrl-names = "default"; | |
- pinctrl-0 = <&pinctrl_nand>; | |
+ pinctrl-0 = <&pinctrl_nand_rdy_enable &pinctrl_nand_oe_we_ale_cle &pinctrl_nand_bus_on_d16_8bit>; | |
gpios = <&pioD 5 0 | |
&pioD 4 0 | |
0 | |
diff --git a/arch/arm/boot/dts/at91sam9x5cm.dtsi b/arch/arm/boot/dts/at91sam9x5cm.dtsi | |
index 347a74a..3c95fb7 100644 | |
--- a/arch/arm/boot/dts/at91sam9x5cm.dtsi | |
+++ b/arch/arm/boot/dts/at91sam9x5cm.dtsi | |
@@ -41,6 +41,7 @@ | |
atmel,pmecc-cap = <2>; | |
atmel,pmecc-sector-size = <512>; | |
nand-on-flash-bbt; | |
+ pinctrl-0 = <&pinctrl_nand_rdy_enable &pinctrl_nand_oe_we_ale_cle &pinctrl_nand_bus_on_d16_8bit>; | |
status = "okay"; | |
at91bootstrap@0 { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment