Repository navigation
J616s dtbs_check: binding gaps and two DT fixes (26 -> 4 reports) - #421
Merged
Merged
Conversation
The Apple device trees describe their SN012776 speaker amps as "ti,sn012776", "ti,tas2764". The driver matches the more specific ti,sn012776 for the quirks of the Apple variant, and ti,tas2764 names the part it derives from. The binding allows a single compatible only, so dt-validate reports the compatible as too long on every amp of those machines. Allow ti,sn012776 followed by ti,tas2764. The single compatibles stay valid. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The Apple device trees give the CS42L84 headphone jack codec a sound-name-prefix, which ASoC puts in front of the codec's control and widget names. That property is described in dai-common.yaml, which this binding does not reference, and with additionalProperties set to false the binding rejects it on every CS42L84 machine. Reference dai-common.yaml and use unevaluatedProperties, as the CS42L42 and CS42L43 bindings do. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
macaudio reads two properties for each speaker codec from the dai-link
node, dai-tdm-idle-mode-<n> ("zero" or "pulldown") and
dai-tdm-slot-tx-idle-mask-<n> (a 32-bit slot mask), where <n> is the
position of the codec in the link's codec sound-dai list. It passes them
to the codec's set_tdm_idle(), which sets how the codec drives those
transmit slots while they are idle. The device trees of the speaker
machines set them, but the binding does not describe them, so
dt-validate rejects them and, with no type to go by, fails to decode
their values as well.
Describe both as pattern properties of the dai-link node. A link has at
most eight codecs, so <n> is 0 to 7, and the driver accepts only the two
drive modes.
Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The T6040 device tree places its SoC blocks at the root instead of under a simple-bus, because the boot loader edits several of them by path. With no bus node to carry nonposted-mmio, the blocks that need non-posted writes carry the property themselves, the three cluster cpufreq blocks among them. The property has an effect there. Since commit 47026c4 ("of: address: Allow to specify nonposted-mmio per-device") of_mmio_is_nonposted() checks the device node as well as its parent bus, and of_iomap(), which apple-soc-cpufreq uses, then maps the block with ioremap_np(). Dropping the property would turn these mappings into posted ones, so the fix belongs in the binding, which does not allow the property yet. Allow nonposted-mmio, as the Apple DockChannel, ATC PHY and USB4 ACIO bindings do. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The T6040 device tree places its SoC blocks at the root instead of under a simple-bus, because the boot loader edits several of them by path. With no bus node to carry nonposted-mmio, the blocks that need non-posted writes carry the property themselves, the memory cache controller among them. The property has an effect there. Since commit 47026c4 ("of: address: Allow to specify nonposted-mmio per-device") of_mmio_is_nonposted() checks the device node as well as its parent bus. The OF core then flags the node's memory resources IORESOURCE_MEM_NONPOSTED, and devm_platform_ioremap_resource(), which the MCC driver uses for its planes, maps them with ioremap_np(). Dropping the property would turn these mappings into posted ones, so the fix belongs in the binding, which does not allow the property yet. Allow nonposted-mmio, as the Apple DockChannel, ATC PHY and USB4 ACIO bindings do. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The T6040 device tree places its SoC blocks at the root instead of under a simple-bus, because the boot loader edits several of them by path. With no bus node to carry nonposted-mmio, the blocks that need non-posted writes carry the property themselves, the PMP report aperture among them. The property has an effect there. Since commit 47026c4 ("of: address: Allow to specify nonposted-mmio per-device") of_mmio_is_nonposted() checks the device node as well as its parent bus. The OF core then flags the node's memory resource IORESOURCE_MEM_NONPOSTED, and devm_platform_ioremap_resource(), which the report driver uses, maps it with ioremap_np(). Dropping the property would turn the mapping into a posted one, so the fix belongs in the binding, which does not allow the property yet. The report entries below the aperture have no registers of their own. Allow nonposted-mmio, as the Apple DockChannel, ATC PHY and USB4 ACIO bindings do. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The T6040 device tree places its SoC blocks at the root instead of under a simple-bus, because the boot loader edits several of them by path. With no bus node to carry nonposted-mmio, the blocks that need non-posted writes carry the property themselves, the PMC voter interface among them. The property has an effect there. Since commit 47026c4 ("of: address: Allow to specify nonposted-mmio per-device") of_mmio_is_nonposted() checks the device node as well as its parent bus. The OF core then flags the node's memory resources IORESOURCE_MEM_NONPOSTED, and devm_platform_ioremap_resource_byname(), which the PMC driver uses for its voters and rails windows, maps them with ioremap_np(). Dropping the property would turn these mappings into posted ones, so the fix belongs in the binding, which does not allow the property yet. Allow nonposted-mmio, as the Apple DockChannel, ATC PHY and USB4 ACIO bindings do. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…odes The driver uses an interface that the coprocessor announces only when the HID node has a child with the name of that interface. The MTP firmware of the MacBook Pro J616s announces keyboard, multi-touch, stm, actuator, tp-accel and mtp, its device tree has a child for each of them, and tp-accel and mtp both register as HID devices. The binding knows the accelerometer only as tp_accel, the name the firmware of the earlier machines uses, and has no mtp node at all. Describe both nodes, empty like the other interface nodes. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The BCM4388 Bluetooth binding requires local-bd-address. As on the other Apple machines, the boot loader provides it. m1n1 copies the ADT's /chosen mac-address-bluetooth0 into the node that the bluetooth0 alias names, using fdt_setprop(), which replaces the property as readily as it creates it. Add the zeroed placeholder that the other Apple device trees carry. The loaded tree is the same as before whenever the loader has an address. Without one, hci_bcm4377 and the Bluetooth core treat an all-zero local-bd-address like a missing one, so nothing changes at run time either. The comment above the PCIe node said that the boot loader's Bluetooth admission depends on the node exactly as it is. The Wi-Fi and Bluetooth setup in m1n1 reaches these nodes only through the wifi0 and bluetooth0 aliases and adds properties to them without checking the ones already there, and the kernel's BCM4388 admission waits for the Wi-Fi PCI function to bind without reading the Wi-Fi node. Reword the comment to say what the loader does. Fixes: f2a8c96 ("arm64: dts: apple: t6040-j616s: Add Wi-Fi and Bluetooth") Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The Apple pinctrl binding requires the names of pin configuration nodes to end in -pins. Rename wifi-clkreq to wifi-clkreq-pins and its label to match, as the other Apple device trees name their pin groups. The PCIe node refers to the group by phandle, so nothing else changes. Fixes: f2a8c96 ("arm64: dts: apple: t6040-j616s: Add Wi-Fi and Bluetooth") Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dtbs_check on t6040-j616s.dtb used to crash (fixed by #414). Now it runs, and 26 reports were left on integration/aurora. None come from today's merges: they are older binding gaps that every Apple machine shares, plus the batch-2 J616s DT. This fixes 22 of them without changing how anything runs.
Bindings:
ti,tas2764as the fallback afterti,sn012776. Every Apple SN012776 node uses that pair.sound-name-prefixis allowed.dai-tdm-idle-mode-N(zeroorpulldown) anddai-tdm-slot-tx-idle-mask-N.of_mmio_is_nonposted()reads the node itself, and the T6040 nodes have no bus above them, so the bindings allow it. Moving it to a bus would change mappings, so the DT stays as it is.tp-accelandmtpinterface nodes the J616s firmware announces and the driver matches by name.DT (t6040-j616s):
local-bd-addressplaceholder that m1n1 fills from the ADT, as on the other Apple machines.wifi-clkreq-pins.dtbs_check:
dt_binding_checkis clean on the touched bindings.The 4 left are the Wi-Fi node's
brcm,bcm4329-fmaccompatible and its root port. Changing that compatible changes brcmfmac's country-code handling, so it comes separately, after a regulatory before/after check on the J616s.Found along the way, not fixed here: t8112-j493.dts misspells
dai-tdm-slot-tx-idle-mode-*(the driver ignores those names),cirrus,ts-invis missing from the cs42l84 binding, and ti,tas2770 lacks the tas5770l fallback.🤖 Generated with Claude Code