ce4fc78b16
fix on keyboard locked-keys
2022-06-04 00:03:58 +02:00
Ondrej Jirman
91163251e6
Don't exit the debugger on I2C communication errors, just report them
2022-02-02 10:45:17 +01:00
Ondrej Jirman
5e365d71d1
Improve inputd error reprting
2022-02-02 08:53:05 +01:00
Ondrej Jirman
d585c744e3
Remove selftest
2022-02-02 08:39:54 +01:00
Ondrej Jirman
4a65f41988
Don't do probing at startup
2022-02-02 08:39:11 +01:00
Ondrej Jirman
6bc1736857
Inputd improvements
...
- retry reading kb data after interrupt if the first read fails
- poll for data when the key is pressed to detect missed interrupts
- report issues
2022-02-02 08:38:48 +01:00
Ondrej Jirman
2da55b7d62
Build only the tools by default
2022-02-02 08:36:18 +01:00
Ondrej Jirman
024d52263e
Fix charger status reporting (VIN overvoltage/low load bits were swapped)
2022-01-19 03:32:34 +01:00
Ondrej Jirman
013149dc89
Disable the self-test binary build (it doesn't work anyway)
2022-01-18 02:07:26 +01:00
Ondrej Jirman
f681795424
ENOENT means the i2c userspace device driver is missing
2022-01-17 16:08:27 +01:00
Ondrej Jirman
75b7cdaed2
Add some helpful messages
2022-01-17 16:06:01 +01:00
Ondrej Jirman
13bf8c43ca
Update TODO
2022-01-16 17:00:46 +01:00
Ondrej Jirman
3ade80f425
Add support for Pinephone Pro
2022-01-16 17:00:03 +01:00
Ondrej Jirman
af4009e3bf
Make kmap.h build more resilient
...
Building with missing php resulted in empty kmap.h
2022-01-15 23:53:04 +01:00
Ondrej Jirman
a1978d22ed
i2c-charger-ctl doesn't need the INT gpio access, remove it
2022-01-12 13:45:13 +01:00
Ondrej Jirman
a4ca2223e1
Compile with -Wall and fix issues this revealed
2022-01-12 13:37:48 +01:00
Ondrej Jirman
457e5658d9
Add missing argument to error reporting functions
2022-01-12 13:37:12 +01:00
Ondrej Jirman
7830c7986f
Fix writing charger registers (result detection was broken)
2022-01-12 13:36:47 +01:00
Ondrej Jirman
31c41b7d9e
Drop I2C bit functions, to make timing easier to modify
...
I2C to the charger now has clean 100kHz timing. One read command now takes
400us, and one write command takes 300us to execute.
2021-09-05 02:26:55 +02:00
Ondrej Jirman
78c72fe448
Make register define order less confusing
2021-09-05 02:07:12 +02:00
Ondrej Jirman
a049cd5107
Make charger tool read/write data from charger via MCU I2C proxy commands
2021-09-05 02:06:57 +02:00
Ondrej Jirman
21374993b3
Allow to reset to stock firmware from user firmware by holding pine+f+h
2021-09-05 01:58:48 +02:00
Ondrej Jirman
0b280ebc14
Fix I2C bit banging code
2021-09-05 01:57:58 +02:00
Ondrej Jirman
bf0c0e9c97
Make i2c flasger reset the app block flag
2021-09-05 01:53:42 +02:00
Ondrej Jirman
574d68aa89
fw: Change to bit-banging I2C implementation for charger comm
...
New code, compiles, but it's not tested yet!
2021-09-01 00:48:27 +02:00
Ondrej Jirman
4a1abce0eb
Update inputd to make it work with the latest firmware API
2021-08-31 19:01:43 +02:00
Ondrej Jirman
62e2ebe7ec
Fix keymap generator, drop prototype keymap
2021-08-31 19:00:49 +02:00
Ondrej Jirman
f1e3f6dce6
Drop prototype keyboard build
2021-08-31 19:00:18 +02:00
Ondrej Jirman
3c02d41c4b
Add final PCB photos/schematics
2021-08-31 15:09:21 +02:00
Ondrej Jirman
fa19294d05
Dump option ROM when reading flash over USB
2021-08-31 14:29:50 +02:00
Ondrej Jirman
0e4f426dfb
Add bin2pgd tool
...
This is used by the vendor's flashing tool. It's ROM image + option
ROM image appended (256 bytes).
Option ROM contains some flags and configuration data for the MCU.
Things like oscillator configuration, HW reset pin enable, data EEPROM
enable, etc.
2021-08-31 14:29:21 +02:00
Samuel Holland
246aaaa42e
firmware: Statically allocate keys array
...
Allocating the array on the stack before initializing the stack pointer
does not work.
2021-08-05 21:17:09 -05:00
Samuel Holland
3c6488b99e
Disable I2CA in all firmware builds
...
It is unlikely that any future revision of the hardware will use I2CA.
2021-08-05 21:17:09 -05:00
Samuel Holland
3107546c04
Revert "firmware: Make interrupt signal shorter (10us)"
...
The longer duration is actually required, likely due to debouncing
applied on the SoC side. Even 50us was unreliable.
This reverts commit 3b723583e7
.
2021-08-05 21:17:09 -05:00
Ondrej Jirman
ee438569e3
Update TODO
2021-08-05 03:40:40 +02:00
Ondrej Jirman
f8b901e832
firmware: Add final/proto-v3 builds
2021-08-05 03:40:07 +02:00
Ondrej Jirman
c5c155ca68
firmware: Allow to prevent jump to user fw after powerup by pressing Pine + F + H
2021-08-05 03:33:04 +02:00
Ondrej Jirman
b244ab9c9f
firmware: Set stack pointer to a correct value
2021-08-05 02:51:51 +02:00
Ondrej Jirman
bd58af96d2
Update TODO
2021-08-05 02:29:45 +02:00
Ondrej Jirman
c195dabe04
firmware: Whitespace
2021-08-05 02:29:36 +02:00
Ondrej Jirman
15d477f5ba
firmware: Fix I2C A forwarding mode
...
- add charger INT check prior to transaction via P87
- re-route POGO int to P84
- wrong macro name, fix CONFIG_I2C_A=0 mode
2021-08-05 02:29:23 +02:00
Ondrej Jirman
c55f0a44d5
firmware: Post-revert fixup
2021-08-05 02:27:39 +02:00
Ondrej Jirman
4e89074513
Revert "firmware: Move more of the USB shutdown control to usb_enable/usb_disable"
...
This reverts commit 134b4b6a8b
.
2021-08-05 00:54:46 +02:00
Ondrej Jirman
f0f49c0fbc
Revert "firmware: Implement USB enabled/disable control via I2C"
...
This reverts commit 176a2da7e2
.
2021-08-05 00:54:39 +02:00
Ondrej Jirman
7f1655be83
firmware: Don't trigger stop twice in i2c_a_read
2021-08-05 00:50:43 +02:00
Petr Vaněk
b3412ee2a4
README.flashing: fix few typos
...
to user -> to use -- in second paragraph of Flashing over USB section
users stock stock -> uses stock -- in first paragraph of Flashing over I2C section
fiwmare -> firmware -- in second paragraph of Flashing over I2C section
2021-08-02 12:18:34 +02:00
Ondrej Jirman
5bef4c8832
Update TODO and I2C interface description
2021-08-02 12:13:56 +02:00
Ondrej Jirman
5fd891ecc0
firmware: Guard the timer manipulation macro argument
2021-08-02 11:53:31 +02:00
Samuel Holland
394af632aa
firmware: Allow to read/write single registers from a charger
...
This code uses existing system command functionality. The I2C
registers are placed in front of system command register, to
allow for a single transaction proxied I2C A reads/writes.
Not tested, yet.
2021-08-02 11:52:54 +02:00
Ondrej Jirman
c3272eb4ef
firmware: Drop POLL mode from the register definition
...
Polling mode was supposed to help with broken keyboard matrix, where
some keys are stuck, but this is handled well by the pre-existing code
already, so there's no need for this.
2021-08-02 10:23:42 +02:00