1// SPDX-License-Identifier: BSD-3-Clause 2/* 3 * Copyright (c) 2021, AngeloGioacchino Del Regno 4 * <angelogioacchino.delregno@somainline.org> 5 */ 6 7/dts-v1/; 8 9#include "msm8998-mtp.dtsi" 10 11#include <dt-bindings/input/input.h> 12#include <dt-bindings/leds/common.h> 13#include <dt-bindings/pinctrl/qcom,pmic-gpio.h> 14 15/ { 16 model = "F(x)tec Pro1 (QX1000)"; 17 compatible = "fxtec,pro1", "qcom,msm8998"; 18 chassis-type = "handset"; 19 qcom,board-id = <0x02000b 0x10>; 20 21 /* 22 * Until we hook up type-c detection, we 23 * have to stick with this. But it works. 24 */ 25 extcon_usb: extcon-usb { 26 compatible = "linux,extcon-usb-gpio"; 27 id-gpio = <&tlmm 38 GPIO_ACTIVE_HIGH>; 28 }; 29 30 gpio-hall-sensors { 31 compatible = "gpio-keys"; 32 input-name = "hall-sensors"; 33 label = "Hall sensors"; 34 pinctrl-names = "default"; 35 pinctrl-0 = <&hall_sensor1_default>; 36 37 hall-sensor1 { 38 label = "Keyboard Hall Sensor"; 39 gpios = <&tlmm 124 GPIO_ACTIVE_HIGH>; 40 debounce-interval = <15>; 41 gpio-key,wakeup; 42 linux,input-type = <EV_SW>; 43 linux,code = <SW_KEYPAD_SLIDE>; 44 }; 45 }; 46 47 gpio-kb-extra-keys { 48 compatible = "gpio-keys"; 49 input-name = "extra-kb-keys"; 50 label = "Keyboard extra keys"; 51 pinctrl-names = "default"; 52 pinctrl-0 = <&gpio_kb_pins_extra>; 53 54 home { 55 label = "Home"; 56 gpios = <&tlmm 21 GPIO_ACTIVE_LOW>; 57 linux,code = <KEY_HOMEPAGE>; 58 debounce-interval = <15>; 59 linux,can-disable; 60 }; 61 62 super-l { 63 label = "Super Left"; 64 gpios = <&tlmm 32 GPIO_ACTIVE_LOW>; 65 linux,code = <KEY_FN>; 66 debounce-interval = <15>; 67 linux,can-disable; 68 }; 69 70 super-r { 71 label = "Super Right"; 72 gpios = <&tlmm 33 GPIO_ACTIVE_LOW>; 73 linux,code = <KEY_FN>; 74 debounce-interval = <15>; 75 linux,can-disable; 76 }; 77 78 shift { 79 label = "Shift"; 80 gpios = <&tlmm 114 GPIO_ACTIVE_LOW>; 81 linux,code = <KEY_RIGHTSHIFT>; 82 debounce-interval = <15>; 83 linux,can-disable; 84 }; 85 86 ctrl { 87 label = "Ctrl"; 88 gpios = <&tlmm 128 GPIO_ACTIVE_LOW>; 89 linux,code = <KEY_LEFTCTRL>; 90 debounce-interval = <15>; 91 linux,can-disable; 92 }; 93 94 alt { 95 label = "Alt"; 96 gpios = <&tlmm 129 GPIO_ACTIVE_LOW>; 97 linux,code = <KEY_LEFTALT>; 98 debounce-interval = <15>; 99 linux,can-disable; 100 }; 101 }; 102 103 gpio-keys { 104 compatible = "gpio-keys"; 105 input-name = "side-buttons"; 106 label = "Side buttons"; 107 #address-cells = <1>; 108 #size-cells = <0>; 109 pinctrl-names = "default"; 110 pinctrl-0 = <&vol_up_pin_a>, <&cam_focus_pin_a>, 111 <&cam_snapshot_pin_a>; 112 vol-up { 113 label = "Volume Up"; 114 gpios = <&pm8998_gpio 6 GPIO_ACTIVE_LOW>; 115 linux,input-type = <EV_KEY>; 116 linux,code = <KEY_VOLUMEUP>; 117 gpio-key,wakeup; 118 debounce-interval = <15>; 119 }; 120 121 camera-snapshot { 122 label = "Camera Snapshot"; 123 gpios = <&pm8998_gpio 7 GPIO_ACTIVE_LOW>; 124 linux,input-type = <EV_KEY>; 125 linux,code = <KEY_CAMERA>; 126 debounce-interval = <15>; 127 }; 128 129 camera-focus { 130 label = "Camera Focus"; 131 gpios = <&pm8998_gpio 8 GPIO_ACTIVE_LOW>; 132 linux,input-type = <EV_KEY>; 133 linux,code = <KEY_CAMERA_FOCUS>; 134 debounce-interval = <15>; 135 }; 136 }; 137 138 keyboard-leds { 139 compatible = "gpio-leds"; 140 141 backlight { 142 color = <LED_COLOR_ID_WHITE>; 143 default-state = "off"; 144 function = LED_FUNCTION_KBD_BACKLIGHT; 145 gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>; 146 label = "white:kbd_backlight"; 147 retain-state-suspended; 148 }; 149 150 caps-lock { 151 color = <LED_COLOR_ID_YELLOW>; 152 default-state = "off"; 153 function = LED_FUNCTION_CAPSLOCK; 154 gpios = <&tlmm 26 GPIO_ACTIVE_HIGH>; 155 label = "yellow:capslock"; 156 linux,default-trigger = "kbd-capslock"; 157 }; 158 }; 159 160 reserved-memory { 161 cont_splash_mem: memory@9d400000 { 162 reg = <0x0 0x9d400000 0x0 0x2000000>; 163 no-map; 164 }; 165 166 zap_shader_region: memory@f6400000 { 167 compatible = "shared-dma-pool"; 168 reg = <0x0 0xf6400000 0x0 0x2000>; 169 no-map; 170 }; 171 172 ramoops@ffc00000 { 173 compatible = "ramoops"; 174 reg = <0x0 0xffc00000 0x0 0x100000>; 175 console-size = <0x60000>; 176 ecc-size = <16>; 177 ftrace-size = <0x10000>; 178 pmsg-size = <0x20000>; 179 record-size = <0x10000>; 180 }; 181 }; 182 183 ts_vio_vreg: ts-vio-vreg { 184 compatible = "regulator-fixed"; 185 regulator-name = "ts_vio_reg"; 186 startup-delay-us = <2>; 187 enable-active-high; 188 gpio = <&tlmm 81 GPIO_ACTIVE_HIGH>; 189 pinctrl-names = "default"; 190 pinctrl-0 = <&ts_vio_default>; 191 regulator-always-on; 192 }; 193}; 194 195&blsp2_i2c1 { 196 status = "ok"; 197 198 touchscreen@14 { 199 compatible = "goodix,gt9286"; 200 reg = <0x14>; 201 interrupt-parent = <&tlmm>; 202 interrupts = <125 IRQ_TYPE_LEVEL_LOW>; 203 reset-gpios = <&tlmm 89 GPIO_ACTIVE_HIGH>; 204 AVDD28-supply = <&vreg_l28_3p0>; 205 VDDIO-supply = <&ts_vio_vreg>; 206 pinctrl-names = "active"; 207 pinctrl-0 = <&ts_rst_n>, <&ts_int_n>; 208 }; 209}; 210 211&mmcc { 212 status = "ok"; 213}; 214 215&mmss_smmu { 216 status = "ok"; 217}; 218 219&pm8998_gpio { 220 vol_up_pin_a: vol-up-active { 221 pins = "gpio6"; 222 function = "normal"; 223 bias-pull-up; 224 input-enable; 225 qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>; 226 }; 227 228 cam_focus_pin_a: cam-focus-btn-active { 229 pins = "gpio7"; 230 function = "normal"; 231 bias-pull-up; 232 input-enable; 233 qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>; 234 }; 235 236 cam_snapshot_pin_a: cam-snapshot-btn-active { 237 pins = "gpio8"; 238 function = "normal"; 239 bias-pull-up; 240 input-enable; 241 qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>; 242 }; 243}; 244 245&pm8998_pon { 246 resin { 247 compatible = "qcom,pm8941-resin"; 248 interrupts = <GIC_SPI 0x8 1 IRQ_TYPE_EDGE_BOTH>; 249 bias-pull-up; 250 debounce = <15625>; 251 linux,code = <KEY_VOLUMEDOWN>; 252 }; 253}; 254 255&tlmm { 256 gpio-reserved-ranges = <0 4>; 257 258 mdp_vsync_n: mdp-vsync-n { 259 pins = "gpio10"; 260 function = "mdp_vsync_a"; 261 bias-pull-down; 262 drive-strength = <2>; 263 }; 264 265 gpio_kb_pins_extra: gpio-kb-pins-extra { 266 pins = "gpio21", "gpio32", "gpio33", "gpio114", 267 "gpio128", "gpio129"; 268 function = "gpio"; 269 drive-strength = <2>; 270 bias-pull-up; 271 }; 272 273 ts_vio_default: ts-vio-def { 274 pins = "gpio81"; 275 function = "gpio"; 276 bias-disable; 277 drive-strength = <2>; 278 }; 279 280 ts_rst_n: ts-rst-n { 281 pins = "gpio89"; 282 function = "gpio"; 283 bias-pull-up; 284 drive-strength = <8>; 285 }; 286 287 hall_sensor1_default: hall-sensor1-def { 288 pins = "gpio124"; 289 function = "gpio"; 290 bias-disable; 291 drive-strength = <2>; 292 input-enable; 293 }; 294 295 ts_int_n: ts-int-n { 296 pins = "gpio125"; 297 function = "gpio"; 298 bias-disable; 299 drive-strength = <8>; 300 }; 301}; 302 303&ufshc { 304 status = "ok"; 305}; 306 307&ufsphy { 308 status = "ok"; 309}; 310 311&usb3_dwc3 { 312 dr_mode = "peripheral"; 313 extcon = <&extcon_usb>; 314}; 315 316/* GT9286 analog supply */ 317&vreg_l28_3p0 { 318 regulator-min-microvolt = <2800000>; 319 regulator-max-microvolt = <2800000>; 320}; 321