mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Julien Massot <julien.massot@collabora.com>
To: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org
Subject: Re: [PATCH 1/5] media/i2c: max96717: change internal regulator voltage
Date: Tue, 18 Feb 2025 14:14:57 +0100	[thread overview]
Message-ID: <57262be8baee2e5c08ed7ba88cfa2716ef0138bb.camel@collabora.com> (raw)
In-Reply-To: <20250207112958.2571600-2-laurentiu.palcu@oss.nxp.com>

Hi Laurentiu,

Thanks for your patch,
On Fri, 2025-02-07 at 13:29 +0200, Laurentiu Palcu wrote:
> The Programming Notes section of the specifications states:
> 
> """
> MANDATORY REGISTER PROGRAMMING
> Make the following register writes to ensure proper operation of the
> MAX96717F. Without these writes, the operation of the device specified
> in the data sheet cannot be guaranteed.
> Set bits [6:4] = 3'b001 in register 0x302
> """
> 
> Set this register before going on with the chip initialization.
> 
> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
> ---
>  drivers/media/i2c/max96717.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/drivers/media/i2c/max96717.c b/drivers/media/i2c/max96717.c
> index 9259d58ba734e..b1116aade0687 100644
> --- a/drivers/media/i2c/max96717.c
> +++ b/drivers/media/i2c/max96717.c
> @@ -78,6 +78,15 @@
>  #define MAX96717_GPIO_TX_EN       BIT(1)
>  #define MAX96717_GPIO_OUT_DIS     BIT(0)
>  
> +/* CMU */
> +#define MAX96717_CMU_CMU2		CCI_REG8(0x0302)
> +#define MAX96717_PFDDIV_RSHORT_MASK	GENMASK(6, 4)
> +#define MAX96717_PFDDIV_RSHORT_SHIFT	4
> +#define MAX96717_PFDDIV_VREG_1V0	0
> +#define MAX96717_PFDDIV_VREG_1V1	1
> +#define MAX96717_PFDDIV_VREG_0V875	2
> +#define MAX96717_PFDDIV_VREG_0V94	3
> +
>  /* FRONTTOP */
>  /* MAX96717 only have CSI port 'B' */
>  #define MAX96717_FRONTOP0     CCI_REG8(0x308)
> @@ -981,6 +990,14 @@ static int max96717_hw_init(struct max96717_priv *priv)
>  	dev_dbg(dev, "Found %x (rev %lx)\n", (u8)dev_id,
>  		(u8)val & MAX96717_DEV_REV_MASK);
>  
> +	/*
> +	 * According to specs, in the Programming Notes section, there's a mandatory register
> +	 * programming notice that advises to enable the 1.1V internal regulator to guarantee
> proper
> +	 * device operation. Let's do this before any other operations.
> +	 */
Latest MAX96717{,K,F} revision 6 seems not affected by this issue. Can you please make this write
conditional to rev < 6 ? Register 0xe.

> +	cci_write(priv->regmap, MAX96717_CMU_CMU2,
> +		  MAX96717_PFDDIV_VREG_1V1 << MAX96717_PFDDIV_RSHORT_SHIFT, NULL);
> +
>  	ret = cci_read(priv->regmap, MAX96717_MIPI_RX_EXT11, &val, NULL);
>  	if (ret)
>  		return dev_err_probe(dev, ret,
Regards,
-- 
Julien

  reply	other threads:[~2025-02-18 13:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-07 11:29 [PATCH 0/5] media/i2c: max96717: a few changes Laurentiu Palcu
2025-02-07 11:29 ` [PATCH 1/5] media/i2c: max96717: change internal regulator voltage Laurentiu Palcu
2025-02-18 13:14   ` Julien Massot [this message]
2025-03-06  8:11     ` Laurentiu Palcu
2025-02-07 11:29 ` [PATCH 2/5] media/i2c: max96717: implement the .get_frame_desc() operation Laurentiu Palcu
2025-02-18 13:29   ` Julien Massot
2025-03-06  8:14     ` Laurentiu Palcu
2025-02-07 11:29 ` [PATCH 3/5] dt-bindings: i2c: maxim,max96717: add new properties Laurentiu Palcu
2025-02-11 18:46   ` Conor Dooley
2025-02-12 17:42     ` Rob Herring
2025-02-12 20:11       ` Conor Dooley
2025-02-12 17:42   ` Rob Herring (Arm)
2025-02-18 13:54   ` Julien Massot
2025-03-06  8:24     ` Laurentiu Palcu
2025-03-13  7:41       ` Julien Massot
2025-02-07 11:29 ` [PATCH 4/5] media/i2c: max96717: add FSYNC support Laurentiu Palcu
2025-02-18 14:46   ` Julien Massot
2025-03-06  8:30     ` Laurentiu Palcu
2025-02-07 11:29 ` [PATCH 5/5] media/i2c: max96717: allow user to override operation mode from DT Laurentiu Palcu
2025-02-18 15:21   ` Julien Massot
2025-03-06  8:42     ` Laurentiu Palcu
2025-03-13  7:46       ` Julien Massot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57262be8baee2e5c08ed7ba88cfa2716ef0138bb.camel@collabora.com \
    --to=julien.massot@collabora.com \
    --cc=laurentiu.palcu@oss.nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®