Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 1 | #include "qcom-msm8974.dtsi" |
| 2 | #include "qcom-pm8841.dtsi" |
| 3 | #include "qcom-pm8941.dtsi" |
| 4 | #include <dt-bindings/gpio/gpio.h> |
| 5 | #include <dt-bindings/input/input.h> |
| 6 | #include <dt-bindings/pinctrl/qcom,pmic-gpio.h> |
| 7 | |
| 8 | |
| 9 | / { |
| 10 | model = "Fairphone 2"; |
| 11 | compatible = "fairphone,fp2", "qcom,msm8974"; |
| 12 | |
| 13 | aliases { |
| 14 | serial0 = &blsp1_uart2; |
| 15 | }; |
| 16 | |
| 17 | chosen { |
| 18 | stdout-path = "serial0:115200n8"; |
| 19 | }; |
| 20 | |
| 21 | gpio-keys { |
| 22 | compatible = "gpio-keys"; |
| 23 | input-name = "gpio-keys"; |
| 24 | |
| 25 | pinctrl-names = "default"; |
| 26 | pinctrl-0 = <&gpio_keys_pin_a>; |
| 27 | |
| 28 | camera-snapshot { |
| 29 | label = "camera_snapshot"; |
| 30 | gpios = <&pm8941_gpios 1 GPIO_ACTIVE_LOW>; |
| 31 | linux,code = <KEY_CAMERA>; |
| 32 | wakeup-source; |
| 33 | debounce-interval = <15>; |
| 34 | }; |
| 35 | |
| 36 | volume-down { |
| 37 | label = "volume_down"; |
| 38 | gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>; |
| 39 | linux,code = <KEY_VOLUMEDOWN>; |
| 40 | wakeup-source; |
| 41 | debounce-interval = <15>; |
| 42 | }; |
| 43 | |
| 44 | volume-up { |
| 45 | label = "volume_up"; |
| 46 | gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>; |
| 47 | linux,code = <KEY_VOLUMEUP>; |
| 48 | wakeup-source; |
| 49 | debounce-interval = <15>; |
| 50 | }; |
| 51 | }; |
| 52 | |
| 53 | smd { |
| 54 | rpm { |
| 55 | rpm_requests { |
| 56 | pm8841-regulators { |
| 57 | s1 { |
| 58 | regulator-min-microvolt = <675000>; |
| 59 | regulator-max-microvolt = <1050000>; |
| 60 | }; |
| 61 | |
| 62 | s2 { |
| 63 | regulator-min-microvolt = <500000>; |
| 64 | regulator-max-microvolt = <1050000>; |
| 65 | }; |
| 66 | |
| 67 | s3 { |
| 68 | regulator-min-microvolt = <1050000>; |
| 69 | regulator-max-microvolt = <1050000>; |
| 70 | }; |
| 71 | }; |
| 72 | |
| 73 | pm8941-regulators { |
| 74 | vdd_l1_l3-supply = <&pm8941_s1>; |
| 75 | vdd_l2_lvs1_2_3-supply = <&pm8941_s3>; |
| 76 | vdd_l4_l11-supply = <&pm8941_s1>; |
| 77 | vdd_l5_l7-supply = <&pm8941_s2>; |
| 78 | vdd_l6_l12_l14_l15-supply = <&pm8941_s2>; |
| 79 | vdd_l9_l10_l17_l22-supply = <&vreg_boost>; |
| 80 | vdd_l13_l20_l23_l24-supply = <&vreg_boost>; |
| 81 | vdd_l21-supply = <&vreg_boost>; |
| 82 | |
| 83 | s1 { |
| 84 | regulator-min-microvolt = <1300000>; |
| 85 | regulator-max-microvolt = <1300000>; |
| 86 | |
| 87 | regulator-always-on; |
| 88 | regulator-boot-on; |
| 89 | }; |
| 90 | |
| 91 | s2 { |
| 92 | regulator-min-microvolt = <2150000>; |
| 93 | regulator-max-microvolt = <2150000>; |
| 94 | |
| 95 | regulator-boot-on; |
| 96 | }; |
| 97 | |
| 98 | s3 { |
| 99 | regulator-min-microvolt = <1800000>; |
| 100 | regulator-max-microvolt = <1800000>; |
| 101 | |
| 102 | regulator-always-on; |
| 103 | regulator-boot-on; |
| 104 | }; |
| 105 | |
| 106 | l1 { |
| 107 | regulator-min-microvolt = <1225000>; |
| 108 | regulator-max-microvolt = <1225000>; |
| 109 | |
| 110 | regulator-always-on; |
| 111 | regulator-boot-on; |
| 112 | }; |
| 113 | |
| 114 | l2 { |
| 115 | regulator-min-microvolt = <1200000>; |
| 116 | regulator-max-microvolt = <1200000>; |
| 117 | }; |
| 118 | |
| 119 | l3 { |
| 120 | regulator-min-microvolt = <1225000>; |
| 121 | regulator-max-microvolt = <1225000>; |
| 122 | }; |
| 123 | |
| 124 | l4 { |
| 125 | regulator-min-microvolt = <1225000>; |
| 126 | regulator-max-microvolt = <1225000>; |
| 127 | }; |
| 128 | |
| 129 | l5 { |
| 130 | regulator-min-microvolt = <1800000>; |
| 131 | regulator-max-microvolt = <1800000>; |
| 132 | }; |
| 133 | |
| 134 | l6 { |
| 135 | regulator-min-microvolt = <1800000>; |
| 136 | regulator-max-microvolt = <1800000>; |
| 137 | |
| 138 | regulator-boot-on; |
| 139 | }; |
| 140 | |
| 141 | l7 { |
| 142 | regulator-min-microvolt = <1800000>; |
| 143 | regulator-max-microvolt = <1800000>; |
| 144 | |
| 145 | regulator-boot-on; |
| 146 | }; |
| 147 | |
| 148 | l8 { |
| 149 | regulator-min-microvolt = <1800000>; |
| 150 | regulator-max-microvolt = <1800000>; |
| 151 | }; |
| 152 | |
| 153 | l9 { |
| 154 | regulator-min-microvolt = <1800000>; |
| 155 | regulator-max-microvolt = <2950000>; |
| 156 | }; |
| 157 | |
| 158 | l10 { |
| 159 | regulator-min-microvolt = <1800000>; |
| 160 | regulator-max-microvolt = <2950000>; |
| 161 | }; |
| 162 | |
| 163 | l11 { |
| 164 | regulator-min-microvolt = <1225000>; |
| 165 | regulator-max-microvolt = <1350000>; |
| 166 | }; |
| 167 | |
| 168 | l12 { |
| 169 | regulator-min-microvolt = <1800000>; |
| 170 | regulator-max-microvolt = <1800000>; |
| 171 | |
| 172 | regulator-always-on; |
| 173 | regulator-boot-on; |
| 174 | }; |
| 175 | |
| 176 | l13 { |
| 177 | regulator-min-microvolt = <1800000>; |
| 178 | regulator-max-microvolt = <2950000>; |
| 179 | |
| 180 | regulator-boot-on; |
| 181 | }; |
| 182 | |
| 183 | l14 { |
| 184 | regulator-min-microvolt = <1800000>; |
| 185 | regulator-max-microvolt = <1800000>; |
| 186 | }; |
| 187 | |
| 188 | l15 { |
| 189 | regulator-min-microvolt = <2050000>; |
| 190 | regulator-max-microvolt = <2050000>; |
| 191 | }; |
| 192 | |
| 193 | l16 { |
| 194 | regulator-min-microvolt = <2700000>; |
| 195 | regulator-max-microvolt = <2700000>; |
| 196 | }; |
| 197 | |
| 198 | l17 { |
| 199 | regulator-min-microvolt = <2850000>; |
| 200 | regulator-max-microvolt = <2850000>; |
| 201 | }; |
| 202 | |
| 203 | l18 { |
| 204 | regulator-min-microvolt = <2850000>; |
| 205 | regulator-max-microvolt = <2850000>; |
| 206 | }; |
| 207 | |
| 208 | l19 { |
| 209 | regulator-min-microvolt = <2900000>; |
| 210 | regulator-max-microvolt = <3350000>; |
| 211 | }; |
| 212 | |
| 213 | l20 { |
| 214 | regulator-min-microvolt = <2950000>; |
| 215 | regulator-max-microvolt = <2950000>; |
| 216 | |
| 217 | regulator-boot-on; |
| 218 | }; |
| 219 | |
| 220 | l21 { |
| 221 | regulator-min-microvolt = <2950000>; |
| 222 | regulator-max-microvolt = <2950000>; |
| 223 | |
| 224 | regulator-boot-on; |
| 225 | }; |
| 226 | |
| 227 | l22 { |
| 228 | regulator-min-microvolt = <3000000>; |
| 229 | regulator-max-microvolt = <3300000>; |
| 230 | }; |
| 231 | |
| 232 | l23 { |
| 233 | regulator-min-microvolt = <3000000>; |
| 234 | regulator-max-microvolt = <3000000>; |
| 235 | }; |
| 236 | |
| 237 | l24 { |
| 238 | regulator-min-microvolt = <3075000>; |
| 239 | regulator-max-microvolt = <3075000>; |
| 240 | |
| 241 | regulator-boot-on; |
| 242 | }; |
| 243 | }; |
| 244 | }; |
| 245 | }; |
| 246 | }; |
| 247 | }; |
| 248 | |
| 249 | &soc { |
| 250 | serial@f991e000 { |
| 251 | status = "ok"; |
| 252 | }; |
| 253 | |
| 254 | pinctrl@fd510000 { |
| 255 | sdhc1_pin_a: sdhc1-pin-active { |
| 256 | clk { |
| 257 | pins = "sdc1_clk"; |
| 258 | drive-strength = <16>; |
| 259 | bias-disable; |
| 260 | }; |
| 261 | |
| 262 | cmd-data { |
| 263 | pins = "sdc1_cmd", "sdc1_data"; |
| 264 | drive-strength = <10>; |
| 265 | bias-pull-up; |
| 266 | }; |
| 267 | }; |
| 268 | |
| 269 | sdhc2_cd_pin_a: sdhc2-cd-pin-active { |
| 270 | pins = "gpio62"; |
| 271 | function = "gpio"; |
| 272 | |
| 273 | drive-strength = <2>; |
| 274 | bias-disable; |
| 275 | }; |
| 276 | |
| 277 | sdhc2_pin_a: sdhc2-pin-active { |
| 278 | clk { |
| 279 | pins = "sdc2_clk"; |
| 280 | drive-strength = <10>; |
| 281 | bias-disable; |
| 282 | }; |
| 283 | |
| 284 | cmd-data { |
| 285 | pins = "sdc2_cmd", "sdc2_data"; |
| 286 | drive-strength = <6>; |
| 287 | bias-pull-up; |
| 288 | }; |
| 289 | }; |
| 290 | }; |
| 291 | |
| 292 | sdhci@f9824900 { |
| 293 | status = "ok"; |
| 294 | |
| 295 | vmmc-supply = <&pm8941_l20>; |
| 296 | vqmmc-supply = <&pm8941_s3>; |
| 297 | |
| 298 | bus-width = <8>; |
| 299 | non-removable; |
| 300 | |
| 301 | pinctrl-names = "default"; |
| 302 | pinctrl-0 = <&sdhc1_pin_a>; |
| 303 | }; |
| 304 | |
| 305 | sdhci@f98a4900 { |
| 306 | status = "ok"; |
| 307 | |
| 308 | vmmc-supply = <&pm8941_l21>; |
| 309 | vqmmc-supply = <&pm8941_l13>; |
| 310 | |
| 311 | bus-width = <4>; |
| 312 | |
| 313 | pinctrl-names = "default"; |
| 314 | pinctrl-0 = <&sdhc2_pin_a>, <&sdhc2_cd_pin_a>; |
| 315 | }; |
| 316 | |
| 317 | usb@f9a55000 { |
| 318 | status = "ok"; |
| 319 | |
| 320 | phys = <&usb_hs1_phy>; |
| 321 | phy-select = <&tcsr 0xb000 0>; |
| 322 | extcon = <&smbb>, <&usb_id>; |
| 323 | vbus-supply = <&chg_otg>; |
| 324 | |
| 325 | hnp-disable; |
| 326 | srp-disable; |
| 327 | adp-disable; |
| 328 | |
| 329 | ulpi { |
| 330 | phy@a { |
| 331 | status = "ok"; |
| 332 | |
| 333 | v1p8-supply = <&pm8941_l6>; |
| 334 | v3p3-supply = <&pm8941_l24>; |
| 335 | |
| 336 | extcon = <&smbb>; |
| 337 | qcom,init-seq = /bits/ 8 <0x1 0x64>; |
| 338 | }; |
| 339 | }; |
| 340 | }; |
| 341 | }; |
| 342 | |
| 343 | &spmi_bus { |
| 344 | pm8941@0 { |
| 345 | gpios@c000 { |
| 346 | gpio_keys_pin_a: gpio-keys-active { |
| 347 | pins = "gpio1", "gpio2", "gpio5"; |
| 348 | function = "normal"; |
| 349 | |
| 350 | bias-pull-up; |
| 351 | power-source = <PM8941_GPIO_S3>; |
| 352 | }; |
| 353 | }; |
| 354 | }; |
| 355 | }; |