Re: [PATCH 1/2] dt-bindings: fpga: zynq: Document ICAP on boot

Sam Winchenbach
2025-03-31T12:30:59Z

On Sat, Mar 29, 2025 at 05:59:07AM +0100, Krzysztof Kozlowski wrote:
> On 28/03/2025 15:19, Sam Winchenbach wrote:
> > From: Sam Winchenbach <swinchenbach@arka.org>
> >
> > Documents the ability to enable the ICAP interface on boot.
> >
> > Signed-off-by: Sam Winchenbach <swinchenbach@arka.org>
> > ---
> > .../devicetree/bindings/fpga/xilinx-zynq-fpga-mgr.yaml | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/fpga/xilinx-zynq-fpga-mgr.yaml b/Documentation/devicetree/bindings/fpga/xilinx-zynq-fpga-mgr.yaml
> > index 04dcadc2c20e9..bb2781ae126ca 100644
> > --- a/Documentation/devicetree/bindings/fpga/xilinx-zynq-fpga-mgr.yaml
> > +++ b/Documentation/devicetree/bindings/fpga/xilinx-zynq-fpga-mgr.yaml
> > @@ -31,6 +31,13 @@ properties:
> > description:
> > Phandle to syscon block which provide access to SLCR registers
> >
> > + enable-icap-on-load:
>
> Missing vendor prefix.

I will add this to a v2 patch, assuming we come to an agreement on the
suitability of this approach.

>
> > + type: boolean
> > + description: If present, the ICAP controller will be enabled when
> > + the driver probes. This is useful if the fabric is loaded
> > + during the boot process and contains a core, such as the SEM,
>
> I don't get how this is suitable for DT. If you decide to load the
> fabric from driver, that's driver decision so not DT.

Before writing the fabric to the FPGA the driver disables the ICAP, enabling
the PCAP. Once writing is complete it unconditionally disables the PCAP,
enabling the ICAP. This patch just makes it so, depending on the use case,
the ICAP can be enabled at boot. This will not prevent the system from being
able to load a fabric through the driver. I added in this boolean so existing
behavior would be maintained.

Do you recommend another approach such as writing to a sysfs attribute to
switch from PCAP to ICAP?

>
> > + that requires access to ICAP interface to operate properly.
> > +
> > required:
> > - compatible
> > - reg
>
>
> Best regards,
> Krzysztof