boot_prefs shared helper

This commit is contained in:
liquidraver
2026-09-19 20:42:47 +02:00
parent 3055ae9269
commit a5a67e9ea6
5 changed files with 69 additions and 118 deletions
@@ -1,22 +1,20 @@
/*
* ThinkNode M6 formatter overlay — minimal drivers, single LittleFS instance.
* ThinkNode M6 formatter overlay — minimal drivers.
*
* The M6 main DTS includes both filesystem.dtsi (/lfs) and qspi-ext.dtsi
* (/ext), giving two LittleFS instances. Each needs ~8-10KB RAM for block
* caches; two instances overflow the formatter's RAM budget. Drop /ext here
* — the QSPI storage partition node remains so main.c can still erase it via
* FIXED_PARTITION_EXISTS(qspi_storage_partition).
* The M6 board DTS no longer carries the QSPI flash: no shipped unit has the
* chip fitted, so the board dropped &qspi, its partition, the P0.21 enable
* regulator and the qspi-ext.dtsi (/ext) include together (see the note in
* thinknode_m6.dts). There is therefore no /ext LittleFS instance to drop
* and no QSPI enable to hog here; main.c's FIXED_PARTITION_EXISTS() checks
* simply skip the QSPI erase. If the board ever restores QSPI, restore the
* "/delete-node/ &qspi_lfs;" and the P0.21 hog that used to live here.
*
* Also replace regulator-fixed power-enable nodes with gpio-hogs so
* Replace the regulator-fixed power-enable node with a gpio-hog so
* CONFIG_REGULATOR is not forced on by regulator-boot-on.
*/
/* Remove /ext LittleFS fstab — formatter only needs one LittleFS instance */
/delete-node/ &qspi_lfs;
/* Remove regulator-fixed nodes and replace with gpio-hogs */
/* Remove regulator-fixed node and replace with a gpio-hog */
/delete-node/ &pwr_enable;
/delete-node/ &qspi_flash_enable;
&gpio0 {
/* Board power enable (PIN_PWR_EN = P0.27) */
@@ -26,12 +24,4 @@
output-high;
line-name = "PWR Enable";
};
/* QSPI flash enable (QSPI_FLASH_EN = P0.21) — must be HIGH before flash responds */
qspi-flash-en-hog {
gpio-hog;
gpios = <21 GPIO_ACTIVE_HIGH>;
output-high;
line-name = "QSPI Flash Enable";
};
};