// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2022, Collabora Ltd * Author: AngeloGioacchino Del Regno */ /dts-v1/; #include #include "mt6795.dtsi" #include "mt6331.dtsi" / { model = "Sony Xperia M5"; compatible = "sony,xperia-m5", "mediatek,mt6795"; chassis-type = "handset"; aliases { mmc0 = &mmc0; mmc1 = &mmc1; mmc2 = &mmc2; serial0 = &uart0; serial1 = &uart1; }; backlight_lcd0: backlight { compatible = "led-backlight"; leds = <&disp_led_pwm>, <&pmic_bl_led>; default-brightness-level = <300>; }; led-controller-display { compatible = "pwm-leds"; disp_led_pwm: led-0 { label = "backlight-pwm"; pwms = <&pwm0 0 500000>; max-brightness = <1024>; }; }; memory@40000000 { device_type = "memory"; reg = <0 0x40000000 0 0x1e800000>; }; reserved_memory: reserved-memory { #address-cells = <2>; #size-cells = <2>; ranges; /* 128 KiB reserved for ARM Trusted Firmware (BL31) */ bl31_secmon_reserved: secmon@43000000 { reg = <0 0x43000000 0 0x30000>; no-map; }; /* preloader and bootloader regions cannot be touched */ preloader-region@44800000 { reg = <0 0x44800000 0 0x100000>; no-map; }; bootloader-region@46000000 { reg = <0 0x46000000 0 0x400000>; no-map; }; }; vreg_disp_avdd: regulator-disp-avdd { compatible = "regulator-fixed"; regulator-name = "disp_avdd"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; gpio = <&pio 138 GPIO_ACTIVE_HIGH>; enable-active-high; }; vreg_disp_avee: regulator-disp-avee { compatible = "regulator-fixed"; regulator-name = "disp_avee"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; gpio = <&pio 139 GPIO_ACTIVE_HIGH>; enable-active-high; }; vreg_disp_vddh: regulator-disp-vddh { compatible = "regulator-fixed"; regulator-name = "disp_vddh"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-always-on; regulator-boot-on; }; }; &dsi0 { status = "okay"; #address-cells = <1>; #size-cells = <0>; panel: panel@0 { compatible = "sharp,ls060t1sx01"; reg = <0>; avdd-supply = <&vreg_disp_avdd>; avee-supply = <&vreg_disp_avee>; vddi-supply = <&mt6331_vgp3_reg>; vddh-supply = <&vreg_disp_vddh>; reset-gpios = <&pio 106 GPIO_ACTIVE_LOW>; backlight = <&backlight_lcd0>; pinctrl-0 = <&disp_rst_pins>; pinctrl-names = "default"; port { panel_in: endpoint { remote-endpoint = <&dsi0_out>; }; }; }; port { dsi0_out: endpoint { remote-endpoint = <&panel_in>; }; }; }; &fhctl { clocks = <&apmixedsys CLK_APMIXED_MAINPLL>, <&apmixedsys CLK_APMIXED_MPLL>, <&apmixedsys CLK_APMIXED_MSDCPLL>; mediatek,hopping-ssc-percent = <8>, <5>, <8>; status = "okay"; }; &i2c0 { pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins>; status = "okay"; }; &i2c1 { pinctrl-names = "default"; pinctrl-0 = <&i2c1_pins>; status = "okay"; accelerometer@10 { compatible = "bosch,bma255"; reg = <0x10>; pinctrl-names = "default"; pinctrl-0 = <&accel_pins>; }; magnetometer@12 { compatible = "bosch,bmm150"; reg = <0x12>; }; }; &i2c2 { pinctrl-names = "default"; pinctrl-0 = <&i2c2_pins>; status = "okay"; touchscreen@20 { compatible = "syna,rmi4-i2c"; reg = <0x20>; #address-cells = <1>; #size-cells = <0>; interrupts-extended = <&pio 6 IRQ_TYPE_EDGE_FALLING>; pinctrl-names = "default"; pinctrl-0 = <&ts_pins>; syna,startup-delay-ms = <160>; syna,reset-delay-ms = <90>; rmi4-f01@1 { reg = <0x1>; syna,nosleep-mode = <1>; }; rmi4-f12@12 { reg = <0x12>; syna,sensor-type = <1>; }; }; }; &i2c3 { pinctrl-names = "default"; pinctrl-0 = <&i2c3_pins>; status = "okay"; pn547: nfc@28 { compatible = "nxp,pn544-i2c"; reg = <0x28>; interrupts-extended = <&pio 3 IRQ_TYPE_EDGE_RISING>; pinctrl-names = "default"; pinctrl-0 = <&nfc_pins>; enable-gpios = <&pio 149 GPIO_ACTIVE_HIGH>; firmware-gpios = <&pio 94 GPIO_ACTIVE_HIGH>; }; proximity@48 { compatible = "sensortek,stk3310"; reg = <0x48>; interrupts-extended = <&pio 8 IRQ_TYPE_EDGE_FALLING>; pinctrl-names = "default"; pinctrl-0 = <&proximity_pins>; }; }; &mmc0 { /* eMMC controller */ mediatek,latch-ck = <0x14>; /* hs400 */ mediatek,hs200-cmd-int-delay = <1>; mediatek,hs400-cmd-int-delay = <1>; mediatek,hs400-ds-dly3 = <0x1a>; non-removable; pinctrl-names = "default", "state_uhs"; pinctrl-0 = <&mmc0_pins_default>; pinctrl-1 = <&mmc0_pins_uhs>; vmmc-supply = <&mt6331_vemc33_reg>; vqmmc-supply = <&mt6331_vio18_reg>; status = "okay"; }; &mmc1 { /* MicroSD card slot */ vmmc-supply = <&mt6331_vmc_reg>; vqmmc-supply = <&mt6331_vmch_reg>; status = "okay"; }; &mmc2 { /* SDIO WiFi on MMC2 */ vmmc-supply = <&mt6331_vmc_reg>; vqmmc-supply = <&mt6331_vmch_reg>; status = "okay"; }; &mt6331_vgp3_reg { regulator-min-microvolt = <1800000>; }; &pio { disp_rst_pins: lcm-pins { pins-rst { pinmux = ; }; }; mmc0_pins_default: emmc-sdr-pins { pins-cmd-dat { pinmux = , , , , , , , , ; input-enable; bias-pull-up = ; }; pins-clk { pinmux = ; bias-pull-down = ; }; pins-rst { pinmux = ; bias-pull-up = ; }; }; mmc0_pins_uhs: emmc-uhs-pins { pins-cmd-dat { pinmux = , , , , , , , , ; input-enable; drive-strength = <6>; bias-pull-up = ; }; pins-clk { pinmux = ; drive-strength = <6>; bias-pull-down = ; }; pins-rst { pinmux = ; drive-strength = <6>; bias-pull-up = ; }; pins-ds { pinmux = ; drive-strength = <6>; bias-pull-down = ; }; }; nfc_pins: nfc-pins { pins-irq { pinmux = ; bias-pull-down; input-enable; }; pins-fw-ven { pinmux = , ; }; }; ts_pins: touchscreen-pins { pins-irq { pinmux = ; bias-pull-up; input-enable; }; pins-rst { pinmux = ; output-high; }; }; proximity_pins: proximity-pins { pins-irq { pinmux = ; bias-pull-up; input-enable; }; }; accel_pins: accelerometer-pins { pins-irq { pinmux = ; bias-pull-up; input-enable; }; }; i2c0_pins: i2c0-pins { pins-bus { pinmux = , ; input-enable; }; }; i2c1_pins: i2c1-pins { pins-bus { pinmux = , ; bias-disable; }; }; i2c2_pins: i2c2-pins { pins-bus { pinmux = , ; bias-disable; }; }; i2c3_pins: i2c3-pins { pins-bus { pinmux = , ; bias-disable; }; }; i2c4_pins: i2c4-pins { pins-bus { pinmux = , ; bias-disable; }; }; uart0_pins: uart0-pins { pins-rx { pinmux = ; bias-pull-up; input-enable; }; pins-tx { pinmux = ; output-high; }; }; uart2_pins: uart2-pins { pins-rx { pinmux = ; bias-pull-up; input-enable; }; pins-tx { pinmux = ; }; }; }; &pmic { /* * Smartphones, including the Xperia M5, are equipped with a companion * MT6332 PMIC: when this is present, the main MT6331 PMIC will fire * an interrupt on the companion, so we use the MT6332 IRQ GPIO. */ interrupts = ; mt6332-led { compatible = "mediatek,mt6332-led"; #address-cells = <1>; #size-cells = <0>; pmic_bl_led: led@0 { reg = <0>; label = "backlight-pmic"; }; }; }; &pwm0 { status = "okay"; }; &uart0 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&uart0_pins>; }; &uart2 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&uart2_pins>; };