<div id="editor_version_1.8.2_0Geb3zgM"><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6">Hi Guys;
</div><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6"><br></div><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6">I would like implement the flash  toggle function in ast2600.
</div><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6">That function about ast2400/2500 implement at  <a href="https://github.com/AspeedTech-BMC/linux/blob/aspeed-master-v5.15/drivers/watchdog/aspeed_wdt.c#L172" target="_blank" rel="noopener noreferrer" style="margin-right:2px;text-decoration:none;color:rgb(51,112,255)">linux/aspeed_wdt.c at aspeed-master-v5.15 · AspeedTech-BMC/linux (</a><a href="https://github.com/AspeedTech-BMC/linux/blob/aspeed-master-v5.15/drivers/watchdog/aspeed_wdt.c#L172" target="_blank" rel="noopener noreferrer" style="margin-right:2px;text-decoration:none;color:rgb(51,112,255)">github.com</a><a href="https://github.com/AspeedTech-BMC/linux/blob/aspeed-master-v5.15/drivers/watchdog/aspeed_wdt.c#L172" target="_blank" rel="noopener noreferrer" style="margin-right:2px;text-decoration:none;color:rgb(51,112,255)">)</a>
</div><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6"><br></div><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6">Here is my design, just an idea. I would like to see your suggestions. Thanks.
</div><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6"><br></div><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6">There are some differences between ast2600 and ast2500/2400. For the ast2600 SoC abr function, there is a set of registers named `FMC_WDT2` in FMC(SPI).
</div><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6">FMC_WDT2 is not a full function WDT, thus, I can't use aspeed_wdt driver to do that.
</div><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6"><br></div><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6">In ast2400/2500 used a sysfs attr `access_cs0`, can make cs0->cs1 and cs1->cs0.
</div><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6">For cs0->cs1, ast2400/2500 use the wdt2's self timer, cs1->cs0, use `access_cs0` to set the `flash indicate` bit.
</div><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6">But ast2600 without the FMC_WDT2 timer driver to trigger `cs0`->`cs1`, thus, I would like to add 2 sysfs attrs in spi driver.
</div><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6">Because ast2600 supports single image abr mode, i'd like to use primary/backup instead of cs0/1.
</div><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6"><br></div><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6">attr1 "access_backup": (only appears in primary and compatible is "aspeed,ast2600-fmc")
</div><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6">    store: The parameter is the timeout time for fmc_wdt2, if written, timer will be enabled, if timeout, will reboot from backup.
</div><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6">    show: the time left  in fmc_wdt2 timer. 0 means timer is not enabled.
</div><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6"><br></div><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6">attr2 "access_primary”: (only appears in backup, and compatible is "aspeed,ast2600-fmc")
</div><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6">    store: Non-zero values indicate access to primary, 0 indicate access to backup
</div><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6">    show: 0: next reboot will boot from backup, 1 : will boot from primary.
</div><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6"><br></div><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6"><br></div><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6"><br></div><div style="white-space:pre;white-space:pre-wrap;margin-top:4px;margin-bottom:4px;line-height:1.6"><br></div></div>