162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * This header provides constants for the Qualcomm PMIC GPIO binding. 462306a36Sopenharmony_ci */ 562306a36Sopenharmony_ci 662306a36Sopenharmony_ci#ifndef _DT_BINDINGS_PINCTRL_QCOM_PMIC_GPIO_H 762306a36Sopenharmony_ci#define _DT_BINDINGS_PINCTRL_QCOM_PMIC_GPIO_H 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#define PMIC_GPIO_PULL_UP_30 0 1062306a36Sopenharmony_ci#define PMIC_GPIO_PULL_UP_1P5 1 1162306a36Sopenharmony_ci#define PMIC_GPIO_PULL_UP_31P5 2 1262306a36Sopenharmony_ci#define PMIC_GPIO_PULL_UP_1P5_30 3 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ci#define PMIC_GPIO_STRENGTH_NO 0 1562306a36Sopenharmony_ci#define PMIC_GPIO_STRENGTH_HIGH 1 1662306a36Sopenharmony_ci#define PMIC_GPIO_STRENGTH_MED 2 1762306a36Sopenharmony_ci#define PMIC_GPIO_STRENGTH_LOW 3 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci/* 2062306a36Sopenharmony_ci * Note: PM8018 GPIO3 and GPIO4 are supporting 2162306a36Sopenharmony_ci * only S3 and L2 options (1.8V) 2262306a36Sopenharmony_ci */ 2362306a36Sopenharmony_ci#define PM8018_GPIO_L6 0 2462306a36Sopenharmony_ci#define PM8018_GPIO_L5 1 2562306a36Sopenharmony_ci#define PM8018_GPIO_S3 2 2662306a36Sopenharmony_ci#define PM8018_GPIO_L14 3 2762306a36Sopenharmony_ci#define PM8018_GPIO_L2 4 2862306a36Sopenharmony_ci#define PM8018_GPIO_L4 5 2962306a36Sopenharmony_ci#define PM8018_GPIO_VDD 6 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci/* 3262306a36Sopenharmony_ci * Note: PM8038 GPIO7 and GPIO8 are supporting 3362306a36Sopenharmony_ci * only L11 and L4 options (1.8V) 3462306a36Sopenharmony_ci */ 3562306a36Sopenharmony_ci#define PM8038_GPIO_VPH 0 3662306a36Sopenharmony_ci#define PM8038_GPIO_BB 1 3762306a36Sopenharmony_ci#define PM8038_GPIO_L11 2 3862306a36Sopenharmony_ci#define PM8038_GPIO_L15 3 3962306a36Sopenharmony_ci#define PM8038_GPIO_L4 4 4062306a36Sopenharmony_ci#define PM8038_GPIO_L3 5 4162306a36Sopenharmony_ci#define PM8038_GPIO_L17 6 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ci#define PM8058_GPIO_VPH 0 4462306a36Sopenharmony_ci#define PM8058_GPIO_BB 1 4562306a36Sopenharmony_ci#define PM8058_GPIO_S3 2 4662306a36Sopenharmony_ci#define PM8058_GPIO_L3 3 4762306a36Sopenharmony_ci#define PM8058_GPIO_L7 4 4862306a36Sopenharmony_ci#define PM8058_GPIO_L6 5 4962306a36Sopenharmony_ci#define PM8058_GPIO_L5 6 5062306a36Sopenharmony_ci#define PM8058_GPIO_L2 7 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_ci/* 5362306a36Sopenharmony_ci * Note: PM8916 GPIO1 and GPIO2 are supporting 5462306a36Sopenharmony_ci * only L2(1.15V) and L5(1.8V) options 5562306a36Sopenharmony_ci */ 5662306a36Sopenharmony_ci#define PM8916_GPIO_VPH 0 5762306a36Sopenharmony_ci#define PM8916_GPIO_L2 2 5862306a36Sopenharmony_ci#define PM8916_GPIO_L5 3 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ci#define PM8917_GPIO_VPH 0 6162306a36Sopenharmony_ci#define PM8917_GPIO_S4 2 6262306a36Sopenharmony_ci#define PM8917_GPIO_L15 3 6362306a36Sopenharmony_ci#define PM8917_GPIO_L4 4 6462306a36Sopenharmony_ci#define PM8917_GPIO_L3 5 6562306a36Sopenharmony_ci#define PM8917_GPIO_L17 6 6662306a36Sopenharmony_ci 6762306a36Sopenharmony_ci#define PM8921_GPIO_VPH 0 6862306a36Sopenharmony_ci#define PM8921_GPIO_BB 1 6962306a36Sopenharmony_ci#define PM8921_GPIO_S4 2 7062306a36Sopenharmony_ci#define PM8921_GPIO_L15 3 7162306a36Sopenharmony_ci#define PM8921_GPIO_L4 4 7262306a36Sopenharmony_ci#define PM8921_GPIO_L3 5 7362306a36Sopenharmony_ci#define PM8921_GPIO_L17 6 7462306a36Sopenharmony_ci 7562306a36Sopenharmony_ci/* 7662306a36Sopenharmony_ci * Note: PM8941 gpios from 15 to 18 are supporting 7762306a36Sopenharmony_ci * only S3 and L6 options (1.8V) 7862306a36Sopenharmony_ci */ 7962306a36Sopenharmony_ci#define PM8941_GPIO_VPH 0 8062306a36Sopenharmony_ci#define PM8941_GPIO_L1 1 8162306a36Sopenharmony_ci#define PM8941_GPIO_S3 2 8262306a36Sopenharmony_ci#define PM8941_GPIO_L6 3 8362306a36Sopenharmony_ci 8462306a36Sopenharmony_ci/* 8562306a36Sopenharmony_ci * Note: PMA8084 gpios from 15 to 18 are supporting 8662306a36Sopenharmony_ci * only S4 and L6 options (1.8V) 8762306a36Sopenharmony_ci */ 8862306a36Sopenharmony_ci#define PMA8084_GPIO_VPH 0 8962306a36Sopenharmony_ci#define PMA8084_GPIO_L1 1 9062306a36Sopenharmony_ci#define PMA8084_GPIO_S4 2 9162306a36Sopenharmony_ci#define PMA8084_GPIO_L6 3 9262306a36Sopenharmony_ci 9362306a36Sopenharmony_ci#define PM8994_GPIO_VPH 0 9462306a36Sopenharmony_ci#define PM8994_GPIO_S4 2 9562306a36Sopenharmony_ci#define PM8994_GPIO_L12 3 9662306a36Sopenharmony_ci 9762306a36Sopenharmony_ci/* To be used with "function" */ 9862306a36Sopenharmony_ci#define PMIC_GPIO_FUNC_NORMAL "normal" 9962306a36Sopenharmony_ci#define PMIC_GPIO_FUNC_PAIRED "paired" 10062306a36Sopenharmony_ci#define PMIC_GPIO_FUNC_FUNC1 "func1" 10162306a36Sopenharmony_ci#define PMIC_GPIO_FUNC_FUNC2 "func2" 10262306a36Sopenharmony_ci#define PMIC_GPIO_FUNC_FUNC3 "func3" 10362306a36Sopenharmony_ci#define PMIC_GPIO_FUNC_FUNC4 "func4" 10462306a36Sopenharmony_ci#define PMIC_GPIO_FUNC_DTEST1 "dtest1" 10562306a36Sopenharmony_ci#define PMIC_GPIO_FUNC_DTEST2 "dtest2" 10662306a36Sopenharmony_ci#define PMIC_GPIO_FUNC_DTEST3 "dtest3" 10762306a36Sopenharmony_ci#define PMIC_GPIO_FUNC_DTEST4 "dtest4" 10862306a36Sopenharmony_ci 10962306a36Sopenharmony_ci#define PM8038_GPIO1_2_LPG_DRV PMIC_GPIO_FUNC_FUNC1 11062306a36Sopenharmony_ci#define PM8038_GPIO3_5V_BOOST_EN PMIC_GPIO_FUNC_FUNC1 11162306a36Sopenharmony_ci#define PM8038_GPIO4_SSBI_ALT_CLK PMIC_GPIO_FUNC_FUNC1 11262306a36Sopenharmony_ci#define PM8038_GPIO5_6_EXT_REG_EN PMIC_GPIO_FUNC_FUNC1 11362306a36Sopenharmony_ci#define PM8038_GPIO10_11_EXT_REG_EN PMIC_GPIO_FUNC_FUNC1 11462306a36Sopenharmony_ci#define PM8038_GPIO6_7_CLK PMIC_GPIO_FUNC_FUNC1 11562306a36Sopenharmony_ci#define PM8038_GPIO9_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1 11662306a36Sopenharmony_ci#define PM8038_GPIO6_12_KYPD_DRV PMIC_GPIO_FUNC_FUNC2 11762306a36Sopenharmony_ci 11862306a36Sopenharmony_ci#define PM8058_GPIO7_8_MP3_CLK PMIC_GPIO_FUNC_FUNC1 11962306a36Sopenharmony_ci#define PM8058_GPIO7_8_BCLK_19P2MHZ PMIC_GPIO_FUNC_FUNC2 12062306a36Sopenharmony_ci#define PM8058_GPIO9_26_KYPD_DRV PMIC_GPIO_FUNC_FUNC1 12162306a36Sopenharmony_ci#define PM8058_GPIO21_23_UART_TX PMIC_GPIO_FUNC_FUNC2 12262306a36Sopenharmony_ci#define PM8058_GPIO24_26_LPG_DRV PMIC_GPIO_FUNC_FUNC2 12362306a36Sopenharmony_ci#define PM8058_GPIO33_BCLK_19P2MHZ PMIC_GPIO_FUNC_FUNC1 12462306a36Sopenharmony_ci#define PM8058_GPIO34_35_MP3_CLK PMIC_GPIO_FUNC_FUNC1 12562306a36Sopenharmony_ci#define PM8058_GPIO36_BCLK_19P2MHZ PMIC_GPIO_FUNC_FUNC1 12662306a36Sopenharmony_ci#define PM8058_GPIO37_UPL_OUT PMIC_GPIO_FUNC_FUNC1 12762306a36Sopenharmony_ci#define PM8058_GPIO37_UART_M_RX PMIC_GPIO_FUNC_FUNC2 12862306a36Sopenharmony_ci#define PM8058_GPIO38_XO_SLEEP_CLK PMIC_GPIO_FUNC_FUNC1 12962306a36Sopenharmony_ci#define PM8058_GPIO38_39_CLK_32KHZ PMIC_GPIO_FUNC_FUNC2 13062306a36Sopenharmony_ci#define PM8058_GPIO39_MP3_CLK PMIC_GPIO_FUNC_FUNC1 13162306a36Sopenharmony_ci#define PM8058_GPIO40_EXT_BB_EN PMIC_GPIO_FUNC_FUNC1 13262306a36Sopenharmony_ci 13362306a36Sopenharmony_ci#define PM8916_GPIO1_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1 13462306a36Sopenharmony_ci#define PM8916_GPIO1_KEYP_DRV PMIC_GPIO_FUNC_FUNC2 13562306a36Sopenharmony_ci#define PM8916_GPIO2_DIV_CLK PMIC_GPIO_FUNC_FUNC1 13662306a36Sopenharmony_ci#define PM8916_GPIO2_SLEEP_CLK PMIC_GPIO_FUNC_FUNC2 13762306a36Sopenharmony_ci#define PM8916_GPIO3_KEYP_DRV PMIC_GPIO_FUNC_FUNC1 13862306a36Sopenharmony_ci#define PM8916_GPIO4_KEYP_DRV PMIC_GPIO_FUNC_FUNC2 13962306a36Sopenharmony_ci 14062306a36Sopenharmony_ci#define PM8917_GPIO9_18_KEYP_DRV PMIC_GPIO_FUNC_FUNC1 14162306a36Sopenharmony_ci#define PM8917_GPIO20_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1 14262306a36Sopenharmony_ci#define PM8917_GPIO21_23_UART_TX PMIC_GPIO_FUNC_FUNC2 14362306a36Sopenharmony_ci#define PM8917_GPIO25_26_EXT_REG_EN PMIC_GPIO_FUNC_FUNC1 14462306a36Sopenharmony_ci#define PM8917_GPIO37_38_XO_SLEEP_CLK PMIC_GPIO_FUNC_FUNC1 14562306a36Sopenharmony_ci#define PM8917_GPIO37_38_MP3_CLK PMIC_GPIO_FUNC_FUNC2 14662306a36Sopenharmony_ci 14762306a36Sopenharmony_ci#define PM8941_GPIO9_14_KYPD_DRV PMIC_GPIO_FUNC_FUNC1 14862306a36Sopenharmony_ci#define PM8941_GPIO15_18_DIV_CLK PMIC_GPIO_FUNC_FUNC1 14962306a36Sopenharmony_ci#define PM8941_GPIO15_18_SLEEP_CLK PMIC_GPIO_FUNC_FUNC2 15062306a36Sopenharmony_ci#define PM8941_GPIO23_26_KYPD_DRV PMIC_GPIO_FUNC_FUNC1 15162306a36Sopenharmony_ci#define PM8941_GPIO23_26_LPG_DRV_HI PMIC_GPIO_FUNC_FUNC2 15262306a36Sopenharmony_ci#define PM8941_GPIO31_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1 15362306a36Sopenharmony_ci#define PM8941_GPIO33_36_LPG_DRV_3D PMIC_GPIO_FUNC_FUNC1 15462306a36Sopenharmony_ci#define PM8941_GPIO33_36_LPG_DRV_HI PMIC_GPIO_FUNC_FUNC2 15562306a36Sopenharmony_ci 15662306a36Sopenharmony_ci#define PMA8084_GPIO4_5_LPG_DRV PMIC_GPIO_FUNC_FUNC1 15762306a36Sopenharmony_ci#define PMA8084_GPIO7_10_LPG_DRV PMIC_GPIO_FUNC_FUNC1 15862306a36Sopenharmony_ci#define PMA8084_GPIO5_14_KEYP_DRV PMIC_GPIO_FUNC_FUNC2 15962306a36Sopenharmony_ci#define PMA8084_GPIO19_21_KEYP_DRV PMIC_GPIO_FUNC_FUNC2 16062306a36Sopenharmony_ci#define PMA8084_GPIO15_18_DIV_CLK PMIC_GPIO_FUNC_FUNC1 16162306a36Sopenharmony_ci#define PMA8084_GPIO15_18_SLEEP_CLK PMIC_GPIO_FUNC_FUNC2 16262306a36Sopenharmony_ci#define PMA8084_GPIO22_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1 16362306a36Sopenharmony_ci 16462306a36Sopenharmony_ci#endif 165