1 /* SPDX-License-Identifier: GPL-2.0 */
7 * Contains all JEDEC related definitions
10 #ifndef __LINUX_MTD_JEDEC_H
11 #define __LINUX_MTD_JEDEC_H
13 struct jedec_ecc_info {
17 __le16 block_endurance;
22 #define JEDEC_FEATURE_16_BIT_BUS (1 << 0)
24 /* JEDEC Optional Commands */
25 #define JEDEC_OPT_CMD_READ_CACHE BIT(1)
27 struct nand_jedec_params {
28 /* rev info and features block */
35 u8 num_of_param_pages;
38 /* manufacturer information block */
39 char manufacturer[12];
44 /* memory organization block */
46 __le16 spare_bytes_per_page;
48 __le32 pages_per_block;
49 __le32 blocks_per_lun;
55 u8 multi_plane_op_attr;
58 /* electrical parameter block */
59 __le16 async_sdr_speed_grade;
60 __le16 toggle_ddr_speed_grade;
61 __le16 sync_ddr_speed_grade;
62 u8 async_sdr_features;
63 u8 toggle_ddr_features;
68 __le16 t_r_multi_plane;
70 __le16 io_pin_capacitance_typ;
71 __le16 input_pin_capacitance_typ;
72 __le16 clk_pin_capacitance_typ;
73 u8 driver_strength_support;
77 /* ECC and endurance block */
78 u8 guaranteed_good_blocks;
79 __le16 guaranteed_block_endurance;
80 struct jedec_ecc_info ecc_info[4];
87 __le16 vendor_rev_num;
90 /* CRC for Parameter Page */
94 #endif /* __LINUX_MTD_JEDEC_H */