panel: visionox-rm69299: modernize & support the variant found in the SHIFT6mq
Subsystems (4)
Neil Armstrong
maintainerv2 cover panel: visionox-rm69299: modernize & support the variant found in the SHIFT6mq
Modernize the driver with panel_desc, _multi, const supplies and new panel init with refcounting.
Re-spin of [1] and [2] to finally document and support this panel variant.
[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/
---
Changes in v2:
- Add panel_desc to support the variant
- Switch to _multi calls
- Switch to const supplies
- Switch to new panel alloc
- Fix shift panel init seq name
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Caleb Connolly (2):
dt-bindings: display: visionox-rm69299: document new compatible string drm/panel: visionox-rm69299: support the variant found in the SHIFT6mq
Neil Armstrong (4):
drm/panel: visionox-rm69299: add plumbing to support panel variants drm/panel: visionox-rm69299: switch to _multi variants drm/panel: visionox-rm69299: switch to devm_regulator_bulk_get_const() drm/panel: visionox-rm69299: switch to devm_drm_panel_alloc()
.../bindings/display/panel/visionox,rm69299.yaml | 4 +- drivers/gpu/drm/panel/panel-visionox-rm69299.c | 253 +++++++++++++++------ 2 files changed, 189 insertions(+), 68 deletions(-)
---
base-commit: 08710e696081d58163c8078e0e096be6d35c5fad
change-id: 20250507-topic-misc-shift6-panel-1b0825c84761
Best regards,
Signature · 1 line
Neil Armstrong <[email protected]>
Neil Armstrong
maintainerPATCH v2 1/6 dt-bindings: display: visionox-rm69299: document new compatible string
From: Caleb Connolly <[email protected]>
Document a new compatible string for the second panel variant.
--- Documentation/devicetree/bindings/display/panel/visionox,rm69299.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/display/panel/visionox,rm69299.yaml +3 -1
@@ -18,7 +18,9 @@ allOf: properties: compatible: - const: visionox,rm69299-1080p-display + enum: + - visionox,rm69299-1080p-display + - visionox,rm69299-shift reg: maxItems: 1
Signature · 1 line
2.34.1
Neil Armstrong
maintainerPATCH v2 2/6 drm/panel: visionox-rm69299: add plumbing to support panel variants
In reply to Neil ArmstrongIn order to support a panel variant, add plumbing code to pass init sequence and mode as compatible data.
--- drivers/gpu/drm/panel/panel-visionox-rm69299.c | 58 ++++++++++++++------------ 1 file changed, 32 insertions(+), 26 deletions(-)
drivers/gpu/drm/panel/panel-visionox-rm69299.c +32 -26
@@ -5,6 +5,7 @@#include <linux/delay.h> #include <linux/module.h> +#include <linux/property.h> #include <linux/mod_devicetable.h> #include <linux/gpio/consumer.h> #include <linux/regulator/consumer.h>
@@ -15,11 +16,22 @@#include <drm/drm_modes.h> #include <drm/drm_panel.h> +struct visionox_rm69299_panel_desc { +const struct drm_display_mode *mode; +const u8 *init_seq; +unsigned int init_seq_len; +}; +struct visionox_rm69299 {struct drm_panel panel;struct regulator_bulk_data supplies[2 ];struct gpio_desc *reset_gpio;struct mipi_dsi_device *dsi; +const struct visionox_rm69299_panel_desc *desc; +}; + +static const u8 visionox_rm69299_1080x2248_60hz_init_seq[][2 ] = { + {0xfe ,0x00 }, {0xc2 ,0x08 }, {0x35 ,0x00 }, {0x51 ,0xff }, };static inline struct visionox_rm69299 *panel_to_ctx (struct drm_panel *panel)
@@ -84,7 +96,7 @@ static int visionox_rm69299_unprepare(struct drm_panel *panel)static int visionox_rm69299_prepare (struct drm_panel *panel) {struct visionox_rm69299 *ctx =panel_to_ctx (panel); -int ret; +int ret, i; ret =visionox_rm69299_power_on (ctx);if (ret <0 )
@@ -92,28 +104,12 @@ static int visionox_rm69299_prepare(struct drm_panel *panel) ctx->dsi->mode_flags |=MIPI_DSI_MODE_LPM ; - ret =mipi_dsi_dcs_write_buffer (ctx->dsi, (u8 []) {0xfe ,0x00 },2 ); -if (ret <0 ) { -dev_err (ctx->panel.dev,"cmd set tx 0 failed, ret = %d\n" , ret); - goto power_off; - } - - ret =mipi_dsi_dcs_write_buffer (ctx->dsi, (u8 []) {0xc2 ,0x08 },2 ); -if (ret <0 ) { -dev_err (ctx->panel.dev,"cmd set tx 1 failed, ret = %d\n" , ret); - goto power_off; - } - - ret =mipi_dsi_dcs_write_buffer (ctx->dsi, (u8 []) {0x35 ,0x00 },2 ); -if (ret <0 ) { -dev_err (ctx->panel.dev,"cmd set tx 2 failed, ret = %d\n" , ret); - goto power_off; - } - - ret =mipi_dsi_dcs_write_buffer (ctx->dsi, (u8 []) {0x51 ,0xff },2 ); -if (ret <0 ) { -dev_err (ctx->panel.dev,"cmd set tx 3 failed, ret = %d\n" , ret); - goto power_off; +for (i =0 ; i < ctx->desc->init_seq_len; i++) { + ret =mipi_dsi_dcs_write_buffer (ctx->dsi, &ctx->desc->init_seq[i *2 ],2 ); +if (ret <0 ) { +dev_err (ctx->panel.dev,"cmd tx failed, ret = %d\n" , ret); +return ret; + } } ret =mipi_dsi_dcs_write (ctx->dsi,MIPI_DCS_EXIT_SLEEP_MODE ,NULL ,0 );
@@ -160,8 +156,7 @@ static int visionox_rm69299_get_modes(struct drm_panel *panel,struct visionox_rm69299 *ctx =panel_to_ctx (panel);struct drm_display_mode *mode; - mode =drm_mode_duplicate (connector->dev, - &visionox_rm69299_1080x2248_60hz); + mode =drm_mode_duplicate (connector->dev, ctx->desc->mode);if (!mode) {dev_err (ctx->panel.dev,"failed to create a new display mode\n" );return 0 ;
@@ -191,6 +186,10 @@ static int visionox_rm69299_probe(struct mipi_dsi_device *dsi)if (!ctx)return -ENOMEM ; + ctx->desc =device_get_match_data (dev); +if (!ctx->desc) +return -EINVAL ; +mipi_dsi_set_drvdata (dsi, ctx); ctx->dsi = dsi;
@@ -239,8 +238,15 @@ static void visionox_rm69299_remove(struct mipi_dsi_device *dsi)drm_panel_remove (&ctx->panel); } +const struct visionox_rm69299_panel_desc visionox_rm69299_1080p_display_desc = { + .mode = &visionox_rm69299_1080x2248_60hz, + .init_seq = (const u8 *)visionox_rm69299_1080x2248_60hz_init_seq, + .init_seq_len =ARRAY_SIZE (visionox_rm69299_1080x2248_60hz_init_seq), +}; +static const struct of_device_id visionox_rm69299_of_match[] = { - { .compatible ="visionox,rm69299-1080p-display" , }, + { .compatible ="visionox,rm69299-1080p-display" , + .data = &visionox_rm69299_1080p_display_desc }, {/* sentinel */ } };MODULE_DEVICE_TABLE (of, visionox_rm69299_of_match);
Signature · 1 line
2.34.1
Re: [PATCH v2 2/6] drm/panel: visionox-rm69299: add plumbing to support panel variants
Quoted 4 lines · Neil Armstrong
In order to support a panel variant, add plumbing code to pass init sequence and mode as compatible data.
Signed-off-by Neil Armstrong <[email protected]>
Quoted 122 lines
--- drivers/gpu/drm/panel/panel-visionox-rm69299.c | 58 ++++++++++++++------------ 1 file changed, 32 insertions(+), 26 deletions(-)drivers/gpu/drm/panel/panel-visionox-rm69299.c +32
-26@@ -5,6 +5,7 @@#include <linux/delay.h> #include <linux/module.h> +#include <linux/property.h> #include <linux/mod_devicetable.h> #include <linux/gpio/consumer.h> #include <linux/regulator/consumer.h> @@ -15,11 +16,22 @@#include <drm/drm_modes.h> #include <drm/drm_panel.h> +struct visionox_rm69299_panel_desc { +const struct drm_display_mode *mode; +const u8 *init_seq; +unsigned int init_seq_len; +}; +struct visionox_rm69299 {struct drm_panel panel;struct regulator_bulk_data supplies[2 ];struct gpio_desc *reset_gpio;struct mipi_dsi_device *dsi; +const struct visionox_rm69299_panel_desc *desc; +}; + +static const u8 visionox_rm69299_1080x2248_60hz_init_seq[][2 ] = { + {0xfe ,0x00 }, {0xc2 ,0x08 }, {0x35 ,0x00 }, {0x51 ,0xff }, };static inline struct visionox_rm69299 *panel_to_ctx (struct drm_panel *panel)@@ -84,7 +96,7 @@ static int visionox_rm69299_unprepare(struct drm_panel *panel)static int visionox_rm69299_prepare (struct drm_panel *panel) {struct visionox_rm69299 *ctx =panel_to_ctx (panel); -int ret; +int ret, i; ret =visionox_rm69299_power_on (ctx);if (ret <0 )@@ -92,28 +104,12 @@ static int visionox_rm69299_prepare(struct drm_panel *panel) ctx->dsi->mode_flags |=MIPI_DSI_MODE_LPM ; - ret =mipi_dsi_dcs_write_buffer (ctx->dsi, (u8 []) {0xfe ,0x00 },2 ); -if (ret <0 ) { -dev_err (ctx->panel.dev,"cmd set tx 0 failed, ret = %d\n" , ret); - goto power_off; - } - - ret =mipi_dsi_dcs_write_buffer (ctx->dsi, (u8 []) {0xc2 ,0x08 },2 ); -if (ret <0 ) { -dev_err (ctx->panel.dev,"cmd set tx 1 failed, ret = %d\n" , ret); - goto power_off; - } - - ret =mipi_dsi_dcs_write_buffer (ctx->dsi, (u8 []) {0x35 ,0x00 },2 ); -if (ret <0 ) { -dev_err (ctx->panel.dev,"cmd set tx 2 failed, ret = %d\n" , ret); - goto power_off; - } - - ret =mipi_dsi_dcs_write_buffer (ctx->dsi, (u8 []) {0x51 ,0xff },2 ); -if (ret <0 ) { -dev_err (ctx->panel.dev,"cmd set tx 3 failed, ret = %d\n" , ret); - goto power_off; +for (i =0 ; i < ctx->desc->init_seq_len; i++) { + ret =mipi_dsi_dcs_write_buffer (ctx->dsi, &ctx->desc->init_seq[i *2 ],2 ); +if (ret <0 ) { +dev_err (ctx->panel.dev,"cmd tx failed, ret = %d\n" , ret); +return ret; + } } ret =mipi_dsi_dcs_write (ctx->dsi,MIPI_DCS_EXIT_SLEEP_MODE ,NULL ,0 );@@ -160,8 +156,7 @@ static int visionox_rm69299_get_modes(struct drm_panel *panel,struct visionox_rm69299 *ctx =panel_to_ctx (panel);struct drm_display_mode *mode; - mode =drm_mode_duplicate (connector->dev, - &visionox_rm69299_1080x2248_60hz); + mode =drm_mode_duplicate (connector->dev, ctx->desc->mode);if (!mode) {dev_err (ctx->panel.dev,"failed to create a new display mode\n" );return 0 ;@@ -191,6 +186,10 @@ static int visionox_rm69299_probe(struct mipi_dsi_device *dsi)if (!ctx)return -ENOMEM ; + ctx->desc =device_get_match_data (dev); +if (!ctx->desc) +return -EINVAL ; +mipi_dsi_set_drvdata (dsi, ctx); ctx->dsi = dsi;@@ -239,8 +238,15 @@ static void visionox_rm69299_remove(struct mipi_dsi_device *dsi)drm_panel_remove (&ctx->panel); } +const struct visionox_rm69299_panel_desc visionox_rm69299_1080p_display_desc = { + .mode = &visionox_rm69299_1080x2248_60hz, + .init_seq = (const u8 *)visionox_rm69299_1080x2248_60hz_init_seq, + .init_seq_len =ARRAY_SIZE (visionox_rm69299_1080x2248_60hz_init_seq), +}; +static const struct of_device_id visionox_rm69299_of_match[] = { - { .compatible ="visionox,rm69299-1080p-display" , }, + { .compatible ="visionox,rm69299-1080p-display" , + .data = &visionox_rm69299_1080p_display_desc }, {/* sentinel */ } };MODULE_DEVICE_TABLE (of, visionox_rm69299_of_match);
Neil Armstrong
maintainerPATCH v2 3/6 drm/panel: visionox-rm69299: switch to _multi variants
In reply to Neil ArmstrongSwitch to the DSI _multi variants to simplify error handling.
--- drivers/gpu/drm/panel/panel-visionox-rm69299.c | 48 +++++++------------------- 1 file changed, 13 insertions(+), 35 deletions(-)
drivers/gpu/drm/panel/panel-visionox-rm69299.c +13 -35
@@ -72,30 +72,24 @@ static int visionox_rm69299_power_off(struct visionox_rm69299 *ctx)static int visionox_rm69299_unprepare (struct drm_panel *panel) {struct visionox_rm69299 *ctx =panel_to_ctx (panel); -int ret; +struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; ctx->dsi->mode_flags =0 ; - ret =mipi_dsi_dcs_write (ctx->dsi,MIPI_DCS_SET_DISPLAY_OFF ,NULL ,0 ); -if (ret <0 ) -dev_err (ctx->panel.dev,"set_display_off cmd failed ret = %d\n" , ret); +mipi_dsi_dcs_set_display_off_multi (&dsi_ctx);/* 120ms delay required here as per DCS spec */ -msleep (120 ); +mipi_dsi_msleep (&dsi_ctx,120 ); - ret =mipi_dsi_dcs_write (ctx->dsi,MIPI_DCS_ENTER_SLEEP_MODE ,NULL ,0 ); -if (ret <0 ) { -dev_err (ctx->panel.dev,"enter_sleep cmd failed ret = %d\n" , ret); - } +mipi_dsi_dcs_enter_sleep_mode_multi (&dsi_ctx); - ret =visionox_rm69299_power_off (ctx); - -return ret; +return visionox_rm69299_power_off (ctx); }static int visionox_rm69299_prepare (struct drm_panel *panel) {struct visionox_rm69299 *ctx =panel_to_ctx (panel); +struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };int ret, i; ret =visionox_rm69299_power_on (ctx);
@@ -104,36 +98,20 @@ static int visionox_rm69299_prepare(struct drm_panel *panel) ctx->dsi->mode_flags |=MIPI_DSI_MODE_LPM ; -for (i =0 ; i < ctx->desc->init_seq_len; i++) { - ret =mipi_dsi_dcs_write_buffer (ctx->dsi, &ctx->desc->init_seq[i *2 ],2 ); -if (ret <0 ) { -dev_err (ctx->panel.dev,"cmd tx failed, ret = %d\n" , ret); -return ret; - } - } +for (i =0 ; i < ctx->desc->init_seq_len; i++) +mipi_dsi_dcs_write_buffer_multi (&dsi_ctx, &ctx->desc->init_seq[i *2 ],2 ); - ret =mipi_dsi_dcs_write (ctx->dsi,MIPI_DCS_EXIT_SLEEP_MODE ,NULL ,0 ); -if (ret <0 ) { -dev_err (ctx->panel.dev,"exit_sleep_mode cmd failed ret = %d\n" , ret); - goto power_off; - } +mipi_dsi_dcs_exit_sleep_mode_multi (&dsi_ctx);/* Per DSI spec wait 120ms after sending exit sleep DCS command */ -msleep (120 ); +mipi_dsi_msleep (&dsi_ctx,120 ); - ret =mipi_dsi_dcs_write (ctx->dsi,MIPI_DCS_SET_DISPLAY_ON ,NULL ,0 ); -if (ret <0 ) { -dev_err (ctx->panel.dev,"set_display_on cmd failed ret = %d\n" , ret); - goto power_off; - } +mipi_dsi_dcs_set_display_on_multi (&dsi_ctx);/* Per DSI spec wait 120ms after sending set_display_on DCS command */ -msleep (120 ); +mipi_dsi_msleep (&dsi_ctx,120 ); -return 0 ; - -power_off: -return ret; +return dsi_ctx.accum_err; }static const struct drm_display_mode visionox_rm69299_1080x2248_60hz = {
Signature · 1 line
2.34.1
Re: [PATCH v2 3/6] drm/panel: visionox-rm69299: switch to _multi variants
Quoted 3 lines · Neil Armstrong
Switch to the DSI
_multivariants to simplify error handling.Signed-off-by Neil Armstrong <[email protected]>
Quoted 90 lines
--- drivers/gpu/drm/panel/panel-visionox-rm69299.c | 48 +++++++------------------- 1 file changed, 13 insertions(+), 35 deletions(-)drivers/gpu/drm/panel/panel-visionox-rm69299.c +13
-35@@ -72,30 +72,24 @@ static int visionox_rm69299_power_off(struct visionox_rm69299 *ctx)static int visionox_rm69299_unprepare (struct drm_panel *panel) {struct visionox_rm69299 *ctx =panel_to_ctx (panel); -int ret; +struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; ctx->dsi->mode_flags =0 ; - ret =mipi_dsi_dcs_write (ctx->dsi,MIPI_DCS_SET_DISPLAY_OFF ,NULL ,0 ); -if (ret <0 ) -dev_err (ctx->panel.dev,"set_display_off cmd failed ret = %d\n" , ret); +mipi_dsi_dcs_set_display_off_multi (&dsi_ctx);/* 120ms delay required here as per DCS spec */ -msleep (120 ); +mipi_dsi_msleep (&dsi_ctx,120 ); - ret =mipi_dsi_dcs_write (ctx->dsi,MIPI_DCS_ENTER_SLEEP_MODE ,NULL ,0 ); -if (ret <0 ) { -dev_err (ctx->panel.dev,"enter_sleep cmd failed ret = %d\n" , ret); - } +mipi_dsi_dcs_enter_sleep_mode_multi (&dsi_ctx); - ret =visionox_rm69299_power_off (ctx); - -return ret; +return visionox_rm69299_power_off (ctx); }static int visionox_rm69299_prepare (struct drm_panel *panel) {struct visionox_rm69299 *ctx =panel_to_ctx (panel); +struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };int ret, i; ret =visionox_rm69299_power_on (ctx);@@ -104,36 +98,20 @@ static int visionox_rm69299_prepare(struct drm_panel *panel) ctx->dsi->mode_flags |=MIPI_DSI_MODE_LPM ; -for (i =0 ; i < ctx->desc->init_seq_len; i++) { - ret =mipi_dsi_dcs_write_buffer (ctx->dsi, &ctx->desc->init_seq[i *2 ],2 ); -if (ret <0 ) { -dev_err (ctx->panel.dev,"cmd tx failed, ret = %d\n" , ret); -return ret; - } - } +for (i =0 ; i < ctx->desc->init_seq_len; i++) +mipi_dsi_dcs_write_buffer_multi (&dsi_ctx, &ctx->desc->init_seq[i *2 ],2 ); - ret =mipi_dsi_dcs_write (ctx->dsi,MIPI_DCS_EXIT_SLEEP_MODE ,NULL ,0 ); -if (ret <0 ) { -dev_err (ctx->panel.dev,"exit_sleep_mode cmd failed ret = %d\n" , ret); - goto power_off; - } +mipi_dsi_dcs_exit_sleep_mode_multi (&dsi_ctx);/* Per DSI spec wait 120ms after sending exit sleep DCS command */ -msleep (120 ); +mipi_dsi_msleep (&dsi_ctx,120 ); - ret =mipi_dsi_dcs_write (ctx->dsi,MIPI_DCS_SET_DISPLAY_ON ,NULL ,0 ); -if (ret <0 ) { -dev_err (ctx->panel.dev,"set_display_on cmd failed ret = %d\n" , ret); - goto power_off; - } +mipi_dsi_dcs_set_display_on_multi (&dsi_ctx);/* Per DSI spec wait 120ms after sending set_display_on DCS command */ -msleep (120 ); +mipi_dsi_msleep (&dsi_ctx,120 ); -return 0 ; - -power_off: -return ret; +return dsi_ctx.accum_err; }static const struct drm_display_mode visionox_rm69299_1080x2248_60hz = {
Neil Armstrong
maintainerPATCH v2 4/6 drm/panel: visionox-rm69299: switch to devm_regulator_bulk_get_const()
In reply to Neil ArmstrongSwitch to devm_regulator_bulk_get_const() to move the supply data to const.
--- drivers/gpu/drm/panel/panel-visionox-rm69299.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-)
drivers/gpu/drm/panel/panel-visionox-rm69299.c +12 -9
@@ -24,12 +24,17 @@ struct visionox_rm69299_panel_desc {struct visionox_rm69299 {struct drm_panel panel; -struct regulator_bulk_data supplies[2 ]; +struct regulator_bulk_data *supplies;struct gpio_desc *reset_gpio;struct mipi_dsi_device *dsi;const struct visionox_rm69299_panel_desc *desc; }; +static const struct regulator_bulk_data visionox_rm69299_supplies[] = { + { .supply ="vdda" , .init_load_uA =32000 }, + { .supply ="vdd3p3" , .init_load_uA =13200 }, +}; +static const u8 visionox_rm69299_1080x2248_60hz_init_seq[][2 ] = { {0xfe ,0x00 }, {0xc2 ,0x08 }, {0x35 ,0x00 }, {0x51 ,0xff }, };
@@ -43,7 +48,8 @@ static int visionox_rm69299_power_on(struct visionox_rm69299 *ctx) {int ret; - ret =regulator_bulk_enable (ARRAY_SIZE (ctx->supplies), ctx->supplies); + ret =regulator_bulk_enable (ARRAY_SIZE (visionox_rm69299_supplies), + ctx->supplies);if (ret <0 )return ret;
@@ -66,7 +72,8 @@ static int visionox_rm69299_power_off(struct visionox_rm69299 *ctx) {gpiod_set_value (ctx->reset_gpio,0 ); -return regulator_bulk_disable (ARRAY_SIZE (ctx->supplies), ctx->supplies); +return regulator_bulk_disable (ARRAY_SIZE (visionox_rm69299_supplies), + ctx->supplies); }static int visionox_rm69299_unprepare (struct drm_panel *panel)
@@ -172,12 +179,8 @@ static int visionox_rm69299_probe(struct mipi_dsi_device *dsi) ctx->dsi = dsi; - ctx->supplies[0 ].supply ="vdda" ; - ctx->supplies[0 ].init_load_uA =32000 ; - ctx->supplies[1 ].supply ="vdd3p3" ; - ctx->supplies[1 ].init_load_uA =13200 ; - - ret =devm_regulator_bulk_get (dev,ARRAY_SIZE (ctx->supplies), ctx->supplies); + ret =devm_regulator_bulk_get_const (dev,ARRAY_SIZE (visionox_rm69299_supplies), + visionox_rm69299_supplies, &ctx->supplies);if (ret <0 )return ret;
Signature · 1 line
2.34.1
Re: [PATCH v2 4/6] drm/panel: visionox-rm69299: switch to devm_regulator_bulk_get_const()
Quoted 4 lines · Neil Armstrong
Switch to
devm_regulator_bulk_get_const()to move the supply data to const.Signed-off-by Neil Armstrong <[email protected]>
Quoted 63 lines
--- drivers/gpu/drm/panel/panel-visionox-rm69299.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-)drivers/gpu/drm/panel/panel-visionox-rm69299.c +12
-9@@ -24,12 +24,17 @@ struct visionox_rm69299_panel_desc {struct visionox_rm69299 {struct drm_panel panel; -struct regulator_bulk_data supplies[2 ]; +struct regulator_bulk_data *supplies;struct gpio_desc *reset_gpio;struct mipi_dsi_device *dsi;const struct visionox_rm69299_panel_desc *desc; }; +static const struct regulator_bulk_data visionox_rm69299_supplies[] = { + { .supply ="vdda" , .init_load_uA =32000 }, + { .supply ="vdd3p3" , .init_load_uA =13200 }, +}; +static const u8 visionox_rm69299_1080x2248_60hz_init_seq[][2 ] = { {0xfe ,0x00 }, {0xc2 ,0x08 }, {0x35 ,0x00 }, {0x51 ,0xff }, };@@ -43,7 +48,8 @@ static int visionox_rm69299_power_on(struct visionox_rm69299 *ctx) {int ret; - ret =regulator_bulk_enable (ARRAY_SIZE (ctx->supplies), ctx->supplies); + ret =regulator_bulk_enable (ARRAY_SIZE (visionox_rm69299_supplies), + ctx->supplies);if (ret <0 )return ret;@@ -66,7 +72,8 @@ static int visionox_rm69299_power_off(struct visionox_rm69299 *ctx) {gpiod_set_value (ctx->reset_gpio,0 ); -return regulator_bulk_disable (ARRAY_SIZE (ctx->supplies), ctx->supplies); +return regulator_bulk_disable (ARRAY_SIZE (visionox_rm69299_supplies), + ctx->supplies); }static int visionox_rm69299_unprepare (struct drm_panel *panel)@@ -172,12 +179,8 @@ static int visionox_rm69299_probe(struct mipi_dsi_device *dsi) ctx->dsi = dsi; - ctx->supplies[0 ].supply ="vdda" ; - ctx->supplies[0 ].init_load_uA =32000 ; - ctx->supplies[1 ].supply ="vdd3p3" ; - ctx->supplies[1 ].init_load_uA =13200 ; - - ret =devm_regulator_bulk_get (dev,ARRAY_SIZE (ctx->supplies), ctx->supplies); + ret =devm_regulator_bulk_get_const (dev,ARRAY_SIZE (visionox_rm69299_supplies), + visionox_rm69299_supplies, &ctx->supplies);if (ret <0 )return ret;
Neil Armstrong
maintainerPATCH v2 5/6 drm/panel: visionox-rm69299: switch to devm_drm_panel_alloc()
In reply to Neil ArmstrongSwitch to devm_drm_panel_alloc() to add panel refcounting.
--- drivers/gpu/drm/panel/panel-visionox-rm69299.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/panel/panel-visionox-rm69299.c +3 -3
@@ -167,7 +167,9 @@ static int visionox_rm69299_probe(struct mipi_dsi_device *dsi)struct visionox_rm69299 *ctx;int ret; - ctx =devm_kzalloc (dev,sizeof (*ctx),GFP_KERNEL ); + ctx = devm_drm_panel_alloc(dev, struct visionox_rm69299, panel, + &visionox_rm69299_drm_funcs, +DRM_MODE_CONNECTOR_DSI );if (!ctx)return -ENOMEM ;
@@ -190,8 +192,6 @@ static int visionox_rm69299_probe(struct mipi_dsi_device *dsi)return PTR_ERR (ctx->reset_gpio); } -drm_panel_init (&ctx->panel, dev, &visionox_rm69299_drm_funcs, -DRM_MODE_CONNECTOR_DSI );drm_panel_add (&ctx->panel); dsi->lanes =4 ;
Signature · 1 line
2.34.1
Re: [PATCH v2 5/6] drm/panel: visionox-rm69299: switch to devm_drm_panel_alloc()
Quoted 3 lines · Neil Armstrong
Switch to
devm_drm_panel_alloc()to add panel refcounting.Signed-off-by Neil Armstrong <[email protected]>
Quoted 29 lines
--- drivers/gpu/drm/panel/panel-visionox-rm69299.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/panel/panel-visionox-rm69299.c +3
-3@@ -167,7 +167,9 @@ static int visionox_rm69299_probe(struct mipi_dsi_device *dsi)struct visionox_rm69299 *ctx;int ret; - ctx =devm_kzalloc (dev,sizeof (*ctx),GFP_KERNEL ); + ctx = devm_drm_panel_alloc(dev, struct visionox_rm69299, panel, + &visionox_rm69299_drm_funcs, +DRM_MODE_CONNECTOR_DSI );if (!ctx)return -ENOMEM ;@@ -190,8 +192,6 @@ static int visionox_rm69299_probe(struct mipi_dsi_device *dsi)return PTR_ERR (ctx->reset_gpio); } -drm_panel_init (&ctx->panel, dev, &visionox_rm69299_drm_funcs, -DRM_MODE_CONNECTOR_DSI );drm_panel_add (&ctx->panel); dsi->lanes =4 ;
Neil Armstrong
maintainerPATCH v2 6/6 drm/panel: visionox-rm69299: support the variant found in the SHIFT6mq
In reply to Neil ArmstrongFrom: Caleb Connolly <[email protected]>
Add support for another variant of the rm69299 panel. This panel is 1080x2160 and is found in the shift-axolotl (SHIFT6mq).
--- drivers/gpu/drm/panel/panel-visionox-rm69299.c | 132 +++++++++++++++++++++++++ 1 file changed, 132 insertions(+)
drivers/gpu/drm/panel/panel-visionox-rm69299.c +132 -0
@@ -39,6 +39,117 @@ static const u8 visionox_rm69299_1080x2248_60hz_init_seq[][2] = { { 0xfe, 0x00 }, { 0xc2, 0x08 }, { 0x35, 0x00 }, { 0x51, 0xff }, }; +static const u8 visionox_rm69299_1080x2160_60hz_init_seq[][2 ] = { + {0xfe ,0x40 }, {0x05 ,0x04 }, {0x06 ,0x08 }, {0x08 ,0x04 }, + {0x09 ,0x08 }, {0x0a ,0x07 }, {0x0b ,0xcc }, {0x0c ,0x07 }, + {0x0d ,0x90 }, {0x0f ,0x87 }, {0x20 ,0x8d }, {0x21 ,0x8d }, + {0x24 ,0x05 }, {0x26 ,0x05 }, {0x28 ,0x05 }, {0x2a ,0x05 }, + {0x2d ,0x28 }, {0x2f ,0x28 }, {0x30 ,0x32 }, {0x31 ,0x32 }, + {0x37 ,0x80 }, {0x38 ,0x30 }, {0x39 ,0xa8 }, {0x46 ,0x48 }, + {0x47 ,0x48 }, {0x6b ,0x10 }, {0x6f ,0x02 }, {0x74 ,0x2b }, + {0x80 ,0x1a }, {0xfe ,0x40 }, {0x93 ,0x10 }, {0x16 ,0x00 }, + {0x85 ,0x07 }, {0x84 ,0x01 }, {0x86 ,0x0f }, {0x87 ,0x05 }, + {0x8c ,0x00 }, {0x88 ,0x2e }, {0x89 ,0x2e }, {0x8b ,0x09 }, + {0x95 ,0x00 }, {0x91 ,0x00 }, {0x90 ,0x00 }, {0x8d ,0xd0 }, + {0x8a ,0x03 }, {0xfe ,0xa0 }, {0x13 ,0x00 }, {0x33 ,0x00 }, + {0x0b ,0x33 }, {0x36 ,0x1e }, {0x31 ,0x88 }, {0x32 ,0x88 }, + {0x37 ,0xf1 }, {0xfe ,0x50 }, {0x00 ,0x00 }, {0x01 ,0x00 }, + {0x02 ,0x00 }, {0x03 ,0xe9 }, {0x04 ,0x00 }, {0x05 ,0xf6 }, + {0x06 ,0x01 }, {0x07 ,0x2c }, {0x08 ,0x01 }, {0x09 ,0x62 }, + {0x0a ,0x01 }, {0x0b ,0x98 }, {0x0c ,0x01 }, {0x0d ,0xbf }, + {0x0e ,0x01 }, {0x0f ,0xf6 }, {0x10 ,0x02 }, {0x11 ,0x24 }, + {0x12 ,0x02 }, {0x13 ,0x4e }, {0x14 ,0x02 }, {0x15 ,0x70 }, + {0x16 ,0x02 }, {0x17 ,0xaf }, {0x18 ,0x02 }, {0x19 ,0xe2 }, + {0x1a ,0x03 }, {0x1b ,0x1f }, {0x1c ,0x03 }, {0x1d ,0x52 }, + {0x1e ,0x03 }, {0x1f ,0x82 }, {0x20 ,0x03 }, {0x21 ,0xb6 }, + {0x22 ,0x03 }, {0x23 ,0xf0 }, {0x24 ,0x04 }, {0x25 ,0x1f }, + {0x26 ,0x04 }, {0x27 ,0x37 }, {0x28 ,0x04 }, {0x29 ,0x59 }, + {0x2a ,0x04 }, {0x2b ,0x68 }, {0x30 ,0x04 }, {0x31 ,0x85 }, + {0x32 ,0x04 }, {0x33 ,0xa2 }, {0x34 ,0x04 }, {0x35 ,0xbc }, + {0x36 ,0x04 }, {0x37 ,0xd8 }, {0x38 ,0x04 }, {0x39 ,0xf4 }, + {0x3a ,0x05 }, {0x3b ,0x0e }, {0x40 ,0x05 }, {0x41 ,0x13 }, + {0x42 ,0x05 }, {0x43 ,0x1f }, {0x44 ,0x05 }, {0x45 ,0x1f }, + {0x46 ,0x00 }, {0x47 ,0x00 }, {0x48 ,0x01 }, {0x49 ,0x43 }, + {0x4a ,0x01 }, {0x4b ,0x4c }, {0x4c ,0x01 }, {0x4d ,0x6f }, + {0x4e ,0x01 }, {0x4f ,0x92 }, {0x50 ,0x01 }, {0x51 ,0xb5 }, + {0x52 ,0x01 }, {0x53 ,0xd4 }, {0x58 ,0x02 }, {0x59 ,0x06 }, + {0x5a ,0x02 }, {0x5b ,0x33 }, {0x5c ,0x02 }, {0x5d ,0x59 }, + {0x5e ,0x02 }, {0x5f ,0x7d }, {0x60 ,0x02 }, {0x61 ,0xbd }, + {0x62 ,0x02 }, {0x63 ,0xf7 }, {0x64 ,0x03 }, {0x65 ,0x31 }, + {0x66 ,0x03 }, {0x67 ,0x63 }, {0x68 ,0x03 }, {0x69 ,0x9d }, + {0x6a ,0x03 }, {0x6b ,0xd2 }, {0x6c ,0x04 }, {0x6d ,0x05 }, + {0x6e ,0x04 }, {0x6f ,0x38 }, {0x70 ,0x04 }, {0x71 ,0x51 }, + {0x72 ,0x04 }, {0x73 ,0x70 }, {0x74 ,0x04 }, {0x75 ,0x85 }, + {0x76 ,0x04 }, {0x77 ,0xa1 }, {0x78 ,0x04 }, {0x79 ,0xc0 }, + {0x7a ,0x04 }, {0x7b ,0xd8 }, {0x7c ,0x04 }, {0x7d ,0xf2 }, + {0x7e ,0x05 }, {0x7f ,0x10 }, {0x80 ,0x05 }, {0x81 ,0x21 }, + {0x82 ,0x05 }, {0x83 ,0x2e }, {0x84 ,0x05 }, {0x85 ,0x3a }, + {0x86 ,0x05 }, {0x87 ,0x3e }, {0x88 ,0x00 }, {0x89 ,0x00 }, + {0x8a ,0x01 }, {0x8b ,0x86 }, {0x8c ,0x01 }, {0x8d ,0x8f }, + {0x8e ,0x01 }, {0x8f ,0xb3 }, {0x90 ,0x01 }, {0x91 ,0xd7 }, + {0x92 ,0x01 }, {0x93 ,0xfb }, {0x94 ,0x02 }, {0x95 ,0x18 }, + {0x96 ,0x02 }, {0x97 ,0x4f }, {0x98 ,0x02 }, {0x99 ,0x7e }, + {0x9a ,0x02 }, {0x9b ,0xa6 }, {0x9c ,0x02 }, {0x9d ,0xcf }, + {0x9e ,0x03 }, {0x9f ,0x14 }, {0xa4 ,0x03 }, {0xa5 ,0x52 }, + {0xa6 ,0x03 }, {0xa7 ,0x93 }, {0xac ,0x03 }, {0xad ,0xcf }, + {0xae ,0x04 }, {0xaf ,0x08 }, {0xb0 ,0x04 }, {0xb1 ,0x42 }, + {0xb2 ,0x04 }, {0xb3 ,0x7f }, {0xb4 ,0x04 }, {0xb5 ,0xb4 }, + {0xb6 ,0x04 }, {0xb7 ,0xcc }, {0xb8 ,0x04 }, {0xb9 ,0xf2 }, + {0xba ,0x05 }, {0xbb ,0x0c }, {0xbc ,0x05 }, {0xbd ,0x26 }, + {0xbe ,0x05 }, {0xbf ,0x4b }, {0xc0 ,0x05 }, {0xc1 ,0x64 }, + {0xc2 ,0x05 }, {0xc3 ,0x83 }, {0xc4 ,0x05 }, {0xc5 ,0xa1 }, + {0xc6 ,0x05 }, {0xc7 ,0xba }, {0xc8 ,0x05 }, {0xc9 ,0xc4 }, + {0xca ,0x05 }, {0xcb ,0xd5 }, {0xcc ,0x05 }, {0xcd ,0xd5 }, + {0xce ,0x00 }, {0xcf ,0xce }, {0xd0 ,0x00 }, {0xd1 ,0xdb }, + {0xd2 ,0x01 }, {0xd3 ,0x32 }, {0xd4 ,0x01 }, {0xd5 ,0x3b }, + {0xd6 ,0x01 }, {0xd7 ,0x74 }, {0xd8 ,0x01 }, {0xd9 ,0x7d }, + {0xfe ,0x60 }, {0x00 ,0xcc }, {0x01 ,0x0f }, {0x02 ,0xff }, + {0x03 ,0x01 }, {0x04 ,0x00 }, {0x05 ,0x02 }, {0x06 ,0x00 }, + {0x07 ,0x00 }, {0x09 ,0xc4 }, {0x0a ,0x00 }, {0x0b ,0x04 }, + {0x0c ,0x01 }, {0x0d ,0x00 }, {0x0e ,0x04 }, {0x0f ,0x00 }, + {0x10 ,0x71 }, {0x12 ,0xc4 }, {0x13 ,0x00 }, {0x14 ,0x04 }, + {0x15 ,0x01 }, {0x16 ,0x00 }, {0x17 ,0x06 }, {0x18 ,0x00 }, + {0x19 ,0x71 }, {0x1b ,0xc4 }, {0x1c ,0x00 }, {0x1d ,0x02 }, + {0x1e ,0x00 }, {0x1f ,0x00 }, {0x20 ,0x08 }, {0x21 ,0x66 }, + {0x22 ,0xb4 }, {0x24 ,0xc4 }, {0x25 ,0x00 }, {0x26 ,0x02 }, + {0x27 ,0x00 }, {0x28 ,0x00 }, {0x29 ,0x07 }, {0x2a ,0x66 }, + {0x2b ,0xb4 }, {0x2f ,0xc4 }, {0x30 ,0x00 }, {0x31 ,0x04 }, + {0x32 ,0x01 }, {0x33 ,0x00 }, {0x34 ,0x03 }, {0x35 ,0x00 }, + {0x36 ,0x71 }, {0x38 ,0xc4 }, {0x39 ,0x00 }, {0x3a ,0x04 }, + {0x3b ,0x01 }, {0x3d ,0x00 }, {0x3f ,0x05 }, {0x40 ,0x00 }, + {0x41 ,0x71 }, {0x83 ,0xce }, {0x84 ,0x02 }, {0x85 ,0x20 }, + {0x86 ,0xdc }, {0x87 ,0x00 }, {0x88 ,0x04 }, {0x89 ,0x00 }, + {0x8a ,0xbb }, {0x8b ,0x80 }, {0xc7 ,0x0e }, {0xc8 ,0x05 }, + {0xc9 ,0x1f }, {0xca ,0x06 }, {0xcb ,0x00 }, {0xcc ,0x03 }, + {0xcd ,0x04 }, {0xce ,0x1f }, {0xcf ,0x1f }, {0xd0 ,0x1f }, + {0xd1 ,0x1f }, {0xd2 ,0x1f }, {0xd3 ,0x1f }, {0xd4 ,0x1f }, + {0xd5 ,0x1f }, {0xd6 ,0x1f }, {0xd7 ,0x17 }, {0xd8 ,0x1f }, + {0xd9 ,0x16 }, {0xda ,0x1f }, {0xdb ,0x0e }, {0xdc ,0x01 }, + {0xdd ,0x1f }, {0xde ,0x02 }, {0xdf ,0x00 }, {0xe0 ,0x03 }, + {0xe1 ,0x04 }, {0xe2 ,0x1f }, {0xe3 ,0x1f }, {0xe4 ,0x1f }, + {0xe5 ,0x1f }, {0xe6 ,0x1f }, {0xe7 ,0x1f }, {0xe8 ,0x1f }, + {0xe9 ,0x1f }, {0xea ,0x1f }, {0xeb ,0x17 }, {0xec ,0x1f }, + {0xed ,0x16 }, {0xee ,0x1f }, {0xef ,0x03 }, {0xfe ,0x70 }, + {0x5a ,0x0b }, {0x5b ,0x0b }, {0x5c ,0x55 }, {0x5d ,0x24 }, + {0xfe ,0x90 }, {0x12 ,0x24 }, {0x13 ,0x49 }, {0x14 ,0x92 }, + {0x15 ,0x86 }, {0x16 ,0x61 }, {0x17 ,0x18 }, {0x18 ,0x24 }, + {0x19 ,0x49 }, {0x1a ,0x92 }, {0x1b ,0x86 }, {0x1c ,0x61 }, + {0x1d ,0x18 }, {0x1e ,0x24 }, {0x1f ,0x49 }, {0x20 ,0x92 }, + {0x21 ,0x86 }, {0x22 ,0x61 }, {0x23 ,0x18 }, {0xfe ,0x40 }, + {0x0e ,0x10 }, {0xfe ,0xa0 }, {0x04 ,0x80 }, {0x16 ,0x00 }, + {0x26 ,0x10 }, {0x2f ,0x37 }, {0xfe ,0xd0 }, {0x06 ,0x0f }, + {0x4b ,0x00 }, {0x56 ,0x4a }, {0xfe ,0x00 }, {0xc2 ,0x09 }, + {0x35 ,0x00 }, {0xfe ,0x70 }, {0x7d ,0x61 }, {0x7f ,0x00 }, + {0x7e ,0x4e }, {0x52 ,0x2c }, {0x49 ,0x00 }, {0x4a ,0x00 }, + {0x4b ,0x00 }, {0x4c ,0x00 }, {0x4d ,0xe8 }, {0x4e ,0x25 }, + {0x4f ,0x6e }, {0x50 ,0xae }, {0x51 ,0x2f }, {0xad ,0xf4 }, + {0xae ,0x8f }, {0xaf ,0x00 }, {0xb0 ,0x54 }, {0xb1 ,0x3a }, + {0xb2 ,0x00 }, {0xb3 ,0x00 }, {0xb4 ,0x00 }, {0xb5 ,0x00 }, + {0xb6 ,0x18 }, {0xb7 ,0x30 }, {0xb8 ,0x4a }, {0xb9 ,0x98 }, + {0xba ,0x30 }, {0xbb ,0x60 }, {0xbc ,0x50 }, {0xbd ,0x00 }, + {0xbe ,0x00 }, {0xbf ,0x39 }, {0xfe ,0x00 }, {0x51 ,0x66 }, +}; +static inline struct visionox_rm69299 *panel_to_ctx (struct drm_panel *panel) { return container_of(panel, struct visionox_rm69299, panel);
@@ -135,6 +246,19 @@ static const struct drm_display_mode visionox_rm69299_1080x2248_60hz = { .flags = 0, }; +static const struct drm_display_mode visionox_rm69299_1080x2160_60hz = { + .clock =158695 , + .hdisplay =1080 , + .hsync_start =1080 +26 , + .hsync_end =1080 +26 +2 , + .htotal =1080 +26 +2 +36 , + .vdisplay =2160 , + .vsync_start =2160 +8 , + .vsync_end =2160 +8 +4 , + .vtotal =2160 +8 +4 +4 , + .flags =0 , +}; +static int visionox_rm69299_get_modes (struct drm_panel *panel,struct drm_connector *connector) {
@@ -225,9 +349,17 @@ const struct visionox_rm69299_panel_desc visionox_rm69299_1080p_display_desc = { .init_seq_len = ARRAY_SIZE(visionox_rm69299_1080x2248_60hz_init_seq), }; +const struct visionox_rm69299_panel_desc visionox_rm69299_shift_desc = { + .mode = &visionox_rm69299_1080x2160_60hz, + .init_seq = (const u8 *)visionox_rm69299_1080x2160_60hz_init_seq, + .init_seq_len =ARRAY_SIZE (visionox_rm69299_1080x2160_60hz_init_seq), +}; +static const struct of_device_id visionox_rm69299_of_match[] = { { .compatible ="visionox,rm69299-1080p-display" , .data = &visionox_rm69299_1080p_display_desc }, + { .compatible ="visionox,rm69299-shift" , + .data = &visionox_rm69299_shift_desc }, {/* sentinel */ } };MODULE_DEVICE_TABLE (of, visionox_rm69299_of_match);
Signature · 1 line
2.34.1
Re: [PATCH v2 6/6] drm/panel: visionox-rm69299: support the variant found in the SHIFT6mq
Quoted 8 lines · Neil Armstrong
From: Caleb Connolly <[email protected]>
Add support for another variant of the rm69299 panel. This panel is 1080x2160 and is found in the shift-axolotl (SHIFT6mq).
Signed-off-by Caleb Connolly <[email protected]>[narmstrong: moved to panel_desc]Signed-off-by Neil Armstrong <[email protected]>
Quoted 165 lines
--- drivers/gpu/drm/panel/panel-visionox-rm69299.c | 132 +++++++++++++++++++++++++ 1 file changed, 132 insertions(+)drivers/gpu/drm/panel/panel-visionox-rm69299.c +132
-0@@ -39,6 +39,117 @@ static const u8 visionox_rm69299_1080x2248_60hz_init_seq[][2] = { { 0xfe, 0x00 }, { 0xc2, 0x08 }, { 0x35, 0x00 }, { 0x51, 0xff }, }; +static const u8 visionox_rm69299_1080x2160_60hz_init_seq[][2 ] = { + {0xfe ,0x40 }, {0x05 ,0x04 }, {0x06 ,0x08 }, {0x08 ,0x04 }, + {0x09 ,0x08 }, {0x0a ,0x07 }, {0x0b ,0xcc }, {0x0c ,0x07 }, + {0x0d ,0x90 }, {0x0f ,0x87 }, {0x20 ,0x8d }, {0x21 ,0x8d }, + {0x24 ,0x05 }, {0x26 ,0x05 }, {0x28 ,0x05 }, {0x2a ,0x05 }, + {0x2d ,0x28 }, {0x2f ,0x28 }, {0x30 ,0x32 }, {0x31 ,0x32 }, + {0x37 ,0x80 }, {0x38 ,0x30 }, {0x39 ,0xa8 }, {0x46 ,0x48 }, + {0x47 ,0x48 }, {0x6b ,0x10 }, {0x6f ,0x02 }, {0x74 ,0x2b }, + {0x80 ,0x1a }, {0xfe ,0x40 }, {0x93 ,0x10 }, {0x16 ,0x00 }, + {0x85 ,0x07 }, {0x84 ,0x01 }, {0x86 ,0x0f }, {0x87 ,0x05 }, + {0x8c ,0x00 }, {0x88 ,0x2e }, {0x89 ,0x2e }, {0x8b ,0x09 }, + {0x95 ,0x00 }, {0x91 ,0x00 }, {0x90 ,0x00 }, {0x8d ,0xd0 }, + {0x8a ,0x03 }, {0xfe ,0xa0 }, {0x13 ,0x00 }, {0x33 ,0x00 }, + {0x0b ,0x33 }, {0x36 ,0x1e }, {0x31 ,0x88 }, {0x32 ,0x88 }, + {0x37 ,0xf1 }, {0xfe ,0x50 }, {0x00 ,0x00 }, {0x01 ,0x00 }, + {0x02 ,0x00 }, {0x03 ,0xe9 }, {0x04 ,0x00 }, {0x05 ,0xf6 }, + {0x06 ,0x01 }, {0x07 ,0x2c }, {0x08 ,0x01 }, {0x09 ,0x62 }, + {0x0a ,0x01 }, {0x0b ,0x98 }, {0x0c ,0x01 }, {0x0d ,0xbf }, + {0x0e ,0x01 }, {0x0f ,0xf6 }, {0x10 ,0x02 }, {0x11 ,0x24 }, + {0x12 ,0x02 }, {0x13 ,0x4e }, {0x14 ,0x02 }, {0x15 ,0x70 }, + {0x16 ,0x02 }, {0x17 ,0xaf }, {0x18 ,0x02 }, {0x19 ,0xe2 }, + {0x1a ,0x03 }, {0x1b ,0x1f }, {0x1c ,0x03 }, {0x1d ,0x52 }, + {0x1e ,0x03 }, {0x1f ,0x82 }, {0x20 ,0x03 }, {0x21 ,0xb6 }, + {0x22 ,0x03 }, {0x23 ,0xf0 }, {0x24 ,0x04 }, {0x25 ,0x1f }, + {0x26 ,0x04 }, {0x27 ,0x37 }, {0x28 ,0x04 }, {0x29 ,0x59 }, + {0x2a ,0x04 }, {0x2b ,0x68 }, {0x30 ,0x04 }, {0x31 ,0x85 }, + {0x32 ,0x04 }, {0x33 ,0xa2 }, {0x34 ,0x04 }, {0x35 ,0xbc }, + {0x36 ,0x04 }, {0x37 ,0xd8 }, {0x38 ,0x04 }, {0x39 ,0xf4 }, + {0x3a ,0x05 }, {0x3b ,0x0e }, {0x40 ,0x05 }, {0x41 ,0x13 }, + {0x42 ,0x05 }, {0x43 ,0x1f }, {0x44 ,0x05 }, {0x45 ,0x1f }, + {0x46 ,0x00 }, {0x47 ,0x00 }, {0x48 ,0x01 }, {0x49 ,0x43 }, + {0x4a ,0x01 }, {0x4b ,0x4c }, {0x4c ,0x01 }, {0x4d ,0x6f }, + {0x4e ,0x01 }, {0x4f ,0x92 }, {0x50 ,0x01 }, {0x51 ,0xb5 }, + {0x52 ,0x01 }, {0x53 ,0xd4 }, {0x58 ,0x02 }, {0x59 ,0x06 }, + {0x5a ,0x02 }, {0x5b ,0x33 }, {0x5c ,0x02 }, {0x5d ,0x59 }, + {0x5e ,0x02 }, {0x5f ,0x7d }, {0x60 ,0x02 }, {0x61 ,0xbd }, + {0x62 ,0x02 }, {0x63 ,0xf7 }, {0x64 ,0x03 }, {0x65 ,0x31 }, + {0x66 ,0x03 }, {0x67 ,0x63 }, {0x68 ,0x03 }, {0x69 ,0x9d }, + {0x6a ,0x03 }, {0x6b ,0xd2 }, {0x6c ,0x04 }, {0x6d ,0x05 }, + {0x6e ,0x04 }, {0x6f ,0x38 }, {0x70 ,0x04 }, {0x71 ,0x51 }, + {0x72 ,0x04 }, {0x73 ,0x70 }, {0x74 ,0x04 }, {0x75 ,0x85 }, + {0x76 ,0x04 }, {0x77 ,0xa1 }, {0x78 ,0x04 }, {0x79 ,0xc0 }, + {0x7a ,0x04 }, {0x7b ,0xd8 }, {0x7c ,0x04 }, {0x7d ,0xf2 }, + {0x7e ,0x05 }, {0x7f ,0x10 }, {0x80 ,0x05 }, {0x81 ,0x21 }, + {0x82 ,0x05 }, {0x83 ,0x2e }, {0x84 ,0x05 }, {0x85 ,0x3a }, + {0x86 ,0x05 }, {0x87 ,0x3e }, {0x88 ,0x00 }, {0x89 ,0x00 }, + {0x8a ,0x01 }, {0x8b ,0x86 }, {0x8c ,0x01 }, {0x8d ,0x8f }, + {0x8e ,0x01 }, {0x8f ,0xb3 }, {0x90 ,0x01 }, {0x91 ,0xd7 }, + {0x92 ,0x01 }, {0x93 ,0xfb }, {0x94 ,0x02 }, {0x95 ,0x18 }, + {0x96 ,0x02 }, {0x97 ,0x4f }, {0x98 ,0x02 }, {0x99 ,0x7e }, + {0x9a ,0x02 }, {0x9b ,0xa6 }, {0x9c ,0x02 }, {0x9d ,0xcf }, + {0x9e ,0x03 }, {0x9f ,0x14 }, {0xa4 ,0x03 }, {0xa5 ,0x52 }, + {0xa6 ,0x03 }, {0xa7 ,0x93 }, {0xac ,0x03 }, {0xad ,0xcf }, + {0xae ,0x04 }, {0xaf ,0x08 }, {0xb0 ,0x04 }, {0xb1 ,0x42 }, + {0xb2 ,0x04 }, {0xb3 ,0x7f }, {0xb4 ,0x04 }, {0xb5 ,0xb4 }, + {0xb6 ,0x04 }, {0xb7 ,0xcc }, {0xb8 ,0x04 }, {0xb9 ,0xf2 }, + {0xba ,0x05 }, {0xbb ,0x0c }, {0xbc ,0x05 }, {0xbd ,0x26 }, + {0xbe ,0x05 }, {0xbf ,0x4b }, {0xc0 ,0x05 }, {0xc1 ,0x64 }, + {0xc2 ,0x05 }, {0xc3 ,0x83 }, {0xc4 ,0x05 }, {0xc5 ,0xa1 }, + {0xc6 ,0x05 }, {0xc7 ,0xba }, {0xc8 ,0x05 }, {0xc9 ,0xc4 }, + {0xca ,0x05 }, {0xcb ,0xd5 }, {0xcc ,0x05 }, {0xcd ,0xd5 }, + {0xce ,0x00 }, {0xcf ,0xce }, {0xd0 ,0x00 }, {0xd1 ,0xdb }, + {0xd2 ,0x01 }, {0xd3 ,0x32 }, {0xd4 ,0x01 }, {0xd5 ,0x3b }, + {0xd6 ,0x01 }, {0xd7 ,0x74 }, {0xd8 ,0x01 }, {0xd9 ,0x7d }, + {0xfe ,0x60 }, {0x00 ,0xcc }, {0x01 ,0x0f }, {0x02 ,0xff }, + {0x03 ,0x01 }, {0x04 ,0x00 }, {0x05 ,0x02 }, {0x06 ,0x00 }, + {0x07 ,0x00 }, {0x09 ,0xc4 }, {0x0a ,0x00 }, {0x0b ,0x04 }, + {0x0c ,0x01 }, {0x0d ,0x00 }, {0x0e ,0x04 }, {0x0f ,0x00 }, + {0x10 ,0x71 }, {0x12 ,0xc4 }, {0x13 ,0x00 }, {0x14 ,0x04 }, + {0x15 ,0x01 }, {0x16 ,0x00 }, {0x17 ,0x06 }, {0x18 ,0x00 }, + {0x19 ,0x71 }, {0x1b ,0xc4 }, {0x1c ,0x00 }, {0x1d ,0x02 }, + {0x1e ,0x00 }, {0x1f ,0x00 }, {0x20 ,0x08 }, {0x21 ,0x66 }, + {0x22 ,0xb4 }, {0x24 ,0xc4 }, {0x25 ,0x00 }, {0x26 ,0x02 }, + {0x27 ,0x00 }, {0x28 ,0x00 }, {0x29 ,0x07 }, {0x2a ,0x66 }, + {0x2b ,0xb4 }, {0x2f ,0xc4 }, {0x30 ,0x00 }, {0x31 ,0x04 }, + {0x32 ,0x01 }, {0x33 ,0x00 }, {0x34 ,0x03 }, {0x35 ,0x00 }, + {0x36 ,0x71 }, {0x38 ,0xc4 }, {0x39 ,0x00 }, {0x3a ,0x04 }, + {0x3b ,0x01 }, {0x3d ,0x00 }, {0x3f ,0x05 }, {0x40 ,0x00 }, + {0x41 ,0x71 }, {0x83 ,0xce }, {0x84 ,0x02 }, {0x85 ,0x20 }, + {0x86 ,0xdc }, {0x87 ,0x00 }, {0x88 ,0x04 }, {0x89 ,0x00 }, + {0x8a ,0xbb }, {0x8b ,0x80 }, {0xc7 ,0x0e }, {0xc8 ,0x05 }, + {0xc9 ,0x1f }, {0xca ,0x06 }, {0xcb ,0x00 }, {0xcc ,0x03 }, + {0xcd ,0x04 }, {0xce ,0x1f }, {0xcf ,0x1f }, {0xd0 ,0x1f }, + {0xd1 ,0x1f }, {0xd2 ,0x1f }, {0xd3 ,0x1f }, {0xd4 ,0x1f }, + {0xd5 ,0x1f }, {0xd6 ,0x1f }, {0xd7 ,0x17 }, {0xd8 ,0x1f }, + {0xd9 ,0x16 }, {0xda ,0x1f }, {0xdb ,0x0e }, {0xdc ,0x01 }, + {0xdd ,0x1f }, {0xde ,0x02 }, {0xdf ,0x00 }, {0xe0 ,0x03 }, + {0xe1 ,0x04 }, {0xe2 ,0x1f }, {0xe3 ,0x1f }, {0xe4 ,0x1f }, + {0xe5 ,0x1f }, {0xe6 ,0x1f }, {0xe7 ,0x1f }, {0xe8 ,0x1f }, + {0xe9 ,0x1f }, {0xea ,0x1f }, {0xeb ,0x17 }, {0xec ,0x1f }, + {0xed ,0x16 }, {0xee ,0x1f }, {0xef ,0x03 }, {0xfe ,0x70 }, + {0x5a ,0x0b }, {0x5b ,0x0b }, {0x5c ,0x55 }, {0x5d ,0x24 }, + {0xfe ,0x90 }, {0x12 ,0x24 }, {0x13 ,0x49 }, {0x14 ,0x92 }, + {0x15 ,0x86 }, {0x16 ,0x61 }, {0x17 ,0x18 }, {0x18 ,0x24 }, + {0x19 ,0x49 }, {0x1a ,0x92 }, {0x1b ,0x86 }, {0x1c ,0x61 }, + {0x1d ,0x18 }, {0x1e ,0x24 }, {0x1f ,0x49 }, {0x20 ,0x92 }, + {0x21 ,0x86 }, {0x22 ,0x61 }, {0x23 ,0x18 }, {0xfe ,0x40 }, + {0x0e ,0x10 }, {0xfe ,0xa0 }, {0x04 ,0x80 }, {0x16 ,0x00 }, + {0x26 ,0x10 }, {0x2f ,0x37 }, {0xfe ,0xd0 }, {0x06 ,0x0f }, + {0x4b ,0x00 }, {0x56 ,0x4a }, {0xfe ,0x00 }, {0xc2 ,0x09 }, + {0x35 ,0x00 }, {0xfe ,0x70 }, {0x7d ,0x61 }, {0x7f ,0x00 }, + {0x7e ,0x4e }, {0x52 ,0x2c }, {0x49 ,0x00 }, {0x4a ,0x00 }, + {0x4b ,0x00 }, {0x4c ,0x00 }, {0x4d ,0xe8 }, {0x4e ,0x25 }, + {0x4f ,0x6e }, {0x50 ,0xae }, {0x51 ,0x2f }, {0xad ,0xf4 }, + {0xae ,0x8f }, {0xaf ,0x00 }, {0xb0 ,0x54 }, {0xb1 ,0x3a }, + {0xb2 ,0x00 }, {0xb3 ,0x00 }, {0xb4 ,0x00 }, {0xb5 ,0x00 }, + {0xb6 ,0x18 }, {0xb7 ,0x30 }, {0xb8 ,0x4a }, {0xb9 ,0x98 }, + {0xba ,0x30 }, {0xbb ,0x60 }, {0xbc ,0x50 }, {0xbd ,0x00 }, + {0xbe ,0x00 }, {0xbf ,0x39 }, {0xfe ,0x00 }, {0x51 ,0x66 }, +}; +static inline struct visionox_rm69299 *panel_to_ctx (struct drm_panel *panel) { return container_of(panel, struct visionox_rm69299, panel);@@ -135,6 +246,19 @@ static const struct drm_display_mode visionox_rm69299_1080x2248_60hz = { .flags = 0, }; +static const struct drm_display_mode visionox_rm69299_1080x2160_60hz = { + .clock =158695 , + .hdisplay =1080 , + .hsync_start =1080 +26 , + .hsync_end =1080 +26 +2 , + .htotal =1080 +26 +2 +36 , + .vdisplay =2160 , + .vsync_start =2160 +8 , + .vsync_end =2160 +8 +4 , + .vtotal =2160 +8 +4 +4 , + .flags =0 , +}; +static int visionox_rm69299_get_modes (struct drm_panel *panel,struct drm_connector *connector) {@@ -225,9 +349,17 @@ const struct visionox_rm69299_panel_desc visionox_rm69299_1080p_display_desc = { .init_seq_len = ARRAY_SIZE(visionox_rm69299_1080x2248_60hz_init_seq), }; +const struct visionox_rm69299_panel_desc visionox_rm69299_shift_desc = { + .mode = &visionox_rm69299_1080x2160_60hz, + .init_seq = (const u8 *)visionox_rm69299_1080x2160_60hz_init_seq, + .init_seq_len =ARRAY_SIZE (visionox_rm69299_1080x2160_60hz_init_seq), +}; +static const struct of_device_id visionox_rm69299_of_match[] = { { .compatible ="visionox,rm69299-1080p-display" , .data = &visionox_rm69299_1080p_display_desc }, + { .compatible ="visionox,rm69299-shift" , + .data = &visionox_rm69299_shift_desc }, {/* sentinel */ } };MODULE_DEVICE_TABLE (of, visionox_rm69299_of_match);