RE: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Krzysztof,

> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
> Sent: Thursday, July 25, 2024 3:21 PM
> To: sunyeal.hong <sunyeal.hong@xxxxxxxxxxx>; 'Rob Herring'
> <robh@xxxxxxxxxx>
> Cc: 'Sylwester Nawrocki' <s.nawrocki@xxxxxxxxxxx>; 'Chanwoo Choi'
> <cw00.choi@xxxxxxxxxxx>; 'Alim Akhtar' <alim.akhtar@xxxxxxxxxxx>; 'Michael
> Turquette' <mturquette@xxxxxxxxxxxx>; 'Stephen Boyd' <sboyd@xxxxxxxxxx>;
> 'Conor Dooley' <conor+dt@xxxxxxxxxx>; linux-samsung-soc@xxxxxxxxxxxxxxx;
> linux-clk@xxxxxxxxxxxxxxx; devicetree@xxxxxxxxxxxxxxx; linux-arm-
> kernel@xxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC
> CMU bindings
> 
> On 25/07/2024 05:03, sunyeal.hong wrote:
> 
> > - dts
> > cmu_misc: clock-controller@10020000 {
> > 	compatible = "samsung,exynosautov920-cmu-misc";
> > 	reg = <0x10020000 0x8000>;
> > 	#clock-cells = <1>;
> >
> > 	clocks = <&xtcxo>,
> > 		 <&cmu_top DOUT_CLKCMU_MISC_NOC>;
> > 	clock-names = "oscclk",
> > 		      "noc";
> > };
> >
> > In this case, can you tell me how to handle it?
> > And if a new clock item is added and a new cmu block uses only the clock
> item added and oscclk, a problem may occur.
> 
> The same problem was in your original version, so why suddenly it appeared?
> 
> Anyway, why clock would be missing? You just wrote in the bindings that
> there is such input clock.
> 
> Best regards,
> Krzysztof
> 

If I reflect Rob's review, it will be changed as below.

- yaml
properties:
  compatible:
    enum:
      - samsung,exynosautov920-cmu-top
      - samsung,exynosautov920-cmu-peric0

  clocks:
    minItems: 1
    items:
      - description: External reference clock (38.4 MHz)
      - description: Block IP clock (from CMU_TOP)
      - description: Block NOC clock (from CMU_TOP)

  clock-names:
    minItems: 1
    items:
      - const: oscclk
      - const: ip
      - const: noc

  "#clock-cells":
    const: 1

  reg:
    maxItems: 1

if:
    properties:
      compatible:
        enum:
          - samsung,exynosautov920-cmu-misc

  then:
    properties:
      clocks:
        minItems: 2
        maxItems: 2

      clock-names:
        minItems: 2
        maxItems: 2

- device tree
cmu_misc: clock-controller@10020000 {
	compatible = "samsung,exynosautov920-cmu-misc";
	reg = <0x10020000 0x8000>;
	#clock-cells = <1>;

	clocks = <&xtcxo>,
		 <&cmu_top DOUT_CLKCMU_MISC_NOC>;
	clock-names = "oscclk",
		      "noc";
};

In this case, ip should be used after oscclk, but misc does not use ip, so there is a problem in dt check.

The code of v4 version has clock items for each block, so there was no problem like this.
- yaml(v4)

  if:
    properties:
      compatible:
        contains:
          const: samsung,exynosautov920-cmu-misc

  then:
    properties:
      clocks:
        items:
          - description: External reference clock (38.4 MHz)
          - description: CMU_MISC NOC clock (from CMU_MISC)

      clock-names:
        items:
          - const: oscclk
          - const: noc

If there is anything I misunderstand, please guide me.

Thanks,
Sunyeal Hong.






[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux