[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <02d6576b-f17a-41dd-ac71-c128bc1a4739@altera.com>
Date: Tue, 18 Nov 2025 00:51:13 +0000
From: "Romli, Khairul Anuar" <khairul.anuar.romli@...era.com>
To: Conor Dooley <conor@...nel.org>
CC: Moritz Fischer <mdf@...nel.org>, Xu Yilun <yilun.xu@...el.com>, Tom Rix
<trix@...hat.com>, Dinh Nguyen <dinguyen@...nel.org>, Rob Herring
<robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>, "Rao, Mahesh" <mahesh.rao@...era.com>, "Ng, Adrian Ho
Yin" <adrian.ho.yin.ng@...era.com>, "Rabara, Niravkumar Laxmidas"
<nirav.rabara@...era.com>, "linux-fpga@...r.kernel.org"
<linux-fpga@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "devicetree@...r.kernel.org"
<devicetree@...r.kernel.org>
Subject: Re: [PATCH v3 1/2] dt-bindings: fpga: stratix10: add support for
Agilex5
On 18/11/2025 8:07 am, Conor Dooley wrote:
> On 17/11/2025 10:34 pm, Conor Dooley wrote:
>> On Mon, Nov 17, 2025 at 02:32:16PM +0000, Conor Dooley wrote:
>>> On Mon, Nov 17, 2025 at 03:02:11AM +0000, Romli, Khairul Anuar wrote:
>>>> On 15/11/2025 1:59 am, Conor Dooley wrote:
>>>>> On Fri, Nov 14, 2025 at 02:27:41PM +0800, Khairul Anuar Romli wrote:
>>>>>> Agilex5 introduces changes in how reserved memory is mapped and
>>>>>> accessed
>>>>>> compared to previous SoC generations. Agilex5 compatible allows
>>>>>> stratix10-
>>>>>> FPGA manager driver to handle these changes.
>>>>>>
>>>>>> Fallback is added for driver probe and init that rely on matching
>>>>>> of table
>>>>>> and DT node.
>>>>>>
>>>>>> Reviewed-by: Xu Yilun <yilun.xu@...el.com>
>>>>>> Signed-off-by: Khairul Anuar Romli <khairul.anuar.romli@...era.com>
>>>>>> ---
>>>>>> Changes in v3:
>>>>>> - Add description for Agilex5 Device
>>>>>> - Add and define fallback to "intel,agilex-soc-fpga-mgr"
>>>>>> - Validate against Agilex and Stratix10 (non-fallback) and
>>>>>> Agilex5
>>>>>> (fallback)
>>>>>> Changes in v2:
>>>>>> - No changes in this patch
>>>>>> ---
>>>>>> .../fpga/intel,stratix10-soc-fpga-mgr.yaml | 14 +++++++
>>>>>> ++++---
>>>>>> 1 file changed, 11 insertions(+), 3 deletions(-)
>>>>>>
>>>>>> diff --git a/Documentation/devicetree/bindings/fpga/
>>>>>> intel,stratix10-soc-fpga-mgr.yaml b/Documentation/devicetree/
>>>>>> bindings/fpga/intel,stratix10-soc-fpga-mgr.yaml
>>>>>> index 6e536d6b28a9..8eb414163d08 100644
>>>>>> --- a/Documentation/devicetree/bindings/fpga/intel,stratix10-soc-
>>>>>> fpga-mgr.yaml
>>>>>> +++ b/Documentation/devicetree/bindings/fpga/intel,stratix10-soc-
>>>>>> fpga-mgr.yaml
>>>>>> @@ -20,9 +20,17 @@ description:
>>>>>> properties:
>>>>>> compatible:
>>>>>> - enum:
>>>>>> - - intel,stratix10-soc-fpga-mgr
>>>>>> - - intel,agilex-soc-fpga-mgr
>>>>>> + oneOf:
>>>>>> + - items:
>>>>>> + - enum:
>>>>>
>>>>> This construct is redundant, "items: - enum" is the same as just
>>>>> having
>>>>> "enum".
>>>>> pw-bot: changes-requested
>>>>>
>>>> I've tried to look for some of the already merged bindings i.e
>>>> arm/qcom.yaml (although all the properties has enum - constant
>>>> combination), it is using items with enum. I tried to keep the enum
>>>> without
>>>> items but I keep getting error while validating the changes.
>>>
>>> I literally told you what to change, so I don't know why you didn't just
>>> do that. Replacing "items: - enum" with "enum" is what you need to do.
>>> You didn't even include the error you got, so I cannot help you with
>>> that at all, nor even if you did what I told you to do.
>>
>> nor even know if you did*
>>
>
> properties:
> compatible:
> - enum:
> - - intel,stratix10-soc-fpga-mgr
> - - intel,agilex-soc-fpga-mgr
> + oneOf:
> + - enum:
> + - intel,stratix10-soc-fpga-mgr
> + - intel,agilex-soc-fpga-mgr
> + - enum:
> + - intel,agilex5-soc-fpga-mgr
> + const: intel,agilex-soc-fpga-mgr
>
> $ make -j24 CHECK_DTBS=y intel/socfpga_agilex5_socdk.dtb
>
> /linux-socfpga/arch/arm64/boot/dts/intel/socfpga_agilex5_socdk.dtb:
> fpga-mgr (intel,agilex5-soc-fpga-mgr): compatible: 'oneOf' conditional
> failed, one must be fixed:
> ['intel,agilex5-soc-fpga-mgr', 'intel,agilex-soc-fpga-mgr'] is too
> long
> 'intel,agilex5-soc-fpga-mgr' is not one of ['intel,stratix10-soc-
> fpga-mgr', 'intel,agilex-soc-fpga-mgr']
> 'intel,agilex-soc-fpga-mgr' was expected
> from schema $id: http://devicetree.org/schemas/fpga/
> intel,stratix10-soc-fpga-mgr.yaml#
>
> $ make -j24 CHECK_DTBS=y DT_SCHEMA_FILES=intel,stratix10-soc-fpga-
> mgr.yaml intel/socfpga_agilex5_socdk.dtb
>
> DTC [C] arch/arm64/boot/dts/intel/socfpga_agilex5_socdk.dtb
> /linux-socfpga/arch/arm64/boot/dts/intel/socfpga_agilex5_socdk.dtb:
> fpga-mgr (intel,agilex5-soc-fpga-mgr): compatible: 'oneOf' conditional
> failed, one must be fixed:
> ['intel,agilex5-soc-fpga-mgr', 'intel,agilex-soc-fpga-mgr'] is too
> long
> 'intel,agilex5-soc-fpga-mgr' is not one of ['intel,stratix10-soc-
> fpga-mgr', 'intel,agilex-soc-fpga-mgr']
> 'intel,agilex-soc-fpga-mgr' was expected
> from schema $id: http://devicetree.org/schemas/fpga/
> intel,stratix10-soc-fpga-mgr.yaml#
>
> This error is not seen if we use the "redundant" items - enum.
>
> Documentation/devicetree/bindings/example-schema.yaml still shows
> the use of items - enum though.
>
> Thanks.
>
> Best Regards,
> Khairul
>
Upon doing some more reading through other examples, I am able to get to
make changes as you suggested and get it validated without any error on
the fallback and non-fallback DT.
I will sent that in the next version.
Thank you so much for the feedback.
Best Regards,
Khairul
>>>
>>>> Another option that I've validated is using the following changes.
>>>>
>>>> - enum:
>>>> - - intel,stratix10-soc-fpga-mgr
>>>> - - intel,agilex-soc-fpga-mgr
>>>> + oneOf:
>>>> + - description: Intel Stratix10 Devices
>>>> + items:
>>>> + - const: intel,stratix10-soc-fpga-mgr
>>>
>>> These just have the same problem as your original patch.
>>> "items: - const" is just the same as "const".
>>> Since item "items" properties do not do anything other than bloat the
>>> schema.
>>>
>>>> + - description: Intel Agilex Devices
>>>> + items:
>>>> + - const: intel,agilex-soc-fpga-mgr
>>>> + - description: Intel Agilex5 Devices
>>>> + items:
>>>> + - const: intel,agilex5-soc-fpga-mgr
>>>> + - const: intel,agilex-soc-fpga-mgr
>>>>
>>>> The drawback of this is we will need to implement enum instead of
>>>> constant for first element if we need to add new devices under "Intel
>>>> Agilex5 Devices" in the future.
>>>>
>>>> Thanks.
>>>>
>>>> Best Regards,
>>>> Khairul
>>>>
>>>>>> + - intel,stratix10-soc-fpga-mgr
>>>>>> + - intel,agilex-soc-fpga-mgr
>>>>>> +
>>>>>> + - description: Agilex5 Device
>>>>>> + items:
>>>>>> + - enum:
>>>>>> + - intel,agilex5-soc-fpga-mgr
>>>>>> + - const: intel,agilex-soc-fpga-mgr
>>>>>> required:
>>>>>> - compatible
>>>>>> --
>>>>>> 2.43.7
>>>>>>
>>>>
>>
>>
>
Powered by blists - more mailing lists