RE: [PATCH 2/3] dt-bindings: clock: Add bindings for ZynqMP clock driver

From: Jolly Shah
Date: Tue Mar 20 2018 - 15:15:37 EST


Hi Rob and Stephan,

> -----Original Message-----
> From: Stephen Boyd [mailto:sboyd@xxxxxxxxxx]
> Sent: Monday, March 19, 2018 11:24 AM
> To: Jolly Shah <JOLLYS@xxxxxxxxxx>; Rob Herring <robh@xxxxxxxxxx>
> Cc: mark.rutland@xxxxxxx; devicetree@xxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; mturquette@xxxxxxxxxxxx; sboyd@xxxxxxxxxxxxxx;
> michal.simek@xxxxxxxxxx; Shubhrajyoti Datta <shubhraj@xxxxxxxxxx>; Rajan
> Vaja <RAJANV@xxxxxxxxxx>; linux-clk@xxxxxxxxxxxxxxx; linux-arm-
> kernel@xxxxxxxxxxxxxxxxxxx
> Subject: RE: [PATCH 2/3] dt-bindings: clock: Add bindings for ZynqMP clock
> driver
>
> Quoting Jolly Shah (2018-03-13 11:39:13)
> > Hi Rob,
> > >
> > > What is the interface to the "platform management controller"?
> > > Because you have no registers, I'm guessing a firmware interface? If
> > > so, then just define the firmware node as a clock provider.
> >
> > Yes it is firmware interface. Along with clocks, firmware interface also controls
> power and pinctrl operations as major.
> > I am not sure if I understand you correctly. Do you suggest to register clocks
> through Firmware driver or just use firmware DT node as clock provider and
> clock driver DT node can reference clocks from FW node to register same?
>
> I would suggest making the firmware driver register the clks and act as the clk
> provider. Not sure what Rob wants.

Firmware driver just provides API interface and doesnât actually control the clocks. Along with clocks, it provides interface for power and pinmux control also. Shall we register clocks/pins/power domains in FW driver or follow something like scpi as below and keep registration separate?

zynqmp_firmware {
compatible = "xlnx,zynqmp-firmware";
method = "smc";

zynqmp_clk: zynqmp_clk {
compatible = "xlnx,zynqmp-clk";
#clock-cells = <1>;
clocks = <&pss_ref_clk>, <&video_clk>, <&pss_alt_ref_clk>
clock-names = "pss_ref_clk", "video_clk", "pss_alt_ref_clk"
};

zynqmp-genpd: zynqmp-genpd {
compatible = "xlnx,zynqmp-genpd";
...
};
zynqmp-pinctrl: zynqmp-pinctrl {
compatible = "xlnx,zynqmp-pinctrl";
...
};
};

Thanks,
Jolly Shah