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