diff options
author | Ivan T. Ivanov <ivan.ivanov@linaro.org> | 2015-03-31 05:37:18 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-04-08 11:00:18 -0400 |
commit | 7414b0993cd020aea14574065c28b55f3f849688 (patch) | |
tree | 31d91529686bdc2c3c9cba3660cf49f570a5b661 | |
parent | b8a19382ac6212d18b21fcc7867060a5d54fe1a2 (diff) |
pinctrl: Add support for PM8916 GPIO's and MPP's
Add compatible string definitions and supported pin functions.
Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt | 2 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt | 2 | ||||
-rw-r--r-- | drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 1 | ||||
-rw-r--r-- | drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 1 | ||||
-rw-r--r-- | include/dt-bindings/pinctrl/qcom,pmic-gpio.h | 15 | ||||
-rw-r--r-- | include/dt-bindings/pinctrl/qcom,pmic-mpp.h | 4 |
6 files changed, 25 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt index 7ed08048516a..1ae63c0acd40 100644 --- a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt +++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt | |||
@@ -10,6 +10,7 @@ PMIC's from Qualcomm. | |||
10 | "qcom,pm8018-gpio" | 10 | "qcom,pm8018-gpio" |
11 | "qcom,pm8038-gpio" | 11 | "qcom,pm8038-gpio" |
12 | "qcom,pm8058-gpio" | 12 | "qcom,pm8058-gpio" |
13 | "qcom,pm8916-gpio" | ||
13 | "qcom,pm8917-gpio" | 14 | "qcom,pm8917-gpio" |
14 | "qcom,pm8921-gpio" | 15 | "qcom,pm8921-gpio" |
15 | "qcom,pm8941-gpio" | 16 | "qcom,pm8941-gpio" |
@@ -74,6 +75,7 @@ to specify in a pin configuration subnode: | |||
74 | gpio1-gpio6 for pm8018 | 75 | gpio1-gpio6 for pm8018 |
75 | gpio1-gpio12 for pm8038 | 76 | gpio1-gpio12 for pm8038 |
76 | gpio1-gpio40 for pm8058 | 77 | gpio1-gpio40 for pm8058 |
78 | gpio1-gpio4 for pm8916 | ||
77 | gpio1-gpio38 for pm8917 | 79 | gpio1-gpio38 for pm8917 |
78 | gpio1-gpio44 for pm8921 | 80 | gpio1-gpio44 for pm8921 |
79 | gpio1-gpio36 for pm8941 | 81 | gpio1-gpio36 for pm8941 |
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt index 854774b194ed..ed19991aad35 100644 --- a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt +++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.txt | |||
@@ -8,6 +8,7 @@ of PMIC's from Qualcomm. | |||
8 | Value type: <string> | 8 | Value type: <string> |
9 | Definition: Should contain one of: | 9 | Definition: Should contain one of: |
10 | "qcom,pm8841-mpp", | 10 | "qcom,pm8841-mpp", |
11 | "qcom,pm8916-mpp", | ||
11 | "qcom,pm8941-mpp", | 12 | "qcom,pm8941-mpp", |
12 | "qcom,pma8084-mpp", | 13 | "qcom,pma8084-mpp", |
13 | 14 | ||
@@ -67,6 +68,7 @@ to specify in a pin configuration subnode: | |||
67 | Definition: List of MPP pins affected by the properties specified in | 68 | Definition: List of MPP pins affected by the properties specified in |
68 | this subnode. Valid pins are: | 69 | this subnode. Valid pins are: |
69 | mpp1-mpp4 for pm8841 | 70 | mpp1-mpp4 for pm8841 |
71 | mpp1-mpp4 for pm8916 | ||
70 | mpp1-mpp8 for pm8941 | 72 | mpp1-mpp8 for pm8941 |
71 | mpp1-mpp4 for pma8084 | 73 | mpp1-mpp4 for pma8084 |
72 | 74 | ||
diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c index 0f11a26d932b..b2d22218a258 100644 --- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c +++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | |||
@@ -810,6 +810,7 @@ static int pmic_gpio_remove(struct platform_device *pdev) | |||
810 | } | 810 | } |
811 | 811 | ||
812 | static const struct of_device_id pmic_gpio_of_match[] = { | 812 | static const struct of_device_id pmic_gpio_of_match[] = { |
813 | { .compatible = "qcom,pm8916-gpio" }, /* 4 GPIO's */ | ||
813 | { .compatible = "qcom,pm8941-gpio" }, /* 36 GPIO's */ | 814 | { .compatible = "qcom,pm8941-gpio" }, /* 36 GPIO's */ |
814 | { .compatible = "qcom,pma8084-gpio" }, /* 22 GPIO's */ | 815 | { .compatible = "qcom,pma8084-gpio" }, /* 22 GPIO's */ |
815 | { }, | 816 | { }, |
diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c index a8924dba335e..8f36c5f91949 100644 --- a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c +++ b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | |||
@@ -925,6 +925,7 @@ static int pmic_mpp_remove(struct platform_device *pdev) | |||
925 | 925 | ||
926 | static const struct of_device_id pmic_mpp_of_match[] = { | 926 | static const struct of_device_id pmic_mpp_of_match[] = { |
927 | { .compatible = "qcom,pm8841-mpp" }, /* 4 MPP's */ | 927 | { .compatible = "qcom,pm8841-mpp" }, /* 4 MPP's */ |
928 | { .compatible = "qcom,pm8916-mpp" }, /* 4 MPP's */ | ||
928 | { .compatible = "qcom,pm8941-mpp" }, /* 8 MPP's */ | 929 | { .compatible = "qcom,pm8941-mpp" }, /* 8 MPP's */ |
929 | { .compatible = "qcom,pma8084-mpp" }, /* 8 MPP's */ | 930 | { .compatible = "qcom,pma8084-mpp" }, /* 8 MPP's */ |
930 | { }, | 931 | { }, |
diff --git a/include/dt-bindings/pinctrl/qcom,pmic-gpio.h b/include/dt-bindings/pinctrl/qcom,pmic-gpio.h index fa74d7cc960c..aafa76cb569d 100644 --- a/include/dt-bindings/pinctrl/qcom,pmic-gpio.h +++ b/include/dt-bindings/pinctrl/qcom,pmic-gpio.h | |||
@@ -48,6 +48,14 @@ | |||
48 | #define PM8058_GPIO_L5 6 | 48 | #define PM8058_GPIO_L5 6 |
49 | #define PM8058_GPIO_L2 7 | 49 | #define PM8058_GPIO_L2 7 |
50 | 50 | ||
51 | /* | ||
52 | * Note: PM8916 GPIO1 and GPIO2 are supporting | ||
53 | * only L2(1.15V) and L5(1.8V) options | ||
54 | */ | ||
55 | #define PM8916_GPIO_VPH 0 | ||
56 | #define PM8916_GPIO_L2 2 | ||
57 | #define PM8916_GPIO_L5 3 | ||
58 | |||
51 | #define PM8917_GPIO_VPH 0 | 59 | #define PM8917_GPIO_VPH 0 |
52 | #define PM8917_GPIO_S4 2 | 60 | #define PM8917_GPIO_S4 2 |
53 | #define PM8917_GPIO_L15 3 | 61 | #define PM8917_GPIO_L15 3 |
@@ -115,6 +123,13 @@ | |||
115 | #define PM8058_GPIO39_MP3_CLK PMIC_GPIO_FUNC_FUNC1 | 123 | #define PM8058_GPIO39_MP3_CLK PMIC_GPIO_FUNC_FUNC1 |
116 | #define PM8058_GPIO40_EXT_BB_EN PMIC_GPIO_FUNC_FUNC1 | 124 | #define PM8058_GPIO40_EXT_BB_EN PMIC_GPIO_FUNC_FUNC1 |
117 | 125 | ||
126 | #define PM8916_GPIO1_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1 | ||
127 | #define PM8916_GPIO1_KEYP_DRV PMIC_GPIO_FUNC_FUNC2 | ||
128 | #define PM8916_GPIO2_DIV_CLK PMIC_GPIO_FUNC_FUNC1 | ||
129 | #define PM8916_GPIO2_SLEEP_CLK PMIC_GPIO_FUNC_FUNC2 | ||
130 | #define PM8916_GPIO3_KEYP_DRV PMIC_GPIO_FUNC_FUNC1 | ||
131 | #define PM8916_GPIO4_KEYP_DRV PMIC_GPIO_FUNC_FUNC2 | ||
132 | |||
118 | #define PM8917_GPIO9_18_KEYP_DRV PMIC_GPIO_FUNC_FUNC1 | 133 | #define PM8917_GPIO9_18_KEYP_DRV PMIC_GPIO_FUNC_FUNC1 |
119 | #define PM8917_GPIO20_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1 | 134 | #define PM8917_GPIO20_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1 |
120 | #define PM8917_GPIO21_23_UART_TX PMIC_GPIO_FUNC_FUNC2 | 135 | #define PM8917_GPIO21_23_UART_TX PMIC_GPIO_FUNC_FUNC2 |
diff --git a/include/dt-bindings/pinctrl/qcom,pmic-mpp.h b/include/dt-bindings/pinctrl/qcom,pmic-mpp.h index d2c7dabe3223..c10205491f8d 100644 --- a/include/dt-bindings/pinctrl/qcom,pmic-mpp.h +++ b/include/dt-bindings/pinctrl/qcom,pmic-mpp.h | |||
@@ -10,6 +10,10 @@ | |||
10 | #define PM8841_MPP_VPH 0 | 10 | #define PM8841_MPP_VPH 0 |
11 | #define PM8841_MPP_S3 2 | 11 | #define PM8841_MPP_S3 2 |
12 | 12 | ||
13 | #define PM8916_MPP_VPH 0 | ||
14 | #define PM8916_MPP_L2 2 | ||
15 | #define PM8916_MPP_L5 3 | ||
16 | |||
13 | #define PM8941_MPP_VPH 0 | 17 | #define PM8941_MPP_VPH 0 |
14 | #define PM8941_MPP_L1 1 | 18 | #define PM8941_MPP_L1 1 |
15 | #define PM8941_MPP_S3 2 | 19 | #define PM8941_MPP_S3 2 |