Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UART via USB C analog audio pins #1

Open
Demon000 opened this issue Jan 20, 2022 · 0 comments
Open

UART via USB C analog audio pins #1

Demon000 opened this issue Jan 20, 2022 · 0 comments

Comments

@Demon000
Copy link
Owner

Demon000 commented Jan 20, 2022

sbu_uart_en_ctrl {
	sbu_uart_en_idle: uart_audio_en_idle {
		mux {
			pins = "gpio6";
			function = "gpio";
		};
		config {
			pins = "gpio6";
			drive-strength = <2>;
			bias-pull-down;
			output-low;
		};
	};

	sbu_uart_en_active: uart_audio_en_active {
		mux {
			pins = "gpio6";
			function = "gpio";
		};
		config {
			pins = "gpio6";
			drive-strength = <2>;
			bias-disable;
			output-high;
		};
	};
};

qcom,uart-audio-sw-gpio = <&sbu_uart_en>;
#ifdef CONFIG_AUDIO_UART_DEBUG
		if (of_find_property(card->dev->of_node,
					"qcom,uart-audio-sw-gpio",
					NULL)) {
			rc = wcd_mbhc_init_gpio(mbhc, mbhc_cfg,
					"qcom,uart-audio-sw-gpio",
					&mbhc_cfg->uart_audio_switch_gpio,
					&mbhc_cfg->uart_audio_switch_gpio_p);
			if (rc)
				goto err;
			#ifdef CONFIG_FASTBOOT_CMD_CTRL_UART
			if (!is_early_cons_enabled) {
				/*disable uart as it can produce noise when headset was pluged-in*/
				msm_cdc_pinctrl_select_active_state(mbhc_cfg->uart_audio_switch_gpio_p);
				dev_dbg(mbhc->component->dev, "disable uart in wcd_mbhc_start() \n");
			}
			#endif
		}
#endif
earlycon=msm_geni_serial,0x98c000
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

No branches or pull requests

1 participant