#endif
#endif
+ /* Enable regular GPIO function on GPIO11 and/or GPIO12 if needed */
+ #if defined(CONFIG_QCA_GPIO_MASK_OUTPUTS) || \
+ defined(CONFIG_QCA_GPIO_MASK_INPUTS)
+ #if (CONFIG_QCA_GPIO_MASK_OUTPUTS & (GPIO11 | GPIO12)) || \
+ (CONFIG_QCA_GPIO_MASK_INPUTS & (GPIO11 | GPIO12))
+ li t8, QCA_GPIO_FUNC_2_REG
+ lw t9, 0(t8)
+ #if (CONFIG_QCA_GPIO_MASK_OUTPUTS & GPIO11) || \
+ (CONFIG_QCA_GPIO_MASK_INPUTS & GPIO11)
+ or t9, t9, QCA_GPIO_FUNC_2_JUMPSTART_DIS_MASK
+ #endif
+ #if (CONFIG_QCA_GPIO_MASK_OUTPUTS & GPIO12) || \
+ (CONFIG_QCA_GPIO_MASK_INPUTS & GPIO12)
+ or t9, t9, QCA_GPIO_FUNC_2_WPS_DIS_MASK
+ #endif
+ sw t9, 0(t8)
+ #endif
+ #endif
+
/* Setup init states on requested GPIO lines */
li t8, QCA_GPIO_OUT_REG
lw t9, 0(t8)
* GPIO registers BIT fields
*/
-/* GPIO_FUNCTION_1 register (GPIO function) */
+/* GPIO_FUNCTION_1/2 register (GPIO function) */
#if (SOC_TYPE & QCA_AR933X_SOC)
#define QCA_GPIO_FUNC_1_JTAG_DIS_SHIFT 0
#define QCA_GPIO_FUNC_1_JTAG_DIS_MASK (1 << QCA_GPIO_FUNC_1_JTAG_DIS_SHIFT)
#define QCA_GPIO_FUNC_1_SPDIF_EN_MASK (1 << QCA_GPIO_FUNC_1_SPDIF_EN_SHIFT)
#define QCA_GPIO_FUNC_1_SPDIF_TCK_EN_SHIFT 31
#define QCA_GPIO_FUNC_1_SPDIF_TCK_EN_MASK (1 << QCA_GPIO_FUNC_1_SPDIF_TCK_EN_SHIFT)
+
+ #define QCA_GPIO_FUNC_2_MIC_DIS_SHIFT 0
+ #define QCA_GPIO_FUNC_2_MIC_DIS_MASK (1 << QCA_GPIO_FUNC_2_MIC_DIS_SHIFT)
+ #define QCA_GPIO_FUNC_2_I2S_ON_LED_SHIFT 1
+ #define QCA_GPIO_FUNC_2_I2S_ON_LED_MASK (1 << QCA_GPIO_FUNC_2_I2S_ON_LED_SHIFT)
+ #define QCA_GPIO_FUNC_2_SPDIF_ON23_SHIFT 2
+ #define QCA_GPIO_FUNC_2_SPDIF_ON23_MASK (1 << QCA_GPIO_FUNC_2_SPDIF_ON23_SHIFT)
+ #define QCA_GPIO_FUNC_2_I2SCK_ON1_SHIFT 3
+ #define QCA_GPIO_FUNC_2_I2SCK_ON1_MASK (1 << QCA_GPIO_FUNC_2_I2SCK_ON1_SHIFT)
+ #define QCA_GPIO_FUNC_2_I2SWS_ON0_SHIFT 4
+ #define QCA_GPIO_FUNC_2_I2SWS_ON0_MASK (1 << QCA_GPIO_FUNC_2_I2SWS_ON0_SHIFT)
+ #define QCA_GPIO_FUNC_2_I2SSD_ON12_SHIFT 5
+ #define QCA_GPIO_FUNC_2_I2SSD_ON12_MASK (1 << QCA_GPIO_FUNC_2_I2SSD_ON12_SHIFT)
+ #define QCA_GPIO_FUNC_2_WPS_DIS_SHIFT 8
+ #define QCA_GPIO_FUNC_2_WPS_DIS_MASK (1 << QCA_GPIO_FUNC_2_WPS_DIS_SHIFT)
+ #define QCA_GPIO_FUNC_2_JUMPSTART_DIS_SHIFT 9
+ #define QCA_GPIO_FUNC_2_JUMPSTART_DIS_MASK (1 << QCA_GPIO_FUNC_2_JUMPSTART_DIS_SHIFT)
+ #define QCA_GPIO_FUNC_2_WLAN_LED_ON0_SHIFT 10
+ #define QCA_GPIO_FUNC_2_WLAN_LED_ON0_MASK (1 << QCA_GPIO_FUNC_2_WLAN_LED_ON0_SHIFT)
+ #define QCA_GPIO_FUNC_2_USB_LED_ON1_SHIFT 11
+ #define QCA_GPIO_FUNC_2_USB_LED_ON1_MASK (1 << QCA_GPIO_FUNC_2_USB_LED_ON1_SHIFT)
+ #define QCA_GPIO_FUNC_2_LNA_ON28_SHIFT 12
+ #define QCA_GPIO_FUNC_2_LNA_ON28_MASK (1 << QCA_GPIO_FUNC_2_LNA_ON28_SHIFT)
+ #define QCA_GPIO_FUNC_2_SLIC_EN_SHIFT 13
+ #define QCA_GPIO_FUNC_2_SLIC_EN_MASK (1 << QCA_GPIO_FUNC_2_SLIC_EN_SHIFT)
+ #define QCA_GPIO_FUNC_2_SLIC_ON18-22_SHIFT 14
+ #define QCA_GPIO_FUNC_2_SLIC_ON18-22_MASK (1 << QCA_GPIO_FUNC_2_SLIC_ON18-22_SHIFT)
+ #define QCA_GPIO_FUNC_2_SLIC_DIO_MUX_EN_SHIFT 15
+ #define QCA_GPIO_FUNC_2_SLIC_DIO_MUX_EN_MASK (1 << QCA_GPIO_FUNC_2_SLIC_DIO_MUX_EN_SHIFT)
+ #define QCA_GPIO_FUNC_2_MDIO_SLAVE_ADDR_SHIFT 16
+ #define QCA_GPIO_FUNC_2_MDIO_SLAVE_ADDR_MASK BITS(QCA_GPIO_FUNC_2__SHIFT, 3)
#endif
/*