Skip to content
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

arm64: dts: qcom: sdm660-xiaomi-lavender: Split by display #26

Merged
merged 5 commits into from
Apr 25, 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
2 changes: 2 additions & 0 deletions Documentation/devicetree/bindings/arm/qcom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,8 @@ properties:
- items:
- enum:
- xiaomi,lavender
- xiaomi,lavender-boe
- xiaomi,lavender-tianma
- const: qcom,sdm660

- items:
Expand Down
3 changes: 2 additions & 1 deletion arch/arm64/boot/dts/qcom/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ 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-lavender-tianma.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm660-xiaomi-lavender-boe.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm660-xiaomi-platina.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm670-google-sargo.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm845-cheza-r1.dtb
Expand Down
17 changes: 17 additions & 0 deletions arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender-boe.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2024, Barnabas Czeman <[email protected]>
*/

/dts-v1/;

#include "sdm660-xiaomi-lavender-common.dtsi"

/ {
model = "Xiaomi Redmi Note 7 (Boe)";
compatible = "xiaomi,lavender-boe", "qcom,sdm660";
barni2000 marked this conversation as resolved.
Show resolved Hide resolved
};

&panel {
compatible = "boe,td4320";
};
minlexx marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#include <dt-bindings/input/input.h>
#include <dt-bindings/input/gpio-keys.h>

/delete-node/ &zap_shader_region;

/ {
model = "Xiaomi Redmi Note 7";
compatible = "xiaomi,lavender", "qcom,sdm660";
Expand All @@ -36,6 +38,10 @@
height = <2340>;
stride = <(1080 * 4)>;
format = "a8r8g8b8";

/* In order to allow simledrm framebuffer to know
* physical dimensions */
panel = <&panel>;
};
};

Expand Down Expand Up @@ -86,6 +92,15 @@
reg = <0x0 0x9d400000 0x0 0x23ff000>;
no-map;
};

/* from downstream dmesg:
* subsys-pil-tz soc:qcom,kgsl-hyp: a512_zap: loading from
* 0x00000000fc400000 to 0x00000000fc402000 */
zap_shader_region: gpu@fc400000 {
compatible = "shared-dma-pool";
reg = <0x0 0xfc400000 0x0 0x2000>;
no-map;
};
};

/*
Expand All @@ -98,27 +113,16 @@
};
};

&anoc2_smmu {
&adreno_gpu {
status = "okay";

zap-shader {
memory-region = <&zap_shader_region>;
};
};

&blsp_i2c1 {
&anoc2_smmu {
status = "okay";

/* Novatek NT36672A touchscreen */
touchscreen@62 {
compatible = "novatek,nt36525";
reg = <0x62>;
vdd-supply = <&vreg_l11a_1p8>;
interrupt-parent = <&tlmm>;
interrupts = <67 IRQ_TYPE_EDGE_RISING>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&ts_pins_active>;
pinctrl-1 = <&ts_int_sleep &ts_rst_sleep>;
reset-gpios = <&tlmm 66 GPIO_ACTIVE_HIGH>;
touchscreen-size-x = <1080>;
touchscreen-size-y = <2340>;
};
};

&blsp1_uart2 {
Expand All @@ -140,10 +144,70 @@
};
};

&gpucc {
status = "okay";
};

&kgsl_smmu {
status = "okay";
};

&lpass_smmu {
status = "okay";
};

&mdp {
status = "okay";
};

&mdss {
status = "okay";
};

&mdss_dsi0 {
status = "okay";

#address-cells = <1>;
#size-cells = <0>;

vdd-supply = <&vreg_l1b_0p925>;
vdda-supply = <&vreg_l1a_1p225>;

panel: panel@0 {
reg = <0>;

reset-gpios = <&tlmm 53 GPIO_ACTIVE_LOW>;

backlight = <&pm660l_wled>;

pinctrl-names = "default";
pinctrl-0 = <&mdss_dsi_active &mdss_te_active>;

width-mm = <67>;
height-mm = <145>;

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

&mmss_smmu {
status = "okay";
};

&pm660_charger {
monitored-battery = <&battery>;

Expand Down Expand Up @@ -487,26 +551,19 @@
&tlmm {
gpio-reserved-ranges = <8 4>;

ts_pins_active: ts-pins-active-state {
pins = "gpio66", "gpio67";
mdss_dsi_active: mdss_dsi_active {
function = "gpio";
drive-strength = <16>;
bias-pull-up;
pins = "gpio53";
drive-strength = <8>;
bias-disable;
};

ts_rst_sleep: ts-rst-sleep-state {
pins = "gpio66";
mdss_te_active: mdss_te_active {
pins = "gpio59";
function = "gpio";
drive-strength = <2>;
bias-pull-down;
};

ts_int_sleep: ts-int-sleep-state {
pins = "gpio67";
function = "gpio";
drive-strength = <2>;
bias-disable;
};
};

&usb3 {
Expand All @@ -519,7 +576,6 @@
};

&venus {
firmware-name = "qcom/venus-4.4/venus.mdt";
status = "okay";
};

Expand Down
59 changes: 59 additions & 0 deletions arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender-tianma.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2024, Barnabas Czeman <[email protected]>
*/

/dts-v1/;

#include "sdm660-xiaomi-lavender-common.dtsi"

/ {
model = "Xiaomi Redmi Note 7 (Tianma)";
compatible = "xiaomi,lavender-tianma", "qcom,sdm660";
barni2000 marked this conversation as resolved.
Show resolved Hide resolved
};

&blsp_i2c1 {
status = "okay";

/* Novatek NT36672A touchscreen */
touchscreen@62 {
compatible = "novatek,nt36525";
reg = <0x62>;
vdd-supply = <&vreg_l11a_1p8>;
interrupt-parent = <&tlmm>;
interrupts = <67 IRQ_TYPE_EDGE_RISING>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&ts_pins_active>;
pinctrl-1 = <&ts_int_sleep &ts_rst_sleep>;
reset-gpios = <&tlmm 66 GPIO_ACTIVE_HIGH>;
touchscreen-size-x = <1080>;
touchscreen-size-y = <2340>;
};
};

&panel {
compatible = "tianma,nt36672a-xiaomi-lavender-simple";
};

&tlmm {
ts_pins_active: ts-pins-active-state {
pins = "gpio66", "gpio67";
function = "gpio";
drive-strength = <16>;
bias-pull-up;
};

ts_rst_sleep: ts-rst-sleep-state {
pins = "gpio66";
function = "gpio";
drive-strength = <2>;
bias-pull-down;
};

ts_int_sleep: ts-int-sleep-state {
pins = "gpio67";
function = "gpio";
drive-strength = <2>;
bias-disable;
};
};
1 change: 1 addition & 0 deletions arch/arm64/configs/sdm660_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ CONFIG_DRM_FBDEV_OVERALLOC=200
CONFIG_DRM_MSM=m
# CONFIG_DRM_MSM_MDP4 is not set
# CONFIG_DRM_MSM_HDMI is not set
CONFIG_DRM_PANEL_BOE_TD4320=m
CONFIG_DRM_PANEL_BOE_TV101WUM_NL6=m
CONFIG_DRM_PANEL_DSI_CM=y
CONFIG_DRM_PANEL_SIMPLE=y
Expand Down
8 changes: 8 additions & 0 deletions drivers/gpu/drm/panel/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ config DRM_PANEL_BOE_HIMAX8279D
24 bit RGB per pixel. It provides a MIPI DSI interface to
the host and has a built-in LED backlight.

config DRM_PANEL_BOE_TD4320
tristate "BOE TD4320 DSI panel"
depends on OF
depends on DRM_MIPI_DSI
depends on BACKLIGHT_CLASS_DEVICE
help
Say Y here if you want to enable support for TD4320.

config DRM_PANEL_BOE_TV101WUM_NL6
tristate "BOE TV101WUM and AUO KD101N80 45NA 1200x1920 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 @@ -5,6 +5,7 @@ obj-$(CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596) += panel-asus-z00t-tm5p5-n35596.
obj-$(CONFIG_DRM_PANEL_AUO_A030JTN01) += panel-auo-a030jtn01.o
obj-$(CONFIG_DRM_PANEL_BOE_BF060Y8M_AJ0) += panel-boe-bf060y8m-aj0.o
obj-$(CONFIG_DRM_PANEL_BOE_HIMAX8279D) += panel-boe-himax8279d.o
obj-$(CONFIG_DRM_PANEL_BOE_TD4320) += panel-boe-td4320.o
obj-$(CONFIG_DRM_PANEL_BOE_TV101WUM_NL6) += panel-boe-tv101wum-nl6.o
obj-$(CONFIG_DRM_PANEL_DSI_CM) += panel-dsi-cm.o
obj-$(CONFIG_DRM_PANEL_LVDS) += panel-lvds.o
Expand Down
Loading