Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add spi flash update #54

Merged
merged 6 commits into from
Aug 25, 2023
Merged

add spi flash update #54

merged 6 commits into from
Aug 25, 2023

Commits on Aug 23, 2023

  1. drivers: spi: add spim driver for npcm4xx internal flash

    add spim driver for npcm4xx internal flash.
    
    CONFIG_XIP means system running code in the spi flash, in this use
    case run code should locate in the RAM(SRAM).
    
    disable regular exceptions interrupt when access internal flash, but
    NMI, faults, or other interrupts that priority higher than BASEPRI
    still have the ability to trigger in this time.
    
    call npcm4xx_vector_table_save/restore() to replace/restore VTOR, so
    CPU could fetch vector table from ram(sram) when interrupt happened.
    
    1. spim driver only support single read/write mode spi flash access.
    2. separate header.c to header file and source code.
    3. when enable CONFIG_XIP, cannot write execution code space.
    4. add sram vector table to replace VTOR when call save/restore API.
    5. rename fiu driver structure naming.
    
    Signed-off-by: cpchiang <[email protected]>
    cpchiang committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    f7ac26e View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2023

  1. drivers: spi: add npcm4xx firmware update when enable CONFIG_XIP

    add npcm4xx firmware update when enable CONFIG_XIP.
    
    1. add below API to support update firmware through running system.
       (1) external API: npcm4xx_set_update_fw_spi_nor_address()
           use for upper layer(like user space) to setting new firmware
           image location and write bitmap.
           SPI_NOR_SECTOR_SIZE per bit for write bitmap.
    
       (2) internal hook API: npcm4xx_spi_nor_set_update_fw_address()
           use for npcm4xx_set_update_fw_spi_nor_address() to call.
    
       (3) internal hook API: npcm4xx_spi_nor_do_fw_update()
           use for firmware update, the API will call when system reboot.
    
    spim driver depend on write bitmap(default update all) to write new
    firmware image to internel flash boot up space.
    
    Signed-off-by: cpchiang <[email protected]>
    cpchiang committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    dcf1798 View commit details
    Browse the repository at this point in the history
  2. drivers: i2c: increase npcm4xx i2c tx/rx dma buffer size

    increase npcm4xx i2c tx/rx dma buffer size.
    
    for ipmb slave, max need 256 bytes.
    
    Signed-off-by: cpchiang <[email protected]>
    cpchiang committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    e11df70 View commit details
    Browse the repository at this point in the history
  3. drivers: i2c: slave: add ipmb slave driver from openbic framework

    add ipmb slave driver from openbic framework.
    
    fix ipmb_slave_read() may received wrong data if buffer not ready.
    
    Signed-off-by: cpchiang <[email protected]>
    cpchiang committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    88666c8 View commit details
    Browse the repository at this point in the history
  4. drivers: spip: add npcm4xx spip driver to support spi flash access

    add npcm4xx spip driver to support spi flash access.
    
    only support single mode read/write spi command.
    
    increase main stack size to 4096 to match openbic reference platform.
    
    Signed-off-by: cpchiang <[email protected]>
    cpchiang committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    c11b26d View commit details
    Browse the repository at this point in the history
  5. arch: arm: rollback code to native framework

    rollback code to native framework.
    
    Signed-off-by: cpchiang <[email protected]>
    cpchiang committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    6fcd2c7 View commit details
    Browse the repository at this point in the history