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

Migrate WEAR_LEVELING_*_SIZE to info.json #22010

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion keyboards/akko/5108/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion keyboards/akko/5108/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"eeprom": {
"driver": "wear_leveling",
"wear_leveling": {
"driver": "spi_flash"
"driver": "spi_flash",
"backing_size": 8192
}
},
"indicators": {
Expand Down
1 change: 0 additions & 1 deletion keyboards/akko/acr87/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion keyboards/akko/acr87/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"eeprom": {
"driver": "wear_leveling",
"wear_leveling": {
"driver": "spi_flash"
"driver": "spi_flash",
"backing_size": 8192
}
},
"rgb_matrix": {
Expand Down
1 change: 0 additions & 1 deletion keyboards/akko/top40/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion keyboards/akko/top40/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"eeprom": {
"driver": "wear_leveling",
"wear_leveling": {
"driver": "spi_flash"
"driver": "spi_flash",
"backing_size": 8192
}
},
"rgb_matrix": {
Expand Down
4 changes: 0 additions & 4 deletions keyboards/annepro2/c15/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 2 additions & 1 deletion keyboards/annepro2/c15/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"eeprom": {
"driver": "wear_leveling",
"wear_leveling": {
"driver": "spi_flash"
"driver": "spi_flash",
"backing_size": 2048
}
},
"rgb_matrix": {
Expand Down
4 changes: 0 additions & 4 deletions keyboards/annepro2/c18/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 2 additions & 1 deletion keyboards/annepro2/c18/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"eeprom": {
"driver": "wear_leveling",
"wear_leveling": {
"driver": "spi_flash"
"driver": "spi_flash",
"backing_size": 2048
}
},
"rgb_matrix": {
Expand Down
8 changes: 0 additions & 8 deletions keyboards/binepad/bn006/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
5 changes: 5 additions & 0 deletions keyboards/binepad/bn006/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
"pid": "0x426E",
"device_version": "1.0.0"
},
"eeprom": {
"wear_leveling": {
"backing_size": 4096
}
},
"ws2812": {
"pin": "B15"
},
Expand Down
6 changes: 1 addition & 5 deletions keyboards/binepad/bn006/rules.mk
Original file line number Diff line number Diff line change
@@ -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
12 changes: 0 additions & 12 deletions keyboards/binepad/bn009/r2/config.h

This file was deleted.

5 changes: 5 additions & 0 deletions keyboards/binepad/bn009/r2/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 0 additions & 7 deletions keyboards/binepad/bnr1/v2/config.h

This file was deleted.

1 change: 0 additions & 1 deletion keyboards/chosfox/cf81/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion keyboards/chosfox/cf81/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"eeprom": {
"driver": "wear_leveling",
"wear_leveling": {
"driver": "spi_flash"
"driver": "spi_flash",
"backing_size": 8192
}
},
"processor": "WB32FQ95",
Expand Down
3 changes: 2 additions & 1 deletion keyboards/gmmk/gmmk2/p96/ansi/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"eeprom": {
"driver": "wear_leveling",
"wear_leveling": {
"driver": "spi_flash"
"driver": "spi_flash",
"backing_size": 2048
}
},
"processor": "WB32F3G71",
Expand Down
1 change: 0 additions & 1 deletion keyboards/gmmk/gmmk2/p96/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion keyboards/gmmk/gmmk2/p96/iso/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"eeprom": {
"driver": "wear_leveling",
"wear_leveling": {
"driver": "spi_flash"
"driver": "spi_flash",
"backing_size": 2048
}
},
"processor": "WB32F3G71",
Expand Down
1 change: 0 additions & 1 deletion keyboards/gmmk/numpad/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion keyboards/gmmk/numpad/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"eeprom": {
"driver": "wear_leveling",
"wear_leveling": {
"driver": "spi_flash"
"driver": "spi_flash",
"backing_size": 2048
}
},
"encoder": {
Expand Down
3 changes: 2 additions & 1 deletion keyboards/gmmk/pro/rev2/ansi/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"eeprom": {
"driver": "wear_leveling",
"wear_leveling": {
"driver": "spi_flash"
"driver": "spi_flash",
"backing_size": 2048
}
},
"encoder": {
Expand Down
1 change: 0 additions & 1 deletion keyboards/gmmk/pro/rev2/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion keyboards/gmmk/pro/rev2/iso/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"eeprom": {
"driver": "wear_leveling",
"wear_leveling": {
"driver": "spi_flash"
"driver": "spi_flash",
"backing_size": 2048
}
},
"encoder": {
Expand Down
1 change: 0 additions & 1 deletion keyboards/hfdkb/ac001/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion keyboards/hfdkb/ac001/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"eeprom": {
"driver": "wear_leveling",
"wear_leveling": {
"driver": "spi_flash"
"driver": "spi_flash",
"backing_size": 8192
}
},
"ws2812": {
Expand Down
4 changes: 0 additions & 4 deletions keyboards/horrortroll/handwired_k552/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion keyboards/horrortroll/handwired_k552/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"eeprom": {
"driver": "wear_leveling",
"wear_leveling": {
"driver": "spi_flash"
"driver": "spi_flash",
"backing_size": 2048
}
},
"community_layouts": ["tkl_ansi"],
Expand Down
4 changes: 0 additions & 4 deletions keyboards/ibm/model_m/yugo_m/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#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
5 changes: 5 additions & 0 deletions keyboards/ibm/model_m/yugo_m/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion keyboards/inland/kb83/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion keyboards/inland/kb83/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"eeprom": {
"driver": "wear_leveling",
"wear_leveling": {
"driver": "spi_flash"
"driver": "spi_flash",
"backing_size": 8192
}
},
"encoder": {
Expand Down
1 change: 0 additions & 1 deletion keyboards/inland/mk47/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion keyboards/inland/mk47/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"eeprom": {
"driver": "wear_leveling",
"wear_leveling": {
"driver": "spi_flash"
"driver": "spi_flash",
"backing_size": 4096
}
},
"rgb_matrix": {
Expand Down
3 changes: 0 additions & 3 deletions keyboards/mechlovin/hex6c/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once

#define BACKLIGHT_PWM_DRIVER PWMD3

#define WEAR_LEVELING_BACKING_SIZE 4096
#define WEAR_LEVELING_LOGICAL_SIZE 2048
5 changes: 5 additions & 0 deletions keyboards/mechlovin/hex6c/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down
21 changes: 0 additions & 21 deletions keyboards/mode/m75h/config.h

This file was deleted.

5 changes: 5 additions & 0 deletions keyboards/mode/m75h/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Loading