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] [day] [month] [year] [list]
Message-ID: <20240212151449.GA379868-robh@kernel.org>
Date: Mon, 12 Feb 2024 09:14:49 -0600
From: Rob Herring <robh@...nel.org>
To: Chen Wang <unicorn_wang@...look.com>
Cc: Chen Wang <unicornxw@...il.com>, aou@...s.berkeley.edu,
	chao.wei@...hgo.com, conor@...nel.org,
	krzysztof.kozlowski+dt@...aro.org, mturquette@...libre.com,
	palmer@...belt.com, paul.walmsley@...ive.com,
	richardcochran@...il.com, sboyd@...nel.org,
	devicetree@...r.kernel.org, linux-clk@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org,
	haijiao.liu@...hgo.com, xiaoguang.xing@...hgo.com,
	guoren@...nel.org, jszhang@...nel.org, inochiama@...look.com,
	samuel.holland@...ive.com
Subject: Re: [PATCH v9 2/5] dt-bindings: clock: sophgo: add RP gate clocks
 for SG2042

On Tue, Feb 06, 2024 at 08:57:27PM +0800, Chen Wang wrote:
> 
> On 2024/2/6 1:24, Rob Herring wrote:
> > On Fri, Feb 02, 2024 at 02:42:02PM +0800, Chen Wang wrote:
> > > From: Chen Wang <unicorn_wang@...look.com>
> > > 
> > > Add bindings for the gate clocks of RP subsystem for Sophgo SG2042.
> > > 
> > > Signed-off-by: Chen Wang <unicorn_wang@...look.com>
> > > ---
> > >   .../bindings/clock/sophgo,sg2042-rpgate.yaml  | 37 ++++++++++++
> > >   .../dt-bindings/clock/sophgo,sg2042-rpgate.h  | 58 +++++++++++++++++++
> > >   2 files changed, 95 insertions(+)
> > >   create mode 100644 Documentation/devicetree/bindings/clock/sophgo,sg2042-rpgate.yaml
> > >   create mode 100644 include/dt-bindings/clock/sophgo,sg2042-rpgate.h
> > > 
> > > diff --git a/Documentation/devicetree/bindings/clock/sophgo,sg2042-rpgate.yaml b/Documentation/devicetree/bindings/clock/sophgo,sg2042-rpgate.yaml
> > > new file mode 100644
> > > index 000000000000..69ce3a64f66c
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/clock/sophgo,sg2042-rpgate.yaml
> > > @@ -0,0 +1,37 @@
> > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/clock/sophgo,sg2042-rpgate.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Sophgo SG2042 Gate Clock Generator for RP(riscv processors) subsystem
> > > +
> > > +maintainers:
> > > +  - Chen Wang <unicorn_wang@...look.com>
> > > +
> > > +properties:
> > > +  compatible:
> > > +    const: sophgo,sg2042-rpgate
> > > +
> > > +  reg:
> > > +    maxItems: 1
> > > +
> > > +  '#clock-cells':
> > > +    const: 1
> > > +    description:
> > > +      See <dt-bindings/clock/sophgo,sg2042-rpgate.h> for valid indices.
> > > +
> > > +required:
> > > +  - compatible
> > > +  - reg
> > > +  - '#clock-cells'
> > > +
> > > +additionalProperties: false
> > > +
> > > +examples:
> > > +  - |
> > > +    clock-controller@...00000 {
> > > +      compatible = "sophgo,sg2042-rpgate";
> > > +      reg = <0x10000000 0x10000>;
> > > +      #clock-cells = <1>;
> > No input clocks?
> 
> I think it should have some input, I will add it, thanks.
> 
> BTW,  can we ignore this property if driver doesn't use it? In other words,
> do we have to add this clocks property just to indicate that this node
> requires some clocks as input from a hardware perspective?

Yes and no. The kernel will see the dependency and track that. But your 
driver doesn't have to get the clock or anything. Though presumably the 
source is a fixed-clock and you need its frequency to calculate child 
clock rates.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ