Linux Media Controller development
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	Devarsh Thakkar <devarsht@ti.com>,
	Jai Luthra <jai.luthra@ideasonboard.com>
Subject: Re: [PATCH 16/19] media: i2c: ds90ub960: Enable SSCG for UB9702
Date: Thu, 16 Jan 2025 12:05:31 +0200	[thread overview]
Message-ID: <d233005f-a43e-437c-ad8d-2e4505da3593@ideasonboard.com> (raw)
In-Reply-To: <Z4jYPHQx6C6rQw2U@kekkonen.localdomain>

Hi,

On 16/01/2025 11:58, Sakari Ailus wrote:
> Moi,
> 
> On Wed, Jan 15, 2025 at 06:04:40PM +0200, Tomi Valkeinen wrote:
>> On 15/01/2025 16:26, Sakari Ailus wrote:
>>> Moi,
>>>
>>> On Fri, Jan 10, 2025 at 11:14:16AM +0200, Tomi Valkeinen wrote:
>>>> From: Jai Luthra <jai.luthra@ideasonboard.com>
>>>>
>>>> UB9702 supports spread-spectrum clock generation for the back-channel
>>>> clock, which is futher used by serializers in synchronous mode to
>>>> generate the forward-channel clock, which can help reduce peak EMI
>>>> energy. The SSCG is common to all RX ports, so it can only be used if
>>>> all the ports are in the same mode.
>>>>
>>>> Add basic support for SSCG by adding a module parameter to enable the
>>>> SSCG. The SSCG uses hardcoded configurationg, with 0.5% center-spread at
>>>> 33kHz modulation rate. See datasheet if different configuration is
>>>> required.
>>>>
>>>> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
>>>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
>>>> ---
>>>>    drivers/media/i2c/ds90ub960.c | 102 ++++++++++++++++++++++++++++++++++++++++++
>>>>    1 file changed, 102 insertions(+)
>>>>
>>>> diff --git a/drivers/media/i2c/ds90ub960.c b/drivers/media/i2c/ds90ub960.c
>>>> index f6d6c2fe12cd..a534d077f045 100644
>>>> --- a/drivers/media/i2c/ds90ub960.c
>>>> +++ b/drivers/media/i2c/ds90ub960.c
>>>> @@ -52,6 +52,10 @@
>>>>    #include <media/v4l2-fwnode.h>
>>>>    #include <media/v4l2-subdev.h>
>>>> +static bool ub960_enable_sscg;
>>>> +module_param_named(enable_sscg, ub960_enable_sscg, bool, 0644);
>>>> +MODULE_PARM_DESC(enable_sscg, "Enable SSCG (if available)");
>>>
>>> Shouldn't this come from DT instead?
>>
>> SSCG is an option to use or not to use, based on what the user wants. DT
>> should describe the hardware.
>>
>> A module parameter is bad for this, though, as it's then used for all ub960
>> devices... But I'm not sure what other options we have. We need to have it
>> at probe time.
>>
>> Probably the whole driver could be changed to not connect the serializers at
>> probe, but instead would offer a set of userspace APIs to enable/disable
>> SSCG, and to enable the links. But that brings in its own set of problems,
>> as the links are used for i2c communication to the ser and sensor, not to
>> mention new userspace APIs which always complicates things.
> 
> Typically determining whether you need spread spectrum signalling is highly
> specific to the board. I wonder if this topic has been discussed (and
> possibly somehow resolved) for other subsystems. CSI-2 appears to allow for
> spread spectrum clocks but I don't think I've seen that implemeted
> anywhere, scrambling may be more popular (but also that is right now
> unsupported but could be supported, probably this would be best to consider
> in conjunction with other CSI-2 parameters).

Well, I personally would rather have this option in the DT, so I'm all 
for it =). We can change this to a DT parameter, and see how the DT 
maintainers react.

  Tomi


  reply	other threads:[~2025-01-16 10:05 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-10  9:14 [PATCH 00/19] media: i2c: ds90ub9xx: Error handling, UB9702 improvements Tomi Valkeinen
2025-01-10  9:14 ` [PATCH 01/19] media: i2c: ds90ub953: Fix error prints Tomi Valkeinen
2025-01-10  9:14 ` [PATCH 02/19] media: i2c: ds90ub913: Align ub913_read() with other similar functions Tomi Valkeinen
2025-01-10  9:14 ` [PATCH 03/19] media: i2c: ds90ub9xx: Add err parameter to read/write funcs Tomi Valkeinen
2025-01-10  9:14 ` [PATCH 04/19] media: i2c: ds90ub960: Add error handling to multiple places Tomi Valkeinen
2025-01-10  9:14 ` [PATCH 05/19] media: i2c: ds90ub953: Add error handling to ub953_log_status() Tomi Valkeinen
2025-01-10  9:14 ` [PATCH 06/19] media: i2c: ds90ub913: Add error handling to ub913_log_status() Tomi Valkeinen
2025-01-10  9:14 ` [PATCH 07/19] media: i2c: ds90ub953: Speed-up I2C watchdog timer Tomi Valkeinen
2025-01-15 14:17   ` Sakari Ailus
2025-01-24 13:19     ` Tomi Valkeinen
2025-02-03  9:23       ` Sakari Ailus
2025-01-10  9:14 ` [PATCH 08/19] media: i2c: ds90ub960: Move UB9702 registers to a separate section Tomi Valkeinen
2025-01-10  9:14 ` [PATCH 09/19] media: i2c: ds90ub960: Add UB9702 specific registers Tomi Valkeinen
2025-01-10  9:14 ` [PATCH 10/19] media: i2c: ds90ub960: Split ub960_init_tx_ports() Tomi Valkeinen
2025-01-10  9:14 ` [PATCH 11/19] media: i2c: ds90ub960: Refresh ub960_init_tx_ports_ub9702() Tomi Valkeinen
2025-01-10  9:14 ` [PATCH 12/19] media: i2c: ds90ub960: Add RX port iteration support Tomi Valkeinen
2025-01-15 14:23   ` Sakari Ailus
2025-01-24 13:34     ` Tomi Valkeinen
2025-02-03  9:27       ` Sakari Ailus
2025-01-10  9:14 ` [PATCH 13/19] media: i2c: ds90ub960: Move all RX port init code into ub960_init_rx_ports() Tomi Valkeinen
2025-01-15 14:25   ` Sakari Ailus
2025-01-24 13:23     ` Tomi Valkeinen
2025-01-10  9:14 ` [PATCH 14/19] media: i2c: ds90ub960: Remove old ub9702 RX port init code (SQUASH) Tomi Valkeinen
2025-01-10  9:14 ` [PATCH 15/19] media: i2c: ds90ub960: Update UB9702 init sequences Tomi Valkeinen
2025-01-10  9:14 ` [PATCH 16/19] media: i2c: ds90ub960: Enable SSCG for UB9702 Tomi Valkeinen
2025-01-15 14:26   ` Sakari Ailus
2025-01-15 16:04     ` Tomi Valkeinen
2025-01-16  9:58       ` Sakari Ailus
2025-01-16 10:05         ` Tomi Valkeinen [this message]
2025-01-10  9:14 ` [PATCH 17/19] media: dt-bindings: ti,ds90ub960: Add "i2c-addr" link property Tomi Valkeinen
2025-01-11 10:31   ` Krzysztof Kozlowski
2025-01-14 11:50     ` Tomi Valkeinen
2025-01-15  8:40       ` Krzysztof Kozlowski
2025-01-15 17:19         ` Tomi Valkeinen
2025-01-15 20:25           ` Krzysztof Kozlowski
2025-01-15 15:53       ` Konstantin Ryabitsev
2025-01-15 16:09         ` Tomi Valkeinen
2025-01-15 16:46           ` Krzysztof Kozlowski
2025-01-15 17:14             ` Tomi Valkeinen
2025-01-10  9:14 ` [PATCH 18/19] media: i2c: ds90ub960: Configure serializer using back-channel Tomi Valkeinen
2025-01-15 14:29   ` Sakari Ailus
2025-01-24 13:29     ` Tomi Valkeinen
2025-02-03  9:28       ` Sakari Ailus
2025-01-10  9:14 ` [PATCH 19/19] media: i2c: ds90ub9xx: Set serializer temperature ramp Tomi Valkeinen

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=d233005f-a43e-437c-ad8d-2e4505da3593@ideasonboard.com \
    --to=tomi.valkeinen@ideasonboard.com \
    --cc=devarsht@ti.com \
    --cc=jai.luthra@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /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