From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: MCC45TR Date: Fri, 21 Aug 2026 16:26:23 +0300 Subject: [PATCH 01/23] arm64: dts: qcom: add Xiaomi Pad 5 Nabu --- arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/sm8150-xiaomi-nabu.dts | 1087 +++++++++++++++++ 2 files changed, 1088 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sm8150-xiaomi-nabu.dts diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index dffdb219f..de2b4e769 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -279,6 +279,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sm8150-microsoft-surface-duo.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8150-mtp.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8150-sony-xperia-kumano-bahamut.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8150-sony-xperia-kumano-griffin.dtb +dtb-$(CONFIG_ARCH_QCOM) += sm8150-xiaomi-nabu.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8250-hdk.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8250-mtp.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8250-samsung-r8q.dtb diff --git a/arch/arm64/boot/dts/qcom/sm8150-xiaomi-nabu.dts b/arch/arm64/boot/dts/qcom/sm8150-xiaomi-nabu.dts new file mode 100644 index 000000000..3d7a1ec7f --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sm8150-xiaomi-nabu.dts @@ -0,0 +1,1087 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2023-2024, map220v + */ + +/dts-v1/; + +#include +#include +#include +#include +#include +#include +#include "sm8150.dtsi" +#include "pm8150.dtsi" +#include "pm8150b.dtsi" +#include "pm8150l.dtsi" + +/delete-node/ &tz_mem; +/delete-node/ &rmtfs_mem; +/delete-node/ &adsp_mem; +/delete-node/ &mpss_mem; +/delete-node/ &venus_mem; +/delete-node/ &slpi_mem; +/delete-node/ &ipa_fw_mem; +/delete-node/ &ipa_gsi_mem; +/delete-node/ &gpu_mem; +/delete-node/ &spss_mem; +/delete-node/ &cdsp_mem; + +/ { + model = "Xiaomi Pad 5"; + compatible = "xiaomi,nabu", "qcom,sm8150"; + chassis-type = "tablet"; + qcom,msm-id = ; /* SM8150 v2.2 */ + qcom,board-id = <48 0>; + + aliases { + serial0 = &uart2; + hsuart0 = &uart13; + wifi0 = &wifi; + }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + tz_mem: memory@86200000 { + reg = <0x0 0x86200000 0x0 0x5500000>; + no-map; + }; + + adsp_mem: memory@8be00000 { + reg = <0x0 0x8be00000 0x0 0x2200000>; + no-map; + }; + + mpss_mem: memory@8e000000 { + reg = <0x0 0x8e000000 0x0 0x9600000>; + no-map; + }; + + venus_mem: memory@97600000 { + reg = <0x0 0x97600000 0x0 0x500000>; + no-map; + }; + + slpi_mem: memory@97b00000 { + reg = <0x0 0x97b00000 0x0 0x1400000>; + no-map; + }; + + ipa_fw_mem: memory@98f00000 { + reg = <0x0 0x98f00000 0x0 0x10000>; + no-map; + }; + + ipa_gsi_mem: memory@98f10000 { + reg = <0x0 0x98f10000 0x0 0x5000>; + no-map; + }; + + gpu_mem: memory@98f15000 { + reg = <0x0 0x98f15000 0x0 0x2000>; + no-map; + }; + + spss_mem: memory@99000000 { + reg = <0x0 0x99000000 0x0 0x100000>; + no-map; + }; + + cdsp_mem: memory@99100000 { + reg = <0x0 0x99100000 0x0 0x1400000>; + no-map; + }; + + cdsp_sec_mem: memory@a4c00000 { + reg = <0x0 0xa4c00000 0x0 0x3c00000>; + no-map; + }; + + ramoops@b0000000 { + compatible = "ramoops"; + reg = <0x0 0xb0000000 0x0 0x400000>; + record-size = <0x1000>; + console-size = <0x200000>; + ecc-size = <16>; + no-map; + }; + + rmtfs_mem: memory@fe101000 { + compatible = "qcom,rmtfs-mem"; + reg = <0 0xfe101000 0 0x300000>; + no-map; + + qcom,client-id = <1>; + qcom,vmid = <15>; + }; + }; + + battery: battery { + compatible = "simple-battery"; + charge-full-design-microamp-hours = <8720000>; + energy-full-design-microwatt-hours = <33600000>; + voltage-min-design-microvolt = <3400000>; + voltage-max-design-microvolt = <4480000>; + }; + + bl_vddpos_5p5: bl-vddpos-regulator { + compatible = "regulator-fixed"; + regulator-name = "bl_vddpos_5p5"; + regulator-min-microvolt = <5500000>; + regulator-max-microvolt = <5500000>; + regulator-enable-ramp-delay = <233>; + gpio = <&tlmm 114 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-boot-on; + }; + + bl_vddneg_5p5: bl-vddneg-regulator { + compatible = "regulator-fixed"; + regulator-name = "bl_vddneg_5p5"; + regulator-min-microvolt = <5500000>; + regulator-max-microvolt = <5500000>; + regulator-enable-ramp-delay = <233>; + gpio = <&tlmm 115 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-boot-on; + }; + + 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 PM8150 S4 because it + * is always-on; model it as a fixed regulator. + */ + vreg_s4a_1p8: pm8150-s4 { + 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: gpio-keys { + compatible = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&vol_up_n>; + + key-vol-up { + label = "Volume Up"; + gpios = <&pm8150_gpios 6 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <15>; + linux,can-disable; + wakeup-source; + }; + + event-hall-sensor { + label = "Hall Effect Sensor"; + gpios = <&tlmm 9 GPIO_ACTIVE_LOW>; + linux,input-type = ; + linux,code = ; + debounce-interval = <15>; + linux,can-disable; + // wakeup-source; + }; + }; +}; + +&apps_rsc { + pm8150-rpmh-regulators { + compatible = "qcom,pm8150-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-l1-l8-l11-supply = <&vreg_s6a_0p9>; + vdd-l2-l10-supply = <&vreg_bob>; + vdd-l3-l4-l5-l18-supply = <&vreg_s6a_0p9>; + vdd-l6-l9-supply = <&vreg_s8c_1p3>; + vdd-l7-l12-l14-l15-supply = <&vreg_s5a_2p0>; + vdd-l13-l16-l17-supply = <&vreg_bob>; + + vreg_s5a_2p0: smps5 { + regulator-min-microvolt = <1904000>; + regulator-max-microvolt = <2040000>; + }; + + vreg_s6a_0p9: smps6 { + regulator-min-microvolt = <920000>; + regulator-max-microvolt = <1128000>; + }; + + vreg_l1a_0p75: ldo1 { + regulator-min-microvolt = <752000>; + regulator-max-microvolt = <752000>; + regulator-initial-mode = ; + }; + + vreg_l2a_3p1: ldo2 { + regulator-min-microvolt = <3072000>; + regulator-max-microvolt = <3072000>; + regulator-initial-mode = ; + }; + + vreg_l3a_0p8: ldo3 { + regulator-min-microvolt = <480000>; + regulator-max-microvolt = <932000>; + regulator-initial-mode = ; + }; + + vreg_l5a_0p8: ldo5 { + regulator-min-microvolt = <880000>; + regulator-max-microvolt = <880000>; + regulator-initial-mode = ; + }; + + vreg_l6a_1p2: ldo6 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = ; + }; + + vreg_l7a_1p8: ldo7 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + }; + + vreg_l9a_1p2: ldo9 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = ; + }; + + vreg_l10a_2p5: ldo10 { + regulator-min-microvolt = <2504000>; + regulator-max-microvolt = <2950000>; + regulator-initial-mode = ; + }; + + vreg_l11a_0p8: ldo11 { + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <800000>; + regulator-initial-mode = ; + }; + + vreg_l12a_1p8: ldo12 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + }; + + vreg_l13a_2p7: ldo13 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-initial-mode = ; + }; + + vreg_l14a_1p8: ldo14 { + regulator-min-microvolt = <1880000>; + regulator-max-microvolt = <1880000>; + regulator-initial-mode = ; + }; + + vreg_l15a_1p7: ldo15 { + regulator-min-microvolt = <1704000>; + regulator-max-microvolt = <1704000>; + regulator-initial-mode = ; + }; + + vreg_l16a_2p7: ldo16 { + regulator-min-microvolt = <2704000>; + regulator-max-microvolt = <2960000>; + regulator-initial-mode = ; + }; + + vreg_l17a_3p0: ldo17 { + regulator-min-microvolt = <2856000>; + regulator-max-microvolt = <3008000>; + regulator-initial-mode = ; + }; + }; + + pm8150l-rpmh-regulators { + compatible = "qcom,pm8150l-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>; + vdd-s5-supply = <&vph_pwr>; + vdd-s6-supply = <&vph_pwr>; + vdd-s7-supply = <&vph_pwr>; + vdd-s8-supply = <&vph_pwr>; + + vdd-l1-l8-supply = <&vreg_s4a_1p8>; + vdd-l2-l3-supply = <&vreg_s8c_1p3>; + vdd-l4-l5-l6-supply = <&vreg_bob>; + vdd-l7-l11-supply = <&vreg_bob>; + vdd-l9-l10-supply = <&vreg_bob>; + + vdd-bob-supply = <&vph_pwr>; + vdd-flash-supply = <&vreg_bob>; + vdd-rgb-supply = <&vreg_bob>; + + vreg_bob: bob { + regulator-min-microvolt = <3008000>; + regulator-max-microvolt = <4000000>; + regulator-initial-mode = ; + regulator-allow-bypass; + }; + + vreg_s8c_1p3: smps8 { + regulator-min-microvolt = <1352000>; + regulator-max-microvolt = <1352000>; + }; + + vreg_l1c_1p8: ldo1 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + }; + + vreg_l2c_1p3: ldo2 { + regulator-min-microvolt = <1304000>; + regulator-max-microvolt = <1304000>; + regulator-initial-mode = ; + }; + + vreg_l3c_1p2: ldo3 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = ; + }; + + vreg_l4c_1p8: ldo4 { + regulator-min-microvolt = <1704000>; + regulator-max-microvolt = <2928000>; + regulator-initial-mode = ; + }; + + vreg_l5c_1p8: ldo5 { + regulator-min-microvolt = <1704000>; + regulator-max-microvolt = <2928000>; + regulator-initial-mode = ; + }; + + vreg_l6c_2p9: ldo6 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2960000>; + regulator-initial-mode = ; + }; + + vreg_l7c_3p0: ldo7 { + regulator-min-microvolt = <2856000>; + regulator-max-microvolt = <3104000>; + regulator-initial-mode = ; + }; + + vreg_l8c_1p8: ldo8 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + }; + + vreg_l9c_2p9: ldo9 { + regulator-min-microvolt = <2704000>; + regulator-max-microvolt = <2960000>; + regulator-initial-mode = ; + }; + + vreg_l10c_3p3: ldo10 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3312000>; + regulator-initial-mode = ; + }; + + vreg_l11c_3p3: ldo11 { + regulator-min-microvolt = <3104000>; + regulator-max-microvolt = <3312000>; + regulator-initial-mode = ; + }; + }; + + /* PM8009 is not present on these boards, even if downstream sources suggest so. */ +}; + +//SD860 additional cpu frequency +&cpu7_opp_table { + cpu7_opp21: opp-2956800000 { + opp-hz = /bits/ 64 <2956800000>; + opp-peak-kBps = <8368000 51609600>; + }; +}; + +&gpi_dma0 { + status = "okay"; +}; + +&gpi_dma1 { + status = "okay"; +}; + +&gpi_dma2 { + status = "okay"; +}; + +&gmu { + status = "okay"; +}; + +&gpu { + status = "okay"; + + zap-shader { + memory-region = <&gpu_mem>; + firmware-name = "qcom/sm8150/xiaomi/nabu/a640_zap.mbn"; + }; +}; + +&i2c0 { + status = "okay"; + clock-frequency = <400000>; + + backlight: backlight@11 { + compatible = "kinetic,ktz8866"; + reg = <0x11>; + vddpos-supply = <&bl_vddpos_5p5>; + vddneg-supply = <&bl_vddneg_5p5>; + enable-gpios = <&tlmm 27 GPIO_ACTIVE_HIGH>; + current-num-sinks = <5>; + kinetic,current-ramp-delay-ms = <128>; + kinetic,led-enable-ramp-delay-ms = <1>; + kinetic,enable-lcd-bias; + }; +}; + +&i2c4 { + status = "okay"; + + typec-mux@43 { + compatible = "fcs,fsa4480"; + reg = <0x43>; + + vcc-supply = <&vreg_bob>; + + mode-switch; + orientation-switch; + + port { + fsa4480_sbu_mux: endpoint { + remote-endpoint = <&pm8150b_sbu_mux_in>; + }; + }; + }; +}; + +&i2c7 { + status = "okay"; + clock-frequency = <400000>; + + cs35l41_br: cs35l41@40 { + compatible = "cirrus,cs35l41"; + reg = <0x40>; + interrupt-parent = <&tlmm>; + interrupts = <81 IRQ_TYPE_LEVEL_LOW>; + reset-gpios = <&tlmm 92 GPIO_ACTIVE_HIGH>; + #sound-dai-cells = <1>; + sound-name-prefix = "BR"; + cirrus,boost-peak-milliamp = <4000>; + cirrus,boost-ind-nanohenry = <1000>; + cirrus,boost-cap-microfarad = <15>; + cirrus,asp-sdout-hiz = <3>; + cirrus,gpio2-src-select = <4>; + cirrus,gpio2-output-enable; + }; + + cs35l41_tr: cs35l41@41 { + compatible = "cirrus,cs35l41"; + reg = <0x41>; + interrupt-parent = <&tlmm>; + interrupts = <90 IRQ_TYPE_LEVEL_LOW>; + reset-gpios = <&tlmm 92 GPIO_ACTIVE_HIGH>; + #sound-dai-cells = <1>; + sound-name-prefix = "TR"; + cirrus,boost-peak-milliamp = <4000>; + cirrus,boost-ind-nanohenry = <1000>; + cirrus,boost-cap-microfarad = <15>; + cirrus,asp-sdout-hiz = <3>; + cirrus,gpio2-src-select = <4>; + cirrus,gpio2-output-enable; + }; + + cs35l41_bl: cs35l41@42 { + compatible = "cirrus,cs35l41"; + reg = <0x42>; + interrupt-parent = <&tlmm>; + interrupts = <91 IRQ_TYPE_LEVEL_LOW>; + reset-gpios = <&tlmm 92 GPIO_ACTIVE_HIGH>; + #sound-dai-cells = <1>; + sound-name-prefix = "BL"; + cirrus,boost-peak-milliamp = <4000>; + cirrus,boost-ind-nanohenry = <1000>; + cirrus,boost-cap-microfarad = <15>; + cirrus,asp-sdout-hiz = <3>; + cirrus,gpio2-src-select = <4>; + cirrus,gpio2-output-enable; + }; + + cs35l41_tl: cs35l41@43 { + compatible = "cirrus,cs35l41"; + reg = <0x43>; + interrupt-parent = <&tlmm>; + interrupts = <93 IRQ_TYPE_LEVEL_LOW>; + reset-gpios = <&tlmm 92 GPIO_ACTIVE_HIGH>; + #sound-dai-cells = <1>; + sound-name-prefix = "TL"; + cirrus,boost-peak-milliamp = <4000>; + cirrus,boost-ind-nanohenry = <1000>; + cirrus,boost-cap-microfarad = <15>; + cirrus,asp-sdout-hiz = <3>; + cirrus,gpio2-src-select = <4>; + cirrus,gpio2-output-enable; + }; +}; + +&mdss { + status = "okay"; +}; + +&mdss_dsi0 { + vdda-supply = <&vreg_l3c_1p2>; + qcom,dual-dsi-mode; + qcom,sync-dual-dsi; + qcom,master-dsi; + status = "okay"; + + display_panel: panel@0 { + compatible = "xiaomi,nabu-csot-nt36523", "novatek,nt36523"; + reg = <0>; + vddio-supply = <&vreg_l14a_1p8>; + reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>; + backlight = <&backlight>; + rotation = <90>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + panel_in_0: endpoint { + remote-endpoint = <&mdss_dsi0_out>; + }; + }; + + port@1{ + reg = <1>; + + panel_in_1: endpoint { + remote-endpoint = <&mdss_dsi1_out>; + }; + }; + + }; + }; +}; + +&mdss_dsi0_out { + data-lanes = <0 1 2>; + remote-endpoint = <&panel_in_0>; +}; + +&mdss_dsi0_phy { + vdds-supply = <&vreg_l5a_0p8>; + phy-type = ; + status = "okay"; +}; + +&mdss_dsi1 { + vdda-supply = <&vreg_l3c_1p2>; + qcom,dual-dsi-mode; + qcom,sync-dual-dsi; + /* DSI1 is slave, so use DSI0 clocks */ + assigned-clock-parents = <&mdss_dsi0_phy 0>, <&mdss_dsi0_phy 1>; + status = "okay"; +}; + +&mdss_dsi1_out { + data-lanes = <0 1 2>; + remote-endpoint = <&panel_in_1>; +}; + +&mdss_dsi1_phy { + vdds-supply = <&vreg_l5a_0p8>; + phy-type = ; + status = "okay"; +}; + +&pm8150_gpios { + vol_up_n: vol-up-n-state { + pins = "gpio6"; + function = "normal"; + power-source = <1>; + input-enable; + bias-pull-up; + }; +}; + +&pm8150b_typec { + vdd-pdphy-supply = <&vreg_l2a_3p1>; + status = "okay"; + + connector { + compatible = "usb-c-connector"; + + power-role = "dual"; + data-role = "dual"; + self-powered; + + source-pdos = ; + + sink-pdos = ; + + op-sink-microwatt = <10000000>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + pm8150b_role_switch_in: endpoint { + remote-endpoint = <&usb_1_dwc3_hs>; + }; + }; + + port@1 { + reg = <1>; + + pm8150b_sbu_mux_in: endpoint { + remote-endpoint = <&fsa4480_sbu_mux>; + }; + }; + }; + }; +}; + +&pm8150b_vbus { + status = "okay"; +}; + +&pm8150l_flash { + status = "okay"; + + led-0 { + function = LED_FUNCTION_FLASH; + color = ; + led-sources = <1>; + led-max-microamp = <200000>; + flash-max-microamp = <1000000>; + flash-max-timeout-us = <1280000>; + }; +}; + +&pon_pwrkey { + status = "okay"; +}; + +&pon_resin { + linux,code = ; + status = "okay"; +}; + +&qupv3_id_0 { + status = "okay"; +}; + +&qupv3_id_1 { + status = "okay"; +}; + +&qupv3_id_2 { + status = "okay"; +}; + +&remoteproc_adsp { + status = "okay"; + firmware-name = "qcom/sm8150/xiaomi/nabu/adsp.mbn"; +}; + +&remoteproc_cdsp { + status = "okay"; + firmware-name = "qcom/sm8150/xiaomi/nabu/cdsp.mbn"; +}; + +&remoteproc_mpss { + status = "okay"; + firmware-name = "qcom/sm8150/xiaomi/nabu/modem.mbn"; +}; + +&remoteproc_slpi { + compatible = "qcom,sm8150-slpi-pas"; + status = "okay"; + firmware-name = "qcom/sm8150/xiaomi/nabu/slpi_nb.mbn"; +}; + +&spi18 { + status = "okay"; + + touchscreen@0 { + compatible = "novatek,NVT-ts-spi"; + reg = <0>; + + spi-max-frequency = <9600000>; + novatek,irq-gpio = <&tlmm 39 0x2001>; + + novatek,pen-support; + novatek,wgp-stylus; + + /* 523 */ + novatek,swrst-n8-addr = <0x03F0FE>; + novatek,spi-rd-fast-addr = <0x03F310>; + + firmware-name = "novatek/novatek_nt36523_fw.bin"; + }; +}; + +&tlmm { + gpio-reserved-ranges = <126 4>; + + quat_tdm_active: quat-tdm-active-state { + pins = "gpio137", "gpio138"; + function = "qua_mi2s"; + drive-strength = <8>; + bias-disable; + output-high; + }; + + quat_tdm_sd1_active: quat-tdm-sd1-active-state { + pins = "gpio140"; + function = "qua_mi2s"; + drive-strength = <8>; + bias-disable; + }; + + qup_uart13_sleep: qup-uart13-sleep { + pinmux { + pins = "gpio43", "gpio44", + "gpio45", "gpio46"; + function = "gpio"; + }; + + pinconf-cts { + /* + * Configure a pull-down on CTS to match the pull of + * the Bluetooth module. + */ + pins = "gpio43"; + bias-pull-down; + }; + + pinconf-rts { + /* + * Configure pull-down on RTS. As RTS is active low + * signal, pull it low to indicate the BT SoC that it + * can wakeup the system anytime from suspend state by + * pulling RX low (by sending wakeup bytes). + */ + pins = "gpio44"; + bias-pull-down; + }; + + pinconf-tx { + /* + * Configure pull-up on TX when it isn't actively driven + * to prevent BT SoC from receiving garbage during sleep. + */ + pins = "gpio45"; + bias-pull-up; + }; + + pinconf-rx { + /* + * Configure a pull-up on RX. This is needed to avoid + * garbage data when the TX pin of the Bluetooth module + * is floating which may cause spurious wakeups. + */ + pins = "gpio46"; + bias-pull-up; + }; + }; + + bl_en_state: bl-default-state { + bl-en { + pins = "gpio27"; + function = "gpio"; + + drive-strength = <16>; + output-high; + bias-disable; + }; + }; + + keyboard_active: keyboard-active-state { + sleep-pins { + pins = "gpio4"; + function = "gpio"; + drive-strength = <8>; + bias-pull-up; + }; + + reset-pins { + pins = "gpio49"; + function = "gpio"; + drive-strength = <4>; + bias-pull-up; + output-high; + }; + + vdd-pins { + pins = "gpio82"; + function = "gpio"; + drive-strength = <4>; + bias-pull-up; + output-high; + }; + }; + + keyboard_suspend: keyboard-suspend-state { + sleep-pins { + pins = "gpio4"; + function = "gpio"; + drive-strength = <8>; + bias-pull-down; + }; + + reset-pins { + pins = "gpio49"; + function = "gpio"; + drive-strength = <4>; + bias-pull-down; + }; + + vdd-pins { + pins = "gpio82"; + function = "gpio"; + drive-strength = <4>; + bias-pull-down; + }; + }; + + hall { + hall_intr3: hall_intr3 { + mux { + pins = "gpio101"; + function = "gpio"; + }; + + config { + pins = "gpio101"; + drive-strength = <2>; + bias-pull-up; + input-enable; + }; + }; + + hall_intr4: hall_intr4 { + mux { + pins = "gpio134"; + function = "gpio"; + }; + + config { + pins = "gpio134"; + drive-strength = <2>; + bias-pull-up; + input-enable; + }; + }; + }; + + idt { + idt_int: idt_int { + mux { + pins = "gpio95"; + function = "gpio"; + }; + + config { + pins = "gpio95"; + drive-strength = <2>; + bias-pull-up; + input-enable; + }; + }; + + txon_enable: txon_enable { + mux { + pins = "gpio3"; + function = "gpio"; + }; + + config { + pins = "gpio3"; + drive-strength = <16>; + bias-disable; + bias-pull-down; + output-low; + }; + }; + }; +}; + +&uart2 { + status = "okay"; +}; + +&uart13 { + status = "okay"; + + /delete-property/interrupts; + interrupts-extended = <&intc GIC_SPI 585 IRQ_TYPE_LEVEL_HIGH>, + <&tlmm 46 IRQ_TYPE_EDGE_FALLING>; + + pinctrl-names = "default", "sleep"; + pinctrl-1 = <&qup_uart13_sleep>; + + bluetooth: bluetooth { + compatible = "qcom,wcn3991-bt"; + vddio-supply = <&vreg_l1a_0p75>; + vddxo-supply = <&vreg_l7a_1p8>; + vddrf-supply = <&vreg_l2c_1p3>; + vddch0-supply = <&vreg_l11c_3p3>; + max-speed = <3200000>; + local-bd-address = [ 21 00 00 00 5a ad ]; + }; +}; + +&ufs_mem_hc { + status = "okay"; + + reset-gpios = <&tlmm 175 GPIO_ACTIVE_LOW>; + + vcc-supply = <&vreg_l10a_2p5>; + vcc-max-microamp = <750000>; + vccq-supply = <&vreg_l9a_1p2>; + vccq-max-microamp = <700000>; + vccq2-supply = <&vreg_s4a_1p8>; + vccq2-max-microamp = <750000>; +}; + +&ufs_mem_phy { + status = "okay"; + + vdda-phy-supply = <&vreg_l5a_0p8>; + vdda-phy-max-microamp = <90200>; + vdda-pll-supply = <&vreg_l3c_1p2>; + vdda-pll-max-microamp = <19000>; +}; + +&usb_1 { + /* USB 2.0 only */ + qcom,select-utmi-as-pipe-clk; + status = "okay"; +}; + +&usb_1_dwc3 { + dr_mode = "otg"; + maximum-speed = "high-speed"; + /* Remove USB3 phy */ + phys = <&usb_1_hsphy>; + phy-names = "usb2-phy"; + usb-role-switch; +}; + +&usb_1_dwc3_hs { + remote-endpoint = <&pm8150b_role_switch_in>; +}; + +&usb_1_hsphy { + vdda-pll-supply = <&vreg_l5a_0p8>; + vdda18-supply = <&vreg_l12a_1p8>; + vdda33-supply = <&vreg_l2a_3p1>; + status = "okay"; +}; + +&usb_2 { + /* USB 2.0 only */ + qcom,select-utmi-as-pipe-clk; + status = "okay"; +}; + +&usb_2_hsphy { + vdda-pll-supply = <&vreg_l5a_0p8>; + vdda18-supply = <&vreg_l12a_1p8>; + vdda33-supply = <&vreg_l2a_3p1>; + status = "okay"; + pinctrl-0 = <&keyboard_active>; + pinctrl-1 = <&keyboard_suspend>; + pinctrl-names = "default", "sleep"; +}; + +&usb_2_dwc3 { + dr_mode = "host"; + maximum-speed = "high-speed"; + /* Remove USB3 phy */ + phys = <&usb_2_hsphy>; + phy-names = "usb2-phy"; +}; + +&wifi { + status = "okay"; + + vdd-0.8-cx-mx-supply = <&vreg_l1a_0p75>; + vdd-1.8-xo-supply = <&vreg_l7a_1p8>; + vdd-1.3-rfa-supply = <&vreg_l2c_1p3>; + vdd-3.3-ch0-supply = <&vreg_l11c_3p3>; +}; + +&i2c17 { + status = "okay"; + + idtp9418: idtp9418@3b { + compatible = "idt,p9418"; + reg = <0x3b>; + status = "okay"; + irq-gpios = <&tlmm 95 GPIO_ACTIVE_HIGH>; + pen-det-active-high-gpios = <&tlmm 101 GPIO_ACTIVE_HIGH>; + pen-det-active-low-gpios =<&tlmm 134 GPIO_ACTIVE_HIGH>; + enable-gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>; + boost-enable-gpios = <&tlmm 47 GPIO_ACTIVE_HIGH>; + }; +};