系列文章目录
- Exynos4412 移植针对Samsung的Linux-6.1(一)下载、配置、编译Linux-6.1
- Exynos4412 移植针对Samsung的Linux-6.1(二)SD卡驱动——解决无法挂载SD卡的根文件系统
- Exynos4412 移植针对Samsung的Linux-6.1(三)SD卡驱动——解决mmc0: Timeout waiting for hardware interrupt.
- Exynos4412 移植针对Samsung的Linux-6.1(四)NandFlash卡驱动
- Exynos4412 移植针对Samsung的Linux-6.1(五)DM9000网卡驱动
- Exynos4412 移植针对Samsung的Linux-6.1(六)【已解决】SROMC寄存器的数值不正确的问题
- Exynos4412 移植Linux-6.1(七)挂载Ramdisk文件系统,【已解决】Couldn’t find valid RAM disk image starting at 0
Exynos4412 移植针对Samsung的Linux-6.1(四)NandFlash卡驱动
nandflash的型号是KLM8G2FE3B,容量8G,8位数据位,还有CMD和CLK引脚。CBT4412开发板上,NandFlash连接在
Linux6.1对于NandFlash的支持是很全面的、很完善的。关键是对设备树的修改。现记录下来,供大家参考以避坑。
执行make exynos_defconfig
之后,内核默认配置就支持NandFlash驱动。只需要在设备树中添加NandFlash的节点就可以了。设备树如下:
&gpy0 {
srom_ctrl1:srom_ctrl1{
samsung,pins = "gpy0-1","gpy0-4","gpy0-5";
samsung,pin-function = <2>; /*samsung,pin-function = <EXYNOS_PIN_FUNC_3>;*/
samsung,pin-pud = <0>;
samsung,pin-drv = <3>;
};
};
&gpy1 {
srom_ctrl2:srom_ctrl2{
samsung,pins = "gpy1-0","gpy1-1","gpy1-2","gpy1-3";
samsung,pin-function = <2>; /*samsung,pin-function = <EXYNOS_PIN_FUNC_3>;*/
samsung,pin-pud = <0>;
samsung,pin-drv = <3>;
};
};
&gpy5 {
ebi_data1:ebi_data1{
samsung,pins = "gpy5-0","gpy5-1","gpy5-2","gpy5-3","gpy5-4","gpy5-5","gpy5-6","gpy5-7";
samsung,pin-function = <2>; /*samsung,pin-function = <EXYNOS_PIN_FUNC_3>;*/
samsung,pin-pud = <0>;
samsung,pin-drv = <3>;
};
};
&gpy6 {
ebi_data2:ebi_data2{
samsung,pins = "gpy6-0","gpy6-1","gpy6-2","gpy6-3","gpy6-4","gpy6-5","gpy6-6","gpy6-7";
samsung,pin-function = <2>; /*samsung,pin-function = <EXYNOS_PIN_FUNC_3>;*/
samsung,pin-pud = <0>;
samsung,pin-drv = <3>;
};
};
/* eMMC card deviceTree node
* mshc_0: mmc@12550000
*/
&mshc_0 {
pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>;
pinctrl-names = "default";
bus-width = <8>;
num-slots = <1>;
broken-cd;
card-detect-delay = <200>;
samsung,dw-mshc-ciu-div = <3>;
samsung,dw-mshc-sdr-timing = <2 3>;
samsung,dw-mshc-ddr-timing = <1 2>;
cap-mmc-highspeed;
status = "okay";
};