Page 1 of 1

4.14 kernel NAND driver configuration

Posted: Thu Nov 15, 2018 12:46 am
by jay214128
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?

Re: 4.14 kernel NAND driver configuration

Posted: Thu Nov 15, 2018 3:28 am
by jay214128
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 {