forked from msm8916-mainline/linux
-
Notifications
You must be signed in to change notification settings - Fork 19
motorola-nora: enable cameras and flashes #13
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
valpackett
wants to merge
13
commits into
msm89x7-mainline:msm89x7/6.13
Choose a base branch
from
valpackett:push-suytyzkqkprr
base: msm89x7/6.13
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
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
920c79d
media: i2c: add s5k2xx camera sensor driver (v6)
vldly aff6ed6
media: i2c: s5k2xx:Add s5k3l8 support
Kiciuk 74a3b45
media: qcom: camss: fix VFE pm domain off
barni2000 76f822d
arm64: dts: qcom: motorola-nora: add flash
valpackett e9b4ecb
arm64: dts: qcom: msm8917: add MCLK pinctrl configs
valpackett 122653e
media: dt-bindings: i2c: add DW9719/DW9718S VCM binding
valpackett c305e75
media: i2c: dw9719: Add DW9761 support
jwrdegoede 8e66228
media: i2c: dw9719: Add driver_data matching
valpackett 6fc04b1
media: i2c: dw9719: Add DW9718S support
valpackett 8f7f3e0
media: i2c: dw9719: Update PM last busy time upon close
valpackett 3250077
media: i2c: dw9719: Add an of_match_table
valpackett 9a0eb8d
media: i2c: dw9719: Fix power on/off sequence
valpackett 6fb888e
arm64: dts: qcom: motorola-nora: add cameras
valpackett 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
110 changes: 110 additions & 0 deletions
110
Documentation/devicetree/bindings/media/i2c/dongwoon,dw9719.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,110 @@ | ||
| # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) | ||
| %YAML 1.2 | ||
| --- | ||
| $id: http://devicetree.org/schemas/media/i2c/dongwoon,dw9719.yaml# | ||
| $schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
|
||
| title: Dongwoon Anatech DW9719 Voice Coil Motor (VCM) DAC | ||
|
|
||
| maintainers: | ||
| - Daniel Scally <[email protected]> | ||
|
|
||
| description: |- | ||
| The Dongwoon DW9719/DW9718S is a single 10-bit digital-to-analog converter | ||
| with 100 mA output current sink capability, designed for linear control of | ||
| voice coil motors (VCM) in camera lenses. This chip provides a Smart Actuator | ||
| Control (SAC) mode intended for driving voice coil lenses in camera modules. | ||
| properties: | ||
| compatible: | ||
| enum: | ||
| - dongwoon,dw9719 | ||
| - dongwoon,dw9718s | ||
|
|
||
| reg: | ||
| maxItems: 1 | ||
|
|
||
| vdd-supply: | ||
| description: VDD power supply | ||
|
|
||
| dongwoon,sac-mode: | ||
| description: | | ||
| Slew Rate Control mode to use: direct, LSC (Linear Slope Control) or | ||
| SAC1-SAC6 (Smart Actuator Control). | ||
| $ref: /schemas/types.yaml#/definitions/uint32 | ||
| enum: | ||
| - 0 # Direct mode | ||
| - 1 # LSC mode | ||
| - 2 # SAC1 mode (operation time# 0.32 x Tvib) | ||
| - 3 # SAC2 mode (operation time# 0.48 x Tvib) | ||
| - 4 # SAC3 mode (operation time# 0.72 x Tvib) | ||
| - 5 # SAC4 mode (operation time# 1.20 x Tvib) | ||
| - 6 # SAC5 mode (operation time# 1.64 x Tvib) | ||
| - 7 # SAC6 mode (operation time# 1.88 x Tvib) | ||
| default: 4 | ||
|
|
||
| dongwoon,vcm-freq: | ||
| description: | ||
| The switching frequency for the voice coil motor. | ||
| $ref: /schemas/types.yaml#/definitions/uint32 | ||
|
|
||
| allOf: | ||
| - if: | ||
| properties: | ||
| compatible: | ||
| contains: | ||
| const: dongwoon,dw9718s | ||
| then: | ||
| properties: | ||
| dongwoon,vcm-freq: | ||
| default: 0 | ||
| enum: | ||
| - 0 # 5.00 MHz | ||
| - 1 # 3.33 MHz | ||
| - 2 # 2.50 MHz | ||
| - 3 # 2.00 MHz | ||
| - 4 # 1.67 MHz | ||
| - 5 # 1.43 MHz | ||
| - 6 # 1.25 MHz | ||
| - 7 # 1.11 MHz | ||
| - 8 # 1.00 MHz | ||
| - 9 # 0.91 MHz | ||
| - 10 # 0.83 MHz | ||
| - 11 # 0.77 MHz | ||
| - 12 # 0.71 MHz | ||
| - 13 # 0.67 MHz | ||
| - 14 # 0.63 MHz | ||
| - 15 # 0.59 MHz | ||
| - if: | ||
| properties: | ||
| compatible: | ||
| contains: | ||
| const: dongwoon,dw9719 | ||
| then: | ||
| properties: | ||
| dongwoon,vcm-freq: | ||
| default: 0x60 | ||
|
|
||
| required: | ||
| - compatible | ||
| - reg | ||
| - vdd-supply | ||
|
|
||
| additionalProperties: false | ||
|
|
||
| examples: | ||
| - | | ||
| i2c { | ||
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
| vcm_rear: camera-lens@c { | ||
| compatible = "dongwoon,dw9718s"; | ||
| reg = <0x0c>; | ||
| vdd-supply = <&pm8937_l17>; | ||
| }; | ||
| }; | ||
| ... | ||
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 |
|---|---|---|
|
|
@@ -6932,6 +6932,7 @@ M: Daniel Scally <[email protected]> | |
| L: [email protected] | ||
| S: Maintained | ||
| T: git git://linuxtv.org/media.git | ||
| F: Documentation/devicetree/bindings/media/i2c/dongwoon,dw9719.yaml | ||
| F: drivers/media/i2c/dw9719.c | ||
|
|
||
| DONGWOON DW9768 LENS VOICE COIL DRIVER | ||
|
|
||
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 |
|---|---|---|
|
|
@@ -147,6 +147,108 @@ | |
| status = "okay"; | ||
| }; | ||
|
|
||
| &camss { | ||
| vdda-supply = <&pm8937_l2>; | ||
| status = "okay"; | ||
|
|
||
| ports { | ||
| port@0 { | ||
| reg = <0>; | ||
| csiphy0_ep: endpoint { | ||
| clock-lanes = <7>; | ||
| data-lanes = <0 1 2 3>; | ||
| remote-endpoint = <&rear_cam_ep>; | ||
| }; | ||
| }; | ||
| port@1 { | ||
| reg = <1>; | ||
| csiphy1_ep: endpoint { | ||
| clock-lanes = <7>; | ||
| data-lanes = <0 1>; | ||
| remote-endpoint = <&front_cam_ep>; | ||
| }; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| &cci { | ||
| pinctrl-names = "default"; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pinctrl-names comes after pinctrls-0 |
||
| pinctrl-0 = <&cci0_default>, | ||
| <&cci1_default>, | ||
| <&camss_mclk0_default>, | ||
| <&camss_mclk1_default>; | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &cci_i2c0 { | ||
| focus_rear: vcm@c { | ||
| compatible = "dongwoon,dw9718s"; | ||
| reg = <0x0c>; | ||
| vdd-supply = <&pm8937_l17>; | ||
| }; | ||
|
|
||
| camera@10 { | ||
| compatible = "ovti,ov5675"; | ||
| reg = <0x10>; | ||
|
|
||
| clocks = <&gcc GCC_CAMSS_MCLK1_CLK>; | ||
| clock-rates = <19200000>; | ||
|
|
||
| pinctrl-0 = <&cam_sensor_front_default>; | ||
| pinctrl-names = "default"; | ||
|
|
||
| reset-gpios = <&tlmm 40 GPIO_ACTIVE_LOW>; | ||
|
|
||
| avdd-supply = <&pm8937_l22>; | ||
| dvdd-supply = <&pm8937_l23>; | ||
| dovdd-supply = <&pm8937_l6>; | ||
|
|
||
| orientation = <0>; /* Front */ | ||
| rotation = <90>; | ||
|
|
||
| /* flash-leds = <&flash_front>; NOTYET: spmi-flash-led-v1 needs v4l2 support */ | ||
|
|
||
| port { | ||
| front_cam_ep: endpoint { | ||
| data-lanes = <0 1>; | ||
| link-frequencies = /bits/ 64 <450000000>; | ||
| remote-endpoint = <&csiphy1_ep>; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| camera@2d { | ||
| compatible = "samsung,s5k3l8"; | ||
| reg = <0x2d>; | ||
|
|
||
| clocks = <&gcc GCC_CAMSS_MCLK0_CLK>; | ||
| clock-frequency = <24000000>; | ||
|
|
||
| pinctrl-0 = <&cam_sensor_rear_default>; | ||
| pinctrl-names = "default"; | ||
|
|
||
| reset-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>; | ||
|
|
||
| avdd-supply = <&pm8937_l22>; | ||
| dvdd-supply = <&pm8937_l23>; | ||
| vio-supply = <&pm8937_l6>; | ||
| aux-supply = <&pm8937_l17>; | ||
|
|
||
| orientation = <1>; /* Rear */ | ||
| rotation = <270>; | ||
|
|
||
| lens-focus = <&focus_rear>; | ||
| /* flash-leds = <&flash_rear>; NOTYET: spmi-flash-led-v1 needs v4l2 support */ | ||
|
|
||
| port { | ||
| rear_cam_ep: endpoint { | ||
| data-lanes = <0 1 2 3>; | ||
| remote-endpoint = <&csiphy0_ep>; | ||
| }; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| &blsp1_i2c2 { | ||
| clock-frequency = <400000>; | ||
| status = "okay"; | ||
|
|
@@ -253,6 +355,30 @@ | |
| status = "okay"; | ||
| }; | ||
|
|
||
| &pmi8950_flash { | ||
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
| status = "okay"; | ||
|
|
||
| flash_rear: led@0 { | ||
| reg = <0>; | ||
| function = LED_FUNCTION_FLASH; | ||
| color = <LED_COLOR_ID_WHITE>; | ||
| led-max-microamp = <200000>; | ||
| flash-max-microamp = <1000000>; | ||
| flash-max-timeout-us = <1280000>; | ||
| }; | ||
|
|
||
| flash_front: led@1 { | ||
| reg = <1>; | ||
| function = LED_FUNCTION_FLASH; | ||
| color = <LED_COLOR_ID_WHITE>; | ||
| led-max-microamp = <200000>; | ||
| flash-max-microamp = <1000000>; | ||
| flash-max-timeout-us = <1280000>; | ||
| }; | ||
| }; | ||
|
|
||
| &pmi8950_smbcharger { | ||
| monitored-battery = <&battery>; | ||
| status = "okay"; | ||
|
|
@@ -429,6 +555,20 @@ | |
| &tlmm { | ||
| gpio-reserved-ranges = <20 4>; | ||
|
|
||
| cam_sensor_rear_default: cam-sensor-rear-default-state { | ||
| pins = "gpio35"; | ||
| function = "gpio"; | ||
| drive-strength = <2>; | ||
| bias-disable; | ||
| }; | ||
|
|
||
| cam_sensor_front_default: cam-sensor-front-default-state { | ||
| pins = "gpio40"; | ||
| function = "gpio"; | ||
| drive-strength = <2>; | ||
| bias-disable; | ||
| }; | ||
|
|
||
| gpio_keys_default: gpio-keys-default-state { | ||
| pins = "gpio91"; | ||
| function = "gpio"; | ||
|
|
||
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.
GPL-2.0should be replaced byGPL-2.0-only(orGPL-2.0-or-later)