Commit graph

186 commits

Author SHA1 Message Date
CTCaer 9dbf745649 regulator 5V: fix battery/usb source swap 2021-03-17 08:56:46 +02:00
CTCaer e8f73a42b8 fan: increase irq polling to get more accurate rpm 2021-03-17 08:55:54 +02:00
CTCaer dbe431095a touch: report gpio info in case of unknown panel 2021-03-17 08:53:23 +02:00
CTCaer 513f77a2ad uart: use proper interrupt decoding 2021-03-17 08:51:49 +02:00
CTCaer 7a27a7b3b5 joycon: Disable regulators before sending the sleep cmd 2021-02-08 03:49:04 +02:00
CTCaer 3b9ab66cf1 nyx: Add resized emuMMC creation 2021-02-06 17:19:37 +02:00
CTCaer e5689cfe57 fatfs: Add raw emuMMC support for USER partition 2021-02-06 17:11:32 +02:00
CTCaer a4a056128a sdmmc: Add support for SDSC cards 2021-02-06 04:18:30 +02:00
CTCaer 6e314933d9 Various small changes 2021-02-06 04:17:31 +02:00
CTCaer a31bedda97 ramdisk: Sypport variable size 2021-02-06 04:15:19 +02:00
CTCaer 9e34c5995d bis: Pull latest lockpick driver and refactor it
- Refactor various variables and functions
- Flush whole cache when full
- Allow cache to be disabled
- Add support for raw emuMMC in nyx contenxt
- Use partition names for keys (to avoid issues with different ordering)
- Add deinit function that flushes the whole cache
- Change bis lookup address
- Halve cache size to 256MB in order to support 512MB ramdisk also.

Co-Authored-By: shchmue <7903403+shchmue@users.noreply.github.com>
2021-02-06 04:05:31 +02:00
CTCaer 497bbdf3cd fatfs: Add PrFile2Safe creation in format tool 2021-02-06 03:59:20 +02:00
CTCaer eea5463a5c nyx: Refactor nyx extra cfg 2021-02-06 03:55:01 +02:00
CTCaer a8a45b215a nyx: Add emmc info about write cache and enhanced area 2021-02-06 03:44:27 +02:00
CTCaer 38f456a2ee sdmmc: Refactor again
- Refactor various variables and defines
- Removed Card/BGA and OEM ID info as they are static and useless
- Commented out bkops functions completely as not used
- Remove extra buf usage when there's already storage for storing that data
- Optimize various functions to save space
- Clean up useless or duplicate code
2021-02-06 03:41:35 +02:00
CTCaer 2428736bfa hos: Use structs for eks keyblobs and tsec keys 2021-02-06 03:00:48 +02:00
CTCaer a7bf8bf118 se: Refactor with proper names
Additionally fix some bugs in rsa access control
2021-02-06 02:55:58 +02:00
CTCaer 8038e1faa9 fatfs: Restore win buffer order and explicitly DMA align it 2021-02-05 23:32:07 +02:00
CTCaer 15a7e49dde fatfs: Add simple GPT support
This allows for a simple GPT parsing and checking first partition to see if it's FAT based.

This allows hekate booting GPT with tiny size cost.
2021-02-05 23:27:52 +02:00
CTCaer 8fc5267110 tmp451: Show correct temperature for T210B01
The thermal measurement substrate transistor was changed in Mariko SoCs.
This ensures that it's properly offset by -12.5 °C.
2021-01-14 17:58:23 +02:00
CTCaer f6a3b2c9ac sdmmc: Ensure writes gone through after disabling io power 2021-01-14 17:53:22 +02:00
CTCaer 2370ca0a44 util: Clear alarm wake flags also on power off even if rtc alram is off 2021-01-11 23:24:29 +02:00
CTCaer c6c396ce2a reg5V: Manage battery source based on charger status 2021-01-11 21:30:59 +02:00
CTCaer 9daa14abec ums: Dim backlight and change the maintenance order 2021-01-04 20:12:26 +02:00
CTCaer 1f37b96359 coreboot mitigation: Reinstate SD controller power 2021-01-04 19:03:50 +02:00
CTCaer 0959dc3a2d nyx: Add touch panel info
This can probably also show if the panel is paired to the firmware.
In case it's not, an error will show up.
2021-01-04 02:49:07 +02:00
CTCaer f4696da0ef sdram: Update names for Aula 2021-01-04 02:45:32 +02:00
CTCaer 83ab79c51e fuse: Return the proper dram id when raw is requested 2021-01-04 02:41:55 +02:00
CTCaer 745ac609d2 max7762x: Update everything to use the improved pmic management 2021-01-04 02:41:15 +02:00
CTCaer 0f9aa51afe max7762x: Refactor pmic
- Add Erista CPU/GPU pmics and Mariko CPU/GPU/DRAM pmics together with system pmic.
- Every type of pmic can be configured via the relevant functions.
- Better and easier configation of the regulators
2021-01-04 02:34:58 +02:00
CTCaer 9fbb28e887 max7762x: Update registers for all pmic types 2021-01-04 02:29:36 +02:00
CTCaer adf2045896 joycon: Do not send CRC if nxpad + some refactoring 2021-01-03 15:37:44 +02:00
CTCaer 1a797bf93a
Merge pull request #545 from krnlyng/hori_support
joycon: add support for the hori split pad pro
2021-01-03 14:59:02 +02:00
Franz-Josef Haider e491a4cf57 joycon: add support for the hori split pad pro 2020-12-31 13:54:00 +02:00
CTCaer b7789f1edb xusb: Increase performance up to 96%
The default interrupt moderation on XUSB controller was causing 4.62ms latency, hurting performance tremendously, especially in smaller usb packets (which are the norm).
This change brings it to parity with USB2 controller.
2020-12-30 13:40:16 +02:00
CTCaer 4949331f4c usb: Rework timeouts
- Rework all timeouts to be more relaxed when doing big data transfers.
- Fix a bug where async transfer would timeout sooner instead of infinite tries.

Both showed up in Arch Linux, because of it's huge latency USB stack latency that can reach 1-2s.

The rework will let every OS work without adding additional wait time in the gadget loops.
2020-12-30 13:37:36 +02:00
CTCaer 2c695e9a96 ums: Refactor errors 2020-12-30 13:29:29 +02:00
CTCaer ed916360eb display: Add new panel revision 2020-12-28 05:24:42 +02:00
CTCaer e4bc5c41ce display: Add fifo draining before requesting info
In case we got loaded from bad chainloader.
Fixes issues with incorrect display ID when fifo has left overs.
2020-12-28 05:23:33 +02:00
CTCaer d0d943c9c3 display: Make dsi write buffer bigger 2020-12-28 05:21:21 +02:00
CTCaer 60b629e57f Move display related objects to display parrent 2020-12-28 05:19:23 +02:00
CTCaer df80339060 mc: Simplify clock enable/reset
Additionally utilize the redirect flag.
2020-12-27 12:50:20 +02:00
CTCaer 11ca6caf5f clock: Add more defines and simplify some logic 2020-12-26 17:28:08 +02:00
CTCaer 15afdf53e4 clock: Add module actual frequency getter 2020-12-26 17:25:23 +02:00
CTCaer d15f958b48 irq: Disable irq if not handled. 2020-12-26 17:22:56 +02:00
CTCaer 5fd3bdede7 pmc: Add defines for power rails 2020-12-26 17:20:26 +02:00
CTCaer e2dd218f33 pmc: Add latest pmc secure scratch lock 2020-12-26 16:48:00 +02:00
CTCaer 2628044ba8 fuse: Move more parsing into its specific object 2020-12-26 16:34:12 +02:00
CTCaer 601c85c23e util: Refactor power management (reboot/power off) 2020-12-15 19:33:46 +02:00
CTCaer b6ec217484 exo: Support uart logging
This can be enabled via compile time flags or exosphere.ini.
Compile time flags override exosphere.ini
2020-12-11 18:14:00 +02:00
CTCaer ad560b650e nyx: di: Set display id we got from bootloader 2020-12-11 17:49:06 +02:00
CTCaer 14a048a496 nyx: Add SD init info from bootloader
This shows info about the sd initialization process that happened on hekate main
2020-12-11 17:46:44 +02:00
CTCaer ba984d02eb sdmmc: Mitigate some Phison SDs which think they are SDSC 2020-12-11 17:43:01 +02:00
CTCaer fce59fba43 nyx: Add SD card AU info 2020-12-11 17:41:09 +02:00
CTCaer 5b8fb9fb6b Various refactoring and addition of comments 2020-12-11 17:25:59 +02:00
CTCaer 8249d9e1a2 se: Ensure aligned key/iv/ctr/hash copy 2020-12-05 20:39:17 +02:00
CTCaer cf1f94662c sdram: Correct some dram names 2020-12-02 22:26:06 +02:00
CTCaer aaaf470dcf display: Provide dsi command reading/writing to user
These work while video stream is either disabled or enabled.
2020-12-02 02:09:49 +02:00
CTCaer c13eabcde8 sdmmc: Add T210B01 support
The driver was working before this, but adding the changes provides a proper and better sdmmc controller inner state.
2020-12-02 02:07:15 +02:00
CTCaer d1e3a0fdff display: Add new Switch Lite panel support 2020-12-02 01:53:00 +02:00
CTCaer 0954eb2b09 nyx: Use full shutdown based reboot on T210B01
That's because of how the system is exploited.
2020-12-02 01:45:12 +02:00
CTCaer 0ccea3aa83 usb: Improve UMS ejection heuristic 2020-12-02 01:16:45 +02:00
CTCaer a1188505e8 usb: Add XUSB support mainly for T210B01 2020-12-02 01:13:52 +02:00
CTCaer 202540c7f7 joycon: Disable driver for Switch Lite 2020-12-02 00:51:29 +02:00
CTCaer da0cdf1bd0 hos: Add stock secmon support for Mariko 2020-07-04 21:58:21 +03:00
CTCaer 5ffbbf40a5 hos: Add Mariko keygen 2020-07-04 21:13:25 +03:00
CTCaer a36fec5696 clock: Lock clock to always enabled for SE in T210B01 2020-07-04 21:07:25 +03:00
CTCaer 8d2230dc51 fuse: Correct fuse array size for T210B01 2020-07-04 21:04:20 +03:00
CTCaer 528ddbe12c minerva: Disable for T210B01
Minerva is currently unsupported for Mariko LPDDR4X.
2020-07-04 21:02:45 +03:00
CTCaer fbbfeb2d1c se: Add a T210B01 only register 2020-06-26 22:31:23 +03:00
CTCaer ccaf49bece display: Add T210B01 support 2020-06-26 22:29:52 +03:00
CTCaer 147fed39c8 ccplex: Add regulator for T210B01 2020-06-26 19:02:37 +03:00
CTCaer d0a73bdc72 sc7: Add T210B01 SC7/LP0 (deep sleep) support
Note to future self: Almost a month passed and nothing changed, have fun cleaning that in the end...
2020-06-26 19:00:30 +03:00
CTCaer 29dc122dd4 sdram: Add T210B01 support & new LPDDR4X tables 2020-06-26 18:53:12 +03:00
CTCaer 293c47774d fuse: Add NX hw type getter 2020-06-26 18:45:21 +03:00
CTCaer 795ed8aadc hwinit: Add T210B01 support 2020-06-26 18:42:31 +03:00
CTCaer 377825d4fb usb gadgets: Replace error status labels with error label and color 2020-11-26 01:58:13 +02:00
CTCaer b89bb35054 usb: Refactor some variables 2020-11-26 01:55:33 +02:00
CTCaer caae685fab usb: Add buffer alignment checks
EDCI/EHCI controllers only allow 0x1000 aligned buffers.
So reply with a specific error type instead of a EP xfer error.
2020-11-26 01:54:10 +02:00
CTCaer bd4517abab usb: Name all controller errors 2020-11-26 01:50:49 +02:00
CTCaer 095b234fce max17050: Be explicit about hardcoded calculations 2020-11-26 01:44:04 +02:00
CTCaer b1c09f8a9c max77620: Change try set to just retry if i2c xfer failed 2020-11-26 01:43:19 +02:00
CTCaer cabaa6cfb8 Utilize BIT macro everywhere 2020-11-26 01:41:45 +02:00
CTCaer 94486873c1 di: Skip panel deinit if DI was not properly deinit'ed 2020-11-26 01:12:44 +02:00
CTCaer 89a4eadab0 sdmmc: Refactor some names 2020-11-26 01:08:42 +02:00
CTCaer 55395ea4fd sdmmc: Correct bus speed for SDR25
Fix bus speed on SDR25 even if all UHS cards support SDR50 and SDR104.
2020-11-15 15:11:19 +02:00
CTCaer 4166a3c128 sdmmc: Add more debugging 2020-11-15 15:08:53 +02:00
CTCaer ab7a81081c t210: Refactor AHB Gizmo registers 2020-11-15 14:46:42 +02:00
CTCaer 8a352bdfe2 usb: Split init into PHY init and device init 2020-11-15 14:45:48 +02:00
CTCaer 721e926a75 usb: Do proper UTMIPLL_HW_PWRDN_CFG0 config 2020-11-15 14:44:35 +02:00
CTCaer 0b314d7f21 clock: Move UTMIPLL init from USB to clock 2020-11-15 14:43:36 +02:00
CTCaer 8305058cf5 clock: Move PLLU init/deinit from USB to clock 2020-11-15 14:42:01 +02:00
CTCaer 6dddb968fa usb: Fix various descriptor transfers in order to not rely on quirks 2020-11-15 14:38:18 +02:00
CTCaer d3c318d0c9 usb: Correct latencies for HID gadgets 2020-11-15 14:37:14 +02:00
CTCaer 604ec4416d usb: Refactor driver names and defines 2020-11-15 14:36:20 +02:00
CTCaer c7fcea5f35 usb: Rfactor driver/gadgets in prep for XUSB
Allow gadgets using different USB controllers on demand.
This will allow plugging in XUSB for Mariko usage.
2020-11-15 14:30:25 +02:00
CTCaer a84f1e5ee5 usb: Split descriptors to object and header 2020-11-15 14:10:00 +02:00
CTCaer 6a4161fdc4 usb: Move lang/serial descriptors to header 2020-11-15 14:04:10 +02:00
CTCaer 669e42960c Utilize ARRAY_SIZE macro 2020-11-15 13:56:45 +02:00
CTCaer 93b4514343 minerva: Return failed if module not found inside Nyx 2020-11-15 13:40:13 +02:00