dt-bindings: generic-ehci.yaml doesn't work well with usb-hcd.yaml
Rafał Miłecki
rafal at milecki.pl
Thu Jul 21 01:58:52 PDT 2022
Hi,
I'm trying to fix ARCH_BCM_5301X=y + "dtbs_check" error:
arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dtb: usb at 21000: '#address-cells', '#size-cells', '#usb-cells', 'port at 1', 'port at 2' do not match any of the regexes: 'pinctrl-[0-9]+'
From schema: Documentation/devicetree/bindings/usb/generic-ehci.yaml
that comes from:
usb at 21000 {
#usb-cells = <0>;
compatible = "generic-ehci";
reg = <0x00021000 0x1000>;
interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
phys = <&usb2_phy>;
#address-cells = <1>;
#size-cells = <0>;
ehci_port1: port at 1 {
reg = <1>;
#trigger-source-cells = <0>;
};
ehci_port2: port at 2 {
reg = <2>;
#trigger-source-cells = <0>;
};
};
##########
If you check Documentation/devicetree/bindings/usb/generic-ehci.yaml it does:
allOf:
- $ref: "usb-hcd.yaml"
In the usb-hcd.yaml there is:
properties:
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^.*@[0-9a-f]{1,2}$":
description: The hard wired USB devices
type: object
$ref: /schemas/usb/usb-device.yaml
##########
So all looks good at first sight. I guess it's some problem with $ref /
additionalProperties / unevaluatedProperties.
I thought that generic-ehci.yaml should do:
unevaluatedProperties: false
instead of:
additionalProperties: false
but that doesn't help:
arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dtb: usb at 21000: Unevaluated properties are not allowed ('#usb-cells', '#address-cells', '#size-cells', 'port at 1', 'port at 2' were unexpected)
From schema: Documentation/devicetree/bindings/usb/generic-ehci.yaml
The same seems to apply to generic-ohci.yaml and generic-xhci.yaml .
Could someone help me fixing that, please?
More information about the linux-arm-kernel
mailing list