draft: sunxi: pinephone: differentiate hw revisions 1.2 and 1.2b#1
Closed
AndreySV wants to merge 3 commits intoTow-Boot:tow-boot/2023.07/_allfrom
Closed
draft: sunxi: pinephone: differentiate hw revisions 1.2 and 1.2b#1AndreySV wants to merge 3 commits intoTow-Boot:tow-boot/2023.07/_allfrom
AndreySV wants to merge 3 commits intoTow-Boot:tow-boot/2023.07/_allfrom
Conversation
Author
|
Closes Tow-Boot/Tow-Boot#293 |
Author
|
@samueldr I could not find device specific branch for PinePhone, so I put the change to _all. I'll redo, when it's needed. |
dc6b896 to
86097c8
Compare
The A64 uses the AXP803 as its PMIC. Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
PinePhone uses AXP803 PMIC. IC (LIS3MDL magnetometer) that will be probed to detect hardware revision is connected to DLDO1. Normally on A64 PMIC (and DLDO1) is initialized by TF-A, but device tree selection happens before that and in this case requires some basic PMIC initialization. TF-A will initialize other required regulators as before. Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
In newer 1.2 PinePhone board revisions LIS3MDL magnetometer was replaced by AF8133J. They use the same PB1 pin in different modes. LIS3MDL uses it as an gpio input to handle interrupt. AF8133J uses it as an gpio output as a reset signal. It wasn't possible at runtime to enable both device tree nodes and detect supported sensor at probe time. As a result new board revision was introduced with AF8133J definition (1.2b). AF8133J has reset pin (PB1) connected to the SoC. By default AF8133J is in a reset state and don't respond to probe request on I2C bus. Extra code would be needed to handle reset signal. Therefore this code uses LIS3MDL magnetometer (1.2) revision instead of AF8133J (1.2b) to detect board revision. Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
86097c8 to
6af923a
Compare
Author
|
Close in favour of #2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In newer 1.2 PinePhone board revisions LIS3MDL magnetometer was replaced by AF8133J. They use the same PB1 pin in different modes.
LIS3MDL uses it as an gpio input to handle interrupt. AF8133J uses it as an gpio output as a reset signal.
It wasn't possible at runtime to enable both device tree nodes and detect supported sensor at probe time. As a result new board revision was introduced with AF8133J definition (1.2b).
AF8133J has reset pin (PB1) connected to the SoC. By default AF8133J is in a reset state and don't respond to probe request on I2C bus. Extra code would be needed to handle reset signal. Therefore this code uses LIS3MDL magnetometer (1.2) revision instead of AF8133J (1.2b) to detect board revision.