Document bindings for camera modules and associated flash devices
Subsystems (2)
cover Document bindings for camera modules and associated flash devices
Hi folks,
This RFC patchset documents properties commonly required by camera modules and associated camera flash devices.
The camera module is essentially a package consisting of an image sensor, a lens, possibly a voice coil to move the lens and a number of other things that at least the drivers need not to know of. All the devices in a camera module are declared separately in the system and as such the fact that they come in a single package isn't generally very useful to driver software.
I'm sending the set as RFC as there's no driver implementation, and a dependency to the V4L2 async changes:
<URL:http://www.spinics.net/lists/linux-media/msg114915.html>
Signature · 7 lines
Regards, Sakari -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1493720749-31509-1-git-send-email-sakari.ailus-VuQAYsv1563Yd54FQh9/[email protected]
RFC 1/3 dt: bindings: Add a binding for flash devices associated to a sensor
Camera flash drivers (and LEDs) are separate from the sensor devices in DT. In order to make an association between the two, provide the association information to the software.
--- Documentation/devicetree/bindings/media/video-interfaces.txt | 11 +++++++++++ 1 file changed, 11 insertions(+)
Documentation/devicetree/bindings/media/video-interfaces.txt +11 -0
@@ -67,6 +67,17 @@ are required in a relevant parent node: identifier, should be 1. - #size-cells : should be zero. + +Optional properties +------------------- + +- flash: An array of phandles that refer to the flash light sources + related to an image sensor. These could be e.g. LEDs. In case the LED + driver drives more than a single LED, then the phandles here refer to + the child nodes of the LED driver describing individual LEDs. Only + valid for device nodes that are related to an image sensor. + + Optional endpoint properties ----------------------------
Signature · 6 lines
2.7.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC 1/3] dt: bindings: Add a binding for flash devices associated to a sensor
Hi Sakari,
Quoted 16 lines · Sakari Ailus
Camera flash drivers (and LEDs) are separate from the sensor devices in DT. In order to make an association between the two, provide the association information to the software.
Signed-off-by Sakari Ailus <[email protected]>--- Documentation/devicetree/bindings/media/video-interfaces.txt | 11 +++++++++++ 1 file changed, 11 insertions(+)Documentation/devicetree/bindings/media/video-interfaces.txt +0
-0@@ -67,6 +67,17 @@ are required in a relevant parent node: identifier, should be 1. - #size-cells : should be zero.
Documentation/devicetree/bindings/media/video-interfaces.txt are required in a relevant parent node: · line 78
Quoted 10 lines
Documentation/devicetree/bindings/media/video-interfaces.txt +9
-0+ +Optional properties +------------------- + +- flash: An array of phandles that refer to the flash light sources + related to an image sensor. These could be e.g. LEDs. In case the LED + driver drives more than a single LED, then the phandles here refer to + the child nodes of the LED driver describing individual LEDs. Only + valid for device nodes that are related to an image sensor.
s/driver/controller/g - DT describes HW. Otherwise
-- Sebastian
Re: [RFC 1/3] dt: bindings: Add a binding for flash devices associated to a sensor
Hi Sebastian,
Quoted 20 lines · Sebastian Reichel
Hi Sakari,
Quoted 17 lines · Sakari Ailus
Camera flash drivers (and LEDs) are separate from the sensor devices in DT. In order to make an association between the two, provide the association information to the software.
Signed-off-by Sakari Ailus <[email protected]>--- Documentation/devicetree/bindings/media/video-interfaces.txt | 11 +++++++++++ 1 file changed, 11 insertions(+)Documentation/devicetree/bindings/media/video-interfaces.txt +0
-0@@ -67,6 +67,17 @@ are required in a relevant parent node: identifier, should be 1. - #size-cells : should be zero.
Quoted 11 lines
Documentation/devicetree/bindings/media/video-interfaces.txt are required in a relevant parent node: · line 78
Quoted 9 lines
Documentation/devicetree/bindings/media/video-interfaces.txt +9
-0+ +Optional properties +------------------- + +- flash: An array of phandles that refer to the flash light sources + related to an image sensor. These could be e.g. LEDs. In case the LED + driver drives more than a single LED, then the phandles here refer to + the child nodes of the LED driver describing individual LEDs. Only + valid for device nodes that are related to an image sensor.s/driver/controller/g - DT describes HW. Otherwise
Driver is hardware in this case. :-) The chip that acts as a current sink or source for the LED is the driver. E.g. the adp1653 documentation describes the chip as "Compact, High Efficiency, High Power, Flash/Torch LED Driver with Dual Interface".
It might be still possible to improve the wording. Software oriented folks are more likely to misunderstand the meaning of driver here, but controller might seem ambiguous for hardware oriented people.
How about:
- flash: An array of phandles that refer to the flash light sources related to an image sensor. These could be e.g. LEDs. In case the LED driver (current sink or source chip for the LED(s)) drives more than a single LED, then the phandles here refer to the child nodes of the LED driver describing individual LEDs. Only valid for device nodes that are related to an image sensor.
Signature · 4 lines
Regards, Sakari Ailus [email protected]
Sebastian Reichel
Reviewed-byRe: [RFC 1/3] dt: bindings: Add a binding for flash devices associated to a sensor
Hi,
Quoted 19 lines · Sakari Ailus
Quoted 8 lines · Sebastian Reichel
Documentation/devicetree/bindings/media/video-interfaces.txt are required in a relevant parent node: · line 78
Quoted 5 lines · Sakari Ailus
+- flash: An array of phandles that refer to the flash light sources
Documentation/devicetree/bindings/media/video-interfaces.txt +4
-0+ related to an image sensor. These could be e.g. LEDs. In case the LED + driver drives more than a single LED, then the phandles here refer to + the child nodes of the LED driver describing individual LEDs. Only + valid for device nodes that are related to an image sensor.s/driver/controller/g - DT describes HW. Otherwise
Driver is hardware in this case. :-) The chip that acts as a current sink or source for the LED is the driver. E.g. the adp1653 documentation describes the chip as "Compact, High Efficiency, High Power, Flash/Torch LED Driver with Dual Interface".
It might be still possible to improve the wording. Software oriented folks are more likely to misunderstand the meaning of driver here, but controller might seem ambiguous for hardware oriented people.
Quoted 8 lines
How about:
- flash: An array of phandles that refer to the flash light sources related to an image sensor. These could be e.g. LEDs. In case the LED driver (current sink or source chip for the LED(s)) drives more than a single LED, then the phandles here refer to the child nodes of the LED driver describing individual LEDs. Only valid for device nodes that are related to an image sensor.
Maybe drop the last sentence? The requirement is already in the first one. Otherwise:
-- Sebastian
RFC 2/3 dt: bindings: Add lens-focus binding for image sensors
In reply to a message not in the archiveThe lens-focus property contains a phandle to the lens voice coil driver that is associated to the sensor; typically both are contained in the same camera module.
--- Documentation/devicetree/bindings/media/video-interfaces.txt | 3 +++ 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/media/video-interfaces.txt +3 -0
@@ -77,6 +77,9 @@ Optional properties the child nodes of the LED driver describing individual LEDs. Only valid for device nodes that are related to an image sensor. +- lens-focus: A phandle to the node of the lens. Only valid for device + nodes that are related to an image sensor. + Optional endpoint properties ----------------------------
Signature · 6 lines
2.7.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC 2/3] dt: bindings: Add lens-focus binding for image sensors
Hi,
Quoted 14 lines · Sakari Ailus
The lens-focus property contains a phandle to the lens voice coil driver that is associated to the sensor; typically both are contained in the same camera module.
Signed-off-by Sakari Ailus <[email protected]>--- Documentation/devicetree/bindings/media/video-interfaces.txt | 3 +++ 1 file changed, 3 insertions(+)Documentation/devicetree/bindings/media/video-interfaces.txt +0
-0
Documentation/devicetree/bindings/media/video-interfaces.txt Optional properties · line 81
Quoted 5 lines
Documentation/devicetree/bindings/media/video-interfaces.txt +2
-0@@ -77,6 +77,9 @@ Optional properties the child nodes of the LED driver describing individual LEDs. Only valid for device nodes that are related to an image sensor. +- lens-focus: A phandle to the node of the lens. Only valid for device + nodes that are related to an image sensor.
s/of the lens/of the focus lens controller/
Also I wonder about the second sentence. That sentence could basically be added to every property, so can't we just drop it?
-- Sebastian
RFC 3/3 dt: bindings: Add a binding for referencing EEPROM from camera sensors
In reply to a message not in the archiveMany camera sensor devices contain EEPROM chips that describe the properties of a given unit --- the data is specific to a given unit can thus is not stored e.g. in user space or the driver.
Some sensors embed the EEPROM chip and it can be accessed through the sensor's I²C interface. This property is to be used for devices where the EEPROM chip is accessed through a different I²C address than the sensor.
The intent is to later provide this information to the user space.
--- Documentation/devicetree/bindings/media/video-interfaces.txt | 3 +++ 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/media/video-interfaces.txt +3 -0
@@ -80,6 +80,9 @@ Optional properties - lens-focus: A phandle to the node of the lens. Only valid for device nodes that are related to an image sensor. +- eeprom: A phandle to the node of the related EEPROM. Only valid for + device nodes that are related to an image sensor. + Optional endpoint properties ----------------------------
Signature · 6 lines
2.7.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1493720749-31509-4-git-send-email-sakari.ailus-VuQAYsv1563Yd54FQh9/[email protected]
Re: [RFC 3/3] dt: bindings: Add a binding for referencing EEPROM from camera sensors
Hi,
Quoted 20 lines · Sakari Ailus
Many camera sensor devices contain EEPROM chips that describe the properties of a given unit --- the data is specific to a given unit can thus is not stored e.g. in user space or the driver.
Some sensors embed the EEPROM chip and it can be accessed through the sensor's I²C interface. This property is to be used for devices where the EEPROM chip is accessed through a different I²C address than the sensor.
The intent is to later provide this information to the user space.
--- Documentation/devicetree/bindings/media/video-interfaces.txt | 3 +++ 1 file changed, 3 insertions(+)Documentation/devicetree/bindings/media/video-interfaces.txt +0
-0
Documentation/devicetree/bindings/media/video-interfaces.txt Optional properties · line 84
Quoted 5 lines
Documentation/devicetree/bindings/media/video-interfaces.txt +2
-0@@ -80,6 +80,9 @@ Optional properties - lens-focus: A phandle to the node of the lens. Only valid for device nodes that are related to an image sensor. +- eeprom: A phandle to the node of the related EEPROM. Only valid for + device nodes that are related to an image sensor.
Here it's even more obvious, that the second sentence is redundant. The requirement is already in the first sentence :) Instead it should be mentioned, that this is to be used by devices not having their own embedded eeprom. How about:
eeprom: A phandle to the node of the EEPROM describing the camera sensor (i.e. device specific calibration data), in case it differs from the sensor node.
-- Sebastian
Re: [RFC 3/3] dt: bindings: Add a binding for referencing EEPROM from camera sensors
Quoted 34 lines · Sebastian Reichel
Hi,
Quoted 20 lines · Sakari Ailus
Many camera sensor devices contain EEPROM chips that describe the properties of a given unit --- the data is specific to a given unit can thus is not stored e.g. in user space or the driver.
Some sensors embed the EEPROM chip and it can be accessed through the sensor's I²C interface. This property is to be used for devices where the EEPROM chip is accessed through a different I²C address than the sensor.
The intent is to later provide this information to the user space.
Signed-off-by Sakari Ailus <[email protected]>--- Documentation/devicetree/bindings/media/video-interfaces.txt | 3 +++ 1 file changed, 3 insertions(+)Documentation/devicetree/bindings/media/video-interfaces.txt +0
-0Documentation/devicetree/bindings/media/video-interfaces.txt Optional properties · line 84
Quoted 5 lines
Documentation/devicetree/bindings/media/video-interfaces.txt +2
-0@@ -80,6 +80,9 @@ Optional properties - lens-focus: A phandle to the node of the lens. Only valid for device nodes that are related to an image sensor. +- eeprom: A phandle to the node of the related EEPROM. Only valid for + device nodes that are related to an image sensor.Here it's even more obvious, that the second sentence is redundant. The requirement is already in the first sentence :) Instead it should be mentioned, that this is to be used by devices not having their own embedded eeprom. How about:
Quoted 3 lines
eeprom: A phandle to the node of the EEPROM describing the camera sensor (i.e. device specific calibration data), in case it differs from the sensor node.
Ack. I addressed the rest of the feedback, too, and posted RFC v2.
Signature · 2 lines
Sakari Ailus e-mail: [email protected] XMPP: [email protected]
Pavel Machek
Acked-byHi!
Quoted 10 lines
This RFC patchset documents properties commonly required by camera modules and associated camera flash devices.
The camera module is essentially a package consisting of an image sensor, a lens, possibly a voice coil to move the lens and a number of other things that at least the drivers need not to know of. All the devices in a camera module are declared separately in the system and as such the fact that they come in a single package isn't generally very useful to driver software.
Quoted 4 lines
I'm sending the set as RFC as there's no driver implementation, and a dependency to the V4L2 async changes:
<URL:http://www.spinics.net/lists/linux-media/msg114915.html>
For the series,
In 3/3, I'd avoid using strange characters in the changelog. Just write it as I2C... If someone ever tries to grep the changelogs, this could bite them.
Thanks,
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html