lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200929094636.GA11333@kozik-lap>
Date:   Tue, 29 Sep 2020 11:46:36 +0200
From:   Krzysztof Kozlowski <krzk@...nel.org>
To:     Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc:     Mauro Carvalho Chehab <mchehab@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        NXP Linux Team <linux-imx@....com>,
        linux-media@...r.kernel.org, devicetree@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 1/4] dt-bindings: media: imx258: add bindings for
 IMX258 sensor

On Tue, Sep 29, 2020 at 12:40:46PM +0300, Sakari Ailus wrote:
> On Tue, Sep 29, 2020 at 11:18:46AM +0200, Krzysztof Kozlowski wrote:
> > On Tue, 29 Sep 2020 at 11:15, Sakari Ailus <sakari.ailus@...ux.intel.com> wrote:
> > >
> > > Hi Krzysztof,
> > >
> > > On Wed, Sep 23, 2020 at 05:21:26PM +0200, Krzysztof Kozlowski wrote:
> > > > Add bindings for the IMX258 camera sensor.  The bindings, just like the
> > > > driver, are quite limited, e.g. do not support regulator supplies.
> > > >
> > > > Signed-off-by: Krzysztof Kozlowski <krzk@...nel.org>
> > > >
> > > > ---
> > > >
> > > > Changes since v3:
> > > > 1. Document also two lane setup.
> > > >
> > > > Changes since v2:
> > > > 1. Remove clock-frequency, add reset GPIOs, add supplies.
> > >
> > > Oops. I missed this one.
> > >
> > > How does the driver know the appropriate clock frequency for the platform
> > > if it's not in DT? The sensor supports a range of frequencies, not a single
> > > frequency.
> > >
> > > Could you add clock-frequency back?
> > 
> > Not really, it was removed on Rob's request. The bindings do not
> > describe driver's behavior so how the driver gets frequency should not
> > be part of the bindings. Also it's not a real problem - the driver
> > just calls clk_get_rate().
> 
> How is the rate determined? I mean, many ISPs or CSI-2 receivers that
> provide the clock are also capable of using a variety of frequencies. But
> only one can be used on the platform in general.

Having "clock-frequency" property in DTS did not solve that. It has no
effect on actual frequency.

> 
> Where does it come from if it's not in DT?

The frequency is either chosen by consumer (imx258) or pre-assigned from
DT, but not with "clock-frequency" property. There are generic
properties for this: assigned-clocks, assigned-clock-rates and
assigned-clock-parents.

These properties should be added to DTS if additionalProperties is
false, which is the case here... so I could add them. My DTS anyway does
not use them, as the clock is generated internally on a camera board so
I don't have a control over it.

Best regards,
Krzysztof


> 
> Using another frequency generally leads to failure later on as the desired
> link frequency likely is not available for a random external clock
> frequency.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ