-
Notifications
You must be signed in to change notification settings - Fork 5.5k
IMX355 driver updates #7466
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
Open
6by9
wants to merge
27
commits into
raspberrypi:rpi-6.18.y
Choose a base branch
from
6by9:rpi-6.18.y-imx355
base: rpi-6.18.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.
Open
IMX355 driver updates #7466
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
bb025a3
dt-bindings: media: i2c: Add Sony IMX355
flamingradian db911e7
media: i2c: imx355: Support devicetree and power management
flamingradian 87967ec
media: i2c: imx355: Restrict data lanes to 4
flamingradian b7ff2c2
media: i2c: imx355: Add support for 24 MHz external clock
okias 445bda1
dt-bindings: media: imx355: Allow 2 CSI2 data lane output
6by9 be11c54
media: imx355: Remove duplicated registers from the mode tables
6by9 574888d
media: imx355: Remove setting FRM_LENGTH_LINES in the mode regs
6by9 adfc096
media: imx355: Programmatically set the crop parameters for each mode
6by9 0b5a0d3
media: imx355: Set register LINE_LENGTH_PCK programmatically
6by9 37f1f82
media: imx355: Set binning mode registers programmatically
6by9 daeeb02
media: imx355: Remove link_freq_index from each mode as ununsed
6by9 d19a29a
media: imx355: pixel_rate never changes, so don't recompute
6by9 d89db53
media: imx355: Remove redundant fll_min, and implement fixed offset
6by9 4be95c8
media: imx355: Add support for get_selection
6by9 cbca281
media: imx355: Use pm_runtime autosuspend_delay
6by9 5bf3317
media: imx355: Convert to new CCI register access helpers
6by9 265f8eb
media: imx355: Set the colorspace in the format
6by9 6899126
media: imx355: Define the exposure offset, and use that define
6by9 3e93c73
media: imx355: Use NULL ctrl_ops for HBLANK as it is a read-only control
6by9 010519b
media: imx355: Compute link frequency from PLL setup
6by9 2e544e0
media: imx355: Support 2 lane readout.
6by9 100cd91
media: imx355: Switch to using the subdev state.
6by9 cda4910
media: imx355: Remove storing cur_mode in the state
6by9 7ffd515
media: imx355: Make V4L2_CID_HBLANK controllable
6by9 54c69f6
arm: defconfigs: Add IMX355 to Pi defconfigs
6by9 533ec61
arm64: defconfig: Add IMX355 to Pi configurations
6by9 3fa26be
dtoverlays: Add overlay for imx355 image sensor
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
118 changes: 118 additions & 0 deletions
118
Documentation/devicetree/bindings/media/i2c/sony,imx355.yaml
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,118 @@ | ||
| # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
| %YAML 1.2 | ||
| --- | ||
| $id: http://devicetree.org/schemas/media/i2c/sony,imx355.yaml# | ||
| $schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
|
||
| title: Sony IMX355 Sensor | ||
|
|
||
| maintainers: | ||
| - Richard Acayan <mailingradian@gmail.com> | ||
|
|
||
| description: | ||
| The IMX355 sensor is a 3280x2464 image sensor, commonly found as the front | ||
| camera in smartphones. | ||
|
|
||
| allOf: | ||
| - $ref: /schemas/media/video-interface-devices.yaml# | ||
|
|
||
| properties: | ||
| compatible: | ||
| const: sony,imx355 | ||
|
|
||
| reg: | ||
| maxItems: 1 | ||
|
|
||
| clocks: | ||
| maxItems: 1 | ||
|
|
||
| avdd-supply: | ||
| description: Analog power supply. | ||
|
|
||
| dvdd-supply: | ||
| description: Digital power supply. | ||
|
|
||
| dovdd-supply: | ||
| description: Interface power supply. | ||
|
|
||
| reset-gpios: | ||
| description: Reset GPIO (active low). | ||
| maxItems: 1 | ||
|
|
||
| port: | ||
| $ref: /schemas/graph.yaml#/$defs/port-base | ||
| additionalProperties: false | ||
|
|
||
| properties: | ||
| endpoint: | ||
| $ref: /schemas/media/video-interfaces.yaml | ||
| unevaluatedProperties: false | ||
|
|
||
| properties: | ||
| data-lanes: | ||
| oneOf: | ||
| - items: | ||
| - const: 1 | ||
| - const: 2 | ||
| - const: 3 | ||
| - const: 4 | ||
| - items: | ||
| - const: 1 | ||
| - const: 2 | ||
|
|
||
| required: | ||
| - link-frequencies | ||
|
|
||
| required: | ||
| - endpoint | ||
|
|
||
| required: | ||
| - compatible | ||
| - reg | ||
| - clocks | ||
| - avdd-supply | ||
| - dvdd-supply | ||
| - dovdd-supply | ||
| - port | ||
|
|
||
| unevaluatedProperties: false | ||
|
|
||
| examples: | ||
| - | | ||
| #include <dt-bindings/clock/qcom,camcc-sdm845.h> | ||
| #include <dt-bindings/gpio/gpio.h> | ||
|
|
||
| i2c { | ||
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
|
|
||
| camera@1a { | ||
| compatible = "sony,imx355"; | ||
| reg = <0x1a>; | ||
|
|
||
| clocks = <&camcc CAM_CC_MCLK2_CLK>; | ||
|
|
||
| assigned-clocks = <&camcc CAM_CC_MCLK2_CLK>; | ||
| assigned-clock-rates = <24000000>; | ||
|
|
||
| reset-gpios = <&tlmm 9 GPIO_ACTIVE_LOW>; | ||
|
|
||
| avdd-supply = <&cam_front_ldo>; | ||
| dvdd-supply = <&cam_front_ldo>; | ||
| dovdd-supply = <&cam_vio_ldo>; | ||
|
|
||
| pinctrl-names = "default"; | ||
| pinctrl-0 = <&cam_front_default>; | ||
|
|
||
| rotation = <270>; | ||
| orientation = <0>; | ||
|
|
||
| port { | ||
| cam_front_endpoint: endpoint { | ||
| data-lanes = <1 2 3 4>; | ||
| link-frequencies = /bits/ 64 <360000000>; | ||
| remote-endpoint = <&camss_endpoint1>; | ||
| }; | ||
| }; | ||
| }; | ||
| }; |
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,111 @@ | ||
| // SPDX-License-Identifier: GPL-2.0-only | ||
| // Definitions for IMX355 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 "imx355.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>; | ||
| }; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| 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 <360000000>; | ||
| }; | ||
| }; | ||
|
|
||
| __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>, "avdd-supply:0=",<&cam0_reg>, | ||
| <&vcm>, "VANA-supply:0=", <&cam0_reg>; | ||
| vcm = <&vcm>, "status=okay", | ||
| <&cam_node>,"lens-focus:0=", <&vcm>; | ||
| 4lane = <0>, "+201+202"; | ||
| }; | ||
| }; | ||
|
|
||
| &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,26 @@ | ||
| // Fragment that configures an imx355 | ||
|
|
||
| cam_node: imx219@1a { | ||
| compatible = "sony,imx355"; | ||
| reg = <0x1a>; | ||
| status = "disabled"; | ||
|
|
||
| clocks = <&cam1_clk>; | ||
| clock-names = "xclk"; | ||
|
|
||
| avdd-supply = <&cam1_reg>; /* 2.8v */ | ||
| dvdd-supply = <&cam_dummy_reg>; /* 1.8v */ | ||
| dovdd-supply = <&cam_dummy_reg>;/* 1.2v */ | ||
|
|
||
| rotation = <180>; | ||
| orientation = <2>; | ||
|
|
||
| port { | ||
| cam_endpoint: endpoint { | ||
| clock-lanes = <0>; | ||
| data-lanes = <1 2>; | ||
| link-frequencies = | ||
| /bits/ 64 <444000000>; | ||
| }; | ||
| }; | ||
| }; |
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.
Is this likely to exist?