Update device tree

This commit is contained in:
Not extraordinary 2020-08-10 12:56:41 +08:00 committed by BigfootACA
parent 0dc6f5bb62
commit 777ef3f6d5
16 changed files with 34072 additions and 107 deletions

26578
device_specific/enchilada.dts Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,32 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/* Copyright 2018 Google LLC. */
#include <dt-bindings/spmi/spmi.h>
#include <dt-bindings/interrupt-controller/irq.h>
&spmi_bus {
pm8005_lsid0: pmic@4 {
compatible = "qcom,pm8005", "qcom,spmi-pmic";
reg = <0x4 SPMI_USID>;
#address-cells = <1>;
#size-cells = <0>;
pm8005_gpio: gpios@c000 {
compatible = "qcom,pm8005-gpio", "qcom,spmi-gpio";
reg = <0xc000>;
gpio-controller;
gpio-ranges = <&pm8005_gpio 0 0 4>;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};
};
pm8005_lsid1: pmic@5 {
compatible = "qcom,pm8005", "qcom,spmi-pmic";
reg = <0x5 SPMI_USID>;
#address-cells = <1>;
#size-cells = <0>;
};
};

View File

@ -0,0 +1,112 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/* Copyright 2018 Google LLC. */
#include <dt-bindings/iio/qcom,spmi-vadc.h>
#include <dt-bindings/input/linux-event-codes.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/spmi/spmi.h>
#include <dt-bindings/thermal/thermal.h>
/ {
thermal-zones {
pm8998 {
polling-delay-passive = <250>;
polling-delay = <1000>;
thermal-sensors = <&pm8998_temp>;
trips {
pm8998_alert0: pm8998-alert0 {
temperature = <105000>;
hysteresis = <2000>;
type = "passive";
};
pm8998_crit: pm8998-crit {
temperature = <125000>;
hysteresis = <2000>;
type = "critical";
};
};
};
};
};
&spmi_bus {
pm8998_lsid0: pmic@0 {
compatible = "qcom,pm8998", "qcom,spmi-pmic";
reg = <0x0 SPMI_USID>;
#address-cells = <1>;
#size-cells = <0>;
pm8998_pon: pon@800 {
compatible = "qcom,pm8998-pon";
reg = <0x800>;
mode-bootloader = <0x2>;
mode-recovery = <0x1>;
pm8998_pwrkey: pwrkey {
compatible = "qcom,pm8941-pwrkey";
interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
debounce = <15625>;
bias-pull-up;
linux,code = <KEY_POWER>;
};
};
pm8998_temp: temp-alarm@2400 {
compatible = "qcom,spmi-temp-alarm";
reg = <0x2400>;
interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
io-channels = <&pm8998_adc ADC5_DIE_TEMP>;
io-channel-names = "thermal";
#thermal-sensor-cells = <0>;
};
pm8998_coincell: coincell@2800 {
compatible = "qcom,pm8941-coincell";
reg = <0x2800>;
status = "disabled";
};
pm8998_adc: adc@3100 {
compatible = "qcom,spmi-adc-rev2";
reg = <0x3100>;
interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
#address-cells = <1>;
#size-cells = <0>;
#io-channel-cells = <1>;
adc-chan@6 {
reg = <ADC5_DIE_TEMP>;
label = "die_temp";
};
};
rtc@6000 {
compatible = "qcom,pm8941-rtc";
reg = <0x6000>, <0x6100>;
reg-names = "rtc", "alarm";
interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
};
pm8998_gpio: gpios@c000 {
compatible = "qcom,pm8998-gpio", "qcom,spmi-gpio";
reg = <0xc000>;
gpio-controller;
gpio-ranges = <&pm8998_gpio 0 0 26>;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};
};
pm8998_lsid1: pmic@1 {
compatible = "qcom,pm8998", "qcom,spmi-pmic";
reg = <0x1 SPMI_USID>;
#address-cells = <1>;
#size-cells = <0>;
};
};

View File

@ -0,0 +1,117 @@
// SPDX-License-Identifier: GPL-2.0
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/spmi/spmi.h>
&spmi_bus {
pmi8998_lsid0: pmic@2 {
compatible = "qcom,pmi8998", "qcom,spmi-pmic";
reg = <0x2 SPMI_USID>;
#address-cells = <1>;
#size-cells = <0>;
pmi8998_gpio: gpios@c000 {
compatible = "qcom,pmi8998-gpio", "qcom,spmi-gpio";
reg = <0xc000>;
gpio-controller;
gpio-ranges = <&pmi8998_gpio 0 0 14>;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
interrupts = <0x2 0xc0 0 IRQ_TYPE_NONE>,
<0x2 0xc1 0 IRQ_TYPE_NONE>,
<0x2 0xc2 0 IRQ_TYPE_NONE>,
<0x2 0xc4 0 IRQ_TYPE_NONE>,
<0x2 0xc5 0 IRQ_TYPE_NONE>,
<0x2 0xc7 0 IRQ_TYPE_NONE>,
<0x2 0xc8 0 IRQ_TYPE_NONE>,
<0x2 0xc9 0 IRQ_TYPE_NONE>,
<0x2 0xca 0 IRQ_TYPE_NONE>,
<0x2 0xcb 0 IRQ_TYPE_NONE>,
<0x2 0xcd 0 IRQ_TYPE_NONE>;
interrupt-names = "pmi8998_gpio1", "pmi8998_gpio2",
"pmi8998_gpio3", "pmi8998_gpio5",
"pmi8998_gpio6", "pmi8998_gpio8",
"pmi8998_gpio9", "pmi8998_gpio10",
"pmi8998_gpio11", "pmi8998_gpio12",
"pmi8998_gpio14";
qcom,gpios-disallowed = <4 7 13>;
// usb2_ext_5v_boost:usb2_ext_5v_boost_default {
// output-low;
// pins = "gpio10";
// function = "normal";
// power-source = <0x0>;
// };
// usb2_id_det:usb2_id_det_default {
// pins = "gpio9";
// function = "normal";
// power-source = <0x0>;
// input-enable;
// bias-pull-up;
// };
// usb2_vbus_det:usb2_vbus_det_default {
// pins = "gpio8";
// function = "normal";
// bias-pull-down;
// power-source = <0x1>;
// input-enable;
// };
// usb2_vbus_boost:usb2_vbus_boost_default {
// output-low;
// pins = "gpio2";
// function = "normal";
// power-source = <0x0>;
// };
};
};
pmi8998_lsid1: pmic@3 {
compatible = "qcom,pmi8998", "qcom,spmi-pmic";
reg = <0x3 SPMI_USID>;
#address-cells = <1>;
#size-cells = <0>;
lpg {
compatible = "qcom,pmi8998-lpg";
status = "disabled";
};
labibb {
compatible = "qcom,pmi8998-lab-ibb";
ibb: ibb {
regulator-always-on;
interrupts = <0x3 0xdc 0x2 IRQ_TYPE_EDGE_RISING>;
};
lab: lab {
regulator-always-on;
interrupts = <0x3 0xde 0x0 IRQ_TYPE_EDGE_RISING>;
};
};
pmi8998_wled: qcom,leds@d800 {
compatible = "qcom,pmi8998-wled";
reg = <0xd800 0xd900>;
interrupts = <0x3 0xd8 0x1 IRQ_TYPE_EDGE_RISING>,
<0x3 0xd8 0x2 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "ovp-irq", "sc-irq";
label = "backlight";
qcom,switching-freq = <800>;
qcom,ovp-millivolt = <29600>;
qcom,current-boost-limit = <970>;
qcom,current-limit-microamp = <25000>;
qcom,num-strings = <4>;
qcom,enabled-strings = <0 1 2 3>;
qcom,qcom,external-pfet;
status = "disabled";
};
};
};

Binary file not shown.

View File

@ -0,0 +1,697 @@
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include "sdm845.dtsi"
#include "pm8998.dtsi"
#include "pmi8998.dtsi"
/ {
model = "Xiaomi Technologies, Inc. Beryllium";
compatible = "qcom,sdm845";
/* required for bootloader to select correct board */
qcom,board-id = <69 0>;
qcom,msm-id = <321 0x20001>;
aliases {
hsuart0 = &uart6;
display0 = &framebuffer0;
};
chosen {
#address-cells = <2>;
#size-cells = <2>;
ranges;
// For simplefb hack
stdout-path = "display0";
/* hack: use framebuffer setup by bootloader.
* the address is taken from the bootloader config (strings xbl.img | grep "Display Reserved")
* it's wrong (it's closer to 0x9d500000, so the top is cut off), but I spent an hour
* trying to find the right address and give up. It's just a temp hack anyways.
*/
framebuffer0: framebuffer@9d400000 {
compatible = "simple-framebuffer";
reg = <0 0x9D400000 0 0x02400000>;
width = <1080>;
height = <2246>;
stride = <(1080 * 4)>;
format = "a8r8g8b8";
status = "okay";
};
};
dc12v: dc12v-regulator {
compatible = "regulator-fixed";
regulator-name = "DC12V";
regulator-min-microvolt = <12000000>;
regulator-max-microvolt = <12000000>;
regulator-always-on;
};
gpio_keys {
compatible = "gpio-keys";
autorepeat;
pinctrl-names = "default";
pinctrl-0 = <&vol_up_pin_a>;
vol-up {
label = "Volume Up";
linux,code = <KEY_VOLUMEUP>;
gpios = <&pm8998_gpio 6 GPIO_ACTIVE_LOW>;
};
};
vbat: vbat-regulator {
compatible = "regulator-fixed";
regulator-name = "VBAT";
vin-supply = <&dc12v>;
regulator-min-microvolt = <4200000>;
regulator-max-microvolt = <4200000>;
regulator-always-on;
};
vbat_som: vbat-som-regulator {
compatible = "regulator-fixed";
regulator-name = "VBAT_SOM";
vin-supply = <&dc12v>;
regulator-min-microvolt = <4200000>;
regulator-max-microvolt = <4200000>;
regulator-always-on;
};
vdc_3v3: vdc-3v3-regulator {
compatible = "regulator-fixed";
regulator-name = "VDC_3V3";
vin-supply = <&dc12v>;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
};
vdc_5v: vdc-5v-regulator {
compatible = "regulator-fixed";
regulator-name = "VDC_5V";
vin-supply = <&dc12v>;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <500000>;
regulator-always-on;
};
vreg_s4a_1p8: vreg-s4a-1p8 {
compatible = "regulator-fixed";
regulator-name = "vreg_s4a_1p8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
};
usb2_vbus_det {
usb2_vbus_det_default: usb2_vbus_det_default {
pins = "gpio8";
function = "normal";
input-enable;
bias-pull-down;
power-source = <1>; /* VPH input supply */
};
};
extcon_usb1: extcon-usb-1 {
compatible = "linux,extcon-usb-gpio";
vbus-gpio = <&pmi8998_gpio 8 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&usb2_vbus_det_default>;
};
};
&apps_rsc {
pm8998-rpmh-regulators {
compatible = "qcom,pm8998-rpmh-regulators";
qcom,pmic-id = "a";
vdda_mipi_dsi0_pll:
vreg_l1a_0p875: ldo1 {
regulator-min-microvolt = <880000>;
regulator-max-microvolt = <880000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l5a_0p8: ldo5 {
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l7a_1p8: ldo7 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l12a_1p8: ldo12 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l13a_2p95: ldo13 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <2960000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l14a_1p88: ldo14 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
regulator-boot-on;
regulator-always-on;
};
vreg_l17a_1p3: ldo17 {
regulator-min-microvolt = <1304000>;
regulator-max-microvolt = <1304000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l20a_2p95: ldo20 {
regulator-min-microvolt = <2960000>;
regulator-max-microvolt = <2968000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l21a_2p95: ldo21 {
regulator-min-microvolt = <2960000>;
regulator-max-microvolt = <2968000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l24a_3p075: ldo24 {
regulator-min-microvolt = <3088000>;
regulator-max-microvolt = <3088000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l25a_3p3: ldo25 {
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3312000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vdda_mipi_dsi0_1p2:
vreg_l26a_1p2: ldo26 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
regulator-boot-on;
};
};
};
&gcc {
protected-clocks = <GCC_QSPI_CORE_CLK>,
<GCC_QSPI_CORE_CLK_SRC>,
<GCC_QSPI_CNOC_PERIPH_AHB_CLK>,
<GCC_LPASS_Q6_AXI_CLK>,
<GCC_LPASS_SWAY_CLK>;
};
&gpu {
zap-shader {
memory-region = <&gpu_mem>;
firmware-name = "qcom/a630_zap.mbn";
};
};
&pm8998_gpio {
vol_up_pin_a: vol-up-active {
pins = "gpio6";
function = "normal";
input-enable;
bias-pull-up;
qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
};
};
&pm8998_pon {
resin {
compatible = "qcom,pm8941-resin";
interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
debounce = <15625>;
bias-pull-up;
linux,code = <KEY_VOLUMEDOWN>;
};
};
&qupv3_id_0 {
status = "okay";
};
&qupv3_id_1 {
status = "okay";
};
&sdhc_2 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&sdc2_default_state &sdc2_card_det_n>;
vmmc-supply = <&vreg_l21a_2p95>;
vqmmc-supply = <&vreg_l13a_2p95>;
bus-width = <4>;
cd-gpios = <&tlmm 126 GPIO_ACTIVE_HIGH>;
};
&tlmm {
gpio-reserved-ranges = <0 4>, <81 4>;
sdc2_default_state: sdc2-default {
clk {
pins = "sdc2_clk";
bias-disable;
/*
* It seems that mmc_test reports errors if drive
* strength is not 16 on clk, cmd, and data pins.
*/
drive-strength = <16>;
};
cmd {
pins = "sdc2_cmd";
bias-pull-up;
drive-strength = <10>;
};
data {
pins = "sdc2_data";
bias-pull-up;
drive-strength = <10>;
};
};
sdc2_card_det_n: sd-card-det-n {
pins = "gpio126";
function = "gpio";
bias-pull-up;
};
ts_int_active: ts_int_active {
mux {
pins = "gpio31";
function = "gpio";
};
config {
pins = "gpio31";
drive-strength = <16>;
bias-pull-down;
input-enable;
};
};
ts_reset_active: ts_reset_active {
mux {
pins = "gpio32";
function = "gpio";
};
config {
pins = "gpio32";
drive-strength = <16>;
output-high;
};
};
ts_reset_suspend: ts_reset_suspend {
mux {
pins = "gpio32";
function = "gpio";
};
config {
pins = "gpio32";
drive-strength = <2>;
bias-disable;
output-low;
};
};
ts_int_suspend: ts_int_suspend {
mux {
pins = "gpio31";
function = "gpio";
};
config {
pins = "gpio31";
drive-strength = <2>;
bias-pull-down;
input-enable;
};
};
};
&uart6 {
status = "okay";
bluetooth {
compatible = "qcom,wcn3990-bt";
vddio-supply = <&vreg_s4a_1p8>;
vddxo-supply = <&vreg_l7a_1p8>;
vddrf-supply = <&vreg_l17a_1p3>;
vddch0-supply = <&vreg_l25a_3p3>;
max-speed = <3200000>;
};
};
&usb_1 {
status = "okay";
/* We'll use this as USB 2.0 only */
qcom,select-utmi-as-pipe-clk;
};
&usb_1_dwc3 {
/*
* Can't detect USB cable being plugged / unplugged, so this is needed
* for gadget mode
*/
dr_mode = "peripheral";
/* fastest mode for USB 2 */
maximum-speed = "high-speed";
extcon = <&extcon_usb1>;
/* Remove USB3 phy */
phys = <&usb_1_hsphy>;
phy-names = "usb2-phy";
};
&usb_1_hsphy {
status = "okay";
vdd-supply = <&vreg_l1a_0p875>;
vdda-pll-supply = <&vreg_l12a_1p8>;
vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
qcom,imp-res-offset-value = <8>;
qcom,hstx-trim-value = <QUSB2_V2_HSTX_TRIM_21_6_MA>;
qcom,preemphasis-level = <QUSB2_V2_PREEMPHASIS_5_PERCENT>;
qcom,preemphasis-width = <QUSB2_V2_PREEMPHASIS_WIDTH_HALF_BIT>;
};
&usb_1_qmpphy {
status = "okay";
vdda-phy-supply = <&vreg_l26a_1p2>;
vdda-pll-supply = <&vreg_l1a_0p875>;
};
&ufs_mem_hc {
status = "okay";
reset-gpios = <&tlmm 150 GPIO_ACTIVE_LOW>;
vcc-supply = <&vreg_l20a_2p95>;
vcc-max-microamp = <800000>;
};
&ufs_mem_phy {
status = "okay";
vdda-phy-supply = <&vreg_l1a_0p875>;
vdda-pll-supply = <&vreg_l26a_1p2>;
};
/* PINCTRL - additions to nodes defined in sdm845.dtsi */
&qup_uart6_default {
pinmux {
pins = "gpio45", "gpio46", "gpio47", "gpio48";
function = "qup6";
};
cts {
pins = "gpio45";
bias-disable;
};
rts-tx {
pins = "gpio46", "gpio47";
drive-strength = <2>;
bias-disable;
};
rx {
pins = "gpio48";
bias-pull-up;
};
};
&apps_smmu {
status = "okay";
};
&uart14 {
status = "okay";
};
&qup_i2c14_default{
pinconf {
pins = "gpio33", "gpio34";
drive-strength = <2>;
bias-pull-up;
};
};
&i2c14 {
compatible = "i2c-gpio";
status="okay";
sda-gpios = <&tlmm 33 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
scl-gpios = <&tlmm 34 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
i2c-gpio,delay-us = <1>; /* 5~=100 kHz */ /* could probably run on higher speeds */
#address-cells = <1>;
#size-cells = <0>;
touchscreen: novatek@62 {
compatible = "novatek,NVT-ts";
reg = <0x62>;
status = "okay";
vddio-supply = <&vreg_l14a_1p88>;
lab-supply = <&lab>;
ibb-supply = <&ibb>;
novatek,vddio-reg-name = "vddio";
novatek,lab-reg-name = "lab";
novatek,ibb-reg-name = "ibb";
novatek,reset-tddi = <&tlmm 6 0x00 /* GPIO_ACTIVE_HIGH */ >;
novatek,reset-gpio = <&tlmm 32 0x00 /* GPIO_ACTIVE_HIGH */ >;
novatek,irq-gpio = <&tlmm 31 0x2001>;
pinctrl-names = "pmx_ts_active", "pmx_ts_suspend";
pinctrl-0 = <&ts_int_active &ts_reset_active>;
pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>;
novatek,config-array-size = <2>;
novatek,dump-click-count;
novatek,cfg_0 {
novatek,tp-vendor = <0x46>;
novatek,hw-version = <0x1>;
novatek,fw-name = "novatek_nt36672_e10_hw01.fw";
};
novatek,cfg_1 {
novatek,tp-vendor = <0x46>;
novatek,hw-version = <0x2>;
novatek,fw-name = "novatek_nt36672_e10_hw02.fw";
};
};
};
&dsi0 {
status = "okay";
vdda-supply = <&vdda_mipi_dsi0_1p2>;
ports {
port@1 {
endpoint {
remote-endpoint = <&tianma_nt36672a_in_0>;
data-lanes = <0 1 2 3>;
};
};
};
panel@0 {
compatible = "tianma,nt36672a";
reg = <0>;
vddi0-supply = <&vreg_l14a_1p88>;
lab-supply = <&lab>;
ibb-supply = <&ibb>;
reset-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>;
pinctrl-names = "panel_active", "panel_suspend";
pinctrl-0 = <&sde_dsi_active>;
pinctrl-1 = <&sde_dsi_suspend>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
tianma_nt36672a_in_0: endpoint {
remote-endpoint = <&dsi0_out>;
};
};
};
};
};
&dsi0_phy {
status = "okay";
vdds-supply = <&vdda_mipi_dsi0_pll>;
};
&mdss {
status = "okay";
};
&mdss_mdp {
status = "okay";
};
&adsp_pas {
status = "okay";
firmware-name = "qcom/sdm845/adsp.mbn";
};
&cdsp_pas {
status = "okay";
firmware-name = "qcom/sdm845/cdsp.mbn";
};
&mss_pil {
status = "okay";
firmware-name = "qcom/sdm845/mba.mbn", "qcom/sdm845/modem.mbn";
};
&pmi8998_wled {
status = "okay";
qcom,current-limit-microamp = <20000>;
qcom,enabled-strings = <0 1>;
qcom,cabc;
qcom,switching-freq = <600>;
};
/* Reserved memory changes */
/*
* The memory regions related to the modem have to be changed
* according to the adresses in downstream as
* the modem is hard-coded to expect these regions to be at those adresses.
*
*/
/delete-node/ &rmtfs_mem;
/delete-node/ &adsp_mem;
/delete-node/ &wlan_msa_mem;
/delete-node/ &mpss_region;
/delete-node/ &venus_mem;
/delete-node/ &cdsp_mem;
/delete-node/ &mba_region;
/delete-node/ &slpi_mem;
/delete-node/ &spss_mem;
/ {
reserved-memory {
rmtfs_mem: memory@f6301000 {
compatible = "qcom,rmtfs-mem";
reg = <0 0xf6301000 0 0x200000>;
no-map;
qcom,client-id = <1>;
qcom,vmid = <15>;
};
adsp_mem: memory@8c500000 {
reg = <0 0x8c500000 0 0x1e00000>;
no-map;
};
wlan_msa_mem: memory@8e300000 {
reg = <0 0x8e300000 0 0x100000>;
no-map;
};
mpss_region: memory@8e400000 {
reg = <0 0x8e400000 0 0x7800000>;
no-map;
};
venus_mem: memory@95c00000 {
reg = <0 0x95c00000 0 0x500000>;
no-map;
};
cdsp_mem: memory@96100000 {
reg = <0 0x96100000 0 0x800000>;
no-map;
};
mba_region: memory@96900000 {
reg = <0 0x96900000 0 0x200000>;
no-map;
};
slpi_mem: memory@96b00000 {
reg = <0 0x96b00000 0 0x1400000>;
no-map;
};
spss_mem: memory@97f00000 {
reg = <0 0x97f00000 0 0x100000>;
no-map;
};
/* hack: bootloader framebuffer */
bootloader_framebuffer_mem: bootloader_framebuffer_region@a1a10000 {
compatible = "removed-dma-pool";
reg = <0 0x9D400000 0 0x02400000>;
no-map;
};
ramoops: ramoops@b0000000 {
compatible = "ramoops";
reg = <0 0xb0000000 0 0x00400000>;
record-size = <0x40000>; /*256x1024*/
console-size = <0x40000>;
ftrace-size = <0x40000>;
pmsg-size = <0x200000>;
ecc-size = <0x0>;
};
};
};
&wifi {
status = "okay";
vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
};

Binary file not shown.

View File

@ -0,0 +1,29 @@
// SPDX-License-Identifier: GPL-2.0
/*
* SDM845 OnePlus 6 (enchilada) specific device tree
*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
*/
#include "sdm845-oneplus-enchilada.dtsi"
/ {
model = "OnePlus 6";
compatible = "oneplus,enchilada", "qcom,sdm845";
};
&display_panel {
compatible = "samsung,sofef00";
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
vddio-supply = <&vreg_l14a_1p88>;
reset-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&panel_reset_pins &panel_te_pin &panel_esd_pin>;
};

View File

@ -0,0 +1,876 @@
// SPDX-License-Identifier: GPL-2.0
/*
* SDM845 OnePlus 6(T) (enchilada / fajita) common device tree source
*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
*/
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include <dt-bindings/input/linux-event-codes.h>
#include "sdm845.dtsi"
// Needed for some GPIO (like the volume buttons)
#include "pm8998.dtsi"
// For LEDs
#include "pmi8998.dtsi"
/ {
aliases {
hsuart0 = &uart6;
};
vph_pwr: vph-pwr-regulator {
compatible = "regulator-fixed";
regulator-name = "vph_pwr";
regulator-min-microvolt = <3700000>;
regulator-max-microvolt = <3700000>;
};
/*
* Apparently RPMh does not provide support for PM8998 S4 because it
* is always-on; model it as a fixed regulator.
*/
vreg_s4a_1p8: pm8998-smps4 {
compatible = "regulator-fixed";
regulator-name = "vreg_s4a_1p8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
regulator-boot-on;
vin-supply = <&vph_pwr>;
};
i2c_touch: i2c {
compatible = "i2c-gpio";
status = "okay";
sda-gpios = <&tlmm 49 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
scl-gpios = <&tlmm 50 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
i2c-gpio,delay-us = <5>; /* 5~=100 kHz */
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&i2c_ts_pins>;
touchscreen: synaptics-rmi4-i2c@20 {
compatible = "syna,rmi4-i2c";
reg = <0x20>;
#address-cells = <1>;
#size-cells = <0>;
interrupts-extended = <&tlmm 125 0x2008>; // IRQF_ONESHOT | IRQF_TRIGGER_LOW
pinctrl-names = "default";
pinctrl-0 = <&ts_default_pins &ts_enable_1p8>;
vdd-supply = <&vreg_l28a_3p0>;
vio-supply = <&vreg_l6a_1p8>;
syna,reset-delay-ms = <200>;
syna,startup-delay-ms = <500>;
rmi4-f01@1 {
reg = <0x01>;
syna,nosleep-mode = <1>;
};
rmi4_f12: rmi4-f12@12 {
reg = <0x12>;
touchscreen-x-mm = <68>;
touchscreen-y-mm = <144>;
syna,sensor-type = <1>;
syna,rezero-wait-ms = <200>;
};
};
};
gpio_tristate_key: gpio-keys {
compatible = "gpio-keys";
label = "Tri-state key";
pinctrl-names = "default";
pinctrl-0 = <&tri_state_key_default>;
state-top {
label = "Tri-state key top";
linux,code = <KEY_A>;
// gpios = <&tlmm 40 GPIO_ACTIVE_LOW>;
interrupt-parent = <&tlmm>;
interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
debounce-interval = <500>;
linux,can-disable;
};
state-middle {
label = "Tri-state key middle";
linux,code = <KEY_B>;
// gpios = <&tlmm 42 GPIO_ACTIVE_LOW>;
interrupt-parent = <&tlmm>;
interrupts = <52 IRQ_TYPE_EDGE_FALLING>;
debounce-interval = <500>;
linux,can-disable;
};
state-bottom {
label = "Tri-state key bottom";
linux,code = <KEY_C>;
// gpios = <&tlmm 26 GPIO_ACTIVE_LOW>;
interrupt-parent = <&tlmm>;
interrupts = <126 IRQ_TYPE_EDGE_FALLING>;
debounce-interval = <500>;
linux,can-disable;
};
};
gpio_vol_keys: gpio-keys {
compatible = "gpio-keys";
label = "Volume keys";
autorepeat;
pinctrl-names = "default";
pinctrl-0 = <&volume_down_gpio &volume_up_gpio>;
vol-down {
label = "Volume down";
linux,code = <KEY_VOLUMEDOWN>;
gpios = <&pm8998_gpio 5 GPIO_ACTIVE_LOW>;
debounce-interval = <15>;
};
vol-up {
label = "Volume up";
linux,code = <KEY_VOLUMEUP>;
gpios = <&pm8998_gpio 6 GPIO_ACTIVE_LOW>;
debounce-interval = <15>;
};
};
extcon_usb1: extcon-usb-1 {
compatible = "linux,extcon-usb-gpio";
id-gpio = <&tlmm 38 GPIO_ACTIVE_HIGH>;
};
};
&apps_rsc {
pm8998-rpmh-regulators {
compatible = "qcom,pm8998-rpmh-regulators";
qcom,pmic-id = "a";
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-s7-supply = <&vph_pwr>;
vdd-s8-supply = <&vph_pwr>;
vdd-s9-supply = <&vph_pwr>;
vdd-s10-supply = <&vph_pwr>;
vdd-s11-supply = <&vph_pwr>;
vdd-s12-supply = <&vph_pwr>;
vdd-s13-supply = <&vph_pwr>;
vdd-l1-l27-supply = <&vreg_s7a_1p025>;
vdd-l2-l8-l17-supply = <&vreg_s3a_1p35>;
vdd-l3-l11-supply = <&vreg_s7a_1p025>;
vdd-l4-l5-supply = <&vreg_s7a_1p025>;
vdd-l6-supply = <&vph_pwr>;
vdd-l7-l12-l14-l15-supply = <&vreg_s5a_2p04>;
vdd-l9-supply = <&vreg_bob>;
vdd-l10-l23-l25-supply = <&vreg_bob>;
vdd-l13-l19-l21-supply = <&vreg_bob>;
vdd-l16-l28-supply = <&vreg_bob>;
vdd-l18-l22-supply = <&vreg_bob>;
vdd-l20-l24-supply = <&vreg_bob>;
vdd-l26-supply = <&vreg_s3a_1p35>;
vin-lvs-1-2-supply = <&vreg_s4a_1p8>;
vreg_s2a_1p125: smps2 {
regulator-min-microvolt = <1100000>;
regulator-max-microvolt = <1100000>;
};
vreg_s3a_1p35: smps3 {
regulator-min-microvolt = <1352000>;
regulator-max-microvolt = <1352000>;
};
vreg_s5a_2p04: smps5 {
regulator-min-microvolt = <1904000>;
regulator-max-microvolt = <2040000>;
};
vreg_s7a_1p025: smps7 {
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <1028000>;
};
vdd_qusb_hs0:
vdda_hp_pcie_core:
vdda_mipi_csi0_0p9:
vdda_mipi_csi1_0p9:
vdda_mipi_csi2_0p9:
vdda_mipi_dsi0_pll:
vdda_mipi_dsi1_pll:
vdda_qlink_lv:
vdda_qlink_lv_ck:
vdda_qrefs_0p875:
vdda_pcie_core:
vdda_pll_cc_ebi01:
vdda_pll_cc_ebi23:
vdda_sp_sensor:
vdda_ufs1_core:
vdda_ufs2_core:
vdda_usb1_ss_core:
vdda_usb2_ss_core:
vreg_l1a_0p875: ldo1 {
regulator-min-microvolt = <880000>;
regulator-max-microvolt = <880000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vddpx_10:
vreg_l2a_1p2: ldo2 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
regulator-always-on;
};
vreg_l3a_1p0: ldo3 {
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1000000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vdd_wcss_cx:
vdd_wcss_mx:
vdda_wcss_pll:
vreg_l5a_0p8: ldo5 {
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vddpx_13:
vreg_l6a_1p8: ldo6 {
regulator-min-microvolt = <1856000>;
regulator-max-microvolt = <1856000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l7a_1p8: ldo7 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l8a_1p2: ldo8 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1248000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l9a_1p8: ldo9 {
regulator-min-microvolt = <1704000>;
regulator-max-microvolt = <2928000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l10a_1p8: ldo10 {
regulator-min-microvolt = <1704000>;
regulator-max-microvolt = <2928000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l11a_1p0: ldo11 {
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1048000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vdd_qfprom:
vdd_qfprom_sp:
vdda_apc1_cs_1p8:
vdda_gfx_cs_1p8:
vdda_qrefs_1p8:
vdda_qusb_hs0_1p8:
vddpx_11:
vreg_l12a_1p8: ldo12 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vddpx_2:
vreg_l13a_2p95: ldo13 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <2960000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l14a_1p88: ldo14 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
regulator-always-on;
};
vreg_l15a_1p8: ldo15 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l16a_2p7: ldo16 {
regulator-min-microvolt = <2704000>;
regulator-max-microvolt = <2704000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l17a_1p3: ldo17 {
regulator-min-microvolt = <1304000>;
regulator-max-microvolt = <1304000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l18a_2p7: ldo18 {
regulator-min-microvolt = <2704000>;
regulator-max-microvolt = <2960000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l19a_3p0: ldo19 {
regulator-min-microvolt = <2856000>;
regulator-max-microvolt = <3104000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l20a_2p95: ldo20 {
regulator-min-microvolt = <2704000>;
regulator-max-microvolt = <2960000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l21a_2p95: ldo21 {
regulator-min-microvolt = <2704000>;
regulator-max-microvolt = <2960000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l22a_2p85: ldo22 {
regulator-min-microvolt = <2864000>;
regulator-max-microvolt = <3312000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l23a_3p3: ldo23 {
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3312000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vdda_qusb_hs0_3p1:
vreg_l24a_3p075: ldo24 {
regulator-min-microvolt = <3088000>;
regulator-max-microvolt = <3088000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l25a_3p3: ldo25 {
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3312000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vdda_hp_pcie_1p2:
vdda_hv_ebi0:
vdda_hv_ebi1:
vdda_hv_ebi2:
vdda_hv_ebi3:
vdda_mipi_csi_1p25:
vdda_mipi_dsi0_1p2:
vdda_mipi_dsi1_1p2:
vdda_pcie_1p2:
vdda_ufs1_1p2:
vdda_ufs2_1p2:
vdda_usb1_ss_1p2:
vdda_usb2_ss_1p2:
vreg_l26a_1p2: ldo26 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l28a_3p0: ldo28 {
regulator-min-microvolt = <2856000>;
regulator-max-microvolt = <3008000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_lvs1a_1p8: lvs1 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
vreg_lvs2a_1p8: lvs2 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
};
pmi8998-rpmh-regulators {
compatible = "qcom,pmi8998-rpmh-regulators";
qcom,pmic-id = "b";
vdd-bob-supply = <&vph_pwr>;
vreg_bob: bob {
regulator-min-microvolt = <3312000>;
regulator-max-microvolt = <3600000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
regulator-allow-bypass;
};
};
pm8005-rpmh-regulators {
compatible = "qcom,pm8005-rpmh-regulators";
qcom,pmic-id = "c";
vdd-s1-supply = <&vph_pwr>;
vdd-s2-supply = <&vph_pwr>;
vdd-s3-supply = <&vph_pwr>;
vdd-s4-supply = <&vph_pwr>;
vreg_s3c_0p6: smps3 {
regulator-min-microvolt = <600000>;
regulator-max-microvolt = <600000>;
};
};
};
/* Reserved memory changes */
/*
* The rmtfs memory region in downstream is 'dynamically allocated'
* but given the same address every time. hard code it here as this address is
* where the modem firmware expects it to be.
*/
/delete-node/ &rmtfs_mem;
/ {
reserved-memory {
rmtfs_mem: memory@f5b01000 {
compatible = "qcom,rmtfs-mem";
reg = <0 0xf5b01000 0 0x200000>;
no-map;
qcom,client-id = <1>;
qcom,vmid = <15>;
};
/*
* Due to treble implementations and the requirement to reflash
* the dtbo partition in order to boot downstream without doing a
* cold reboot, this region has not proven very useful on enchilada.
*/
ramoops: ramoops@0xac300000 {
compatible = "ramoops";
reg = <0 0xac300000 0 0x400000>;
record-size = <0x40000>;
console-size = <0x40000>;
ftrace-size = <0x40000>;
pmsg-size = <0x200000>;
devinfo-size = <0x1000>;
ecc-size = <0x0>;
};
};
};
&gcc {
protected-clocks = <GCC_QSPI_CORE_CLK>,
<GCC_QSPI_CORE_CLK_SRC>,
<GCC_QSPI_CNOC_PERIPH_AHB_CLK>,
<GCC_LPASS_Q6_AXI_CLK>,
<GCC_LPASS_SWAY_CLK>;
};
&gpu {
zap-shader {
memory-region = <&gpu_mem>;
firmware-name = "qcom/sdm845/oneplus6/a630_zap.mbn";
};
};
&adsp_pas {
status = "okay";
firmware-name = "qcom/sdm845/adsp.mbn";
};
&cdsp_pas {
status = "okay";
firmware-name = "qcom/sdm845/cdsp.mbn";
};
/* Modem/wifi*/
&mss_pil {
status = "okay";
firmware-name = "qcom/sdm845/oneplus6/mba.mbn", "qcom/sdm845/oneplus6/modem.mbn";
};
&uart6 {
status = "okay";
bluetooth {
compatible = "qcom,wcn3990-bt";
/* In subdir qca/ in /lib/firmware */
//firmware-name = "crbtfw21.tlv";
vddio-supply = <&vreg_s4a_1p8>;
vddxo-supply = <&vreg_l7a_1p8>;
vddrf-supply = <&vreg_l17a_1p3>;
vddch0-supply = <&vreg_l25a_3p3>;
max-speed = <3200000>;
};
};
&qup_uart6_default {
pinmux {
pins = "gpio45", "gpio46", "gpio47", "gpio48";
function = "qup6";
};
cts {
pins = "gpio45";
bias-pull-down;
};
rts-tx {
pins = "gpio46", "gpio47";
drive-strength = <2>;
bias-disable;
};
rx {
pins = "gpio48";
bias-pull-up;
};
};
&ufs_mem_hc {
status = "okay";
reset-gpios = <&tlmm 150 GPIO_ACTIVE_LOW>;
vcc-supply = <&vreg_l20a_2p95>;
vcc-max-microamp = <600000>;
};
&ufs_mem_phy {
status = "okay";
vdda-phy-supply = <&vdda_ufs1_core>;
vdda-pll-supply = <&vdda_ufs1_1p2>;
};
&usb_1 {
status = "okay";
/* disable USB3 clock requirement as we are in USB 2 mode */
qcom,select-utmi-as-pipe-clk;
};
&usb_1_dwc3 {
/*
* Can't detect USB cable being plugged / unplugged, so this is needed
* for gadget mode
*/
dr_mode = "peripheral";
/* fastest mode for USB 2 */
maximum-speed = "high-speed";
extcon = <&extcon_usb1>;
/* Remove USB3 phy */
phys = <&usb_1_hsphy>;
phy-names = "usb2-phy";
};
&usb_1_hsphy {
status = "okay";
vdd-supply = <&vdda_usb1_ss_core>;
vdda-pll-supply = <&vdda_qusb_hs0_1p8>;
vdda-phy-dpdm-supply = <&vdda_qusb_hs0_3p1>;
qcom,imp-res-offset-value = <8>;
qcom,hstx-trim-value = <QUSB2_V2_HSTX_TRIM_21_6_MA>;
qcom,preemphasis-level = <QUSB2_V2_PREEMPHASIS_5_PERCENT>;
qcom,preemphasis-width = <QUSB2_V2_PREEMPHASIS_WIDTH_HALF_BIT>;
};
&wifi {
status = "okay";
vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
};
&mdss {
status = "okay";
};
&mdss_mdp {
status = "okay";
};
&dsi0 {
status = "okay";
vdda-supply = <&vdda_mipi_dsi0_1p2>;
#address-cells = <1>;
#size-cells = <0>;
display_panel: panel@0 {
status = "disabled";
port {
panel_in: endpoint {
remote-endpoint = <&dsi0_out>;
};
};
};
};
&dsi0_out {
remote-endpoint = <&panel_in>;
data-lanes = <0 1 2 3>;
};
&dsi0_phy {
status = "okay";
vdds-supply = <&vdda_mipi_dsi0_pll>;
};
/* GENI device - does i2c, uart, spi and all that stuff */
&qupv3_id_1 {
status = "okay";
};
&qupv3_id_0 {
status = "okay";
};
&spmi_bus {
pmi8998_lsid1: pmic@3 {
lpg {
status = "okay";
rgb {
led-sources = <5 4 3>;
};
red {
led-sources = <5>;
};
green {
led-sources = <4>;
};
blue {
led-sources = <3>;
};
};
};
};
&i2c10 {
status = "okay";
clock-frequency = <100000>;
bq27541_battery: bq27541-battery@55 {
status = "okay";
compatible = "ti,bq27541";
reg = <0x55>;
};
};
/* PINCTRL - additions to nodes defined in sdm845.dtsi */
&qup_i2c10_default {
pinconf {
pins = "gpio55", "gpio56";
drive-strength = <2>;
bias-disable;
};
};
&qup_uart9_default {
pinconf-tx {
pins = "gpio4";
drive-strength = <2>;
bias-disable;
};
pinconf-rx {
pins = "gpio5";
drive-strength = <2>;
bias-pull-up;
};
};
&pm8998_gpio {
volume_down_gpio: pm8998_gpio5 {
pinconf {
pins = "gpio5";
function = "normal";
input-enable;
bias-pull-up;
qcom,drive-strength = <0>;
};
};
volume_up_gpio: pm8998_gpio6 {
pinconf {
pins = "gpio6";
function = "normal";
input-enable;
bias-pull-up;
qcom,drive-strength = <0>;
};
};
};
&tlmm {
gpio-reserved-ranges = <0 4>, <81 4>;
sdc2_clk: sdc2-clk {
pinconf {
pins = "sdc2_clk";
bias-disable;
/*
* It seems that mmc_test reports errors if drive
* strength is not 16 on clk, cmd, and data pins.
*/
drive-strength = <16>;
};
};
sdc2_cmd: sdc2-cmd {
pinconf {
pins = "sdc2_cmd";
bias-pull-up;
drive-strength = <16>;
};
};
sdc2_data: sdc2-data {
pinconf {
pins = "sdc2_data";
bias-pull-up;
drive-strength = <16>;
};
};
tri_state_key_default: tri_state_key_default {
mux {
pins = "gpio40", "gpio42", "gpio26";
function = "gpio";
};
config {
pins = "gpio40", "gpio42", "gpio26";
drive-strength = <2>;
bias-disable;
};
};
i2c_ts_pins: i2c-touch-default {
mux {
pins = "gpio49", "gpio50";
function = "gpio";
};
config {
pins = "gpio49", "gpio50";
drive-strength = <2>;
bias-disable;
};
};
ts_default_pins: ts-int {
mux {
pins = "gpio99", "gpio125";
function = "gpio";
};
config {
pins = "gpio99", "gpio125";
drive-strength = <16>;
bias-pull-up;
};
};
ts_enable_1p8: ts-1p8 {
mux {
pins = "gpio88";
function = "gpio";
};
config {
pins = "gpio88";
drive-strength = <16>;
bias-pull-up;
};
};
panel_reset_pins: panel-reset {
mux {
pins = "gpio6", "gpio25", "gpio26";
function = "gpio";
};
config {
pins = "gpio6", "gpio25", "gpio26";
drive-strength = <8>;
bias-disable = <0>;
};
};
panel_te_pin: panel-te {
mux {
pins = "gpio10";
function = "mdp_vsync";
};
config {
pins = "gpio10";
drive-strength = <2>;
bias-disable;
input-enable;
};
};
panel_esd_pin: panel-esd {
mux {
pins = "gpio30";
function = "gpio";
};
config {
pins = "gpio30";
drive-strength = <2>;
bias-pull-down;
input-enable;
};
};
};

Binary file not shown.

View File

@ -0,0 +1,29 @@
// SPDX-License-Identifier: GPL-2.0
/*
* SDM845 OnePlus 6T (fajita) specific device tree
*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
*/
#include "sdm845-oneplus-enchilada.dtsi"
/ {
model = "OnePlus 6T";
compatible = "oneplus-fajita", "qcom,sdm845";
};
&display_panel {
compatible = "samsung,s6e3fc2x01";
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
vddio-supply = <&vreg_l14a_1p88>;
reset-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&panel_reset_pins &panel_te_pin &panel_esd_pin>;
};

Binary file not shown.

View File

@ -0,0 +1,763 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2020, Sophon Wu <strongtz@yeah.net>
*/
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include "sdm845.dtsi"
#include "pm8998.dtsi"
#include "pmi8998.dtsi"
#include "pm8005.dtsi"
/ {
model = "Xiaomi MI 8";
compatible = "xiaomi,dipper", "qcom,sdm845";
/* required for bootloader to select correct board */
qcom,board-id = <0x36 0x0>;
qcom,msm-id = <0x141 0x20000>;
aliases {
serial0 = &uart9;
hsuart0 = &uart6;
};
chosen {
#address-cells = <2>;
#size-cells = <2>;
ranges;
// For simplefb hack
stdout-path = "display0";
/* hack: use framebuffer setup by bootloader.
* the address is taken from the bootloader config (strings xbl.img | grep "Display Reserved")
*/
framebuffer0: framebuffer@9d400000 {
compatible = "simple-framebuffer";
reg = <0 0x9D400000 0 0x02400000>;
width = <1080>;
height = <2248>;
stride = <(1080 * 4)>;
format = "a8r8g8b8";
status = "okay";
};
};
vph_pwr: vph-pwr-regulator {
compatible = "regulator-fixed";
regulator-name = "vph_pwr";
regulator-min-microvolt = <3700000>;
regulator-max-microvolt = <3700000>;
};
vbat: vbat-regulator {
compatible = "regulator-fixed";
regulator-name = "VBAT";
vin-supply = <&vph_pwr>;
regulator-min-microvolt = <4200000>;
regulator-max-microvolt = <4200000>;
regulator-always-on;
};
vbat_som: vbat-som-regulator {
compatible = "regulator-fixed";
regulator-name = "VBAT_SOM";
vin-supply = <&vph_pwr>;
regulator-min-microvolt = <4200000>;
regulator-max-microvolt = <4200000>;
regulator-always-on;
};
vdc_3v3: vdc-3v3-regulator {
compatible = "regulator-fixed";
regulator-name = "VDC_3V3";
vin-supply = <&vph_pwr>;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
};
vdc_5v: vdc-5v-regulator {
compatible = "regulator-fixed";
regulator-name = "VDC_5V";
vin-supply = <&vph_pwr>;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <500000>;
regulator-always-on;
};
/*
* Apparently RPMh does not provide support for PM8998 S4 because it
* is always-on; model it as a fixed regulator.
*/
vreg_s4a_1p8: pm8998-smps4 {
compatible = "regulator-fixed";
regulator-name = "vreg_s4a_1p8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
regulator-boot-on;
vin-supply = <&vph_pwr>;
};
gpio_keys {
compatible = "gpio-keys";
autorepeat;
pinctrl-names = "default";
pinctrl-0 = <&vol_up_pin_a>;
vol-up {
label = "Volume Up";
linux,code = <KEY_VOLUMEUP>;
gpios = <&pm8998_gpio 6 GPIO_ACTIVE_LOW>;
};
};
};
&adsp_pas {
status = "okay";
firmware-name = "qcom/adsp.mbn";
};
&apps_rsc {
pm8998-rpmh-regulators {
compatible = "qcom,pm8998-rpmh-regulators";
qcom,pmic-id = "a";
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-s7-supply = <&vph_pwr>;
vdd-s8-supply = <&vph_pwr>;
vdd-s9-supply = <&vph_pwr>;
vdd-s10-supply = <&vph_pwr>;
vdd-s11-supply = <&vph_pwr>;
vdd-s12-supply = <&vph_pwr>;
vdd-s13-supply = <&vph_pwr>;
vdd-l1-l27-supply = <&vreg_s7a_1p025>;
vdd-l2-l8-l17-supply = <&vreg_s3a_1p35>;
vdd-l3-l11-supply = <&vreg_s7a_1p025>;
vdd-l4-l5-supply = <&vreg_s7a_1p025>;
vdd-l6-supply = <&vph_pwr>;
vdd-l7-l12-l14-l15-supply = <&vreg_s5a_2p04>;
vdd-l9-supply = <&vreg_bob>;
vdd-l10-l23-l25-supply = <&vreg_bob>;
vdd-l13-l19-l21-supply = <&vreg_bob>;
vdd-l16-l28-supply = <&vreg_bob>;
vdd-l18-l22-supply = <&vreg_bob>;
vdd-l20-l24-supply = <&vreg_bob>;
vdd-l26-supply = <&vreg_s3a_1p35>;
vin-lvs-1-2-supply = <&vreg_s4a_1p8>;
vreg_s2a_1p1: smps2 {
regulator-always-on;
regulator-min-microvolt = <1100000>;
regulator-max-microvolt = <1100000>;
};
vreg_s3a_1p35: smps3 {
regulator-min-microvolt = <1352000>;
regulator-max-microvolt = <1352000>;
};
// vreg_s4a_1p8: smps4 {
// regulator-min-microvolt = <1800000>;
// regulator-max-microvolt = <1800000>;
// };
vreg_s5a_2p04: smps5 {
regulator-always-on;
regulator-min-microvolt = <1904000>;
regulator-max-microvolt = <2040000>;
};
vreg_s7a_1p025: smps7 {
regulator-always-on;
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <1028000>;
};
vdda_ufs1_core:
vreg_l1a_0p875: ldo1 {
regulator-min-microvolt = <880000>;
regulator-max-microvolt = <880000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
// vreg_l2a_0p875: ldo2 {
// regulator-min-microvolt = <1200000>;
// regulator-max-microvolt = <1200000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// regulator-always-on;
// };
// vreg_l3a_0p875: ldo3 {
// regulator-min-microvolt = <1000000>;
// regulator-max-microvolt = <1000000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
vreg_l5a_0p8: ldo5 {
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
// vreg_l6a_1p8: ldo6 {
// regulator-min-microvolt = <1856000>;
// regulator-max-microvolt = <1856000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
vreg_l7a_1p8: ldo7 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
// vreg_l8a_1p2: ldo8 {
// regulator-min-microvolt = <1200000>;
// regulator-max-microvolt = <1248000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
// vreg_l9a_2p95: ldo9 {
// regulator-min-microvolt = <1704000>;
// regulator-max-microvolt = <2928000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
// vreg_l10a_2p95: ldo10 {
// regulator-min-microvolt = <1704000>;
// regulator-max-microvolt = <2928000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
// vreg_l11a_1p05: ldo11 {
// regulator-min-microvolt = <1000000>;
// regulator-max-microvolt = <1048000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
vreg_l12a_1p8: ldo12 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
// vreg_l13a_2p95: ldo13 {
// regulator-min-microvolt = <1800000>;
// regulator-max-microvolt = <2960000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
// dsi and touchscreen maybe
vreg_l14a_1p8: ldo14 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1880000>;
regulator-always-on;
regulator-boot-on;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
// vreg_l15a_1p8: ldo15 {
// regulator-min-microvolt = <1800000>;
// regulator-max-microvolt = <1800000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
// vreg_l16a_2p7: ldo16 {
// regulator-min-microvolt = <2704000>;
// regulator-max-microvolt = <2704000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
vreg_l17a_1p3: ldo17 {
regulator-always-on;
regulator-min-microvolt = <1304000>;
regulator-max-microvolt = <1304000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
// vreg_l18a_2p9: ldo18 {
// regulator-min-microvolt = <2704000>;
// regulator-max-microvolt = <2960000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
// vreg_l19a_3p1: ldo19 {
// regulator-min-microvolt = <2856000>;
// regulator-max-microvolt = <3104000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
vreg_l20a_2p95: ldo20 {
regulator-min-microvolt = <2704000>;
regulator-max-microvolt = <2960000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
// vreg_l21a_2p95: ldo21 {
// regulator-min-microvolt = <2704000>;
// regulator-max-microvolt = <2960000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
// vreg_l22a_3p3: ldo22 {
// regulator-min-microvolt = <2864000>;
// regulator-max-microvolt = <3312000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
// vreg_l23a_3p3: ldo23 {
// regulator-min-microvolt = <3000000>;
// regulator-max-microvolt = <3312000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
vreg_l24a_3p075: ldo24 {
regulator-min-microvolt = <3088000>;
regulator-max-microvolt = <3088000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l25a_3p3: ldo25 {
regulator-always-on;
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3312000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vdda_ufs1_1p2:
vreg_l26a_1p2: ldo26 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_lvs1a_1p8: lvs1 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
};
vreg_lvs2a_1p8: lvs2 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
};
};
pmi8998-rpmh-regulators {
compatible = "qcom,pmi8998-rpmh-regulators";
qcom,pmic-id = "b";
vdd-bob-supply = <&vph_pwr>;
vreg_bob: bob {
regulator-min-microvolt = <3312000>;
regulator-max-microvolt = <3600000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
regulator-allow-bypass;
};
};
pm8005-rpmh-regulators {
compatible = "qcom,pm8005-rpmh-regulators";
qcom,pmic-id = "c";
vreg_smp3c_0p6: smps3 {
regulator-always-on;
regulator-min-microvolt = <600000>;
regulator-max-microvolt = <600000>;
};
};
};
&apps_smmu {
/* Enable this when upstream smmu driver gets patched */
status = "okay";
};
&cdsp_pas {
status = "okay";
firmware-name = "qcom/cdsp.mbn";
};
// vreg_l14a_1p8
// &dsi0 {
// status = "okay";
// vdda-supply = <&vreg_l26a_1p2>;
// #address-cells = <1>;
// #size-cells = <0>;
// display_panel: panel@0 {
// status = "disabled";
// port {
// panel_in: endpoint {
// remote-endpoint = <&dsi0_out>;
// };
// };
// };
// };
// &dsi0_out {
// remote-endpoint = <&panel_in>;
// data-lanes = <0 1 2 3>;
// };
// &dsi0_phy {
// status = "okay";
// vdds-supply = <&vreg_l1a_0p875>;
// };
// &display_panel {
// compatible = "visionox,fhd-r66455";
// status = "okay";
// #address-cells = <1>;
// #size-cells = <0>;
// reg = <0>;
// vddio-supply = <&vreg_l14a_1p8>;
// reset-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>;
// pinctrl-names = "default";
// pinctrl-0 = <&panel_reset_pins &panel_te_pin>;
// };
&gcc {
protected-clocks = <GCC_QSPI_CORE_CLK>,
<GCC_QSPI_CORE_CLK_SRC>,
<GCC_QSPI_CNOC_PERIPH_AHB_CLK>,
<GCC_LPASS_Q6_AXI_CLK>,
<GCC_LPASS_SWAY_CLK>;
};
&gpu {
/*
* note: the amd,imageon compatible makes it possible
* to use the drm/msm driver without the display node,
* make sure to remove it when display node is added
*/
compatible = "qcom,adreno-630.2",
"qcom,adreno",
"amd,imageon";
zap-shader {
memory-region = <&gpu_mem>;
firmware-name = "qcom/a630_zap.mbn";
};
};
&ipa {
status = "okay";
modem-init;
memory-region = <&ipa_fw_mem>;
};
/* NFC */
&i2c3 {
status = "okay";
clock-frequency = <400000>;
};
/* Audio Amplifier tas2557 */
&i2c5 {
status = "okay";
clock-frequency = <400000>;
};
/* smb1355 and lm3644 LED */
&i2c10 {
status = "okay";
clock-frequency = <400000>;
};
/* fts touchscreen */
&i2c14 {
status = "okay";
clock-frequency = <400000>;
};
// &mdss {
// status = "okay";
// };
// &mdss_mdp {
// status = "okay";
// };
&mss_pil {
status = "okay";
firmware-name = "qcom/mba.mbn", "qcom/modem.mbn";
};
&pm8998_gpio {
vol_up_pin_a: vol-up-active {
pins = "gpio6";
function = "normal";
input-enable;
bias-pull-up;
qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
};
};
&pm8998_pon {
resin {
compatible = "qcom,pm8941-resin";
interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
debounce = <15625>;
bias-pull-up;
linux,code = <KEY_VOLUMEDOWN>;
};
};
&qupv3_id_0 {
status = "okay";
};
&qupv3_id_1 {
status = "okay";
};
&tlmm {
gpio-reserved-ranges = <0 4>, <81 4>;
panel_reset_pins: panel-reset {
mux {
pins = "gpio6", "gpio52";
function = "gpio";
};
config {
pins = "gpio6", "gpio52";
drive-strength = <8>;
bias-disable = <0>;
};
};
panel_te_pin: panel-te {
mux {
pins = "gpio10";
function = "mdp_vsync";
};
config {
pins = "gpio10";
drive-strength = <2>;
bias-disable;
input-enable;
};
};
};
&uart6 {
status = "okay";
bluetooth {
compatible = "qcom,wcn3990-bt";
vddio-supply = <&vreg_s4a_1p8>;
vddxo-supply = <&vreg_l7a_1p8>;
vddrf-supply = <&vreg_l17a_1p3>;
vddch0-supply = <&vreg_l25a_3p3>;
max-speed = <3200000>;
};
};
&usb_1 {
status = "okay";
/* We'll use this as USB 2.0 only */
qcom,select-utmi-as-pipe-clk;
};
&usb_1_dwc3 {
dr_mode = "peripheral";
/* fastest mode for USB 2 */
maximum-speed = "high-speed";
/* Remove USB3 phy */
phys = <&usb_1_hsphy>;
phy-names = "usb2-phy";
};
&usb_1_hsphy {
status = "okay";
vdd-supply = <&vreg_l1a_0p875>;
vdda-pll-supply = <&vreg_l12a_1p8>;
vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
qcom,imp-res-offset-value = <8>;
qcom,hstx-trim-value = <QUSB2_V2_HSTX_TRIM_21_6_MA>;
qcom,preemphasis-level = <QUSB2_V2_PREEMPHASIS_5_PERCENT>;
qcom,preemphasis-width = <QUSB2_V2_PREEMPHASIS_WIDTH_HALF_BIT>;
};
&usb_1_qmpphy {
status = "okay";
vdda-phy-supply = <&vreg_l26a_1p2>;
vdda-pll-supply = <&vreg_l1a_0p875>;
};
&ufs_mem_hc {
status = "okay";
reset-gpios = <&tlmm 150 GPIO_ACTIVE_LOW>;
vcc-supply = <&vreg_l20a_2p95>;
vcc-max-microamp = <800000>;
};
&ufs_mem_phy {
status = "okay";
vdda-phy-supply = <&vdda_ufs1_core>;
vdda-pll-supply = <&vdda_ufs1_1p2>;
};
&wifi {
status = "okay";
vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
qcom,snoc-host-cap-8bit-quirk;
};
/* PINCTRL - additions to nodes defined in sdm845.dtsi */
&qup_uart6_default {
pinmux {
pins = "gpio45", "gpio46", "gpio47", "gpio48";
function = "qup6";
};
cts {
pins = "gpio45";
bias-disable;
};
rts-tx {
pins = "gpio46", "gpio47";
drive-strength = <2>;
bias-disable;
};
rx {
pins = "gpio48";
bias-pull-up;
};
};
/* Reserved memory changes */
/*
* The memory regions related to the modem have to be changed
* according to the adresses in downstream as
* the modem is hard-coded to expect these regions to be at those adresses.
*
*/
/delete-node/ &rmtfs_mem;
/delete-node/ &adsp_mem;
/delete-node/ &wlan_msa_mem;
/delete-node/ &mpss_region;
/delete-node/ &venus_mem;
/delete-node/ &cdsp_mem;
/delete-node/ &mba_region;
/delete-node/ &slpi_mem;
/delete-node/ &spss_mem;
/ {
reserved-memory {
rmtfs_mem: memory@f6301000 {
compatible = "qcom,rmtfs-mem";
reg = <0 0xf6301000 0 0x200000>;
no-map;
qcom,client-id = <1>;
qcom,vmid = <15>;
};
adsp_mem: memory@8c500000 {
reg = <0 0x8c500000 0 0x1e00000>;
no-map;
};
wlan_msa_mem: memory@8e300000 {
reg = <0 0x8e300000 0 0x100000>;
no-map;
};
mpss_region: memory@8e400000 {
reg = <0 0x8e400000 0 0x7800000>;
no-map;
};
venus_mem: memory@95c00000 {
reg = <0 0x95c00000 0 0x500000>;
no-map;
};
cdsp_mem: memory@96100000 {
reg = <0 0x96100000 0 0x800000>;
no-map;
};
mba_region: memory@96900000 {
reg = <0 0x96900000 0 0x200000>;
no-map;
};
slpi_mem: memory@96b00000 {
reg = <0 0x96b00000 0 0x1400000>;
no-map;
};
spss_mem: memory@97f00000 {
reg = <0 0x97f00000 0 0x100000>;
no-map;
};
/* hack: bootloader framebuffer */
cont_splash_region: memory@9d400000 {
compatible = "removed-dma-pool";
reg = <0 0x9D400000 0 0x02400000>;
no-map;
};
ramoops: ramoops@b0000000 {
compatible = "ramoops";
reg = <0 0xb0000000 0 0x00400000>;
record-size = <0x40000>; /*256x1024*/
console-size = <0x40000>;
ftrace-size = <0x40000>;
pmsg-size = <0x200000>;
ecc-size = <0x0>;
};
};
};

View File

@ -25,6 +25,28 @@
hsuart0 = &uart6;
};
chosen {
#address-cells = <2>;
#size-cells = <2>;
ranges;
// For simplefb hack
stdout-path = "display0";
/* hack: use framebuffer setup by bootloader.
* the address is taken from the bootloader config (strings xbl.img | grep "Display Reserved")
*/
framebuffer0: framebuffer@9d400000 {
compatible = "simple-framebuffer";
reg = <0 0x9D400000 0 0x02400000>;
width = <1080>;
height = <2160>;
stride = <(1080 * 4)>;
format = "a8r8g8b8";
status = "okay";
};
};
vph_pwr: vph-pwr-regulator {
compatible = "regulator-fixed";
regulator-name = "vph_pwr";
@ -71,15 +93,15 @@
regulator-always-on;
};
vreg_tp_vddio: tp-vddio-vreg {
regulator-always-on;
compatible = "regulator-fixed";
regulator-name = "vreg_tp_vddio";
regulator-boot-on;
enable-active-high;
gpio = <&tlmm 23 0>;
startup-delay-us = <4000>;
};
// vreg_tp_vddio: tp-vddio-vreg {
// regulator-always-on;
// compatible = "regulator-fixed";
// regulator-name = "vreg_tp_vddio";
// regulator-boot-on;
// enable-active-high;
// gpio = <&tlmm 23 0>;
// startup-delay-us = <4000>;
// };
/*
* Apparently RPMh does not provide support for PM8150 S4 because it
@ -95,6 +117,49 @@
vin-supply = <&vph_pwr>;
};
i2c_touch: i2c {
compatible = "i2c-gpio";
status = "okay";
sda-gpios = <&tlmm 33 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
scl-gpios = <&tlmm 34 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
i2c-gpio,delay-us = <5>; /* 5~=100 kHz */
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&i2c_ts_pins>;
touchscreen: synaptics-rmi4-i2c@20 {
compatible = "syna,rmi4-i2c";
reg = <0x20>;
#address-cells = <1>;
#size-cells = <0>;
interrupts-extended = <&tlmm 125 0x2008>; // IRQF_ONESHOT | IRQF_TRIGGER_LOW
pinctrl-names = "default";
pinctrl-0 = <&ts_default_pins &ts_enable_1p8>;
// vdd-supply = <&vreg_tp_vddio>;
vio-supply = <&vreg_l6a_1p8>;
syna,reset-delay-ms = <200>;
syna,startup-delay-ms = <500>;
rmi4-f01@1 {
reg = <0x01>;
syna,nosleep-mode = <1>;
};
rmi4_f12: rmi4-f12@12 {
reg = <0x12>;
syna,sensor-type = <1>;
syna,rezero-wait-ms = <200>;
};
};
};
gpio_keys {
compatible = "gpio-keys";
@ -109,6 +174,47 @@
gpios = <&pm8998_gpio 6 GPIO_ACTIVE_LOW>;
};
};
// usb2_vbus_det {
// usb2_vbus_det_default: usb2_vbus_det_default {
// pins = "gpio8";
// function = "normal";
// input-enable;
// bias-pull-down;
// power-source = <1>; /* VPH input supply */
// };
// };
// extcon_usb1: extcon-usb-1 {
// compatible = "linux,extcon-usb-gpio";
// vbus-gpio = <&pmi8998_gpio 8 GPIO_ACTIVE_HIGH>;
// pinctrl-names = "default";
// pinctrl-0 = <&usb2_vbus_det_default>;
// };
// ext_5v_boost {
// compatible = "regulator-fixed";
// enable-active-high;
// gpio = <&pmi8998_gpio 10 GPIO_ACTIVE_HIGH>;
// status = "ok";
// pinctrl-0 = <&usb2_ext_5v_boost>;
// regulator-name = "ext_5v_boost";
// pinctrl-names = "default";
// regulator-always-on;
// };
// vbus_boost {
// compatible = "regulator-fixed";
// enable-active-high;
// gpio = <&pmi8998_gpio 2 GPIO_ACTIVE_HIGH>;
// status = "ok";
// pinctrl-0 = <&usb2_vbus_boost>;
// regulator-name = "vbus_boost";
// pinctrl-names = "default";
// regulator-always-on;
// };
};
@ -192,17 +298,17 @@
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
// vreg_l5a_0p8: ldo5 {
// regulator-min-microvolt = <800000>;
// regulator-max-microvolt = <800000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
vreg_l5a_0p8: ldo5 {
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
// vreg_l6a_1p8: ldo6 {
// regulator-min-microvolt = <1856000>;
// regulator-max-microvolt = <1856000>;
// regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
// };
vreg_l6a_1p8: ldo6 {
regulator-min-microvolt = <1856000>;
regulator-max-microvolt = <1856000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l7a_1p8: ldo7 {
regulator-min-microvolt = <1800000>;
@ -331,6 +437,13 @@
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
vreg_l28a_3p0: ldo28 {
regulator-min-microvolt = <2856000>;
regulator-max-microvolt = <3008000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
regulator-always-on;
};
vreg_lvs1a_1p8: lvs1 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
@ -389,7 +502,7 @@
clock-frequency = <400000>;
};
/* Audio DAC tas2559 */
/* Audio Amplifier tas2559 */
&i2c5 {
status = "okay";
clock-frequency = <400000>;
@ -401,42 +514,6 @@
clock-frequency = <400000>;
};
/* touchscreen */
&i2c14 {
status = "okay";
clock-frequency = <400000>;
touchscreen: synaptics-dsi-i2c@20 {
compatible = "syna,rmi4-i2c";
reg = <0x20>;
#address-cells = <1>;
#size-cells = <0>;
interrupt-parent = <&tlmm>;
interrupts = <0x7d 0x2008>;
pinctrl-names = "default";
pinctrl-0 = <&ts_active>;
vdd-supply = <&vreg_tp_vddio>;
vio-supply = <&vreg_l14a_1p8>;
syna,reset-delay-ms = <200>;
syna,startup-delay-ms = <200>;
rmi4-f01@1 {
reg = <0x1>;
syna,nosleep-mode = <0x1>;
};
rmi4-f12@12 {
reg = <0x12>;
syna,sensor-type = <1>;
syna,clip-x-low = <0>;
syna,clip-x-high = <1080>;
syna,clip-y-low = <0>;
syna,clip-y-high = <2160>;
syna,rezero-wait-ms = <200>;
};
};
};
&pm8998_gpio {
vol_up_pin_a: vol-up-active {
pins = "gpio6";
@ -468,68 +545,42 @@
&tlmm {
gpio-reserved-ranges = <0 4>, <81 4>;
qupv3_se14_i2c_active: qupv3-se14-i2c-active {
pinmux {
i2c_ts_pins: i2c-touch-default {
mux {
pins = "gpio33", "gpio34";
function = "qup14";
function = "gpio";
};
pinconf {
config {
pins = "gpio33", "gpio34";
drive-strength = <2>;
bias-disable;
drive-strength = <2>;
};
};
qupv3_se14_i2c_sleep: qupv3-se14-i2c-sleep {
pinmux {
pins = "gpio33", "gpio34";
function = "gpio";
};
pinconf {
pins = "gpio33", "gpio34";
bias-pull-up;
drive-strength = <2>;
};
};
ts_active: ts-active {
pinmux {
ts_default_pins: ts-int {
mux {
pins = "gpio99", "gpio125";
function = "gpio";
};
pinconf {
config {
pins = "gpio99", "gpio125";
bias-pull-up;
drive-strength = <16>;
bias-pull-up;
};
};
ts_int_suspend: ts-int-suspend {
pinmux {
pins = "gpio125";
ts_enable_1p8: ts-1p8 {
mux {
pins = "gpio23";
function = "gpio";
};
pinconf {
pins = "gpio125";
bias-disable;
drive-strength = <2>;
};
};
ts_reset_suspend: ts-reset-suspend {
pinmux {
pins = "gpio99";
function = "gpio";
};
pinconf {
pins = "gpio99";
bias-disable;
drive-strength = <0x2>;
config {
pins = "gpio23";
drive-strength = <16>;
bias-pull-up;
};
};
};
@ -550,10 +601,20 @@
&usb_1 {
status = "okay";
/* We'll use this as USB 2.0 only */
qcom,select-utmi-as-pipe-clk;
};
&usb_1_dwc3 {
dr_mode = "peripheral";
/* fastest mode for USB 2 */
maximum-speed = "high-speed";
// extcon = <&extcon_usb1>;
/* Remove USB3 phy */
phys = <&usb_1_hsphy>;
phy-names = "usb2-phy";
};
&usb_1_hsphy {
@ -581,7 +642,7 @@
status = "okay";
reset-gpios = <&tlmm 150 GPIO_ACTIVE_LOW>;
vcc-supply = <&vreg_l20a_2p95>;
vcc-max-microamp = <600000>;
vcc-max-microamp = <800000>;
};
&ufs_mem_phy {
@ -590,18 +651,18 @@
vdda-pll-supply = <&vdda_ufs1_1p2>;
};
&wifi {
status = "okay";
/* PINCTRL - additions to nodes defined in sdm845.dtsi */
vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
&qup_i2c12_default {
drive-strength = <2>;
bias-disable;
qcom,snoc-host-cap-8bit-quirk;
};
// &qup_i2c14_default {
// drive-strength = <2>;
// bias-disable;
// };
/* PINCTRL - additions to nodes defined in sdm845.dtsi */
&qup_uart6_default {
pinmux {
@ -694,5 +755,23 @@
no-map;
};
/* hack: bootloader framebuffer */
cont_splash_region: memory@9d400000 {
compatible = "removed-dma-pool";
reg = <0 0x9D400000 0 0x02400000>;
no-map;
};
ramoops: ramoops@b0000000 {
compatible = "ramoops";
reg = <0 0xb0000000 0 0x00400000>;
record-size = <0x40000>; /*256x1024*/
console-size = <0x40000>;
ftrace-size = <0x40000>;
pmsg-size = <0x200000>;
ecc-size = <0x0>;
};
};
};

File diff suppressed because it is too large Load Diff