-
Notifications
You must be signed in to change notification settings - Fork 417
WIP: Moto Z2 play (albus) Support #595
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
Draft
Coffee-0xFF
wants to merge
6
commits into
msm8916-mainline:main
Choose a base branch
from
Coffee-0xFF:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
bae357b
dts: msm8953: add support for Moto Z2 Play (albus)
Coffee-0xFF f69f57c
lk2nd: display: panel: generated: Add smd_549_1080p_alb_cmd_v0 for albus
Coffee-0xFF 46b07a7
remove unnecessary blank lines
Coffee-0xFF c4344dd
dts: msm8953: Add panel definition to Albus device tree
Coffee-0xFF 2ea5956
dts: msm8953: albus: load the correct dtb for each board
Coffee-0xFF 0fca5bd
dts: msm8953: rules.mk: fix indentation
Coffee-0xFF File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| // SPDX-License-Identifier: GPL-2.0-only | ||
|
|
||
| #include "msm8953-motorola.dtsi" | ||
|
|
||
| / { | ||
| qcom,board-id = <0x48 0x8000>, | ||
| <0x48 0x8000>, | ||
| <0x48 0x81a0>, | ||
| <0x48 0x81a1>, | ||
| <0x49 0x81b0>, | ||
| <0x49 0x8200>, | ||
| <0x4a 0x8300>, | ||
| <0x4a 0x8400>; | ||
|
|
||
| }; | ||
|
|
||
| &lk2nd { | ||
| model = "Motorola Moto Z2 Play (albus)"; | ||
| compatible = "motorola,albus", "qcom,msm8953-albus"; | ||
|
|
||
| lk2nd,dtb-files = "msm8953-motorola-albus"; | ||
|
|
||
Coffee-0xFF marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
160 changes: 160 additions & 0 deletions
160
lk2nd/display/panel/generated/lk_panel_smd_549_1080p_alb_cmd_v0.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,160 @@ | ||
| // SPDX-License-Identifier: GPL-2.0-only | ||
| // Copyright (c) 2025 FIXME | ||
| // Generated with linux-mdss-dsi-panel-driver-generator from vendor device tree: | ||
| // Copyright (c) 2014, The Linux Foundation. All rights reserved. (FIXME) | ||
|
|
||
| #ifndef _PANEL_SMD_549_1080P_ALB_CMD_V0_H_ | ||
| #define _PANEL_SMD_549_1080P_ALB_CMD_V0_H_ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are you using lk1st or otherwise using this panel driver? if so, I'd expect you document the device as quirky in the dts and provide notes on how to enable the panel driver. |
||
|
|
||
| #include <mipi_dsi.h> | ||
| #include <panel_display.h> | ||
| #include <panel.h> | ||
| #include <string.h> | ||
|
|
||
| static struct panel_config smd_549_1080p_alb_cmd_v0_panel_data = { | ||
| .panel_node_id = "qcom,mdss_dsi_mot_smd_549_1080p_alb_cmd_v0", | ||
| .panel_controller = "dsi:0:", | ||
| .panel_compatible = "qcom,mdss-dsi-panel", | ||
| .panel_type = 1, | ||
| .panel_destination = "DISPLAY_1", | ||
| /* .panel_orientation not supported yet */ | ||
| .panel_framerate = 60, | ||
| .panel_lp11_init = 1, | ||
| .panel_init_delay = 0, | ||
| }; | ||
|
|
||
| static struct panel_resolution smd_549_1080p_alb_cmd_v0_panel_res = { | ||
| .panel_width = 1080, | ||
| .panel_height = 1920, | ||
| .hfront_porch = 44, | ||
| .hback_porch = 32, | ||
| .hpulse_width = 12, | ||
| .hsync_skew = 0, | ||
| .vfront_porch = 9, | ||
| .vback_porch = 3, | ||
| .vpulse_width = 4, | ||
| /* Borders not supported yet */ | ||
| }; | ||
|
|
||
| static struct color_info smd_549_1080p_alb_cmd_v0_color = { | ||
| .color_format = 24, | ||
| .color_order = DSI_RGB_SWAP_RGB, | ||
| .underflow_color = 0xff, | ||
| /* Borders and pixel packing not supported yet */ | ||
| }; | ||
|
|
||
| static char smd_549_1080p_alb_cmd_v0_on_cmd_0[] = { | ||
| 0x11, 0x00, 0x05, 0x80 | ||
| }; | ||
| static char smd_549_1080p_alb_cmd_v0_on_cmd_1[] = { | ||
| 0x35, 0x00, 0x15, 0x00 | ||
| }; | ||
| static char smd_549_1080p_alb_cmd_v0_on_cmd_2[] = { | ||
| 0x51, 0x00, 0x15, 0x00 | ||
| }; | ||
| static char smd_549_1080p_alb_cmd_v0_on_cmd_3[] = { | ||
| 0x55, 0x00, 0x15, 0x00 | ||
| }; | ||
| static char smd_549_1080p_alb_cmd_v0_on_cmd_4[] = { | ||
| 0x53, 0x20, 0x15, 0x00 | ||
| }; | ||
| static char smd_549_1080p_alb_cmd_v0_on_cmd_5[] = { | ||
| 0x29, 0x00, 0x05, 0x80 | ||
| }; | ||
|
|
||
| static struct mipi_dsi_cmd smd_549_1080p_alb_cmd_v0_on_command[] = { | ||
| { sizeof(smd_549_1080p_alb_cmd_v0_on_cmd_0), smd_549_1080p_alb_cmd_v0_on_cmd_0, 20 }, | ||
| { sizeof(smd_549_1080p_alb_cmd_v0_on_cmd_1), smd_549_1080p_alb_cmd_v0_on_cmd_1, 0 }, | ||
| { sizeof(smd_549_1080p_alb_cmd_v0_on_cmd_2), smd_549_1080p_alb_cmd_v0_on_cmd_2, 0 }, | ||
| { sizeof(smd_549_1080p_alb_cmd_v0_on_cmd_3), smd_549_1080p_alb_cmd_v0_on_cmd_3, 0 }, | ||
| { sizeof(smd_549_1080p_alb_cmd_v0_on_cmd_4), smd_549_1080p_alb_cmd_v0_on_cmd_4, 0 }, | ||
| { sizeof(smd_549_1080p_alb_cmd_v0_on_cmd_5), smd_549_1080p_alb_cmd_v0_on_cmd_5, 0 }, | ||
| }; | ||
|
|
||
| static char smd_549_1080p_alb_cmd_v0_off_cmd_0[] = { | ||
| 0x28, 0x00, 0x05, 0x80 | ||
| }; | ||
| static char smd_549_1080p_alb_cmd_v0_off_cmd_1[] = { | ||
| 0x10, 0x00, 0x05, 0x80 | ||
| }; | ||
|
|
||
| static struct mipi_dsi_cmd smd_549_1080p_alb_cmd_v0_off_command[] = { | ||
| { sizeof(smd_549_1080p_alb_cmd_v0_off_cmd_0), smd_549_1080p_alb_cmd_v0_off_cmd_0, 35 }, | ||
| { sizeof(smd_549_1080p_alb_cmd_v0_off_cmd_1), smd_549_1080p_alb_cmd_v0_off_cmd_1, 150 }, | ||
| }; | ||
|
|
||
| static struct command_state smd_549_1080p_alb_cmd_v0_state = { | ||
| .oncommand_state = 0, | ||
| .offcommand_state = 0, | ||
| }; | ||
|
|
||
| static struct commandpanel_info smd_549_1080p_alb_cmd_v0_command_panel = { | ||
| /* FIXME: This is a command mode panel */ | ||
| }; | ||
|
|
||
| static struct videopanel_info smd_549_1080p_alb_cmd_v0_video_panel = { | ||
| .hsync_pulse = 0, | ||
| .hfp_power_mode = 0, | ||
| .hbp_power_mode = 0, | ||
| .hsa_power_mode = 0, | ||
| .bllp_eof_power_mode = 1, | ||
| .bllp_power_mode = 1, | ||
| .traffic_mode = 2, | ||
| /* This is bllp_eof_power_mode and bllp_power_mode combined */ | ||
| .bllp_eof_power = 1 << 3 | 1 << 0, | ||
| }; | ||
|
|
||
| static struct lane_configuration smd_549_1080p_alb_cmd_v0_lane_config = { | ||
| .dsi_lanes = 4, | ||
| .dsi_lanemap = 0, | ||
| .lane0_state = 1, | ||
| .lane1_state = 1, | ||
| .lane2_state = 1, | ||
| .lane3_state = 1, | ||
| .force_clk_lane_hs = 0, | ||
| }; | ||
|
|
||
| static const uint32_t smd_549_1080p_alb_cmd_v0_timings[] = { | ||
| 0xd5, 0x32, 0x22, 0x00, 0x60, 0x62, 0x26, 0x34, 0x29, 0x03, 0x04, 0x00 | ||
| }; | ||
|
|
||
| static struct panel_timing smd_549_1080p_alb_cmd_v0_timing_info = { | ||
| .tclk_post = 0x0d, | ||
| .tclk_pre = 0x2d, | ||
| }; | ||
|
|
||
| static struct panel_reset_sequence smd_549_1080p_alb_cmd_v0_reset_seq = { | ||
| .pin_state = { 0, 1 }, | ||
| .sleep = { 1, 6 }, | ||
| .pin_direction = 2, | ||
| }; | ||
|
|
||
| static struct backlight smd_549_1080p_alb_cmd_v0_backlight = { | ||
| .bl_interface_type = BL_DCS, | ||
| .bl_min_level = 1, | ||
| .bl_max_level = 255, | ||
| }; | ||
|
|
||
| static inline void panel_smd_549_1080p_alb_cmd_v0_select(struct panel_struct *panel, | ||
| struct msm_panel_info *pinfo, | ||
| struct mdss_dsi_phy_ctrl *phy_db) | ||
| { | ||
| panel->paneldata = &smd_549_1080p_alb_cmd_v0_panel_data; | ||
| panel->panelres = &smd_549_1080p_alb_cmd_v0_panel_res; | ||
| panel->color = &smd_549_1080p_alb_cmd_v0_color; | ||
| panel->videopanel = &smd_549_1080p_alb_cmd_v0_video_panel; | ||
| panel->commandpanel = &smd_549_1080p_alb_cmd_v0_command_panel; | ||
| panel->state = &smd_549_1080p_alb_cmd_v0_state; | ||
| panel->laneconfig = &smd_549_1080p_alb_cmd_v0_lane_config; | ||
| panel->paneltiminginfo = &smd_549_1080p_alb_cmd_v0_timing_info; | ||
| panel->panelresetseq = &smd_549_1080p_alb_cmd_v0_reset_seq; | ||
| panel->backlightinfo = &smd_549_1080p_alb_cmd_v0_backlight; | ||
| pinfo->mipi.panel_on_cmds = smd_549_1080p_alb_cmd_v0_on_command; | ||
| pinfo->mipi.panel_off_cmds = smd_549_1080p_alb_cmd_v0_off_command; | ||
| pinfo->mipi.num_of_panel_on_cmds = ARRAY_SIZE(smd_549_1080p_alb_cmd_v0_on_command); | ||
| pinfo->mipi.num_of_panel_off_cmds = ARRAY_SIZE(smd_549_1080p_alb_cmd_v0_off_command); | ||
| memcpy(phy_db->timing, smd_549_1080p_alb_cmd_v0_timings, TIMING_SIZE); | ||
| phy_db->regulator_mode = DSI_PHY_REGULATOR_DCDC_MODE; | ||
| } | ||
|
|
||
| #endif /* _PANEL_SMD_549_1080P_ALB_CMD_V0_H_ */ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.