diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index 4d7410a08e87cd..becb1f18d0cf69 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -169,6 +169,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sdm636-asus-x00td.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm636-sony-xperia-ganges-mermaid.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm636-xiaomi-tulip.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm660-xiaomi-clover.dtb +dtb-$(CONFIG_ARCH_QCOM) += sdm660-xiaomi-clover-plus.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm660-xiaomi-jasmine.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm660-xiaomi-lavender.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm660-xiaomi-platina.dtb diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-clover-common.dtsi b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-clover-common.dtsi new file mode 100644 index 00000000000000..83f80521ba3df9 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-clover-common.dtsi @@ -0,0 +1,580 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2020, Mark Hargreaves + */ + +/dts-v1/; +#include "sdm660.dtsi" +#include "pm660.dtsi" +#include "pm660l.dtsi" +#include +#include + +/delete-node/ &adsp_region; +/delete-node/ &buffer_mem; +/delete-node/ &mba_region; +/delete-node/ &zap_shader_region; + +/ { + aliases { + serial0 = &blsp1_uart2; /* Debug UART */ + serial1 = &blsp2_uart1; /* Bluetooth UART */ + }; + + chosen { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + stdout-path = "serial0:115200n8"; + + framebuffer@9d400000 { + compatible = "simple-framebuffer"; + reg = <0x0 0x9d400000 0x0 (1200 * 1920 * 4)>; + width = <1200>; + height = <1920>; + stride = <(1200 * 4)>; + format = "a8r8g8b8"; + }; + }; + + vph_pwr: vph-pwr-regulator { + compatible = "regulator-fixed"; + regulator-name = "vph_pwr"; + + regulator-always-on; + regulator-boot-on; + }; + + gpio-keys { + compatible = "gpio-keys"; + + key-volup { + label = "Volume up"; + gpios = <&pm660l_gpios 7 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <15>; + }; + }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + ramoops@a0000000 { + compatible = "ramoops"; + reg = <0x0 0xa0000000 0x0 0x400000>; + console-size = <0x20000>; + record-size = <0x20000>; + ftrace-size = <0x0>; + pmsg-size = <0x20000>; + }; + + adsp_region: adsp@92a00000 { + reg = <0x0 0x92a00000 0x0 0x1f00000>; + no-map; + }; + + zap_shader_region: gpu@f0b00000 { + compatible = "shared-dma-pool"; + reg = <0x0 0xf0b00000 0x0 0x2000>; + no-map; + }; + + mba_region: mba@94900000 { + reg = <0x0 0x94900000 0x0 0x200000>; + no-map; + }; + + buffer_mem: buffer_region@94b00000 { + reg = <0x00 0x94b00000 0x00 0x600000>; + no-map; + }; + + framebuffer_memory@9d400000 { + reg = <0x0 0x9d400000 0x0 (1200 * 1920 * 4)>; + no-map; + }; + }; +}; + +&adreno_gpu{ + status = "okay"; + + zap-shader { + memory-region = <&zap_shader_region>; + firmware-name = "a512_zap.mdt"; + }; +}; + +&anoc2_smmu { + status = "okay"; +}; + +&blsp2_uart1 { + status = "okay"; + + bluetooth { + compatible = "qcom,wcn3990-bt"; + vddxo-supply = <&vreg_l9a_1p8>; // downstream: vdd-core-supply + vddrf-supply = <&vreg_l6a_1p3>; // vdd-pa-supply + vddch0-supply = <&vreg_l19a_3p3>; // vdd-ldo-supply + //vddio-supply = <&vreg_l13a_1p8>; // chip-pwd-supply ? + max-speed = <3200000>; + /* This path is relative to the qca/ subdir under lib/firmware. */ + //firmware-name = "crnv21.bin"; + }; +}; + +&blsp1_uart2 { + status = "disabled"; +}; + +&gpucc{ + status = "okay"; +}; + +&kgsl_smmu { + status = "okay"; +}; + +&lpass_smmu { + status = "okay"; +}; + +&mdss { + status = "okay"; +}; + +&mdss_dsi1 { + status = "disabled"; +}; + +&mdss_dsi1_phy { + status = "disabled"; +}; + +&mmcc { + status = "okay"; +}; + +&mmss_smmu { + status = "okay"; +}; + +&pon_pwrkey { + status = "okay"; +}; + +&pon_resin { + status = "okay"; + + linux,code = ; +}; + +&qusb2phy0 { + status = "okay"; +}; + +&remoteproc_mss { + firmware-name = "mba.mbn", "modem.mdt"; + status = "okay"; +}; + +&rpm_requests { + regulators-0 { + compatible = "qcom,rpm-pm660l-regulators"; + + vdd_s1-supply = <&vph_pwr>; + vdd_s2-supply = <&vph_pwr>; + vdd_s3_s4-supply = <&vph_pwr>; + vdd_s5-supply = <&vph_pwr>; + vdd_s6-supply = <&vph_pwr>; + + vdd_l1_l9_l10-supply = <&vreg_s2b_1p05>; + vdd_l2-supply = <&vreg_bob>; + vdd_l3_l5_l7_l8-supply = <&vreg_bob>; + vdd_l4_l6-supply = <&vreg_bob>; + vdd_bob-supply = <&vph_pwr>; + + vreg_bob: bob { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3600000>; + regulator-enable-ramp-delay = <500>; + regulator-ramp-delay = <0>; + }; + + vreg_s1b_1p125: s1 { + regulator-min-microvolt = <1125000>; + regulator-max-microvolt = <1125000>; + regulator-enable-ramp-delay = <200>; + regulator-ramp-delay = <0>; + }; + + vreg_s2b_1p05: s2 { + regulator-min-microvolt = <1050000>; + regulator-max-microvolt = <1050000>; + regulator-enable-ramp-delay = <200>; + regulator-ramp-delay = <0>; + }; + + /* LDOs */ + vreg_l1b_0p925: l1 { + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <925000>; + regulator-enable-ramp-delay = <250>; + regulator-ramp-delay = <0>; + regulator-allow-set-load; + }; + + vreg_l2b_2p95: l2 { + /* + * This regulator supports 1.648 - 3.104V on this board + * but we set a max voltage of anything less than 2.7V + * to satisfy a condition in sdhci.c that will disable + * 3.3V SDHCI signaling, which happens to be not really + * supported on the Xperia Nile/Ganges platform. + */ + regulator-min-microvolt = <350000>; + regulator-max-microvolt = <3100000>; + regulator-enable-ramp-delay = <250>; + regulator-ramp-delay = <0>; + regulator-allow-set-load; + }; + + vreg_l3b_3p0: l3 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-enable-ramp-delay = <250>; + regulator-ramp-delay = <0>; + regulator-min-microamp = <200>; + regulator-max-microamp = <600000>; + regulator-system-load = <100000>; + regulator-allow-set-load; + regulator-always-on; + }; + + vreg_l4b_2p95: l4 { + regulator-min-microvolt = <1700000>; + regulator-max-microvolt = <2952000>; + regulator-enable-ramp-delay = <250>; + regulator-ramp-delay = <0>; + + regulator-min-microamp = <200>; + regulator-max-microamp = <600000>; + regulator-system-load = <570000>; + regulator-allow-set-load; + }; + + /* + * Downstream specifies a range of 1721-3600mV, + * but the only assigned consumers are SDHCI2 VMMC + * and Coresight QPDI that both request pinned 2.95V. + * Tighten the range to 1.8-3.328 (closest to 3.3) to + * make the mmc driver happy. + */ + vreg_l5b_2p95: l5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3328000>; + regulator-enable-ramp-delay = <250>; + regulator-ramp-delay = <0>; + regulator-allow-set-load; + regulator-system-load = <800000>; + }; + + vreg_l6b_3p3: l6 { + regulator-min-microvolt = <1704000>; + regulator-max-microvolt = <3312000>; + regulator-enable-ramp-delay = <250>; + regulator-ramp-delay = <0>; + }; + + vreg_l7b_3p125: l7 { + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <3125000>; + regulator-enable-ramp-delay = <250>; + regulator-ramp-delay = <0>; + }; + + vreg_l8b_3p3: l8 { + regulator-min-microvolt = <3200000>; + regulator-max-microvolt = <3400000>; + regulator-enable-ramp-delay = <250>; + regulator-ramp-delay = <0>; + }; + + vreg_l9b_0p87: l9 { + /* Unused */ + status = "disabled"; + }; + + vreg_l10b_0p915: l10 { + /* Unused */ + status = "disabled"; + }; + }; + + regulators-1 { + compatible = "qcom,rpm-pm660-regulators"; + + vdd_s1-supply = <&vph_pwr>; + vdd_s2-supply = <&vph_pwr>; + vdd_s3-supply = <&vph_pwr>; + vdd_s4-supply = <&vph_pwr>; + vdd_s5-supply = <&vph_pwr>; + vdd_s6-supply = <&vph_pwr>; + + vdd_l1_l6_l7-supply = <&vreg_s5a_1p35>; + vdd_l2_l3-supply = <&vreg_s2b_1p05>; + vdd_l5-supply = <&vreg_s2b_1p05>; + vdd_l8_l9_l10_l11_l12_l13_l14-supply = <&vreg_s4a_2p04>; + vdd_l15_l16_l17_l18_l19-supply = <&vreg_bob>; + + vreg_s1a_ftapc0: s1 { + /* Unused */ + status = "disabled"; + }; + + vreg_s2a_ftapc1: s2 { + /* Unused */ + status = "disabled"; + }; + + vreg_s3a_hfapc1: s3 { + /* Unused */ + status = "disabled"; + }; + + vreg_s4a_2p04: s4 { + regulator-min-microvolt = <1805000>; + regulator-max-microvolt = <2040000>; + regulator-enable-ramp-delay = <200>; + regulator-ramp-delay = <0>; + regulator-always-on; + }; + + vreg_s5a_1p35: s5 { + regulator-min-microvolt = <1224000>; + regulator-max-microvolt = <1350000>; + regulator-enable-ramp-delay = <200>; + regulator-ramp-delay = <0>; + }; + + vreg_s6a_0p87: s6 { + regulator-min-microvolt = <504000>; + regulator-max-microvolt = <992000>; + regulator-enable-ramp-delay = <150>; + regulator-ramp-delay = <0>; + }; + + /* LDOs */ + vreg_l1a_1p225: l1 { + regulator-min-microvolt = <1150000>; + regulator-max-microvolt = <1250000>; + regulator-enable-ramp-delay = <250>; + regulator-ramp-delay = <0>; + regulator-allow-set-load; + /* regulator-always-on; */ + }; + + vreg_l2a_1p0: l2 { + regulator-min-microvolt = <950000>; + regulator-max-microvolt = <1010000>; + regulator-enable-ramp-delay = <250>; + regulator-ramp-delay = <0>; + }; + + vreg_l3a_1p0: l3 { + regulator-min-microvolt = <950000>; + regulator-max-microvolt = <1010000>; + regulator-enable-ramp-delay = <250>; + regulator-ramp-delay = <0>; + }; + + vreg_l5a_0p848: l5 { + regulator-min-microvolt = <525000>; + regulator-max-microvolt = <952000>; + regulator-enable-ramp-delay = <250>; + regulator-ramp-delay = <0>; + }; + + vreg_l6a_1p3: l6 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1368000>; + regulator-allow-set-load; + regulator-enable-ramp-delay = <250>; + regulator-ramp-delay = <0>; + }; + + vreg_l7a_1p2: l7 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-enable-ramp-delay = <250>; + regulator-ramp-delay = <0>; + }; + + vreg_l8a_1p8: l8 { + regulator-min-microvolt = <1750000>; + regulator-max-microvolt = <1900000>; + regulator-enable-ramp-delay = <250>; + regulator-ramp-delay = <0>; + regulator-system-load = <325000>; + regulator-allow-set-load; + }; + + + vreg_l9a_1p8: l9 { + regulator-min-microvolt = <1750000>; + regulator-max-microvolt = <1900000>; + regulator-enable-ramp-delay = <250>; + regulator-ramp-delay = <0>; + regulator-allow-set-load; + }; + + vreg_l10a_1p8: l10 { + regulator-min-microvolt = <1780000>; + regulator-max-microvolt = <1950000>; + regulator-enable-ramp-delay = <250>; + regulator-ramp-delay = <0>; + regulator-allow-set-load; + }; + + vreg_l11a_1p8: l11 { + regulator-min-microvolt = <1784000>; + regulator-max-microvolt = <1944000>; + regulator-enable-ramp-delay = <250>; + regulator-ramp-delay = <0>; + regulator-always-on; + }; + + vreg_l12a_1p8: l12 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1944000>; + regulator-enable-ramp-delay = <250>; + regulator-ramp-delay = <0>; + }; + + /* This gives power to the LPDDR4: never turn it off! */ + vreg_l13a_1p8: l13 { + regulator-min-microvolt = <1780000>; + regulator-max-microvolt = <1950000>; + regulator-enable-ramp-delay = <250>; + regulator-ramp-delay = <0>; + regulator-boot-on; + regulator-always-on; + }; + + vreg_l14a_1p8: l14 { + regulator-min-microvolt = <1710000>; + regulator-max-microvolt = <1904000>; + regulator-enable-ramp-delay = <250>; + regulator-ramp-delay = <0>; + }; + + vreg_l15a_1p8: l15 { + regulator-min-microvolt = <1650000>; + regulator-max-microvolt = <2952000>; + regulator-enable-ramp-delay = <250>; + regulator-ramp-delay = <0>; + }; + + vreg_l16a_2p7: l16 { + /* Unused */ + status = "disabled"; + }; + + vreg_l17a_1p8: l17 { + regulator-min-microvolt = <1648000>; + regulator-max-microvolt = <2952000>; + regulator-enable-ramp-delay = <250>; + regulator-ramp-delay = <0>; + }; + + vreg_l18a_1v8: l18 { + status = "disabled"; + }; + + vreg_l19a_3p3: l19 { + regulator-min-microvolt = <3200000>; + regulator-max-microvolt = <3400000>; + regulator-enable-ramp-delay = <250>; + regulator-ramp-delay = <0>; + regulator-allow-set-load; + }; + }; +}; + +&sdc2_state_on { + sd-cd-pins { + pins = "gpio54"; + function = "gpio"; + bias-pull-up; + drive-strength = <2>; + }; +}; + +&sdc2_state_off { + sd-cd-pins { + pins = "gpio54"; + function = "gpio"; + bias-disable; + drive-strength = <2>; + }; +}; + +&sdhc_1 { + status = "okay"; + bus-width = <8>; + non-removable; + mmc-ddr-1_8v; + mmc-hs200-1_8v; + mmc-hs400-1_8v; +}; + +&sdhc_2 { + status = "okay"; + + vmmc-supply = <&vreg_l5b_2p95>; + vqmmc-supply = <&vreg_l2b_2p95>; +}; + +&tlmm { + gpio-reserved-ranges = <0 4>; + + mdss_dsi_active: mdss-dsi-active-state { + pins = "gpio62"; + function = "gpio"; + drive-strength = <8>; + bias-disable; + }; + + mdss_te_active: mdss-te-active-state { + pins = "gpio59"; + function = "mdp_vsync"; + drive-strength = <2>; + bias-pull-down; + }; +}; + +&usb3 { + status = "okay"; +}; + +&usb3_dwc3 { + status = "okay"; + dr_mode = "peripheral"; +}; + +&venus { + firmware-name = "qcom/venus-4.4/venus.mdt"; + status = "okay"; +}; + +&wifi { + vdd-0.8-cx-mx-supply = <&vreg_l5a_0p848>; + vdd-1.8-xo-supply = <&vreg_l9a_1p8>; + vdd-1.3-rfa-supply = <&vreg_l6a_1p3>; + vdd-3.3-ch0-supply = <&vreg_l19a_3p3>; + + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-clover-plus.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-clover-plus.dts new file mode 100644 index 00000000000000..9525f1299830d8 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-clover-plus.dts @@ -0,0 +1,211 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2023, Nickolay Goppen + */ + +/dts-v1/; +#include "sdm660-xiaomi-clover-common.dtsi" + +/ { + model = "Xiaomi Mi Pad 4 Plus"; + compatible = "xiaomi,clover-plus", "qcom,sdm660"; + qcom,board-id = <11 0>; + qcom,msm-id = <324 0>; + qcom,pmic-id = <0x0001001b 0x0101011a 0x0 0x0>, <0x0001001b 0x0201011a 0x0 0x0>,<0x0001001b 0x0102001a 0x0 0x0>; + + vreg_bl_vddio: lcd-backlight-regulator { + compatible = "regulator-fixed"; + regulator-name = "vreg_bl_vddio"; + regulator-min-microvolt = <3150000>; + regulator-max-microvolt = <3150000>; + + gpio = <&tlmm 72 0>; + enable-active-high; + + startup-delay-us = <70000>; + + pinctrl-names = "default"; + pinctrl-0 = <&lcd_bl_en_default>; + }; +}; + +&blsp_i2c3 { + status = "okay"; + + touchscreen@5d { + compatible = "goodix,gt9110"; + reg = <0x5d>; + AVDD28-supply = <&vreg_l3b_3p0>; + VDDIO-supply = <&vreg_l11a_1p8>; + interrupt-parent = <&tlmm>; + interrupts = <67 IRQ_TYPE_LEVEL_LOW>; + pinctrl-names = "default", "int-output-low", "int-output-high", "int-input"; + pinctrl-0 = <&ts_int_default>; + pinctrl-1 = <&ts_int_output_low>; + pinctrl-2 = <&ts_int_output_high>; + pinctrl-3 = <&ts_int_input>; + reset-gpios = <&tlmm 66 GPIO_ACTIVE_HIGH>; + touchscreen-max-id = <10>; + touchscreen-size-x = <1200>; + touchscreen-size-y = <1920>; + touchscreen-max-w = <512>; + touchscreen-max-p = <512>; + }; +}; + +&blsp_i2c8 { + status = "disabled"; + i2c_backlight: backlight@2c { + compatible = "ti,lp8556"; + reg = <0x2c>; + bl-name = "lcd-backlight"; + enable-supply = <&vreg_bl_vddio>; + + rom_16h { + rom-addr = /bits/ 8 <0x16>; + rom-val = /bits/ 8 <0x0F>; + }; + rom_01h { + rom-addr = /bits/ 8 <0x01>; + rom-val = /bits/ 8 <0x86>; + }; + rom_00h { + rom-addr = /bits/ 8 <0x00>; + rom-val = /bits/ 8 <0x00>; + }; + rom_01h_2 { + rom-addr = /bits/ 8 <0x01>; + rom-val = /bits/ 8 <0x87>; + }; + rom_9Eh { + rom-addr = /bits/ 8 <0x9E>; + rom-val = /bits/ 8 <0x20>; + }; + rom_A0h { + rom-addr = /bits/ 8 <0xA0>; + rom-val = /bits/ 8 <0x09>; + }; + rom_A1h { + rom-addr = /bits/ 8 <0xA1>; + rom-val = /bits/ 8 <0x5F>; + }; + rom_A3h { + rom-addr = /bits/ 8 <0xA3>; + rom-val = /bits/ 8 <0x0E>; + }; + rom_A5h { + rom-addr = /bits/ 8 <0xA5>; + rom-val = /bits/ 8 <0x24>; + }; + rom_A9h { + rom-addr = /bits/ 8 <0xA9>; + rom-val = /bits/ 8 <0xA0>; + }; + rom_AEh { + rom-addr = /bits/ 8 <0xAE>; + rom-val = /bits/ 8 <0x0E>; + }; + }; +}; + +&mdss_dsi0 { + status = "disabled"; + + #address-cells = <1>; + #size-cells = <0>; + vdd-supply = <&vreg_l1b_0p925>; + vdda-supply = <&vreg_l1a_1p225>; + //vdda-1p2-supply = <0x109>; // pm660_ldoa1 + //vdda-0p9-supply = <0x105>; // pm660l_ldob1 + //vdda-3p3-supply = <0x197>; // pm660l_ldob6 + //wqhd-vddio-supply = <0x17e>; // pm660_ldoa11 + + panel@0 { + compatible = "boe,nt51021-10wu"; + reg = <0>; + + backlight = <&i2c_backlight>; + + reset-gpios = <&tlmm 62 GPIO_ACTIVE_HIGH>; // not used by panel-simple + //disp-te-gpios = <&pm660l_gpios GPIO_ACTIVE_HIGH>; // used by msm dsi host + + pinctrl-names = "default"; + pinctrl-0 = <&mdss_dsi_active &mdss_te_active>; + + //pp1800-supply = <&vreg_l11a_1p8>; // wqhd-vddio-supply + // supply is the same for touchscreen + + port { + panel_in: endpoint { + remote-endpoint = <&mdss_dsi0_out>; + }; + }; + }; +}; + +&mdss_dsi0_out { + data-lanes = <0 1 2 3>; + remote-endpoint = <&panel_in>; +}; + +&mdss_dsi0_phy { + vcca-supply = <&vreg_l1b_0p925>; + status = "okay"; +}; + +&tlmm { + lcd_bl_en_default: lcd-bl-en-default-state { + pins = "gpio72"; + function = "gpio"; + drive-strength = <10>; + output-low; + bias-disable; + }; + + ts_int_default: ts_int_default { + mux { + pins = "gpio67"; + function = "gpio"; + }; + config { + pins = "gpio67"; + drive-strength = <16>; + input-enable; + bias-disable; + }; + }; + + ts_int_output_high: ts_int_output_high { + mux { + pins = "gpio67"; + function = "gpio"; + }; + config { + pins = "gpio67"; + output-high; + }; + }; + + ts_int_output_low: ts_int_output_low { + mux { + pins = "gpio67"; + function = "gpio"; + }; + config { + pins = "gpio67"; + output-low; + }; + }; + + ts_int_input: ts_int_input { + mux { + pins = "gpio67"; + function = "gpio"; + }; + config { + pins = "gpio67"; + input-enable; + bias-disable; + }; + }; +}; diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-clover.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-clover.dts index c9761fd3125903..f6c51607e65780 100644 --- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-clover.dts +++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-clover.dts @@ -4,406 +4,14 @@ */ /dts-v1/; -#include "sdm660.dtsi" -#include "pm660.dtsi" -#include "pm660l.dtsi" +#include "sdm660-xiaomi-clover-common.dtsi" / { model = "Xiaomi Mi Pad 4"; - compatible = "xiaomi,clover", "qcom,sda660", "qcom,sda660-mtp", "qcom,mtp"; + compatible = "xiaomi,clover", "qcom,sdm660"; qcom,board-id = <11 0>; qcom,msm-id = <324 0>; qcom,pmic-id = <0x0001001b 0x0101011a 0x0 0x0>, <0x0001001b 0x0201011a 0x0 0x0>,<0x0001001b 0x0102001a 0x0 0x0>; - chosen { - #address-cells = <2>; - #size-cells = <2>; - ranges; - - framebuffer@9d400000 { - compatible = "simple-framebuffer"; - reg = <0x0 0x9d400000 0x0 (1200 * 1920 * 4)>; - width = <1200>; - height = <1920>; - stride = <(1200 * 4)>; - format = "a8r8g8b8"; - }; - }; - - vph_pwr: vph-pwr-regulator { - compatible = "regulator-fixed"; - regulator-name = "vph_pwr"; - - regulator-always-on; - regulator-boot-on; - }; - - memory { - device_type = "memory"; - /* We expect the bootloader to fill in the reg */ - reg = <0 0 0 0>; - }; - - gpio_keys { - compatible = "gpio-keys-polled"; - poll-interval = <100>; - label = "Volume up"; - pinctrl-names = "default"; - pinctrl-0 = <&vol_up_pin_active>; - - vol-up { - label = "Volume up"; - gpios = <&pm660l_gpios 7 GPIO_ACTIVE_LOW>; - linux,input-type = ; - linux,code = ; - debounce-interval = <15>; - }; - }; - - reserved-memory { - #address-cells = <2>; - #size-cells = <2>; - ranges; - ramoops@9fe00000 { - compatible = "ramoops"; - reg = <0x0 0x9fe00000 0x0 0x400000>; - console-size = <0x20000>; - record-size = <0x20000>; - ftrace-size = <0x0>; - pmsg-size = <0x20000>; - }; - framebuffer_memory@9d400000 { - reg = <0x0 0x9d400000 0x0 (1200 * 1920 * 4)>; - no-map; - }; - }; - -}; - -&rpm_requests { - pm660l-regulators { - compatible = "qcom,rpm-pm660l-regulators"; - - vdd_s1-supply = <&vph_pwr>; - vdd_s2-supply = <&vph_pwr>; - vdd_s3_s4-supply = <&vph_pwr>; - vdd_s5-supply = <&vph_pwr>; - vdd_s6-supply = <&vph_pwr>; - - vdd_l1_l9_l10-supply = <&vreg_s2b_1p05>; - vdd_l2-supply = <&vreg_bob>; - vdd_l3_l5_l7_l8-supply = <&vreg_bob>; - vdd_l4_l6-supply = <&vreg_bob>; - vdd_bob-supply = <&vph_pwr>; - - vreg_bob: bob { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3600000>; - regulator-enable-ramp-delay = <500>; - regulator-ramp-delay = <0>; - }; - - vreg_s1b_1p125: s1 { - regulator-min-microvolt = <1125000>; - regulator-max-microvolt = <1125000>; - regulator-enable-ramp-delay = <200>; - regulator-ramp-delay = <0>; - }; - - vreg_s2b_1p05: s2 { - regulator-min-microvolt = <1050000>; - regulator-max-microvolt = <1050000>; - regulator-enable-ramp-delay = <200>; - regulator-ramp-delay = <0>; - }; - - /* LDOs */ - vreg_l1b_0p925: l1 { - regulator-min-microvolt = <800000>; - regulator-max-microvolt = <925000>; - regulator-enable-ramp-delay = <250>; - regulator-ramp-delay = <0>; - regulator-allow-set-load; - }; - - vreg_l2b_2p95: l2 { - /* - * This regulator supports 1.648 - 3.104V on this board - * but we set a max voltage of anything less than 2.7V - * to satisfy a condition in sdhci.c that will disable - * 3.3V SDHCI signaling, which happens to be not really - * supported on the Xperia Nile/Ganges platform. - */ - regulator-min-microvolt = <350000>; - regulator-max-microvolt = <3100000>; - regulator-enable-ramp-delay = <250>; - regulator-ramp-delay = <0>; - regulator-allow-set-load; - }; - - vreg_l3b_3p0: l3 { - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-enable-ramp-delay = <250>; - regulator-ramp-delay = <0>; - regulator-min-microamp = <200>; - regulator-max-microamp = <600000>; - regulator-system-load = <100000>; - regulator-allow-set-load; - regulator-always-on; - }; - - vreg_l4b_29p5: l4 { - regulator-min-microvolt = <1700000>; - regulator-max-microvolt = <2952000>; - regulator-enable-ramp-delay = <250>; - regulator-ramp-delay = <0>; - - regulator-min-microamp = <200>; - regulator-max-microamp = <600000>; - regulator-system-load = <570000>; - regulator-allow-set-load; - }; - - /* - * Downstream specifies a range of 1721-3600mV, - * but the only assigned consumers are SDHCI2 VMMC - * and Coresight QPDI that both request pinned 2.95V. - * Tighten the range to 1.8-3.328 (closest to 3.3) to - * make the mmc driver happy. - */ - vreg_l5b_29p5: l5 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3328000>; - regulator-enable-ramp-delay = <250>; - regulator-ramp-delay = <0>; - regulator-allow-set-load; - regulator-system-load = <800000>; - }; - - vreg_l6b_3p3: l6 { - regulator-min-microvolt = <1704000>; - regulator-max-microvolt = <3312000>; - regulator-enable-ramp-delay = <250>; - regulator-ramp-delay = <0>; - }; - - vreg_l7b_3p125: l7 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <3125000>; - regulator-enable-ramp-delay = <250>; - regulator-ramp-delay = <0>; - }; - - vreg_l8b_3p3: l8 { - regulator-min-microvolt = <3200000>; - regulator-max-microvolt = <3400000>; - regulator-enable-ramp-delay = <250>; - regulator-ramp-delay = <0>; - }; - - vreg_l9b_0p87: l9 { - /* Unused */ - status = "disabled"; - }; - - vreg_l10b_0p915: l10 { - /* Unused */ - status = "disabled"; - }; - }; - - pm660-regulators { - compatible = "qcom,rpm-pm660-regulators"; - - vdd_s1-supply = <&vph_pwr>; - vdd_s2-supply = <&vph_pwr>; - vdd_s3-supply = <&vph_pwr>; - vdd_s4-supply = <&vph_pwr>; - vdd_s5-supply = <&vph_pwr>; - vdd_s6-supply = <&vph_pwr>; - - vdd_l1_l6_l7-supply = <&vreg_s5a_1p35>; - vdd_l2_l3-supply = <&vreg_s2b_1p05>; - vdd_l5-supply = <&vreg_s2b_1p05>; - vdd_l8_l9_l10_l11_l12_l13_l14-supply = <&vreg_s4a_2p04>; - vdd_l15_l16_l17_l18_l19-supply = <&vreg_bob>; - - vreg_s1a_ftapc0: s1 { - /* Unused */ - status = "disabled"; - }; - - vreg_s2a_ftapc1: s2 { - /* Unused */ - status = "disabled"; - }; - - vreg_s3a_hfapc1: s3 { - /* Unused */ - status = "disabled"; - }; - - vreg_s4a_2p04: s4 { - regulator-min-microvolt = <1805000>; - regulator-max-microvolt = <2040000>; - regulator-enable-ramp-delay = <200>; - regulator-ramp-delay = <0>; - regulator-always-on; - }; - - vreg_s5a_1p35: s5 { - regulator-min-microvolt = <1224000>; - regulator-max-microvolt = <1350000>; - regulator-enable-ramp-delay = <200>; - regulator-ramp-delay = <0>; - }; - - vreg_s6a_0p87: s6 { - regulator-min-microvolt = <504000>; - regulator-max-microvolt = <992000>; - regulator-enable-ramp-delay = <150>; - regulator-ramp-delay = <0>; - }; - - /* LDOs */ - vreg_l1a_1p225: l1 { - regulator-min-microvolt = <1150000>; - regulator-max-microvolt = <1250000>; - regulator-enable-ramp-delay = <250>; - regulator-ramp-delay = <0>; - regulator-allow-set-load; - /* regulator-always-on; */ - }; - - vreg_l2a_1p0: l2 { - regulator-min-microvolt = <950000>; - regulator-max-microvolt = <1010000>; - regulator-enable-ramp-delay = <250>; - regulator-ramp-delay = <0>; - }; - - vreg_l3a_1p0: l3 { - regulator-min-microvolt = <950000>; - regulator-max-microvolt = <1010000>; - regulator-enable-ramp-delay = <250>; - regulator-ramp-delay = <0>; - }; - - vreg_l5a_0p848: l5 { - regulator-min-microvolt = <525000>; - regulator-max-microvolt = <952000>; - regulator-enable-ramp-delay = <250>; - regulator-ramp-delay = <0>; - }; - - vreg_l6a_1p3: l6 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1368000>; - regulator-allow-set-load; - regulator-enable-ramp-delay = <250>; - regulator-ramp-delay = <0>; - }; - - vreg_l7a_1p2: l7 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - regulator-enable-ramp-delay = <250>; - regulator-ramp-delay = <0>; - }; - - vreg_l8a_1p8: l8 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <1900000>; - regulator-enable-ramp-delay = <250>; - regulator-ramp-delay = <0>; - regulator-system-load = <325000>; - regulator-allow-set-load; - }; - - - vreg_l9a_1p8: l9 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <1900000>; - regulator-enable-ramp-delay = <250>; - regulator-ramp-delay = <0>; - regulator-allow-set-load; - }; - - vreg_l10a_1p8: l10 { - regulator-min-microvolt = <1780000>; - regulator-max-microvolt = <1950000>; - regulator-enable-ramp-delay = <250>; - regulator-ramp-delay = <0>; - regulator-allow-set-load; - }; - - vreg_l11a_1p8: l11 { - regulator-min-microvolt = <1784000>; - regulator-max-microvolt = <1944000>; - regulator-enable-ramp-delay = <250>; - regulator-ramp-delay = <0>; - regulator-always-on; - }; - - vreg_l12a_1p8: l12 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1944000>; - regulator-enable-ramp-delay = <250>; - regulator-ramp-delay = <0>; - }; - - /* This gives power to the LPDDR4: never turn it off! */ - vreg_l13a_1p8: l13 { - regulator-min-microvolt = <1780000>; - regulator-max-microvolt = <1950000>; - regulator-enable-ramp-delay = <250>; - regulator-ramp-delay = <0>; - regulator-boot-on; - regulator-always-on; - }; - - vreg_l14a_1p8: l14 { - regulator-min-microvolt = <1710000>; - regulator-max-microvolt = <1904000>; - regulator-enable-ramp-delay = <250>; - regulator-ramp-delay = <0>; - }; - - vreg_l15a_1p8: l15 { - regulator-min-microvolt = <1650000>; - regulator-max-microvolt = <2952000>; - regulator-enable-ramp-delay = <250>; - regulator-ramp-delay = <0>; - }; - - vreg_l16a_2p7: l16 { - /* Unused */ - status = "disabled"; - }; - - vreg_l17a_1p8: l17 { - regulator-min-microvolt = <1648000>; - regulator-max-microvolt = <2952000>; - regulator-enable-ramp-delay = <250>; - regulator-ramp-delay = <0>; - }; - - vreg_l18a_1v8: l18 { - status = "disabled"; - }; - - vreg_l19a_3p3: l19 { - regulator-min-microvolt = <3200000>; - regulator-max-microvolt = <3400000>; - regulator-enable-ramp-delay = <250>; - regulator-ramp-delay = <0>; - regulator-allow-set-load; - }; - }; -}; - -&adreno_gpu{ - status = "disabled"; }; &blsp_i2c3 { @@ -422,73 +30,16 @@ }; }; -&gpucc{ - status = "disabled"; -}; - -&mmcc{ - status = "disabled"; -}; - -&pm660l_gpios { - vol_up_pin_active: vol_up_pin { - pins = "gpio7"; - function = "normal"; - input-enable; - bias-pull-up; - }; -}; - -&pon { - resin { - compatible = "qcom,pm8941-resin"; - interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>; - debounce = <15625>; - bias-pull-up; - linux,code = ; - }; -}; - -&qusb2phy0 { - status = "okay"; -}; - -&sdhc_1 { - status = "okay"; - bus-width = <8>; - non-removable; - mmc-ddr-1_8v; - mmc-hs200-1_8v; - mmc-hs400-1_8v; -}; - -&sdhc_2 { - status = "okay"; - - vmmc-supply = <&vreg_l5b_29p5>; - vqmmc-supply = <&vreg_l2b_2p95>; -}; - &tlmm { - gpio-reserved-ranges = <0 4>; - ts_int_active: ts-int-active { pins = "gpio67"; drive-strength = <8>; bias-pull-up; }; + ts_rst: ts-rst { pins = "gpio66"; drive-strength = <8>; bias-pull-up; }; }; - -&usb3 { - status = "okay"; -}; - -&usb3_dwc3 { - status = "okay"; - dr_mode = "peripheral"; -}; diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c index 29e63cdfb8954f..95cbc6d5d45234 100644 --- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c +++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c @@ -2024,6 +2024,33 @@ static const struct panel_desc boe_tv101wum_n53_desc = { .init_cmds = boe_init_cmd, }; +static const struct drm_display_mode boe_tv101wum_nx0_default_mode = { + .clock = 165581, + .hdisplay = 1200, + .hsync_start = 1200 + 172, + .hsync_end = 1200 + 172 + 4, + .htotal = 1200 + 172 + 4 + 32, + .vdisplay = 1920, + .vsync_start = 1920 + 25, + .vsync_end = 1920 + 25 + 1, + .vtotal = 1920 + 25 + 1 + 14, + .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, +}; + +static const struct panel_desc boe_tv101wum_nx0_desc = { + .modes = &boe_tv101wum_nx0_default_mode, + .bpc = 8, + .size = { + .width_mm = 135, + .height_mm = 216, + }, + .lanes = 4, + .format = MIPI_DSI_FMT_RGB888, + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | + MIPI_DSI_MODE_LPM, + .init_cmds = boe_init_cmd, +}; + static const struct drm_display_mode auo_b101uan08_3_default_mode = { .clock = 159667, .hdisplay = 1200, @@ -2321,6 +2348,9 @@ static const struct of_device_id boe_of_match[] = { { .compatible = "boe,tv101wum-n53", .data = &boe_tv101wum_n53_desc }, + { .compatible = "boe,tv101wum-nx0", + .data = &boe_tv101wum_nx0_desc + }, { .compatible = "auo,b101uan08.3", .data = &auo_b101uan08_3_desc },