-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 Support for Keyhive Variant of Sofle RGB #1233
base: main
Are you sure you want to change the base?
Add Support for Keyhive Variant of Sofle RGB #1233
Conversation
If you referenced the QMK code extensively to implement this, we can't really accept this PR, since the license is GPL there, and this is arguably a "derivative work" at that point. |
See https://zmk.dev/docs/development/clean-room for more details. |
@petejohanson This may require some clarification. I specifically referenced only the file keyhive/qmk_firmware@a388b3e#diff-9134896d5f7bbd3575e3197e4752653dff4a420459009bca10ad94f09e909d57 which is part of a fork of QMK which was not contributed upstream, nor does it have the flowerbox at the top containing a reference to the GPL license. All other code in this PR was developed via examinig the board itself with a multimeter. If this is still an issue, I can contact the original developer and get written permission to re-license those few lines under MIT. |
Thanks for the clarification! It would be good to contact the keyhive developer to double check, since there may still be an assumption about GPL there. |
@petejohanson I have received written confirmation from the original author to re-license the bit of code that I referenced under MIT. Please review and merge if satisfied. |
Sorry, wrong account. Same person, though. Please continue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just want to confirm, this version of the sofle rgb is special to Keyhive? Could you mention how it's different from the normal sofle rgb?
app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.conf
Outdated
Show resolved
Hide resolved
app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.conf
Outdated
Show resolved
Hide resolved
bd66d82
to
b3fae85
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few more items, otherwise it looks good!
app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works well apart from LEDs
app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay
Outdated
Show resolved
Hide resolved
app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay
Outdated
Show resolved
Hide resolved
dd8b60c
to
560e066
Compare
This has been hanging out for over 9 months. Can someone review and/or merge it? |
560e066
to
7425fa5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. The comments I left are regarding copyright years that need updating and the deprecated Kconfig name replacement for central role.
app/boards/shields/sofle_rgb_keyhive/boards/nice_nano_v2.overlay
Outdated
Show resolved
Hide resolved
app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_left.overlay
Outdated
Show resolved
Hide resolved
app/boards/shields/sofle_rgb_keyhive/sofle_rgb_keyhive_right.overlay
Outdated
Show resolved
Hide resolved
Co-authored-by: Nick Winans <nick@winans.codes>
88d0c74
to
524aa6e
Compare
dc6a427
to
9ea1687
Compare
All issues were addressed but it's been so long that the build process has changed. I would like to eventually get this merged but I'll work on fixing the build when I can. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The suggestions I'm proposing here should get the shield compiling again as of d7d9eed, assuming I haven't made any unfortunate typos.
&spi1 { | ||
compatible = "nordic,nrf-spim"; | ||
status = "okay"; | ||
mosi-pin = <6>; | ||
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. | ||
sck-pin = <5>; | ||
miso-pin = <7>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Migration to the pinctrl
subsystem as part of the Zephyr 3.2 upgrade, and the &spi3
bus per #1746.
&spi1 { | |
compatible = "nordic,nrf-spim"; | |
status = "okay"; | |
mosi-pin = <6>; | |
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. | |
sck-pin = <5>; | |
miso-pin = <7>; | |
&pinctrl { | |
spi3_default: spi3_default { | |
group1 { | |
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>; | |
}; | |
}; | |
spi3_sleep: spi3_sleep { | |
group1 { | |
psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>; | |
low-power-enable; | |
}; | |
}; | |
}; | |
&spi3 { | |
compatible = "nordic,nrf-spim"; | |
status = "okay"; | |
pinctrl-0 = <&spi3_default>; | |
pinctrl-1 = <&spi3_sleep>; | |
pinctrl-names = "default", "sleep"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- For consistency, indents on this file should probably be four spaces.
- Please add a duplicate file named
nice_nano.overlay
, so just in case someone builds one of these with a nice!nano v1, the RGB will work just the same.
label = "LEFT_ENCODER"; | ||
a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; | ||
b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; | ||
resolution = <4>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolution = <4>; | |
steps = <80>; |
The change from resolution
to steps
is part of the major encoder refactor that occurred in June 2023.
80
may not be the correct value for your encoder(s)—you will need to test and verify—but you will need to update your shield accordingly for a chance at acceptance.
label = "RIGHT_ENCODER"; | ||
a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; | ||
b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; | ||
resolution = <4>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolution = <4>; | |
steps = <80>; |
|
||
sensors { | ||
compatible = "zmk,keymap-sensors"; | ||
sensors = <&left_encoder &right_encoder>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sensors = <&left_encoder &right_encoder>; | |
sensors = <&left_encoder &right_encoder>; | |
triggers-per-rotation = <20>; |
See previous comment about the June 2023 encoder refactor.
config LVGL_VDB_SIZE | ||
default 64 | ||
|
||
config LVGL_DPI | ||
default 148 | ||
|
||
config LVGL_BITS_PER_PIXEL | ||
default 1 | ||
|
||
choice LVGL_COLOR_DEPTH | ||
default LVGL_COLOR_DEPTH_1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kconfig changes necessitated by the Zephyr 3.2 upgrade.
config LVGL_VDB_SIZE | |
default 64 | |
config LVGL_DPI | |
default 148 | |
config LVGL_BITS_PER_PIXEL | |
default 1 | |
choice LVGL_COLOR_DEPTH | |
default LVGL_COLOR_DEPTH_1 | |
config LV_Z_VDB_SIZE | |
default 64 | |
config LV_Z_DPI | |
default 148 | |
config LV_Z_BITS_PER_PIXEL | |
default 1 | |
choice LV_COLOR_DEPTH | |
default LV_COLOR_DEPTH_1 |
label = "KSCAN"; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
label = "KSCAN"; |
This label has been deprecated.
oled: ssd1306@3c { | ||
compatible = "solomon,ssd1306fb"; | ||
reg = <0x3c>; | ||
label = "DISPLAY"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
label = "DISPLAY"; |
This label has been deprecated.
|
||
led_strip: ws2812@0 { | ||
compatible = "worldsemi,ws2812-spi"; | ||
label = "WS2812"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
label = "WS2812"; |
This label has been deprecated.
Board/Shield Check-list
.zmk.yml
metadata file added&pro_micro
used in favor of&pro_micro_d/a
if applicable.conf
file has optional extra features commented outTested and working (currently typing on it) on my Keyhive variant of the Sofle RGB. Much borrowed from the QMK implementation for this keyboard.