Skip to content

Conversation

a-andre
Copy link

@a-andre a-andre commented Jul 21, 2025

No description provided.

@a-andre a-andre force-pushed the b4/dw9719 branch 2 times, most recently from 65f4646 to 94b830f Compare July 26, 2025 12:20
vknecht and others added 18 commits September 15, 2025 18:12
Add bindings for qcom,msm8939-camss in order to support the camera
subsystem for MSM8939.

Signed-off-by: Vincent Knecht <[email protected]>
[André: Make order of items the same as in 8916]
Signed-off-by: André Apitzsch <[email protected]>
Some devices need writing values to VFE VBIF registers.
Add helper functions to do this.

Reviewed-by: Bryan O'Donoghue <[email protected]>
Signed-off-by: Vincent Knecht <[email protected]>
Signed-off-by: André Apitzsch <[email protected]>
The camera subsystem for the MSM8939 is the same as MSM8916 except with
3 CSID instead of 2, and some higher clock rates.

As a quirk, this SoC needs writing values to 2 VFE VBIF registers
(see downstream msm8939-camera.dtsi vbif-{regs,settings} properties).
This fixes black stripes across sensor and garbage in CSID TPG outputs.

Add support for the MSM8939 camera subsystem.

Reviewed-by: Bryan O'Donoghue <[email protected]>
Signed-off-by: Vincent Knecht <[email protected]>
Signed-off-by: André Apitzsch <[email protected]>
Add the camera subsystem and CCI used to interface with cameras on the
Snapdragon 615.

Signed-off-by: Vincent Knecht <[email protected]>
[André: Make order of items the same as in 8916]
Signed-off-by: André Apitzsch <[email protected]>
CONFIG_VIDEO_IMX214=m

Signed-off-by: André Apitzsch <[email protected]>
Add rear camera support, using imx214 sensor.

Signed-off-by: André Apitzsch <[email protected]>
CONFIG_VIDEO_DW9719=m

Signed-off-by: André Apitzsch <[email protected]>
The DW9718S voice coil motor is found on various smartphones like
motorola-nora that are currently being worked on in the postmarketOS
community. Since the way it operates is very similar to DW9719, this
patch series adds support for it to the existing dw9719 driver. Because
that driver did not yet support DT, we also add DT bindings and the
dongwoon,dw9719 ofw compatible. With DW9718S, the driver was
tested fully, including runtime PM.

This is a follow-up of [1] and [2].

Changes compared to previous submission:
* Deprecate dongwoon,vcm-freq in favor of dongwoon,vcm-prescale
* Instead of per-device config struct use model ID to handle cases

[1] https://lore.kernel.org/linux-media/[email protected]/
[2] https://lore.kernel.org/linux-media/[email protected]/

# Describe the purpose of this series. The information you put here
# will be used by the project maintainer to make a decision whether
# your patches should be reviewed, and in what priority order. Please be
# very detailed and link to any relevant discussions or sites that the
# maintainer can review to better understand your proposed changes. If you
# only have a single patch in your series, the contents of the cover
# letter will be appended to the "under-the-cut" portion of the patch.

# Lines starting with # will be removed from the cover letter. You can
# use them to add notes or reminders to yourself. If you want to use
# markdown headers in your cover letter, start the line with ">#".

# You can add trailers to the cover letter. Any email addresses found in
# these trailers will be added to the addresses specified/generated
# during the b4 send stage. You can also run "b4 prep --auto-to-cc" to
# auto-populate the To: and Cc: trailers based on the code being
# modified.

To: Mauro Carvalho Chehab <[email protected]>
To: Rob Herring <[email protected]>
To: Krzysztof Kozlowski <[email protected]>
To: Conor Dooley <[email protected]>
To: [email protected]
To: Sakari Ailus <[email protected]>
To: Daniel Scally <[email protected]>
Cc: ~postmarketos/[email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Val Packett <[email protected]>
Signed-off-by: André Apitzsch <[email protected]>

---
Changes in v2:
- Add patch (3) which removes i2c device table
- Restructure patches because of that
  - keep patches 1 and 2
  - add patch 3
  - patch 6 becomes patch 4
  - patch 3 becomes patch 5
  - patch 4 becomes patch 6
  - patch 5 becomes patch 7
  - patch 7 becomes patch 8
- Patch 1 (bindings)
  - Remove unneeded 'minimum: 0'
  - Remove if/then that handles 'default' to reduce complexity
  - Add myself as maintainer
- Patch 5
  - Fix void-pointer-to-enum-cast warning
- Patch 7
  - Drop pm_runtime_mark_last_busy(); it is already called by
    pm_runtime_put_autosuspend()
- Patch 8
  - Remove extra parentheses
  - Print error if writing to power register fails
  - Add reason for doubled waiting time during power up to comment
  - Pass NULL instead of unused 'ret' to cci_write()
- Link to v1: https://lore.kernel.org/r/[email protected]

--- b4-submit-tracking ---
# This section is used internally by b4 prep for tracking purposes.
{
  "series": {
    "revision": 2,
    "change-id": "20250709-dw9719-8a8822efc1b1",
    "prefixes": [],
    "history": {
      "v1": [
        "[email protected]"
      ]
    }
  }
}
Document Dongwoon DW9718S, DW9719 and DW9761 VCM devicetree bindings.

Signed-off-by: André Apitzsch <[email protected]>

--

The possible values for sac-mode and vcm-prescale of DW9719 and DW9761
are missing because there is no documentation available.
The name of property "dongwoon,vcm-freq" doesn't match its purpose.
Change the name of the property to "dongwoon,vcm-prescale" to better
describe its purpose and deprecate the old one.

Signed-off-by: André Apitzsch <[email protected]>
Nothing depends on the I²C device ID table, so remove it.

Signed-off-by: André Apitzsch <[email protected]>
Allow the dw9719 driver to be attached via FDT.

Signed-off-by: Val Packett <[email protected]>
Signed-off-by: André Apitzsch <[email protected]>
In preparation for adding models with different register sets, start
assigning the model based on the i2c match data.

Signed-off-by: Val Packett <[email protected]>
Signed-off-by: André Apitzsch <[email protected]>
The DW9718S is a similar part that uses a different register set but
follows the same method of operation otherwise. Add support for it
to the existing dw9719 driver.

Tested on the Moto E5 (motorola-nora) smartphone.

Signed-off-by: Val Packett <[email protected]>
Signed-off-by: André Apitzsch <[email protected]>
Update the close callback to match other similar drivers like dw9768.

Signed-off-by: Val Packett <[email protected]>
Signed-off-by: André Apitzsch <[email protected]>
The "jiggle" code was not actually expecting failure, which it should
because that's what actually happens when the device wasn't already woken
up by the regulator power-on (i.e. in the case of a shared regulator).

Also, do actually enter the internal suspend mode on shutdown, to save
power in the case of a shared regulator.

Also, wait a bit longer (2x tOPR) on waking up, 1x is not enough at least
on the DW9718S as found on the motorola-nora smartphone.

Signed-off-by: Val Packett <[email protected]>
Signed-off-by: André Apitzsch <[email protected]>
@a-andre a-andre changed the base branch from wip/msm8916/v6.16-rc4 to msm8916/6.17-rc6 September 20, 2025 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants