1/* SPDX-License-Identifier: Apache-2.0 */ 2 3#include <dt-bindings/usb-c/pd.h> 4 5/ { 6 aliases { 7 usbc-port0 = &port0; 8 }; 9 10 ports { 11 #address-cells = <1>; 12 #size-cells = <0>; 13 14 port0: usbc-port@0 { 15 compatible = "usb-c-connector"; 16 reg = <0>; 17 tcpc = <&tcpc0>; 18 vbus = <&vbus0>; 19 ppc = <&ppc0>; 20 power-role = "sink"; 21 sink-pdos = <PDO_FIXED(5000, 100, 0)>; 22 }; 23 }; 24}; 25 26&pinctrl { 27 tcpc0_default: tcpc0_default { 28 group0 { 29 pinmux = <PA12MFP_GPIO>; 30 digital-path-disable; 31 }; 32 group1 { 33 pinmux = <PC0MFP_UTCPD0_CC1>, 34 <PC1MFP_UTCPD0_CC2>, 35 <PC2MFP_UTCPD0_CCDB1>, 36 <PC3MFP_UTCPD0_CCDB2>, 37 <PA1MFP_GPIO>, 38 <PA3MFP_UTCPD0_VBSNKEN>; 39 }; 40 }; 41 42 eadc0_default: eadc0_default { 43 group0 { 44 pinmux = <PB15MFP_EADC0_CH15>; 45 digital-path-disable; 46 }; 47 }; 48}; 49 50&tcpc0 { 51 status = "okay"; 52 pinctrl-0 = <&tcpc0_default>; 53 pinctrl-names = "default"; 54 gpios = <&gpioa 12 0>, 55 <&gpioa 1 GPIO_ACTIVE_HIGH>; 56 gpio-names = "vbus-detect", "vbus-discharge"; 57 vbus-sink-enable-polarity = "high-active"; 58 vbus-divide = "divide-10"; 59 io-channels = <&eadc0 15>; 60 io-channel-names = "chn-vbus"; 61}; 62 63&vbus0 { 64 status = "okay"; 65}; 66 67&ppc0 { 68 status = "okay"; 69}; 70 71&eadc0 { 72 status = "okay"; 73 pinctrl-0 = <&eadc0_default>; 74 pinctrl-names = "default"; 75 #address-cells = <1>; 76 #size-cells = <0>; 77 78 channel@15 { 79 reg = <15>; 80 zephyr,gain = "ADC_GAIN_1"; 81 zephyr,reference = "ADC_REF_EXTERNAL0"; 82 zephyr,vref-mv = <3300>; 83 zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_TICKS, 0x80)>; 84 }; 85}; 86 87/* Enable GPIO modules which are needed for below use cases: 88 * 1. GPIO pins 89 * 2. Power pins which need to disable digital input path 90 */ 91&gpioa { 92 status = "okay"; 93}; 94&gpiob { 95 status = "okay"; 96}; 97