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

power-mediatek: Add support for 32 Bit Power HAL #1

Open
wants to merge 14 commits into
base: lineage-21
Choose a base branch
from

Conversation

Sushrut1101
Copy link
Contributor

Required for some devices like dandelion, water etc.

gaganmalvi and others added 14 commits January 17, 2024 21:27
Author: Gagan Malvi <malvigagan@gmail.com>
Date: Mon, 10 Jan 2022 06:15:40 +0100

    rosemary: Compile and install mtk_plpath_utils.

Author: Woomy <woomy@woomy.be>
Date: Sun, 6 Mar 2022 15:32:46 +0100

    MTK-PlPath-Utils: Fix compilation errors

Author: Woomy <woomy@woomy.be>
Date: Thu, 23 Jun 2022 18:45:31 +0200

    mtk_plpath_utils: Cleanup code

    * Use ALOGD() for debug informations
    * Remove EMMC Pl support (not needed on rosemary)
    * Format code

Change-Id: I3f44bbd97ee0777206b0b22f0d26ff2707961f6f
Co-authored-by: Woomy <woomy@woomy.be>
Signed-off-by: Gagan Malvi <malvigagan@gmail.com>
Change-Id: I2dc5812776e37c603a3660e1142ff9c1b3da746f
Signed-off-by: bengris32 <bengris32@protonmail.ch>
Change-Id: I404c68ad8293494ce7219bc5ca028e85a538881f
Signed-off-by: bengris32 <bengris32@protonmail.ch>
* To avoid installing the init rc for recovery.

Change-Id: I045f744440c8dc45195a7be0dee92ae7353257c0
Signed-off-by: bengris32 <bengris32@protonmail.ch>
* Symlinks don't get created properly in recovery mode when
  mtk_plpath_utils tries to create them itself, hence, move the
  symlink creation into init, where we can wait for the dm devices
  to be created before attempting to create symlinks.

Change-Id: I16aed306cb5c02b0d7d74b3bab74cb1465bd87a1
Signed-off-by: bengris32 <bengris32@protonmail.ch>
* R based USB stack using dual_role_usb instead of typec

Change-Id: Icffffc3cfa85c39e593d64455e81a56c2aabafb8
Our device has broken roles: they appear to be permanently set to
NONE and don't respond to configfs writes. This causes Android to
not see the USB port as connected, breaking the USB settings.

To repair USB preferences, we spoof roles in the following fashion:
  - data role: DEVICE (if NONE)
  - port mode: UFP (if NONE)
Change-Id: I5bdb054ebbb8e073740bb8adc4945f56edb0191f
Signed-off-by: bengris32 <bengris32@protonmail.ch>
Change-Id: If129a56b545e0e01b9ae027b1d6faf1db9c347e1
Signed-off-by: bengris32 <bengris32@protonmail.ch>
* Instead of making devices need an extra kernel commit, simply
  just use the nodes that MediaTek have already implemented for us,
  0 = MTU3_DR_OPERATION_OFF, 1 = MTU3_DR_OPERATION_DUAL. (see the
  mtu3_dr_operation_mode enum).

* Also make sure we get sys.usb.controller every time we try
  to toggle data signaling since the property could have changed during
  the boot process.

Change-Id: I6d7a1fa9cb57204d080ebfcc793c256acf96cbc2
Signed-off-by: bengris32 <bengris32@protonmail.ch>
Change-Id: I812ca6f40baa03c4144b077621d7c7b9a987031a
Signed-off-by: bengris32 <bengris32@protonmail.ch>
Change-Id: I547c626eb123b9b3f228b6f070f9e727a16a82d8
Signed-off-by: bengris32 <bengris32@protonmail.ch>
* Highly based on ashblk's work from the old HIDL implementation,
  with some clean-ups from my side.

* Legacy devices also don't support USB data control, so remove
  support for that feature while we're at it.

Change-Id: If5becee2621324c97b9bcc69c406ca852794bf8e
Co-authored-by: Ash Blake <36798666+ashblk@users.noreply.github.com>
Signed-off-by: bengris32 <bengris32@protonmail.ch>
Change-Id: Iebfb63538606d0d9f0c179211ddb12998facab0e
Signed-off-by: Sushrut1101 <guptasushrut@gmail.com>
@bengris32 bengris32 force-pushed the lineage-21 branch 2 times, most recently from f852522 to cba217e Compare September 11, 2024 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants