4.14 kernel NAND driver configuration

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

jay214128
Posts: 20
Joined: Fri Jan 23, 2015 3:29 am

4.14 kernel NAND driver configuration

Thu Nov 15, 2018 12:46 am

There seems to have been some changes with the atmel NAND flash driver (drivers/mtd/nand/atmel/nand-controller.c) in the 4.14 kernel from the previous (4.9 and 4.4) kernels. The NAND on my board (at91sam9g45 SOC) only uses the Ready/Busy (rb) signal. It does not use the Chip Select (cs) or detect signals (it is always enabled).

With the 4.4 and 4.9 kernels, I could override the GPIO pin control assignments for the NAND device, specifying only the rb pin. The driver treated the cs and detect pins as optional. With the 4.14 driver, the rb and cs pins are declared as separate declarations in the DTB (arch/arm/boot/dts/at91sam9g45.dtsi), instead of both pins in the same declaration, so I do not know how to undefine the cs pin assignment. The GPIO pin (pioC 14) assigned to the cs function is used for another purpose on my board. Further, the driver now requires the cs pin to be defined, or it won't load. Any ideas how to deal with this?
jay214128
Posts: 20
Joined: Fri Jan 23, 2015 3:29 am

Re: 4.14 kernel NAND driver configuration

Thu Nov 15, 2018 3:28 am

Sorry for the noise. I sorted it out by making the following changes in my board .dts file.

Code: Select all

 		ebi: ebi@10000000 {
 			status = "okay";
 
 			nand_controller: nand-controller {
 				status = "okay";
-				pinctrl-0 = <&pinctrl_nand_cs &pinctrl_nand_rb>;
+				pinctrl-0 = <&pinctrl_nand_rb>;
 				pinctrl-names = "default";
 
 				nand@3 {
 					reg = <0x3 0x0 0x800000>; /* nand@40000000 */
 					rb-gpios = <&pioC 6 GPIO_ACTIVE_HIGH>;
-					cs-gpios = <&pioC 14 GPIO_ACTIVE_HIGH>;
 					nand-bus-width = <8>;
 					nand-ecc-mode = "soft";
 					label = "atmel_nand";
 
 					partitions {

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 1 guest