Repository navigation
dt-bindings: phy: ti,cd2e22: give apple,tunable the type its other users have - #1896
Conversation
…ers have apple,tunable is a uint32-matrix in iommu/apple,dart.yaml and in pci/apple,pcie.yaml, and a uint8-array here. dtschema keeps one integer type per property name for the whole tree, so dt-mk-schema reports "apple,tunable: multiple incompatible types", and dt-validate then fails to decode the first apple,tunable it meets in a DTB: it looks up 'uint8-array' in its table of scalar formats and dies with KeyError: 'uint8-array' in prop_value(). No schema is applied to that DTB, and since kbuild does not fail the target on it, "make CHECK_DTBS=y" returns 0 with no warnings. Every Apple DTB that carries a DART or a PCIe port with apple,tunable is affected, so dtbs_check has been validating none of them. Describe the repeater's property as a uint32-matrix too. Its content is a whole number of four-byte (register, mask, value, reserved) entries, so each entry is one big-endian cell and the flattened property is byte-for-byte what it was: the bootloader that fills it and the driver, which reads it with device_property_read_u8_array(), need no change, and no in-tree DT sets the property. Write the example as a cell to match. The item counts go away with the old type. dtschema merges the dimensions of all matrix definitions of one property name, so counts given here would change how the three-cell rows of the DART and PCIe tunables are split. The driver already rejects an empty list, a length that is not a multiple of four and a nonzero reserved byte. Signed-off-by: Diljit Singh <[email protected]>
|
The dt-checks failure here is not caused by this change. Checked two ways:
The 30 DTBs that crash on the base are exactly the 30 DTBs carrying the 1084 lines, and the 137 compiled DTBs Merging over the red dt-checks on this evidence; the new baseline for integration/aurora is 1482 warning lines with no validator crash. |
apple,tunableis defined with two different integer types:uint32-matrixiniommu/apple,dart.yamlandpci/apple,pcie.yaml, anduint8-arrayinphy/ti,cd2e22.yaml. dtschema keeps one integer type per propertyname for the whole tree. With this clash dt-mk-schema prints "apple,tunable: multiple incompatible types", and
dt-validate crashes on the first
apple,tunableit has to decode in a DTB (KeyError: 'uint8-array'inprop_value()). No schema is applied to that DTB, and because kbuild does not fail the target,make CHECK_DTBS=yreturns 0 and prints no warnings. So dtbs_check has been validating nothing for every AppleDTB that has a DART or a PCIe port with
apple,tunablein its source. The binding's own example crashesdt-validate in dt_binding_check the same way.
This describes the repeater's property as a
uint32-matrixas well. Its content is a whole number of four-byte(register, mask, value, reserved) entries, so each entry is one big-endian cell and the flattened property is
byte-for-byte unchanged. The bootloader that fills it and the driver (which reads it with
device_property_read_u8_array()) need no change, and no in-tree DT sets the property. The example is written asa cell to match. The
minItems/maxItemsbyte counts go away with the old type: dtschema merges the dimensionsof all matrix definitions of one name, so counts here would change how the three-cell DART and PCIe rows are
split. The driver already rejects an empty list, a length that is not a multiple of four, and a nonzero reserved
byte.
Tested with dtschema 2026.9 (
make dt_binding_check/make CHECK_DTBS=y <dtb>, ARCH=arm64, LLVM=1):apple,tunablein its source)The warnings that now show up are existing ones in other bindings and DTs; this PR does not fix them. A J700 DTB
with a four-entry
apple,tunableadded to the repeater node in byte syntax also validates without a warning.🤖 Generated with Claude Code