Skip to content

Added support for Redmi note 12 pro (sweet_k6a) #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/qcom/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sm7150-xiaomi-davinci.dtb
dtb-$(CONFIG_ARCH_QCOM) += sm7150-xiaomi-phoenix.dtb
dtb-$(CONFIG_ARCH_QCOM) += sm7150-xiaomi-surya.dtb
dtb-$(CONFIG_ARCH_QCOM) += sm7150-xiaomi-sweet.dtb
dtb-$(CONFIG_ARCH_QCOM) += sm7150-xiaomi-sweet_k6a.dtb
dtb-$(CONFIG_ARCH_QCOM) += sm7150-xiaomi-toco.dtb
dtb-$(CONFIG_ARCH_QCOM) += sm7150-xiaomi-tucana.dtb
dtb-$(CONFIG_ARCH_QCOM) += sm7225-fairphone-fp4.dtb
Expand Down
186 changes: 186 additions & 0 deletions arch/arm64/boot/dts/qcom/sm7150-xiaomi-sweet_k6a.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
// SPDX-License-Identifier: GPL-2.0-only

/dts-v1/;

#include "sm7150-xiaomi-common.dtsi"

/delete-node/ &wlan_msa_mem;
/delete-node/ &npu_mem;
/delete-node/ &ipa_fw_mem;
/delete-node/ &ipa_gsi_mem;
/delete-node/ &gpu_mem;

&adsp_mem {
reg = <0x0 0x95700000 0x0 0x2600000>;
};

&tz_mem {
reg = <0x0 0x86200000 0x0 0x4900000>;
};

/ {
model = "Xiaomi Redmi Note 12 Pro";
compatible = "xiaomi,sweet", "qcom,sm7150"; /* sweet_k6a actually uses the sweet codename */

qcom,board-id = <46 0>;

reserved-memory {
wlan_msa_mem: memory@97d00000 {
reg = <0x0 0x97d00000 0x0 0x180000>;
no-map;
};

npu_mem: memory@97e80000 {
reg = <0x0 0x97e80000 0x0 0x80000>;
no-map;
};

ipa_fw_mem: memory@97f00000 {
reg = <0x0 0x97f00000 0x0 0x10000>;
no-map;
};

ipa_gsi_mem: memory@97f10000 {
reg = <0x00 0x97f10000 0x00 0x5000>;
no-map;
};

gpu_mem: memory@97f15000 {
reg = <0x00 0x97f15000 0x00 0x2000>;
no-map;
};
rmtfs_mem: memory@f2e01000 { /* recheck in twrp*/
compatible = "qcom,rmtfs-mem";
reg = <0 0xf2b01000 0 0x300000>;
no-map;

qcom,client-id = <1>;
qcom,vmid = <15>;
};

};
};

&battery {
voltage-min-design-microvolt = <3500000>;
energy-full-design-microwatt-hours = <18500000>;
charge-full-design-microamp-hours = <5000000>;
};

&gpu {
zap-shader {
firmware-name = "qcom/sm7150/sweet_k6a/a615_zap.mbn";
};
};

&i2c1 {
clock-frequency = <100000>;
status = "okay";

bq27z561: fuel-gauge@55 {
compatible = "ti,bq27z561";
reg = <0x55>;
monitored-battery = <&battery>;
};
};

&i2c4 {
clock-frequency = <100000>;
status = "okay";

/* foursemi,fs16xx (speaker amplifier) @ 34 */
/* foursemi,fs16xx (speaker amplifier) @ 35 */
/* lionsemi,ln8000 (charger-slave) @ 51 */
/* ti,bq25968 (charger-slave) @ 66 */
};

&i2c7 {
clock-frequency = <100000>;
status = "okay";

/* focaltech,fts_K6 @ 38 */

touchscreen: goodix@5d {
compatible = "goodix,gt9896";
reg = <0x5d>;
interrupt-parent = <&tlmm>;
interrupts = <9 IRQ_TYPE_NONE>;
pinctrl-0 = <&ts_int_active &ts_reset_active>;
pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>;
pinctrl-names = "default", "sleep";
vtouch-supply = <&vreg_l7c_3p0>;
vtouch-load = <600000>;
goodix,vdd-gpio = <&tlmm 90 GPIO_ACTIVE_HIGH>;
goodix,avdd-name = "vtouch";
goodix,reset-gpio = <&tlmm 8 GPIO_ACTIVE_HIGH>;
goodix,irq-gpio = <&tlmm 9 IRQ_TYPE_NONE>;
goodix,irq-flags = <2>; /* trigger falling;*/
goodix,panel-max-x = <1079>;
goodix,panel-max-y = <2399>;
goodix,panel-max-w = <256>;
goodix,power-on-delay-us = <100>; /* 0.1ms */
goodix,power-off-delay-us = <5000>; /* 50ms */
};
};

&i2c9 {
clock-frequency = <100000>;
status = "okay";

/* ovti,wl2866d (cam regulator) @ 28 */
/* lionsemi,ln8000 (charger-master) @ 51 */
/* awinic,awinic_haptic @ 58 */
/* ti,bq25968 (charger-master) @ 66 */
};

&ipa {
firmware-name = "qcom/sm7150/sweet_k6a/ipa_fws.mbn";
};

&nfc_default {
pins = "gpio31", "gpio36", "gpio66";
};

&nfc_sleep {
pins = "gpio31", "gpio36", "gpio66";
};

&nxp {
enable-gpios = <&tlmm 66 GPIO_ACTIVE_HIGH>;
};

&panel {
compatible = "mdss,k6-38-0e-0b-dsc";
};

&pm6150l_flash {
status = "okay";
};

&pm6150_qgauge { status = "disabled"; };
&remoteproc_adsp {
firmware-name = "qcom/sm7150/sweet_k6a/adsp.mbn";
};

&remoteproc_cdsp {
firmware-name = "qcom/sm7150/sweet_k6a/cdsp.mbn";
};

&remoteproc_mpss {
firmware-name = "qcom/sm7150/sweet_k6a/modem.mbn";
};

&sdhc_2 {
status = "okay";
};

&spi0 {
clock-frequency = <50000000>;
status = "okay";

/* qcom,spi-msm-ir (ir-led) @ 1 */
};

&venus {
firmware-name = "qcom/sm7150/sweet_k6a/venus.mbn";
};
3 changes: 3 additions & 0 deletions arch/arm64/configs/sm7150.config
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ CONFIG_SND_SOC_TAS2562=m
# Xiaomi Redmi Note 10 Pro (Sweet)
CONFIG_DRM_PANEL_K6_38_0C_0A=m

# Xiaomi Redmi Note 12 Pro (Sweet_k6a)
CONFIG_DRM_PANEL_K6_38_0E_0B=m

# SM7150 SoC
CONFIG_INTERCONNECT_QCOM_OSM_L3=y
CONFIG_INTERCONNECT_QCOM_SM7150=y
Expand Down
10 changes: 10 additions & 0 deletions drivers/gpu/drm/panel/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,16 @@ config DRM_PANEL_K6_38_0C_0A
Say Y or M here if you want to enable support for the K6_38_0C_0A
(2400x1080@120Hz) DSC video mode panel.

config DRM_PANEL_K6_38_0E_0B
tristate "K6 38 0E 0B DSC video mode panel"
depends on OF
depends on DRM_MIPI_DSI
depends on BACKLIGHT_CLASS_DEVICE
select VIDEOMODE_HELPERS
help
Say Y or M here if you want to enable support for the K6_38_0E_0B
(2400x1080@120Hz) DSC video mode panel.

config DRM_PANEL_K9A_36_02_0A
tristate "K9A 36 02 0A DSC cmd mode panel"
depends on OF
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/panel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ obj-$(CONFIG_DRM_PANEL_JDI_LT070ME05000) += panel-jdi-lt070me05000.o
obj-$(CONFIG_DRM_PANEL_JDI_LPM102A188A) += panel-jdi-lpm102a188a.o
obj-$(CONFIG_DRM_PANEL_JDI_R63452) += panel-jdi-fhd-r63452.o
obj-$(CONFIG_DRM_PANEL_K6_38_0C_0A) += panel-k6-38-0c-0a-dsc.o
obj-$(CONFIG_DRM_PANEL_K6_38_0E_0B) += panel-k6-38-0e-0b-dsc.o
obj-$(CONFIG_DRM_PANEL_K9A_36_02_0A) += panel-k9a-36-02-0a-mp-dsc.o
obj-$(CONFIG_DRM_PANEL_KHADAS_TS050) += panel-khadas-ts050.o
obj-$(CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04) += panel-kingdisplay-kd097d04.o
Expand Down
Loading