moby: HACK: switch UART2_RX to pull down to silence sysrqs from headphone detection
i haven't tested the uart mode with this: hopefully it still works with that. even with this, i get several hp-detect interrupts, which comes with its own problem (i.e. pipewire restarts every second).
This commit is contained in:
@@ -154,6 +154,7 @@
|
||||
"Line", "Line Out Modem";
|
||||
|
||||
simple-audio-card,hp-det-gpio = <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>;
|
||||
pinctrl-0 = <&hp_det_pin>;
|
||||
|
||||
simple-audio-card,pin-switches = "Internal Speaker";
|
||||
simple-audio-card,aux-devs = <&speaker_amp>;
|
||||
@@ -169,8 +170,6 @@
|
||||
|
||||
speaker_amp: audio-amplifier {
|
||||
compatible = "simple-audio-amplifier";
|
||||
// TODO: why does it need both pinctrl *and* enable-gpios??
|
||||
// i guess the pinctrl enables the physical pin to act as a gpio?
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spk_en>;
|
||||
enable-gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
|
||||
@@ -226,7 +225,8 @@
|
||||
// the schematics show `IN2P` / `IN2N` as being differential inputs though, with no mention of "in3"
|
||||
realtek,in2-differential;
|
||||
// realtek,in3-differential;
|
||||
// megi has lout-differential, but schematic shows LOUT{R,L} => 4G_IN_{R,L} i.e. stereo
|
||||
// megi has lout-differential, but schematic shows LOUT{R,L} => 4G_IN_{R,L} i.e. stereo.
|
||||
// sounds like the *modem* misconfigures its end to be differential, though
|
||||
// realtek,lout-differential;
|
||||
// codec has ldo1-en connected to 1.8V via pull-up, i.e. permanently enabled, no GPIO?
|
||||
// realtek,ldo1-en-gpios = VCCA1V8_CODEC;
|
||||
@@ -251,7 +251,7 @@
|
||||
// // <Documentation/devicetree/bindings/sound/realtek,rt5645.yaml>
|
||||
// avdd-supply = <&vcca3v0_codec>;
|
||||
// cpvdd-supply = <&vcca3v0_codec>;
|
||||
// // spkvdd-supply = <&vcc5v0_sys>; //< TODO
|
||||
// spkvdd-supply = <&vcc5v0_sys>;
|
||||
// dbvdd-supply = <&vcca1v8_codec>;
|
||||
};
|
||||
};
|
||||
@@ -273,10 +273,29 @@
|
||||
|
||||
&pinctrl {
|
||||
sound {
|
||||
hp_det_pin: hp-det-pin {
|
||||
// schematics specify a 100k pull-up to VCC_3V0
|
||||
rockchip,pins = <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
spk_en: spk-en {
|
||||
rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
uart2c {
|
||||
uart2c_xfer: uart2c-xfer {
|
||||
// headphone out interferes with debug UART2.
|
||||
// it seems that the amp tries to output negative signals, through the UM4717 MUX.
|
||||
// that MUX chooses between UART and audio, to route to the headphone jack.
|
||||
// unfortunately it's not designed to handle below-ground signals.
|
||||
// long-term fix is to mix a DC offset into the amp output.
|
||||
// until then, pull RX to *ground* instead of supply, so that it's less affected by (apparent) shorting with the HPOL channel.
|
||||
// note that this only fixes the spurious UART/spurious SYSRQ errors,
|
||||
// it does not address the distortion likely caused by this.
|
||||
rockchip,pins =
|
||||
<4 RK_PC3 1 &pcfg_pull_down>,
|
||||
<4 RK_PC4 1 &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// TODO: what are `io_domains`?
|
||||
|
Reference in New Issue
Block a user