Skip to content

Commit

Permalink
Added support for Winbond W25Q256FV.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjudges committed Dec 13, 2017
1 parent f8619ac commit f1f2770
Show file tree
Hide file tree
Showing 8 changed files with 365 additions and 315 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -32,3 +32,4 @@ SPIway/Release/SPIway.o
SPIway/SPIway.atsuo
NANDway/Dual NAND Edition/NANDway_DualNANDEdition.srec
NANDway/Signal Booster Edition/NANDway_SignalBoosterEdition.srec
/SPIway/Release/SPIway.srec
16 changes: 12 additions & 4 deletions SPIway.py
@@ -1,7 +1,7 @@
# *************************************************************************
# SPIway.py - Teensy++ 2.0 SPI flasher for PS4
#
# Copyright (C) 2013 judges@eEcho.com
# Copyright (C) 2017 judges@eEcho.com
#
# This code is licensed to you under the terms of the GNU GPL, version 2;
# see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
Expand Down Expand Up @@ -164,13 +164,21 @@ def printstate(self):
self.SPI_BLOCK_SIZE = self.SPI_SECTORS_PER_BLOCK * self.SPI_SECTOR_SIZE
self.SPI_ADDRESS_LENGTH = 3
elif self.DEVICE_ID == 0x13:
print "Chip type: W25Q80BV (0x%13x)"%self.DEVICE_ID
print "Chip type: W25Q80BV (0x%02x)"%self.DEVICE_ID
self.SPI_BLOCK_COUNT = 16
self.SPI_SECTORS_PER_BLOCK = 16
self.SPI_SECTOR_SIZE = 0x1000
self.SPI_TOTAL_SECTORS = self.SPI_SECTORS_PER_BLOCK * self.SPI_BLOCK_COUNT
self.SPI_BLOCK_SIZE = self.SPI_SECTORS_PER_BLOCK * self.SPI_SECTOR_SIZE
self.SPI_ADDRESS_LENGTH = 3
elif self.DEVICE_ID == 0x18:
print "Chip type: W25Q256FV (0x%02x)"%self.DEVICE_ID
self.SPI_BLOCK_COUNT = 512
self.SPI_SECTORS_PER_BLOCK = 16
self.SPI_SECTOR_SIZE = 0x1000
self.SPI_TOTAL_SECTORS = self.SPI_SECTORS_PER_BLOCK * self.SPI_BLOCK_COUNT
self.SPI_BLOCK_SIZE = self.SPI_SECTORS_PER_BLOCK * self.SPI_SECTOR_SIZE
self.SPI_ADDRESS_LENGTH = 4

else:
print "Chip type: unknown (0x%02x)"%self.DEVICE_ID
Expand Down Expand Up @@ -380,10 +388,10 @@ def program(self, data, verify, block_offset, nblocks):

if __name__ == "__main__":
VERSION_MAJOR = 0
VERSION_MINOR = 30
VERSION_MINOR = 40

print "SPIway v%d.%02d - Teensy++ 2.0 SPI Flasher for PS4"%(VERSION_MAJOR, VERSION_MINOR)
print "Copyright (C) 2013 judges@eEcho.com"
print "Copyright (C) 2017 judges@eEcho.com"
print

if len(sys.argv) == 1:
Expand Down

0 comments on commit f1f2770

Please sign in to comment.