Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 141
    • Issues 141
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 24
    • Merge requests 24
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.

  • Librem5
  • linux
  • Merge requests
  • !255
Project 'Librem5/linux-next' was moved to 'Librem5/linux'. Please update any links and bookmarks that may still have the old path.

camera csi driver stack

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Martin Kepplinger requested to merge martin.kepplinger/linux-next:librem5___csi_nxp into imx8-current-librem5 Nov 16, 2020
  • Overview 31
  • Commits 37
  • Pipelines 8
  • Changes 26

This is a CSI driver stack with a working camera driver for the devkit: gst-launch-1.0 v4l2src ! video/x-raw,width=640,height=480 ! videoconvert ! xvimagesink -v. The csi bridge, mipi csi and the actual camera driver is out of tree.

This implements runtime PM for both camera drivers. A testscript to watch can look like this:

#!/bin/bash
cat /sys/class/regulator/regulator.8/name
cat /sys/class/regulator/regulator.8/state
cat /sys/kernel/debug/regulator/CAMERA_PWR_EN/use_count
cat /sys/class/regulator/regulator.13/name
cat /sys/class/regulator/regulator.13/state
cat /sys/kernel/debug/regulator/CAMERA1_PWR_EN/use_count
echo "---- hi846 -----"
cat /sys/bus/i2c/devices/2-0020/power/control 
cat /sys/bus/i2c/devices/2-0020/power/runtime_status
echo "---- samsung ---"
cat /sys/bus/i2c/devices/3-002d/power/control 
cat /sys/bus/i2c/devices/3-002d/power/runtime_status
echo "----------------"
cat /sys/kernel/debug/clk/clk_summary | grep -i clko2

and i2c tests would need to:

echo on > /sys/bus/i2c/devices/2-0020/power/control
echo on > /sys/bus/i2c/devices/3-002d/power/control

@dorota.czaplejewicz whenever you access the hardware, you now need to guard that with the pm calls you see in the last commit in this series (and I'm not sure if I missed something. I was not yet able to reproduce your distorted image output).

Edited Nov 25, 2020 by Martin Kepplinger
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: librem5___csi_nxp