arm64: dts: qcom: Introduce SDM660 Xiaomi Mi 8 Lite (platina)

Add support for the SDM660 Xiaomi Platina (Mi 8 Lite).

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
This commit is contained in:
AngeloGioacchino Del Regno 2021-08-05 15:34:21 +02:00 committed by Jami Kettunen
parent 1b3bf3b1ce
commit 534226dd92
2 changed files with 718 additions and 0 deletions

View file

@ -74,6 +74,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sdm630-sony-xperia-nile-pioneer.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm630-sony-xperia-nile-voyager.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm636-sony-xperia-ganges-mermaid.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm660-xiaomi-lavender.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm660-xiaomi-platina.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm845-cheza-r1.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm845-cheza-r2.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm845-cheza-r3.dtb

View file

@ -0,0 +1,717 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2021, AngeloGioacchino Del Regno
* <angelogioacchino.delregno@somainline.org>
*/
/dts-v1/;
#include "sdm660.dtsi"
#include "pm660.dtsi"
#include "pm660l.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/input/gpio-keys.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
/ {
model = "Xiaomi Mi 8 Lite";
compatible = "xiaomi,platina", "qcom,sdm660";
aliases {
serial0 = &blsp1_uart2;
};
chosen {
stdout-path = "serial0:115200n8";
};
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
ramoops@ffc00000 {
compatible = "ramoops";
reg = <0x0 0xffc00000 0x0 0x100000>;
record-size = <0x10000>;
console-size = <0x60000>;
ftrace-size = <0x10000>;
pmsg-size = <0x20000>;
ecc-size = <16>;
status = "okay";
};
debug_region@ffb00000 {
reg = <0x00 0xffb00000 0x00 0x100000>;
no-map;
};
cdsp-region@94e00000 {
reg = <0x00 0x94e00000 0x00 0x600000>;
no-map;
};
removed_region@85800000 {
reg = <0x00 0x85800000 0x00 0x3700000>;
no-map;
};
};
board_vbat: vbat-regulator {
compatible = "regulator-fixed";
regulator-name = "VBAT";
regulator-min-microvolt = <4000000>;
regulator-max-microvolt = <4000000>;
regulator-always-on;
regulator-boot-on;
};
cam_avdd_front_vreg: cam-avdd-front-vreg {
compatible = "regulator-fixed";
regulator-name = "cam-avdd-front-vreg";
regulator-min-microvolt = <3600000>;
regulator-max-microvolt = <3600000>;
startup-delay-us = <0>;
enable-active-high;
gpio = <&tlmm 49 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&cam_avdd_front_default>;
vin-supply = <&vreg_bob>;
};
cam_actuator_rear_vreg: cam-actuator-rear-vreg {
compatible = "regulator-fixed";
regulator-name = "cam-actuator-rear-vreg";
regulator-min-microvolt = <3600000>;
regulator-max-microvolt = <3600000>;
startup-delay-us = <0>;
enable-active-high;
gpio = <&tlmm 50 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&cam_actuator_rear_default>;
vin-supply = <&vreg_bob>;
};
cam_avdd_rear_vreg: cam-avdd-rear-vreg {
compatible = "regulator-fixed";
regulator-name = "cam-avdd-rear-vreg";
regulator-min-microvolt = <3600000>;
regulator-max-microvolt = <3600000>;
startup-delay-us = <0>;
enable-active-high;
gpio = <&tlmm 51 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&cam_avdd_rear_default>;
vin-supply = <&vreg_bob>;
};
cam_dvdd_front_vreg: cam-dvdd-front-vreg {
compatible = "regulator-fixed";
regulator-name = "cam-dvdd-front-vreg";
regulator-min-microvolt = <1350000>;
regulator-max-microvolt = <1350000>;
startup-delay-us = <0>;
enable-active-high;
gpio = <&pm660l_gpios 3 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&cam_dvdd_front_default>;
vin-supply = <&vreg_s5a_1p35>;
};
cam_dvdd_rear_vreg: cam-dvdd-rear-vreg {
compatible = "regulator-fixed";
regulator-name = "cam-dvdd-rear-vreg";
regulator-min-microvolt = <1350000>;
regulator-max-microvolt = <1350000>;
startup-delay-us = <0>;
enable-active-high;
gpio = <&pm660l_gpios 4 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&cam_dvdd_rear_default>;
vin-supply = <&vreg_s5a_1p35>;
};
disp_vdd_vreg: disp-vdd-vreg {
compatible = "regulator-fixed";
regulator-name = "display-vdd";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
regulator-boot-on;
};
ts_vdd_vreg: ts-vdd-vreg {
compatible = "regulator-fixed";
regulator-name = "ts-vdd";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
startup-delay-us = <4000>;
enable-active-high;
regulator-boot-on;
gpio = <&tlmm 73 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&ts_vdd_default>;
};
vph_pwr: vph-pwr-regulator {
compatible = "regulator-fixed";
regulator-name = "vph_pwr";
regulator-always-on;
regulator-boot-on;
};
gpio_keys {
status = "okay";
compatible = "gpio-keys";
input-name = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
vol_up {
label = "Volume Up";
gpios = <&pm660l_gpios 7 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
linux,code = <KEY_VOLUMEUP>;
wakeup-source;
debounce-interval = <15>;
};
};
gpio-hall-sensor {
compatible = "gpio-keys";
label = "Hall effect sensor";
pinctrl-names = "default";
pinctrl-0 = <&hall_sensor_default>;
hall-sensor {
label = "Hall Effect Sensor";
gpios = <&tlmm 75 GPIO_ACTIVE_LOW>;
linux,input-type = <EV_SW>;
linux,code = <SW_LID>;
linux,can-disable;
wakeup-source;
};
};
/*
* Until we hook up type-c detection, we
* have to stick with this. But it works.
*/
extcon_usb: extcon-usb {
compatible = "linux,extcon-usb-gpio";
id-gpio = <&tlmm 58 GPIO_ACTIVE_HIGH>;
};
};
&blsp_i2c2 {
status = "okay";
/*
* Two instances of SMB1355 charger: 0x8, 0xc but only
* one SMB1355 chip is present on board. What's the
* right address?
*/
};
&blsp1_uart2 {
status = "okay";
};
&rpm_requests {
pm660l-regulators {
compatible = "qcom,rpm-pm660l-regulators";
vdd_s1-supply = <&vph_pwr>;
vdd_s2-supply = <&vph_pwr>;
vdd_s3_s4-supply = <&vph_pwr>;
vdd_s5-supply = <&vph_pwr>;
vdd_s6-supply = <&vph_pwr>;
vdd_l1_l9_l10-supply = <&vreg_s2b_1p05>;
vdd_l2-supply = <&vreg_bob>;
vdd_l3_l5_l7_l8-supply = <&vreg_bob>;
vdd_l4_l6-supply = <&vreg_bob>;
vdd_bob-supply = <&vph_pwr>;
vreg_s1b_1p125: s1 {
regulator-min-microvolt = <1125000>;
regulator-max-microvolt = <1125000>;
regulator-enable-ramp-delay = <200>;
regulator-ramp-delay = <0>;
};
vreg_s2b_1p05: s2 {
regulator-min-microvolt = <1050000>;
regulator-max-microvolt = <1050000>;
regulator-enable-ramp-delay = <200>;
regulator-ramp-delay = <0>;
};
/*
* At least on Nile's configuration, S3B/S4B (VDD_CX) and
* S5B (VDD_MX) are managed only through RPM Power Domains.
* Trying to set a voltage on the main supply will create
* havoc and freeze the SoC.
* In any case, reference voltages for these regulators are:
* S3B/S4B: 0.870V
* S5B: 0.915V
*/
/* LDOs */
vreg_l1b_0p925: l1 {
regulator-min-microvolt = <920000>;
regulator-max-microvolt = <928000>;
regulator-enable-ramp-delay = <250>;
regulator-ramp-delay = <0>;
regulator-allow-set-load;
};
vreg_l2b_2p95: l2 {
/*
* This regulator supports 1.648 - 3.104V on this board
* but we set a max voltage of anything less than 2.7V
* to satisfy a condition in sdhci.c that will disable
* 3.3V SDHCI signaling, which happens to be not really
* supported on the Xperia Nile/Ganges platform.
*/
regulator-min-microvolt = <1648000>;
regulator-max-microvolt = <2696000>;
regulator-enable-ramp-delay = <250>;
regulator-ramp-delay = <0>;
regulator-allow-set-load;
};
vreg_l3b_3p3: l3 {
regulator-min-microvolt = <3296000>;
regulator-max-microvolt = <3312000>;
regulator-enable-ramp-delay = <250>;
regulator-ramp-delay = <0>;
regulator-min-microamp = <200>;
regulator-max-microamp = <600000>;
regulator-system-load = <100000>;
regulator-allow-set-load;
};
vreg_l4b_2p95: l4 {
regulator-min-microvolt = <2944000>;
regulator-max-microvolt = <2952000>;
regulator-enable-ramp-delay = <250>;
regulator-ramp-delay = <0>;
regulator-min-microamp = <200>;
regulator-max-microamp = <600000>;
regulator-system-load = <570000>;
regulator-allow-set-load;
};
/*
* Downstream specifies a range of 1721-3600mV,
* but the only assigned consumers are SDHCI2 VMMC
* and Coresight QPDI that both request pinned 2.95V.
* Tighten the range to 1.8-3.328 (closest to 3.3) to
* make the mmc driver happy.
*/
vreg_l5b_29p5: l5 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3328000>;
regulator-enable-ramp-delay = <250>;
regulator-ramp-delay = <0>;
regulator-allow-set-load;
regulator-system-load = <800000>;
};
vreg_l7b_3p125: l7 {
regulator-min-microvolt = <2704000>;
regulator-max-microvolt = <3128000>;
regulator-enable-ramp-delay = <250>;
regulator-ramp-delay = <0>;
};
vreg_l8b_3p3: l8 {
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <3400000>;
regulator-enable-ramp-delay = <250>;
regulator-ramp-delay = <0>;
};
/* L9B (870mV) is currently unused */
/* L10B (915mV) is currently unused */
vreg_bob: bob {
regulator-min-microvolt = <3304000>;
regulator-max-microvolt = <3624000>;
regulator-enable-ramp-delay = <500>;
regulator-ramp-delay = <0>;
};
};
pm660-regulators {
compatible = "qcom,rpm-pm660-regulators";
vdd_s1-supply = <&vph_pwr>;
vdd_s2-supply = <&vph_pwr>;
vdd_s3-supply = <&vph_pwr>;
vdd_s4-supply = <&vph_pwr>;
vdd_s5-supply = <&vph_pwr>;
vdd_s6-supply = <&vph_pwr>;
vdd_l1_l6_l7-supply = <&vreg_s5a_1p35>;
vdd_l2_l3-supply = <&vreg_s2b_1p05>;
vdd_l5-supply = <&vreg_s2b_1p05>;
vdd_l8_l9_l10_l11_l12_l13_l14-supply = <&vreg_s4a_2p04>;
vdd_l15_l16_l17_l18_l19-supply = <&vreg_bob>;
/*
* S1A (FTAPC0), S2A (FTAPC1), S3A (HFAPC1) are managed
* by the Core Power Reduction hardened (CPRh) and the
* Operating State Manager (OSM) HW automatically.
*/
vreg_s4a_2p04: s4 {
regulator-min-microvolt = <2040000>;
regulator-max-microvolt = <2040000>;
regulator-enable-ramp-delay = <200>;
regulator-ramp-delay = <0>;
regulator-always-on;
};
vreg_s5a_1p35: s5 {
regulator-min-microvolt = <1224000>;
regulator-max-microvolt = <1350000>;
regulator-enable-ramp-delay = <200>;
regulator-ramp-delay = <0>;
};
vreg_s6a_0p87: s6 {
regulator-min-microvolt = <504000>;
regulator-max-microvolt = <992000>;
regulator-enable-ramp-delay = <150>;
regulator-ramp-delay = <0>;
};
/* LDOs */
vreg_l1a_1p225: l1 {
regulator-min-microvolt = <1226000>;
regulator-max-microvolt = <1250000>;
regulator-enable-ramp-delay = <250>;
regulator-ramp-delay = <0>;
regulator-allow-set-load;
};
vreg_l2a_1p0: l2 {
regulator-min-microvolt = <944000>;
regulator-max-microvolt = <1008000>;
regulator-enable-ramp-delay = <250>;
regulator-ramp-delay = <0>;
};
vreg_l3a_1p0: l3 {
regulator-min-microvolt = <944000>;
regulator-max-microvolt = <1008000>;
regulator-enable-ramp-delay = <250>;
regulator-ramp-delay = <0>;
};
vreg_l5a_0p848: l5 {
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <952000>;
regulator-enable-ramp-delay = <250>;
regulator-ramp-delay = <0>;
};
vreg_l6a_1p3: l6 {
regulator-min-microvolt = <1304000>;
regulator-max-microvolt = <1368000>;
regulator-allow-set-load;
regulator-enable-ramp-delay = <250>;
regulator-ramp-delay = <0>;
};
vreg_l7a_1p2: l7 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-enable-ramp-delay = <250>;
regulator-ramp-delay = <0>;
};
vreg_l8a_1p8: l8 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-enable-ramp-delay = <250>;
regulator-ramp-delay = <0>;
regulator-system-load = <325000>;
regulator-allow-set-load;
};
vreg_l9a_1p8: l9 {
regulator-min-microvolt = <1804000>;
regulator-max-microvolt = <1896000>;
regulator-enable-ramp-delay = <250>;
regulator-ramp-delay = <0>;
regulator-allow-set-load;
};
vreg_l10a_1p8: l10 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1944000>;
regulator-enable-ramp-delay = <250>;
regulator-ramp-delay = <0>;
regulator-allow-set-load;
};
vreg_l11a_1p8: l11 {
regulator-min-microvolt = <1784000>;
regulator-max-microvolt = <1944000>;
regulator-enable-ramp-delay = <250>;
regulator-ramp-delay = <0>;
};
vreg_l12a_1p8: l12 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1944000>;
regulator-enable-ramp-delay = <250>;
regulator-ramp-delay = <0>;
};
vreg_l13a_1p8: l13 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1944000>;
regulator-enable-ramp-delay = <250>;
regulator-ramp-delay = <0>;
regulator-boot-on;
regulator-always-on;
};
vreg_l14a_1p8: l14 {
regulator-min-microvolt = <1710000>;
regulator-max-microvolt = <1952000>;
regulator-enable-ramp-delay = <250>;
regulator-ramp-delay = <0>;
};
vreg_l15a_1p8: l15 {
regulator-min-microvolt = <1648000>;
regulator-max-microvolt = <2952000>;
regulator-enable-ramp-delay = <250>;
regulator-ramp-delay = <0>;
};
/* DRX: QM13111 */
vreg_l16a_2p7: l16 {
regulator-min-microvolt = <2704000>;
regulator-max-microvolt = <2712000>;
regulator-enable-ramp-delay = <250>;
regulator-ramp-delay = <0>;
};
vreg_l17a_1p8: l17 {
regulator-min-microvolt = <1648000>;
regulator-max-microvolt = <2952000>;
regulator-enable-ramp-delay = <250>;
regulator-ramp-delay = <0>;
};
/* L18A (2.7V) is unused */
vreg_l19a_3p3: l19 {
regulator-min-microvolt = <3312000>;
regulator-max-microvolt = <3328000>;
regulator-enable-ramp-delay = <250>;
regulator-ramp-delay = <0>;
regulator-allow-set-load;
};
};
};
&sdhc_1 {
status = "okay";
supports-cqe;
mmc-ddr-1_8v;
mmc-hs400-1_8v;
mmc-hs400-enhanced-strobe;
vmmc-supply = <&vreg_l4b_2p95>;
vqmmc-supply = <&vreg_l8a_1p8>;
};
&sdhc_2 {
status = "disabled";
vmmc-supply = <&vreg_l5b_29p5>;
vqmmc-supply = <&vreg_l2b_2p95>;
};
&pm660_gpios {
nfc_clk_req_n: nfc-clkreq-n {
pins = "gpio4";
function = PMIC_GPIO_FUNC_NORMAL;
bias-disable;
input-enable;
power-source = <1>;
};
};
&pm660l_gpios {
cam_dvdd_front_default: cam-dvdd-front-default {
pins = "gpio3";
function = "normal";
output-low;
power-source = <0>;
};
cam_dvdd_rear_default: cam-dvdd-rear-default {
pins = "gpio4";
function = "normal";
output-low;
power-source = <0>;
};
vol_key_gpio_default: vol-key-gpio-default {
pins = "gpio7";
function = "normal";
bias-pull-up;
input-enable;
qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
};
};
&tlmm {
gpio-reserved-ranges = <8 4>;
camera_rear_default: camera-rear-default {
mclk0 {
pins = "gpio32";
function = "cam_mclk";
drive-strength = <4>;
bias-disable;
};
rst {
pins = "gpio46";
function = "gpio";
drive-strength = <16>;
bias-disable;
};
};
camera_front_default: camera-front-default {
mclk1 {
pins = "gpio33";
function = "cam_mclk";
drive-strength = <4>;
bias-disable;
};
rst {
pins = "gpio47";
function = "gpio";
drive-strength = <16>;
bias-disable;
};
};
camera_front_iris_default: camera-front-iris-default {
mclk1 {
pins = "gpio35";
function = "cam_mclk";
drive-strength = <4>;
bias-disable;
};
rst {
pins = "gpio52";
function = "gpio";
drive-strength = <16>;
bias-disable;
};
};
cam_avdd_front_default: cam-avdd-front-default {
pins = "gpio49";
function = "gpio";
bias-disable;
drive-strength = <2>;
};
cam_actuator_rear_default: cam-actuator-rear-default {
pins = "gpio50";
function = "gpio";
bias-disable;
drive-strength = <2>;
};
cam_avdd_rear_default: cam-avdd-rear-default {
pins = "gpio51";
function = "gpio";
bias-disable;
drive-strength = <2>;
};
panel_reset_n: panel-rst-n {
pins = "gpio53";
function = "gpio";
drive-strength = <8>;
bias-disable;
};
mdp_vsync_n: mdp-vsync-n {
pins = "gpio59";
function = "mdp_vsync";
drive-strength = <2>;
bias-pull-down;
};
ts_rst_n: ts-rst-n {
pins = "gpio66";
function = "gpio";
bias-disable;
drive-strength = <8>;
};
ts_int_active: ts-int-active {
pins = "gpio67";
drive-strength = <16>;
bias-pull-up;
};
ts_vdd_default: ts-vdd-default {
pins = "gpio73";
function = "gpio";
bias-disable;
drive-strength = <8>;
};
hall_sensor_default: hall-sensor-default {
pins = "gpio75";
function = "gpio";
drive-strength = <2>;
bias-disable;
input-enable;
};
};
&usb3 {
status = "okay";
};
&usb3_dwc3 {
dr_mode = "peripheral";
extcon = <&extcon_usb>;
};