-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Playing with imx662 #7239
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
Draft
6by9
wants to merge
6
commits into
raspberrypi:rpi-6.12.y
Choose a base branch
from
6by9:rpi-6.12.y-imx662
base: rpi-6.12.y
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Playing with imx662 #7239
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c9c5f22
media/i2c: Add driver for Sony IMX662
6by9 10c8c22
dtoverlays: Add overlay for IMX662
6by9 e540f42
arm/defconfig: Add IMX662 image sensor to Pi configs
6by9 a1ea0c5
arm64/defconfigs: Add IMX662 image sensor to Pi defconfigs
6by9 93f91cd
dtoverlay: imx662: Include link-frequency
6by9 85d29d4
media: imx662: Fix IMX662_PIXEL_ARRAY_TOP
6by9 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| // SPDX-License-Identifier: GPL-2.0-only | ||
| // Definitions for IMX662 camera module on VC I2C bus | ||
| /dts-v1/; | ||
| /plugin/; | ||
|
|
||
| #include <dt-bindings/gpio/gpio.h> | ||
|
|
||
| /{ | ||
| compatible = "brcm,bcm2835"; | ||
|
|
||
| fragment@0 { | ||
| target = <&i2c0if>; | ||
| __overlay__ { | ||
| status = "okay"; | ||
| }; | ||
| }; | ||
|
|
||
| clk_frag: fragment@1 { | ||
| target = <&cam1_clk>; | ||
| __overlay__ { | ||
| status = "okay"; | ||
| clock-frequency = <24000000>; | ||
| }; | ||
| }; | ||
|
|
||
| fragment@2 { | ||
| target = <&i2c0mux>; | ||
| __overlay__ { | ||
| status = "okay"; | ||
| }; | ||
| }; | ||
|
|
||
| i2c_frag: fragment@100 { | ||
| target = <&i2c_csi_dsi>; | ||
| __overlay__ { | ||
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
| status = "okay"; | ||
|
|
||
| #include "imx662.dtsi" | ||
|
|
||
| vcm: ad5398@c { | ||
| compatible = "adi,ad5398"; | ||
| reg = <0x0c>; | ||
| status = "disabled"; | ||
| VANA-supply = <&cam1_reg>; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| csi_frag: fragment@101 { | ||
| target = <&csi1>; | ||
| csi: __overlay__ { | ||
| status = "okay"; | ||
|
|
||
| port { | ||
| csi_ep: endpoint { | ||
| remote-endpoint = <&cam_endpoint>; | ||
| clock-lanes = <0>; | ||
| data-lanes = <1 2>; | ||
| clock-noncontinuous; | ||
| }; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| fragment@102 { | ||
| target = <&csi1>; | ||
| __dormant__ { | ||
| compatible = "brcm,bcm2835-unicam-legacy"; | ||
| }; | ||
| }; | ||
|
|
||
| fragment@201 { | ||
| target = <&csi_ep>; | ||
| __dormant__ { | ||
| data-lanes = <1 2 3 4>; | ||
| }; | ||
| }; | ||
|
|
||
| fragment@202 { | ||
| target = <&cam_endpoint>; | ||
| __dormant__ { | ||
| data-lanes = <1 2 3 4>; | ||
| link-frequencies = | ||
| /bits/ 64 <297000000>; | ||
| }; | ||
| }; | ||
|
|
||
| __overrides__ { | ||
| rotation = <&cam_node>,"rotation:0"; | ||
| orientation = <&cam_node>,"orientation:0"; | ||
| media-controller = <0>,"!102"; | ||
| cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>, | ||
| <&csi_frag>, "target:0=",<&csi0>, | ||
| <&clk_frag>, "target:0=",<&cam0_clk>, | ||
| <&cam_node>, "clocks:0=",<&cam0_clk>, | ||
| <&cam_node>, "VANA-supply:0=",<&cam0_reg>, | ||
| <&vcm>, "VANA-supply:0=", <&cam0_reg>; | ||
| vcm = <&vcm>, "status=okay", | ||
| <&cam_node>,"lens-focus:0=", <&vcm>; | ||
| 4lane = <0>, "+201+202"; | ||
| clock-frequency = <&clk_frag>,"clock-frequency:0", | ||
| <&cam_node>,"clock-frequency:0"; | ||
| link-frequency = <&cam_endpoint>,"link-frequencies#0"; | ||
| }; | ||
| }; | ||
|
|
||
| &cam_node { | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &cam_endpoint { | ||
| remote-endpoint = <&csi_ep>; | ||
| }; | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| // Fragment that configures an imx662 | ||
|
|
||
| cam_node: imx662@10 { | ||
| compatible = "sony,imx662aaqr"; | ||
| reg = <0x1a>; | ||
| status = "disabled"; | ||
|
|
||
| clocks = <&cam1_clk>; | ||
| clock-names = "xclk"; | ||
| clock-frequency = <24000000>; | ||
|
|
||
| vdda-supply = <&cam1_reg>; /* 2.8v */ | ||
| vddd-supply = <&cam_dummy_reg>; /* 1.8v */ | ||
| vdddo-supply = <&cam_dummy_reg>;/* 1.2v */ | ||
|
|
||
| rotation = <180>; | ||
| orientation = <2>; | ||
|
|
||
| port { | ||
| cam_endpoint: endpoint { | ||
| clock-lanes = <0>; | ||
| data-lanes = <1 2>; | ||
| clock-noncontinuous; | ||
| link-frequencies = | ||
| /bits/ 64 <594000000>; | ||
| }; | ||
| }; | ||
| }; |
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Score one for the automated overlay checker:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd just been looking at why I couldn't set the clock frequency to 37.125MHz and scratching my head a bit.
Point the override at the right bit and it works.