1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 200a2749dSAllen Martin /* 300a2749dSAllen Martin * (C) Copyright 2010,2011 400a2749dSAllen Martin * NVIDIA Corporation <www.nvidia.com> 500a2749dSAllen Martin */ 600a2749dSAllen Martin 7e2969957SStephen Warren #ifndef _TEGRA20_PINMUX_H_ 8e2969957SStephen Warren #define _TEGRA20_PINMUX_H_ 900a2749dSAllen Martin 1000a2749dSAllen Martin /* 1100a2749dSAllen Martin * Pin groups which we adjust. There are three basic attributes of each pin 1200a2749dSAllen Martin * group which use this enum: 1300a2749dSAllen Martin * 1400a2749dSAllen Martin * - function 1500a2749dSAllen Martin * - pullup / pulldown 1600a2749dSAllen Martin * - tristate or normal 1700a2749dSAllen Martin */ 1800a2749dSAllen Martin enum pmux_pingrp { 1900a2749dSAllen Martin /* APB_MISC_PP_TRISTATE_REG_A_0 */ 2070ad375eSStephen Warren PMUX_PINGRP_ATA, 2170ad375eSStephen Warren PMUX_PINGRP_ATB, 2270ad375eSStephen Warren PMUX_PINGRP_ATC, 2370ad375eSStephen Warren PMUX_PINGRP_ATD, 2470ad375eSStephen Warren PMUX_PINGRP_CDEV1, 2570ad375eSStephen Warren PMUX_PINGRP_CDEV2, 2670ad375eSStephen Warren PMUX_PINGRP_CSUS, 2770ad375eSStephen Warren PMUX_PINGRP_DAP1, 2800a2749dSAllen Martin 2970ad375eSStephen Warren PMUX_PINGRP_DAP2, 3070ad375eSStephen Warren PMUX_PINGRP_DAP3, 3170ad375eSStephen Warren PMUX_PINGRP_DAP4, 3270ad375eSStephen Warren PMUX_PINGRP_DTA, 3370ad375eSStephen Warren PMUX_PINGRP_DTB, 3470ad375eSStephen Warren PMUX_PINGRP_DTC, 3570ad375eSStephen Warren PMUX_PINGRP_DTD, 3670ad375eSStephen Warren PMUX_PINGRP_DTE, 3700a2749dSAllen Martin 3870ad375eSStephen Warren PMUX_PINGRP_GPU, 3970ad375eSStephen Warren PMUX_PINGRP_GPV, 4070ad375eSStephen Warren PMUX_PINGRP_I2CP, 4170ad375eSStephen Warren PMUX_PINGRP_IRTX, 4270ad375eSStephen Warren PMUX_PINGRP_IRRX, 4370ad375eSStephen Warren PMUX_PINGRP_KBCB, 4470ad375eSStephen Warren PMUX_PINGRP_KBCA, 4570ad375eSStephen Warren PMUX_PINGRP_PMC, 4600a2749dSAllen Martin 4770ad375eSStephen Warren PMUX_PINGRP_PTA, 4870ad375eSStephen Warren PMUX_PINGRP_RM, 4970ad375eSStephen Warren PMUX_PINGRP_KBCE, 5070ad375eSStephen Warren PMUX_PINGRP_KBCF, 5170ad375eSStephen Warren PMUX_PINGRP_GMA, 5270ad375eSStephen Warren PMUX_PINGRP_GMC, 5370ad375eSStephen Warren PMUX_PINGRP_SDIO1, 5470ad375eSStephen Warren PMUX_PINGRP_OWC, 5500a2749dSAllen Martin 5600a2749dSAllen Martin /* 32: APB_MISC_PP_TRISTATE_REG_B_0 */ 5770ad375eSStephen Warren PMUX_PINGRP_GME, 5870ad375eSStephen Warren PMUX_PINGRP_SDC, 5970ad375eSStephen Warren PMUX_PINGRP_SDD, 6070ad375eSStephen Warren PMUX_PINGRP_RESERVED0, 6170ad375eSStephen Warren PMUX_PINGRP_SLXA, 6270ad375eSStephen Warren PMUX_PINGRP_SLXC, 6370ad375eSStephen Warren PMUX_PINGRP_SLXD, 6470ad375eSStephen Warren PMUX_PINGRP_SLXK, 6500a2749dSAllen Martin 6670ad375eSStephen Warren PMUX_PINGRP_SPDI, 6770ad375eSStephen Warren PMUX_PINGRP_SPDO, 6870ad375eSStephen Warren PMUX_PINGRP_SPIA, 6970ad375eSStephen Warren PMUX_PINGRP_SPIB, 7070ad375eSStephen Warren PMUX_PINGRP_SPIC, 7170ad375eSStephen Warren PMUX_PINGRP_SPID, 7270ad375eSStephen Warren PMUX_PINGRP_SPIE, 7370ad375eSStephen Warren PMUX_PINGRP_SPIF, 7400a2749dSAllen Martin 7570ad375eSStephen Warren PMUX_PINGRP_SPIG, 7670ad375eSStephen Warren PMUX_PINGRP_SPIH, 7770ad375eSStephen Warren PMUX_PINGRP_UAA, 7870ad375eSStephen Warren PMUX_PINGRP_UAB, 7970ad375eSStephen Warren PMUX_PINGRP_UAC, 8070ad375eSStephen Warren PMUX_PINGRP_UAD, 8170ad375eSStephen Warren PMUX_PINGRP_UCA, 8270ad375eSStephen Warren PMUX_PINGRP_UCB, 8300a2749dSAllen Martin 8470ad375eSStephen Warren PMUX_PINGRP_RESERVED1, 8570ad375eSStephen Warren PMUX_PINGRP_ATE, 8670ad375eSStephen Warren PMUX_PINGRP_KBCC, 8770ad375eSStephen Warren PMUX_PINGRP_RESERVED2, 8870ad375eSStephen Warren PMUX_PINGRP_RESERVED3, 8970ad375eSStephen Warren PMUX_PINGRP_GMB, 9070ad375eSStephen Warren PMUX_PINGRP_GMD, 9170ad375eSStephen Warren PMUX_PINGRP_DDC, 9200a2749dSAllen Martin 9300a2749dSAllen Martin /* 64: APB_MISC_PP_TRISTATE_REG_C_0 */ 9470ad375eSStephen Warren PMUX_PINGRP_LD0, 9570ad375eSStephen Warren PMUX_PINGRP_LD1, 9670ad375eSStephen Warren PMUX_PINGRP_LD2, 9770ad375eSStephen Warren PMUX_PINGRP_LD3, 9870ad375eSStephen Warren PMUX_PINGRP_LD4, 9970ad375eSStephen Warren PMUX_PINGRP_LD5, 10070ad375eSStephen Warren PMUX_PINGRP_LD6, 10170ad375eSStephen Warren PMUX_PINGRP_LD7, 10200a2749dSAllen Martin 10370ad375eSStephen Warren PMUX_PINGRP_LD8, 10470ad375eSStephen Warren PMUX_PINGRP_LD9, 10570ad375eSStephen Warren PMUX_PINGRP_LD10, 10670ad375eSStephen Warren PMUX_PINGRP_LD11, 10770ad375eSStephen Warren PMUX_PINGRP_LD12, 10870ad375eSStephen Warren PMUX_PINGRP_LD13, 10970ad375eSStephen Warren PMUX_PINGRP_LD14, 11070ad375eSStephen Warren PMUX_PINGRP_LD15, 11100a2749dSAllen Martin 11270ad375eSStephen Warren PMUX_PINGRP_LD16, 11370ad375eSStephen Warren PMUX_PINGRP_LD17, 11470ad375eSStephen Warren PMUX_PINGRP_LHP0, 11570ad375eSStephen Warren PMUX_PINGRP_LHP1, 11670ad375eSStephen Warren PMUX_PINGRP_LHP2, 11770ad375eSStephen Warren PMUX_PINGRP_LVP0, 11870ad375eSStephen Warren PMUX_PINGRP_LVP1, 11970ad375eSStephen Warren PMUX_PINGRP_HDINT, 12000a2749dSAllen Martin 12170ad375eSStephen Warren PMUX_PINGRP_LM0, 12270ad375eSStephen Warren PMUX_PINGRP_LM1, 12370ad375eSStephen Warren PMUX_PINGRP_LVS, 12470ad375eSStephen Warren PMUX_PINGRP_LSC0, 12570ad375eSStephen Warren PMUX_PINGRP_LSC1, 12670ad375eSStephen Warren PMUX_PINGRP_LSCK, 12770ad375eSStephen Warren PMUX_PINGRP_LDC, 12870ad375eSStephen Warren PMUX_PINGRP_LCSN, 12900a2749dSAllen Martin 13000a2749dSAllen Martin /* 96: APB_MISC_PP_TRISTATE_REG_D_0 */ 13170ad375eSStephen Warren PMUX_PINGRP_LSPI, 13270ad375eSStephen Warren PMUX_PINGRP_LSDA, 13370ad375eSStephen Warren PMUX_PINGRP_LSDI, 13470ad375eSStephen Warren PMUX_PINGRP_LPW0, 13570ad375eSStephen Warren PMUX_PINGRP_LPW1, 13670ad375eSStephen Warren PMUX_PINGRP_LPW2, 13770ad375eSStephen Warren PMUX_PINGRP_LDI, 13870ad375eSStephen Warren PMUX_PINGRP_LHS, 13900a2749dSAllen Martin 14070ad375eSStephen Warren PMUX_PINGRP_LPP, 14170ad375eSStephen Warren PMUX_PINGRP_RESERVED4, 14270ad375eSStephen Warren PMUX_PINGRP_KBCD, 14370ad375eSStephen Warren PMUX_PINGRP_GPU7, 14470ad375eSStephen Warren PMUX_PINGRP_DTF, 14570ad375eSStephen Warren PMUX_PINGRP_UDA, 14670ad375eSStephen Warren PMUX_PINGRP_CRTP, 14770ad375eSStephen Warren PMUX_PINGRP_SDB, 14800a2749dSAllen Martin 14900a2749dSAllen Martin /* these pin groups only have pullup and pull down control */ 15070ad375eSStephen Warren PMUX_PINGRP_CK32, 15170ad375eSStephen Warren PMUX_PINGRP_DDRC, 15270ad375eSStephen Warren PMUX_PINGRP_PMCA, 15370ad375eSStephen Warren PMUX_PINGRP_PMCB, 15470ad375eSStephen Warren PMUX_PINGRP_PMCC, 15570ad375eSStephen Warren PMUX_PINGRP_PMCD, 15670ad375eSStephen Warren PMUX_PINGRP_PMCE, 15770ad375eSStephen Warren PMUX_PINGRP_XM2C, 15870ad375eSStephen Warren PMUX_PINGRP_XM2D, 159dfb42fc9SStephen Warren PMUX_PINGRP_COUNT, 16000a2749dSAllen Martin }; 16100a2749dSAllen Martin 16200a2749dSAllen Martin /* 16300a2749dSAllen Martin * Functions which can be assigned to each of the pin groups. The values here 16400a2749dSAllen Martin * bear no relation to the values programmed into pinmux registers and are 16500a2749dSAllen Martin * purely a convenience. The translation is done through a table search. 16600a2749dSAllen Martin */ 16700a2749dSAllen Martin enum pmux_func { 1684a68d343SStephen Warren PMUX_FUNC_DEFAULT, 16900a2749dSAllen Martin PMUX_FUNC_AHB_CLK, 17000a2749dSAllen Martin PMUX_FUNC_APB_CLK, 17100a2749dSAllen Martin PMUX_FUNC_AUDIO_SYNC, 17200a2749dSAllen Martin PMUX_FUNC_CRT, 17300a2749dSAllen Martin PMUX_FUNC_DAP1, 17400a2749dSAllen Martin PMUX_FUNC_DAP2, 17500a2749dSAllen Martin PMUX_FUNC_DAP3, 17600a2749dSAllen Martin PMUX_FUNC_DAP4, 17700a2749dSAllen Martin PMUX_FUNC_DAP5, 17800a2749dSAllen Martin PMUX_FUNC_DISPA, 17900a2749dSAllen Martin PMUX_FUNC_DISPB, 18000a2749dSAllen Martin PMUX_FUNC_EMC_TEST0_DLL, 18100a2749dSAllen Martin PMUX_FUNC_EMC_TEST1_DLL, 18200a2749dSAllen Martin PMUX_FUNC_GMI, 18300a2749dSAllen Martin PMUX_FUNC_GMI_INT, 18400a2749dSAllen Martin PMUX_FUNC_HDMI, 18500a2749dSAllen Martin PMUX_FUNC_I2C, 18600a2749dSAllen Martin PMUX_FUNC_I2C2, 18700a2749dSAllen Martin PMUX_FUNC_I2C3, 18800a2749dSAllen Martin PMUX_FUNC_IDE, 18900a2749dSAllen Martin PMUX_FUNC_KBC, 19000a2749dSAllen Martin PMUX_FUNC_MIO, 19100a2749dSAllen Martin PMUX_FUNC_MIPI_HS, 19200a2749dSAllen Martin PMUX_FUNC_NAND, 19300a2749dSAllen Martin PMUX_FUNC_OSC, 19400a2749dSAllen Martin PMUX_FUNC_OWR, 19500a2749dSAllen Martin PMUX_FUNC_PCIE, 19600a2749dSAllen Martin PMUX_FUNC_PLLA_OUT, 19700a2749dSAllen Martin PMUX_FUNC_PLLC_OUT1, 19800a2749dSAllen Martin PMUX_FUNC_PLLM_OUT1, 19900a2749dSAllen Martin PMUX_FUNC_PLLP_OUT2, 20000a2749dSAllen Martin PMUX_FUNC_PLLP_OUT3, 20100a2749dSAllen Martin PMUX_FUNC_PLLP_OUT4, 20200a2749dSAllen Martin PMUX_FUNC_PWM, 20300a2749dSAllen Martin PMUX_FUNC_PWR_INTR, 20400a2749dSAllen Martin PMUX_FUNC_PWR_ON, 20500a2749dSAllen Martin PMUX_FUNC_RTCK, 20600a2749dSAllen Martin PMUX_FUNC_SDIO1, 20700a2749dSAllen Martin PMUX_FUNC_SDIO2, 20800a2749dSAllen Martin PMUX_FUNC_SDIO3, 20900a2749dSAllen Martin PMUX_FUNC_SDIO4, 21000a2749dSAllen Martin PMUX_FUNC_SFLASH, 21100a2749dSAllen Martin PMUX_FUNC_SPDIF, 21200a2749dSAllen Martin PMUX_FUNC_SPI1, 21300a2749dSAllen Martin PMUX_FUNC_SPI2, 21400a2749dSAllen Martin PMUX_FUNC_SPI2_ALT, 21500a2749dSAllen Martin PMUX_FUNC_SPI3, 21600a2749dSAllen Martin PMUX_FUNC_SPI4, 21700a2749dSAllen Martin PMUX_FUNC_TRACE, 21800a2749dSAllen Martin PMUX_FUNC_TWC, 21900a2749dSAllen Martin PMUX_FUNC_UARTA, 22000a2749dSAllen Martin PMUX_FUNC_UARTB, 22100a2749dSAllen Martin PMUX_FUNC_UARTC, 22200a2749dSAllen Martin PMUX_FUNC_UARTD, 22300a2749dSAllen Martin PMUX_FUNC_UARTE, 22400a2749dSAllen Martin PMUX_FUNC_ULPI, 22500a2749dSAllen Martin PMUX_FUNC_VI, 22600a2749dSAllen Martin PMUX_FUNC_VI_SENSOR_CLK, 22700a2749dSAllen Martin PMUX_FUNC_XIO, 228d381294aSStephen Warren PMUX_FUNC_RSVD1, 229d381294aSStephen Warren PMUX_FUNC_RSVD2, 230d381294aSStephen Warren PMUX_FUNC_RSVD3, 231d381294aSStephen Warren PMUX_FUNC_RSVD4, 23200a2749dSAllen Martin PMUX_FUNC_COUNT, 23300a2749dSAllen Martin }; 23400a2749dSAllen Martin 235790f7719SStephen Warren #define TEGRA_PMX_SOC_DRV_GROUP_BASE_REG 0x868 236e2969957SStephen Warren #include <asm/arch-tegra/pinmux.h> 23700a2749dSAllen Martin 238e2969957SStephen Warren #endif /* _TEGRA20_PINMUX_H_ */ 239