Repository navigation
hisi: ungate the GK7206 sensor clock before probing, as on EV300 - #288
Merged
Merged
Conversation
ipctool reported no sensor on a GK7206V11A with an SC465SL: its clock is gated until a streamer starts, and the sensor does not answer on I2C without it (i2cdetect: nothing at 0x30). hisi_ensure_sensor_enabled() had no GK7206 arm. The GK7206 keeps sensor 0's clock enable and reset where the EV300 does, bits 0 and 1 of CRG 0xF0 (0x120100F0); the SDK's sys_hal_set_sensor_cken and sys_hal_sensor_reset write bit 8n and 8n+1 there for sensor n. Same helper and entitlement rules as V4. On the camera, register 0 before: sensors: SmartSens SC465SL, bus 0, addr 0x60. Co-authored-by: OpenIPC AI team <ai@openipc.org>
PR Summary by QodoUngate the GK7206 sensor clock before probing
AI Description
Merge Risk
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can type 'qodo, fix this' on a finding and the fix lands right on your PR |
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.
On a GK7206V11A with an SC465SL,
ipctoolprinted nosensors:section. The sensor clock (CRG0x120100F0) is gated until a streamer starts, and without it the sensor does not answer on I2C (i2cdetect: nothing at 0x30).hisi_ensure_sensor_enabled()had no GK7206 arm.GK7206 keeps sensor 0's clock enable / reset in bits 0 / 1 of CRG
0xF0, where the EV300 has them (the vendor SDK'ssys_hal_set_sensor_cken/sys_hal_sensor_resetset bit 8n / 8n+1 there for sensor n). This reusessensor_crg_enable/sensor_crg_restoreand the EV300 constants.Tested on the camera with the register at 0 beforehand:
hal_hisi_testpasses. (Thelongse.clink error in a full build is on master too.)