Aw: Re: [PATCH v1 1/3] arm64: dts: marvell: Fix anyOf conditional failed

Frank Wunderlich frank-w at public-files.de
Sun Nov 10 02:20:46 PST 2024


> Gesendet: Sonntag, 10. November 2024 um 10:25
> Von: "Frank Wunderlich" <frank-w at public-files.de>
> Am 9. November 2024 18:29:44 MEZ schrieb Andrew Lunn <andrew at lunn.ch>:
> >On Sat, Nov 09, 2024 at 10:46:19AM +0100, Frank Wunderlich wrote:
> >> From: Frank Wunderlich <frank-w at public-files.de>
> >>
> >> after converting the ahci-platform binding to yaml the following files
> >> reporting "'anyOf' conditional failed" on
> >>
> >> sata at 540000: sata-port at 0
...
> >
> >I don't know the yaml too well, but it is not obvious how adding a few
> >status = "disabled"; status = "okay"; fixes a "'anyOf' conditional failed".
> >
> >Maybe you can expand the explanation a bit?
> >
> >	Andrew
>
> Hi angelo,
>
> I guess the dtbs_check only checks required properties from yaml if the node is enabled.
>
> As you know, phys that can supply different types (sata,usb,pcie,*gmii,...),but only one mode can be used per phy. So only one controller can be used with it,the other(s) can not. I do not know marvell,but there are similar in mediatek (xsphy) and rockchip (combphy).
>
> From my PoV it makes sense to check only enabled nodes for required properties,but i do not know internals of dtbs_check. This patch is 2 years old and i only rebased it and run dtbs check with the others to have a clean result...i can test again without this one to check if anyOf is shown again.
>
> regards Frank

Hi

issue is still there and patch is still needed...without it i get these messages:

$ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/ata/ahci-platform.yaml
  UPD     include/config/kernel.release
  DTC [C] arch/arm64/boot/dts/marvell/armada-7040-db.dtb
arch/arm64/boot/dts/marvell/armada-7040-db.dtb: sata at 540000: sata-port at 0: 'anyOf' conditional failed, one must be fixed:
	'phys' is a required property
	'target-supply' is a required property
	from schema $id: http://devicetree.org/schemas/ata/ahci-platform.yaml#
  DTC [C] arch/arm64/boot/dts/marvell/armada-7040-mochabin.dtb
  DTC [C] arch/arm64/boot/dts/marvell/armada-8040-clearfog-gt-8k.dtb
arch/arm64/boot/dts/marvell/armada-8040-clearfog-gt-8k.dtb: sata at 540000: sata-port at 0: 'anyOf' conditional failed, one must be fixed:
	'phys' is a required property
	'target-supply' is a required property
	from schema $id: http://devicetree.org/schemas/ata/ahci-platform.yaml#
  DTC [C] arch/arm64/boot/dts/marvell/armada-8040-db.dtb
  DTC [C] arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtb
arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtb: sata at 540000: sata-port at 0: 'anyOf' conditional failed, one must be fixed:
	'phys' is a required property
	'target-supply' is a required property
	from schema $id: http://devicetree.org/schemas/ata/ahci-platform.yaml#
  DTC [C] arch/arm64/boot/dts/marvell/armada-8040-mcbin-singleshot.dtb
arch/arm64/boot/dts/marvell/armada-8040-mcbin-singleshot.dtb: sata at 540000: sata-port at 0: 'anyOf' conditional failed, one must be fixed:
	'phys' is a required property
	'target-supply' is a required property
	from schema $id: http://devicetree.org/schemas/ata/ahci-platform.yaml#
  DTC [C] arch/arm64/boot/dts/marvell/armada-8040-puzzle-m801.dtb
  DTC [C] arch/arm64/boot/dts/marvell/cn9130-db.dtb
arch/arm64/boot/dts/marvell/cn9130-db.dtb: sata at 540000: sata-port at 0: 'anyOf' conditional failed, one must be fixed:
	'phys' is a required property
	'target-supply' is a required property
	from schema $id: http://devicetree.org/schemas/ata/ahci-platform.yaml#
  DTC [C] arch/arm64/boot/dts/marvell/cn9130-db-B.dtb
arch/arm64/boot/dts/marvell/cn9130-db-B.dtb: sata at 540000: sata-port at 0: 'anyOf' conditional failed, one must be fixed:
	'phys' is a required property
	'target-supply' is a required property
	from schema $id: http://devicetree.org/schemas/ata/ahci-platform.yaml#
  DTC [C] arch/arm64/boot/dts/marvell/cn9131-db.dtb
arch/arm64/boot/dts/marvell/cn9131-db.dtb: sata at 540000: sata-port at 0: 'anyOf' conditional failed, one must be fixed:
	'phys' is a required property
	'target-supply' is a required property
	from schema $id: http://devicetree.org/schemas/ata/ahci-platform.yaml#
/media/data_ext/git/kernel/BPI-R2-4.14/arch/arm64/boot/dts/marvell/cn9131-db.dtb: sata at 540000: sata-port at 0: 'anyOf' conditional failed, one must be fixed:
	'phys' is a required property
	'target-supply' is a required property
	from schema $id: http://devicetree.org/schemas/ata/ahci-platform.yaml#
  DTC [C] arch/arm64/boot/dts/marvell/cn9131-db-B.dtb
arch/arm64/boot/dts/marvell/cn9131-db-B.dtb: sata at 540000: sata-port at 0: 'anyOf' conditional failed, one must be fixed:
	'phys' is a required property
	'target-supply' is a required property
	from schema $id: http://devicetree.org/schemas/ata/ahci-platform.yaml#
arch/arm64/boot/dts/marvell/cn9131-db-B.dtb: sata at 540000: sata-port at 0: 'anyOf' conditional failed, one must be fixed:
	'phys' is a required property
	'target-supply' is a required property
	from schema $id: http://devicetree.org/schemas/ata/ahci-platform.yaml#
  DTC [C] arch/arm64/boot/dts/marvell/cn9132-db.dtb
arch/arm64/boot/dts/marvell/cn9132-db.dtb: sata at 540000: sata-port at 0: 'anyOf' conditional failed, one must be fixed:
	'phys' is a required property
	'target-supply' is a required property
	from schema $id: http://devicetree.org/schemas/ata/ahci-platform.yaml#
arch/arm64/boot/dts/marvell/cn9132-db.dtb: sata at 540000: sata-port at 0: 'anyOf' conditional failed, one must be fixed:
	'phys' is a required property
	'target-supply' is a required property
	from schema $id: http://devicetree.org/schemas/ata/ahci-platform.yaml#
arch/arm64/boot/dts/marvell/cn9132-db.dtb: sata at 540000: sata-port at 1: 'anyOf' conditional failed, one must be fixed:
	'phys' is a required property
	'target-supply' is a required property
	from schema $id: http://devicetree.org/schemas/ata/ahci-platform.yaml#
  DTC [C] arch/arm64/boot/dts/marvell/cn9132-db-B.dtb
arch/arm64/boot/dts/marvell/cn9132-db-B.dtb: sata at 540000: sata-port at 0: 'anyOf' conditional failed, one must be fixed:
	'phys' is a required property
	'target-supply' is a required property
	from schema $id: http://devicetree.org/schemas/ata/ahci-platform.yaml#
arch/arm64/boot/dts/marvell/cn9132-db-B.dtb: sata at 540000: sata-port at 0: 'anyOf' conditional failed, one must be fixed:
	'phys' is a required property
	'target-supply' is a required property
	from schema $id: http://devicetree.org/schemas/ata/ahci-platform.yaml#
arch/arm64/boot/dts/marvell/cn9132-db-B.dtb: sata at 540000: sata-port at 1: 'anyOf' conditional failed, one must be fixed:
	'phys' is a required property
	'target-supply' is a required property
	from schema $id: http://devicetree.org/schemas/ata/ahci-platform.yaml#
  DTC [C] arch/arm64/boot/dts/marvell/cn9130-crb-A.dtb
  DTC [C] arch/arm64/boot/dts/marvell/cn9130-crb-B.dtb
arch/arm64/boot/dts/marvell/cn9130-crb-B.dtb: sata at 540000: sata-port at 1: 'anyOf' conditional failed, one must be fixed:
	'phys' is a required property
	'target-supply' is a required property
	from schema $id: http://devicetree.org/schemas/ata/ahci-platform.yaml#
  DTC [C] arch/arm64/boot/dts/marvell/ac5x-rd-carrier-cn9131.dtb
arch/arm64/boot/dts/marvell/ac5x-rd-carrier-cn9131.dtb: sata at 540000: sata-port at 0: 'anyOf' conditional failed, one must be fixed:
	'phys' is a required property
	'target-supply' is a required property
	from schema $id: http://devicetree.org/schemas/ata/ahci-platform.yaml#
arch/arm64/boot/dts/marvell/ac5x-rd-carrier-cn9131.dtb: sata at 540000: sata-port at 0: 'anyOf' conditional failed, one must be fixed:
	'phys' is a required property
	'target-supply' is a required property
	from schema $id: http://devicetree.org/schemas/ata/ahci-platform.yaml#
  DTC [C] arch/arm64/boot/dts/marvell/cn9130-cf-base.dtb
arch/arm64/boot/dts/marvell/cn9130-cf-base.dtb: sata at 540000: sata-port at 1: 'anyOf' conditional failed, one must be fixed:
	'phys' is a required property
	'target-supply' is a required property
	from schema $id: http://devicetree.org/schemas/ata/ahci-platform.yaml#
  DTC [C] arch/arm64/boot/dts/marvell/cn9130-cf-pro.dtb
arch/arm64/boot/dts/marvell/cn9130-cf-pro.dtb: sata at 540000: sata-port at 1: 'anyOf' conditional failed, one must be fixed:
	'phys' is a required property
	'target-supply' is a required property
	from schema $id: http://devicetree.org/schemas/ata/ahci-platform.yaml#
  DTC [C] arch/arm64/boot/dts/marvell/cn9131-cf-solidwan.dtb
arch/arm64/boot/dts/marvell/cn9131-cf-solidwan.dtb: sata at 540000: sata-port at 0: 'anyOf' conditional failed, one must be fixed:
	'phys' is a required property
	'target-supply' is a required property
	from schema $id: http://devicetree.org/schemas/ata/ahci-platform.yaml#
  DTC [C] arch/arm64/boot/dts/marvell/cn9132-clearfog.dtb

that imho confirms my guess that only enabled nodes are checked and without the disabled this node is always enabled and
by disabling the SoC-node and enabling at board-level let the others (here printed) disabled and so not need the required
properties.

i can try to add short description about it, something like this:

The dtbs-check only checks enabled nodes and there required nodes must be present. Nodes are enabled by default (current state for sata at 540000 node), but some boards seem to use the phy somewhere else or just not want to use the sata contoller and so miss the required properties 'phys' and 'target-supply'. So disable the sata at 540000 node at SoC level and enable it where it is filled with required properties.

maybe adding this phrase to commit is enough?

regards Frank</frank-w at public-files.de></andrew at lunn.ch></frank-w at public-files.de>



More information about the linux-arm-kernel mailing list