Skip to content

J616s dtbs_check: binding gaps and two DT fixes (26 -> 4 reports) - #421

Merged
RyanTheTide merged 10 commits into
integration/aurorafrom
ryan/j616s-dtbs-bindings
Oct 24, 2026
Merged

RyanTheTide merged 10 commits into
integration/aurorafrom
ryan/j616s-dtbs-bindings

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

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,tas27xx: allow ti,tas2764 as the fallback after ti,sn012776. Every Apple SN012776 node uses that pair.
  • cirrus,cs42l84: reference dai-common.yaml, so sound-name-prefix is allowed.
  • apple,macaudio: describe the per-codec TDM idle properties macaudio.c parses: dai-tdm-idle-mode-N (zero or pulldown) and dai-tdm-slot-tx-idle-mask-N.
  • nonposted-mmio on apple,cluster-cpufreq, apple,t8140-mcc, apple,t8140-pmp-report and apple,pmc. The per-node property is load-bearing here. 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.
  • apple,dockchannel-hid: describe the tp-accel and mtp interface nodes the J616s firmware announces and the driver matches by name.

DT (t6040-j616s):

  • Add the zeroed local-bd-address placeholder that m1n1 fills from the ADT, as on the other Apple machines.
  • Rename the Wi-Fi CLKREQ pin group to wifi-clkreq-pins.

dtbs_check:

  • t6040-j616s goes from 26 reports to 4.
  • Across all 116 Apple DTBs, unique reports go from 6985 to 6688, and no DTB gains one. A few existing reports on j473/j433/j434/j493 change wording.
  • dt_binding_check is clean on the touched bindings.

The 4 left are the Wi-Fi node's brcm,bcm4329-fmac compatible 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-inv is missing from the cs42l84 binding, and ti,tas2770 lacks the tas5770l fallback.

🤖 Generated with Claude Code

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>
@RyanTheTide
RyanTheTide merged commit ba92bdf into integration/aurora Oct 24, 2026
@RyanTheTide
RyanTheTide deleted the ryan/j616s-dtbs-bindings branch October 24, 2026 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant