18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * This header provides constants for the Qualcomm PMIC GPIO binding. 48c2ecf20Sopenharmony_ci */ 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci#ifndef _DT_BINDINGS_PINCTRL_QCOM_PMIC_GPIO_H 78c2ecf20Sopenharmony_ci#define _DT_BINDINGS_PINCTRL_QCOM_PMIC_GPIO_H 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#define PMIC_GPIO_PULL_UP_30 0 108c2ecf20Sopenharmony_ci#define PMIC_GPIO_PULL_UP_1P5 1 118c2ecf20Sopenharmony_ci#define PMIC_GPIO_PULL_UP_31P5 2 128c2ecf20Sopenharmony_ci#define PMIC_GPIO_PULL_UP_1P5_30 3 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci#define PMIC_GPIO_STRENGTH_NO 0 158c2ecf20Sopenharmony_ci#define PMIC_GPIO_STRENGTH_HIGH 1 168c2ecf20Sopenharmony_ci#define PMIC_GPIO_STRENGTH_MED 2 178c2ecf20Sopenharmony_ci#define PMIC_GPIO_STRENGTH_LOW 3 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci/* 208c2ecf20Sopenharmony_ci * Note: PM8018 GPIO3 and GPIO4 are supporting 218c2ecf20Sopenharmony_ci * only S3 and L2 options (1.8V) 228c2ecf20Sopenharmony_ci */ 238c2ecf20Sopenharmony_ci#define PM8018_GPIO_L6 0 248c2ecf20Sopenharmony_ci#define PM8018_GPIO_L5 1 258c2ecf20Sopenharmony_ci#define PM8018_GPIO_S3 2 268c2ecf20Sopenharmony_ci#define PM8018_GPIO_L14 3 278c2ecf20Sopenharmony_ci#define PM8018_GPIO_L2 4 288c2ecf20Sopenharmony_ci#define PM8018_GPIO_L4 5 298c2ecf20Sopenharmony_ci#define PM8018_GPIO_VDD 6 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci/* 328c2ecf20Sopenharmony_ci * Note: PM8038 GPIO7 and GPIO8 are supporting 338c2ecf20Sopenharmony_ci * only L11 and L4 options (1.8V) 348c2ecf20Sopenharmony_ci */ 358c2ecf20Sopenharmony_ci#define PM8038_GPIO_VPH 0 368c2ecf20Sopenharmony_ci#define PM8038_GPIO_BB 1 378c2ecf20Sopenharmony_ci#define PM8038_GPIO_L11 2 388c2ecf20Sopenharmony_ci#define PM8038_GPIO_L15 3 398c2ecf20Sopenharmony_ci#define PM8038_GPIO_L4 4 408c2ecf20Sopenharmony_ci#define PM8038_GPIO_L3 5 418c2ecf20Sopenharmony_ci#define PM8038_GPIO_L17 6 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci#define PM8058_GPIO_VPH 0 448c2ecf20Sopenharmony_ci#define PM8058_GPIO_BB 1 458c2ecf20Sopenharmony_ci#define PM8058_GPIO_S3 2 468c2ecf20Sopenharmony_ci#define PM8058_GPIO_L3 3 478c2ecf20Sopenharmony_ci#define PM8058_GPIO_L7 4 488c2ecf20Sopenharmony_ci#define PM8058_GPIO_L6 5 498c2ecf20Sopenharmony_ci#define PM8058_GPIO_L5 6 508c2ecf20Sopenharmony_ci#define PM8058_GPIO_L2 7 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ci/* 538c2ecf20Sopenharmony_ci * Note: PM8916 GPIO1 and GPIO2 are supporting 548c2ecf20Sopenharmony_ci * only L2(1.15V) and L5(1.8V) options 558c2ecf20Sopenharmony_ci */ 568c2ecf20Sopenharmony_ci#define PM8916_GPIO_VPH 0 578c2ecf20Sopenharmony_ci#define PM8916_GPIO_L2 2 588c2ecf20Sopenharmony_ci#define PM8916_GPIO_L5 3 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci#define PM8917_GPIO_VPH 0 618c2ecf20Sopenharmony_ci#define PM8917_GPIO_S4 2 628c2ecf20Sopenharmony_ci#define PM8917_GPIO_L15 3 638c2ecf20Sopenharmony_ci#define PM8917_GPIO_L4 4 648c2ecf20Sopenharmony_ci#define PM8917_GPIO_L3 5 658c2ecf20Sopenharmony_ci#define PM8917_GPIO_L17 6 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci#define PM8921_GPIO_VPH 0 688c2ecf20Sopenharmony_ci#define PM8921_GPIO_BB 1 698c2ecf20Sopenharmony_ci#define PM8921_GPIO_S4 2 708c2ecf20Sopenharmony_ci#define PM8921_GPIO_L15 3 718c2ecf20Sopenharmony_ci#define PM8921_GPIO_L4 4 728c2ecf20Sopenharmony_ci#define PM8921_GPIO_L3 5 738c2ecf20Sopenharmony_ci#define PM8921_GPIO_L17 6 748c2ecf20Sopenharmony_ci 758c2ecf20Sopenharmony_ci/* 768c2ecf20Sopenharmony_ci * Note: PM8941 gpios from 15 to 18 are supporting 778c2ecf20Sopenharmony_ci * only S3 and L6 options (1.8V) 788c2ecf20Sopenharmony_ci */ 798c2ecf20Sopenharmony_ci#define PM8941_GPIO_VPH 0 808c2ecf20Sopenharmony_ci#define PM8941_GPIO_L1 1 818c2ecf20Sopenharmony_ci#define PM8941_GPIO_S3 2 828c2ecf20Sopenharmony_ci#define PM8941_GPIO_L6 3 838c2ecf20Sopenharmony_ci 848c2ecf20Sopenharmony_ci/* 858c2ecf20Sopenharmony_ci * Note: PMA8084 gpios from 15 to 18 are supporting 868c2ecf20Sopenharmony_ci * only S4 and L6 options (1.8V) 878c2ecf20Sopenharmony_ci */ 888c2ecf20Sopenharmony_ci#define PMA8084_GPIO_VPH 0 898c2ecf20Sopenharmony_ci#define PMA8084_GPIO_L1 1 908c2ecf20Sopenharmony_ci#define PMA8084_GPIO_S4 2 918c2ecf20Sopenharmony_ci#define PMA8084_GPIO_L6 3 928c2ecf20Sopenharmony_ci 938c2ecf20Sopenharmony_ci#define PM8994_GPIO_VPH 0 948c2ecf20Sopenharmony_ci#define PM8994_GPIO_S4 2 958c2ecf20Sopenharmony_ci#define PM8994_GPIO_L12 3 968c2ecf20Sopenharmony_ci 978c2ecf20Sopenharmony_ci/* To be used with "function" */ 988c2ecf20Sopenharmony_ci#define PMIC_GPIO_FUNC_NORMAL "normal" 998c2ecf20Sopenharmony_ci#define PMIC_GPIO_FUNC_PAIRED "paired" 1008c2ecf20Sopenharmony_ci#define PMIC_GPIO_FUNC_FUNC1 "func1" 1018c2ecf20Sopenharmony_ci#define PMIC_GPIO_FUNC_FUNC2 "func2" 1028c2ecf20Sopenharmony_ci#define PMIC_GPIO_FUNC_FUNC3 "func3" 1038c2ecf20Sopenharmony_ci#define PMIC_GPIO_FUNC_FUNC4 "func4" 1048c2ecf20Sopenharmony_ci#define PMIC_GPIO_FUNC_DTEST1 "dtest1" 1058c2ecf20Sopenharmony_ci#define PMIC_GPIO_FUNC_DTEST2 "dtest2" 1068c2ecf20Sopenharmony_ci#define PMIC_GPIO_FUNC_DTEST3 "dtest3" 1078c2ecf20Sopenharmony_ci#define PMIC_GPIO_FUNC_DTEST4 "dtest4" 1088c2ecf20Sopenharmony_ci 1098c2ecf20Sopenharmony_ci#define PM8038_GPIO1_2_LPG_DRV PMIC_GPIO_FUNC_FUNC1 1108c2ecf20Sopenharmony_ci#define PM8038_GPIO3_5V_BOOST_EN PMIC_GPIO_FUNC_FUNC1 1118c2ecf20Sopenharmony_ci#define PM8038_GPIO4_SSBI_ALT_CLK PMIC_GPIO_FUNC_FUNC1 1128c2ecf20Sopenharmony_ci#define PM8038_GPIO5_6_EXT_REG_EN PMIC_GPIO_FUNC_FUNC1 1138c2ecf20Sopenharmony_ci#define PM8038_GPIO10_11_EXT_REG_EN PMIC_GPIO_FUNC_FUNC1 1148c2ecf20Sopenharmony_ci#define PM8038_GPIO6_7_CLK PMIC_GPIO_FUNC_FUNC1 1158c2ecf20Sopenharmony_ci#define PM8038_GPIO9_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1 1168c2ecf20Sopenharmony_ci#define PM8038_GPIO6_12_KYPD_DRV PMIC_GPIO_FUNC_FUNC2 1178c2ecf20Sopenharmony_ci 1188c2ecf20Sopenharmony_ci#define PM8058_GPIO7_8_MP3_CLK PMIC_GPIO_FUNC_FUNC1 1198c2ecf20Sopenharmony_ci#define PM8058_GPIO7_8_BCLK_19P2MHZ PMIC_GPIO_FUNC_FUNC2 1208c2ecf20Sopenharmony_ci#define PM8058_GPIO9_26_KYPD_DRV PMIC_GPIO_FUNC_FUNC1 1218c2ecf20Sopenharmony_ci#define PM8058_GPIO21_23_UART_TX PMIC_GPIO_FUNC_FUNC2 1228c2ecf20Sopenharmony_ci#define PM8058_GPIO24_26_LPG_DRV PMIC_GPIO_FUNC_FUNC2 1238c2ecf20Sopenharmony_ci#define PM8058_GPIO33_BCLK_19P2MHZ PMIC_GPIO_FUNC_FUNC1 1248c2ecf20Sopenharmony_ci#define PM8058_GPIO34_35_MP3_CLK PMIC_GPIO_FUNC_FUNC1 1258c2ecf20Sopenharmony_ci#define PM8058_GPIO36_BCLK_19P2MHZ PMIC_GPIO_FUNC_FUNC1 1268c2ecf20Sopenharmony_ci#define PM8058_GPIO37_UPL_OUT PMIC_GPIO_FUNC_FUNC1 1278c2ecf20Sopenharmony_ci#define PM8058_GPIO37_UART_M_RX PMIC_GPIO_FUNC_FUNC2 1288c2ecf20Sopenharmony_ci#define PM8058_GPIO38_XO_SLEEP_CLK PMIC_GPIO_FUNC_FUNC1 1298c2ecf20Sopenharmony_ci#define PM8058_GPIO38_39_CLK_32KHZ PMIC_GPIO_FUNC_FUNC2 1308c2ecf20Sopenharmony_ci#define PM8058_GPIO39_MP3_CLK PMIC_GPIO_FUNC_FUNC1 1318c2ecf20Sopenharmony_ci#define PM8058_GPIO40_EXT_BB_EN PMIC_GPIO_FUNC_FUNC1 1328c2ecf20Sopenharmony_ci 1338c2ecf20Sopenharmony_ci#define PM8916_GPIO1_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1 1348c2ecf20Sopenharmony_ci#define PM8916_GPIO1_KEYP_DRV PMIC_GPIO_FUNC_FUNC2 1358c2ecf20Sopenharmony_ci#define PM8916_GPIO2_DIV_CLK PMIC_GPIO_FUNC_FUNC1 1368c2ecf20Sopenharmony_ci#define PM8916_GPIO2_SLEEP_CLK PMIC_GPIO_FUNC_FUNC2 1378c2ecf20Sopenharmony_ci#define PM8916_GPIO3_KEYP_DRV PMIC_GPIO_FUNC_FUNC1 1388c2ecf20Sopenharmony_ci#define PM8916_GPIO4_KEYP_DRV PMIC_GPIO_FUNC_FUNC2 1398c2ecf20Sopenharmony_ci 1408c2ecf20Sopenharmony_ci#define PM8917_GPIO9_18_KEYP_DRV PMIC_GPIO_FUNC_FUNC1 1418c2ecf20Sopenharmony_ci#define PM8917_GPIO20_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1 1428c2ecf20Sopenharmony_ci#define PM8917_GPIO21_23_UART_TX PMIC_GPIO_FUNC_FUNC2 1438c2ecf20Sopenharmony_ci#define PM8917_GPIO25_26_EXT_REG_EN PMIC_GPIO_FUNC_FUNC1 1448c2ecf20Sopenharmony_ci#define PM8917_GPIO37_38_XO_SLEEP_CLK PMIC_GPIO_FUNC_FUNC1 1458c2ecf20Sopenharmony_ci#define PM8917_GPIO37_38_MP3_CLK PMIC_GPIO_FUNC_FUNC2 1468c2ecf20Sopenharmony_ci 1478c2ecf20Sopenharmony_ci#define PM8941_GPIO9_14_KYPD_DRV PMIC_GPIO_FUNC_FUNC1 1488c2ecf20Sopenharmony_ci#define PM8941_GPIO15_18_DIV_CLK PMIC_GPIO_FUNC_FUNC1 1498c2ecf20Sopenharmony_ci#define PM8941_GPIO15_18_SLEEP_CLK PMIC_GPIO_FUNC_FUNC2 1508c2ecf20Sopenharmony_ci#define PM8941_GPIO23_26_KYPD_DRV PMIC_GPIO_FUNC_FUNC1 1518c2ecf20Sopenharmony_ci#define PM8941_GPIO23_26_LPG_DRV_HI PMIC_GPIO_FUNC_FUNC2 1528c2ecf20Sopenharmony_ci#define PM8941_GPIO31_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1 1538c2ecf20Sopenharmony_ci#define PM8941_GPIO33_36_LPG_DRV_3D PMIC_GPIO_FUNC_FUNC1 1548c2ecf20Sopenharmony_ci#define PM8941_GPIO33_36_LPG_DRV_HI PMIC_GPIO_FUNC_FUNC2 1558c2ecf20Sopenharmony_ci 1568c2ecf20Sopenharmony_ci#define PMA8084_GPIO4_5_LPG_DRV PMIC_GPIO_FUNC_FUNC1 1578c2ecf20Sopenharmony_ci#define PMA8084_GPIO7_10_LPG_DRV PMIC_GPIO_FUNC_FUNC1 1588c2ecf20Sopenharmony_ci#define PMA8084_GPIO5_14_KEYP_DRV PMIC_GPIO_FUNC_FUNC2 1598c2ecf20Sopenharmony_ci#define PMA8084_GPIO19_21_KEYP_DRV PMIC_GPIO_FUNC_FUNC2 1608c2ecf20Sopenharmony_ci#define PMA8084_GPIO15_18_DIV_CLK PMIC_GPIO_FUNC_FUNC1 1618c2ecf20Sopenharmony_ci#define PMA8084_GPIO15_18_SLEEP_CLK PMIC_GPIO_FUNC_FUNC2 1628c2ecf20Sopenharmony_ci#define PMA8084_GPIO22_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1 1638c2ecf20Sopenharmony_ci 1648c2ecf20Sopenharmony_ci#endif 165