edk2-sdm845/sdm845Pkg/FdtBlob/sdm845-beryllium.dts

698 lines
14 KiB
Plaintext

// 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>;
};