1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 243059f6bSBjorn Andersson /* 343059f6bSBjorn Andersson * This header provides constants for the Qualcomm PMIC GPIO binding. 443059f6bSBjorn Andersson */ 543059f6bSBjorn Andersson 643059f6bSBjorn Andersson #ifndef _DT_BINDINGS_PINCTRL_QCOM_PMIC_GPIO_H 743059f6bSBjorn Andersson #define _DT_BINDINGS_PINCTRL_QCOM_PMIC_GPIO_H 843059f6bSBjorn Andersson 943059f6bSBjorn Andersson #define PMIC_GPIO_PULL_UP_30 0 1043059f6bSBjorn Andersson #define PMIC_GPIO_PULL_UP_1P5 1 1143059f6bSBjorn Andersson #define PMIC_GPIO_PULL_UP_31P5 2 1243059f6bSBjorn Andersson #define PMIC_GPIO_PULL_UP_1P5_30 3 1343059f6bSBjorn Andersson 1443059f6bSBjorn Andersson #define PMIC_GPIO_STRENGTH_NO 0 1543059f6bSBjorn Andersson #define PMIC_GPIO_STRENGTH_HIGH 1 1643059f6bSBjorn Andersson #define PMIC_GPIO_STRENGTH_MED 2 1743059f6bSBjorn Andersson #define PMIC_GPIO_STRENGTH_LOW 3 1843059f6bSBjorn Andersson 1943059f6bSBjorn Andersson /* 2043059f6bSBjorn Andersson * Note: PM8018 GPIO3 and GPIO4 are supporting 2143059f6bSBjorn Andersson * only S3 and L2 options (1.8V) 2243059f6bSBjorn Andersson */ 2343059f6bSBjorn Andersson #define PM8018_GPIO_L6 0 2443059f6bSBjorn Andersson #define PM8018_GPIO_L5 1 2543059f6bSBjorn Andersson #define PM8018_GPIO_S3 2 2643059f6bSBjorn Andersson #define PM8018_GPIO_L14 3 2743059f6bSBjorn Andersson #define PM8018_GPIO_L2 4 2843059f6bSBjorn Andersson #define PM8018_GPIO_L4 5 2943059f6bSBjorn Andersson #define PM8018_GPIO_VDD 6 3043059f6bSBjorn Andersson 3143059f6bSBjorn Andersson /* 3243059f6bSBjorn Andersson * Note: PM8038 GPIO7 and GPIO8 are supporting 3343059f6bSBjorn Andersson * only L11 and L4 options (1.8V) 3443059f6bSBjorn Andersson */ 3543059f6bSBjorn Andersson #define PM8038_GPIO_VPH 0 3643059f6bSBjorn Andersson #define PM8038_GPIO_BB 1 3743059f6bSBjorn Andersson #define PM8038_GPIO_L11 2 3843059f6bSBjorn Andersson #define PM8038_GPIO_L15 3 3943059f6bSBjorn Andersson #define PM8038_GPIO_L4 4 4043059f6bSBjorn Andersson #define PM8038_GPIO_L3 5 4143059f6bSBjorn Andersson #define PM8038_GPIO_L17 6 4243059f6bSBjorn Andersson 4343059f6bSBjorn Andersson #define PM8058_GPIO_VPH 0 4443059f6bSBjorn Andersson #define PM8058_GPIO_BB 1 4543059f6bSBjorn Andersson #define PM8058_GPIO_S3 2 4643059f6bSBjorn Andersson #define PM8058_GPIO_L3 3 4743059f6bSBjorn Andersson #define PM8058_GPIO_L7 4 4843059f6bSBjorn Andersson #define PM8058_GPIO_L6 5 4943059f6bSBjorn Andersson #define PM8058_GPIO_L5 6 5043059f6bSBjorn Andersson #define PM8058_GPIO_L2 7 5143059f6bSBjorn Andersson 527414b099SIvan T. Ivanov /* 537414b099SIvan T. Ivanov * Note: PM8916 GPIO1 and GPIO2 are supporting 547414b099SIvan T. Ivanov * only L2(1.15V) and L5(1.8V) options 557414b099SIvan T. Ivanov */ 567414b099SIvan T. Ivanov #define PM8916_GPIO_VPH 0 577414b099SIvan T. Ivanov #define PM8916_GPIO_L2 2 587414b099SIvan T. Ivanov #define PM8916_GPIO_L5 3 597414b099SIvan T. Ivanov 6043059f6bSBjorn Andersson #define PM8917_GPIO_VPH 0 6143059f6bSBjorn Andersson #define PM8917_GPIO_S4 2 6243059f6bSBjorn Andersson #define PM8917_GPIO_L15 3 6343059f6bSBjorn Andersson #define PM8917_GPIO_L4 4 6443059f6bSBjorn Andersson #define PM8917_GPIO_L3 5 6543059f6bSBjorn Andersson #define PM8917_GPIO_L17 6 6643059f6bSBjorn Andersson 6743059f6bSBjorn Andersson #define PM8921_GPIO_VPH 0 6843059f6bSBjorn Andersson #define PM8921_GPIO_BB 1 6943059f6bSBjorn Andersson #define PM8921_GPIO_S4 2 7043059f6bSBjorn Andersson #define PM8921_GPIO_L15 3 7143059f6bSBjorn Andersson #define PM8921_GPIO_L4 4 7243059f6bSBjorn Andersson #define PM8921_GPIO_L3 5 7343059f6bSBjorn Andersson #define PM8921_GPIO_L17 6 7443059f6bSBjorn Andersson 7543059f6bSBjorn Andersson /* 7643059f6bSBjorn Andersson * Note: PM8941 gpios from 15 to 18 are supporting 7743059f6bSBjorn Andersson * only S3 and L6 options (1.8V) 7843059f6bSBjorn Andersson */ 7943059f6bSBjorn Andersson #define PM8941_GPIO_VPH 0 8043059f6bSBjorn Andersson #define PM8941_GPIO_L1 1 8143059f6bSBjorn Andersson #define PM8941_GPIO_S3 2 8243059f6bSBjorn Andersson #define PM8941_GPIO_L6 3 8343059f6bSBjorn Andersson 8443059f6bSBjorn Andersson /* 8543059f6bSBjorn Andersson * Note: PMA8084 gpios from 15 to 18 are supporting 8643059f6bSBjorn Andersson * only S4 and L6 options (1.8V) 8743059f6bSBjorn Andersson */ 8843059f6bSBjorn Andersson #define PMA8084_GPIO_VPH 0 8943059f6bSBjorn Andersson #define PMA8084_GPIO_L1 1 9043059f6bSBjorn Andersson #define PMA8084_GPIO_S4 2 9143059f6bSBjorn Andersson #define PMA8084_GPIO_L6 3 9243059f6bSBjorn Andersson 93636959fcSSrinivas Kandagatla #define PM8994_GPIO_VPH 0 94636959fcSSrinivas Kandagatla #define PM8994_GPIO_S4 2 95636959fcSSrinivas Kandagatla #define PM8994_GPIO_L12 3 96636959fcSSrinivas Kandagatla 9743059f6bSBjorn Andersson /* To be used with "function" */ 9843059f6bSBjorn Andersson #define PMIC_GPIO_FUNC_NORMAL "normal" 9943059f6bSBjorn Andersson #define PMIC_GPIO_FUNC_PAIRED "paired" 10043059f6bSBjorn Andersson #define PMIC_GPIO_FUNC_FUNC1 "func1" 10143059f6bSBjorn Andersson #define PMIC_GPIO_FUNC_FUNC2 "func2" 102d7b5f5ccSFenglin Wu #define PMIC_GPIO_FUNC_FUNC3 "func3" 103d7b5f5ccSFenglin Wu #define PMIC_GPIO_FUNC_FUNC4 "func4" 10443059f6bSBjorn Andersson #define PMIC_GPIO_FUNC_DTEST1 "dtest1" 10543059f6bSBjorn Andersson #define PMIC_GPIO_FUNC_DTEST2 "dtest2" 10643059f6bSBjorn Andersson #define PMIC_GPIO_FUNC_DTEST3 "dtest3" 10743059f6bSBjorn Andersson #define PMIC_GPIO_FUNC_DTEST4 "dtest4" 10843059f6bSBjorn Andersson 10943059f6bSBjorn Andersson #define PM8038_GPIO1_2_LPG_DRV PMIC_GPIO_FUNC_FUNC1 11043059f6bSBjorn Andersson #define PM8038_GPIO3_5V_BOOST_EN PMIC_GPIO_FUNC_FUNC1 11143059f6bSBjorn Andersson #define PM8038_GPIO4_SSBI_ALT_CLK PMIC_GPIO_FUNC_FUNC1 11243059f6bSBjorn Andersson #define PM8038_GPIO5_6_EXT_REG_EN PMIC_GPIO_FUNC_FUNC1 11343059f6bSBjorn Andersson #define PM8038_GPIO10_11_EXT_REG_EN PMIC_GPIO_FUNC_FUNC1 11443059f6bSBjorn Andersson #define PM8038_GPIO6_7_CLK PMIC_GPIO_FUNC_FUNC1 11543059f6bSBjorn Andersson #define PM8038_GPIO9_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1 11643059f6bSBjorn Andersson #define PM8038_GPIO6_12_KYPD_DRV PMIC_GPIO_FUNC_FUNC2 11743059f6bSBjorn Andersson 11843059f6bSBjorn Andersson #define PM8058_GPIO7_8_MP3_CLK PMIC_GPIO_FUNC_FUNC1 11943059f6bSBjorn Andersson #define PM8058_GPIO7_8_BCLK_19P2MHZ PMIC_GPIO_FUNC_FUNC2 12043059f6bSBjorn Andersson #define PM8058_GPIO9_26_KYPD_DRV PMIC_GPIO_FUNC_FUNC1 12143059f6bSBjorn Andersson #define PM8058_GPIO21_23_UART_TX PMIC_GPIO_FUNC_FUNC2 12243059f6bSBjorn Andersson #define PM8058_GPIO24_26_LPG_DRV PMIC_GPIO_FUNC_FUNC2 12343059f6bSBjorn Andersson #define PM8058_GPIO33_BCLK_19P2MHZ PMIC_GPIO_FUNC_FUNC1 12443059f6bSBjorn Andersson #define PM8058_GPIO34_35_MP3_CLK PMIC_GPIO_FUNC_FUNC1 12543059f6bSBjorn Andersson #define PM8058_GPIO36_BCLK_19P2MHZ PMIC_GPIO_FUNC_FUNC1 12643059f6bSBjorn Andersson #define PM8058_GPIO37_UPL_OUT PMIC_GPIO_FUNC_FUNC1 12743059f6bSBjorn Andersson #define PM8058_GPIO37_UART_M_RX PMIC_GPIO_FUNC_FUNC2 12843059f6bSBjorn Andersson #define PM8058_GPIO38_XO_SLEEP_CLK PMIC_GPIO_FUNC_FUNC1 12943059f6bSBjorn Andersson #define PM8058_GPIO38_39_CLK_32KHZ PMIC_GPIO_FUNC_FUNC2 13043059f6bSBjorn Andersson #define PM8058_GPIO39_MP3_CLK PMIC_GPIO_FUNC_FUNC1 13143059f6bSBjorn Andersson #define PM8058_GPIO40_EXT_BB_EN PMIC_GPIO_FUNC_FUNC1 13243059f6bSBjorn Andersson 1337414b099SIvan T. Ivanov #define PM8916_GPIO1_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1 1347414b099SIvan T. Ivanov #define PM8916_GPIO1_KEYP_DRV PMIC_GPIO_FUNC_FUNC2 1357414b099SIvan T. Ivanov #define PM8916_GPIO2_DIV_CLK PMIC_GPIO_FUNC_FUNC1 1367414b099SIvan T. Ivanov #define PM8916_GPIO2_SLEEP_CLK PMIC_GPIO_FUNC_FUNC2 1377414b099SIvan T. Ivanov #define PM8916_GPIO3_KEYP_DRV PMIC_GPIO_FUNC_FUNC1 1387414b099SIvan T. Ivanov #define PM8916_GPIO4_KEYP_DRV PMIC_GPIO_FUNC_FUNC2 1397414b099SIvan T. Ivanov 14043059f6bSBjorn Andersson #define PM8917_GPIO9_18_KEYP_DRV PMIC_GPIO_FUNC_FUNC1 14143059f6bSBjorn Andersson #define PM8917_GPIO20_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1 14243059f6bSBjorn Andersson #define PM8917_GPIO21_23_UART_TX PMIC_GPIO_FUNC_FUNC2 14343059f6bSBjorn Andersson #define PM8917_GPIO25_26_EXT_REG_EN PMIC_GPIO_FUNC_FUNC1 14443059f6bSBjorn Andersson #define PM8917_GPIO37_38_XO_SLEEP_CLK PMIC_GPIO_FUNC_FUNC1 14543059f6bSBjorn Andersson #define PM8917_GPIO37_38_MP3_CLK PMIC_GPIO_FUNC_FUNC2 14643059f6bSBjorn Andersson 14743059f6bSBjorn Andersson #define PM8941_GPIO9_14_KYPD_DRV PMIC_GPIO_FUNC_FUNC1 14843059f6bSBjorn Andersson #define PM8941_GPIO15_18_DIV_CLK PMIC_GPIO_FUNC_FUNC1 14943059f6bSBjorn Andersson #define PM8941_GPIO15_18_SLEEP_CLK PMIC_GPIO_FUNC_FUNC2 15043059f6bSBjorn Andersson #define PM8941_GPIO23_26_KYPD_DRV PMIC_GPIO_FUNC_FUNC1 15143059f6bSBjorn Andersson #define PM8941_GPIO23_26_LPG_DRV_HI PMIC_GPIO_FUNC_FUNC2 15243059f6bSBjorn Andersson #define PM8941_GPIO31_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1 15343059f6bSBjorn Andersson #define PM8941_GPIO33_36_LPG_DRV_3D PMIC_GPIO_FUNC_FUNC1 15443059f6bSBjorn Andersson #define PM8941_GPIO33_36_LPG_DRV_HI PMIC_GPIO_FUNC_FUNC2 15543059f6bSBjorn Andersson 15643059f6bSBjorn Andersson #define PMA8084_GPIO4_5_LPG_DRV PMIC_GPIO_FUNC_FUNC1 15743059f6bSBjorn Andersson #define PMA8084_GPIO7_10_LPG_DRV PMIC_GPIO_FUNC_FUNC1 15843059f6bSBjorn Andersson #define PMA8084_GPIO5_14_KEYP_DRV PMIC_GPIO_FUNC_FUNC2 15943059f6bSBjorn Andersson #define PMA8084_GPIO19_21_KEYP_DRV PMIC_GPIO_FUNC_FUNC2 16043059f6bSBjorn Andersson #define PMA8084_GPIO15_18_DIV_CLK PMIC_GPIO_FUNC_FUNC1 16143059f6bSBjorn Andersson #define PMA8084_GPIO15_18_SLEEP_CLK PMIC_GPIO_FUNC_FUNC2 16243059f6bSBjorn Andersson #define PMA8084_GPIO22_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1 16343059f6bSBjorn Andersson 16443059f6bSBjorn Andersson #endif 165