diff --git a/projects/ROCKNIX/devices/SM8550/linux/dts/qcom/qcs8550-ayaneo-pocketsmini.dts b/projects/ROCKNIX/devices/SM8550/linux/dts/qcom/qcs8550-ayaneo-pocketsmini.dts index 4640d4c34f3..01b6e8f9980 100644 --- a/projects/ROCKNIX/devices/SM8550/linux/dts/qcom/qcs8550-ayaneo-pocketsmini.dts +++ b/projects/ROCKNIX/devices/SM8550/linux/dts/qcom/qcs8550-ayaneo-pocketsmini.dts @@ -99,17 +99,33 @@ clock-frequency = <400000>; status = "okay"; - sgm3804: regulator@3e { + /* Screen power */ + regulator@3e { compatible = "sgmicro,sgm3804"; reg = <0x3e>; pinctrl-0 = <&panel_pwr_active>; pinctrl-1 = <&panel_pwr_sleep>; pinctrl-names = "default", "sleep"; - regulator-name = "panel-avdd"; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - reset-gpios = <&tlmm 152 GPIO_ACTIVE_HIGH>, - <&tlmm 153 GPIO_ACTIVE_HIGH>; + + vin-supply = <&vph_pwr>; + + sgm3804_pos: pos { + regulator-name = "panel-avdd"; + regulator-min-microvolt = <5200000>; + regulator-max-microvolt = <5200000>; + regulator-active-discharge = <1>; + regulator-boot-on; + enable-gpios = <&tlmm 152 GPIO_ACTIVE_HIGH>; + }; + + sgm3804_neg: neg { + regulator-name = "panel-avee"; + regulator-min-microvolt = <5200000>; + regulator-max-microvolt = <5200000>; + regulator-active-discharge = <1>; + regulator-boot-on; + enable-gpios = <&tlmm 153 GPIO_ACTIVE_HIGH>; + }; }; backlight: sy7758@2e { @@ -157,7 +173,8 @@ &display_panel { compatible = "ayaneo,ar16-4inch-panel"; - avdd-supply = <&sgm3804>; + avdd-supply = <&sgm3804_pos>; + avee-supply = <&sgm3804_neg>; vci-supply = <&vreg_l13b_3p0>; vddio-supply = <&vreg_l12b_1p8>; diff --git a/projects/ROCKNIX/devices/SM8550/patches/linux/0064-gpu-drm-panel-add-ar16-4inch-panel.patch b/projects/ROCKNIX/devices/SM8550/patches/linux/0064-gpu-drm-panel-add-ar16-4inch-panel.patch index 3fd7c8211cf..c1f08581f60 100644 --- a/projects/ROCKNIX/devices/SM8550/patches/linux/0064-gpu-drm-panel-add-ar16-4inch-panel.patch +++ b/projects/ROCKNIX/devices/SM8550/patches/linux/0064-gpu-drm-panel-add-ar16-4inch-panel.patch @@ -14,8 +14,8 @@ Signed-off-by: danyi --- drivers/gpu/drm/panel/Kconfig | 14 + drivers/gpu/drm/panel/Makefile | 1 + - drivers/gpu/drm/panel/panel-ar16-4inch.c | 400 +++++++++++++++++++++++ - 3 files changed, 415 insertions(+) + drivers/gpu/drm/panel/panel-ar16-4inch.c | 401 +++++++++++++++++++++++ + 3 files changed, 416 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-ar16-4inch.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig @@ -58,7 +58,7 @@ new file mode 100644 index 0000000..141da42 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-ar16-4inch.c -@@ -0,0 +1,400 @@ +@@ -0,0 +1,401 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * DRM driver for the AYANEO Pocket S Mini AR16 panel. @@ -92,6 +92,7 @@ index 0000000..141da42 + { .supply = "avdd" }, + { .supply = "vci" }, + { .supply = "vddio" }, ++ { .supply = "avee" }, +}; + +static inline struct ar16_4inch *to_ar16_4inch(struct drm_panel *panel) @@ -385,9 +386,11 @@ index 0000000..141da42 + struct ar16_4inch *ctx; + int ret; + -+ ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); -+ if (!ctx) -+ return -ENOMEM; ++ ctx = devm_drm_panel_alloc(dev, struct ar16_4inch, panel, ++ &ar16_4inch_panel_funcs, ++ DRM_MODE_CONNECTOR_DSI); ++ if (IS_ERR(ctx)) ++ return PTR_ERR(ctx); + + ret = devm_regulator_bulk_get_const(dev, + ARRAY_SIZE(ar16_4inch_supplies), @@ -413,8 +416,6 @@ index 0000000..141da42 + MIPI_DSI_MODE_VIDEO_SYNC_PULSE | + MIPI_DSI_CLOCK_NON_CONTINUOUS; + -+ drm_panel_init(&ctx->panel, dev, &ar16_4inch_panel_funcs, -+ DRM_MODE_CONNECTOR_DSI); + ctx->panel.prepare_prev_first = true; + + ret = drm_panel_of_backlight(&ctx->panel);