Changing spi-nand flash type in device tree
Posted: 2024-12-13 11:54
Hello! I want to update spi-nand flash on my luckfox pico mini b board. I don't understand where can i reconfigure this parameter in your buildroot sdk. I found device tree node that is responsible for it:
and i also found my new nand flash description in kernel source code:
But i dont understand how can i pick proper device type. Which parameter in device tree should be added or changed to let linux kernel know about my new flash? Or maybe it has to be done outside of dts?
Code: Select all
/**********SFC**********/
&sfc {
status = "okay";
flash@0 {
compatible = "spi-nand";
reg = <0>;
spi-max-frequency = <75000000>;
spi-rx-bus-width = <4>;
spi-tx-bus-width = <1>;
};
};
Code: Select all
SPINAND_INFO("W25N04KV",
SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xAA, 0x23),
NAND_MEMORG(1, 2048, 128, 64, 4096, 40, 1, 1, 1),
NAND_ECCREQ(8, 512),
SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
&write_cache_variants,
&update_cache_variants),
0,
SPINAND_ECCINFO(&w25n02kv_ooblayout,
w25n02kv_ecc_get_status)),