File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -531,4 +531,15 @@ int jesd216_bfp_decode_dw16(const struct jesd216_param_header *php,
531531 const struct jesd216_bfp * bfp ,
532532 struct jesd216_bfp_dw16 * res );
533533
534+ /* JESD216D-01 section 6.6: 4-Byte Address Instruction Parameter */
535+ #define JESD216_SFDP_4B_ADDR_DW1_1S_1S_1S_READ_13_SUP BIT(0)
536+ #define JESD216_SFDP_4B_ADDR_DW1_1S_1S_1S_FAST_READ_0C_SUP BIT(1)
537+ #define JESD216_SFDP_4B_ADDR_DW1_1S_1S_2_FAST_READ_3C_SUP BIT(2)
538+ #define JESD216_SFDP_4B_ADDR_DW1_1S_2S_2S_FAST_READ_BC_SUP BIT(3)
539+ #define JESD216_SFDP_4B_ADDR_DW1_1S_1S_4S_FAST_READ_6C_SUP BIT(4)
540+ #define JESD216_SFDP_4B_ADDR_DW1_1S_4S_4_FAST_READ_EC_SUP BIT(5)
541+ #define JESD216_SFDP_4B_ADDR_DW1_1S_1S_1S_PP_12_SUP BIT(6)
542+ #define JESD216_SFDP_4B_ADDR_DW1_1S_1S_4S_PP_34_SUP BIT(7)
543+ #define JESD216_SFDP_4B_ADDR_DW1_1S_4S_4S_PP_3E_SUP BIT(8)
544+
534545#endif /* ZEPHYR_DRIVERS_FLASH_JESD216_H_ */
Original file line number Diff line number Diff line change @@ -1329,8 +1329,10 @@ static int spi_nor_process_sfdp(const struct device *dev)
13291329 };
13301330 }
13311331
1332- if (!((sys_le32_to_cpu (u2 .dw [0 ]) & BIT (0 )) &&
1333- (sys_le32_to_cpu (u2 .dw [0 ]) & BIT (6 )))) {
1332+ if (!((sys_le32_to_cpu (u2 .dw [0 ]) &
1333+ JESD216_SFDP_4B_ADDR_DW1_1S_1S_1S_READ_13_SUP ) &&
1334+ (sys_le32_to_cpu (u2 .dw [0 ]) &
1335+ JESD216_SFDP_4B_ADDR_DW1_1S_1S_1S_PP_12_SUP ))) {
13341336 LOG_ERR ("4-byte addressing not supported" );
13351337 return - ENOTSUP ;
13361338 }
You can’t perform that action at this time.
0 commit comments