|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
| 2 | + |
| 3 | +/* |
| 4 | + *Copyright (c) 2024 Zhiyuan Bai< [email protected]> |
| 5 | + */ |
| 6 | +/dts-v1/; |
| 7 | + |
| 8 | +#include "msm8939-pm8916.dtsi" |
| 9 | +#include <dt-bindings/gpio/gpio.h> |
| 10 | +#include <dt-bindings/leds/common.h> |
| 11 | +#include <dt-bindings/sound/apq8016-lpass.h> |
| 12 | + |
| 13 | +/ { |
| 14 | + model = "Huawei G7 Plus / G8 / GX8 / Maimang 4"; |
| 15 | + compatible = "huawei,rio", "qcom,msm8939"; |
| 16 | + chassis-type = "handset"; |
| 17 | + |
| 18 | + aliases { |
| 19 | + mmc0 = &sdhc_1; /* SDC1 eMMC slot */ |
| 20 | + mmc1 = &sdhc_2; /* SDC2 SD card slot */ |
| 21 | + serial0 = &blsp_uart2; |
| 22 | + }; |
| 23 | + |
| 24 | + chosen { |
| 25 | + stdout-path = "serial0"; |
| 26 | + }; |
| 27 | + |
| 28 | + reserved-memory { |
| 29 | + qseecom_mem: qseecom@84a00000 { |
| 30 | + reg = <0x0 0x84a00000 0x0 0x1600000>; |
| 31 | + no-map; |
| 32 | + }; |
| 33 | + }; |
| 34 | + |
| 35 | + gpio-hall-sensor { |
| 36 | + compatible = "gpio-keys"; |
| 37 | + |
| 38 | + pinctrl-0 = <&gpio_hall_sensor_default>; |
| 39 | + pinctrl-names = "default"; |
| 40 | + |
| 41 | + label = "GPIO Hall Effect Sensor"; |
| 42 | + |
| 43 | + event-hall-sensor { |
| 44 | + label = "Hall Effect Sensor"; |
| 45 | + gpios = <&tlmm 69 GPIO_ACTIVE_LOW>; |
| 46 | + linux,input-type = <EV_SW>; |
| 47 | + linux,code = <SW_LID>; |
| 48 | + linux,can-disable; |
| 49 | + }; |
| 50 | + }; |
| 51 | + |
| 52 | + gpio-keys { |
| 53 | + compatible = "gpio-keys"; |
| 54 | + |
| 55 | + pinctrl-0 = <&gpio_keys_default>; |
| 56 | + pinctrl-names = "default"; |
| 57 | + |
| 58 | + label = "GPIO Buttons"; |
| 59 | + |
| 60 | + button-volume-up { |
| 61 | + label = "Volume Up"; |
| 62 | + gpios = <&tlmm 107 GPIO_ACTIVE_LOW>; |
| 63 | + linux,code = <KEY_VOLUMEUP>; |
| 64 | + }; |
| 65 | + }; |
| 66 | + |
| 67 | + gpio-leds { |
| 68 | + compatible = "gpio-leds"; |
| 69 | + |
| 70 | + pinctrl-0 = <&gpio_leds_default>; |
| 71 | + pinctrl-names = "default"; |
| 72 | + |
| 73 | + led-0 { |
| 74 | + gpios = <&tlmm 8 GPIO_ACTIVE_HIGH>; |
| 75 | + color = <LED_COLOR_ID_RED>; |
| 76 | + default-state = "off"; |
| 77 | + function = LED_FUNCTION_INDICATOR; |
| 78 | + retain-state-suspended; |
| 79 | + }; |
| 80 | + |
| 81 | + led-1 { |
| 82 | + gpios = <&tlmm 9 GPIO_ACTIVE_HIGH>; |
| 83 | + color = <LED_COLOR_ID_GREEN>; |
| 84 | + default-state = "off"; |
| 85 | + function = LED_FUNCTION_INDICATOR; |
| 86 | + retain-state-suspended; |
| 87 | + }; |
| 88 | + |
| 89 | + led-2 { |
| 90 | + gpios = <&tlmm 10 GPIO_ACTIVE_HIGH>; |
| 91 | + color = <LED_COLOR_ID_BLUE>; |
| 92 | + default-state = "off"; |
| 93 | + function = LED_FUNCTION_INDICATOR; |
| 94 | + retain-state-suspended; |
| 95 | + }; |
| 96 | + }; |
| 97 | + |
| 98 | + usb_id: usb-id { |
| 99 | + compatible = "linux,extcon-usb-gpio"; |
| 100 | + id-gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>; |
| 101 | + pinctrl-0 = <&usb_id_default>; |
| 102 | + pinctrl-names = "default"; |
| 103 | + }; |
| 104 | +}; |
| 105 | + |
| 106 | +&blsp_i2c2 { |
| 107 | + status = "okay"; |
| 108 | + |
| 109 | + regulator@3e { |
| 110 | + compatible = "ti,tps65132"; |
| 111 | + reg = <0x3e>; |
| 112 | + |
| 113 | + pinctrl-0 = <®_lcd_en_default>; |
| 114 | + pinctrl-names = "default"; |
| 115 | + |
| 116 | + reg_lcd_pos: outp { |
| 117 | + regulator-name = "outp"; |
| 118 | + regulator-min-microvolt = <5400000>; |
| 119 | + regulator-max-microvolt = <5400000>; |
| 120 | + enable-gpios = <&tlmm 97 GPIO_ACTIVE_HIGH>; |
| 121 | + regulator-active-discharge = <1>; |
| 122 | + }; |
| 123 | + |
| 124 | + reg_lcd_neg: outn { |
| 125 | + regulator-name = "outn"; |
| 126 | + regulator-min-microvolt = <5400000>; |
| 127 | + regulator-max-microvolt = <5400000>; |
| 128 | + enable-gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>; |
| 129 | + regulator-active-discharge = <1>; |
| 130 | + }; |
| 131 | + }; |
| 132 | +}; |
| 133 | +&blsp_i2c5 { |
| 134 | + status = "okay"; |
| 135 | + |
| 136 | + touchscreen@1c { |
| 137 | + compatible = "cypress,tt21000"; |
| 138 | + |
| 139 | + reg = <0x1c>; |
| 140 | + |
| 141 | + interrupts-extended = <&tlmm 13 IRQ_TYPE_EDGE_FALLING>; |
| 142 | + reset-gpios = <&tlmm 12 GPIO_ACTIVE_LOW>; |
| 143 | + |
| 144 | + vdd-supply = <&pm8916_l17>; |
| 145 | + vddio-supply = <&pm8916_l16>; |
| 146 | + |
| 147 | + pinctrl-0 = <&touchscreen_default>; |
| 148 | + pinctrl-names = "default"; |
| 149 | + }; |
| 150 | +}; |
| 151 | + |
| 152 | +&blsp_uart2 { |
| 153 | + status = "okay"; |
| 154 | +}; |
| 155 | + |
| 156 | +&gpu { |
| 157 | + status = "okay"; |
| 158 | +}; |
| 159 | + |
| 160 | +&lpass { |
| 161 | + status = "okay"; |
| 162 | +}; |
| 163 | + |
| 164 | +&lpass_codec { |
| 165 | + status = "okay"; |
| 166 | +}; |
| 167 | + |
| 168 | +&mdss { |
| 169 | + status = "okay"; |
| 170 | +}; |
| 171 | + |
| 172 | +&mdss_dsi0 { |
| 173 | + pinctrl-0 = <&mdss_default>; |
| 174 | + pinctrl-1 = <&mdss_sleep>; |
| 175 | + pinctrl-names = "default", "sleep"; |
| 176 | + status = "okay"; |
| 177 | + |
| 178 | + panel@0 { |
| 179 | + compatible = "huawei,rio-panel"; |
| 180 | + reg = <0>; |
| 181 | + |
| 182 | + vsp-supply = <®_lcd_pos>; |
| 183 | + vsn-supply = <®_lcd_neg>; |
| 184 | + reset-gpios = <&tlmm 25 GPIO_ACTIVE_LOW>; |
| 185 | + |
| 186 | + port { |
| 187 | + panel_in: endpoint { |
| 188 | + remote-endpoint = <&mdss_dsi0_out>; |
| 189 | + }; |
| 190 | + }; |
| 191 | + }; |
| 192 | +}; |
| 193 | + |
| 194 | +&mdss_dsi0_out { |
| 195 | + data-lanes = <0 1 2 3>; |
| 196 | + remote-endpoint = <&panel_in>; |
| 197 | +}; |
| 198 | + |
| 199 | +&mdss_dsi0_phy { |
| 200 | + qcom,dsi-phy-regulator-ldo-mode; |
| 201 | + status = "okay"; |
| 202 | +}; |
| 203 | + |
| 204 | +&pm8916_l8 { |
| 205 | + regulator-min-microvolt = <2950000>; |
| 206 | + regulator-max-microvolt = <2950000>; |
| 207 | +}; |
| 208 | + |
| 209 | +&pm8916_resin { |
| 210 | + linux,code = <KEY_VOLUMEDOWN>; |
| 211 | + status = "okay"; |
| 212 | +}; |
| 213 | + |
| 214 | +&pm8916_rpm_regulators { |
| 215 | + pm8916_l16: l16 { |
| 216 | + regulator-min-microvolt = <1800000>; |
| 217 | + regulator-max-microvolt = <1800000>; |
| 218 | + }; |
| 219 | + |
| 220 | + pm8916_l17: l17 { |
| 221 | + regulator-min-microvolt = <2850000>; |
| 222 | + regulator-max-microvolt = <2850000>; |
| 223 | + }; |
| 224 | +}; |
| 225 | + |
| 226 | +&pm8916_vib { |
| 227 | + status = "okay"; |
| 228 | +}; |
| 229 | + |
| 230 | +&sdhc_1 { |
| 231 | + status = "okay"; |
| 232 | +}; |
| 233 | + |
| 234 | +&sdhc_2 { |
| 235 | + pinctrl-0 = <&sdc2_default &sdc2_cd_default>; |
| 236 | + pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>; |
| 237 | + pinctrl-names = "default", "sleep"; |
| 238 | + |
| 239 | + cd-gpios = <&tlmm 38 GPIO_ACTIVE_HIGH>; |
| 240 | + |
| 241 | + status = "okay"; |
| 242 | +}; |
| 243 | + |
| 244 | +&usb { |
| 245 | + extcon = <&usb_id>, <&usb_id>; |
| 246 | + status = "okay"; |
| 247 | +}; |
| 248 | + |
| 249 | +&usb_hs_phy { |
| 250 | + extcon = <&usb_id>; |
| 251 | +}; |
| 252 | + |
| 253 | +&wcnss { |
| 254 | + status = "okay"; |
| 255 | +}; |
| 256 | + |
| 257 | +&wcnss_iris { |
| 258 | + compatible = "qcom,wcn3620"; |
| 259 | +}; |
| 260 | + |
| 261 | +&wcnss_mem { |
| 262 | + status = "okay"; |
| 263 | +}; |
| 264 | + |
| 265 | +&tlmm { |
| 266 | + gpio_hall_sensor_default: gpio-hall-sensor-default-state { |
| 267 | + pins = "gpio69"; |
| 268 | + function = "gpio"; |
| 269 | + drive-strength = <2>; |
| 270 | + bias-disable; |
| 271 | + }; |
| 272 | + |
| 273 | + gpio_keys_default: gpio-keys-default-state { |
| 274 | + pins = "gpio107"; |
| 275 | + function = "gpio"; |
| 276 | + drive-strength = <2>; |
| 277 | + bias-pull-up; |
| 278 | + }; |
| 279 | + |
| 280 | + gpio_leds_default: gpio-leds-default-state { |
| 281 | + pins = "gpio8", "gpio9", "gpio10"; |
| 282 | + function = "gpio"; |
| 283 | + drive-strength = <2>; |
| 284 | + bias-disable; |
| 285 | + }; |
| 286 | + |
| 287 | + mdss_default: mdss-default-state { |
| 288 | + pins = "gpio25"; |
| 289 | + function = "gpio"; |
| 290 | + drive-strength = <8>; |
| 291 | + bias-disable; |
| 292 | + }; |
| 293 | + |
| 294 | + mdss_sleep: mdss-sleep-state { |
| 295 | + pins = "gpio25"; |
| 296 | + function = "gpio"; |
| 297 | + drive-strength = <2>; |
| 298 | + bias-pull-down; |
| 299 | + }; |
| 300 | + |
| 301 | + reg_lcd_en_default: reg-lcd-en-default-state { |
| 302 | + pins = "gpio32", "gpio97"; |
| 303 | + function = "gpio"; |
| 304 | + drive-strength = <2>; |
| 305 | + bias-disable; |
| 306 | + }; |
| 307 | + |
| 308 | + sdc2_cd_default: sdc2-cd-default-state { |
| 309 | + pins = "gpio38"; |
| 310 | + function = "gpio"; |
| 311 | + drive-strength = <2>; |
| 312 | + bias-disable; |
| 313 | + }; |
| 314 | + |
| 315 | + touchscreen_default: touchscreen-default-state { |
| 316 | + pins = "gpio12", "gpio13"; |
| 317 | + function = "gpio"; |
| 318 | + drive-strength = <2>; |
| 319 | + bias-disable; |
| 320 | + }; |
| 321 | + |
| 322 | + usb_id_default: usb-id-default-state { |
| 323 | + pins = "gpio110"; |
| 324 | + function = "gpio"; |
| 325 | + drive-strength = <8>; |
| 326 | + bias-pull-up; |
| 327 | + }; |
| 328 | +}; |
0 commit comments