Path: blob/master/arch/mips/pic32/pic32mzda/early_pin.h
26583 views
/* SPDX-License-Identifier: GPL-2.0-only */1/*2* Joshua Henderson <[email protected]>3* Copyright (C) 2015 Microchip Technology Inc. All rights reserved.4*/5#ifndef _PIC32MZDA_EARLY_PIN_H6#define _PIC32MZDA_EARLY_PIN_H78/*9* This is a complete, yet overly simplistic and unoptimized, PIC32MZDA PPS10* configuration only useful before we have full pinctrl initialized.11*/1213/* Input PPS Functions */14enum {15IN_FUNC_INT3,16IN_FUNC_T2CK,17IN_FUNC_T6CK,18IN_FUNC_IC3,19IN_FUNC_IC7,20IN_FUNC_U1RX,21IN_FUNC_U2CTS,22IN_FUNC_U5RX,23IN_FUNC_U6CTS,24IN_FUNC_SDI1,25IN_FUNC_SDI3,26IN_FUNC_SDI5,27IN_FUNC_SS6,28IN_FUNC_REFCLKI1,29IN_FUNC_INT4,30IN_FUNC_T5CK,31IN_FUNC_T7CK,32IN_FUNC_IC4,33IN_FUNC_IC8,34IN_FUNC_U3RX,35IN_FUNC_U4CTS,36IN_FUNC_SDI2,37IN_FUNC_SDI4,38IN_FUNC_C1RX,39IN_FUNC_REFCLKI4,40IN_FUNC_INT2,41IN_FUNC_T3CK,42IN_FUNC_T8CK,43IN_FUNC_IC2,44IN_FUNC_IC5,45IN_FUNC_IC9,46IN_FUNC_U1CTS,47IN_FUNC_U2RX,48IN_FUNC_U5CTS,49IN_FUNC_SS1,50IN_FUNC_SS3,51IN_FUNC_SS4,52IN_FUNC_SS5,53IN_FUNC_C2RX,54IN_FUNC_INT1,55IN_FUNC_T4CK,56IN_FUNC_T9CK,57IN_FUNC_IC1,58IN_FUNC_IC6,59IN_FUNC_U3CTS,60IN_FUNC_U4RX,61IN_FUNC_U6RX,62IN_FUNC_SS2,63IN_FUNC_SDI6,64IN_FUNC_OCFA,65IN_FUNC_REFCLKI3,66};6768/* Input PPS Pins */69#define IN_RPD2 0x0070#define IN_RPG8 0x0171#define IN_RPF4 0x0272#define IN_RPD10 0x0373#define IN_RPF1 0x0474#define IN_RPB9 0x0575#define IN_RPB10 0x0676#define IN_RPC14 0x0777#define IN_RPB5 0x0878#define IN_RPC1 0x0A79#define IN_RPD14 0x0B80#define IN_RPG1 0x0C81#define IN_RPA14 0x0D82#define IN_RPD6 0x0E83#define IN_RPD3 0x0084#define IN_RPG7 0x0185#define IN_RPF5 0x0286#define IN_RPD11 0x0387#define IN_RPF0 0x0488#define IN_RPB1 0x0589#define IN_RPE5 0x0690#define IN_RPC13 0x0791#define IN_RPB3 0x0892#define IN_RPC4 0x0A93#define IN_RPD15 0x0B94#define IN_RPG0 0x0C95#define IN_RPA15 0x0D96#define IN_RPD7 0x0E97#define IN_RPD9 0x0098#define IN_RPG6 0x0199#define IN_RPB8 0x02100#define IN_RPB15 0x03101#define IN_RPD4 0x04102#define IN_RPB0 0x05103#define IN_RPE3 0x06104#define IN_RPB7 0x07105#define IN_RPF12 0x09106#define IN_RPD12 0x0A107#define IN_RPF8 0x0B108#define IN_RPC3 0x0C109#define IN_RPE9 0x0D110#define IN_RPD1 0x00111#define IN_RPG9 0x01112#define IN_RPB14 0x02113#define IN_RPD0 0x03114#define IN_RPB6 0x05115#define IN_RPD5 0x06116#define IN_RPB2 0x07117#define IN_RPF3 0x08118#define IN_RPF13 0x09119#define IN_RPF2 0x0B120#define IN_RPC2 0x0C121#define IN_RPE8 0x0D122123/* Output PPS Pins */124enum {125OUT_RPD2,126OUT_RPG8,127OUT_RPF4,128OUT_RPD10,129OUT_RPF1,130OUT_RPB9,131OUT_RPB10,132OUT_RPC14,133OUT_RPB5,134OUT_RPC1,135OUT_RPD14,136OUT_RPG1,137OUT_RPA14,138OUT_RPD6,139OUT_RPD3,140OUT_RPG7,141OUT_RPF5,142OUT_RPD11,143OUT_RPF0,144OUT_RPB1,145OUT_RPE5,146OUT_RPC13,147OUT_RPB3,148OUT_RPC4,149OUT_RPD15,150OUT_RPG0,151OUT_RPA15,152OUT_RPD7,153OUT_RPD9,154OUT_RPG6,155OUT_RPB8,156OUT_RPB15,157OUT_RPD4,158OUT_RPB0,159OUT_RPE3,160OUT_RPB7,161OUT_RPF12,162OUT_RPD12,163OUT_RPF8,164OUT_RPC3,165OUT_RPE9,166OUT_RPD1,167OUT_RPG9,168OUT_RPB14,169OUT_RPD0,170OUT_RPB6,171OUT_RPD5,172OUT_RPB2,173OUT_RPF3,174OUT_RPF13,175OUT_RPC2,176OUT_RPE8,177OUT_RPF2,178};179180/* Output PPS Functions */181#define OUT_FUNC_U3TX 0x01182#define OUT_FUNC_U4RTS 0x02183#define OUT_FUNC_SDO1 0x05184#define OUT_FUNC_SDO2 0x06185#define OUT_FUNC_SDO3 0x07186#define OUT_FUNC_SDO5 0x09187#define OUT_FUNC_SS6 0x0A188#define OUT_FUNC_OC3 0x0B189#define OUT_FUNC_OC6 0x0C190#define OUT_FUNC_REFCLKO4 0x0D191#define OUT_FUNC_C2OUT 0x0E192#define OUT_FUNC_C1TX 0x0F193#define OUT_FUNC_U1TX 0x01194#define OUT_FUNC_U2RTS 0x02195#define OUT_FUNC_U5TX 0x03196#define OUT_FUNC_U6RTS 0x04197#define OUT_FUNC_SDO1 0x05198#define OUT_FUNC_SDO2 0x06199#define OUT_FUNC_SDO3 0x07200#define OUT_FUNC_SDO4 0x08201#define OUT_FUNC_SDO5 0x09202#define OUT_FUNC_OC4 0x0B203#define OUT_FUNC_OC7 0x0C204#define OUT_FUNC_REFCLKO1 0x0F205#define OUT_FUNC_U3RTS 0x01206#define OUT_FUNC_U4TX 0x02207#define OUT_FUNC_U6TX 0x04208#define OUT_FUNC_SS1 0x05209#define OUT_FUNC_SS3 0x07210#define OUT_FUNC_SS4 0x08211#define OUT_FUNC_SS5 0x09212#define OUT_FUNC_SDO6 0x0A213#define OUT_FUNC_OC5 0x0B214#define OUT_FUNC_OC8 0x0C215#define OUT_FUNC_C1OUT 0x0E216#define OUT_FUNC_REFCLKO3 0x0F217#define OUT_FUNC_U1RTS 0x01218#define OUT_FUNC_U2TX 0x02219#define OUT_FUNC_U5RTS 0x03220#define OUT_FUNC_U6TX 0x04221#define OUT_FUNC_SS2 0x06222#define OUT_FUNC_SDO4 0x08223#define OUT_FUNC_SDO6 0x0A224#define OUT_FUNC_OC2 0x0B225#define OUT_FUNC_OC1 0x0C226#define OUT_FUNC_OC9 0x0D227#define OUT_FUNC_C2TX 0x0F228229void pic32_pps_input(int function, int pin);230void pic32_pps_output(int function, int pin);231232#endif233234235