# Customize access control for QUPs

Source: [https://docs.qualcomm.com/doc/80-88500-1/topic/18_Customize_access_control_for_QUPs.html](https://docs.qualcomm.com/doc/80-88500-1/topic/18_Customize_access_control_for_QUPs.html)

## About this task

The firmware loaded to the serial engine determines the protocol supported on each interface. To load the required protocol, customize the \trustzone\_images\core\settings\buses\qup\_accesscontrol\qupv3\config\kona\QUPAC\_Access.c file in the TrustZone. To customize access control for QUPs, do the following:

## Procedure

1. Update the peripheral ID, protocol ID, mode information in the QUPAC\_Access.c file as shown in the following example: 
        
const QUPv3_se_security_permissions_type qupv3_perms_default[] =
        {
          /*   PeriphID, ProtocolID, Mode, NsOwner,bAllowFifo,bLoad,bModExcl  */
          { QUPV3_0_SE0, QUPV3_PROTOCOL_SPI, QUPV3_MODE_GSI,AC_TZ, FALSE, TRUE,TRUE }, // NFC eSE
          { QUPV3_0_SE1, QUPV3_PROTOCOL_I2C, QUPV3_MODE_FIFO,AC_HLOS, TRUE, TRUE,FALSE }, // NFC
          { QUPV3_0_SE2, QUPV3_PROTOCOL_SPI, QUPV3_MODE_FIFO,AC_HLOS, TRUE, TRUE,FALSE }, // 3rd party Camera
          { QUPV3_0_SE3, QUPV3_PROTOCOL_I2C, QUPV3_MODE_FIFO,AC_HLOS, TRUE, TRUE,FALSE }, // 3rd party- wireless charging
          { QUPV3_0_SE4, QUPV3_PROTOCOL_SPI, QUPV3_MODE_FIFO,AC_HLOS, TRUE, TRUE,FALSE }, // 3rd party Camera
          { QUPV3_0_SE5, QUPV3_PROTOCOL_I2C, QUPV3_MODE_FIFO,AC_HLOS, TRUE, TRUE,FALSE }, // 3rd party PMIC MAIN_PMIC
          { QUPV3_0_SE6, QUPV3_PROTOCOL_UART_4W, QUPV3_MODE_FIFO,AC_HLOS, TRUE, TRUE,FALSE }, // Bluetooth
          /*QUPV3_0_SE7*/
          
          { QUPV3_1_SE0, QUPV3_PROTOCOL_I3C, QUPV3_MODE_FIFO,AC_HLOS, TRUE, TRUE,FALSE }, // CDP camera
          { QUPV3_1_SE1, QUPV3_PROTOCOL_I2C, QUPV3_MODE_FIFO,AC_HLOS, TRUE, TRUE,FALSE }, // 3rd party sub PMIC
          /*QUPV3_1_SE2*/
          /*QUPV3_1_SE3*/
          { QUPV3_1_SE4, QUPV3_PROTOCOL_UART_2W, QUPV3_MODE_FIFO,AC_HLOS, TRUE,FALSE,FALSE }, // Debug
          { QUPV3_1_SE5, QUPV3_PROTOCOL_I2C, QUPV3_MODE_FIFO,AC_HLOS, TRUE, TRUE,FALSE }, // Legacy Touch Screen 
          
          { QUPV3_2_SE0, QUPV3_PROTOCOL_SPI, QUPV3_MODE_GSI,AC_TZ,  FALSE, TRUE,TRUE }, // Finger Print sensor
          { QUPV3_2_SE1, QUPV3_PROTOCOL_I2C, QUPV3_MODE_FIFO,AC_HLOS, TRUE, TRUE,FALSE }, // I2C,Haptics / Broadcast / SMB1355 / SMB1390 / Type-C-DP/ FM
          /*QUPV3_2_SE2*/
          { QUPV3_2_SE3, QUPV3_PROTOCOL_UART_4W, QUPV3_MODE_GSI,AC_ADSP_Q6_ELF,FALSE, TRUE,FALSE }, // Modem(UART, Audio backup)
          /*QUPV3_2_SE4*/
          /*QUPV3_2_SE5*/
        };Copy to clipboard
2. Recompile the devcfg.mbn file.
        
After the TrustZone image compilation, the devcfg.mbn file is generated. For image compilation steps, see build instructions in the Qualcomm Robotics RB5 release note.

**Parent Topic:** Qualcomm universal peripheral (QUP)

Last Published: Aug 18, 2023

Previous Topic
 
Verify QUP firmware readiness Next Topic

UART in QUP