Re: [PATCH v2 33/33] arm64: zynqmp: Add support for Xilinx Kria SOM board
From: Michal Simek
Date: Fri Jun 25 2021 - 04:59:04 EST
On 6/24/21 10:36 PM, Rob Herring wrote:
> On Mon, Jun 14, 2021 at 05:25:41PM +0200, Michal Simek wrote:
>> There are couple of revisions of SOMs (k26) and associated carrier cards
>> (kv260).
>> SOM itself has two major versions:
>> sm-k26 - SOM with EMMC
>> smk-k26 - SOM without EMMC used on starter kit with preprogrammed firmware
>> in QSPI.
>>
>> SOMs are describing only devices available on the SOM or connections which
>> are described in specification (for example UART, fwuen).
>>
>> Signed-off-by: Michal Simek <michal.simek@xxxxxxxxxx>
>> ---
>>
>> Changes in v2:
>> - Use sugar syntax - reported by Geert
>> - Update copyright years
>> - Fix SD3.0 comment alignment
>> - Remove one newline from Makefile
>>
>> https://www.xilinx.com/products/som/kria.html
>> ---
>> .../devicetree/bindings/arm/xilinx.yaml | 31 ++
>> arch/arm64/boot/dts/xilinx/Makefile | 10 +
>> .../boot/dts/xilinx/zynqmp-sck-kv-g-revA.dts | 335 ++++++++++++++++++
>> .../boot/dts/xilinx/zynqmp-sck-kv-g-revB.dts | 318 +++++++++++++++++
>> .../boot/dts/xilinx/zynqmp-sm-k26-revA.dts | 289 +++++++++++++++
>> .../boot/dts/xilinx/zynqmp-smk-k26-revA.dts | 21 ++
>
> It does not appear to me that the schema matches the dts files. You did
> check that, right?
I can double check but I have updated xilinx.yaml to match it.
>
>> 6 files changed, 1004 insertions(+)
>> create mode 100644 arch/arm64/boot/dts/xilinx/zynqmp-sck-kv-g-revA.dts
>> create mode 100644 arch/arm64/boot/dts/xilinx/zynqmp-sck-kv-g-revB.dts
>> create mode 100644 arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts
>> create mode 100644 arch/arm64/boot/dts/xilinx/zynqmp-smk-k26-revA.dts
>>
>> diff --git a/Documentation/devicetree/bindings/arm/xilinx.yaml b/Documentation/devicetree/bindings/arm/xilinx.yaml
>> index a0b1ae6e3e71..1a4a03dfaf7f 100644
>> --- a/Documentation/devicetree/bindings/arm/xilinx.yaml
>> +++ b/Documentation/devicetree/bindings/arm/xilinx.yaml
>> @@ -116,6 +116,37 @@ properties:
>> - const: xlnx,zynqmp-zcu111
>> - const: xlnx,zynqmp
>>
>> + - description: Xilinx Kria SOMs
>> + items:
>> + - const: xlnx,zynqmp-sm-k26-rev1
>> + - const: xlnx,zynqmp-sm-k26-revB
>> + - const: xlnx,zynqmp-sm-k26-revA
>
> So rev1 is compatible with revB is compatible with revA, but revA and
> revB don't exist on their own?
HW wise they of course exist.
revB(development version) is identical with rev1(production version).
And there are some HW changes between revA and revB but without impact
on SW. That's why all 3 are listed.
Board version is recorded in eeprom and based on it the right compatible
dt should be taken.
>
>> + - const: xlnx,zynqmp-sm-k26
>> + - const: xlnx,zynqmp
>> +
>> + - description: Xilinx Kria SOMs (starter)
>> + items:
>> + - const: xlnx,zynqmp-smk-k26-rev1
>> + - const: xlnx,zynqmp-smk-k26-revB
>> + - const: xlnx,zynqmp-smk-k26-revA
>> + - const: xlnx,zynqmp-smk-k26
>> + - const: xlnx,zynqmp
>> +
>> + - description: Xilinx Kria Carrier Cards (revA/Y/Z)
>> + items:
>> + - const: xlnx,zynqmp-sk-kv260-revZ
>> + - const: xlnx,zynqmp-sk-kv260-revY
>> + - const: xlnx,zynqmp-sk-kv260-revA
>> + - const: xlnx,zynqmp-sk-k260
>> + - const: xlnx,zynqmp
>> +
>> + - description: Xilinx Kria Carrier Cards (revB/1)
>> + items:
>> + - const: xlnx,zynqmp-sk-kv260-rev1
>> + - const: xlnx,zynqmp-sk-kv260-revB
>> + - const: xlnx,zynqmp-sk-k260
>> + - const: xlnx,zynqmp
>> +
>> additionalProperties: true
>>
>> ...
>> diff --git a/arch/arm64/boot/dts/xilinx/Makefile b/arch/arm64/boot/dts/xilinx/Makefile
>> index 083ed52337fd..8e43bef2c57e 100644
>> --- a/arch/arm64/boot/dts/xilinx/Makefile
>> +++ b/arch/arm64/boot/dts/xilinx/Makefile
>> @@ -17,3 +17,13 @@ dtb-$(CONFIG_ARCH_ZYNQMP) += zynqmp-zcu104-revA.dtb
>> dtb-$(CONFIG_ARCH_ZYNQMP) += zynqmp-zcu104-revC.dtb
>> dtb-$(CONFIG_ARCH_ZYNQMP) += zynqmp-zcu106-revA.dtb
>> dtb-$(CONFIG_ARCH_ZYNQMP) += zynqmp-zcu111-revA.dtb
>> +
>> +dtb-$(CONFIG_ARCH_ZYNQMP) += zynqmp-sm-k26-revA.dtb
>> +dtb-$(CONFIG_ARCH_ZYNQMP) += zynqmp-smk-k26-revA.dtb
>> +
>> +som-AA-dtbs := zynqmp-sm-k26-revA.dtb zynqmp-sck-kv-g-revA.dtbo
>> +som-AB-dtbs := zynqmp-sm-k26-revA.dtb zynqmp-sck-kv-g-revB.dtbo
>> +starter-AA-dtbs := zynqmp-smk-k26-revA.dtb zynqmp-sck-kv-g-revA.dtbo
>> +starter-AB-dtbs := zynqmp-smk-k26-revA.dtb zynqmp-sck-kv-g-revB.dtbo
>> +
>> +dtb-$(CONFIG_ARCH_ZYNQMP) += som-AA.dtb som-AB.dtb starter-AA.dtb starter-AB.dtb
>> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-sck-kv-g-revA.dts b/arch/arm64/boot/dts/xilinx/zynqmp-sck-kv-g-revA.dts
>> new file mode 100644
>> index 000000000000..59d5751e0634
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/xilinx/zynqmp-sck-kv-g-revA.dts
>> @@ -0,0 +1,335 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/*
>> + * dts file for KV260 revA Carrier Card
>> + *
>> + * (C) Copyright 2020 - 2021, Xilinx, Inc.
>> + *
>> + * SD level shifter:
>> + * "A" – A01 board un-modified (NXP)
>> + * "Y" – A01 board modified with legacy interposer (Nexperia)
>> + * "Z" – A01 board modified with Diode interposer
>> + *
>> + * Michal Simek <michal.simek@xxxxxxxxxx>
>> + */
>> +
>> + #include <dt-bindings/gpio/gpio.h>
>> + #include <dt-bindings/net/ti-dp83867.h>
>> + #include <dt-bindings/phy/phy.h>
>> + #include <dt-bindings/pinctrl/pinctrl-zynqmp.h>
>> +
>> +/dts-v1/;
>> +/plugin/;
>> +
>> +&{/} {
>> + compatible = "xlnx,zynqmp-sk-kv260-revA",
>> + "xlnx,zynqmp-sk-kv260-revY",
>> + "xlnx,zynqmp-sk-kv260-revZ",
>
> The order above is Z, Y, A.
This is overlay which is not checked but I will fix the order to match it.
Thanks,
Michal