Lines Matching +full:64 +full:- +full:byte
1 // SPDX-License-Identifier: GPL-2.0
7 #include <linux/mtd/spi-nor.h>
27 * Unfortunately, Winbond has re-used the same JEDEC ID for both in w25q256_post_bfpt_fixups()
33 if (bfpt_header->major == SFDP_JESD216_MAJOR && in w25q256_post_bfpt_fixups()
34 bfpt_header->minor == SFDP_JESD216A_MINOR) in w25q256_post_bfpt_fixups()
35 nor->flags |= SNOR_F_4B_OPCODES; in w25q256_post_bfpt_fixups()
45 /* Winbond -- w25x "blocks" are 64K, "sectors" are 4KiB */
46 { "w25x05", INFO(0xef3010, 0, 64 * 1024, 1)
48 { "w25x10", INFO(0xef3011, 0, 64 * 1024, 2)
50 { "w25x20", INFO(0xef3012, 0, 64 * 1024, 4)
52 { "w25x40", INFO(0xef3013, 0, 64 * 1024, 8)
54 { "w25x80", INFO(0xef3014, 0, 64 * 1024, 16)
56 { "w25x16", INFO(0xef3015, 0, 64 * 1024, 32)
58 { "w25q16dw", INFO(0xef6015, 0, 64 * 1024, 32)
62 { "w25x32", INFO(0xef3016, 0, 64 * 1024, 64)
64 { "w25q16jv-im/jm", INFO(0xef7015, 0, 64 * 1024, 32)
68 { "w25q20cl", INFO(0xef4012, 0, 64 * 1024, 4)
70 { "w25q20bw", INFO(0xef5012, 0, 64 * 1024, 4)
72 { "w25q20ew", INFO(0xef6012, 0, 64 * 1024, 4)
74 { "w25q32", INFO(0xef4016, 0, 64 * 1024, 64)
76 { "w25q32dw", INFO(0xef6016, 0, 64 * 1024, 64)
80 { "w25q32jv", INFO(0xef7016, 0, 64 * 1024, 64)
84 { "w25q32jwm", INFO(0xef8016, 0, 64 * 1024, 64)
88 { "w25q64jwm", INFO(0xef8017, 0, 64 * 1024, 128)
92 { "w25q128jwm", INFO(0xef8018, 0, 64 * 1024, 256)
96 { "w25q256jwm", INFO(0xef8019, 0, 64 * 1024, 512)
100 { "w25x64", INFO(0xef3017, 0, 64 * 1024, 128)
102 { "w25q64", INFO(0xef4017, 0, 64 * 1024, 128)
105 { "w25q64dw", INFO(0xef6017, 0, 64 * 1024, 128)
109 { "w25q64jvm", INFO(0xef7017, 0, 64 * 1024, 128)
111 { "w25q128fw", INFO(0xef6018, 0, 64 * 1024, 256)
115 { "w25q128jv", INFO(0xef7018, 0, 64 * 1024, 256)
119 { "w25q80", INFO(0xef5014, 0, 64 * 1024, 16)
121 { "w25q80bl", INFO(0xef4014, 0, 64 * 1024, 16)
123 { "w25q128", INFO(0xef4018, 0, 64 * 1024, 256)
125 { "w25q256", INFO(0xef4019, 0, 64 * 1024, 512)
128 { "w25q256jvm", INFO(0xef7019, 0, 64 * 1024, 512)
130 { "w25q256jw", INFO(0xef6019, 0, 64 * 1024, 512)
133 { "w25m512jv", INFO(0xef7119, 0, 64 * 1024, 1024)
136 { "w25q512nwm", INFO(0xef8020, 0, 64 * 1024, 1024)
139 { "w25q512jvq", INFO(0xef4020, 0, 64 * 1024, 1024)
145 * winbond_nor_write_ear() - Write Extended Address Register.
149 * Return: 0 on success, -errno otherwise.
155 nor->bouncebuf[0] = ear; in winbond_nor_write_ear()
157 if (nor->spimem) { in winbond_nor_write_ear()
158 struct spi_mem_op op = WINBOND_NOR_WREAR_OP(nor->bouncebuf); in winbond_nor_write_ear()
160 spi_nor_spimem_setup_op(nor, &op, nor->reg_proto); in winbond_nor_write_ear()
162 ret = spi_mem_exec_op(nor->spimem, &op); in winbond_nor_write_ear()
166 nor->bouncebuf, 1); in winbond_nor_write_ear()
170 dev_dbg(nor->dev, "error %d writing EAR\n", ret); in winbond_nor_write_ear()
176 * winbond_nor_set_4byte_addr_mode() - Set 4-byte address mode for Winbond
179 * @enable: true to enter the 4-byte address mode, false to exit the 4-byte
182 * Return: 0 on success, -errno otherwise.
193 * On Winbond W25Q256FV, leaving 4byte mode causes the Extended Address in winbond_nor_set_4byte_addr_mode()
194 * Register to be set to 1, so all 3-byte-address reads come from the in winbond_nor_set_4byte_addr_mode()
218 nor->params->set_4byte_addr_mode = winbond_nor_set_4byte_addr_mode; in winbond_nor_default_init()
223 if (nor->params->otp.org->n_regions) in winbond_nor_late_init()
224 nor->params->otp.ops = &winbond_nor_otp_ops; in winbond_nor_late_init()