1 // SPDX-License-Identifier: GPL-2.0-only 1 // SPDX-License-Identifier: GPL-2.0-only 2 /* 2 /* 3 * Copyright (c) 2022, Collabora Ltd 3 * Copyright (c) 2022, Collabora Ltd 4 * Author: AngeloGioacchino Del Regno <angelogi 4 * Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> 5 */ 5 */ 6 6 7 /dts-v1/; 7 /dts-v1/; 8 #include <dt-bindings/gpio/gpio.h> 8 #include <dt-bindings/gpio/gpio.h> 9 #include "mt6795.dtsi" 9 #include "mt6795.dtsi" 10 #include "mt6331.dtsi" << 11 10 12 / { 11 / { 13 model = "Sony Xperia M5"; 12 model = "Sony Xperia M5"; 14 compatible = "sony,xperia-m5", "mediat 13 compatible = "sony,xperia-m5", "mediatek,mt6795"; 15 chassis-type = "handset"; 14 chassis-type = "handset"; 16 15 17 aliases { 16 aliases { 18 mmc0 = &mmc0; 17 mmc0 = &mmc0; 19 mmc1 = &mmc1; 18 mmc1 = &mmc1; 20 mmc2 = &mmc2; << 21 serial0 = &uart0; 19 serial0 = &uart0; 22 serial1 = &uart1; 20 serial1 = &uart1; 23 }; 21 }; 24 22 25 backlight_lcd0: backlight { << 26 compatible = "led-backlight"; << 27 leds = <&disp_led_pwm>, <&pmic << 28 << 29 default-brightness-level = <30 << 30 }; << 31 << 32 led-controller-display { << 33 compatible = "pwm-leds"; << 34 << 35 disp_led_pwm: led-0 { << 36 label = "backlight-pwm << 37 pwms = <&pwm0 0 500000 << 38 max-brightness = <1024 << 39 }; << 40 }; << 41 << 42 memory@40000000 { 23 memory@40000000 { 43 device_type = "memory"; 24 device_type = "memory"; 44 reg = <0 0x40000000 0 0x1e8000 25 reg = <0 0x40000000 0 0x1e800000>; 45 }; 26 }; 46 27 47 reserved_memory: reserved-memory { 28 reserved_memory: reserved-memory { 48 #address-cells = <2>; 29 #address-cells = <2>; 49 #size-cells = <2>; 30 #size-cells = <2>; 50 ranges; 31 ranges; 51 32 52 /* 128 KiB reserved for ARM Tr 33 /* 128 KiB reserved for ARM Trusted Firmware (BL31) */ 53 bl31_secmon_reserved: secmon@4 34 bl31_secmon_reserved: secmon@43000000 { 54 reg = <0 0x43000000 0 35 reg = <0 0x43000000 0 0x30000>; 55 no-map; 36 no-map; 56 }; 37 }; 57 38 58 /* preloader and bootloader re 39 /* preloader and bootloader regions cannot be touched */ 59 preloader-region@44800000 { 40 preloader-region@44800000 { 60 reg = <0 0x44800000 0 41 reg = <0 0x44800000 0 0x100000>; 61 no-map; 42 no-map; 62 }; 43 }; 63 44 64 bootloader-region@46000000 { 45 bootloader-region@46000000 { 65 reg = <0 0x46000000 0 46 reg = <0 0x46000000 0 0x400000>; 66 no-map; 47 no-map; 67 }; 48 }; 68 }; 49 }; 69 << 70 vreg_disp_avdd: regulator-disp-avdd { << 71 compatible = "regulator-fixed" << 72 regulator-name = "disp_avdd"; << 73 regulator-min-microvolt = <500 << 74 regulator-max-microvolt = <500 << 75 gpio = <&pio 138 GPIO_ACTIVE_H << 76 enable-active-high; << 77 }; << 78 << 79 vreg_disp_avee: regulator-disp-avee { << 80 compatible = "regulator-fixed" << 81 regulator-name = "disp_avee"; << 82 regulator-min-microvolt = <500 << 83 regulator-max-microvolt = <500 << 84 gpio = <&pio 139 GPIO_ACTIVE_H << 85 enable-active-high; << 86 }; << 87 << 88 vreg_disp_vddh: regulator-disp-vddh { << 89 compatible = "regulator-fixed" << 90 regulator-name = "disp_vddh"; << 91 regulator-min-microvolt = <180 << 92 regulator-max-microvolt = <180 << 93 regulator-always-on; << 94 regulator-boot-on; << 95 }; << 96 }; << 97 << 98 &dsi0 { << 99 status = "okay"; << 100 #address-cells = <1>; << 101 #size-cells = <0>; << 102 << 103 panel: panel@0 { << 104 compatible = "sharp,ls060t1sx0 << 105 reg = <0>; << 106 avdd-supply = <&vreg_disp_avdd << 107 avee-supply = <&vreg_disp_avee << 108 vddi-supply = <&mt6331_vgp3_re << 109 vddh-supply = <&vreg_disp_vddh << 110 reset-gpios = <&pio 106 GPIO_A << 111 backlight = <&backlight_lcd0>; << 112 << 113 pinctrl-0 = <&disp_rst_pins>; << 114 pinctrl-names = "default"; << 115 << 116 port { << 117 panel_in: endpoint { << 118 remote-endpoin << 119 }; << 120 }; << 121 }; << 122 << 123 port { << 124 dsi0_out: endpoint { << 125 remote-endpoint = <&pa << 126 }; << 127 }; << 128 }; 50 }; 129 51 130 &fhctl { 52 &fhctl { 131 clocks = <&apmixedsys CLK_APMIXED_MAIN 53 clocks = <&apmixedsys CLK_APMIXED_MAINPLL>, <&apmixedsys CLK_APMIXED_MPLL>, 132 <&apmixedsys CLK_APMIXED_MSDC 54 <&apmixedsys CLK_APMIXED_MSDCPLL>; 133 mediatek,hopping-ssc-percent = <8>, <5 55 mediatek,hopping-ssc-percent = <8>, <5>, <8>; 134 status = "okay"; 56 status = "okay"; 135 }; 57 }; 136 58 137 &i2c0 { 59 &i2c0 { 138 pinctrl-names = "default"; 60 pinctrl-names = "default"; 139 pinctrl-0 = <&i2c0_pins>; 61 pinctrl-0 = <&i2c0_pins>; 140 status = "okay"; 62 status = "okay"; 141 }; 63 }; 142 64 143 &i2c1 { 65 &i2c1 { 144 pinctrl-names = "default"; 66 pinctrl-names = "default"; 145 pinctrl-0 = <&i2c1_pins>; 67 pinctrl-0 = <&i2c1_pins>; 146 status = "okay"; 68 status = "okay"; 147 69 148 accelerometer@10 { 70 accelerometer@10 { 149 compatible = "bosch,bma255"; 71 compatible = "bosch,bma255"; 150 reg = <0x10>; 72 reg = <0x10>; 151 pinctrl-names = "default"; 73 pinctrl-names = "default"; 152 pinctrl-0 = <&accel_pins>; 74 pinctrl-0 = <&accel_pins>; 153 }; 75 }; 154 76 155 magnetometer@12 { 77 magnetometer@12 { 156 compatible = "bosch,bmm150"; 78 compatible = "bosch,bmm150"; 157 reg = <0x12>; 79 reg = <0x12>; 158 }; 80 }; 159 }; 81 }; 160 82 161 &i2c2 { 83 &i2c2 { 162 pinctrl-names = "default"; 84 pinctrl-names = "default"; 163 pinctrl-0 = <&i2c2_pins>; 85 pinctrl-0 = <&i2c2_pins>; 164 status = "okay"; 86 status = "okay"; 165 87 166 touchscreen@20 { 88 touchscreen@20 { 167 compatible = "syna,rmi4-i2c"; 89 compatible = "syna,rmi4-i2c"; 168 reg = <0x20>; 90 reg = <0x20>; 169 #address-cells = <1>; 91 #address-cells = <1>; 170 #size-cells = <0>; 92 #size-cells = <0>; 171 interrupts-extended = <&pio 6 93 interrupts-extended = <&pio 6 IRQ_TYPE_EDGE_FALLING>; 172 pinctrl-names = "default"; 94 pinctrl-names = "default"; 173 pinctrl-0 = <&ts_pins>; 95 pinctrl-0 = <&ts_pins>; 174 syna,startup-delay-ms = <160>; 96 syna,startup-delay-ms = <160>; 175 syna,reset-delay-ms = <90>; 97 syna,reset-delay-ms = <90>; 176 98 177 rmi4-f01@1 { 99 rmi4-f01@1 { 178 reg = <0x1>; 100 reg = <0x1>; 179 syna,nosleep-mode = <1 101 syna,nosleep-mode = <1>; 180 }; 102 }; 181 103 182 rmi4-f12@12 { 104 rmi4-f12@12 { 183 reg = <0x12>; 105 reg = <0x12>; 184 syna,sensor-type = <1> 106 syna,sensor-type = <1>; 185 }; 107 }; 186 }; 108 }; 187 }; 109 }; 188 110 189 &i2c3 { 111 &i2c3 { 190 pinctrl-names = "default"; 112 pinctrl-names = "default"; 191 pinctrl-0 = <&i2c3_pins>; 113 pinctrl-0 = <&i2c3_pins>; 192 status = "okay"; 114 status = "okay"; 193 115 194 pn547: nfc@28 { 116 pn547: nfc@28 { 195 compatible = "nxp,pn544-i2c"; 117 compatible = "nxp,pn544-i2c"; 196 reg = <0x28>; 118 reg = <0x28>; 197 interrupts-extended = <&pio 3 119 interrupts-extended = <&pio 3 IRQ_TYPE_EDGE_RISING>; 198 pinctrl-names = "default"; 120 pinctrl-names = "default"; 199 pinctrl-0 = <&nfc_pins>; 121 pinctrl-0 = <&nfc_pins>; 200 enable-gpios = <&pio 149 GPIO_ 122 enable-gpios = <&pio 149 GPIO_ACTIVE_HIGH>; 201 firmware-gpios = <&pio 94 GPIO 123 firmware-gpios = <&pio 94 GPIO_ACTIVE_HIGH>; 202 }; 124 }; 203 125 204 proximity@48 { 126 proximity@48 { 205 compatible = "sensortek,stk331 127 compatible = "sensortek,stk3310"; 206 reg = <0x48>; 128 reg = <0x48>; 207 interrupts-extended = <&pio 8 129 interrupts-extended = <&pio 8 IRQ_TYPE_EDGE_FALLING>; 208 pinctrl-names = "default"; 130 pinctrl-names = "default"; 209 pinctrl-0 = <&proximity_pins>; 131 pinctrl-0 = <&proximity_pins>; 210 }; 132 }; 211 }; 133 }; 212 134 213 &mmc0 { << 214 /* eMMC controller */ << 215 mediatek,latch-ck = <0x14>; /* hs400 * << 216 mediatek,hs200-cmd-int-delay = <1>; << 217 mediatek,hs400-cmd-int-delay = <1>; << 218 mediatek,hs400-ds-dly3 = <0x1a>; << 219 non-removable; << 220 pinctrl-names = "default", "state_uhs" << 221 pinctrl-0 = <&mmc0_pins_default>; << 222 pinctrl-1 = <&mmc0_pins_uhs>; << 223 vmmc-supply = <&mt6331_vemc33_reg>; << 224 vqmmc-supply = <&mt6331_vio18_reg>; << 225 status = "okay"; << 226 }; << 227 << 228 &mmc1 { << 229 /* MicroSD card slot */ << 230 vmmc-supply = <&mt6331_vmc_reg>; << 231 vqmmc-supply = <&mt6331_vmch_reg>; << 232 status = "okay"; << 233 }; << 234 << 235 &mmc2 { << 236 /* SDIO WiFi on MMC2 */ << 237 vmmc-supply = <&mt6331_vmc_reg>; << 238 vqmmc-supply = <&mt6331_vmch_reg>; << 239 status = "okay"; << 240 }; << 241 << 242 &mt6331_vgp3_reg { << 243 regulator-min-microvolt = <1800000>; << 244 }; << 245 << 246 &pio { 135 &pio { 247 disp_rst_pins: lcm-pins { << 248 pins-rst { << 249 pinmux = <PINMUX_GPIO1 << 250 }; << 251 }; << 252 << 253 mmc0_pins_default: emmc-sdr-pins { << 254 pins-cmd-dat { << 255 pinmux = <PINMUX_GPIO1 << 256 <PINMUX_GPIO1 << 257 <PINMUX_GPIO1 << 258 <PINMUX_GPIO1 << 259 <PINMUX_GPIO1 << 260 <PINMUX_GPIO1 << 261 <PINMUX_GPIO1 << 262 <PINMUX_GPIO1 << 263 <PINMUX_GPIO1 << 264 input-enable; << 265 bias-pull-up = <MTK_PU << 266 }; << 267 << 268 pins-clk { << 269 pinmux = <PINMUX_GPIO1 << 270 bias-pull-down = <MTK_ << 271 }; << 272 << 273 pins-rst { << 274 pinmux = <PINMUX_GPIO1 << 275 bias-pull-up = <MTK_PU << 276 }; << 277 }; << 278 << 279 mmc0_pins_uhs: emmc-uhs-pins { << 280 pins-cmd-dat { << 281 pinmux = <PINMUX_GPIO1 << 282 <PINMUX_GPIO1 << 283 <PINMUX_GPIO1 << 284 <PINMUX_GPIO1 << 285 <PINMUX_GPIO1 << 286 <PINMUX_GPIO1 << 287 <PINMUX_GPIO1 << 288 <PINMUX_GPIO1 << 289 <PINMUX_GPIO1 << 290 input-enable; << 291 drive-strength = <6>; << 292 bias-pull-up = <MTK_PU << 293 }; << 294 << 295 pins-clk { << 296 pinmux = <PINMUX_GPIO1 << 297 drive-strength = <6>; << 298 bias-pull-down = <MTK_ << 299 }; << 300 << 301 pins-rst { << 302 pinmux = <PINMUX_GPIO1 << 303 drive-strength = <6>; << 304 bias-pull-up = <MTK_PU << 305 }; << 306 << 307 pins-ds { << 308 pinmux = <PINMUX_GPIO1 << 309 drive-strength = <6>; << 310 bias-pull-down = <MTK_ << 311 }; << 312 }; << 313 << 314 nfc_pins: nfc-pins { 136 nfc_pins: nfc-pins { 315 pins-irq { 137 pins-irq { 316 pinmux = <PINMUX_GPIO3 138 pinmux = <PINMUX_GPIO3__FUNC_GPIO3>; 317 bias-pull-down; 139 bias-pull-down; 318 input-enable; 140 input-enable; 319 }; 141 }; 320 142 321 pins-fw-ven { 143 pins-fw-ven { 322 pinmux = <PINMUX_GPIO9 144 pinmux = <PINMUX_GPIO94__FUNC_GPIO94>, 323 <PINMUX_GPIO1 145 <PINMUX_GPIO149__FUNC_GPIO149>; 324 }; 146 }; 325 }; 147 }; 326 148 327 ts_pins: touchscreen-pins { 149 ts_pins: touchscreen-pins { 328 pins-irq { 150 pins-irq { 329 pinmux = <PINMUX_GPIO6 151 pinmux = <PINMUX_GPIO6__FUNC_GPIO6>; 330 bias-pull-up; 152 bias-pull-up; 331 input-enable; 153 input-enable; 332 }; 154 }; 333 155 334 pins-rst { 156 pins-rst { 335 pinmux = <PINMUX_GPIO1 157 pinmux = <PINMUX_GPIO102__FUNC_GPIO102>; 336 output-high; 158 output-high; 337 }; 159 }; 338 }; 160 }; 339 161 340 proximity_pins: proximity-pins { 162 proximity_pins: proximity-pins { 341 pins-irq { 163 pins-irq { 342 pinmux = <PINMUX_GPIO8 164 pinmux = <PINMUX_GPIO8__FUNC_GPIO8>; 343 bias-pull-up; 165 bias-pull-up; 344 input-enable; 166 input-enable; 345 }; 167 }; 346 }; 168 }; 347 169 348 accel_pins: accelerometer-pins { 170 accel_pins: accelerometer-pins { 349 pins-irq { 171 pins-irq { 350 pinmux = <PINMUX_GPIO1 172 pinmux = <PINMUX_GPIO12__FUNC_GPIO12>; 351 bias-pull-up; 173 bias-pull-up; 352 input-enable; 174 input-enable; 353 }; 175 }; 354 }; 176 }; 355 177 356 i2c0_pins: i2c0-pins { 178 i2c0_pins: i2c0-pins { 357 pins-bus { 179 pins-bus { 358 pinmux = <PINMUX_GPIO4 180 pinmux = <PINMUX_GPIO45__FUNC_SDA0>, 359 <PINMUX_GPIO4 181 <PINMUX_GPIO46__FUNC_SCL0>; 360 input-enable; 182 input-enable; 361 }; 183 }; 362 }; 184 }; 363 185 364 i2c1_pins: i2c1-pins { 186 i2c1_pins: i2c1-pins { 365 pins-bus { 187 pins-bus { 366 pinmux = <PINMUX_GPIO1 188 pinmux = <PINMUX_GPIO125__FUNC_SDA1>, 367 <PINMUX_GPIO1 189 <PINMUX_GPIO126__FUNC_SCL1>; 368 bias-disable; 190 bias-disable; 369 }; 191 }; 370 }; 192 }; 371 193 372 i2c2_pins: i2c2-pins { 194 i2c2_pins: i2c2-pins { 373 pins-bus { 195 pins-bus { 374 pinmux = <PINMUX_GPIO4 196 pinmux = <PINMUX_GPIO43__FUNC_SDA2>, 375 <PINMUX_GPIO4 197 <PINMUX_GPIO44__FUNC_SCL2>; 376 bias-disable; 198 bias-disable; 377 }; 199 }; 378 }; 200 }; 379 201 380 i2c3_pins: i2c3-pins { 202 i2c3_pins: i2c3-pins { 381 pins-bus { 203 pins-bus { 382 pinmux = <PINMUX_GPIO1 204 pinmux = <PINMUX_GPIO136__FUNC_SDA3>, 383 <PINMUX_GPIO1 205 <PINMUX_GPIO137__FUNC_SCL3>; 384 bias-disable; 206 bias-disable; 385 }; 207 }; 386 }; 208 }; 387 209 388 i2c4_pins: i2c4-pins { 210 i2c4_pins: i2c4-pins { 389 pins-bus { 211 pins-bus { 390 pinmux = <PINMUX_GPIO1 212 pinmux = <PINMUX_GPIO100__FUNC_SDA4>, 391 <PINMUX_GPIO1 213 <PINMUX_GPIO101__FUNC_SCL4>; 392 bias-disable; 214 bias-disable; 393 }; 215 }; 394 }; 216 }; 395 217 396 uart0_pins: uart0-pins { 218 uart0_pins: uart0-pins { 397 pins-rx { 219 pins-rx { 398 pinmux = <PINMUX_GPIO1 220 pinmux = <PINMUX_GPIO113__FUNC_URXD0>; 399 bias-pull-up; 221 bias-pull-up; 400 input-enable; 222 input-enable; 401 }; 223 }; 402 pins-tx { 224 pins-tx { 403 pinmux = <PINMUX_GPIO1 225 pinmux = <PINMUX_GPIO114__FUNC_UTXD0>; 404 output-high; 226 output-high; 405 }; 227 }; 406 }; 228 }; 407 229 408 uart2_pins: uart2-pins { 230 uart2_pins: uart2-pins { 409 pins-rx { 231 pins-rx { 410 pinmux = <PINMUX_GPIO3 232 pinmux = <PINMUX_GPIO31__FUNC_URXD2>; 411 bias-pull-up; 233 bias-pull-up; 412 input-enable; 234 input-enable; 413 }; 235 }; 414 pins-tx { 236 pins-tx { 415 pinmux = <PINMUX_GPIO3 237 pinmux = <PINMUX_GPIO32__FUNC_UTXD2>; 416 }; 238 }; 417 }; 239 }; 418 }; << 419 << 420 &pmic { << 421 /* << 422 * Smartphones, including the Xperia M << 423 * MT6332 PMIC: when this is present, << 424 * an interrupt on the companion, so w << 425 */ << 426 interrupts = <GIC_SPI 160 IRQ_TYPE_LEV << 427 << 428 mt6332-led { << 429 compatible = "mediatek,mt6332- << 430 #address-cells = <1>; << 431 #size-cells = <0>; << 432 << 433 pmic_bl_led: led@0 { << 434 reg = <0>; << 435 label = "backlight-pmi << 436 }; << 437 }; << 438 }; << 439 << 440 &pwm0 { << 441 status = "okay"; << 442 }; 240 }; 443 241 444 &uart0 { 242 &uart0 { 445 status = "okay"; 243 status = "okay"; 446 244 447 pinctrl-names = "default"; 245 pinctrl-names = "default"; 448 pinctrl-0 = <&uart0_pins>; 246 pinctrl-0 = <&uart0_pins>; 449 }; 247 }; 450 248 451 &uart2 { 249 &uart2 { 452 status = "okay"; 250 status = "okay"; 453 251 454 pinctrl-names = "default"; 252 pinctrl-names = "default"; 455 pinctrl-0 = <&uart2_pins>; 253 pinctrl-0 = <&uart2_pins>; 456 }; 254 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.