Commit Graph
73 Commits
Author SHA1 Message Date
CTCaer 64a5d48ab5 touch: increase max allowed touched area 2026-03-27 20:42:31 +01:00
CTCaer f975364a8e bdk: touch: add clone support
From LCD on OLED sku.
2026-03-27 20:42:31 +01:00
CTCaer 10fceea4be bdk: touch: homogenize return values 2026-03-27 20:16:31 +01:00
CTCaer f26e9f0504 bdk: i2c: homogenize return values 2026-03-27 20:16:31 +01:00
CTCaer 1319984285 bdk: touch: check event count for wait event
And increase checks during autotune execution.
2026-03-27 20:08:45 +01:00
CTCaer 8881faa91b bdk: touch: simplify input reporting
Additionally, touch polling now returns 1 for no event result.
2026-03-27 20:08:45 +01:00
CTCaer 0e64b9384f bdk: touch: switch to custom chip info cmd
And also check if chip id is correct on init.
2026-03-27 20:08:45 +01:00
CTCaer e3fba92e00 bdk: touch: use packet i2c for all transfers
The repeating byte doesn't exist in i2c packet mode.
Additionally, adjust split transfers to one.
2026-03-27 20:08:45 +01:00
CTCaer 2a7e148011 bdk: touch: refactor
And also use packet mode for big tx/rx combo i2c trasnfers.
2026-03-27 20:08:45 +01:00
CTCaer e2ff75291b bdk: touch: refactor/improve
- Remove useless poll wait
- Use more defines
- Deduplicate code
- Add more checks
- Add switch sense mode
2026-03-27 20:08:45 +01:00
CTCaer b86701823c bdk: pinmux: always detach I2C4 pins from I2C3 pm
Generally I2C3 communication can work via I2C3 or I2C4 pins.
Defaults are fine as long as one of the pin groups are floating or grounded or
both share I2C traces.

In NX boards I2C4 SDA is used for GC and connected to 1V8.
So if a GC is slotted, I2C3 works, if not, no communication is possible.

This config was done previously inside I2C3 consumer driver (touchscreen).
Now it's moved inside pinmux_config_i2c.
2026-03-27 19:36:58 +01:00
CTCaer 315457651c bdk: joycon: make init stricter but relax timings
Additionally, if both Joy-Con are found, try to send rumble simultaneously.
2026-03-27 10:02:21 +01:00
CTCaer 8c8ca53ab7 bdk: joycon: more refactoring 2026-03-27 10:00:26 +01:00
CTCaer e6a3c80f4d bdk: joycon: generalize _jc_packet_add_uart_hdr
Correct its header construction in case it's used in the future.
Plus some unhardcoding of lengths.
2026-03-27 10:00:26 +01:00
CTCaer 2a0617dbf6 bdk: joycon: increase connection timeout to 1.8s 2026-03-27 10:00:26 +01:00
CTCaer 690beb0de7 bdk: joycon: refactor some fields
And add better comments.
2026-03-27 10:00:26 +01:00
CTCaer 6bcc2e082f bdk: joycon: use packed structs and bitfields 2026-03-27 10:00:26 +01:00
CTCaer c605e924ed bdk: joycon: correct crc8 offsets
By luck the current offset and length of the calculation always worked.
Correct it though because the function might be used fully in the future.
2026-03-27 10:00:26 +01:00
CTCaer d252dd7e52 bdk: joycon: maintain consistent naming styles 2026-03-27 10:00:26 +01:00
CTCaer c200ef3f4a bdk: joycon: optimize rumble enable 2026-03-27 10:00:26 +01:00
CTCaer 19279fa57d bdk: joycon: improve charger config
Utilize charger config set command which allows for supplement mode.
Additionally, remove ping config when SIO and parse buttons/sticks on subcmd reports.
2026-03-27 09:58:48 +01:00
CTCaer 380c1dc9b2 bdk: refactor several comments and defines 2026-03-27 09:05:58 +01:00
CTCaer d5d0f79c38 bdk: als: no need to check above 255 with u8 2025-05-13 16:27:04 +02:00
CTCaer b1bc6ebdd8 bdk: joycon: utilize packet id per joycon
Also fix a possible infinite loop
2024-10-04 21:39:35 +03:00
CTCaer 9d79af231e bdk: use static where it should 2024-06-02 07:09:34 +03:00
CTCaer 7a74761da9 bdk: bpmp: add and use bpmp_clk_rate_relaxed 2024-06-02 06:51:06 +03:00
CTCaer 93296c2c38 bdk: joycon: add packet size checks
Pass the real received data size and do the proper checks for minimum info.
2024-05-19 17:42:10 +03:00
CTCaer 7af343dd6c bdk: input: make joycon detection more robust
There's a hw bug on the gpio controller that can latch the last value on reads.
Mitigate that by reading once to unlatch the input value.

Also actually allow sio to be polled every 8ms.
2024-05-19 10:19:25 +03:00
CTCaer 28960728f9 bdk: joycon: add bit numbers on the button struct 2024-04-25 04:46:27 +03:00
CTCaer 902ccede9a bdk: joycon: use proper bits for batt levels 2024-04-25 04:45:50 +03:00
CTCaer eff55ff378 bdk: touch: rename samsung touch panel
BH2109 is the board model and not the touch panel.
2023-12-25 02:41:42 +02:00
CTCaer ce137852b7 bdk: change some defines and comments 2023-10-12 06:59:15 +03:00
CTCaer fdf0dcc636 bdk: joycon: add info about sio imu report 2023-08-22 14:36:23 +03:00
CTCaer d7ad9b874b bdk: use the typedefs on jc calib 2023-06-11 13:27:48 +03:00
CTCaer bc0eea11f3 bdk: joycon: add calibration struct 2023-06-08 02:44:35 +03:00
CTCaer 50811aacfa bdk: touch: reorder power on
So touch IC reset can be properly done on a fast power cycle.
2023-03-31 09:08:20 +03:00
CTCaer 9a98c1afb9 bdk: stylistic corrections
And update copyrights
2023-02-11 23:46:38 +02:00
CTCaer 5bb9a244ea bdk: utilize new gpio functions 2023-02-11 23:08:32 +02:00
CTCaer ff5ee9758d bdk: joycon: refactor some structs and comments 2022-10-11 03:49:18 +03:00
CTCaer 70523e404f bdk: whitespace refactor 2022-07-11 22:10:11 +03:00
CTCaer b787053c2d bdk: joycon: fixup hori pads
For Hori game pads:
- Restore the no power down fix
- Revert RTS signal back to active high
2022-07-01 13:47:41 +03:00
CTCaer b0c0a86108 bdk: migrate timers/sleeps to timer driver 2022-06-27 10:22:19 +03:00
CTCaer 9e613a7600 bdk: hwinit: simplify uart debug port paths 2022-05-13 03:56:59 +03:00
CTCaer f31170bb51 bdk: joycon: add Sio support (for Hoag) 2022-05-09 06:09:06 +03:00
CTCaer 47d06d0e8a bdk: joycon: use flow control to improve packet integrity 2022-05-09 05:55:06 +03:00
CTCaer 2aed1b3b83 bdk: joycon: add 3 mbaud support and full init
Additionally use states for proper init
2022-05-09 05:48:10 +03:00
CTCaer 833a115eb2 bdk: joycon: improve and streamline jc detect 2022-05-09 05:39:45 +03:00
CTCaer 9f30c51bd1 bdk: joycon: refactor driver 2022-05-09 05:32:32 +03:00
CTCaer f7bf4af3ec bdk: uart: refactor and add new functionality
- Allow to set CTS/RTS mode (only specific combos supported for now)
- Support the above modes in receiving
- Set 2 stop bits to decreases errors on high baudrates
2022-05-08 05:45:16 +03:00
CTCaer 70504c295e bdk: various functionality independent changes 2022-01-16 01:03:24 +02:00