mirror of
https://github.com/xboot/xfel.git
synced 2024-11-23 09:43:26 +08:00
[spi]add SPI_CMD_FAST command
This commit is contained in:
parent
ae33a7e188
commit
5e25f910db
@ -441,55 +441,58 @@ static int chip_spi_init(struct xfel_ctx_t * ctx, uint32_t * swapbuf, uint32_t *
|
||||
0x01, 0x30, 0x83, 0xe2, 0x03, 0x00, 0x52, 0xe1, 0x00, 0xc0, 0xc5, 0xe5,
|
||||
0xfb, 0xff, 0xff, 0xca, 0xe7, 0xff, 0xff, 0xea, 0x00, 0x50, 0xc0, 0x01,
|
||||
0x00, 0x52, 0xc0, 0x01, 0x00, 0x53, 0xc0, 0x01, 0xf0, 0x43, 0x2d, 0xe9,
|
||||
0x34, 0x82, 0x9f, 0xe5, 0x00, 0x60, 0xa0, 0xe1, 0x06, 0x40, 0xa0, 0xe1,
|
||||
0x01, 0x30, 0xd4, 0xe4, 0x28, 0x52, 0x9f, 0xe5, 0x01, 0x00, 0x53, 0xe3,
|
||||
0x24, 0x72, 0x9f, 0xe5, 0x14, 0xd0, 0x4d, 0xe2, 0x1c, 0x00, 0x00, 0x0a,
|
||||
0x02, 0x00, 0x53, 0xe3, 0x43, 0x00, 0x00, 0x0a, 0x03, 0x00, 0x53, 0xe3,
|
||||
0x46, 0x00, 0x00, 0x0a, 0x04, 0x00, 0x53, 0xe3, 0x4a, 0x00, 0x00, 0x0a,
|
||||
0x05, 0x00, 0x53, 0xe3, 0x5a, 0x00, 0x00, 0x0a, 0x06, 0x00, 0x53, 0xe3,
|
||||
0x6a, 0x00, 0x00, 0x0a, 0x07, 0x00, 0x53, 0xe3, 0x77, 0x00, 0x00, 0x1a,
|
||||
0x0d, 0x90, 0xa0, 0xe1, 0x08, 0x60, 0x8d, 0xe2, 0xb0, 0x80, 0xcd, 0xe1,
|
||||
0x02, 0x10, 0xa0, 0xe3, 0x09, 0x00, 0xa0, 0xe1, 0xb2, 0xff, 0xff, 0xeb,
|
||||
0x01, 0x10, 0xa0, 0xe3, 0x06, 0x00, 0xa0, 0xe1, 0x75, 0xff, 0xff, 0xeb,
|
||||
0x08, 0x30, 0xdd, 0xe5, 0x01, 0x00, 0x13, 0xe3, 0xf6, 0xff, 0xff, 0x1a,
|
||||
0x04, 0x60, 0xa0, 0xe1, 0x06, 0x40, 0xa0, 0xe1, 0x01, 0x30, 0xd4, 0xe4,
|
||||
0x01, 0x00, 0x53, 0xe3, 0xe2, 0xff, 0xff, 0x1a, 0x48, 0x38, 0x97, 0xe5,
|
||||
0xa4, 0x21, 0x9f, 0xe5, 0x0f, 0x30, 0xc3, 0xe3, 0x02, 0x30, 0x83, 0xe3,
|
||||
0x48, 0x38, 0x87, 0xe5, 0x48, 0x38, 0x97, 0xe5, 0xf0, 0x30, 0xc3, 0xe3,
|
||||
0x20, 0x30, 0x83, 0xe3, 0x48, 0x38, 0x87, 0xe5, 0x48, 0x38, 0x97, 0xe5,
|
||||
0x0f, 0x3c, 0xc3, 0xe3, 0x02, 0x3c, 0x83, 0xe3, 0x48, 0x38, 0x87, 0xe5,
|
||||
0x48, 0x38, 0x97, 0xe5, 0x0f, 0x3a, 0xc3, 0xe3, 0x02, 0x3a, 0x83, 0xe3,
|
||||
0x48, 0x38, 0x87, 0xe5, 0xc0, 0x32, 0x97, 0xe5, 0x01, 0x36, 0x83, 0xe3,
|
||||
0xc0, 0x32, 0x87, 0xe5, 0x60, 0x30, 0x97, 0xe5, 0x01, 0x36, 0x83, 0xe3,
|
||||
0x60, 0x30, 0x87, 0xe5, 0x24, 0x20, 0x85, 0xe5, 0x04, 0x30, 0x95, 0xe5,
|
||||
0x02, 0x31, 0x83, 0xe3, 0x83, 0x30, 0x83, 0xe3, 0x04, 0x30, 0x85, 0xe5,
|
||||
0x04, 0x30, 0x95, 0xe5, 0x00, 0x00, 0x53, 0xe3, 0xfc, 0xff, 0xff, 0xba,
|
||||
0x08, 0x30, 0x95, 0xe5, 0x04, 0x60, 0xa0, 0xe1, 0x03, 0x30, 0xc3, 0xe3,
|
||||
0x44, 0x30, 0x83, 0xe3, 0x08, 0x30, 0x85, 0xe5, 0x18, 0x30, 0x95, 0xe5,
|
||||
0x02, 0x31, 0x83, 0xe3, 0x02, 0x39, 0x83, 0xe3, 0x18, 0x30, 0x85, 0xe5,
|
||||
0xd2, 0xff, 0xff, 0xea, 0x08, 0x30, 0x95, 0xe5, 0x04, 0x60, 0xa0, 0xe1,
|
||||
0xb0, 0x30, 0xc3, 0xe3, 0x08, 0x30, 0x85, 0xe5, 0xcd, 0xff, 0xff, 0xea,
|
||||
0x50, 0x82, 0x9f, 0xe5, 0x50, 0x52, 0x9f, 0xe5, 0x50, 0x72, 0x9f, 0xe5,
|
||||
0x14, 0xd0, 0x4d, 0xe2, 0x00, 0x60, 0xa0, 0xe1, 0x06, 0x40, 0xa0, 0xe1,
|
||||
0x01, 0x30, 0xd4, 0xe4, 0x01, 0x00, 0x53, 0xe3, 0x1e, 0x00, 0x00, 0x0a,
|
||||
0x02, 0x00, 0x53, 0xe3, 0x45, 0x00, 0x00, 0x0a, 0x03, 0x00, 0x53, 0xe3,
|
||||
0x48, 0x00, 0x00, 0x0a, 0x04, 0x00, 0x53, 0xe3, 0x4c, 0x00, 0x00, 0x0a,
|
||||
0x05, 0x00, 0x53, 0xe3, 0x51, 0x00, 0x00, 0x0a, 0x06, 0x00, 0x53, 0xe3,
|
||||
0x60, 0x00, 0x00, 0x0a, 0x07, 0x00, 0x53, 0xe3, 0x6f, 0x00, 0x00, 0x0a,
|
||||
0x08, 0x00, 0x53, 0xe3, 0x7c, 0x00, 0x00, 0x1a, 0x0d, 0x90, 0xa0, 0xe1,
|
||||
0x08, 0x60, 0x8d, 0xe2, 0xb0, 0x80, 0xcd, 0xe1, 0x02, 0x10, 0xa0, 0xe3,
|
||||
0x09, 0x00, 0xa0, 0xe1, 0xb0, 0xff, 0xff, 0xeb, 0x01, 0x10, 0xa0, 0xe3,
|
||||
0x06, 0x00, 0xa0, 0xe1, 0x73, 0xff, 0xff, 0xeb, 0x08, 0x30, 0xdd, 0xe5,
|
||||
0x01, 0x00, 0x13, 0xe3, 0xf6, 0xff, 0xff, 0x1a, 0x04, 0x60, 0xa0, 0xe1,
|
||||
0x06, 0x40, 0xa0, 0xe1, 0x01, 0x30, 0xd4, 0xe4, 0x01, 0x00, 0x53, 0xe3,
|
||||
0xe0, 0xff, 0xff, 0x1a, 0x48, 0x38, 0x97, 0xe5, 0xb8, 0x21, 0x9f, 0xe5,
|
||||
0x0f, 0x30, 0xc3, 0xe3, 0x02, 0x30, 0x83, 0xe3, 0x48, 0x38, 0x87, 0xe5,
|
||||
0x48, 0x38, 0x97, 0xe5, 0xf0, 0x30, 0xc3, 0xe3, 0x20, 0x30, 0x83, 0xe3,
|
||||
0x48, 0x38, 0x87, 0xe5, 0x48, 0x38, 0x97, 0xe5, 0x0f, 0x3c, 0xc3, 0xe3,
|
||||
0x02, 0x3c, 0x83, 0xe3, 0x48, 0x38, 0x87, 0xe5, 0x48, 0x38, 0x97, 0xe5,
|
||||
0x0f, 0x3a, 0xc3, 0xe3, 0x02, 0x3a, 0x83, 0xe3, 0x48, 0x38, 0x87, 0xe5,
|
||||
0xc0, 0x32, 0x97, 0xe5, 0x01, 0x36, 0x83, 0xe3, 0xc0, 0x32, 0x87, 0xe5,
|
||||
0x60, 0x30, 0x97, 0xe5, 0x01, 0x36, 0x83, 0xe3, 0x60, 0x30, 0x87, 0xe5,
|
||||
0x24, 0x20, 0x85, 0xe5, 0x04, 0x30, 0x95, 0xe5, 0x02, 0x31, 0x83, 0xe3,
|
||||
0x83, 0x30, 0x83, 0xe3, 0x04, 0x30, 0x85, 0xe5, 0x04, 0x30, 0x95, 0xe5,
|
||||
0x00, 0x00, 0x53, 0xe3, 0xfc, 0xff, 0xff, 0xba, 0x08, 0x30, 0x95, 0xe5,
|
||||
0x04, 0x60, 0xa0, 0xe1, 0x03, 0x30, 0xc3, 0xe3, 0x44, 0x30, 0x83, 0xe3,
|
||||
0x08, 0x30, 0x85, 0xe5, 0x18, 0x30, 0x95, 0xe5, 0x02, 0x31, 0x83, 0xe3,
|
||||
0x02, 0x39, 0x83, 0xe3, 0x18, 0x30, 0x85, 0xe5, 0xb3, 0xff, 0xff, 0xea,
|
||||
0x08, 0x30, 0x95, 0xe5, 0x04, 0x60, 0xa0, 0xe1, 0xb0, 0x30, 0xc3, 0xe3,
|
||||
0x80, 0x30, 0x83, 0xe3, 0x08, 0x30, 0x85, 0xe5, 0xc7, 0xff, 0xff, 0xea,
|
||||
0x02, 0x40, 0xd6, 0xe5, 0x05, 0x20, 0xd6, 0xe5, 0x06, 0x90, 0xd6, 0xe5,
|
||||
0x01, 0x30, 0xd6, 0xe5, 0x07, 0xe0, 0xd6, 0xe5, 0x03, 0xc0, 0xd6, 0xe5,
|
||||
0x08, 0x10, 0xd6, 0xe5, 0x04, 0x00, 0xd6, 0xe5, 0x04, 0x34, 0x83, 0xe1,
|
||||
0x09, 0x24, 0x82, 0xe1, 0x0e, 0x28, 0x82, 0xe1, 0x0c, 0x38, 0x83, 0xe1,
|
||||
0x01, 0x1c, 0x82, 0xe1, 0x00, 0x0c, 0x83, 0xe1, 0x09, 0x40, 0x86, 0xe2,
|
||||
0x63, 0xff, 0xff, 0xeb, 0x04, 0x60, 0xa0, 0xe1, 0xb5, 0xff, 0xff, 0xea,
|
||||
0x02, 0x40, 0xd6, 0xe5, 0x05, 0x20, 0xd6, 0xe5, 0x06, 0x90, 0xd6, 0xe5,
|
||||
0x01, 0x30, 0xd6, 0xe5, 0x07, 0xe0, 0xd6, 0xe5, 0x03, 0xc0, 0xd6, 0xe5,
|
||||
0x08, 0x10, 0xd6, 0xe5, 0x04, 0x00, 0xd6, 0xe5, 0x04, 0x34, 0x83, 0xe1,
|
||||
0x09, 0x24, 0x82, 0xe1, 0x0e, 0x28, 0x82, 0xe1, 0x0c, 0x38, 0x83, 0xe1,
|
||||
0x01, 0x1c, 0x82, 0xe1, 0x00, 0x0c, 0x83, 0xe1, 0x09, 0x40, 0x86, 0xe2,
|
||||
0x17, 0xff, 0xff, 0xeb, 0x04, 0x60, 0xa0, 0xe1, 0xa3, 0xff, 0xff, 0xea,
|
||||
0x05, 0x30, 0xa0, 0xe3, 0x0d, 0x90, 0xa0, 0xe1, 0x08, 0x60, 0x8d, 0xe2,
|
||||
0x00, 0x30, 0xcd, 0xe5, 0x01, 0x10, 0xa0, 0xe3, 0x09, 0x00, 0xa0, 0xe1,
|
||||
0x48, 0xff, 0xff, 0xeb, 0x01, 0x10, 0xa0, 0xe3, 0x06, 0x00, 0xa0, 0xe1,
|
||||
0x0b, 0xff, 0xff, 0xeb, 0x08, 0x30, 0xdd, 0xe5, 0x01, 0x00, 0x13, 0xe3,
|
||||
0xf6, 0xff, 0xff, 0x1a, 0x04, 0x60, 0xa0, 0xe1, 0x94, 0xff, 0xff, 0xea,
|
||||
0x14, 0xd0, 0x8d, 0xe2, 0xf0, 0x83, 0xbd, 0xe8, 0x0f, 0xc0, 0xff, 0xff,
|
||||
0x00, 0x50, 0xc0, 0x01, 0x00, 0x00, 0xc2, 0x01, 0x01, 0x10, 0x00, 0x00
|
||||
0x08, 0x30, 0x85, 0xe5, 0xae, 0xff, 0xff, 0xea, 0x08, 0x30, 0x95, 0xe5,
|
||||
0x04, 0x60, 0xa0, 0xe1, 0xb0, 0x30, 0xc3, 0xe3, 0x80, 0x30, 0x83, 0xe3,
|
||||
0x08, 0x30, 0x85, 0xe5, 0xa8, 0xff, 0xff, 0xea, 0x01, 0x90, 0xd6, 0xe5,
|
||||
0x02, 0x00, 0x86, 0xe2, 0x09, 0x10, 0xa0, 0xe1, 0x01, 0x60, 0x89, 0xe2,
|
||||
0x6c, 0xff, 0xff, 0xeb, 0x06, 0x60, 0x84, 0xe0, 0xa1, 0xff, 0xff, 0xea,
|
||||
0x05, 0x20, 0xd6, 0xe5, 0x06, 0x90, 0xd6, 0xe5, 0x01, 0x30, 0xd6, 0xe5,
|
||||
0x02, 0x40, 0xd6, 0xe5, 0x07, 0xe0, 0xd6, 0xe5, 0x03, 0xc0, 0xd6, 0xe5,
|
||||
0x08, 0x10, 0xd6, 0xe5, 0x04, 0x00, 0xd6, 0xe5, 0x09, 0x24, 0x82, 0xe1,
|
||||
0x04, 0x34, 0x83, 0xe1, 0x0e, 0x28, 0x82, 0xe1, 0x0c, 0x38, 0x83, 0xe1,
|
||||
0x01, 0x1c, 0x82, 0xe1, 0x00, 0x0c, 0x83, 0xe1, 0x5b, 0xff, 0xff, 0xeb,
|
||||
0x09, 0x60, 0x86, 0xe2, 0x90, 0xff, 0xff, 0xea, 0x05, 0x20, 0xd6, 0xe5,
|
||||
0x06, 0x90, 0xd6, 0xe5, 0x01, 0x30, 0xd6, 0xe5, 0x02, 0x40, 0xd6, 0xe5,
|
||||
0x07, 0xe0, 0xd6, 0xe5, 0x03, 0xc0, 0xd6, 0xe5, 0x08, 0x10, 0xd6, 0xe5,
|
||||
0x04, 0x00, 0xd6, 0xe5, 0x09, 0x24, 0x82, 0xe1, 0x04, 0x34, 0x83, 0xe1,
|
||||
0x0e, 0x28, 0x82, 0xe1, 0x0c, 0x38, 0x83, 0xe1, 0x01, 0x1c, 0x82, 0xe1,
|
||||
0x00, 0x0c, 0x83, 0xe1, 0x10, 0xff, 0xff, 0xeb, 0x09, 0x60, 0x86, 0xe2,
|
||||
0x7f, 0xff, 0xff, 0xea, 0x05, 0x30, 0xa0, 0xe3, 0x0d, 0x90, 0xa0, 0xe1,
|
||||
0x08, 0x60, 0x8d, 0xe2, 0x00, 0x30, 0xcd, 0xe5, 0x01, 0x10, 0xa0, 0xe3,
|
||||
0x09, 0x00, 0xa0, 0xe1, 0x41, 0xff, 0xff, 0xeb, 0x01, 0x10, 0xa0, 0xe3,
|
||||
0x06, 0x00, 0xa0, 0xe1, 0x04, 0xff, 0xff, 0xeb, 0x08, 0x30, 0xdd, 0xe5,
|
||||
0x01, 0x00, 0x13, 0xe3, 0xf6, 0xff, 0xff, 0x1a, 0x04, 0x60, 0xa0, 0xe1,
|
||||
0x8f, 0xff, 0xff, 0xea, 0x14, 0xd0, 0x8d, 0xe2, 0xf0, 0x83, 0xbd, 0xe8,
|
||||
0x0f, 0xc0, 0xff, 0xff, 0x00, 0x50, 0xc0, 0x01, 0x00, 0x00, 0xc2, 0x01,
|
||||
0x01, 0x10, 0x00, 0x00
|
||||
};
|
||||
fel_write(ctx, 0x00008800, (void *)&payload[0], sizeof(payload));
|
||||
if(swapbuf)
|
||||
|
133
chips/h3.c
133
chips/h3.c
@ -627,79 +627,82 @@ static int chip_spi_init(struct xfel_ctx_t * ctx, uint32_t * swapbuf, uint32_t *
|
||||
0x02, 0x60, 0x56, 0xe0, 0xe0, 0xff, 0xff, 0x1a, 0xf0, 0x80, 0xbd, 0xe8,
|
||||
0x00, 0x30, 0xa0, 0xe1, 0x07, 0xc0, 0xa0, 0xe1, 0x00, 0xc0, 0xc5, 0xe5,
|
||||
0x01, 0x30, 0x83, 0xe2, 0x03, 0x00, 0x52, 0xe1, 0xfb, 0xff, 0xff, 0xca,
|
||||
0xe7, 0xff, 0xff, 0xea, 0xf0, 0x43, 0x2d, 0xe9, 0x00, 0x40, 0xa0, 0xe1,
|
||||
0x0f, 0x70, 0x0c, 0xe3, 0x02, 0x69, 0xa0, 0xe3, 0x01, 0x30, 0xd4, 0xe4,
|
||||
0x00, 0x50, 0xa0, 0xe3, 0xff, 0x7f, 0x4f, 0xe3, 0x14, 0xd0, 0x4d, 0xe2,
|
||||
0xc6, 0x61, 0x40, 0xe3, 0x01, 0x00, 0x53, 0xe3, 0xc2, 0x51, 0x40, 0xe3,
|
||||
0x1c, 0x00, 0x00, 0x0a, 0x02, 0x00, 0x53, 0xe3, 0x51, 0x00, 0x00, 0x0a,
|
||||
0x03, 0x00, 0x53, 0xe3, 0x54, 0x00, 0x00, 0x0a, 0x04, 0x00, 0x53, 0xe3,
|
||||
0x58, 0x00, 0x00, 0x0a, 0x05, 0x00, 0x53, 0xe3, 0x68, 0x00, 0x00, 0x0a,
|
||||
0x06, 0x00, 0x53, 0xe3, 0x78, 0x00, 0x00, 0x0a, 0x07, 0x00, 0x53, 0xe3,
|
||||
0x85, 0x00, 0x00, 0x1a, 0xb0, 0x70, 0xcd, 0xe1, 0x0d, 0x90, 0xa0, 0xe1,
|
||||
0x08, 0x80, 0x8d, 0xe2, 0x02, 0x10, 0xa0, 0xe3, 0x09, 0x00, 0xa0, 0xe1,
|
||||
0xb0, 0xff, 0xff, 0xeb, 0x01, 0x10, 0xa0, 0xe3, 0x08, 0x00, 0xa0, 0xe1,
|
||||
0x73, 0xff, 0xff, 0xeb, 0x08, 0x30, 0xdd, 0xe5, 0x01, 0x00, 0x13, 0xe3,
|
||||
0xf6, 0xff, 0xff, 0x1a, 0x04, 0x00, 0xa0, 0xe1, 0x00, 0x40, 0xa0, 0xe1,
|
||||
0x01, 0x30, 0xd4, 0xe4, 0x01, 0x00, 0x53, 0xe3, 0xe2, 0xff, 0xff, 0x1a,
|
||||
0x48, 0x38, 0x95, 0xe5, 0x01, 0x2a, 0xa0, 0xe3, 0x0f, 0x30, 0xc3, 0xe3,
|
||||
0x03, 0x30, 0x83, 0xe3, 0x48, 0x38, 0x85, 0xe5, 0x48, 0x38, 0x95, 0xe5,
|
||||
0xf0, 0x30, 0xc3, 0xe3, 0x30, 0x30, 0x83, 0xe3, 0x48, 0x38, 0x85, 0xe5,
|
||||
0x48, 0x38, 0x95, 0xe5, 0x0f, 0x3c, 0xc3, 0xe3, 0x03, 0x3c, 0x83, 0xe3,
|
||||
0x48, 0x38, 0x85, 0xe5, 0x48, 0x38, 0x95, 0xe5, 0x0f, 0x3a, 0xc3, 0xe3,
|
||||
0x03, 0x3a, 0x83, 0xe3, 0x48, 0x38, 0x85, 0xe5, 0xc0, 0x32, 0x95, 0xe5,
|
||||
0x01, 0x36, 0x83, 0xe3, 0xc0, 0x32, 0x85, 0xe5, 0xa0, 0x30, 0x95, 0xe5,
|
||||
0x02, 0x31, 0x83, 0xe3, 0xa0, 0x30, 0x85, 0xe5, 0x60, 0x30, 0x95, 0xe5,
|
||||
0x01, 0x36, 0x83, 0xe3, 0x60, 0x30, 0x85, 0xe5, 0xa0, 0x30, 0x95, 0xe5,
|
||||
0x03, 0x34, 0xc3, 0xe3, 0x01, 0x34, 0x83, 0xe3, 0xa0, 0x30, 0x85, 0xe5,
|
||||
0xa0, 0x30, 0x95, 0xe5, 0x03, 0x38, 0xc3, 0xe3, 0xa0, 0x30, 0x85, 0xe5,
|
||||
0xa0, 0x30, 0x95, 0xe5, 0x0f, 0x30, 0xc3, 0xe3, 0x05, 0x30, 0x83, 0xe3,
|
||||
0xa0, 0x30, 0x85, 0xe5, 0x24, 0x20, 0x86, 0xe5, 0x04, 0x30, 0x96, 0xe5,
|
||||
0xe7, 0xff, 0xff, 0xea, 0xf0, 0x43, 0x2d, 0xe9, 0x0f, 0x80, 0x0c, 0xe3,
|
||||
0xff, 0x8f, 0x4f, 0xe3, 0x02, 0x69, 0xa0, 0xe3, 0xc6, 0x61, 0x40, 0xe3,
|
||||
0x00, 0x40, 0xa0, 0xe3, 0xc2, 0x41, 0x40, 0xe3, 0x14, 0xd0, 0x4d, 0xe2,
|
||||
0x00, 0x70, 0xa0, 0xe1, 0x07, 0x50, 0xa0, 0xe1, 0x01, 0x30, 0xd5, 0xe4,
|
||||
0x01, 0x00, 0x53, 0xe3, 0x1e, 0x00, 0x00, 0x0a, 0x02, 0x00, 0x53, 0xe3,
|
||||
0x53, 0x00, 0x00, 0x0a, 0x03, 0x00, 0x53, 0xe3, 0x56, 0x00, 0x00, 0x0a,
|
||||
0x04, 0x00, 0x53, 0xe3, 0x5a, 0x00, 0x00, 0x0a, 0x05, 0x00, 0x53, 0xe3,
|
||||
0x5f, 0x00, 0x00, 0x0a, 0x06, 0x00, 0x53, 0xe3, 0x6e, 0x00, 0x00, 0x0a,
|
||||
0x07, 0x00, 0x53, 0xe3, 0x7d, 0x00, 0x00, 0x0a, 0x08, 0x00, 0x53, 0xe3,
|
||||
0x8a, 0x00, 0x00, 0x1a, 0xb0, 0x80, 0xcd, 0xe1, 0x0d, 0x90, 0xa0, 0xe1,
|
||||
0x08, 0x70, 0x8d, 0xe2, 0x02, 0x10, 0xa0, 0xe3, 0x09, 0x00, 0xa0, 0xe1,
|
||||
0xad, 0xff, 0xff, 0xeb, 0x01, 0x10, 0xa0, 0xe3, 0x07, 0x00, 0xa0, 0xe1,
|
||||
0x70, 0xff, 0xff, 0xeb, 0x08, 0x30, 0xdd, 0xe5, 0x01, 0x00, 0x13, 0xe3,
|
||||
0xf6, 0xff, 0xff, 0x1a, 0x05, 0x70, 0xa0, 0xe1, 0x07, 0x50, 0xa0, 0xe1,
|
||||
0x01, 0x30, 0xd5, 0xe4, 0x01, 0x00, 0x53, 0xe3, 0xe0, 0xff, 0xff, 0x1a,
|
||||
0x48, 0x38, 0x94, 0xe5, 0x01, 0x2a, 0xa0, 0xe3, 0x0f, 0x30, 0xc3, 0xe3,
|
||||
0x03, 0x30, 0x83, 0xe3, 0x48, 0x38, 0x84, 0xe5, 0x48, 0x38, 0x94, 0xe5,
|
||||
0xf0, 0x30, 0xc3, 0xe3, 0x30, 0x30, 0x83, 0xe3, 0x48, 0x38, 0x84, 0xe5,
|
||||
0x48, 0x38, 0x94, 0xe5, 0x0f, 0x3c, 0xc3, 0xe3, 0x03, 0x3c, 0x83, 0xe3,
|
||||
0x48, 0x38, 0x84, 0xe5, 0x48, 0x38, 0x94, 0xe5, 0x0f, 0x3a, 0xc3, 0xe3,
|
||||
0x03, 0x3a, 0x83, 0xe3, 0x48, 0x38, 0x84, 0xe5, 0xc0, 0x32, 0x94, 0xe5,
|
||||
0x01, 0x36, 0x83, 0xe3, 0xc0, 0x32, 0x84, 0xe5, 0xa0, 0x30, 0x94, 0xe5,
|
||||
0x02, 0x31, 0x83, 0xe3, 0xa0, 0x30, 0x84, 0xe5, 0x60, 0x30, 0x94, 0xe5,
|
||||
0x01, 0x36, 0x83, 0xe3, 0x60, 0x30, 0x84, 0xe5, 0xa0, 0x30, 0x94, 0xe5,
|
||||
0x03, 0x34, 0xc3, 0xe3, 0x01, 0x34, 0x83, 0xe3, 0xa0, 0x30, 0x84, 0xe5,
|
||||
0xa0, 0x30, 0x94, 0xe5, 0x03, 0x38, 0xc3, 0xe3, 0xa0, 0x30, 0x84, 0xe5,
|
||||
0xa0, 0x30, 0x94, 0xe5, 0x0f, 0x30, 0xc3, 0xe3, 0x05, 0x30, 0x83, 0xe3,
|
||||
0xa0, 0x30, 0x84, 0xe5, 0x24, 0x20, 0x86, 0xe5, 0x04, 0x30, 0x96, 0xe5,
|
||||
0x02, 0x31, 0x83, 0xe3, 0x83, 0x30, 0x83, 0xe3, 0x04, 0x30, 0x86, 0xe5,
|
||||
0x04, 0x30, 0x96, 0xe5, 0x00, 0x00, 0x53, 0xe3, 0xfc, 0xff, 0xff, 0xba,
|
||||
0x08, 0x30, 0x96, 0xe5, 0x04, 0x00, 0xa0, 0xe1, 0x03, 0x30, 0xc3, 0xe3,
|
||||
0x08, 0x30, 0x96, 0xe5, 0x05, 0x70, 0xa0, 0xe1, 0x03, 0x30, 0xc3, 0xe3,
|
||||
0x44, 0x30, 0x83, 0xe3, 0x08, 0x30, 0x86, 0xe5, 0x18, 0x30, 0x96, 0xe5,
|
||||
0x02, 0x31, 0x83, 0xe3, 0x02, 0x39, 0x83, 0xe3, 0x18, 0x30, 0x86, 0xe5,
|
||||
0xc4, 0xff, 0xff, 0xea, 0x08, 0x30, 0x96, 0xe5, 0x04, 0x00, 0xa0, 0xe1,
|
||||
0xb0, 0x30, 0xc3, 0xe3, 0x08, 0x30, 0x86, 0xe5, 0xbf, 0xff, 0xff, 0xea,
|
||||
0x08, 0x30, 0x96, 0xe5, 0x04, 0x00, 0xa0, 0xe1, 0xb0, 0x30, 0xc3, 0xe3,
|
||||
0x80, 0x30, 0x83, 0xe3, 0x08, 0x30, 0x86, 0xe5, 0xb9, 0xff, 0xff, 0xea,
|
||||
0x06, 0x10, 0xd0, 0xe5, 0x09, 0x40, 0x80, 0xe2, 0x05, 0x20, 0xd0, 0xe5,
|
||||
0x01, 0x30, 0xd0, 0xe5, 0x02, 0x80, 0xd0, 0xe5, 0x07, 0xe0, 0xd0, 0xe5,
|
||||
0x03, 0xc0, 0xd0, 0xe5, 0x01, 0x24, 0x82, 0xe1, 0x08, 0x34, 0x83, 0xe1,
|
||||
0x08, 0x10, 0xd0, 0xe5, 0x04, 0x00, 0xd0, 0xe5, 0x0e, 0x28, 0x82, 0xe1,
|
||||
0x0c, 0x38, 0x83, 0xe1, 0x00, 0x0c, 0x83, 0xe1, 0x01, 0x1c, 0x82, 0xe1,
|
||||
0x53, 0xff, 0xff, 0xeb, 0x04, 0x00, 0xa0, 0xe1, 0xa7, 0xff, 0xff, 0xea,
|
||||
0x06, 0x10, 0xd0, 0xe5, 0x09, 0x40, 0x80, 0xe2, 0x05, 0x20, 0xd0, 0xe5,
|
||||
0x01, 0x30, 0xd0, 0xe5, 0x02, 0x80, 0xd0, 0xe5, 0x07, 0xe0, 0xd0, 0xe5,
|
||||
0x03, 0xc0, 0xd0, 0xe5, 0x01, 0x24, 0x82, 0xe1, 0x08, 0x34, 0x83, 0xe1,
|
||||
0x08, 0x10, 0xd0, 0xe5, 0x04, 0x00, 0xd0, 0xe5, 0x0e, 0x28, 0x82, 0xe1,
|
||||
0x0c, 0x38, 0x83, 0xe1, 0x00, 0x0c, 0x83, 0xe1, 0x01, 0x1c, 0x82, 0xe1,
|
||||
0x07, 0xff, 0xff, 0xeb, 0x04, 0x00, 0xa0, 0xe1, 0x95, 0xff, 0xff, 0xea,
|
||||
0x0d, 0x90, 0xa0, 0xe1, 0x08, 0x80, 0x8d, 0xe2, 0x05, 0x30, 0xa0, 0xe3,
|
||||
0x00, 0x30, 0xcd, 0xe5, 0x01, 0x10, 0xa0, 0xe3, 0x09, 0x00, 0xa0, 0xe1,
|
||||
0x38, 0xff, 0xff, 0xeb, 0x01, 0x10, 0xa0, 0xe3, 0x08, 0x00, 0xa0, 0xe1,
|
||||
0xfb, 0xfe, 0xff, 0xeb, 0x08, 0x30, 0xdd, 0xe5, 0x01, 0x00, 0x13, 0xe3,
|
||||
0xf6, 0xff, 0xff, 0x1a, 0x04, 0x00, 0xa0, 0xe1, 0x86, 0xff, 0xff, 0xea,
|
||||
0x14, 0xd0, 0x8d, 0xe2, 0xf0, 0x83, 0xbd, 0xe8, 0x04, 0x00, 0x00, 0x00,
|
||||
0x14, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x47, 0x4e, 0x55, 0x00,
|
||||
0x05, 0xc7, 0x94, 0xb6, 0x88, 0x27, 0x95, 0x9f, 0xe7, 0xd8, 0xac, 0x20,
|
||||
0x46, 0x68, 0xca, 0xca, 0xb5, 0x4d, 0x6d, 0x5a, 0x2f, 0x6c, 0x69, 0x62,
|
||||
0x2f, 0x6c, 0x64, 0x2d, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x2d, 0x61, 0x72,
|
||||
0x6d, 0x68, 0x66, 0x2e, 0x73, 0x6f, 0x2e, 0x33, 0x00, 0x00, 0x00, 0x00,
|
||||
0xa5, 0xff, 0xff, 0xea, 0x08, 0x30, 0x96, 0xe5, 0x05, 0x70, 0xa0, 0xe1,
|
||||
0xb0, 0x30, 0xc3, 0xe3, 0x08, 0x30, 0x86, 0xe5, 0xa0, 0xff, 0xff, 0xea,
|
||||
0x08, 0x30, 0x96, 0xe5, 0x05, 0x70, 0xa0, 0xe1, 0xb0, 0x30, 0xc3, 0xe3,
|
||||
0x80, 0x30, 0x83, 0xe3, 0x08, 0x30, 0x86, 0xe5, 0x9a, 0xff, 0xff, 0xea,
|
||||
0x01, 0x90, 0xd7, 0xe5, 0x02, 0x00, 0x87, 0xe2, 0x09, 0x10, 0xa0, 0xe1,
|
||||
0x01, 0x70, 0x89, 0xe2, 0x07, 0x70, 0x85, 0xe0, 0x5a, 0xff, 0xff, 0xeb,
|
||||
0x93, 0xff, 0xff, 0xea, 0x06, 0x10, 0xd7, 0xe5, 0x09, 0x70, 0x87, 0xe2,
|
||||
0x07, 0x00, 0x57, 0xe5, 0x04, 0x20, 0x57, 0xe5, 0x08, 0x30, 0x57, 0xe5,
|
||||
0x02, 0xe0, 0x57, 0xe5, 0x06, 0xc0, 0x57, 0xe5, 0x01, 0x24, 0x82, 0xe1,
|
||||
0x00, 0x34, 0x83, 0xe1, 0x01, 0x10, 0x57, 0xe5, 0x05, 0x00, 0x57, 0xe5,
|
||||
0x0e, 0x28, 0x82, 0xe1, 0x0c, 0x38, 0x83, 0xe1, 0x01, 0x1c, 0x82, 0xe1,
|
||||
0x00, 0x0c, 0x83, 0xe1, 0x49, 0xff, 0xff, 0xeb, 0x82, 0xff, 0xff, 0xea,
|
||||
0x06, 0x10, 0xd7, 0xe5, 0x09, 0x70, 0x87, 0xe2, 0x07, 0x00, 0x57, 0xe5,
|
||||
0x04, 0x20, 0x57, 0xe5, 0x08, 0x30, 0x57, 0xe5, 0x02, 0xe0, 0x57, 0xe5,
|
||||
0x06, 0xc0, 0x57, 0xe5, 0x01, 0x24, 0x82, 0xe1, 0x00, 0x34, 0x83, 0xe1,
|
||||
0x01, 0x10, 0x57, 0xe5, 0x05, 0x00, 0x57, 0xe5, 0x0e, 0x28, 0x82, 0xe1,
|
||||
0x0c, 0x38, 0x83, 0xe1, 0x01, 0x1c, 0x82, 0xe1, 0x00, 0x0c, 0x83, 0xe1,
|
||||
0xfe, 0xfe, 0xff, 0xeb, 0x71, 0xff, 0xff, 0xea, 0x0d, 0x90, 0xa0, 0xe1,
|
||||
0x08, 0x70, 0x8d, 0xe2, 0x05, 0x30, 0xa0, 0xe3, 0x00, 0x30, 0xcd, 0xe5,
|
||||
0x01, 0x10, 0xa0, 0xe3, 0x09, 0x00, 0xa0, 0xe1, 0x30, 0xff, 0xff, 0xeb,
|
||||
0x01, 0x10, 0xa0, 0xe3, 0x07, 0x00, 0xa0, 0xe1, 0xf3, 0xfe, 0xff, 0xeb,
|
||||
0x08, 0x30, 0xdd, 0xe5, 0x01, 0x00, 0x13, 0xe3, 0xf6, 0xff, 0xff, 0x1a,
|
||||
0x05, 0x70, 0xa0, 0xe1, 0x81, 0xff, 0xff, 0xea, 0x14, 0xd0, 0x8d, 0xe2,
|
||||
0xf0, 0x83, 0xbd, 0xe8, 0x04, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x47, 0x4e, 0x55, 0x00, 0x5e, 0xff, 0x86, 0x41,
|
||||
0x5f, 0x0c, 0x57, 0xc9, 0x77, 0xc7, 0x3f, 0xd6, 0xb6, 0xba, 0x19, 0x4e,
|
||||
0xf3, 0x48, 0xda, 0x8e, 0x2f, 0x6c, 0x69, 0x62, 0x2f, 0x6c, 0x64, 0x2d,
|
||||
0x6c, 0x69, 0x6e, 0x75, 0x78, 0x2d, 0x61, 0x72, 0x6d, 0x68, 0x66, 0x2e,
|
||||
0x73, 0x6f, 0x2e, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf5, 0xfe, 0xff, 0x6f,
|
||||
0xe8, 0x84, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xe4, 0x84, 0x00, 0x00,
|
||||
0x06, 0x00, 0x00, 0x00, 0xd4, 0x84, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
|
||||
0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0xfb, 0xff, 0xff, 0x6f, 0x01, 0x00, 0x00, 0x08,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xf5, 0xfe, 0xff, 0x6f, 0x08, 0x85, 0x00, 0x00,
|
||||
0x05, 0x00, 0x00, 0x00, 0x04, 0x85, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
|
||||
0xf4, 0x84, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||
0xfb, 0xff, 0xff, 0x6f, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x85, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
fel_write(ctx, 0x00008000, (void *)&payload[0], sizeof(payload));
|
||||
if(swapbuf)
|
||||
|
133
chips/v3s.c
133
chips/v3s.c
@ -536,79 +536,82 @@ static int chip_spi_init(struct xfel_ctx_t * ctx, uint32_t * swapbuf, uint32_t *
|
||||
0x02, 0x60, 0x56, 0xe0, 0xe0, 0xff, 0xff, 0x1a, 0xf0, 0x80, 0xbd, 0xe8,
|
||||
0x00, 0x30, 0xa0, 0xe1, 0x07, 0xc0, 0xa0, 0xe1, 0x00, 0xc0, 0xc5, 0xe5,
|
||||
0x01, 0x30, 0x83, 0xe2, 0x03, 0x00, 0x52, 0xe1, 0xfb, 0xff, 0xff, 0xca,
|
||||
0xe7, 0xff, 0xff, 0xea, 0xf0, 0x43, 0x2d, 0xe9, 0x00, 0x40, 0xa0, 0xe1,
|
||||
0x0f, 0x70, 0x0c, 0xe3, 0x02, 0x69, 0xa0, 0xe3, 0x01, 0x30, 0xd4, 0xe4,
|
||||
0x00, 0x50, 0xa0, 0xe3, 0xff, 0x7f, 0x4f, 0xe3, 0x14, 0xd0, 0x4d, 0xe2,
|
||||
0xc6, 0x61, 0x40, 0xe3, 0x01, 0x00, 0x53, 0xe3, 0xc2, 0x51, 0x40, 0xe3,
|
||||
0x1c, 0x00, 0x00, 0x0a, 0x02, 0x00, 0x53, 0xe3, 0x51, 0x00, 0x00, 0x0a,
|
||||
0x03, 0x00, 0x53, 0xe3, 0x54, 0x00, 0x00, 0x0a, 0x04, 0x00, 0x53, 0xe3,
|
||||
0x58, 0x00, 0x00, 0x0a, 0x05, 0x00, 0x53, 0xe3, 0x68, 0x00, 0x00, 0x0a,
|
||||
0x06, 0x00, 0x53, 0xe3, 0x78, 0x00, 0x00, 0x0a, 0x07, 0x00, 0x53, 0xe3,
|
||||
0x85, 0x00, 0x00, 0x1a, 0xb0, 0x70, 0xcd, 0xe1, 0x0d, 0x90, 0xa0, 0xe1,
|
||||
0x08, 0x80, 0x8d, 0xe2, 0x02, 0x10, 0xa0, 0xe3, 0x09, 0x00, 0xa0, 0xe1,
|
||||
0xb0, 0xff, 0xff, 0xeb, 0x01, 0x10, 0xa0, 0xe3, 0x08, 0x00, 0xa0, 0xe1,
|
||||
0x73, 0xff, 0xff, 0xeb, 0x08, 0x30, 0xdd, 0xe5, 0x01, 0x00, 0x13, 0xe3,
|
||||
0xf6, 0xff, 0xff, 0x1a, 0x04, 0x00, 0xa0, 0xe1, 0x00, 0x40, 0xa0, 0xe1,
|
||||
0x01, 0x30, 0xd4, 0xe4, 0x01, 0x00, 0x53, 0xe3, 0xe2, 0xff, 0xff, 0x1a,
|
||||
0x48, 0x38, 0x95, 0xe5, 0x01, 0x2a, 0xa0, 0xe3, 0x0f, 0x30, 0xc3, 0xe3,
|
||||
0x03, 0x30, 0x83, 0xe3, 0x48, 0x38, 0x85, 0xe5, 0x48, 0x38, 0x95, 0xe5,
|
||||
0xf0, 0x30, 0xc3, 0xe3, 0x30, 0x30, 0x83, 0xe3, 0x48, 0x38, 0x85, 0xe5,
|
||||
0x48, 0x38, 0x95, 0xe5, 0x0f, 0x3c, 0xc3, 0xe3, 0x03, 0x3c, 0x83, 0xe3,
|
||||
0x48, 0x38, 0x85, 0xe5, 0x48, 0x38, 0x95, 0xe5, 0x0f, 0x3a, 0xc3, 0xe3,
|
||||
0x03, 0x3a, 0x83, 0xe3, 0x48, 0x38, 0x85, 0xe5, 0xc0, 0x32, 0x95, 0xe5,
|
||||
0x01, 0x36, 0x83, 0xe3, 0xc0, 0x32, 0x85, 0xe5, 0xa0, 0x30, 0x95, 0xe5,
|
||||
0x02, 0x31, 0x83, 0xe3, 0xa0, 0x30, 0x85, 0xe5, 0x60, 0x30, 0x95, 0xe5,
|
||||
0x01, 0x36, 0x83, 0xe3, 0x60, 0x30, 0x85, 0xe5, 0xa0, 0x30, 0x95, 0xe5,
|
||||
0x03, 0x34, 0xc3, 0xe3, 0x01, 0x34, 0x83, 0xe3, 0xa0, 0x30, 0x85, 0xe5,
|
||||
0xa0, 0x30, 0x95, 0xe5, 0x03, 0x38, 0xc3, 0xe3, 0xa0, 0x30, 0x85, 0xe5,
|
||||
0xa0, 0x30, 0x95, 0xe5, 0x0f, 0x30, 0xc3, 0xe3, 0x05, 0x30, 0x83, 0xe3,
|
||||
0xa0, 0x30, 0x85, 0xe5, 0x24, 0x20, 0x86, 0xe5, 0x04, 0x30, 0x96, 0xe5,
|
||||
0xe7, 0xff, 0xff, 0xea, 0xf0, 0x43, 0x2d, 0xe9, 0x0f, 0x80, 0x0c, 0xe3,
|
||||
0xff, 0x8f, 0x4f, 0xe3, 0x02, 0x69, 0xa0, 0xe3, 0xc6, 0x61, 0x40, 0xe3,
|
||||
0x00, 0x40, 0xa0, 0xe3, 0xc2, 0x41, 0x40, 0xe3, 0x14, 0xd0, 0x4d, 0xe2,
|
||||
0x00, 0x70, 0xa0, 0xe1, 0x07, 0x50, 0xa0, 0xe1, 0x01, 0x30, 0xd5, 0xe4,
|
||||
0x01, 0x00, 0x53, 0xe3, 0x1e, 0x00, 0x00, 0x0a, 0x02, 0x00, 0x53, 0xe3,
|
||||
0x53, 0x00, 0x00, 0x0a, 0x03, 0x00, 0x53, 0xe3, 0x56, 0x00, 0x00, 0x0a,
|
||||
0x04, 0x00, 0x53, 0xe3, 0x5a, 0x00, 0x00, 0x0a, 0x05, 0x00, 0x53, 0xe3,
|
||||
0x5f, 0x00, 0x00, 0x0a, 0x06, 0x00, 0x53, 0xe3, 0x6e, 0x00, 0x00, 0x0a,
|
||||
0x07, 0x00, 0x53, 0xe3, 0x7d, 0x00, 0x00, 0x0a, 0x08, 0x00, 0x53, 0xe3,
|
||||
0x8a, 0x00, 0x00, 0x1a, 0xb0, 0x80, 0xcd, 0xe1, 0x0d, 0x90, 0xa0, 0xe1,
|
||||
0x08, 0x70, 0x8d, 0xe2, 0x02, 0x10, 0xa0, 0xe3, 0x09, 0x00, 0xa0, 0xe1,
|
||||
0xad, 0xff, 0xff, 0xeb, 0x01, 0x10, 0xa0, 0xe3, 0x07, 0x00, 0xa0, 0xe1,
|
||||
0x70, 0xff, 0xff, 0xeb, 0x08, 0x30, 0xdd, 0xe5, 0x01, 0x00, 0x13, 0xe3,
|
||||
0xf6, 0xff, 0xff, 0x1a, 0x05, 0x70, 0xa0, 0xe1, 0x07, 0x50, 0xa0, 0xe1,
|
||||
0x01, 0x30, 0xd5, 0xe4, 0x01, 0x00, 0x53, 0xe3, 0xe0, 0xff, 0xff, 0x1a,
|
||||
0x48, 0x38, 0x94, 0xe5, 0x01, 0x2a, 0xa0, 0xe3, 0x0f, 0x30, 0xc3, 0xe3,
|
||||
0x03, 0x30, 0x83, 0xe3, 0x48, 0x38, 0x84, 0xe5, 0x48, 0x38, 0x94, 0xe5,
|
||||
0xf0, 0x30, 0xc3, 0xe3, 0x30, 0x30, 0x83, 0xe3, 0x48, 0x38, 0x84, 0xe5,
|
||||
0x48, 0x38, 0x94, 0xe5, 0x0f, 0x3c, 0xc3, 0xe3, 0x03, 0x3c, 0x83, 0xe3,
|
||||
0x48, 0x38, 0x84, 0xe5, 0x48, 0x38, 0x94, 0xe5, 0x0f, 0x3a, 0xc3, 0xe3,
|
||||
0x03, 0x3a, 0x83, 0xe3, 0x48, 0x38, 0x84, 0xe5, 0xc0, 0x32, 0x94, 0xe5,
|
||||
0x01, 0x36, 0x83, 0xe3, 0xc0, 0x32, 0x84, 0xe5, 0xa0, 0x30, 0x94, 0xe5,
|
||||
0x02, 0x31, 0x83, 0xe3, 0xa0, 0x30, 0x84, 0xe5, 0x60, 0x30, 0x94, 0xe5,
|
||||
0x01, 0x36, 0x83, 0xe3, 0x60, 0x30, 0x84, 0xe5, 0xa0, 0x30, 0x94, 0xe5,
|
||||
0x03, 0x34, 0xc3, 0xe3, 0x01, 0x34, 0x83, 0xe3, 0xa0, 0x30, 0x84, 0xe5,
|
||||
0xa0, 0x30, 0x94, 0xe5, 0x03, 0x38, 0xc3, 0xe3, 0xa0, 0x30, 0x84, 0xe5,
|
||||
0xa0, 0x30, 0x94, 0xe5, 0x0f, 0x30, 0xc3, 0xe3, 0x05, 0x30, 0x83, 0xe3,
|
||||
0xa0, 0x30, 0x84, 0xe5, 0x24, 0x20, 0x86, 0xe5, 0x04, 0x30, 0x96, 0xe5,
|
||||
0x02, 0x31, 0x83, 0xe3, 0x83, 0x30, 0x83, 0xe3, 0x04, 0x30, 0x86, 0xe5,
|
||||
0x04, 0x30, 0x96, 0xe5, 0x00, 0x00, 0x53, 0xe3, 0xfc, 0xff, 0xff, 0xba,
|
||||
0x08, 0x30, 0x96, 0xe5, 0x04, 0x00, 0xa0, 0xe1, 0x03, 0x30, 0xc3, 0xe3,
|
||||
0x08, 0x30, 0x96, 0xe5, 0x05, 0x70, 0xa0, 0xe1, 0x03, 0x30, 0xc3, 0xe3,
|
||||
0x44, 0x30, 0x83, 0xe3, 0x08, 0x30, 0x86, 0xe5, 0x18, 0x30, 0x96, 0xe5,
|
||||
0x02, 0x31, 0x83, 0xe3, 0x02, 0x39, 0x83, 0xe3, 0x18, 0x30, 0x86, 0xe5,
|
||||
0xc4, 0xff, 0xff, 0xea, 0x08, 0x30, 0x96, 0xe5, 0x04, 0x00, 0xa0, 0xe1,
|
||||
0xb0, 0x30, 0xc3, 0xe3, 0x08, 0x30, 0x86, 0xe5, 0xbf, 0xff, 0xff, 0xea,
|
||||
0x08, 0x30, 0x96, 0xe5, 0x04, 0x00, 0xa0, 0xe1, 0xb0, 0x30, 0xc3, 0xe3,
|
||||
0x80, 0x30, 0x83, 0xe3, 0x08, 0x30, 0x86, 0xe5, 0xb9, 0xff, 0xff, 0xea,
|
||||
0x06, 0x10, 0xd0, 0xe5, 0x09, 0x40, 0x80, 0xe2, 0x05, 0x20, 0xd0, 0xe5,
|
||||
0x01, 0x30, 0xd0, 0xe5, 0x02, 0x80, 0xd0, 0xe5, 0x07, 0xe0, 0xd0, 0xe5,
|
||||
0x03, 0xc0, 0xd0, 0xe5, 0x01, 0x24, 0x82, 0xe1, 0x08, 0x34, 0x83, 0xe1,
|
||||
0x08, 0x10, 0xd0, 0xe5, 0x04, 0x00, 0xd0, 0xe5, 0x0e, 0x28, 0x82, 0xe1,
|
||||
0x0c, 0x38, 0x83, 0xe1, 0x00, 0x0c, 0x83, 0xe1, 0x01, 0x1c, 0x82, 0xe1,
|
||||
0x53, 0xff, 0xff, 0xeb, 0x04, 0x00, 0xa0, 0xe1, 0xa7, 0xff, 0xff, 0xea,
|
||||
0x06, 0x10, 0xd0, 0xe5, 0x09, 0x40, 0x80, 0xe2, 0x05, 0x20, 0xd0, 0xe5,
|
||||
0x01, 0x30, 0xd0, 0xe5, 0x02, 0x80, 0xd0, 0xe5, 0x07, 0xe0, 0xd0, 0xe5,
|
||||
0x03, 0xc0, 0xd0, 0xe5, 0x01, 0x24, 0x82, 0xe1, 0x08, 0x34, 0x83, 0xe1,
|
||||
0x08, 0x10, 0xd0, 0xe5, 0x04, 0x00, 0xd0, 0xe5, 0x0e, 0x28, 0x82, 0xe1,
|
||||
0x0c, 0x38, 0x83, 0xe1, 0x00, 0x0c, 0x83, 0xe1, 0x01, 0x1c, 0x82, 0xe1,
|
||||
0x07, 0xff, 0xff, 0xeb, 0x04, 0x00, 0xa0, 0xe1, 0x95, 0xff, 0xff, 0xea,
|
||||
0x0d, 0x90, 0xa0, 0xe1, 0x08, 0x80, 0x8d, 0xe2, 0x05, 0x30, 0xa0, 0xe3,
|
||||
0x00, 0x30, 0xcd, 0xe5, 0x01, 0x10, 0xa0, 0xe3, 0x09, 0x00, 0xa0, 0xe1,
|
||||
0x38, 0xff, 0xff, 0xeb, 0x01, 0x10, 0xa0, 0xe3, 0x08, 0x00, 0xa0, 0xe1,
|
||||
0xfb, 0xfe, 0xff, 0xeb, 0x08, 0x30, 0xdd, 0xe5, 0x01, 0x00, 0x13, 0xe3,
|
||||
0xf6, 0xff, 0xff, 0x1a, 0x04, 0x00, 0xa0, 0xe1, 0x86, 0xff, 0xff, 0xea,
|
||||
0x14, 0xd0, 0x8d, 0xe2, 0xf0, 0x83, 0xbd, 0xe8, 0x04, 0x00, 0x00, 0x00,
|
||||
0x14, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x47, 0x4e, 0x55, 0x00,
|
||||
0x50, 0x24, 0x84, 0x7f, 0x8a, 0x09, 0x04, 0x1d, 0x0a, 0xd5, 0x27, 0x8e,
|
||||
0x6b, 0x1e, 0x2d, 0xe9, 0x2f, 0xb2, 0x59, 0xd7, 0x2f, 0x6c, 0x69, 0x62,
|
||||
0x2f, 0x6c, 0x64, 0x2d, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x2d, 0x61, 0x72,
|
||||
0x6d, 0x68, 0x66, 0x2e, 0x73, 0x6f, 0x2e, 0x33, 0x00, 0x00, 0x00, 0x00,
|
||||
0xa5, 0xff, 0xff, 0xea, 0x08, 0x30, 0x96, 0xe5, 0x05, 0x70, 0xa0, 0xe1,
|
||||
0xb0, 0x30, 0xc3, 0xe3, 0x08, 0x30, 0x86, 0xe5, 0xa0, 0xff, 0xff, 0xea,
|
||||
0x08, 0x30, 0x96, 0xe5, 0x05, 0x70, 0xa0, 0xe1, 0xb0, 0x30, 0xc3, 0xe3,
|
||||
0x80, 0x30, 0x83, 0xe3, 0x08, 0x30, 0x86, 0xe5, 0x9a, 0xff, 0xff, 0xea,
|
||||
0x01, 0x90, 0xd7, 0xe5, 0x02, 0x00, 0x87, 0xe2, 0x09, 0x10, 0xa0, 0xe1,
|
||||
0x01, 0x70, 0x89, 0xe2, 0x07, 0x70, 0x85, 0xe0, 0x5a, 0xff, 0xff, 0xeb,
|
||||
0x93, 0xff, 0xff, 0xea, 0x06, 0x10, 0xd7, 0xe5, 0x09, 0x70, 0x87, 0xe2,
|
||||
0x07, 0x00, 0x57, 0xe5, 0x04, 0x20, 0x57, 0xe5, 0x08, 0x30, 0x57, 0xe5,
|
||||
0x02, 0xe0, 0x57, 0xe5, 0x06, 0xc0, 0x57, 0xe5, 0x01, 0x24, 0x82, 0xe1,
|
||||
0x00, 0x34, 0x83, 0xe1, 0x01, 0x10, 0x57, 0xe5, 0x05, 0x00, 0x57, 0xe5,
|
||||
0x0e, 0x28, 0x82, 0xe1, 0x0c, 0x38, 0x83, 0xe1, 0x01, 0x1c, 0x82, 0xe1,
|
||||
0x00, 0x0c, 0x83, 0xe1, 0x49, 0xff, 0xff, 0xeb, 0x82, 0xff, 0xff, 0xea,
|
||||
0x06, 0x10, 0xd7, 0xe5, 0x09, 0x70, 0x87, 0xe2, 0x07, 0x00, 0x57, 0xe5,
|
||||
0x04, 0x20, 0x57, 0xe5, 0x08, 0x30, 0x57, 0xe5, 0x02, 0xe0, 0x57, 0xe5,
|
||||
0x06, 0xc0, 0x57, 0xe5, 0x01, 0x24, 0x82, 0xe1, 0x00, 0x34, 0x83, 0xe1,
|
||||
0x01, 0x10, 0x57, 0xe5, 0x05, 0x00, 0x57, 0xe5, 0x0e, 0x28, 0x82, 0xe1,
|
||||
0x0c, 0x38, 0x83, 0xe1, 0x01, 0x1c, 0x82, 0xe1, 0x00, 0x0c, 0x83, 0xe1,
|
||||
0xfe, 0xfe, 0xff, 0xeb, 0x71, 0xff, 0xff, 0xea, 0x0d, 0x90, 0xa0, 0xe1,
|
||||
0x08, 0x70, 0x8d, 0xe2, 0x05, 0x30, 0xa0, 0xe3, 0x00, 0x30, 0xcd, 0xe5,
|
||||
0x01, 0x10, 0xa0, 0xe3, 0x09, 0x00, 0xa0, 0xe1, 0x30, 0xff, 0xff, 0xeb,
|
||||
0x01, 0x10, 0xa0, 0xe3, 0x07, 0x00, 0xa0, 0xe1, 0xf3, 0xfe, 0xff, 0xeb,
|
||||
0x08, 0x30, 0xdd, 0xe5, 0x01, 0x00, 0x13, 0xe3, 0xf6, 0xff, 0xff, 0x1a,
|
||||
0x05, 0x70, 0xa0, 0xe1, 0x81, 0xff, 0xff, 0xea, 0x14, 0xd0, 0x8d, 0xe2,
|
||||
0xf0, 0x83, 0xbd, 0xe8, 0x04, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x47, 0x4e, 0x55, 0x00, 0x02, 0xb1, 0x72, 0x4b,
|
||||
0xc1, 0x97, 0x3f, 0x40, 0x7c, 0x8e, 0xf7, 0xf1, 0x26, 0x40, 0x57, 0xf0,
|
||||
0x0c, 0x7a, 0x67, 0xb5, 0x2f, 0x6c, 0x69, 0x62, 0x2f, 0x6c, 0x64, 0x2d,
|
||||
0x6c, 0x69, 0x6e, 0x75, 0x78, 0x2d, 0x61, 0x72, 0x6d, 0x68, 0x66, 0x2e,
|
||||
0x73, 0x6f, 0x2e, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf5, 0xfe, 0xff, 0x6f,
|
||||
0xe8, 0x84, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xe4, 0x84, 0x00, 0x00,
|
||||
0x06, 0x00, 0x00, 0x00, 0xd4, 0x84, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
|
||||
0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0xfb, 0xff, 0xff, 0x6f, 0x01, 0x00, 0x00, 0x08,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xf5, 0xfe, 0xff, 0x6f, 0x08, 0x85, 0x00, 0x00,
|
||||
0x05, 0x00, 0x00, 0x00, 0x04, 0x85, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
|
||||
0xf4, 0x84, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||
0xfb, 0xff, 0xff, 0x6f, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x85, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
fel_write(ctx, 0x00008000, (void *)&payload[0], sizeof(payload));
|
||||
if(swapbuf)
|
||||
|
118
chips/v831.c
118
chips/v831.c
@ -1234,26 +1234,27 @@ static int chip_spi_init(struct xfel_ctx_t * ctx, uint32_t * swapbuf, uint32_t *
|
||||
0xf0, 0x80, 0xbd, 0xe8, 0x00, 0x30, 0xa0, 0xe1, 0x07, 0xc0, 0xa0, 0xe1,
|
||||
0x00, 0xc0, 0xc5, 0xe5, 0x01, 0x30, 0x83, 0xe2, 0x03, 0x00, 0x52, 0xe1,
|
||||
0xfb, 0xff, 0xff, 0xca, 0xe7, 0xff, 0xff, 0xea, 0xf0, 0x43, 0x2d, 0xe9,
|
||||
0x00, 0x40, 0xa0, 0xe1, 0x0f, 0x70, 0x0c, 0xe3, 0x00, 0x50, 0xa0, 0xe3,
|
||||
0x01, 0x30, 0xd4, 0xe4, 0x0b, 0x6a, 0xa0, 0xe3, 0xff, 0x7f, 0x4f, 0xe3,
|
||||
0x14, 0xd0, 0x4d, 0xe2, 0x01, 0x55, 0x40, 0xe3, 0x01, 0x00, 0x53, 0xe3,
|
||||
0x00, 0x63, 0x40, 0xe3, 0x1c, 0x00, 0x00, 0x0a, 0x02, 0x00, 0x53, 0xe3,
|
||||
0x53, 0x00, 0x00, 0x0a, 0x03, 0x00, 0x53, 0xe3, 0x56, 0x00, 0x00, 0x0a,
|
||||
0x04, 0x00, 0x53, 0xe3, 0x5a, 0x00, 0x00, 0x0a, 0x05, 0x00, 0x53, 0xe3,
|
||||
0x6a, 0x00, 0x00, 0x0a, 0x06, 0x00, 0x53, 0xe3, 0x7a, 0x00, 0x00, 0x0a,
|
||||
0x07, 0x00, 0x53, 0xe3, 0x87, 0x00, 0x00, 0x1a, 0xb0, 0x70, 0xcd, 0xe1,
|
||||
0x0d, 0x90, 0xa0, 0xe1, 0x08, 0x80, 0x8d, 0xe2, 0x02, 0x10, 0xa0, 0xe3,
|
||||
0x09, 0x00, 0xa0, 0xe1, 0xb0, 0xff, 0xff, 0xeb, 0x01, 0x10, 0xa0, 0xe3,
|
||||
0x08, 0x00, 0xa0, 0xe1, 0x73, 0xff, 0xff, 0xeb, 0x08, 0x30, 0xdd, 0xe5,
|
||||
0x01, 0x00, 0x13, 0xe3, 0xf6, 0xff, 0xff, 0x1a, 0x04, 0x00, 0xa0, 0xe1,
|
||||
0x00, 0x40, 0xa0, 0xe1, 0x01, 0x30, 0xd4, 0xe4, 0x01, 0x00, 0x53, 0xe3,
|
||||
0xe2, 0xff, 0xff, 0x1a, 0x48, 0x20, 0x96, 0xe5, 0x01, 0x3a, 0xa0, 0xe3,
|
||||
0x0f, 0x80, 0x0c, 0xe3, 0xff, 0x8f, 0x4f, 0xe3, 0x00, 0x50, 0xa0, 0xe3,
|
||||
0x01, 0x55, 0x40, 0xe3, 0x0b, 0x7a, 0xa0, 0xe3, 0x00, 0x73, 0x40, 0xe3,
|
||||
0x14, 0xd0, 0x4d, 0xe2, 0x00, 0x60, 0xa0, 0xe1, 0x06, 0x40, 0xa0, 0xe1,
|
||||
0x01, 0x30, 0xd4, 0xe4, 0x01, 0x00, 0x53, 0xe3, 0x1e, 0x00, 0x00, 0x0a,
|
||||
0x02, 0x00, 0x53, 0xe3, 0x55, 0x00, 0x00, 0x0a, 0x03, 0x00, 0x53, 0xe3,
|
||||
0x58, 0x00, 0x00, 0x0a, 0x04, 0x00, 0x53, 0xe3, 0x5c, 0x00, 0x00, 0x0a,
|
||||
0x05, 0x00, 0x53, 0xe3, 0x61, 0x00, 0x00, 0x0a, 0x06, 0x00, 0x53, 0xe3,
|
||||
0x70, 0x00, 0x00, 0x0a, 0x07, 0x00, 0x53, 0xe3, 0x7f, 0x00, 0x00, 0x0a,
|
||||
0x08, 0x00, 0x53, 0xe3, 0x8c, 0x00, 0x00, 0x1a, 0xb0, 0x80, 0xcd, 0xe1,
|
||||
0x0d, 0x90, 0xa0, 0xe1, 0x08, 0x60, 0x8d, 0xe2, 0x02, 0x10, 0xa0, 0xe3,
|
||||
0x09, 0x00, 0xa0, 0xe1, 0xad, 0xff, 0xff, 0xeb, 0x01, 0x10, 0xa0, 0xe3,
|
||||
0x06, 0x00, 0xa0, 0xe1, 0x70, 0xff, 0xff, 0xeb, 0x08, 0x30, 0xdd, 0xe5,
|
||||
0x01, 0x00, 0x13, 0xe3, 0xf6, 0xff, 0xff, 0x1a, 0x04, 0x60, 0xa0, 0xe1,
|
||||
0x06, 0x40, 0xa0, 0xe1, 0x01, 0x30, 0xd4, 0xe4, 0x01, 0x00, 0x53, 0xe3,
|
||||
0xe0, 0xff, 0xff, 0x1a, 0x48, 0x20, 0x97, 0xe5, 0x01, 0x3a, 0xa0, 0xe3,
|
||||
0x00, 0x33, 0x40, 0xe3, 0x01, 0x1a, 0xa0, 0xe3, 0x0f, 0x20, 0xc2, 0xe3,
|
||||
0x04, 0x20, 0x82, 0xe3, 0x48, 0x20, 0x86, 0xe5, 0x48, 0x20, 0x96, 0xe5,
|
||||
0xf0, 0x20, 0xc2, 0xe3, 0x40, 0x20, 0x82, 0xe3, 0x48, 0x20, 0x86, 0xe5,
|
||||
0x48, 0x20, 0x96, 0xe5, 0x0f, 0x2c, 0xc2, 0xe3, 0x01, 0x2b, 0x82, 0xe3,
|
||||
0x48, 0x20, 0x86, 0xe5, 0x48, 0x20, 0x96, 0xe5, 0x0f, 0x2a, 0xc2, 0xe3,
|
||||
0x01, 0x29, 0x82, 0xe3, 0x48, 0x20, 0x86, 0xe5, 0x6c, 0x29, 0x93, 0xe5,
|
||||
0x04, 0x20, 0x82, 0xe3, 0x48, 0x20, 0x87, 0xe5, 0x48, 0x20, 0x97, 0xe5,
|
||||
0xf0, 0x20, 0xc2, 0xe3, 0x40, 0x20, 0x82, 0xe3, 0x48, 0x20, 0x87, 0xe5,
|
||||
0x48, 0x20, 0x97, 0xe5, 0x0f, 0x2c, 0xc2, 0xe3, 0x01, 0x2b, 0x82, 0xe3,
|
||||
0x48, 0x20, 0x87, 0xe5, 0x48, 0x20, 0x97, 0xe5, 0x0f, 0x2a, 0xc2, 0xe3,
|
||||
0x01, 0x29, 0x82, 0xe3, 0x48, 0x20, 0x87, 0xe5, 0x6c, 0x29, 0x93, 0xe5,
|
||||
0x01, 0x28, 0x82, 0xe3, 0x6c, 0x29, 0x83, 0xe5, 0x40, 0x29, 0x93, 0xe5,
|
||||
0x02, 0x21, 0x82, 0xe3, 0x40, 0x29, 0x83, 0xe5, 0x6c, 0x29, 0x93, 0xe5,
|
||||
0x01, 0x20, 0x82, 0xe3, 0x6c, 0x29, 0x83, 0xe5, 0x40, 0x29, 0x93, 0xe5,
|
||||
@ -1263,51 +1264,52 @@ static int chip_spi_init(struct xfel_ctx_t * ctx, uint32_t * swapbuf, uint32_t *
|
||||
0x40, 0x29, 0x83, 0xe5, 0x24, 0x10, 0x85, 0xe5, 0x04, 0x30, 0x95, 0xe5,
|
||||
0x02, 0x31, 0x83, 0xe3, 0x83, 0x30, 0x83, 0xe3, 0x04, 0x30, 0x85, 0xe5,
|
||||
0x04, 0x30, 0x95, 0xe5, 0x00, 0x00, 0x53, 0xe3, 0xfc, 0xff, 0xff, 0xba,
|
||||
0x08, 0x30, 0x95, 0xe5, 0x04, 0x00, 0xa0, 0xe1, 0x03, 0x30, 0xc3, 0xe3,
|
||||
0x08, 0x30, 0x95, 0xe5, 0x04, 0x60, 0xa0, 0xe1, 0x03, 0x30, 0xc3, 0xe3,
|
||||
0x44, 0x30, 0x83, 0xe3, 0x08, 0x30, 0x85, 0xe5, 0x18, 0x30, 0x95, 0xe5,
|
||||
0x02, 0x31, 0x83, 0xe3, 0x02, 0x39, 0x83, 0xe3, 0x18, 0x30, 0x85, 0xe5,
|
||||
0xc2, 0xff, 0xff, 0xea, 0x08, 0x30, 0x95, 0xe5, 0x04, 0x00, 0xa0, 0xe1,
|
||||
0xb0, 0x30, 0xc3, 0xe3, 0x08, 0x30, 0x85, 0xe5, 0xbd, 0xff, 0xff, 0xea,
|
||||
0x08, 0x30, 0x95, 0xe5, 0x04, 0x00, 0xa0, 0xe1, 0xb0, 0x30, 0xc3, 0xe3,
|
||||
0x80, 0x30, 0x83, 0xe3, 0x08, 0x30, 0x85, 0xe5, 0xb7, 0xff, 0xff, 0xea,
|
||||
0x06, 0x10, 0xd0, 0xe5, 0x09, 0x40, 0x80, 0xe2, 0x05, 0x20, 0xd0, 0xe5,
|
||||
0x01, 0x30, 0xd0, 0xe5, 0x02, 0x80, 0xd0, 0xe5, 0x07, 0xe0, 0xd0, 0xe5,
|
||||
0x03, 0xc0, 0xd0, 0xe5, 0x01, 0x24, 0x82, 0xe1, 0x08, 0x34, 0x83, 0xe1,
|
||||
0x08, 0x10, 0xd0, 0xe5, 0x04, 0x00, 0xd0, 0xe5, 0x0e, 0x28, 0x82, 0xe1,
|
||||
0x0c, 0x38, 0x83, 0xe1, 0x00, 0x0c, 0x83, 0xe1, 0x01, 0x1c, 0x82, 0xe1,
|
||||
0x51, 0xff, 0xff, 0xeb, 0x04, 0x00, 0xa0, 0xe1, 0xa5, 0xff, 0xff, 0xea,
|
||||
0x06, 0x10, 0xd0, 0xe5, 0x09, 0x40, 0x80, 0xe2, 0x05, 0x20, 0xd0, 0xe5,
|
||||
0x01, 0x30, 0xd0, 0xe5, 0x02, 0x80, 0xd0, 0xe5, 0x07, 0xe0, 0xd0, 0xe5,
|
||||
0x03, 0xc0, 0xd0, 0xe5, 0x01, 0x24, 0x82, 0xe1, 0x08, 0x34, 0x83, 0xe1,
|
||||
0x08, 0x10, 0xd0, 0xe5, 0x04, 0x00, 0xd0, 0xe5, 0x0e, 0x28, 0x82, 0xe1,
|
||||
0x0c, 0x38, 0x83, 0xe1, 0x00, 0x0c, 0x83, 0xe1, 0x01, 0x1c, 0x82, 0xe1,
|
||||
0x05, 0xff, 0xff, 0xeb, 0x04, 0x00, 0xa0, 0xe1, 0x93, 0xff, 0xff, 0xea,
|
||||
0x0d, 0x90, 0xa0, 0xe1, 0x08, 0x80, 0x8d, 0xe2, 0x05, 0x30, 0xa0, 0xe3,
|
||||
0x00, 0x30, 0xcd, 0xe5, 0x01, 0x10, 0xa0, 0xe3, 0x09, 0x00, 0xa0, 0xe1,
|
||||
0x36, 0xff, 0xff, 0xeb, 0x01, 0x10, 0xa0, 0xe3, 0x08, 0x00, 0xa0, 0xe1,
|
||||
0xf9, 0xfe, 0xff, 0xeb, 0x08, 0x30, 0xdd, 0xe5, 0x01, 0x00, 0x13, 0xe3,
|
||||
0xf6, 0xff, 0xff, 0x1a, 0x04, 0x00, 0xa0, 0xe1, 0x84, 0xff, 0xff, 0xea,
|
||||
0x14, 0xd0, 0x8d, 0xe2, 0xf0, 0x83, 0xbd, 0xe8, 0x04, 0x00, 0x00, 0x00,
|
||||
0x14, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x47, 0x4e, 0x55, 0x00,
|
||||
0xe6, 0xb8, 0x89, 0xdd, 0x32, 0x05, 0x57, 0x09, 0x6c, 0x39, 0xd4, 0x96,
|
||||
0xab, 0x8d, 0x1d, 0xcd, 0xa5, 0xe2, 0xed, 0x54, 0x2f, 0x6c, 0x69, 0x62,
|
||||
0x2f, 0x6c, 0x64, 0x2d, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x2d, 0x61, 0x72,
|
||||
0x6d, 0x68, 0x66, 0x2e, 0x73, 0x6f, 0x2e, 0x33, 0x00, 0x00, 0x00, 0x00,
|
||||
0xa3, 0xff, 0xff, 0xea, 0x08, 0x30, 0x95, 0xe5, 0x04, 0x60, 0xa0, 0xe1,
|
||||
0xb0, 0x30, 0xc3, 0xe3, 0x08, 0x30, 0x85, 0xe5, 0x9e, 0xff, 0xff, 0xea,
|
||||
0x08, 0x30, 0x95, 0xe5, 0x04, 0x60, 0xa0, 0xe1, 0xb0, 0x30, 0xc3, 0xe3,
|
||||
0x80, 0x30, 0x83, 0xe3, 0x08, 0x30, 0x85, 0xe5, 0x98, 0xff, 0xff, 0xea,
|
||||
0x01, 0x90, 0xd6, 0xe5, 0x02, 0x00, 0x86, 0xe2, 0x09, 0x10, 0xa0, 0xe1,
|
||||
0x01, 0x60, 0x89, 0xe2, 0x06, 0x60, 0x84, 0xe0, 0x58, 0xff, 0xff, 0xeb,
|
||||
0x91, 0xff, 0xff, 0xea, 0x06, 0x10, 0xd6, 0xe5, 0x09, 0x60, 0x86, 0xe2,
|
||||
0x07, 0x00, 0x56, 0xe5, 0x04, 0x20, 0x56, 0xe5, 0x08, 0x30, 0x56, 0xe5,
|
||||
0x02, 0xe0, 0x56, 0xe5, 0x06, 0xc0, 0x56, 0xe5, 0x01, 0x24, 0x82, 0xe1,
|
||||
0x00, 0x34, 0x83, 0xe1, 0x01, 0x10, 0x56, 0xe5, 0x05, 0x00, 0x56, 0xe5,
|
||||
0x0e, 0x28, 0x82, 0xe1, 0x0c, 0x38, 0x83, 0xe1, 0x01, 0x1c, 0x82, 0xe1,
|
||||
0x00, 0x0c, 0x83, 0xe1, 0x47, 0xff, 0xff, 0xeb, 0x80, 0xff, 0xff, 0xea,
|
||||
0x06, 0x10, 0xd6, 0xe5, 0x09, 0x60, 0x86, 0xe2, 0x07, 0x00, 0x56, 0xe5,
|
||||
0x04, 0x20, 0x56, 0xe5, 0x08, 0x30, 0x56, 0xe5, 0x02, 0xe0, 0x56, 0xe5,
|
||||
0x06, 0xc0, 0x56, 0xe5, 0x01, 0x24, 0x82, 0xe1, 0x00, 0x34, 0x83, 0xe1,
|
||||
0x01, 0x10, 0x56, 0xe5, 0x05, 0x00, 0x56, 0xe5, 0x0e, 0x28, 0x82, 0xe1,
|
||||
0x0c, 0x38, 0x83, 0xe1, 0x01, 0x1c, 0x82, 0xe1, 0x00, 0x0c, 0x83, 0xe1,
|
||||
0xfc, 0xfe, 0xff, 0xeb, 0x6f, 0xff, 0xff, 0xea, 0x0d, 0x90, 0xa0, 0xe1,
|
||||
0x08, 0x60, 0x8d, 0xe2, 0x05, 0x30, 0xa0, 0xe3, 0x00, 0x30, 0xcd, 0xe5,
|
||||
0x01, 0x10, 0xa0, 0xe3, 0x09, 0x00, 0xa0, 0xe1, 0x2e, 0xff, 0xff, 0xeb,
|
||||
0x01, 0x10, 0xa0, 0xe3, 0x06, 0x00, 0xa0, 0xe1, 0xf1, 0xfe, 0xff, 0xeb,
|
||||
0x08, 0x30, 0xdd, 0xe5, 0x01, 0x00, 0x13, 0xe3, 0xf6, 0xff, 0xff, 0x1a,
|
||||
0x04, 0x60, 0xa0, 0xe1, 0x7f, 0xff, 0xff, 0xea, 0x14, 0xd0, 0x8d, 0xe2,
|
||||
0xf0, 0x83, 0xbd, 0xe8, 0x04, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x47, 0x4e, 0x55, 0x00, 0xbe, 0x5b, 0x1d, 0xa0,
|
||||
0x00, 0xaf, 0x04, 0x3c, 0x40, 0x15, 0xc5, 0xde, 0x21, 0x29, 0xbc, 0xb6,
|
||||
0x9f, 0x83, 0xa6, 0x42, 0x2f, 0x6c, 0x69, 0x62, 0x2f, 0x6c, 0x64, 0x2d,
|
||||
0x6c, 0x69, 0x6e, 0x75, 0x78, 0x2d, 0x61, 0x72, 0x6d, 0x68, 0x66, 0x2e,
|
||||
0x73, 0x6f, 0x2e, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xf5, 0xfe, 0xff, 0x6f, 0xf4, 0x24, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00,
|
||||
0xf0, 0x24, 0x02, 0x00, 0x06, 0x00, 0x00, 0x00, 0xe0, 0x24, 0x02, 0x00,
|
||||
0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x10, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x1e, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xfb, 0xff, 0xff, 0x6f,
|
||||
0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf5, 0xfe, 0xff, 0x6f,
|
||||
0x14, 0x25, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0x25, 0x02, 0x00,
|
||||
0x06, 0x00, 0x00, 0x00, 0x00, 0x25, 0x02, 0x00, 0x0a, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
|
||||
0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0xfb, 0xff, 0xff, 0x6f, 0x01, 0x00, 0x00, 0x08,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x10, 0x25, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x30, 0x25, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
fel_write(ctx, 0x00022000, (void *)&payload[0], sizeof(payload));
|
||||
if(swapbuf)
|
||||
|
9
fel.h
9
fel.h
@ -45,10 +45,11 @@ enum {
|
||||
SPI_CMD_INIT = 0x01,
|
||||
SPI_CMD_SELECT = 0x02,
|
||||
SPI_CMD_DESELECT = 0x03,
|
||||
SPI_CMD_TXBUF = 0x04,
|
||||
SPI_CMD_RXBUF = 0x05,
|
||||
SPI_CMD_SPINOR_WAIT = 0x06,
|
||||
SPI_CMD_SPINAND_WAIT = 0x07,
|
||||
SPI_CMD_FAST = 0x04,
|
||||
SPI_CMD_TXBUF = 0x05,
|
||||
SPI_CMD_RXBUF = 0x06,
|
||||
SPI_CMD_SPINOR_WAIT = 0x07,
|
||||
SPI_CMD_SPINAND_WAIT = 0x08,
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -177,10 +177,11 @@ enum {
|
||||
SPI_CMD_INIT = 0x01,
|
||||
SPI_CMD_SELECT = 0x02,
|
||||
SPI_CMD_DESELECT = 0x03,
|
||||
SPI_CMD_TXBUF = 0x04,
|
||||
SPI_CMD_RXBUF = 0x05,
|
||||
SPI_CMD_SPINOR_WAIT = 0x06,
|
||||
SPI_CMD_SPINAND_WAIT = 0x07,
|
||||
SPI_CMD_FAST = 0x04,
|
||||
SPI_CMD_TXBUF = 0x05,
|
||||
SPI_CMD_RXBUF = 0x06,
|
||||
SPI_CMD_SPINOR_WAIT = 0x07,
|
||||
SPI_CMD_SPINAND_WAIT = 0x08,
|
||||
};
|
||||
|
||||
void sys_spi_run(void * cmdbuf)
|
||||
@ -204,6 +205,12 @@ void sys_spi_run(void * cmdbuf)
|
||||
{
|
||||
sys_spi_deselect();
|
||||
}
|
||||
else if(c == SPI_CMD_FAST)
|
||||
{
|
||||
len = p[0];
|
||||
sys_spi_transfer((void *)&p[1], NULL, len);
|
||||
p += (len + 1);
|
||||
}
|
||||
else if(c == SPI_CMD_TXBUF)
|
||||
{
|
||||
addr = (p[0] << 0) | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
|
||||
|
@ -204,10 +204,11 @@ enum {
|
||||
SPI_CMD_INIT = 0x01,
|
||||
SPI_CMD_SELECT = 0x02,
|
||||
SPI_CMD_DESELECT = 0x03,
|
||||
SPI_CMD_TXBUF = 0x04,
|
||||
SPI_CMD_RXBUF = 0x05,
|
||||
SPI_CMD_SPINOR_WAIT = 0x06,
|
||||
SPI_CMD_SPINAND_WAIT = 0x07,
|
||||
SPI_CMD_FAST = 0x04,
|
||||
SPI_CMD_TXBUF = 0x05,
|
||||
SPI_CMD_RXBUF = 0x06,
|
||||
SPI_CMD_SPINOR_WAIT = 0x07,
|
||||
SPI_CMD_SPINAND_WAIT = 0x08,
|
||||
};
|
||||
|
||||
void sys_spi_run(void * cmdbuf)
|
||||
@ -231,6 +232,12 @@ void sys_spi_run(void * cmdbuf)
|
||||
{
|
||||
sys_spi_deselect();
|
||||
}
|
||||
else if(c == SPI_CMD_FAST)
|
||||
{
|
||||
len = p[0];
|
||||
sys_spi_transfer((void *)&p[1], NULL, len);
|
||||
p += (len + 1);
|
||||
}
|
||||
else if(c == SPI_CMD_TXBUF)
|
||||
{
|
||||
addr = (p[0] << 0) | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
|
||||
|
@ -204,10 +204,11 @@ enum {
|
||||
SPI_CMD_INIT = 0x01,
|
||||
SPI_CMD_SELECT = 0x02,
|
||||
SPI_CMD_DESELECT = 0x03,
|
||||
SPI_CMD_TXBUF = 0x04,
|
||||
SPI_CMD_RXBUF = 0x05,
|
||||
SPI_CMD_SPINOR_WAIT = 0x06,
|
||||
SPI_CMD_SPINAND_WAIT = 0x07,
|
||||
SPI_CMD_FAST = 0x04,
|
||||
SPI_CMD_TXBUF = 0x05,
|
||||
SPI_CMD_RXBUF = 0x06,
|
||||
SPI_CMD_SPINOR_WAIT = 0x07,
|
||||
SPI_CMD_SPINAND_WAIT = 0x08,
|
||||
};
|
||||
|
||||
void sys_spi_run(void * cmdbuf)
|
||||
@ -231,6 +232,12 @@ void sys_spi_run(void * cmdbuf)
|
||||
{
|
||||
sys_spi_deselect();
|
||||
}
|
||||
else if(c == SPI_CMD_FAST)
|
||||
{
|
||||
len = p[0];
|
||||
sys_spi_transfer((void *)&p[1], NULL, len);
|
||||
p += (len + 1);
|
||||
}
|
||||
else if(c == SPI_CMD_TXBUF)
|
||||
{
|
||||
addr = (p[0] << 0) | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
|
||||
|
@ -204,10 +204,11 @@ enum {
|
||||
SPI_CMD_INIT = 0x01,
|
||||
SPI_CMD_SELECT = 0x02,
|
||||
SPI_CMD_DESELECT = 0x03,
|
||||
SPI_CMD_TXBUF = 0x04,
|
||||
SPI_CMD_RXBUF = 0x05,
|
||||
SPI_CMD_SPINOR_WAIT = 0x06,
|
||||
SPI_CMD_SPINAND_WAIT = 0x07,
|
||||
SPI_CMD_FAST = 0x04,
|
||||
SPI_CMD_TXBUF = 0x05,
|
||||
SPI_CMD_RXBUF = 0x06,
|
||||
SPI_CMD_SPINOR_WAIT = 0x07,
|
||||
SPI_CMD_SPINAND_WAIT = 0x08,
|
||||
};
|
||||
|
||||
void sys_spi_run(void * cmdbuf)
|
||||
@ -231,6 +232,12 @@ void sys_spi_run(void * cmdbuf)
|
||||
{
|
||||
sys_spi_deselect();
|
||||
}
|
||||
else if(c == SPI_CMD_FAST)
|
||||
{
|
||||
len = p[0];
|
||||
sys_spi_transfer((void *)&p[1], NULL, len);
|
||||
p += (len + 1);
|
||||
}
|
||||
else if(c == SPI_CMD_TXBUF)
|
||||
{
|
||||
addr = (p[0] << 0) | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
|
||||
|
111
spinor.c
111
spinor.c
@ -285,40 +285,11 @@ static inline int spinor_info(struct xfel_ctx_t * ctx, struct spinor_pdata_t * p
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void spinor_chip_reset(struct xfel_ctx_t * ctx, struct spinor_pdata_t * pdat)
|
||||
{
|
||||
uint8_t tx[2];
|
||||
|
||||
tx[0] = 0x66;
|
||||
tx[1] = 0x99;
|
||||
fel_spi_xfer(ctx, pdat->swapbuf, pdat->swaplen, tx, 2, 0, 0);
|
||||
}
|
||||
|
||||
static inline void spinor_write_enable(struct xfel_ctx_t * ctx, struct spinor_pdata_t * pdat)
|
||||
{
|
||||
fel_spi_xfer(ctx, pdat->swapbuf, pdat->swaplen, &pdat->info.opcode_write_enable, 1, 0, 0);
|
||||
}
|
||||
|
||||
static inline void spinor_write_status(struct xfel_ctx_t * ctx, struct spinor_pdata_t * pdat, uint8_t s)
|
||||
{
|
||||
uint8_t tx[2];
|
||||
|
||||
tx[0] = OPCODE_WRSR;
|
||||
tx[1] = s;
|
||||
fel_spi_xfer(ctx, pdat->swapbuf, pdat->swaplen, tx, 2, 0, 0);
|
||||
}
|
||||
|
||||
static inline void spinor_address_4byte(struct xfel_ctx_t * ctx, struct spinor_pdata_t * pdat, int enable)
|
||||
{
|
||||
uint8_t tx;
|
||||
|
||||
if(enable)
|
||||
tx = OPCODE_ENTER_4B;
|
||||
else
|
||||
tx = OPCODE_EXIT_4B;
|
||||
fel_spi_xfer(ctx, pdat->swapbuf, pdat->swaplen, &tx, 1, 0, 0);
|
||||
}
|
||||
|
||||
static inline void spinor_wait_for_busy(struct xfel_ctx_t * ctx, struct spinor_pdata_t * pdat)
|
||||
{
|
||||
uint8_t cmdbuf[4];
|
||||
@ -332,19 +303,85 @@ static inline void spinor_wait_for_busy(struct xfel_ctx_t * ctx, struct spinor_p
|
||||
|
||||
static int spinor_helper_init(struct xfel_ctx_t * ctx, struct spinor_pdata_t * pdat)
|
||||
{
|
||||
uint8_t cmdbuf[4096];
|
||||
uint32_t cmdlen = 0;
|
||||
|
||||
if(fel_spi_init(ctx, &pdat->swapbuf, &pdat->swaplen) && spinor_info(ctx, pdat))
|
||||
{
|
||||
spinor_chip_reset(ctx, pdat);
|
||||
spinor_wait_for_busy(ctx, pdat);
|
||||
spinor_write_enable(ctx, pdat);
|
||||
spinor_write_status(ctx, pdat, 0);
|
||||
spinor_wait_for_busy(ctx, pdat);
|
||||
/* spi select */
|
||||
cmdbuf[cmdlen++] = SPI_CMD_SELECT;
|
||||
/* chip reset */
|
||||
cmdbuf[cmdlen++] = SPI_CMD_FAST;
|
||||
cmdbuf[cmdlen++] = 2;
|
||||
cmdbuf[cmdlen++] = 0x66;
|
||||
cmdbuf[cmdlen++] = 0x99;
|
||||
/* spi deselect */
|
||||
cmdbuf[cmdlen++] = SPI_CMD_DESELECT;
|
||||
|
||||
/* spi select */
|
||||
cmdbuf[cmdlen++] = SPI_CMD_SELECT;
|
||||
/* wait busy */
|
||||
cmdbuf[cmdlen++] = SPI_CMD_SPINOR_WAIT;
|
||||
/* spi deselect */
|
||||
cmdbuf[cmdlen++] = SPI_CMD_DESELECT;
|
||||
|
||||
/* spi select */
|
||||
cmdbuf[cmdlen++] = SPI_CMD_SELECT;
|
||||
/* write enable */
|
||||
cmdbuf[cmdlen++] = SPI_CMD_FAST;
|
||||
cmdbuf[cmdlen++] = 1;
|
||||
cmdbuf[cmdlen++] = pdat->info.opcode_write_enable;
|
||||
/* spi deselect */
|
||||
cmdbuf[cmdlen++] = SPI_CMD_DESELECT;
|
||||
|
||||
/* spi select */
|
||||
cmdbuf[cmdlen++] = SPI_CMD_SELECT;
|
||||
/* write status */
|
||||
cmdbuf[cmdlen++] = SPI_CMD_FAST;
|
||||
cmdbuf[cmdlen++] = 2;
|
||||
cmdbuf[cmdlen++] = OPCODE_WRSR;
|
||||
cmdbuf[cmdlen++] = 0;
|
||||
/* spi deselect */
|
||||
cmdbuf[cmdlen++] = SPI_CMD_DESELECT;
|
||||
|
||||
/* spi select */
|
||||
cmdbuf[cmdlen++] = SPI_CMD_SELECT;
|
||||
/* wait busy */
|
||||
cmdbuf[cmdlen++] = SPI_CMD_SPINOR_WAIT;
|
||||
/* spi deselect */
|
||||
cmdbuf[cmdlen++] = SPI_CMD_DESELECT;
|
||||
|
||||
if(pdat->info.address_length == 4)
|
||||
{
|
||||
spinor_write_enable(ctx, pdat);
|
||||
spinor_address_4byte(ctx, pdat, 1);
|
||||
spinor_wait_for_busy(ctx, pdat);
|
||||
/* spi select */
|
||||
cmdbuf[cmdlen++] = SPI_CMD_SELECT;
|
||||
/* write enable */
|
||||
cmdbuf[cmdlen++] = SPI_CMD_FAST;
|
||||
cmdbuf[cmdlen++] = 1;
|
||||
cmdbuf[cmdlen++] = pdat->info.opcode_write_enable;
|
||||
/* spi deselect */
|
||||
cmdbuf[cmdlen++] = SPI_CMD_DESELECT;
|
||||
|
||||
/* spi select */
|
||||
cmdbuf[cmdlen++] = SPI_CMD_SELECT;
|
||||
/* entern 4byte address */
|
||||
cmdbuf[cmdlen++] = SPI_CMD_FAST;
|
||||
cmdbuf[cmdlen++] = 1;
|
||||
cmdbuf[cmdlen++] = OPCODE_ENTER_4B;
|
||||
/* spi deselect */
|
||||
cmdbuf[cmdlen++] = SPI_CMD_DESELECT;
|
||||
|
||||
/* spi select */
|
||||
cmdbuf[cmdlen++] = SPI_CMD_SELECT;
|
||||
/* wait busy */
|
||||
cmdbuf[cmdlen++] = SPI_CMD_SPINOR_WAIT;
|
||||
/* spi deselect */
|
||||
cmdbuf[cmdlen++] = SPI_CMD_DESELECT;
|
||||
}
|
||||
|
||||
/* end */
|
||||
cmdbuf[cmdlen++] = SPI_CMD_END;
|
||||
fel_chip_spi_run(ctx, cmdbuf, cmdlen);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user