1 // Copyright 2020 Espressif Systems (Shanghai) PTE LTD
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #include "soc/soc_caps.h"
16 #include "soc/usb_periph.h"
17 
18 const usb_iopin_dsc_t usb_periph_iopins[] = {
19     {USBPHY_VP_NUM, USB_EXTPHY_VP_IDX, 0, 1},
20     {USBPHY_VM_NUM, USB_EXTPHY_VM_IDX, 0, 1},
21     {USBPHY_RCV_NUM, USB_EXTPHY_RCV_IDX, 0, 1},
22     {USBPHY_OEN_NUM, USB_EXTPHY_OEN_IDX, 1, 1},
23     {USBPHY_VPO_NUM, USB_EXTPHY_VPO_IDX, 1, 1},
24     {USBPHY_VMO_NUM, USB_EXTPHY_VMO_IDX, 1, 1},
25     {GPIO_MATRIX_CONST_ONE_INPUT, USB_OTG_IDDIG_IN_IDX, 0, 0},     //connected connector is mini-B
26     //connected connector is mini-B
27     {GPIO_MATRIX_CONST_ONE_INPUT, USB_SRP_BVALID_IN_IDX, 0, 0},    //HIGH to force USB device mode
28     {GPIO_MATRIX_CONST_ONE_INPUT, USB_OTG_VBUSVALID_IN_IDX, 0, 0}, //receiving a valid Vbus from host
29     {GPIO_MATRIX_CONST_ZERO_INPUT, USB_OTG_AVALID_IN_IDX, 0, 0},
30     {-1, -1, 0, 0}
31 };
32