From 00feff656f80d9c9bf57cb1c6ad94ef2f69f1440 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 14 Sep 2023 00:13:19 +0100 Subject: [PATCH] Migrate WEAR_LEVELING_*_SIZE to info.json (#22010) --- keyboards/akko/5108/config.h | 1 - keyboards/akko/5108/info.json | 3 ++- keyboards/akko/acr87/config.h | 1 - keyboards/akko/acr87/info.json | 3 ++- keyboards/akko/top40/config.h | 1 - keyboards/akko/top40/info.json | 3 ++- keyboards/annepro2/c15/config.h | 4 ---- keyboards/annepro2/c15/info.json | 3 ++- keyboards/annepro2/c18/config.h | 4 ---- keyboards/annepro2/c18/info.json | 3 ++- keyboards/binepad/bn006/config.h | 8 ------- keyboards/binepad/bn006/info.json | 5 +++++ keyboards/binepad/bn006/rules.mk | 6 +----- keyboards/binepad/bn009/r2/config.h | 12 ----------- keyboards/binepad/bn009/r2/info.json | 5 +++++ keyboards/binepad/bnr1/v2/config.h | 7 ------- keyboards/chosfox/cf81/config.h | 1 - keyboards/chosfox/cf81/info.json | 3 ++- keyboards/gmmk/gmmk2/p96/ansi/info.json | 3 ++- keyboards/gmmk/gmmk2/p96/config.h | 1 - keyboards/gmmk/gmmk2/p96/iso/info.json | 3 ++- keyboards/gmmk/numpad/config.h | 1 - keyboards/gmmk/numpad/info.json | 3 ++- keyboards/gmmk/pro/rev2/ansi/info.json | 3 ++- keyboards/gmmk/pro/rev2/config.h | 1 - keyboards/gmmk/pro/rev2/iso/info.json | 3 ++- keyboards/hfdkb/ac001/config.h | 1 - keyboards/hfdkb/ac001/info.json | 3 ++- keyboards/horrortroll/handwired_k552/config.h | 4 ---- .../horrortroll/handwired_k552/info.json | 3 ++- keyboards/ibm/model_m/yugo_m/config.h | 4 ---- keyboards/ibm/model_m/yugo_m/info.json | 5 +++++ keyboards/inland/kb83/config.h | 1 - keyboards/inland/kb83/info.json | 3 ++- keyboards/inland/mk47/config.h | 1 - keyboards/inland/mk47/info.json | 3 ++- keyboards/mechlovin/hex6c/config.h | 3 --- keyboards/mechlovin/hex6c/info.json | 5 +++++ keyboards/mode/m75h/config.h | 21 ------------------- keyboards/mode/m75h/info.json | 5 +++++ keyboards/mode/m75s/config.h | 3 --- keyboards/mode/m75s/info.json | 5 +++++ keyboards/monsgeek/m1/config.h | 1 - keyboards/monsgeek/m1/info.json | 3 ++- keyboards/monsgeek/m5/config.h | 1 - keyboards/monsgeek/m5/info.json | 3 ++- keyboards/monsgeek/m6/config.h | 1 - keyboards/monsgeek/m6/info.json | 3 ++- .../projectd/65/projectd_65_ansi/config.h | 1 - .../projectd/65/projectd_65_ansi/info.json | 3 ++- keyboards/rgbkb/mun/config.h | 3 --- keyboards/rgbkb/mun/rev1/info.json | 5 +++++ keyboards/rgbkb/sol3/config.h | 3 --- keyboards/rgbkb/sol3/rev1/info.json | 5 +++++ keyboards/xelus/kangaroo/rev2/config.h | 3 --- keyboards/xelus/kangaroo/rev2/info.json | 5 +++++ keyboards/xelus/rs60/rev2_1/config.h | 3 --- keyboards/xelus/rs60/rev2_1/info.json | 5 +++++ 58 files changed, 89 insertions(+), 120 deletions(-) delete mode 100644 keyboards/binepad/bn009/r2/config.h delete mode 100644 keyboards/binepad/bnr1/v2/config.h delete mode 100644 keyboards/mode/m75h/config.h diff --git a/keyboards/akko/5108/config.h b/keyboards/akko/5108/config.h index 4c04933bcf98523b1f750d972eed70d1028fa68e..790830c88b43ec001a5d3d5979de0d40bd9391b0 100644 --- a/keyboards/akko/5108/config.h +++ b/keyboards/akko/5108/config.h @@ -35,7 +35,6 @@ #define SPI_MOSI_PAL_MODE 5 #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 -#define WEAR_LEVELING_BACKING_SIZE (8 * 1024) /* I2C Config for LED Driver */ #define IS31FL3733_DRIVER_COUNT 2 diff --git a/keyboards/akko/5108/info.json b/keyboards/akko/5108/info.json index 74379db27b83696bdcb28b58a3fa86cb6f91599f..ef3f85a1ec0298e8d117e611ea2065a7ace60eb4 100644 --- a/keyboards/akko/5108/info.json +++ b/keyboards/akko/5108/info.json @@ -29,7 +29,8 @@ "eeprom": { "driver": "wear_leveling", "wear_leveling": { - "driver": "spi_flash" + "driver": "spi_flash", + "backing_size": 8192 } }, "indicators": { diff --git a/keyboards/akko/acr87/config.h b/keyboards/akko/acr87/config.h index 6e4d8dd574313acf30cc4455afe6e3bf3a4b66a2..3f61359074459b9b424e446d5278e6d35e86a491 100644 --- a/keyboards/akko/acr87/config.h +++ b/keyboards/akko/acr87/config.h @@ -32,7 +32,6 @@ #define SPI_MOSI_PAL_MODE 5 #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 -#define WEAR_LEVELING_BACKING_SIZE (8 * 1024) /* I2C Config for LED Driver */ #define IS31FL3733_DRIVER_COUNT 3 diff --git a/keyboards/akko/acr87/info.json b/keyboards/akko/acr87/info.json index 5ce22462d908b7c60a3f45e0628cd76ca53bb935..f9d360282dd3545ab83e8a0ad7b3d1cf6b3f98e6 100644 --- a/keyboards/akko/acr87/info.json +++ b/keyboards/akko/acr87/info.json @@ -29,7 +29,8 @@ "eeprom": { "driver": "wear_leveling", "wear_leveling": { - "driver": "spi_flash" + "driver": "spi_flash", + "backing_size": 8192 } }, "rgb_matrix": { diff --git a/keyboards/akko/top40/config.h b/keyboards/akko/top40/config.h index e8672856ef6a92631bad612e0350c2a4445d7d6f..cc72977c4d607ff9a357091b6ac36b843482f693 100644 --- a/keyboards/akko/top40/config.h +++ b/keyboards/akko/top40/config.h @@ -32,7 +32,6 @@ #define SPI_MOSI_PAL_MODE 5 #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 -#define WEAR_LEVELING_BACKING_SIZE (8 * 1024) /* I2C Config for LED Driver */ #define IS31FL3733_DRIVER_COUNT 2 diff --git a/keyboards/akko/top40/info.json b/keyboards/akko/top40/info.json index e66f79e6c02384dc02da4d28ac3de64366257f6f..3624ee04112e88eb47da922fe67f3bc749521848 100644 --- a/keyboards/akko/top40/info.json +++ b/keyboards/akko/top40/info.json @@ -29,7 +29,8 @@ "eeprom": { "driver": "wear_leveling", "wear_leveling": { - "driver": "spi_flash" + "driver": "spi_flash", + "backing_size": 8192 } }, "rgb_matrix": { diff --git a/keyboards/annepro2/c15/config.h b/keyboards/annepro2/c15/config.h index ea38f4dce3e187b1f17fbc850219dab5fd0bc732..f488b9d8f3886c764f563415152e1a89d781b9e2 100644 --- a/keyboards/annepro2/c15/config.h +++ b/keyboards/annepro2/c15/config.h @@ -57,7 +57,3 @@ #define EXTERNAL_FLASH_SECTOR_SIZE 4096 #define EXTERNAL_FLASH_BLOCK_SIZE 4096 #define EXTERNAL_FLASH_SIZE (256 * 1024) // 2M-bit flash size - -// Wear-leveling driver configuration -#define WEAR_LEVELING_LOGICAL_SIZE 1024 -#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) diff --git a/keyboards/annepro2/c15/info.json b/keyboards/annepro2/c15/info.json index 7138294987d5ea4836e39f71eb99a8b313d483b1..b7624dd6c50f94ca772cdf09fb3a3149fd87cfcc 100644 --- a/keyboards/annepro2/c15/info.json +++ b/keyboards/annepro2/c15/info.json @@ -6,7 +6,8 @@ "eeprom": { "driver": "wear_leveling", "wear_leveling": { - "driver": "spi_flash" + "driver": "spi_flash", + "backing_size": 2048 } }, "rgb_matrix": { diff --git a/keyboards/annepro2/c18/config.h b/keyboards/annepro2/c18/config.h index 6b6307c3d0fc54643d31e0ea195c64e5f2c34d48..36f4a25c8d46c0584cec2b251aaae550ec73d7fd 100644 --- a/keyboards/annepro2/c18/config.h +++ b/keyboards/annepro2/c18/config.h @@ -55,7 +55,3 @@ #define EXTERNAL_FLASH_SECTOR_SIZE 4096 #define EXTERNAL_FLASH_BLOCK_SIZE 4096 #define EXTERNAL_FLASH_SIZE (256 * 1024) // 2M-bit flash size - -// Wear-leveling driver configuration -#define WEAR_LEVELING_LOGICAL_SIZE 1024 -#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) diff --git a/keyboards/annepro2/c18/info.json b/keyboards/annepro2/c18/info.json index 439188b2f7ffd3c557eeb29b12edb88c306f59c9..c8f524e3cfdb1ef97179e645b35470ec5ce333af 100644 --- a/keyboards/annepro2/c18/info.json +++ b/keyboards/annepro2/c18/info.json @@ -6,7 +6,8 @@ "eeprom": { "driver": "wear_leveling", "wear_leveling": { - "driver": "spi_flash" + "driver": "spi_flash", + "backing_size": 2048 } }, "rgb_matrix": { diff --git a/keyboards/binepad/bn006/config.h b/keyboards/binepad/bn006/config.h index 41c3822655c4c8ad016b852eb200fe8113dc3f4c..0569ccff03cf6a8487688326ebad3df75d1f428f 100755 --- a/keyboards/binepad/bn006/config.h +++ b/keyboards/binepad/bn006/config.h @@ -3,14 +3,6 @@ #pragma once -/* - * Wear Leveling EEPROM Emulation - */ - -#define WEAR_LEVELING_LOGICAL_SIZE 2048 // Number of bytes "exposed" to the rest of QMK and denotes the size of the usable EEPROM. -#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) // Number of bytes used by the wear-leveling algorithm for its underlying storage, and needs to be a multiple of the logical size. - - /* * RGB Matrix */ diff --git a/keyboards/binepad/bn006/info.json b/keyboards/binepad/bn006/info.json index 756b82e330a7d217bcb7a465291976c5ab7202f6..81e68d2e0c623970cd2666221cc4cfc27fedff5d 100755 --- a/keyboards/binepad/bn006/info.json +++ b/keyboards/binepad/bn006/info.json @@ -24,6 +24,11 @@ "pid": "0x426E", "device_version": "1.0.0" }, + "eeprom": { + "wear_leveling": { + "backing_size": 4096 + } + }, "ws2812": { "pin": "B15" }, diff --git a/keyboards/binepad/bn006/rules.mk b/keyboards/binepad/bn006/rules.mk index 58561c984b4f690eb1b3e328e07780d73bdb8f42..7ff128fa692e56d91fc10394f3ab2bb3cab68001 100755 --- a/keyboards/binepad/bn006/rules.mk +++ b/keyboards/binepad/bn006/rules.mk @@ -1,5 +1 @@ -# Copyright 2022 Binepad (@binpad) -# SPDX-License-Identifier: GPL-2.0-or-later - -EPROM_DRIVER = wear_leveling -WEAR_LEVELING_DRIVER = embedded_flash +# This file intentionally left blank \ No newline at end of file diff --git a/keyboards/binepad/bn009/r2/config.h b/keyboards/binepad/bn009/r2/config.h deleted file mode 100644 index 45b63ec10528518a6fb9ac7b361f21fda88e2147..0000000000000000000000000000000000000000 --- a/keyboards/binepad/bn009/r2/config.h +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2023 Binepad (@binepad) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - - -/* - * Wear Leveling EEPROM Emulation - */ - -#define WEAR_LEVELING_LOGICAL_SIZE 2048 // Number of bytes "exposed" to the rest of QMK and denotes the size of the usable EEPROM. -#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) // Number of bytes used by the wear-leveling algorithm for its underlying storage, and needs to be a multiple of the logical size. diff --git a/keyboards/binepad/bn009/r2/info.json b/keyboards/binepad/bn009/r2/info.json index c011fe0e32df95ddc27f311b44cec8c6c9ad723a..870608b5c80b08bf3656f55289d753b402842b00 100644 --- a/keyboards/binepad/bn009/r2/info.json +++ b/keyboards/binepad/bn009/r2/info.json @@ -6,6 +6,11 @@ "cols": ["A1", "A2", "A6"], "rows": ["B6", "B7", "B2"] }, + "eeprom": { + "wear_leveling": { + "backing_size": 4096 + } + }, "processor": "STM32F103", "usb": { "device_version": "2.0.0" diff --git a/keyboards/binepad/bnr1/v2/config.h b/keyboards/binepad/bnr1/v2/config.h deleted file mode 100644 index c408f95d383dd9c71c3ac0d3af128b3580668126..0000000000000000000000000000000000000000 --- a/keyboards/binepad/bnr1/v2/config.h +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2022 BINEPAD (@binepad) -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#define WEAR_LEVELING_LOGICAL_SIZE 1024 -#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) diff --git a/keyboards/chosfox/cf81/config.h b/keyboards/chosfox/cf81/config.h index 95b2aca6889451dfb998fc7226d44b6be9c84691..e837c9745bccce98e0b99b910ebf8a550af4c75f 100644 --- a/keyboards/chosfox/cf81/config.h +++ b/keyboards/chosfox/cf81/config.h @@ -32,7 +32,6 @@ #define SPI_MOSI_PAL_MODE 5 #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 -#define WEAR_LEVELING_BACKING_SIZE (8 * 1024) /* I2C Config for LED Driver */ #define IS31FL3733_DRIVER_COUNT 2 diff --git a/keyboards/chosfox/cf81/info.json b/keyboards/chosfox/cf81/info.json index 65134dfedf102ba62b8d1d7577b6bf72842e0ef3..bbfc2deb31f31678c5590e1d65b701382173a2ab 100644 --- a/keyboards/chosfox/cf81/info.json +++ b/keyboards/chosfox/cf81/info.json @@ -12,7 +12,8 @@ "eeprom": { "driver": "wear_leveling", "wear_leveling": { - "driver": "spi_flash" + "driver": "spi_flash", + "backing_size": 8192 } }, "processor": "WB32FQ95", diff --git a/keyboards/gmmk/gmmk2/p96/ansi/info.json b/keyboards/gmmk/gmmk2/p96/ansi/info.json index b80e334e0ae3a82e1f1590a4582408db0124fdd9..e4eaddbfe8e930bb8c7ae99be2ea6120db54deee 100644 --- a/keyboards/gmmk/gmmk2/p96/ansi/info.json +++ b/keyboards/gmmk/gmmk2/p96/ansi/info.json @@ -22,7 +22,8 @@ "eeprom": { "driver": "wear_leveling", "wear_leveling": { - "driver": "spi_flash" + "driver": "spi_flash", + "backing_size": 2048 } }, "processor": "WB32F3G71", diff --git a/keyboards/gmmk/gmmk2/p96/config.h b/keyboards/gmmk/gmmk2/p96/config.h index 4200bae922df32b0587021c01178d121b6385202..9a5a2bf8a40113d5894c9d27eb436d8ae033e18e 100644 --- a/keyboards/gmmk/gmmk2/p96/config.h +++ b/keyboards/gmmk/gmmk2/p96/config.h @@ -25,7 +25,6 @@ /* External spi flash */ #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN B14 -#define WEAR_LEVELING_BACKING_SIZE 2048 /* SPI Config for LED Driver */ #define SPI_DRIVER SPIDQ diff --git a/keyboards/gmmk/gmmk2/p96/iso/info.json b/keyboards/gmmk/gmmk2/p96/iso/info.json index ee59bfd4ff153d5d6dce54e42118fc1ad18a2bf4..42b40231b6c89af7c12d5c4b04888a901bbb4eb2 100644 --- a/keyboards/gmmk/gmmk2/p96/iso/info.json +++ b/keyboards/gmmk/gmmk2/p96/iso/info.json @@ -22,7 +22,8 @@ "eeprom": { "driver": "wear_leveling", "wear_leveling": { - "driver": "spi_flash" + "driver": "spi_flash", + "backing_size": 2048 } }, "processor": "WB32F3G71", diff --git a/keyboards/gmmk/numpad/config.h b/keyboards/gmmk/numpad/config.h index 9096ce1d564a3e6ac5009af1ac7e063a1a89d56c..24a7a24a3fa6945d96c01b00e9502c30ac4979a6 100644 --- a/keyboards/gmmk/numpad/config.h +++ b/keyboards/gmmk/numpad/config.h @@ -37,7 +37,6 @@ #define RGB_MATRIX_LED_COUNT 31 #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN B6 -#define WEAR_LEVELING_BACKING_SIZE 2048 #define ENABLE_RGB_MATRIX_ALPHAS_MODS #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/keyboards/gmmk/numpad/info.json b/keyboards/gmmk/numpad/info.json index 406f22603a47ef05fed71944fadd174aec8771e8..83f7d840dcb637da1e19e270ca44c1e85b6bb1ba 100644 --- a/keyboards/gmmk/numpad/info.json +++ b/keyboards/gmmk/numpad/info.json @@ -11,7 +11,8 @@ "eeprom": { "driver": "wear_leveling", "wear_leveling": { - "driver": "spi_flash" + "driver": "spi_flash", + "backing_size": 2048 } }, "encoder": { diff --git a/keyboards/gmmk/pro/rev2/ansi/info.json b/keyboards/gmmk/pro/rev2/ansi/info.json index 968a1952eed8c7eec865d275c726c75ebce3cc41..cd1fd31bf0056fbc1b90cb34b256a934380d5252 100644 --- a/keyboards/gmmk/pro/rev2/ansi/info.json +++ b/keyboards/gmmk/pro/rev2/ansi/info.json @@ -19,7 +19,8 @@ "eeprom": { "driver": "wear_leveling", "wear_leveling": { - "driver": "spi_flash" + "driver": "spi_flash", + "backing_size": 2048 } }, "encoder": { diff --git a/keyboards/gmmk/pro/rev2/config.h b/keyboards/gmmk/pro/rev2/config.h index fa409ba02661f738674952d76a70f6f8fdf2641e..c393e04e45e39c5eacba910d52deaf120723c15f 100644 --- a/keyboards/gmmk/pro/rev2/config.h +++ b/keyboards/gmmk/pro/rev2/config.h @@ -19,7 +19,6 @@ /* External spi flash */ #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN B12 -#define WEAR_LEVELING_BACKING_SIZE 2048 /* SPI Config for LED Driver */ #define SPI_DRIVER SPIDQ diff --git a/keyboards/gmmk/pro/rev2/iso/info.json b/keyboards/gmmk/pro/rev2/iso/info.json index 54ebc2d2f76fc3caab3d8763e170faf46c0089d7..623335661646b9f02f8d2a0e56b285f1191f0448 100644 --- a/keyboards/gmmk/pro/rev2/iso/info.json +++ b/keyboards/gmmk/pro/rev2/iso/info.json @@ -19,7 +19,8 @@ "eeprom": { "driver": "wear_leveling", "wear_leveling": { - "driver": "spi_flash" + "driver": "spi_flash", + "backing_size": 2048 } }, "encoder": { diff --git a/keyboards/hfdkb/ac001/config.h b/keyboards/hfdkb/ac001/config.h index 6c0c2a2cf61379711f6ab1c08fff9c41737fb735..7d38c7392c01fdc6b1fa2194d6e8c66dfdc0e8fa 100644 --- a/keyboards/hfdkb/ac001/config.h +++ b/keyboards/hfdkb/ac001/config.h @@ -32,7 +32,6 @@ #define SPI_MOSI_PAL_MODE 5 #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 -#define WEAR_LEVELING_BACKING_SIZE (8 * 1024) #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended diff --git a/keyboards/hfdkb/ac001/info.json b/keyboards/hfdkb/ac001/info.json index 36583e2e58f38fe35996768d81272088623daff9..3f896d59881d0bf16f3488eb68e1577c3ba9fcf3 100644 --- a/keyboards/hfdkb/ac001/info.json +++ b/keyboards/hfdkb/ac001/info.json @@ -20,7 +20,8 @@ "eeprom": { "driver": "wear_leveling", "wear_leveling": { - "driver": "spi_flash" + "driver": "spi_flash", + "backing_size": 8192 } }, "ws2812": { diff --git a/keyboards/horrortroll/handwired_k552/config.h b/keyboards/horrortroll/handwired_k552/config.h index bec0ac055b0d6770d6ce16bdba69d09f30453dae..11461a9418d67d5109a51dcc328c57b03db13ff5 100644 --- a/keyboards/horrortroll/handwired_k552/config.h +++ b/keyboards/horrortroll/handwired_k552/config.h @@ -30,10 +30,6 @@ #define EXTERNAL_FLASH_BLOCK_SIZE 4096 #define EXTERNAL_FLASH_SIZE (256 * 1024) // 2M-bit flash size -// Wear-leveling driver configuration -#define WEAR_LEVELING_LOGICAL_SIZE 1024 -#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) - #ifdef OLED_ENABLE /* Mapping I2C2 for OLED */ #define I2C1_SCL_PIN B10 diff --git a/keyboards/horrortroll/handwired_k552/info.json b/keyboards/horrortroll/handwired_k552/info.json index 2c97ce1306c2df0fdf44b21368a3b001a5b82b5d..b064df38c2d397796830be5c9c067ffae1c4e1bc 100644 --- a/keyboards/horrortroll/handwired_k552/info.json +++ b/keyboards/horrortroll/handwired_k552/info.json @@ -23,7 +23,8 @@ "eeprom": { "driver": "wear_leveling", "wear_leveling": { - "driver": "spi_flash" + "driver": "spi_flash", + "backing_size": 2048 } }, "community_layouts": ["tkl_ansi"], diff --git a/keyboards/ibm/model_m/yugo_m/config.h b/keyboards/ibm/model_m/yugo_m/config.h index 2b7fc4d15756c79a51e6180789a3635c933f133c..0e6881ded3a295f687a220beda2efb31432ab360 100644 --- a/keyboards/ibm/model_m/yugo_m/config.h +++ b/keyboards/ibm/model_m/yugo_m/config.h @@ -36,7 +36,3 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT - -/* redefine available (emulated) EEPROM as 4 kB rather than the default 2 kB to let VIA use more of the on-chip Flash of the STM32F303 to store 4 layers (since 4 layers * 8 rows * 16 columns * 2 = 1024 bytes but the default max available is 1023 bytes due to ATMEGA32U4 etc. only having 1 kB of EEPROM) */ -#define WEAR_LEVELING_BACKING_SIZE 4096 -#define WEAR_LEVELING_LOGICAL_SIZE 2048 diff --git a/keyboards/ibm/model_m/yugo_m/info.json b/keyboards/ibm/model_m/yugo_m/info.json index 6e3a0b39c61a522c516af341c50bea402fc2b014..f4d9cc1d944c3858063196e76463b4de7c058710 100644 --- a/keyboards/ibm/model_m/yugo_m/info.json +++ b/keyboards/ibm/model_m/yugo_m/info.json @@ -13,6 +13,11 @@ "rows": ["B8", "B7", "B6", "B5", "B4", "B3", "A15", "A14"] }, "diode_direction": "ROW2COL", + "eeprom": { + "wear_leveling": { + "backing_size": 4096 + } + }, "processor": "STM32F303", "bootloader": "stm32-dfu", "board": "QMK_PROTON_C", diff --git a/keyboards/inland/kb83/config.h b/keyboards/inland/kb83/config.h index e1b6702bd8e0cf4641282c826be1af2e5ffbc410..ed1f3cf160ba2364f45cedfc94d833b1678d784d 100644 --- a/keyboards/inland/kb83/config.h +++ b/keyboards/inland/kb83/config.h @@ -36,7 +36,6 @@ #define SPI_MOSI_PAL_MODE 5 #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 -#define WEAR_LEVELING_BACKING_SIZE (8 * 1024) /* I2C Config for LED Driver */ #define IS31FL3733_DRIVER_COUNT 2 diff --git a/keyboards/inland/kb83/info.json b/keyboards/inland/kb83/info.json index 33545515ad2e0aac73732accf5a6fb8038e83da1..cd538ef4ee6cb524d352c414cf1eac5d64949847 100644 --- a/keyboards/inland/kb83/info.json +++ b/keyboards/inland/kb83/info.json @@ -21,7 +21,8 @@ "eeprom": { "driver": "wear_leveling", "wear_leveling": { - "driver": "spi_flash" + "driver": "spi_flash", + "backing_size": 8192 } }, "encoder": { diff --git a/keyboards/inland/mk47/config.h b/keyboards/inland/mk47/config.h index 7004b38e6323643b4657ae9bf66c91a771c489f6..db9aea328f05ca17f327969e7c31df0573a20ff2 100644 --- a/keyboards/inland/mk47/config.h +++ b/keyboards/inland/mk47/config.h @@ -23,7 +23,6 @@ #define SPI_MISO_PIN B4 #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 -#define WEAR_LEVELING_BACKING_SIZE (4 * 1024) /* I2C Config for LED Driver */ #define IS31FL3733_DRIVER_COUNT 1 diff --git a/keyboards/inland/mk47/info.json b/keyboards/inland/mk47/info.json index 2ed18eac3b551b62696fb7d67d27a7209c33304f..7d94365724bc73f49e182bc8530d67118ce96624 100644 --- a/keyboards/inland/mk47/info.json +++ b/keyboards/inland/mk47/info.json @@ -29,7 +29,8 @@ "eeprom": { "driver": "wear_leveling", "wear_leveling": { - "driver": "spi_flash" + "driver": "spi_flash", + "backing_size": 4096 } }, "rgb_matrix": { diff --git a/keyboards/mechlovin/hex6c/config.h b/keyboards/mechlovin/hex6c/config.h index 4cfcaebcdef30d36b0c32aa99cfff54895f6e679..e74e7939c4aad564817fbb210f638bb0cbed08a3 100644 --- a/keyboards/mechlovin/hex6c/config.h +++ b/keyboards/mechlovin/hex6c/config.h @@ -18,6 +18,3 @@ along with this program. If not, see . #pragma once #define BACKLIGHT_PWM_DRIVER PWMD3 - -#define WEAR_LEVELING_BACKING_SIZE 4096 -#define WEAR_LEVELING_LOGICAL_SIZE 2048 diff --git a/keyboards/mechlovin/hex6c/info.json b/keyboards/mechlovin/hex6c/info.json index dfeb91e0bac658dbcaf04f6ab95ab3b554fc80d5..483566e7f48a2adcd764deaaf03a04bc1d54c074 100644 --- a/keyboards/mechlovin/hex6c/info.json +++ b/keyboards/mechlovin/hex6c/info.json @@ -13,6 +13,11 @@ "rows": ["A10", "B13", "B12", "B11", "C14", "C15"] }, "diode_direction": "COL2ROW", + "eeprom": { + "wear_leveling": { + "backing_size": 4096 + } + }, "encoder": { "rotary": [ {"pin_a": "A15", "pin_b": "A2"} diff --git a/keyboards/mode/m75h/config.h b/keyboards/mode/m75h/config.h deleted file mode 100644 index c6d7d037ec84f4e208d98ff336d856d57ac4779f..0000000000000000000000000000000000000000 --- a/keyboards/mode/m75h/config.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - Copyright 2020 Álvaro "Gondolindrim" Volpato - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -#define WEAR_LEVELING_LOGICAL_SIZE 2048 -#define WEAR_LEVELING_BACKING_SIZE 4096 diff --git a/keyboards/mode/m75h/info.json b/keyboards/mode/m75h/info.json index f57aac383efe5efc317c0766157e662f96d36116..8314dbf99d3dc9c6735fd0d38fe02df7d6ef3c84 100644 --- a/keyboards/mode/m75h/info.json +++ b/keyboards/mode/m75h/info.json @@ -13,6 +13,11 @@ "rows": ["C5", "B0", "B14", "B15", "A8", "C9", "A15"] }, "diode_direction": "COL2ROW", + "eeprom": { + "wear_leveling": { + "backing_size": 4096 + } + }, "processor": "STM32F401", "bootloader": "stm32-dfu", "layout_aliases": { diff --git a/keyboards/mode/m75s/config.h b/keyboards/mode/m75s/config.h index 7fdb18d26ab9515656434601d235d170f7addefc..4d3a7d5ca4c16abd0d17971e1962cd1dde2ccfa1 100644 --- a/keyboards/mode/m75s/config.h +++ b/keyboards/mode/m75s/config.h @@ -20,6 +20,3 @@ along with this program. If not, see . #define BACKLIGHT_DEFAULT_LEVEL 20 #define BACKLIGHT_PWM_DRIVER PWMD3 #define BACKLIGHT_PWM_CHANNEL 1 - -#define WEAR_LEVELING_LOGICAL_SIZE 2048 -#define WEAR_LEVELING_BACKING_SIZE 4096 diff --git a/keyboards/mode/m75s/info.json b/keyboards/mode/m75s/info.json index bf60aebd56c23d84f1faf9ddad2073cd05b9a6e2..df4d1ab451e2db4b2f1fd04eb9c47a0fecc200cf 100644 --- a/keyboards/mode/m75s/info.json +++ b/keyboards/mode/m75s/info.json @@ -13,6 +13,11 @@ "rows": ["C5", "B0", "B14", "B15", "C7", "C9", "A15"] }, "diode_direction": "COL2ROW", + "eeprom": { + "wear_leveling": { + "backing_size": 4096 + } + }, "backlight": { "pin": "C6", "levels": 20, diff --git a/keyboards/monsgeek/m1/config.h b/keyboards/monsgeek/m1/config.h index f5466ab09bc834534df41518bf3bdec9c5f6a9d3..162001fca63d8822e1ed1fbc049957ecef4fa5ac 100644 --- a/keyboards/monsgeek/m1/config.h +++ b/keyboards/monsgeek/m1/config.h @@ -34,7 +34,6 @@ #define SPI_MOSI_PAL_MODE 5 #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 -#define WEAR_LEVELING_BACKING_SIZE (8 * 1024) /* I2C Config for LED Driver */ #define IS31FL3733_DRIVER_COUNT 2 diff --git a/keyboards/monsgeek/m1/info.json b/keyboards/monsgeek/m1/info.json index fe979b7c31458fd2b3e13663e44994cf0a6c71f8..a008b221952b667b2008750313fb6d27dc63c4cd 100644 --- a/keyboards/monsgeek/m1/info.json +++ b/keyboards/monsgeek/m1/info.json @@ -29,7 +29,8 @@ "eeprom": { "driver": "wear_leveling", "wear_leveling": { - "driver": "spi_flash" + "driver": "spi_flash", + "backing_size": 8192 } }, "encoder": { diff --git a/keyboards/monsgeek/m5/config.h b/keyboards/monsgeek/m5/config.h index db65cef76039082fcb4e23756e242259842774d0..a92c4975ebd9581ba76c85ab07102b10863e9011 100644 --- a/keyboards/monsgeek/m5/config.h +++ b/keyboards/monsgeek/m5/config.h @@ -35,7 +35,6 @@ #define SPI_MOSI_PAL_MODE 5 #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 -#define WEAR_LEVELING_BACKING_SIZE (8 * 1024) /* I2C Config for LED Driver */ #define IS31FL3733_DRIVER_COUNT 2 diff --git a/keyboards/monsgeek/m5/info.json b/keyboards/monsgeek/m5/info.json index ecc6b309ae2582c1957bf8aeda9e96339b0bd9db..1e9ec8618af7558acac8d3373d5c3760bd7ca940 100644 --- a/keyboards/monsgeek/m5/info.json +++ b/keyboards/monsgeek/m5/info.json @@ -28,7 +28,8 @@ "eeprom": { "driver": "wear_leveling", "wear_leveling": { - "driver": "spi_flash" + "driver": "spi_flash", + "backing_size": 8192 } }, "indicators": { diff --git a/keyboards/monsgeek/m6/config.h b/keyboards/monsgeek/m6/config.h index abed72f54e2068a447b5ab4f681d3fa7f15bf66b..c6f7d55e9ddcb1380a1cdb7b444afb8c38e0a4df 100644 --- a/keyboards/monsgeek/m6/config.h +++ b/keyboards/monsgeek/m6/config.h @@ -32,7 +32,6 @@ #define SPI_MOSI_PAL_MODE 5 #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12 -#define WEAR_LEVELING_BACKING_SIZE (8 * 1024) /* I2C Config for LED Driver */ #define IS31FL3733_DRIVER_COUNT 2 diff --git a/keyboards/monsgeek/m6/info.json b/keyboards/monsgeek/m6/info.json index 2aa297570caad384d2505201957616700a57c006..7751ef13d6899f1d3f9650321619728e2210c1d4 100644 --- a/keyboards/monsgeek/m6/info.json +++ b/keyboards/monsgeek/m6/info.json @@ -28,7 +28,8 @@ "eeprom": { "driver": "wear_leveling", "wear_leveling": { - "driver": "spi_flash" + "driver": "spi_flash", + "backing_size": 8192 } }, "rgb_matrix": { diff --git a/keyboards/projectd/65/projectd_65_ansi/config.h b/keyboards/projectd/65/projectd_65_ansi/config.h index 64e4595e1b22648109a86bc0197cf3e5a4ad6683..4d1dc100d89ae4b53900722564dea2e265423ddd 100644 --- a/keyboards/projectd/65/projectd_65_ansi/config.h +++ b/keyboards/projectd/65/projectd_65_ansi/config.h @@ -25,7 +25,6 @@ /* External spi flash */ #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN B14 -#define WEAR_LEVELING_BACKING_SIZE (4 * 1024) /* SPI Config for LED Driver */ #define SPI_DRIVER SPIDQ diff --git a/keyboards/projectd/65/projectd_65_ansi/info.json b/keyboards/projectd/65/projectd_65_ansi/info.json index c385f00ed12aa7608e6809df19bf831b5d0447ae..861e3792db2d81f7d8f05b8a329993bbee83c66f 100644 --- a/keyboards/projectd/65/projectd_65_ansi/info.json +++ b/keyboards/projectd/65/projectd_65_ansi/info.json @@ -13,7 +13,8 @@ "eeprom": { "driver": "wear_leveling", "wear_leveling": { - "driver": "spi_flash" + "driver": "spi_flash", + "backing_size": 4096 } }, "features": { diff --git a/keyboards/rgbkb/mun/config.h b/keyboards/rgbkb/mun/config.h index fd2e366614ca0efd96bec2ff0136e9cab31ef883..baf495b534b1272f0fbc5f939a94f8266a7ba65d 100644 --- a/keyboards/rgbkb/mun/config.h +++ b/keyboards/rgbkb/mun/config.h @@ -119,6 +119,3 @@ #define TOUCH_UPDATE_INTERVAL 33 #define OLED_UPDATE_INTERVAL 33 - -#define WEAR_LEVELING_BACKING_SIZE 4096 -#define WEAR_LEVELING_LOGICAL_SIZE 2048 diff --git a/keyboards/rgbkb/mun/rev1/info.json b/keyboards/rgbkb/mun/rev1/info.json index 5d380de5c74607dbc11fd991d5e642d4495c2bd8..91b60e76c3803adb8c0175f95958ed970f8416e7 100644 --- a/keyboards/rgbkb/mun/rev1/info.json +++ b/keyboards/rgbkb/mun/rev1/info.json @@ -37,6 +37,11 @@ "io_delay": 5 }, "diode_direction": "COL2ROW", + "eeprom": { + "wear_leveling": { + "backing_size": 4096 + } + }, "encoder": { "rotary": [ {"pin_a": "B8", "pin_b": "A14"}, diff --git a/keyboards/rgbkb/sol3/config.h b/keyboards/rgbkb/sol3/config.h index 3a0b61bfd54ffea85c3d3de4e95ac4f992570c6f..575e5bcd950556c8a6220756ae848780a5b5bebc 100644 --- a/keyboards/rgbkb/sol3/config.h +++ b/keyboards/rgbkb/sol3/config.h @@ -125,6 +125,3 @@ #define AUDIO_CLICKY #define AUDIO_DAC_SAMPLE_WAVEFORM_SQUARE #define AUDIO_DAC_OFF_VALUE 0 - -#define WEAR_LEVELING_BACKING_SIZE 4096 -#define WEAR_LEVELING_LOGICAL_SIZE 2048 diff --git a/keyboards/rgbkb/sol3/rev1/info.json b/keyboards/rgbkb/sol3/rev1/info.json index b80161995f05ef96122c70199778693e40144d86..7d3db933a87877f55c44129742e2d1b3ff9bfb61 100644 --- a/keyboards/rgbkb/sol3/rev1/info.json +++ b/keyboards/rgbkb/sol3/rev1/info.json @@ -37,6 +37,11 @@ "io_delay": 5 }, "diode_direction": "COL2ROW", + "eeprom": { + "wear_leveling": { + "backing_size": 4096 + } + }, "encoder": { "rotary": [ {"pin_a": "A1", "pin_b": "A2"}, diff --git a/keyboards/xelus/kangaroo/rev2/config.h b/keyboards/xelus/kangaroo/rev2/config.h index 790db9b30ac5704a9aa0d9a48bec69e04e29777d..dfe8035b10c5fc21bf1f81e90125813eea3e640f 100644 --- a/keyboards/xelus/kangaroo/rev2/config.h +++ b/keyboards/xelus/kangaroo/rev2/config.h @@ -20,6 +20,3 @@ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -#define WEAR_LEVELING_LOGICAL_SIZE 2048 -#define WEAR_LEVELING_BACKING_SIZE WEAR_LEVELING_LOGICAL_SIZE*2 diff --git a/keyboards/xelus/kangaroo/rev2/info.json b/keyboards/xelus/kangaroo/rev2/info.json index 196f11860b15bf54feb8061ebe7e413cde6ee474..9e639df034edb4c90f8220c6bb7c544dc0c44a0c 100644 --- a/keyboards/xelus/kangaroo/rev2/info.json +++ b/keyboards/xelus/kangaroo/rev2/info.json @@ -8,6 +8,11 @@ "rows": ["A9", "A8", "B15", "B14", "B13", "B12", "A4", "A5", "A6", "A7", "B0", "B1"] }, "diode_direction": "COL2ROW", + "eeprom": { + "wear_leveling": { + "backing_size": 4096 + } + }, "processor": "STM32L412", "bootloader": "stm32-dfu" } diff --git a/keyboards/xelus/rs60/rev2_1/config.h b/keyboards/xelus/rs60/rev2_1/config.h index 1c5fe4a33629c04fb45f72aac0799ade4c59a1cd..430a5a47f7f1f9deccf00592ec5b3663035e865c 100644 --- a/keyboards/xelus/rs60/rev2_1/config.h +++ b/keyboards/xelus/rs60/rev2_1/config.h @@ -21,6 +21,3 @@ // Locking resynchronize hack #define LOCKING_RESYNC_ENABLE -// Emulated EEPROM -#define WEAR_LEVELING_LOGICAL_SIZE 2048 -#define WEAR_LEVELING_BACKING_SIZE WEAR_LEVELING_LOGICAL_SIZE*2 diff --git a/keyboards/xelus/rs60/rev2_1/info.json b/keyboards/xelus/rs60/rev2_1/info.json index 118a671547c8f4c925ed692c7ec18b664dfb077f..fe87561e61ce22c5e4bd581afad2270f62c56739 100644 --- a/keyboards/xelus/rs60/rev2_1/info.json +++ b/keyboards/xelus/rs60/rev2_1/info.json @@ -8,6 +8,11 @@ "rows": ["B15", "B14", "B12", "B1", "B0"] }, "diode_direction": "COL2ROW", + "eeprom": { + "wear_leveling": { + "backing_size": 4096 + } + }, "indicators": { "caps_lock": "A1", "on_state": 0