This patch series includes
- Fix for proper Y_OUT_SIZE register configuration.
- Power on/off sequence implementation through runtime PM.
- dt-binding doc update to move input clock and supplies as required
properties.
Delta between patch versions:
[v4]: Includes below v4 feedback
- Implemented power on/off through Runtime PM.
- Use regulator bulk APIs.
- Use lower case for supply names.
[v3]: Includes below v2 feedback
- Removed explicit clk_set_rate from driver as default external
input clock rate can be configured through DT.
[v2]: Includes below changes based on v1 feedback
- External input clock name changed from xclk to inck.
- implementation change for get regulators to store all in array.
- To keep in reset low prior to regulators power on.
Sowjanya Komatineni (4):
media: i2c: imx274: Fix Y_OUT_SIZE register setting
dt-bindings: media: imx274: Use lower case for supply names
dt-bindings: media: imx274: Move clock and supplies to required
properties
media: i2c: imx274: Add IMX274 power on and off sequence
.../devicetree/bindings/media/i2c/imx274.txt | 10 +-
drivers/media/i2c/imx274.c | 153 ++++++++++++++++++++-
2 files changed, 154 insertions(+), 9 deletions(-)
--
2.7.4
As per Sony IMX274 Y_OUT_SIZE should be the height of effective
image output from the sensor which are the actual total lines
sent over MIPI CSI to receiver.
So, Y_OUT_SIZE should be same as crop height and this patch fixes it.
Signed-off-by: Sowjanya Komatineni <[email protected]>
---
drivers/media/i2c/imx274.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/i2c/imx274.c b/drivers/media/i2c/imx274.c
index 6011cec..a4b9dfd 100644
--- a/drivers/media/i2c/imx274.c
+++ b/drivers/media/i2c/imx274.c
@@ -1163,7 +1163,7 @@ static int imx274_apply_trimming(struct stimx274 *imx274)
(-imx274->crop.top / 2) : (imx274->crop.top / 2);
v_cut = (IMX274_MAX_HEIGHT - imx274->crop.height) / 2;
write_v_size = imx274->crop.height + 22;
- y_out_size = imx274->crop.height + 14;
+ y_out_size = imx274->crop.height;
err = imx274_write_mbreg(imx274, IMX274_HMAX_REG_LSB, hmax, 2);
if (!err)
--
2.7.4
Clock and supplies are external to IMX274 sensor and are dependent
on camera module design.
So, this patch moves them to required properties.
Signed-off-by: Sowjanya Komatineni <[email protected]>
---
Documentation/devicetree/bindings/media/i2c/imx274.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/media/i2c/imx274.txt b/Documentation/devicetree/bindings/media/i2c/imx274.txt
index d0a5c899..b43bed6 100644
--- a/Documentation/devicetree/bindings/media/i2c/imx274.txt
+++ b/Documentation/devicetree/bindings/media/i2c/imx274.txt
@@ -10,15 +10,15 @@ at 1440 Mbps.
Required Properties:
- compatible: value should be "sony,imx274" for imx274 sensor
- reg: I2C bus address of the device
-
-Optional Properties:
-- reset-gpios: Sensor reset GPIO
- clocks: Reference to the input clock.
- clock-names: Should be "inck".
- vana-supply: Sensor 2.8v analog supply.
- vdig-supply: Sensor 1.8v digital core supply.
- vddl-supply: Sensor digital IO 1.2v supply.
+Optional Properties:
+- reset-gpios: Sensor reset GPIO
+
The imx274 device node should contain one 'port' child node with
an 'endpoint' subnode. For further reading on port node refer to
Documentation/devicetree/bindings/media/video-interfaces.txt.
--
2.7.4
Hi Sowjanya,
On Mon, Aug 31, 2020 at 12:52:37PM -0700, Sowjanya Komatineni wrote:
> Clock and supplies are external to IMX274 sensor and are dependent
> on camera module design.
>
> So, this patch moves them to required properties.
>
> Signed-off-by: Sowjanya Komatineni <[email protected]>
> ---
> Documentation/devicetree/bindings/media/i2c/imx274.txt | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/media/i2c/imx274.txt b/Documentation/devicetree/bindings/media/i2c/imx274.txt
> index d0a5c899..b43bed6 100644
> --- a/Documentation/devicetree/bindings/media/i2c/imx274.txt
> +++ b/Documentation/devicetree/bindings/media/i2c/imx274.txt
> @@ -10,15 +10,15 @@ at 1440 Mbps.
> Required Properties:
> - compatible: value should be "sony,imx274" for imx274 sensor
> - reg: I2C bus address of the device
> -
> -Optional Properties:
> -- reset-gpios: Sensor reset GPIO
> - clocks: Reference to the input clock.
> - clock-names: Should be "inck".
> - vana-supply: Sensor 2.8v analog supply.
> - vdig-supply: Sensor 1.8v digital core supply.
> - vddl-supply: Sensor digital IO 1.2v supply.
If these have been optional in the past I don't think we can start
requiring them now.
The framework will just give the driver a dummy regulator if one isn't
found.
>
> +Optional Properties:
> +- reset-gpios: Sensor reset GPIO
> +
> The imx274 device node should contain one 'port' child node with
> an 'endpoint' subnode. For further reading on port node refer to
> Documentation/devicetree/bindings/media/video-interfaces.txt.
--
Kind regards,
Sakari Ailus
Hi Sowjanya,
On Mon, Aug 31, 2020 at 12:52:37PM -0700, Sowjanya Komatineni wrote:
> Clock and supplies are external to IMX274 sensor and are dependent
> on camera module design.
>
> So, this patch moves them to required properties.
>
> Signed-off-by: Sowjanya Komatineni <[email protected]>
One more comment.
Jacopo has been working on converting this to YAML format. Could you rebase
your patch on his? I believe he's still working on some changes. The
subject is "[PATCH v3] dt-bindings: media: imx274: Convert to json-schema".
--
Kind regards,
Sakari Ailus
On 8/31/20 1:17 PM, Sakari Ailus wrote:
> Hi Sowjanya,
>
> On Mon, Aug 31, 2020 at 12:52:37PM -0700, Sowjanya Komatineni wrote:
>> Clock and supplies are external to IMX274 sensor and are dependent
>> on camera module design.
>>
>> So, this patch moves them to required properties.
>>
>> Signed-off-by: Sowjanya Komatineni <[email protected]>
>> ---
>> Documentation/devicetree/bindings/media/i2c/imx274.txt | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/media/i2c/imx274.txt b/Documentation/devicetree/bindings/media/i2c/imx274.txt
>> index d0a5c899..b43bed6 100644
>> --- a/Documentation/devicetree/bindings/media/i2c/imx274.txt
>> +++ b/Documentation/devicetree/bindings/media/i2c/imx274.txt
>> @@ -10,15 +10,15 @@ at 1440 Mbps.
>> Required Properties:
>> - compatible: value should be "sony,imx274" for imx274 sensor
>> - reg: I2C bus address of the device
>> -
>> -Optional Properties:
>> -- reset-gpios: Sensor reset GPIO
>> - clocks: Reference to the input clock.
>> - clock-names: Should be "inck".
>> - vana-supply: Sensor 2.8v analog supply.
>> - vdig-supply: Sensor 1.8v digital core supply.
>> - vddl-supply: Sensor digital IO 1.2v supply.
> If these have been optional in the past I don't think we can start
> requiring them now.
>
> The framework will just give the driver a dummy regulator if one isn't
> found.
These were added recently with my patches. So I hope should be ok to
make them required as they are external to sensor
>
>>
>> +Optional Properties:
>> +- reset-gpios: Sensor reset GPIO
>> +
>> The imx274 device node should contain one 'port' child node with
>> an 'endpoint' subnode. For further reading on port node refer to
>> Documentation/devicetree/bindings/media/video-interfaces.txt.
On Mon, Aug 31, 2020 at 01:37:21PM -0700, Sowjanya Komatineni wrote:
>
> On 8/31/20 1:17 PM, Sakari Ailus wrote:
> > Hi Sowjanya,
> >
> > On Mon, Aug 31, 2020 at 12:52:37PM -0700, Sowjanya Komatineni wrote:
> > > Clock and supplies are external to IMX274 sensor and are dependent
> > > on camera module design.
> > >
> > > So, this patch moves them to required properties.
> > >
> > > Signed-off-by: Sowjanya Komatineni <[email protected]>
> > > ---
> > > Documentation/devicetree/bindings/media/i2c/imx274.txt | 6 +++---
> > > 1 file changed, 3 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/Documentation/devicetree/bindings/media/i2c/imx274.txt b/Documentation/devicetree/bindings/media/i2c/imx274.txt
> > > index d0a5c899..b43bed6 100644
> > > --- a/Documentation/devicetree/bindings/media/i2c/imx274.txt
> > > +++ b/Documentation/devicetree/bindings/media/i2c/imx274.txt
> > > @@ -10,15 +10,15 @@ at 1440 Mbps.
> > > Required Properties:
> > > - compatible: value should be "sony,imx274" for imx274 sensor
> > > - reg: I2C bus address of the device
> > > -
> > > -Optional Properties:
> > > -- reset-gpios: Sensor reset GPIO
> > > - clocks: Reference to the input clock.
> > > - clock-names: Should be "inck".
> > > - vana-supply: Sensor 2.8v analog supply.
> > > - vdig-supply: Sensor 1.8v digital core supply.
> > > - vddl-supply: Sensor digital IO 1.2v supply.
> > If these have been optional in the past I don't think we can start
> > requiring them now.
> >
> > The framework will just give the driver a dummy regulator if one isn't
> > found.
> These were added recently with my patches. So I hope should be ok to make
> them required as they are external to sensor
The bindings were added back in 2017, so they're not really recent.
--
Sakari Ailus
On 8/31/20 1:37 PM, Sowjanya Komatineni wrote:
>
> On 8/31/20 1:17 PM, Sakari Ailus wrote:
>> Hi Sowjanya,
>>
>> On Mon, Aug 31, 2020 at 12:52:37PM -0700, Sowjanya Komatineni wrote:
>>> Clock and supplies are external to IMX274 sensor and are dependent
>>> on camera module design.
>>>
>>> So, this patch moves them to required properties.
>>>
>>> Signed-off-by: Sowjanya Komatineni <[email protected]>
>>> ---
>>> Documentation/devicetree/bindings/media/i2c/imx274.txt | 6 +++---
>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/media/i2c/imx274.txt
>>> b/Documentation/devicetree/bindings/media/i2c/imx274.txt
>>> index d0a5c899..b43bed6 100644
>>> --- a/Documentation/devicetree/bindings/media/i2c/imx274.txt
>>> +++ b/Documentation/devicetree/bindings/media/i2c/imx274.txt
>>> @@ -10,15 +10,15 @@ at 1440 Mbps.
>>> Required Properties:
>>> - compatible: value should be "sony,imx274" for imx274 sensor
>>> - reg: I2C bus address of the device
>>> -
>>> -Optional Properties:
>>> -- reset-gpios: Sensor reset GPIO
>>> - clocks: Reference to the input clock.
>>> - clock-names: Should be "inck".
>>> - vana-supply: Sensor 2.8v analog supply.
>>> - vdig-supply: Sensor 1.8v digital core supply.
>>> - vddl-supply: Sensor digital IO 1.2v supply.
>> If these have been optional in the past I don't think we can start
>> requiring them now.
>>
>> The framework will just give the driver a dummy regulator if one isn't
>> found.
> These were added recently with my patches. So I hope should be ok to
> make them required as they are external to sensor
Also made them required as they are external to sensor and also to use
bulk_enable/disable APIs, devm_regulator_bulk_get()
does not use OPTIONAL_GET.
>>
>>> +Optional Properties:
>>> +- reset-gpios: Sensor reset GPIO
>>> +
>>> The imx274 device node should contain one 'port' child node with
>>> an 'endpoint' subnode. For further reading on port node refer to
>>> Documentation/devicetree/bindings/media/video-interfaces.txt.
On 8/31/20 1:26 PM, Sakari Ailus wrote:
> Hi Sowjanya,
>
> On Mon, Aug 31, 2020 at 12:52:37PM -0700, Sowjanya Komatineni wrote:
>> Clock and supplies are external to IMX274 sensor and are dependent
>> on camera module design.
>>
>> So, this patch moves them to required properties.
>>
>> Signed-off-by: Sowjanya Komatineni <[email protected]>
> One more comment.
>
> Jacopo has been working on converting this to YAML format. Could you rebase
> your patch on his? I believe he's still working on some changes. The
> subject is "[PATCH v3] dt-bindings: media: imx274: Convert to json-schema".
Sure, will keep them as optional and will rebase dt-bindings on
json-schema patch