Follow-up to #140 and #108, from the Surface 2 (Tegra 4 / T114) side. Audio is silent there too, and I found something that I do not think has been raised in either thread: the I2S and MCLK pins are never muxed at all.
Kernel: linux-postmarketos-grate 7.0.1 (libre-tegra stable), Raspbian 12 userland, booted via UEFI + EFI stub.
The finding
tegra114-microsoft-surface-2-common.dtsi contains no audio pinmux entries whatsoever, and the pins confirm it at runtime:
# /sys/kernel/debug/pinctrl/70000868.pinmux/pinmux-pins
pin 2 (DAP2_FS PA2): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 3 (DAP2_SCLK PA3): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 4 (DAP2_DIN PA4): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 5 (DAP2_DOUT PA5): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 180 (CLK1_OUT PW4): (MUX UNCLAIMED) (GPIO UNCLAIMED)
The card is on 70080400.i2s = tegra_i2s1, i.e. DAP2, and MCLK is pmc clk_out_1 = CLK1_OUT PW4 (extperiph1). Counting audio pin entries per board:
| board |
audio pin entries |
tegra114-microsoft-surface-2-common.dtsi |
0 |
tegra30-microsoft-surface-rt.dts |
0 |
tegra114-dalmore.dts |
26 |
tegra114-asus-tf701t.dts |
17 |
So the SoC generates MCLK (pmc_clk_out_1 at 12.288 MHz, verified in clk_summary) and the I2S controller DMAs happily (hw_ptr advancing), but neither the clock nor the data can physically reach the codec. That is consistent with a codec whose registers all look perfect over I2C while nothing comes out, and with the headphone DC servo timing out, since the DC servo needs SYSCLK.
Adding the pins (values copied from dalmore) makes them claim correctly:
pin 2 (DAP2_FS PA2): 70000868.pinmux (GPIO UNCLAIMED) (HOG) function i2s1 group dap2_fs_pa2
pin 180 (CLK1_OUT PW4): 70000868.pinmux (GPIO UNCLAIMED) (HOG) function extperiph1 group clk1_out_pw4
Honesty first: this did NOT restore audio on my Surface 2. Still silent on speakers and headphones. So it is either not the only fault, or the pins were already correct in hardware and pinctrl simply was not describing them. But given #140 reports the same silence on Surface RT, and Surface RT's DTS has the same omission, it seemed worth putting in front of people who know the hardware.
Confirming @digetx's point in #140
both 5v and 1.8v regulators are defined as always-on in device-tree and driver doesn't care about actual voltages, hence the change shall have no practical effect
Confirmed experimentally. Surface 2's DTS points all eight wm8962 supplies at a stub_audio_reg placeholder (regulator-fixed, no voltage, no parent, with a // TODO check regulators comment). I repointed them at the real vdd-1v8 rail (tps65913_smps8) — no change, exactly as predicted, because that rail is already regulator-always-on.
I also tested the related theory that Linux switches off what UEFI enabled: rebuilt with regulator_ignore_unused, which does change behaviour (SYSEN1 stays enabled where it was previously disabled on every boot) — but audio remained silent.
Ruled out on Surface 2, so nobody repeats it
- MCLK chain verified live while streaming:
pll_a 368.64 MHz → pll_a_out0/extern1/pmc_clk_out_1 12.288 MHz, i2s1 3.072 MHz
- Codec registers correct:
R26=0x01f8 (DACs + HP/SPK PGAs powered), R49=0x00c3 (Class-D enabled), R5=0x0010 (DAC not muted)
- DAPM path complete on both outputs (
Int Spk: On in 2, Headphone Jack: On in 4); SPKOUTL PGA is a mux taking DACL directly, so R99=0 is expected rather than a fault
- Jack detection correct, volume keys work (both GPIO paths — they work precisely because they do not use the I2S pins)
- TPS65090 FET3 and FET7 enabled at runtime via i2c:
POWER_GOOD never asserts, so nothing is behind them
- wm8962 GPIOs 2/3/5/6 driven to logic-output-high at runtime (
0x0041, per wm8962_gpio_direction_out): no effect, so nothing obvious gates an external amp
- The codec's own beep generator, routed internally to the DACs with the whole chain powered, is also inaudible — which is what makes me think the remaining fault is analogue rather than anything in the digital/routing path
I deliberately did not touch palmas LDO4: it is vpp-fuse on the Tegra 4 reference design, and a mistake there is irreversible.
Question
Has anyone ever had wm8962 audio working on either Surface RT or Surface 2? #140 suggests not. If it has never worked on either, that reframes this as an unfinished port rather than a per-unit fault, and the pinmux omission above might be worth checking on Surface RT hardware by someone who has one.
Also happy to send patches for three unrelated Surface 2 device-tree fixes found along the way, all confirmed working on hardware, if they would be useful:
ti,palmas-override-powerhold on the palmas node — without it the machine halts but never powers down (GPIO7 POWERHOLD outranks the DEV_ON bit), requiring a 10-second hardware force-off
- microSD slot:
sdmmc3 enabled with its supplies, and its pins taken back from uarta (upstream currently trades the SD slot for a serial console)
ti,tps65090-charger subnode — the driver was probing and failing with "no platform data available" (already present in 7.0.1; the fix applies to older DTBs)
Happy to test anything on Surface 2 hardware.
Follow-up to #140 and #108, from the Surface 2 (Tegra 4 / T114) side. Audio is silent there too, and I found something that I do not think has been raised in either thread: the I2S and MCLK pins are never muxed at all.
Kernel:
linux-postmarketos-grate7.0.1 (libre-tegrastable), Raspbian 12 userland, booted via UEFI + EFI stub.The finding
tegra114-microsoft-surface-2-common.dtsicontains no audio pinmux entries whatsoever, and the pins confirm it at runtime:The card is on
70080400.i2s=tegra_i2s1, i.e. DAP2, and MCLK ispmc clk_out_1=CLK1_OUT PW4(extperiph1). Counting audio pin entries per board:tegra114-microsoft-surface-2-common.dtsitegra30-microsoft-surface-rt.dtstegra114-dalmore.dtstegra114-asus-tf701t.dtsSo the SoC generates MCLK (
pmc_clk_out_1at 12.288 MHz, verified inclk_summary) and the I2S controller DMAs happily (hw_ptradvancing), but neither the clock nor the data can physically reach the codec. That is consistent with a codec whose registers all look perfect over I2C while nothing comes out, and with the headphone DC servo timing out, since the DC servo needs SYSCLK.Adding the pins (values copied from dalmore) makes them claim correctly:
Honesty first: this did NOT restore audio on my Surface 2. Still silent on speakers and headphones. So it is either not the only fault, or the pins were already correct in hardware and pinctrl simply was not describing them. But given #140 reports the same silence on Surface RT, and Surface RT's DTS has the same omission, it seemed worth putting in front of people who know the hardware.
Confirming @digetx's point in #140
Confirmed experimentally. Surface 2's DTS points all eight wm8962 supplies at a
stub_audio_regplaceholder (regulator-fixed, no voltage, no parent, with a// TODO check regulatorscomment). I repointed them at the realvdd-1v8rail (tps65913_smps8) — no change, exactly as predicted, because that rail is alreadyregulator-always-on.I also tested the related theory that Linux switches off what UEFI enabled: rebuilt with
regulator_ignore_unused, which does change behaviour (SYSEN1stays enabled where it was previously disabled on every boot) — but audio remained silent.Ruled out on Surface 2, so nobody repeats it
pll_a368.64 MHz →pll_a_out0/extern1/pmc_clk_out_112.288 MHz,i2s13.072 MHzR26=0x01f8(DACs + HP/SPK PGAs powered),R49=0x00c3(Class-D enabled),R5=0x0010(DAC not muted)Int Spk: On in 2,Headphone Jack: On in 4);SPKOUTL PGAis a mux takingDACLdirectly, soR99=0is expected rather than a faultPOWER_GOODnever asserts, so nothing is behind them0x0041, perwm8962_gpio_direction_out): no effect, so nothing obvious gates an external ampI deliberately did not touch palmas LDO4: it is
vpp-fuseon the Tegra 4 reference design, and a mistake there is irreversible.Question
Has anyone ever had wm8962 audio working on either Surface RT or Surface 2? #140 suggests not. If it has never worked on either, that reframes this as an unfinished port rather than a per-unit fault, and the pinmux omission above might be worth checking on Surface RT hardware by someone who has one.
Also happy to send patches for three unrelated Surface 2 device-tree fixes found along the way, all confirmed working on hardware, if they would be useful:
ti,palmas-override-powerholdon the palmas node — without it the machine halts but never powers down (GPIO7 POWERHOLD outranks theDEV_ONbit), requiring a 10-second hardware force-offsdmmc3enabled with its supplies, and its pins taken back fromuarta(upstream currently trades the SD slot for a serial console)ti,tps65090-chargersubnode — the driver was probing and failing with "no platform data available" (already present in 7.0.1; the fix applies to older DTBs)Happy to test anything on Surface 2 hardware.