1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2022, Collabora Ltd
4 * Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
8 #include <dt-bindings/gpio/gpio.h>
10 #include "mt6331.dtsi"
13 model = "Sony Xperia M5";
14 compatible = "sony,xperia-m5", "mediatek,mt6795";
15 chassis-type = "handset";
25 backlight_lcd0: backlight {
26 compatible = "led-backlight";
27 leds = <&disp_led_pwm>, <&pmic_bl_led>;
29 default-brightness-level = <300>;
32 led-controller-display {
33 compatible = "pwm-leds";
36 label = "backlight-pwm";
37 pwms = <&pwm0 0 500000>;
38 max-brightness = <1024>;
43 device_type = "memory";
44 reg = <0 0x40000000 0 0x1e800000>;
47 reserved_memory: reserved-memory {
52 /* 128 KiB reserved for ARM Trusted Firmware (BL31) */
53 bl31_secmon_reserved: secmon@43000000 {
54 reg = <0 0x43000000 0 0x30000>;
58 /* preloader and bootloader regions cannot be touched */
59 preloader-region@44800000 {
60 reg = <0 0x44800000 0 0x100000>;
64 bootloader-region@46000000 {
65 reg = <0 0x46000000 0 0x400000>;
70 vreg_disp_avdd: regulator-disp-avdd {
71 compatible = "regulator-fixed";
72 regulator-name = "disp_avdd";
73 regulator-min-microvolt = <5000000>;
74 regulator-max-microvolt = <5000000>;
75 gpio = <&pio 138 GPIO_ACTIVE_HIGH>;
79 vreg_disp_avee: regulator-disp-avee {
80 compatible = "regulator-fixed";
81 regulator-name = "disp_avee";
82 regulator-min-microvolt = <5000000>;
83 regulator-max-microvolt = <5000000>;
84 gpio = <&pio 139 GPIO_ACTIVE_HIGH>;
88 vreg_disp_vddh: regulator-disp-vddh {
89 compatible = "regulator-fixed";
90 regulator-name = "disp_vddh";
91 regulator-min-microvolt = <1800000>;
92 regulator-max-microvolt = <1800000>;
100 #address-cells = <1>;
104 compatible = "sharp,ls060t1sx01";
106 avdd-supply = <&vreg_disp_avdd>;
107 avee-supply = <&vreg_disp_avee>;
108 vddi-supply = <&mt6331_vgp3_reg>;
109 vddh-supply = <&vreg_disp_vddh>;
110 reset-gpios = <&pio 106 GPIO_ACTIVE_LOW>;
111 backlight = <&backlight_lcd0>;
113 pinctrl-0 = <&disp_rst_pins>;
114 pinctrl-names = "default";
118 remote-endpoint = <&dsi0_out>;
125 remote-endpoint = <&panel_in>;
131 clocks = <&apmixedsys CLK_APMIXED_MAINPLL>, <&apmixedsys CLK_APMIXED_MPLL>,
132 <&apmixedsys CLK_APMIXED_MSDCPLL>;
133 mediatek,hopping-ssc-percent = <8>, <5>, <8>;
138 pinctrl-names = "default";
139 pinctrl-0 = <&i2c0_pins>;
144 pinctrl-names = "default";
145 pinctrl-0 = <&i2c1_pins>;
149 compatible = "bosch,bma255";
151 pinctrl-names = "default";
152 pinctrl-0 = <&accel_pins>;
156 compatible = "bosch,bmm150";
162 pinctrl-names = "default";
163 pinctrl-0 = <&i2c2_pins>;
167 compatible = "syna,rmi4-i2c";
169 #address-cells = <1>;
171 interrupts-extended = <&pio 6 IRQ_TYPE_EDGE_FALLING>;
172 pinctrl-names = "default";
173 pinctrl-0 = <&ts_pins>;
174 syna,startup-delay-ms = <160>;
175 syna,reset-delay-ms = <90>;
179 syna,nosleep-mode = <1>;
184 syna,sensor-type = <1>;
190 pinctrl-names = "default";
191 pinctrl-0 = <&i2c3_pins>;
195 compatible = "nxp,pn544-i2c";
197 interrupts-extended = <&pio 3 IRQ_TYPE_EDGE_RISING>;
198 pinctrl-names = "default";
199 pinctrl-0 = <&nfc_pins>;
200 enable-gpios = <&pio 149 GPIO_ACTIVE_HIGH>;
201 firmware-gpios = <&pio 94 GPIO_ACTIVE_HIGH>;
205 compatible = "sensortek,stk3310";
207 interrupts-extended = <&pio 8 IRQ_TYPE_EDGE_FALLING>;
208 pinctrl-names = "default";
209 pinctrl-0 = <&proximity_pins>;
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>;
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>;
229 /* MicroSD card slot */
230 vmmc-supply = <&mt6331_vmc_reg>;
231 vqmmc-supply = <&mt6331_vmch_reg>;
236 /* SDIO WiFi on MMC2 */
237 vmmc-supply = <&mt6331_vmc_reg>;
238 vqmmc-supply = <&mt6331_vmch_reg>;
243 regulator-min-microvolt = <1800000>;
247 disp_rst_pins: lcm-pins {
249 pinmux = <PINMUX_GPIO106__FUNC_GPIO106>;
253 mmc0_pins_default: emmc-sdr-pins {
255 pinmux = <PINMUX_GPIO154__FUNC_MSDC0_DAT0>,
256 <PINMUX_GPIO155__FUNC_MSDC0_DAT1>,
257 <PINMUX_GPIO156__FUNC_MSDC0_DAT2>,
258 <PINMUX_GPIO157__FUNC_MSDC0_DAT3>,
259 <PINMUX_GPIO158__FUNC_MSDC0_DAT4>,
260 <PINMUX_GPIO159__FUNC_MSDC0_DAT5>,
261 <PINMUX_GPIO160__FUNC_MSDC0_DAT6>,
262 <PINMUX_GPIO161__FUNC_MSDC0_DAT7>,
263 <PINMUX_GPIO162__FUNC_MSDC0_CMD>;
265 bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
269 pinmux = <PINMUX_GPIO163__FUNC_MSDC0_CLK>;
270 bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
274 pinmux = <PINMUX_GPIO165__FUNC_MSDC0_RSTB>;
275 bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
279 mmc0_pins_uhs: emmc-uhs-pins {
281 pinmux = <PINMUX_GPIO154__FUNC_MSDC0_DAT0>,
282 <PINMUX_GPIO155__FUNC_MSDC0_DAT1>,
283 <PINMUX_GPIO156__FUNC_MSDC0_DAT2>,
284 <PINMUX_GPIO157__FUNC_MSDC0_DAT3>,
285 <PINMUX_GPIO158__FUNC_MSDC0_DAT4>,
286 <PINMUX_GPIO159__FUNC_MSDC0_DAT5>,
287 <PINMUX_GPIO160__FUNC_MSDC0_DAT6>,
288 <PINMUX_GPIO161__FUNC_MSDC0_DAT7>,
289 <PINMUX_GPIO162__FUNC_MSDC0_CMD>;
291 drive-strength = <MTK_DRIVE_6mA>;
292 bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
296 pinmux = <PINMUX_GPIO163__FUNC_MSDC0_CLK>;
297 drive-strength = <MTK_DRIVE_6mA>;
298 bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
302 pinmux = <PINMUX_GPIO165__FUNC_MSDC0_RSTB>;
303 drive-strength = <MTK_DRIVE_6mA>;
304 bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
308 pinmux = <PINMUX_GPIO164__FUNC_MSDC0_DSL>;
309 drive-strength = <MTK_DRIVE_6mA>;
310 bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
316 pinmux = <PINMUX_GPIO3__FUNC_GPIO3>;
322 pinmux = <PINMUX_GPIO94__FUNC_GPIO94>,
323 <PINMUX_GPIO149__FUNC_GPIO149>;
327 ts_pins: touchscreen-pins {
329 pinmux = <PINMUX_GPIO6__FUNC_GPIO6>;
335 pinmux = <PINMUX_GPIO102__FUNC_GPIO102>;
340 proximity_pins: proximity-pins {
342 pinmux = <PINMUX_GPIO8__FUNC_GPIO8>;
348 accel_pins: accelerometer-pins {
350 pinmux = <PINMUX_GPIO12__FUNC_GPIO12>;
356 i2c0_pins: i2c0-pins {
358 pinmux = <PINMUX_GPIO45__FUNC_SDA0>,
359 <PINMUX_GPIO46__FUNC_SCL0>;
364 i2c1_pins: i2c1-pins {
366 pinmux = <PINMUX_GPIO125__FUNC_SDA1>,
367 <PINMUX_GPIO126__FUNC_SCL1>;
372 i2c2_pins: i2c2-pins {
374 pinmux = <PINMUX_GPIO43__FUNC_SDA2>,
375 <PINMUX_GPIO44__FUNC_SCL2>;
380 i2c3_pins: i2c3-pins {
382 pinmux = <PINMUX_GPIO136__FUNC_SDA3>,
383 <PINMUX_GPIO137__FUNC_SCL3>;
388 i2c4_pins: i2c4-pins {
390 pinmux = <PINMUX_GPIO100__FUNC_SDA4>,
391 <PINMUX_GPIO101__FUNC_SCL4>;
396 uart0_pins: uart0-pins {
398 pinmux = <PINMUX_GPIO113__FUNC_URXD0>;
403 pinmux = <PINMUX_GPIO114__FUNC_UTXD0>;
408 uart2_pins: uart2-pins {
410 pinmux = <PINMUX_GPIO31__FUNC_URXD2>;
415 pinmux = <PINMUX_GPIO32__FUNC_UTXD2>;
422 * Smartphones, including the Xperia M5, are equipped with a companion
423 * MT6332 PMIC: when this is present, the main MT6331 PMIC will fire
424 * an interrupt on the companion, so we use the MT6332 IRQ GPIO.
426 interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>;
429 compatible = "mediatek,mt6332-led";
430 #address-cells = <1>;
435 label = "backlight-pmic";
447 pinctrl-names = "default";
448 pinctrl-0 = <&uart0_pins>;
454 pinctrl-names = "default";
455 pinctrl-0 = <&uart2_pins>;