[PATCH] dt-bindings: firmware: cznic,turris-mox-rwtm: convert to DT schema
Gabor Juhos
j4g8y7 at gmail.com
Mon Feb 23 02:57:21 PST 2026
Hi Krzysztof,
2026. 02. 21. 19:31 keltezéssel, Krzysztof Kozlowski írta:
> On 21/02/2026 19:21, Gabor Juhos wrote:
>> +
>> +description: |
>> + This device tree node should be used on Turris Mox, or potentially
>> + another A3700 compatible device running the Mox's rWTM firmware in
>> + the secure processor (for example it is possible to flash this
>> + firmware into EspressoBin).
>> +
>> +properties:
>> + compatible:
>> + oneOf:
>> + - const: marvell,armada-3700-rwtm-firmware
>> +
>> + - items:
>> + - const: marvell,armada-3700-rwtm-firmware
>
> This makes little sense. How this can be alone and followed by fallback?
I admit that this is quite messy, but let me describe the current situation in
detail.
Originally both the dt-bindings documentation and the 'turris-mox-rwtm' driver
have used the 'cznic,turris-mox-rwtm' compatible alone.
In commit 90ae47215de3 ("firmware: turris-mox-rwtm: add
marvell,armada-3700-rwtm-firmware compatible string") a new compatible string
'marvell,armada-3700-rwtm-firmware' has been added to the driver.
Additionally, in commit 3a52a48973b3 ("arm64: dts: marvell: armada-37xx: move
firmware node to generic dtsi file") added a node to the Armada 37xx SoC dtsi
file which uses only 'marvell,armada-3700-rwtm-firmware' as compatible. In the
same commit the 'armada-3720-turris-mox.dts' file has been modified to use both
compatible strings, and the 'cznic,turris-mox-rwtm' has been chosen to be the
fallback.
Unfortunately, none of the commits above updated the original dt-binding
documentation, so it is out of date since more than 4 years.
In short, the driver handles both compatibles equally, none of those are a
fallback of the other one. And in the existing in-kernel dts files, the
compatible is specified in the following forms:
"marvell,armada-3700-rwtm-firmware", "cznic,turris-mox-rwtm"
or
"marvell,armada-3700-rwtm-firmware" alone
The dt-schema is based on these facts in order to avoid new 'dtbs_check'
warnings, even if this is not the optimal/best approach.
> Plus adding new compatible has to be explicit in commit msg, including
> the reason (existing users).
>
>> + - const: cznic,turris-mox-rwtm
>
> Anyway, not tested. Please test your patches BEFORE you send them. I
> finished review here because of that.
Sorry about wasting your time. This is my first schema and I have missed the
'yamllint' warning indicated by Rob's bot in the other mail.
Nevertheless, I have tested the patch before sending, along with several different
versions besides the current one.
Without the patch 'make dtbs_check' throws the following warnings:
arch/arm64/boot/dts/marvell/armada-3720-atlas-v5.dtb: /firmware/armada-3700-rwtm: failed to match any schema with compatible: ['marvell,armada-3700-rwtm-firmware', 'cznic,turris-mox-rwtm']
arch/arm64/boot/dts/marvell/armada-3720-atlas-v5.dtb: /firmware/armada-3700-rwtm: failed to match any schema with compatible: ['marvell,armada-3700-rwtm-firmware', 'cznic,turris-mox-rwtm']
arch/arm64/boot/dts/marvell/armada-3720-db.dtb: /firmware/armada-3700-rwtm: failed to match any schema with compatible: ['marvell,armada-3700-rwtm-firmware']
arch/arm64/boot/dts/marvell/armada-3720-eDPU.dtb: /firmware/armada-3700-rwtm: failed to match any schema with compatible: ['marvell,armada-3700-rwtm-firmware']
arch/arm64/boot/dts/marvell/armada-3720-espressobin.dtb: /firmware/armada-3700-rwtm: failed to match any schema with compatible: ['marvell,armada-3700-rwtm-firmware']
arch/arm64/boot/dts/marvell/armada-3720-espressobin-emmc.dtb: /firmware/armada-3700-rwtm: failed to match any schema with compatible: ['marvell,armada-3700-rwtm-firmware']
arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dtb: /firmware/armada-3700-rwtm: failed to match any schema with compatible: ['marvell,armada-3700-rwtm-firmware']
arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dtb: /firmware/armada-3700-rwtm: failed to match any schema with compatible: ['marvell,armada-3700-rwtm-firmware']
arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dtb: /firmware/armada-3700-rwtm: failed to match any schema with compatible: ['marvell,armada-3700-rwtm-firmware']
arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dtb: /firmware/armada-3700-rwtm: failed to match any schema with compatible: ['marvell,armada-3700-rwtm-firmware']
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dtb: /firmware/armada-3700-rwtm: failed to match any schema with compatible: ['marvell,armada-3700-rwtm-firmware', 'cznic,turris-mox-rwtm']
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dtb: /firmware/armada-3700-rwtm: failed to match any schema with compatible: ['marvell,armada-3700-rwtm-firmware', 'cznic,turris-mox-rwtm']
arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtb: /firmware/armada-3700-rwtm: failed to match any schema with compatible: ['marvell,armada-3700-rwtm-firmware']
Below are the results of testing different compatible rules.
properties:
compatible:
const: cznic,turris-mox-rwtm
arch/arm64/boot/dts/marvell/armada-3720-atlas-v5.dtb: armada-3700-rwtm (marvell,armada-3700-rwtm-firmware): compatible:0: 'cznic,turris-mox-rwtm' was expected
arch/arm64/boot/dts/marvell/armada-3720-atlas-v5.dtb: armada-3700-rwtm (marvell,armada-3700-rwtm-firmware): compatible: ['marvell,armada-3700-rwtm-firmware', 'cznic,turris-mox-rwtm'] is too long
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dtb: armada-3700-rwtm (marvell,armada-3700-rwtm-firmware): compatible:0: 'cznic,turris-mox-rwtm' was expected
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dtb: armada-3700-rwtm (marvell,armada-3700-rwtm-firmware): compatible: ['marvell,armada-3700-rwtm-firmware', 'cznic,turris-mox-rwtm'] is too long
properties:
compatible:
const: marvell,armada-3700-rwtm-firmware
arch/arm64/boot/dts/marvell/armada-3720-atlas-v5.dtb: armada-3700-rwtm (marvell,armada-3700-rwtm-firmware): compatible: ['marvell,armada-3700-rwtm-firmware', 'cznic,turris-mox-rwtm'] is too long
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dtb: armada-3700-rwtm (marvell,armada-3700-rwtm-firmware): compatible: ['marvell,armada-3700-rwtm-firmware', 'cznic,turris-mox-rwtm'] is too long
properties:
compatible:
enum:
- marvell,armada-3700-rwtm-firmware
- cznic,turris-mox-rwtm
arch/arm64/boot/dts/marvell/armada-3720-atlas-v5.dtb: armada-3700-rwtm (marvell,armada-3700-rwtm-firmware): compatible: ['marvell,armada-3700-rwtm-firmware', 'cznic,turris-mox-rwtm'] is too long
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dtb: armada-3700-rwtm (marvell,armada-3700-rwtm-firmware): compatible: ['marvell,armada-3700-rwtm-firmware', 'cznic,turris-mox-rwtm'] is too long
properties:
compatible:
items:
- const: marvell,armada-3700-rwtm-firmware
- const: cznic,turris-mox-rwtm
arch/arm64/boot/dts/marvell/armada-3720-db.dtb: armada-3700-rwtm (marvell,armada-3700-rwtm-firmware): compatible: ['marvell,armada-3700-rwtm-firmware'] is too short
arch/arm64/boot/dts/marvell/armada-3720-eDPU.dtb: armada-3700-rwtm (marvell,armada-3700-rwtm-firmware): compatible: ['marvell,armada-3700-rwtm-firmware'] is too short
arch/arm64/boot/dts/marvell/armada-3720-espressobin-emmc.dtb: armada-3700-rwtm (marvell,armada-3700-rwtm-firmware): compatible: ['marvell,armada-3700-rwtm-firmware'] is too short
arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dtb: armada-3700-rwtm (marvell,armada-3700-rwtm-firmware): compatible: ['marvell,armada-3700-rwtm-firmware'] is too short
arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dtb: armada-3700-rwtm (marvell,armada-3700-rwtm-firmware): compatible: ['marvell,armada-3700-rwtm-firmware'] is too short
arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dtb: armada-3700-rwtm (marvell,armada-3700-rwtm-firmware): compatible: ['marvell,armada-3700-rwtm-firmware'] is too short
arch/arm64/boot/dts/marvell/armada-3720-espressobin.dtb: armada-3700-rwtm (marvell,armada-3700-rwtm-firmware): compatible: ['marvell,armada-3700-rwtm-firmware'] is too short
arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dtb: armada-3700-rwtm (marvell,armada-3700-rwtm-firmware): compatible: ['marvell,armada-3700-rwtm-firmware'] is too short
arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtb: armada-3700-rwtm (marvell,armada-3700-rwtm-firmware): compatible: ['marvell,armada-3700-rwtm-firmware'] is too short
I wanted to get rid of all warnings, so I ended up with the current patch.
Do you have any suggestion about what would be the acceptable solution to clean
up the current mess?
Regards,
Gabor
More information about the linux-arm-kernel
mailing list