Commit de0a64fa authored by Sam Hurst's avatar Sam Hurst Committed by Carles Cufi
Browse files

samples: subsys: usb_c: sink: Change PD port to Port1



The stm32g081b_eval board does not implement Dead Battery
functionality on PD Port2. Change the sample configuration
so that PD Port1 is used, which has Dead Battery support.

Signed-off-by: default avatarSam Hurst <sbh1187@gmail.com>
parent 6403c021
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -8,14 +8,14 @@
#include <dt-bindings/usb-c/pd.h>

/ {
	vbus2: vbus {
	vbus1: vbus {
		compatible = "zephyr,usb-c-vbus-adc";
		io-channels = <&adc1 3>;
		io-channels = <&adc1 9>;
		output-ohms = <49900>;
		full-ohms = <(330000 + 49900)>;

		/* Pin B14 is used to control VBUS Discharge for Port2 */
		discharge-gpios = <&gpiob 14 GPIO_ACTIVE_HIGH>;
		/* Pin B13 is used to control VBUS Discharge for Port1 */
		discharge-gpios = <&gpiob 13 GPIO_ACTIVE_HIGH>;
	};

	ports {
@@ -25,8 +25,8 @@
		port1: usbc-port@1 {
			compatible = "usb-c-connector";
			reg = <1>;
			tcpc = <&ucpd2>;
			vbus = <&vbus2>;
			tcpc = <&ucpd1>;
			vbus = <&vbus1>;
			power-role = "sink";
			sink-pdos = <PDO_FIXED(5000, 100, 0)>;
		};