Skip to content

Commit a368b40

Browse files
miquelraynalsuperna9999
authored andcommitted
drm/panel: sitronix-st7789v: Clarify a definition
The Sitronix datasheet explains BIT(1) of the RGBCTRL register as the DOTCLK/PCLK edge used to sample the data lines: “0” The data is input on the positive edge of DOTCLK “1” The data is input on the negative edge of DOTCLK IOW, this bit implies a falling edge and not a high state. Correct the definition to ease the comparison with the datasheet. Signed-off-by: Miquel Raynal <[email protected]> Acked-by: Maxime Ripard <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Tested-by: Sebastian Reichel <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 6b00e72 commit a368b40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/panel/panel-sitronix-st7789v.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#define ST7789V_RGBCTRL_RCM(n) (((n) & 3) << 5)
2828
#define ST7789V_RGBCTRL_VSYNC_HIGH BIT(3)
2929
#define ST7789V_RGBCTRL_HSYNC_HIGH BIT(2)
30-
#define ST7789V_RGBCTRL_PCLK_HIGH BIT(1)
30+
#define ST7789V_RGBCTRL_PCLK_FALLING BIT(1)
3131
#define ST7789V_RGBCTRL_DE_LOW BIT(0)
3232
#define ST7789V_RGBCTRL_VBP(n) ((n) & 0x7f)
3333
#define ST7789V_RGBCTRL_HBP(n) ((n) & 0x1f)
@@ -259,7 +259,7 @@ static int st7789v_prepare(struct drm_panel *panel)
259259
if (ctx->info->mode->flags & DRM_MODE_FLAG_PHSYNC)
260260
polarity |= ST7789V_RGBCTRL_HSYNC_HIGH;
261261
if (ctx->info->bus_flags & DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE)
262-
polarity |= ST7789V_RGBCTRL_PCLK_HIGH;
262+
polarity |= ST7789V_RGBCTRL_PCLK_FALLING;
263263
if (ctx->info->bus_flags & DRM_BUS_FLAG_DE_LOW)
264264
polarity |= ST7789V_RGBCTRL_DE_LOW;
265265

0 commit comments

Comments
 (0)