[PATCH v15 2/2] arm:dts:ls1021a: Add a TFT LCD panel dts node
Add a TFT LCD panel. the TFT LCD panel is WQVGA "480x272", and the bpp is 24. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- Changed in V15: Rename compatible string. arch/arm/boot/dts/ls1021a-twr.dts | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a-twr.dts b/arch/arm/boot/dts/ls1021a-twr.dts index a2c591e..99c6aad 100644 --- a/arch/arm/boot/dts/ls1021a-twr.dts +++ b/arch/arm/boot/dts/ls1021a-twr.dts @@ -56,6 +56,17 @@ enet0_sgmii_phy = &sgmii_phy2; enet1_sgmii_phy = &sgmii_phy0; }; + + panel: panel { + compatible = "nec,nl4827hc19-05b"; + }; + +}; + +&dcu { + fsl,panel = <&panel>; + status = "okay"; + }; &dspi1 { -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v15 1/2] arm:dts:ls1021a: Add DCU dts node
Add DCU node, DCU is a display controller of Freescale named 2D-ACE. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- arch/arm/boot/dts/ls1021a.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi index c70bb27..6d6e3e2 100644 --- a/arch/arm/boot/dts/ls1021a.dtsi +++ b/arch/arm/boot/dts/ls1021a.dtsi @@ -383,6 +383,16 @@ <&platform_clk 1>; }; + dcu: dcu@2ce { + compatible = "fsl,ls1021a-dcu"; + reg = <0x0 0x2ce 0x0 0x1>; + interrupts = ; + clocks = <&platform_clk 0>; + clock-names = "dcu"; + big-endian; + status = "disabled"; + }; + mdio0: mdio@2d24000 { compatible = "gianfar"; device_type = "mdio"; -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] arm:dts:ls1021a: Add SiI902x dts node
The SiI902x is a HDMI transmitter. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- arch/arm/boot/dts/ls1021a-twr.dts | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a-twr.dts b/arch/arm/boot/dts/ls1021a-twr.dts index a2c591e..c3140f0 100644 --- a/arch/arm/boot/dts/ls1021a-twr.dts +++ b/arch/arm/boot/dts/ls1021a-twr.dts @@ -79,6 +79,12 @@ &i2c1 { status = "okay"; + + hdmi: sii9022a@39 { + compatible = "sii902x"; + reg = <0x39>; + interrupts = ; + }; }; &ifc { -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] drm/layerscape: Add HDMI support for DCU DRM driver
Some Freescale SoCs, there has an DVI/HDMI controller and a PHY, attached to one of their display controller unit's LCDC interfaces. This patch adds a driver for SiI902x. The SiI902x is a HDMI transmitter It supports resolutions from standard definition 480i/p and 576i/p all the way to high-definition 720p, 1080i, and 1080p, the highest resolution supported by HDTVs today. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- .../devicetree/bindings/video/SiI902x.txt | 17 + drivers/gpu/drm/fsl-dcu/Makefile | 1 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_hdmi.c | 639 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 10 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_output.h | 10 + 5 files changed, 677 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/SiI902x.txt create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_hdmi.c diff --git a/Documentation/devicetree/bindings/video/SiI902x.txt b/Documentation/devicetree/bindings/video/SiI902x.txt new file mode 100644 index 000..d304499 --- /dev/null +++ b/Documentation/devicetree/bindings/video/SiI902x.txt @@ -0,0 +1,17 @@ +Device-Tree bindings for the SiI902x hdmi transmitter. + +Required properties: +- compatible: Should be "sii902x". +- reg: The I2C address of the device. +- interrupts: Interrupt number to the cpu. + +Example: + +&i2c1 { + status = "okay"; + hdmi: sii9022a@39 { + compatible = "sii902x"; + reg = <0x39>; + interrupts = ; + }; +}; diff --git a/drivers/gpu/drm/fsl-dcu/Makefile b/drivers/gpu/drm/fsl-dcu/Makefile index 6ea1523..98cacc2 100644 --- a/drivers/gpu/drm/fsl-dcu/Makefile +++ b/drivers/gpu/drm/fsl-dcu/Makefile @@ -1,6 +1,7 @@ fsl-dcu-drm-y := fsl_dcu_drm_drv.o \ fsl_dcu_drm_kms.o \ fsl_dcu_drm_rgb.o \ +fsl_dcu_drm_hdmi.o \ fsl_dcu_drm_plane.o \ fsl_dcu_drm_crtc.o \ fsl_dcu_drm_fbdev.o diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_hdmi.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_hdmi.c new file mode 100644 index 000..b91c8ca --- /dev/null +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_hdmi.c @@ -0,0 +1,639 @@ +/* + * Copyright 2015 Freescale Semiconductor, Inc. + * + * Freescale DCU drm device driver + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "fsl_dcu_drm_drv.h" +#include "fsl_dcu_drm_output.h" + +#define SII902X_INPUT_BUS_FMT 0x08 +#define SII902X_TPI_AVI_INPUT_FMT 0x09 +#define SII902X_TPI_AVI_OUTPUT_FMT 0x0A +#define SII902X_SYS_CONTROL0x1A +#define SII902X_SYS_CTR_DDC_REQBIT(2) +#define SII902X_SYS_CTR_DDC_BUS_AVAI (BIT(2) | BIT(1)) +#define SII902X_TPI_FAMILY_DEV_ID 0x1B +#define SII902X_TPI_DEV_REV_ID 0x1C +#define SII902X_TPI_REV_LEVEL_ID 0x1D +#define SII902X_POWER_STATE0x1E +#define SII902X_TPI_AUDIO_CFG0 0x24 +#define SII902X_TPI_AUDIO_CFG1 0x25 +#define SII902X_TPI_AUDIO_CFG2 0x26 +#define SII902X_TPI_AUDIO_CFG3 0x27 +#define SII902X_TPI_HDCP_REV 0x30 +#define SII902X_TPI_INT_ENABLE 0x3C +#define SII902X_TPI_INT_STATUS 0x3D +#define SII902X_TPI_INT_PLUG_INBIT(2) +#define SII902X_GENERAL_PURPOSE_IO00xBC +#define SII902X_GENERAL_PURPOSE_IO10xBD +#define SII902X_GENERAL_PURPOSE_IO20xBE +#define SII902X_TRANS_MODE_DIFF0xC7 + +bool g_enable_hdmi; + +struct sii902x_data { + struct i2c_client *client; + struct delayed_work det_work; + struct fb_info *fbi; + struct fsl_dcu_drm_hdmicon *hdmicon; +} *sii902x; + +static struct i2c_client *sii902x_to_i2c(struct sii902x_data *sii902x) +{ + return sii902x->client; +} + +static s32 sii902x_write(const struct i2c_client *client, +u8 command, u8 value) +{ + return i2c_smbus_write_byte_data(client, command, value); +} + +static s32 sii902x_read(const struct i2c_client *client, u8 command) +{ + int val; + + val = i2c_smbus_read_word_data(client, command); + + return val & 0xff; +} + +static void sii902x_power_up_tx(struct sii902x_data *sii902x) +{ + struct i2c_client *client = sii902x_to_i2c(sii902x); + int val; + + val = sii902x_read(client, SII902X_POWER_STATE); + val &= ~0x3; + sii902x_write(client, SII902X_POWER_STATE, val); +} + +static int sii902x_get_edid_preconfig(void) +{ + int old, dat, ret = 0,
Re: [PATCH v14 3/6] drm/panel: simple: Add support for NEC NL4827HC19-05B 480x272 panel
On Thu, Aug 13, 2015 at 8:23 AM, Thierry Reding wrote: > On Wed, Jul 29, 2015 at 04:30:02PM +0800, Jianwei Wang wrote: >> This adds support for the NEC NL4827HC19-05B 480x272 panel to the DRM >> simple panel driver. >> >> Signed-off-by: Alison Wang >> Signed-off-by: Xiubo Li >> Signed-off-by: Jianwei Wang >> Acked-by: Daniel Vetter >> --- >> .../bindings/panel/nec,nl4827hc19_05b.txt | 7 ++ >> drivers/gpu/drm/panel/panel-simple.c | 26 >> ++ >> 2 files changed, 33 insertions(+) >> create mode 100644 >> Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt >> >> diff --git a/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt >> b/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt >> new file mode 100644 >> index 000..20e9473 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt >> @@ -0,0 +1,7 @@ >> +NEC LCD Technologies,Ltd. WQVGA TFT LCD panel >> + >> +Required properties: >> +- compatible: should be "nec,nl4827hc19_05b" > > Underscores are deprecated in compatible strings, so I've applied this > with "nec,nl4827hc19-05b". > > Thierry Okay, thanks. Jianwei -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v14 0/6] drm/layerscape: Add Freescale DCU DRM driver
Changed in v14 -Remove drm_modeset_lock_all before drm_mode_config_reset Changed in v13 -set regmap_config.cache_type to REGCACHE_RBTREE -add call drm_modeset_lock_all before drm_mode_config_reset -adjust patch order for creating pull request Changed in v12 -Add one patch for MAINTAINER entry for drm/layerscape Adviced by Daniel Vetter -Add #include Changed in V11 -set regmap_config.cache_type to REGCACHE_FLAT Advanced by Alexander Stein Changed in V10 -adjust commit log, remove meaningless statement -cleanup code for it's format and style. -remove platform related code out, including of tcon(vf610) and scfg(ls1021a) -remove useless sentences: encoder->crtc = crtc; and connector->encoder = encoder; and so on -add vendor prefix for panel pandle -make a DCU_CTRLDESCLN(x, y) to avoid high repetition -introduce per-SoC capability structure to avoid check on the OF node's compatible string -Implement some functions: crtc enable and disable, enable and disable VBLANK, plane atomic_disable and atomic_enable -atomic_check and so on -move DCU config sentence to the right place -move get resources functions to ->probe() -move fsl,dcu.txt to video/ folder -add big-endian describe All advaced by Thierry Reding Changed in V9 put node after calling of_drm_find_panel split clk_prepare_enable() to clk_prepare() and clk_enable(), just call clk_prepare once, and check return value check regmap_write/regmap_read return return value remove useless ".owner= THIS_MODULE," All advanced by Mark Yao Changed in V8 - Remove useless code #define DRIVER_NAME "fsl-dcu-drm" MODULE_ALIAS("platform:fsl-dcu-drm"); Adviced by Paul Bolle Changed in V7 - Remove redundant functions and replace deprecated hook Adviced by Daniel Vetter - Replace drm_platform_init with drm_dev_alloc/register Adviced by Daniel Vetter Changed in V6 - Add NEC nl4827hc19_05b panel to panel-simple.c Adviced by Mark Yao - Add DRIVER_ATOMIC for driver_features Adviced by Mark Yao - check fsl_dev if it's NULL at PM suspend/resume Adviced by Mark Yao Changed in V5 - Update commit message - Add layer registers initialization - Remove unused functions - Rename driver folder Adviced by Stefan Agner - Move pixel clock control functions to fsl_dcu_drm_drv.c - remove redundant enable the clock implicitly using regmap - Add maintainer message Changed in V4: -This version doesn't have functionality changed Just a minor adjustment. Changed in V3: - Test driver on Vybrid board and add compatible string - Remove unused functions - set default crtc for encoder - replace legacy functions with atomic help functions Adviced by Daniel Vetter - Set the unique name of the DRM device - Implement irq handle function for vblank interrupt Changed in v2: - Add atomic support Adviced by Daniel Vetter - Modify bindings file - Rename node for compatibility - Move platform related code out for compatibility Adviced by Stefan Agner This patch add support for Two Dimensional Animation and Compositing Engine (2D-ACE) on the Freescale SoCs. 2D-ACE is a Freescale display controller. 2D-ACE describes the functionality of the module extremely well its name is a value that cannot be used as a token in programming languages. Instead the valid token "DCU" is used to tag the register names and function names. The Display Controller Unit (DCU) module is a system master that fetches graphics stored in internal or external memory and displays them on a TFT LCD panel. A wide range of panel sizes is supported and the timing of the interface signals is highly configurable. Graphics are read directly from memory and then blended in real-time, which allows for dynamic content creation with minimal CPU intervention. The features: (1) Full RGB888 output to TFT LCD panel. (2) Blending of each pixel using up to 4 source layers dependent on size of panel. (3) Each graphic layer can be placed with one pixel resolution in either axis. (4) Each graphic layer support RGB565 and RGB888 direct colors without alpha channel and BGRA BGRA ARGB1555 direct colors with an alpha channel and YUV422 format. (5) Each graphic layer support alpha blending with 8-bit resolution. This is a simplified version, only one primary plane, one framebuffer, one crtc, one connector and one encoder for TFT LCD panel. --- .../devicetree/bindings/video/fsl,dcu.txt | 22 ++ drivers/gpu/drm/Kconfig| 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/fsl-dcu/Kconfig| 18 + drivers/gpu/drm/fsl-dcu/Makefile | 7 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 208 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h | 19 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 404 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h | 197 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c| 23 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c
[PATCH v14 1/6] drm/layerscape: Add Freescale DCU DRM driver
This patch add support for Two Dimensional Animation and Compositing Engine (2D-ACE) on the Freescale SoCs. 2D-ACE is a Freescale display controller. 2D-ACE describes the functionality of the module extremely well its name is a value that cannot be used as a token in programming languages. Instead the valid token "DCU" is used to tag the register names and function names. The Display Controller Unit (DCU) module is a system master that fetches graphics stored in internal or external memory and displays them on a TFT LCD panel. A wide range of panel sizes is supported and the timing of the interface signals is highly configurable. Graphics are read directly from memory and then blended in real-time, which allows for dynamic content creation with minimal CPU intervention. The features: (1) Full RGB888 output to TFT LCD panel. (2) Blending of each pixel using up to 4 source layers dependent on size of panel. (3) Each graphic layer can be placed with one pixel resolution in either axis. (4) Each graphic layer support RGB565 and RGB888 direct colors without alpha channel and BGRA BGRA ARGB1555 direct colors with an alpha channel and YUV422 format. (5) Each graphic layer support alpha blending with 8-bit resolution. This is a simplified version, only one primary plane, one framebuffer, one crtc, one connector and one encoder for TFT LCD panel. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang Acked-by: Daniel Vetter --- .../devicetree/bindings/video/fsl,dcu.txt | 22 ++ drivers/gpu/drm/Kconfig| 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/fsl-dcu/Kconfig| 18 + drivers/gpu/drm/fsl-dcu/Makefile | 7 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 208 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h | 19 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 404 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h | 197 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c| 23 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 43 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_output.h | 33 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c| 261 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h| 17 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 182 ++ 15 files changed, 1437 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/fsl,dcu.txt create mode 100644 drivers/gpu/drm/fsl-dcu/Kconfig create mode 100644 drivers/gpu/drm/fsl-dcu/Makefile create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_output.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c diff --git a/Documentation/devicetree/bindings/video/fsl,dcu.txt b/Documentation/devicetree/bindings/video/fsl,dcu.txt new file mode 100644 index 000..ebf1be9 --- /dev/null +++ b/Documentation/devicetree/bindings/video/fsl,dcu.txt @@ -0,0 +1,22 @@ +Device Tree bindings for Freescale DCU DRM Driver + +Required properties: +- compatible: Should be one of + * "fsl,ls1021a-dcu". + * "fsl,vf610-dcu". + +- reg: Address and length of the register set for dcu. +- clocks: From common clock binding: handle to dcu clock. +- clock-names: From common clock binding: Shall be "dcu". +- big-endian Boolean property, LS1021A DCU registers are big-endian. +- fsl,panel: The phandle to panel node. + +Examples: +dcu: dcu@2ce { + compatible = "fsl,ls1021a-dcu"; + reg = <0x0 0x2ce 0x0 0x1>; + clocks = <&platform_clk 0>; + clock-names = "dcu"; + big-endian; + fsl,panel = <&panel>; +}; diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index c46ca31..9cfd14e 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -231,6 +231,8 @@ source "drivers/gpu/drm/virtio/Kconfig" source "drivers/gpu/drm/msm/Kconfig" +source "drivers/gpu/drm/fsl-dcu/Kconfig" + source "drivers/gpu/drm/tegra/Kconfig" source "drivers/gpu/drm/panel/Kconfig" diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index 5713d05..11cb81e 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -70,3 +70,4 @@
[PATCH v14 3/6] drm/panel: simple: Add support for NEC NL4827HC19-05B 480x272 panel
This adds support for the NEC NL4827HC19-05B 480x272 panel to the DRM simple panel driver. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang Acked-by: Daniel Vetter --- .../bindings/panel/nec,nl4827hc19_05b.txt | 7 ++ drivers/gpu/drm/panel/panel-simple.c | 26 ++ 2 files changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt diff --git a/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt b/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt new file mode 100644 index 000..20e9473 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt @@ -0,0 +1,7 @@ +NEC LCD Technologies,Ltd. WQVGA TFT LCD panel + +Required properties: +- compatible: should be "nec,nl4827hc19_05b" + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index f94201b..db61dd1 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -943,6 +943,29 @@ static const struct panel_desc lg_lp129qe = { }, }; +static const struct drm_display_mode nec_nl4827hc19_05b_mode = { + .clock = 10870, + .hdisplay = 480, + .hsync_start = 480 + 2, + .hsync_end = 480 + 2 + 41, + .htotal = 480 + 2 + 41 + 2, + .vdisplay = 272, + .vsync_start = 272 + 2, + .vsync_end = 272 + 2 + 4, + .vtotal = 272 + 2 + 4 + 2, + .vrefresh = 74, +}; + +static const struct panel_desc nec_nl4827hc19_05b = { + .modes = &nec_nl4827hc19_05b_mode, + .num_modes = 1, + .size = { + .width = 95, + .height = 54, + }, + .bus_format = MEDIA_BUS_FMT_RGB888_1X24 +}; + static const struct drm_display_mode ortustech_com43h4m85ulc_mode = { .clock = 25000, .hdisplay = 480, @@ -1113,6 +1136,9 @@ static const struct of_device_id platform_of_match[] = { .compatible = "lg,lp129qe", .data = &lg_lp129qe, }, { + .compatible = "nec,nl4827hc19_05b", + .data = &nec_nl4827hc19_05b, + }, { .compatible = "ortustech,com43h4m85ulc", .data = &ortustech_com43h4m85ulc, }, { -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v14 4/6] MAINTAINERS: add Freescale DCU DRM driver maintainer
Add Alison and myself as maintainers of the Freescale DCU DRM driver. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 9c9dd5f..66746e4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3555,6 +3555,15 @@ F: drivers/gpu/drm/exynos/ F: include/drm/exynos* F: include/uapi/drm/exynos* +DRM DRIVERS FOR FREESCALE DCU +M: Jianwei Wang +M: Alison Wang +L: dri-de...@lists.freedesktop.org +S: Supported +F: drivers/gpu/drm/fsl-dcu/ +F: Documentation/devicetree/bindings/video/fsl,dcu.txt +F: Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt + DRM DRIVERS FOR FREESCALE IMX M: Philipp Zabel L: dri-de...@lists.freedesktop.org -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v14 2/6] devicetree: Add NEC to the vendor-prefix list
NEC represent NEC LCD Technologies, Ltd. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index d444757..42ca6bc 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@ -140,6 +140,7 @@ mundoreader Mundo Reader S.L. murata Murata Manufacturing Co., Ltd. mxicy Macronix International Co., Ltd. national National Semiconductor +necNEC LCD Technologies, Ltd. neonodeNeonode Inc. netgearNETGEAR netlogic Broadcom Corporation (formerly NetLogic Microsystems) -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v14 5/6] arm:dts:ls1021a: Add DCU dts node
Add DCU node, DCU is a display controller of Freescale named 2D-ACE. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- arch/arm/boot/dts/ls1021a.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi index c70bb27..6d6e3e2 100644 --- a/arch/arm/boot/dts/ls1021a.dtsi +++ b/arch/arm/boot/dts/ls1021a.dtsi @@ -383,6 +383,16 @@ <&platform_clk 1>; }; + dcu: dcu@2ce { + compatible = "fsl,ls1021a-dcu"; + reg = <0x0 0x2ce 0x0 0x1>; + interrupts = ; + clocks = <&platform_clk 0>; + clock-names = "dcu"; + big-endian; + status = "disabled"; + }; + mdio0: mdio@2d24000 { compatible = "gianfar"; device_type = "mdio"; -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v14 6/6] arm:dts:ls1021a: Add a TFT LCD panel dts node
Add a TFT LCD panel. the TFT LCD panel is WQVGA "480x272", and the bpp is 24. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- arch/arm/boot/dts/ls1021a-twr.dts | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a-twr.dts b/arch/arm/boot/dts/ls1021a-twr.dts index a2c591e..2443329 100644 --- a/arch/arm/boot/dts/ls1021a-twr.dts +++ b/arch/arm/boot/dts/ls1021a-twr.dts @@ -56,6 +56,17 @@ enet0_sgmii_phy = &sgmii_phy2; enet1_sgmii_phy = &sgmii_phy0; }; + + panel: panel { + compatible = "nec,nl4827hc19_05b"; + }; + +}; + +&dcu { + fsl,panel = <&panel>; + status = "okay"; + }; &dspi1 { -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v13 0/6] drm/layerscape: Add Freescale DCU DRM driver
On Wed, Jul 29, 2015 at 3:21 PM, Daniel Vetter wrote: > On Wed, Jul 29, 2015 at 02:54:46PM +0800, Jianwei Wang wrote: >> Changed in v13 >> -set regmap_config.cache_type to REGCACHE_RBTREE >> -add call drm_modeset_lock_all before drm_mode_config_reset > > This was a bug in one of my recently merged patches, please don't call > drm_modeset_lock_all before config_reset. Instead please test "drm: Fixup > locking WARNINGs in drm_mode_config_reset" which should address this > problem too. > I have test that patch, It's okay. I'll remove drm_modeset_lock_all. Thanks Jianwei > Thanks, Daniel > >> -adjust patch order for creating pull request >> >> Changed in v12 >> >> -Add one patch for MAINTAINER entry for drm/layerscape >> Adviced by Daniel Vetter >> -Add #include >> >> Changed in V11 >> -set regmap_config.cache_type to REGCACHE_FLAT >> Advanced by Alexander Stein >> >> Changed in V10 >> -adjust commit log, remove meaningless statement >> -cleanup code for it's format and style. >> -remove platform related code out, including of tcon(vf610) and scfg(ls1021a) >> -remove useless sentences: encoder->crtc = crtc; and connector->encoder = >> encoder; and so on >> -add vendor prefix for panel pandle >> -make a DCU_CTRLDESCLN(x, y) to avoid high repetition >> -introduce per-SoC capability structure to avoid check on the OF node's >> compatible string >> -Implement some functions: crtc enable and disable, enable and disable >> VBLANK, plane atomic_disable and atomic_enable -atomic_check and so on >> -move DCU config sentence to the right place >> -move get resources functions to ->probe() >> -move fsl,dcu.txt to video/ folder >> -add big-endian describe >> All advaced by Thierry Reding >> >> Changed in V9 >> >> put node after calling of_drm_find_panel >> split clk_prepare_enable() to clk_prepare() and clk_enable(), just call >> clk_prepare once, and check return value >> check regmap_write/regmap_read return return value >> remove useless ".owner= THIS_MODULE," >> All advanced by Mark Yao >> >> Changed in V8 >> >> - Remove useless code >> #define DRIVER_NAME "fsl-dcu-drm" >> MODULE_ALIAS("platform:fsl-dcu-drm"); >> Adviced by Paul Bolle >> >> Changed in V7 >> >> - Remove redundant functions and replace deprecated hook >> Adviced by Daniel Vetter >> - Replace drm_platform_init with drm_dev_alloc/register >> Adviced by Daniel Vetter >> >> Changed in V6 >> >> - Add NEC nl4827hc19_05b panel to panel-simple.c >> Adviced by Mark Yao >> - Add DRIVER_ATOMIC for driver_features >> Adviced by Mark Yao >> - check fsl_dev if it's NULL at PM suspend/resume >> Adviced by Mark Yao >> >> Changed in V5 >> >> - Update commit message >> - Add layer registers initialization >> - Remove unused functions >> - Rename driver folder >> Adviced by Stefan Agner >> - Move pixel clock control functions to fsl_dcu_drm_drv.c >> - remove redundant enable the clock implicitly using regmap >> - Add maintainer message >> >> Changed in V4: >> >> -This version doesn't have functionality changed >> Just a minor adjustment. >> >> Changed in V3: >> >> - Test driver on Vybrid board and add compatible string >> - Remove unused functions >> - set default crtc for encoder >> - replace legacy functions with atomic help functions >> Adviced by Daniel Vetter >> - Set the unique name of the DRM device >> - Implement irq handle function for vblank interrupt >> >> Changed in v2: >> - Add atomic support >> Adviced by Daniel Vetter >> - Modify bindings file >> - Rename node for compatibility >> - Move platform related code out for compatibility >> Adviced by Stefan Agner >> >> This patch add support for Two Dimensional Animation and Compositing >> Engine (2D-ACE) on the Freescale SoCs. >> >> 2D-ACE is a Freescale display controller. 2D-ACE describes >> the functionality of the module extremely well its name is a value >> that cannot be used as a token in programming languages. >> Instead the valid token "DCU" is used to tag the register names and >> function names. >> >> The Display Controller Unit (DCU) module is a system master that >> fetches graphics stored in internal or external memory and displays >> them on a TFT LCD panel. A wide range of panel sizes is supported >>
[PATCH v13 3/6] drm/panel: simple: Add support for NEC NL4827HC19-05B 480x272 panel
This adds support for the NEC NL4827HC19-05B 480x272 panel to the DRM simple panel driver. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang Acked-by: Daniel Vetter --- .../bindings/panel/nec,nl4827hc19_05b.txt | 7 ++ drivers/gpu/drm/panel/panel-simple.c | 26 ++ 2 files changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt diff --git a/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt b/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt new file mode 100644 index 000..20e9473 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt @@ -0,0 +1,7 @@ +NEC LCD Technologies,Ltd. WQVGA TFT LCD panel + +Required properties: +- compatible: should be "nec,nl4827hc19_05b" + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index f94201b..db61dd1 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -943,6 +943,29 @@ static const struct panel_desc lg_lp129qe = { }, }; +static const struct drm_display_mode nec_nl4827hc19_05b_mode = { + .clock = 10870, + .hdisplay = 480, + .hsync_start = 480 + 2, + .hsync_end = 480 + 2 + 41, + .htotal = 480 + 2 + 41 + 2, + .vdisplay = 272, + .vsync_start = 272 + 2, + .vsync_end = 272 + 2 + 4, + .vtotal = 272 + 2 + 4 + 2, + .vrefresh = 74, +}; + +static const struct panel_desc nec_nl4827hc19_05b = { + .modes = &nec_nl4827hc19_05b_mode, + .num_modes = 1, + .size = { + .width = 95, + .height = 54, + }, + .bus_format = MEDIA_BUS_FMT_RGB888_1X24 +}; + static const struct drm_display_mode ortustech_com43h4m85ulc_mode = { .clock = 25000, .hdisplay = 480, @@ -1113,6 +1136,9 @@ static const struct of_device_id platform_of_match[] = { .compatible = "lg,lp129qe", .data = &lg_lp129qe, }, { + .compatible = "nec,nl4827hc19_05b", + .data = &nec_nl4827hc19_05b, + }, { .compatible = "ortustech,com43h4m85ulc", .data = &ortustech_com43h4m85ulc, }, { -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v13 5/6] arm:dts:ls1021a: Add DCU dts node
Add DCU node, DCU is a display controller of Freescale named 2D-ACE. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- arch/arm/boot/dts/ls1021a.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi index c70bb27..6d6e3e2 100644 --- a/arch/arm/boot/dts/ls1021a.dtsi +++ b/arch/arm/boot/dts/ls1021a.dtsi @@ -383,6 +383,16 @@ <&platform_clk 1>; }; + dcu: dcu@2ce { + compatible = "fsl,ls1021a-dcu"; + reg = <0x0 0x2ce 0x0 0x1>; + interrupts = ; + clocks = <&platform_clk 0>; + clock-names = "dcu"; + big-endian; + status = "disabled"; + }; + mdio0: mdio@2d24000 { compatible = "gianfar"; device_type = "mdio"; -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v13 4/6] MAINTAINERS: add Freescale DCU DRM driver maintainer
Add Alison and myself as maintainers of the Freescale DCU DRM driver. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 9c9dd5f..66746e4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3555,6 +3555,15 @@ F: drivers/gpu/drm/exynos/ F: include/drm/exynos* F: include/uapi/drm/exynos* +DRM DRIVERS FOR FREESCALE DCU +M: Jianwei Wang +M: Alison Wang +L: dri-de...@lists.freedesktop.org +S: Supported +F: drivers/gpu/drm/fsl-dcu/ +F: Documentation/devicetree/bindings/video/fsl,dcu.txt +F: Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt + DRM DRIVERS FOR FREESCALE IMX M: Philipp Zabel L: dri-de...@lists.freedesktop.org -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v13 6/6] arm:dts:ls1021a: Add a TFT LCD panel dts node
Add a TFT LCD panel. the TFT LCD panel is WQVGA "480x272", and the bpp is 24. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- arch/arm/boot/dts/ls1021a-twr.dts | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a-twr.dts b/arch/arm/boot/dts/ls1021a-twr.dts index a2c591e..2443329 100644 --- a/arch/arm/boot/dts/ls1021a-twr.dts +++ b/arch/arm/boot/dts/ls1021a-twr.dts @@ -56,6 +56,17 @@ enet0_sgmii_phy = &sgmii_phy2; enet1_sgmii_phy = &sgmii_phy0; }; + + panel: panel { + compatible = "nec,nl4827hc19_05b"; + }; + +}; + +&dcu { + fsl,panel = <&panel>; + status = "okay"; + }; &dspi1 { -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v13 0/6] drm/layerscape: Add Freescale DCU DRM driver
Changed in v13 -set regmap_config.cache_type to REGCACHE_RBTREE -add call drm_modeset_lock_all before drm_mode_config_reset -adjust patch order for creating pull request Changed in v12 -Add one patch for MAINTAINER entry for drm/layerscape Adviced by Daniel Vetter -Add #include Changed in V11 -set regmap_config.cache_type to REGCACHE_FLAT Advanced by Alexander Stein Changed in V10 -adjust commit log, remove meaningless statement -cleanup code for it's format and style. -remove platform related code out, including of tcon(vf610) and scfg(ls1021a) -remove useless sentences: encoder->crtc = crtc; and connector->encoder = encoder; and so on -add vendor prefix for panel pandle -make a DCU_CTRLDESCLN(x, y) to avoid high repetition -introduce per-SoC capability structure to avoid check on the OF node's compatible string -Implement some functions: crtc enable and disable, enable and disable VBLANK, plane atomic_disable and atomic_enable -atomic_check and so on -move DCU config sentence to the right place -move get resources functions to ->probe() -move fsl,dcu.txt to video/ folder -add big-endian describe All advaced by Thierry Reding Changed in V9 put node after calling of_drm_find_panel split clk_prepare_enable() to clk_prepare() and clk_enable(), just call clk_prepare once, and check return value check regmap_write/regmap_read return return value remove useless ".owner= THIS_MODULE," All advanced by Mark Yao Changed in V8 - Remove useless code #define DRIVER_NAME "fsl-dcu-drm" MODULE_ALIAS("platform:fsl-dcu-drm"); Adviced by Paul Bolle Changed in V7 - Remove redundant functions and replace deprecated hook Adviced by Daniel Vetter - Replace drm_platform_init with drm_dev_alloc/register Adviced by Daniel Vetter Changed in V6 - Add NEC nl4827hc19_05b panel to panel-simple.c Adviced by Mark Yao - Add DRIVER_ATOMIC for driver_features Adviced by Mark Yao - check fsl_dev if it's NULL at PM suspend/resume Adviced by Mark Yao Changed in V5 - Update commit message - Add layer registers initialization - Remove unused functions - Rename driver folder Adviced by Stefan Agner - Move pixel clock control functions to fsl_dcu_drm_drv.c - remove redundant enable the clock implicitly using regmap - Add maintainer message Changed in V4: -This version doesn't have functionality changed Just a minor adjustment. Changed in V3: - Test driver on Vybrid board and add compatible string - Remove unused functions - set default crtc for encoder - replace legacy functions with atomic help functions Adviced by Daniel Vetter - Set the unique name of the DRM device - Implement irq handle function for vblank interrupt Changed in v2: - Add atomic support Adviced by Daniel Vetter - Modify bindings file - Rename node for compatibility - Move platform related code out for compatibility Adviced by Stefan Agner This patch add support for Two Dimensional Animation and Compositing Engine (2D-ACE) on the Freescale SoCs. 2D-ACE is a Freescale display controller. 2D-ACE describes the functionality of the module extremely well its name is a value that cannot be used as a token in programming languages. Instead the valid token "DCU" is used to tag the register names and function names. The Display Controller Unit (DCU) module is a system master that fetches graphics stored in internal or external memory and displays them on a TFT LCD panel. A wide range of panel sizes is supported and the timing of the interface signals is highly configurable. Graphics are read directly from memory and then blended in real-time, which allows for dynamic content creation with minimal CPU intervention. The features: (1) Full RGB888 output to TFT LCD panel. (2) Blending of each pixel using up to 4 source layers dependent on size of panel. (3) Each graphic layer can be placed with one pixel resolution in either axis. (4) Each graphic layer support RGB565 and RGB888 direct colors without alpha channel and BGRA BGRA ARGB1555 direct colors with an alpha channel and YUV422 format. (5) Each graphic layer support alpha blending with 8-bit resolution. .../devicetree/bindings/video/fsl,dcu.txt | 22 ++ drivers/gpu/drm/Kconfig| 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/fsl-dcu/Kconfig| 18 + drivers/gpu/drm/fsl-dcu/Makefile | 7 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 208 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h | 19 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 404 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h | 197 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c| 23 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 45 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_output.h | 33 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c| 261 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h| 17 + drivers/gpu/drm/fsl-dc
[PATCH v13 2/6] devicetree: Add NEC to the vendor-prefix list
NEC represent NEC LCD Technologies, Ltd. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index d444757..42ca6bc 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@ -140,6 +140,7 @@ mundoreader Mundo Reader S.L. murata Murata Manufacturing Co., Ltd. mxicy Macronix International Co., Ltd. national National Semiconductor +necNEC LCD Technologies, Ltd. neonodeNeonode Inc. netgearNETGEAR netlogic Broadcom Corporation (formerly NetLogic Microsystems) -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v13 1/6] drm/layerscape: Add Freescale DCU DRM driver
This patch add support for Two Dimensional Animation and Compositing Engine (2D-ACE) on the Freescale SoCs. 2D-ACE is a Freescale display controller. 2D-ACE describes the functionality of the module extremely well its name is a value that cannot be used as a token in programming languages. Instead the valid token "DCU" is used to tag the register names and function names. The Display Controller Unit (DCU) module is a system master that fetches graphics stored in internal or external memory and displays them on a TFT LCD panel. A wide range of panel sizes is supported and the timing of the interface signals is highly configurable. Graphics are read directly from memory and then blended in real-time, which allows for dynamic content creation with minimal CPU intervention. The features: (1) Full RGB888 output to TFT LCD panel. (2) Blending of each pixel using up to 4 source layers dependent on size of panel. (3) Each graphic layer can be placed with one pixel resolution in either axis. (4) Each graphic layer support RGB565 and RGB888 direct colors without alpha channel and BGRA BGRA ARGB1555 direct colors with an alpha channel and YUV422 format. (5) Each graphic layer support alpha blending with 8-bit resolution. This is a simplified version, only one primary plane, one framebuffer, one crtc, one connector and one encoder for TFT LCD panel. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang Acked-by: Daniel Vetter --- .../devicetree/bindings/video/fsl,dcu.txt | 22 ++ drivers/gpu/drm/Kconfig| 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/fsl-dcu/Kconfig| 18 + drivers/gpu/drm/fsl-dcu/Makefile | 7 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 208 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h | 19 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 404 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h | 197 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c| 23 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 45 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_output.h | 33 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c| 261 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h| 17 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 182 ++ 15 files changed, 1439 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/fsl,dcu.txt create mode 100644 drivers/gpu/drm/fsl-dcu/Kconfig create mode 100644 drivers/gpu/drm/fsl-dcu/Makefile create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_output.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c diff --git a/Documentation/devicetree/bindings/video/fsl,dcu.txt b/Documentation/devicetree/bindings/video/fsl,dcu.txt new file mode 100644 index 000..ebf1be9 --- /dev/null +++ b/Documentation/devicetree/bindings/video/fsl,dcu.txt @@ -0,0 +1,22 @@ +Device Tree bindings for Freescale DCU DRM Driver + +Required properties: +- compatible: Should be one of + * "fsl,ls1021a-dcu". + * "fsl,vf610-dcu". + +- reg: Address and length of the register set for dcu. +- clocks: From common clock binding: handle to dcu clock. +- clock-names: From common clock binding: Shall be "dcu". +- big-endian Boolean property, LS1021A DCU registers are big-endian. +- fsl,panel: The phandle to panel node. + +Examples: +dcu: dcu@2ce { + compatible = "fsl,ls1021a-dcu"; + reg = <0x0 0x2ce 0x0 0x1>; + clocks = <&platform_clk 0>; + clock-names = "dcu"; + big-endian; + fsl,panel = <&panel>; +}; diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index c46ca31..9cfd14e 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -231,6 +231,8 @@ source "drivers/gpu/drm/virtio/Kconfig" source "drivers/gpu/drm/msm/Kconfig" +source "drivers/gpu/drm/fsl-dcu/Kconfig" + source "drivers/gpu/drm/tegra/Kconfig" source "drivers/gpu/drm/panel/Kconfig" diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index 5713d05..11cb81e 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -70,3 +70,4 @@
Re: [PATCH v12 4/6] arm/dts/ls1021a: Add DCU dts node
On Sat, Jul 25, 2015 at 11:27 AM, Shawn Guo wrote: > > On Fri, Jul 24, 2015 at 06:34:12PM +0800, Jianwei Wang wrote: > > Add DCU node, DCU is a display controller of Freescale > > named 2D-ACE. > > > > Signed-off-by: Alison Wang > > Signed-off-by: Xiubo Li > > Signed-off-by: Jianwei Wang > > For dts patches sent to me, please use prefix like "ARM: dts: ls1021a: > ..." in the subject. > > Shawn Okay, thanks. Jianwei > > > --- > > arch/arm/boot/dts/ls1021a.dtsi | 10 ++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi > > index c70bb27..6d6e3e2 100644 > > --- a/arch/arm/boot/dts/ls1021a.dtsi > > +++ b/arch/arm/boot/dts/ls1021a.dtsi > > @@ -383,6 +383,16 @@ > ><&platform_clk 1>; > > }; > > > > + dcu: dcu@2ce { > > + compatible = "fsl,ls1021a-dcu"; > > + reg = <0x0 0x2ce 0x0 0x1>; > > + interrupts = ; > > + clocks = <&platform_clk 0>; > > + clock-names = "dcu"; > > + big-endian; > > + status = "disabled"; > > + }; > > + > > mdio0: mdio@2d24000 { > > compatible = "gianfar"; > > device_type = "mdio"; > > -- > > 2.1.0.27.g96db324 > > > > > > ___ > > linux-arm-kernel mailing list > > linux-arm-ker...@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v12 3/6] drm/panel: simple: Add support for NEC NL4827HC19-05B 480x272 panel
This adds support for the NEC NL4827HC19-05B 480x272 panel to the DRM simple panel driver. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang Acked-by: Daniel Vetter --- .../bindings/panel/nec,nl4827hc19_05b.txt | 7 ++ drivers/gpu/drm/panel/panel-simple.c | 26 ++ 2 files changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt diff --git a/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt b/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt new file mode 100644 index 000..20e9473 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt @@ -0,0 +1,7 @@ +NEC LCD Technologies,Ltd. WQVGA TFT LCD panel + +Required properties: +- compatible: should be "nec,nl4827hc19_05b" + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index f94201b..db61dd1 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -943,6 +943,29 @@ static const struct panel_desc lg_lp129qe = { }, }; +static const struct drm_display_mode nec_nl4827hc19_05b_mode = { + .clock = 10870, + .hdisplay = 480, + .hsync_start = 480 + 2, + .hsync_end = 480 + 2 + 41, + .htotal = 480 + 2 + 41 + 2, + .vdisplay = 272, + .vsync_start = 272 + 2, + .vsync_end = 272 + 2 + 4, + .vtotal = 272 + 2 + 4 + 2, + .vrefresh = 74, +}; + +static const struct panel_desc nec_nl4827hc19_05b = { + .modes = &nec_nl4827hc19_05b_mode, + .num_modes = 1, + .size = { + .width = 95, + .height = 54, + }, + .bus_format = MEDIA_BUS_FMT_RGB888_1X24 +}; + static const struct drm_display_mode ortustech_com43h4m85ulc_mode = { .clock = 25000, .hdisplay = 480, @@ -1113,6 +1136,9 @@ static const struct of_device_id platform_of_match[] = { .compatible = "lg,lp129qe", .data = &lg_lp129qe, }, { + .compatible = "nec,nl4827hc19_05b", + .data = &nec_nl4827hc19_05b, + }, { .compatible = "ortustech,com43h4m85ulc", .data = &ortustech_com43h4m85ulc, }, { -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v12 2/6] devicetree: Add NEC to the vendor-prefix list
NEC represent NEC LCD Technologies, Ltd. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index 8033919..9f22b3e 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@ -131,6 +131,7 @@ mundoreader Mundo Reader S.L. murata Murata Manufacturing Co., Ltd. mxicy Macronix International Co., Ltd. national National Semiconductor +necNEC LCD Technologies, Ltd. neonodeNeonode Inc. netgearNETGEAR netlogic Broadcom Corporation (formerly NetLogic Microsystems) -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v12 5/6] arm/dts/ls1021a: Add a TFT LCD panel dts node
Add a TFT LCD panel. the TFT LCD panel is WQVGA "480x272", and the bpp is 24. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- arch/arm/boot/dts/ls1021a-twr.dts | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a-twr.dts b/arch/arm/boot/dts/ls1021a-twr.dts index a2c591e..2443329 100644 --- a/arch/arm/boot/dts/ls1021a-twr.dts +++ b/arch/arm/boot/dts/ls1021a-twr.dts @@ -56,6 +56,17 @@ enet0_sgmii_phy = &sgmii_phy2; enet1_sgmii_phy = &sgmii_phy0; }; + + panel: panel { + compatible = "nec,nl4827hc19_05b"; + }; + +}; + +&dcu { + fsl,panel = <&panel>; + status = "okay"; + }; &dspi1 { -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v12 6/6] MAINTAINERS: add Freescale DCU DRM driver maintainer
Add Alison and myself as maintainers of the Freescale DCU DRM driver. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 6761318..387a84a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3397,6 +3397,15 @@ F: drivers/gpu/drm/exynos/ F: include/drm/exynos* F: include/uapi/drm/exynos* +DRM DRIVERS FOR FREESCALE DCU +M: Jianwei Wang +M: Alison Wang +L: dri-de...@lists.freedesktop.org +S: Supported +F: drivers/gpu/drm/fsl-dcu/ +F: Documentation/devicetree/bindings/video/fsl,dcu.txt +F: Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt + DRM DRIVERS FOR FREESCALE IMX M: Philipp Zabel L: dri-de...@lists.freedesktop.org -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v12 4/6] arm/dts/ls1021a: Add DCU dts node
Add DCU node, DCU is a display controller of Freescale named 2D-ACE. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- arch/arm/boot/dts/ls1021a.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi index c70bb27..6d6e3e2 100644 --- a/arch/arm/boot/dts/ls1021a.dtsi +++ b/arch/arm/boot/dts/ls1021a.dtsi @@ -383,6 +383,16 @@ <&platform_clk 1>; }; + dcu: dcu@2ce { + compatible = "fsl,ls1021a-dcu"; + reg = <0x0 0x2ce 0x0 0x1>; + interrupts = ; + clocks = <&platform_clk 0>; + clock-names = "dcu"; + big-endian; + status = "disabled"; + }; + mdio0: mdio@2d24000 { compatible = "gianfar"; device_type = "mdio"; -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v12 0/6] drm/layerscape: Add Freescale DCU DRM driver
Resend v12 for lack of patch 0/6 This patchset add support for Two Dimensional Animation and Compositing Engine (2D-ACE) on the Freescale LS102x SoCs. Changed in v12 -Add one patch for MAINTAINER entry for drm/layerscape Adviced by Daniel Vetter -Add #include Changed in V11 -set regmap_config.cache_type to REGCACHE_FLAT Advanced by Alexander Stein Changed in V10 -adjust commit log, remove meaningless statement -cleanup code for it's format and style. -remove platform related code out, including of tcon(vf610) and scfg(ls1021a) -remove useless sentences: encoder->crtc = crtc; and connector->encoder = encoder; and so on -add vendor prefix for panel pandle -make a DCU_CTRLDESCLN(x, y) to avoid high repetition -introduce per-SoC capability structure to avoid check on the OF node's compatible string -Implement some functions: crtc enable and disable, enable and disable VBLANK, plane atomic_disable and atomic_enable -atomic_check and so on -move DCU config sentence to the right place -move get resources functions to ->probe() -move fsl,dcu.txt to video/ folder -add big-endian describe All advaced by Thierry Reding Changed in V9 put node after calling of_drm_find_panel split clk_prepare_enable() to clk_prepare() and clk_enable(), just call clk_prepare once, and check return value check regmap_write/regmap_read return return value remove useless ".owner= THIS_MODULE," All advanced by Mark Yao Changed in V8 - Remove useless code #define DRIVER_NAME "fsl-dcu-drm" MODULE_ALIAS("platform:fsl-dcu-drm"); Adviced by Paul Bolle Changed in V7 - Remove redundant functions and replace deprecated hooker Adviced by Daniel Vetter - Replace drm_platform_init with drm_dev_alloc/register Adviced by Daniel Vetter Changed in V6 - Add NEC nl4827hc19_05b panel to panel-simple.c Adviced by Mark Yao - Add DRIVER_ATOMIC for driver_features Adviced by Mark Yao - check fsl_dev if it's NULL at PM suspend/resume Adviced by Mark Yao Changed in V5 - Update commit message - Add layer registers initialization - Remove unused functions - Rename driver folder Adviced by Stefan Agner - Move pixel clock control functions to fsl_dcu_drm_drv.c - remove redundant enable the clock implicitly using regmap - Add maintainer message Changed in V4: -This version doesn't have functionality changed Just a minor adjustment. Changed in V3: - Test driver on Vybrid board and add compatible string - Remove unused functions - set default crtc for encoder - replace legacy functions with atomic help functions Adviced by Daniel Vetter - Set the unique name of the DRM device - Implement irq handle function for vblank interrupt Changed in v2: - Add atomic support Adviced by Daniel Vetter - Modify bindings file - Rename node for compatibility - Move platform related code out for compatibility Adviced by Stefan Agner .../devicetree/bindings/video/fsl,dcu.txt | 22 ++ drivers/gpu/drm/Kconfig| 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/fsl-dcu/Kconfig| 18 + drivers/gpu/drm/fsl-dcu/Makefile | 7 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 208 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h | 19 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 404 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h | 197 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c| 23 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 43 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_output.h | 33 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c| 261 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h| 17 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 182 ++ 15 files changed, 1437 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/fsl,dcu.txt create mode 100644 drivers/gpu/drm/fsl-dcu/Kconfig create mode 100644 drivers/gpu/drm/fsl-dcu/Makefile create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_output.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v12 1/6] drm/layerscape: Add Freescale DCU DRM driver
This patch add support for Two Dimensional Animation and Compositing Engine (2D-ACE) on the Freescale SoCs. 2D-ACE is a Freescale display controller. 2D-ACE describes the functionality of the module extremely well its name is a value that cannot be used as a token in programming languages. Instead the valid token "DCU" is used to tag the register names and function names. The Display Controller Unit (DCU) module is a system master that fetches graphics stored in internal or external memory and displays them on a TFT LCD panel. A wide range of panel sizes is supported and the timing of the interface signals is highly configurable. Graphics are read directly from memory and then blended in real-time, which allows for dynamic content creation with minimal CPU intervention. The features: (1) Full RGB888 output to TFT LCD panel. (2) Blending of each pixel using up to 4 source layers dependent on size of panel. (3) Each graphic layer can be placed with one pixel resolution in either axis. (4) Each graphic layer support RGB565 and RGB888 direct colors without alpha channel and BGRA BGRA ARGB1555 direct colors with an alpha channel and YUV422 format. (5) Each graphic layer support alpha blending with 8-bit resolution. This is a simplified version, only one primary plane, one framebuffer, one crtc, one connector and one encoder for TFT LCD panel. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang Acked-by: Daniel Vetter --- .../devicetree/bindings/video/fsl,dcu.txt | 22 ++ drivers/gpu/drm/Kconfig| 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/fsl-dcu/Kconfig| 18 + drivers/gpu/drm/fsl-dcu/Makefile | 7 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 208 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h | 19 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 404 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h | 197 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c| 23 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 43 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_output.h | 33 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c| 261 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h| 17 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 182 ++ 15 files changed, 1437 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/fsl,dcu.txt create mode 100644 drivers/gpu/drm/fsl-dcu/Kconfig create mode 100644 drivers/gpu/drm/fsl-dcu/Makefile create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_output.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c diff --git a/Documentation/devicetree/bindings/video/fsl,dcu.txt b/Documentation/devicetree/bindings/video/fsl,dcu.txt new file mode 100644 index 000..ebf1be9 --- /dev/null +++ b/Documentation/devicetree/bindings/video/fsl,dcu.txt @@ -0,0 +1,22 @@ +Device Tree bindings for Freescale DCU DRM Driver + +Required properties: +- compatible: Should be one of + * "fsl,ls1021a-dcu". + * "fsl,vf610-dcu". + +- reg: Address and length of the register set for dcu. +- clocks: From common clock binding: handle to dcu clock. +- clock-names: From common clock binding: Shall be "dcu". +- big-endian Boolean property, LS1021A DCU registers are big-endian. +- fsl,panel: The phandle to panel node. + +Examples: +dcu: dcu@2ce { + compatible = "fsl,ls1021a-dcu"; + reg = <0x0 0x2ce 0x0 0x1>; + clocks = <&platform_clk 0>; + clock-names = "dcu"; + big-endian; + fsl,panel = <&panel>; +}; diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index c46ca31..9cfd14e 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -231,6 +231,8 @@ source "drivers/gpu/drm/virtio/Kconfig" source "drivers/gpu/drm/msm/Kconfig" +source "drivers/gpu/drm/fsl-dcu/Kconfig" + source "drivers/gpu/drm/tegra/Kconfig" source "drivers/gpu/drm/panel/Kconfig" diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index 5713d05..11cb81e 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -70,3 +70,4 @@
[PATCH v12 5/6] arm/dts/ls1021a: Add a TFT LCD panel dts node
Add a TFT LCD panel. the TFT LCD panel is WQVGA "480x272", and the bpp is 24. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- arch/arm/boot/dts/ls1021a-twr.dts | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a-twr.dts b/arch/arm/boot/dts/ls1021a-twr.dts index a2c591e..2443329 100644 --- a/arch/arm/boot/dts/ls1021a-twr.dts +++ b/arch/arm/boot/dts/ls1021a-twr.dts @@ -56,6 +56,17 @@ enet0_sgmii_phy = &sgmii_phy2; enet1_sgmii_phy = &sgmii_phy0; }; + + panel: panel { + compatible = "nec,nl4827hc19_05b"; + }; + +}; + +&dcu { + fsl,panel = <&panel>; + status = "okay"; + }; &dspi1 { -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v12 0/6] drm/layerscape: Add Freescale DCU DRM driver
This patchset add support for Two Dimensional Animation and Compositing Engine (2D-ACE) on the Freescale LS102x SoCs. Changed in v12 -Add one patch for MAINTAINER entry for drm/layerscape Adviced by Daniel Vetter -Add #include in fsl_dcu_drm_drv.c Changed in V11 -set regmap_config.cache_type to REGCACHE_FLAT Advanced by Alexander Stein Changed in V10 -adjust commit log, remove meaningless statement -cleanup code for it's format and style. -remove platform related code out, including of tcon(vf610) and scfg(ls1021a) -remove useless sentences: encoder->crtc = crtc; and connector->encoder = encoder; and so on -add vendor prefix for panel pandle -make a DCU_CTRLDESCLN(x, y) to avoid high repetition -introduce per-SoC capability structure to avoid check on the OF node's compatible string -Implement some functions: crtc enable and disable, enable and disable VBLANK, plane atomic_disable and atomic_enable -atomic_check and so on -move DCU config sentence to the right place -move get resources functions to ->probe() -move fsl,dcu.txt to video/ folder -add big-endian describe All advaced by Thierry Reding Changed in V9 put node after calling of_drm_find_panel split clk_prepare_enable() to clk_prepare() and clk_enable(), just call clk_prepare once, and check return value check regmap_write/regmap_read return return value remove useless ".owner= THIS_MODULE," All advanced by Mark Yao Changed in V8 - Remove useless code #define DRIVER_NAME "fsl-dcu-drm" MODULE_ALIAS("platform:fsl-dcu-drm"); Adviced by Paul Bolle Changed in V7 - Remove redundant functions and replace deprecated hooker Adviced by Daniel Vetter - Replace drm_platform_init with drm_dev_alloc/register Adviced by Daniel Vetter Changed in V6 - Add NEC nl4827hc19_05b panel to panel-simple.c Adviced by Mark Yao - Add DRIVER_ATOMIC for driver_features Adviced by Mark Yao - check fsl_dev if it's NULL at PM suspend/resume Adviced by Mark Yao Changed in V5 - Update commit message - Add layer registers initialization - Remove unused functions - Rename driver folder Adviced by Stefan Agner - Move pixel clock control functions to fsl_dcu_drm_drv.c - remove redundant enable the clock implicitly using regmap - Add maintainer message Changed in V4: -This version doesn't have functionality changed Just a minor adjustment. Changed in V3: - Test driver on Vybrid board and add compatible string - Remove unused functions - set default crtc for encoder - replace legacy functions with atomic help functions Adviced by Daniel Vetter - Set the unique name of the DRM device - Implement irq handle function for vblank interrupt Changed in v2: - Add atomic support Adviced by Daniel Vetter - Modify bindings file - Rename node for compatibility - Move platform related code out for compatibility Adviced by Stefan Agner -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v12 6/6] MAINTAINERS: add Freescale DCU DRM driver maintainer
Add Alison and myself as maintainers of the Freescale DCU DRM driver. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 6761318..387a84a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3397,6 +3397,15 @@ F: drivers/gpu/drm/exynos/ F: include/drm/exynos* F: include/uapi/drm/exynos* +DRM DRIVERS FOR FREESCALE DCU +M: Jianwei Wang +M: Alison Wang +L: dri-de...@lists.freedesktop.org +S: Supported +F: drivers/gpu/drm/fsl-dcu/ +F: Documentation/devicetree/bindings/video/fsl,dcu.txt +F: Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt + DRM DRIVERS FOR FREESCALE IMX M: Philipp Zabel L: dri-de...@lists.freedesktop.org -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v12 3/6] drm/panel: simple: Add support for NEC NL4827HC19-05B 480x272 panel
This adds support for the NEC NL4827HC19-05B 480x272 panel to the DRM simple panel driver. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang Acked-by: Daniel Vetter --- .../bindings/panel/nec,nl4827hc19_05b.txt | 7 ++ drivers/gpu/drm/panel/panel-simple.c | 26 ++ 2 files changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt diff --git a/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt b/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt new file mode 100644 index 000..20e9473 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt @@ -0,0 +1,7 @@ +NEC LCD Technologies,Ltd. WQVGA TFT LCD panel + +Required properties: +- compatible: should be "nec,nl4827hc19_05b" + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index f94201b..db61dd1 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -943,6 +943,29 @@ static const struct panel_desc lg_lp129qe = { }, }; +static const struct drm_display_mode nec_nl4827hc19_05b_mode = { + .clock = 10870, + .hdisplay = 480, + .hsync_start = 480 + 2, + .hsync_end = 480 + 2 + 41, + .htotal = 480 + 2 + 41 + 2, + .vdisplay = 272, + .vsync_start = 272 + 2, + .vsync_end = 272 + 2 + 4, + .vtotal = 272 + 2 + 4 + 2, + .vrefresh = 74, +}; + +static const struct panel_desc nec_nl4827hc19_05b = { + .modes = &nec_nl4827hc19_05b_mode, + .num_modes = 1, + .size = { + .width = 95, + .height = 54, + }, + .bus_format = MEDIA_BUS_FMT_RGB888_1X24 +}; + static const struct drm_display_mode ortustech_com43h4m85ulc_mode = { .clock = 25000, .hdisplay = 480, @@ -1113,6 +1136,9 @@ static const struct of_device_id platform_of_match[] = { .compatible = "lg,lp129qe", .data = &lg_lp129qe, }, { + .compatible = "nec,nl4827hc19_05b", + .data = &nec_nl4827hc19_05b, + }, { .compatible = "ortustech,com43h4m85ulc", .data = &ortustech_com43h4m85ulc, }, { -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v12 2/6] devicetree: Add NEC to the vendor-prefix list
NEC represent NEC LCD Technologies, Ltd. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index 8033919..9f22b3e 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@ -131,6 +131,7 @@ mundoreader Mundo Reader S.L. murata Murata Manufacturing Co., Ltd. mxicy Macronix International Co., Ltd. national National Semiconductor +necNEC LCD Technologies, Ltd. neonodeNeonode Inc. netgearNETGEAR netlogic Broadcom Corporation (formerly NetLogic Microsystems) -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v12 4/6] arm/dts/ls1021a: Add DCU dts node
Add DCU node, DCU is a display controller of Freescale named 2D-ACE. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- arch/arm/boot/dts/ls1021a.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi index c70bb27..6d6e3e2 100644 --- a/arch/arm/boot/dts/ls1021a.dtsi +++ b/arch/arm/boot/dts/ls1021a.dtsi @@ -383,6 +383,16 @@ <&platform_clk 1>; }; + dcu: dcu@2ce { + compatible = "fsl,ls1021a-dcu"; + reg = <0x0 0x2ce 0x0 0x1>; + interrupts = ; + clocks = <&platform_clk 0>; + clock-names = "dcu"; + big-endian; + status = "disabled"; + }; + mdio0: mdio@2d24000 { compatible = "gianfar"; device_type = "mdio"; -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v12 1/6] drm/layerscape: Add Freescale DCU DRM driver
This patch add support for Two Dimensional Animation and Compositing Engine (2D-ACE) on the Freescale SoCs. 2D-ACE is a Freescale display controller. 2D-ACE describes the functionality of the module extremely well its name is a value that cannot be used as a token in programming languages. Instead the valid token "DCU" is used to tag the register names and function names. The Display Controller Unit (DCU) module is a system master that fetches graphics stored in internal or external memory and displays them on a TFT LCD panel. A wide range of panel sizes is supported and the timing of the interface signals is highly configurable. Graphics are read directly from memory and then blended in real-time, which allows for dynamic content creation with minimal CPU intervention. The features: (1) Full RGB888 output to TFT LCD panel. (2) Blending of each pixel using up to 4 source layers dependent on size of panel. (3) Each graphic layer can be placed with one pixel resolution in either axis. (4) Each graphic layer support RGB565 and RGB888 direct colors without alpha channel and BGRA BGRA ARGB1555 direct colors with an alpha channel and YUV422 format. (5) Each graphic layer support alpha blending with 8-bit resolution. This is a simplified version, only one primary plane, one framebuffer, one crtc, one connector and one encoder for TFT LCD panel. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang Acked-by: Daniel Vetter --- .../devicetree/bindings/video/fsl,dcu.txt | 22 ++ drivers/gpu/drm/Kconfig| 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/fsl-dcu/Kconfig| 18 + drivers/gpu/drm/fsl-dcu/Makefile | 7 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 208 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h | 19 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 404 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h | 197 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c| 23 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 43 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_output.h | 33 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c| 261 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h| 17 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 182 ++ 15 files changed, 1437 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/fsl,dcu.txt create mode 100644 drivers/gpu/drm/fsl-dcu/Kconfig create mode 100644 drivers/gpu/drm/fsl-dcu/Makefile create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_output.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c diff --git a/Documentation/devicetree/bindings/video/fsl,dcu.txt b/Documentation/devicetree/bindings/video/fsl,dcu.txt new file mode 100644 index 000..ebf1be9 --- /dev/null +++ b/Documentation/devicetree/bindings/video/fsl,dcu.txt @@ -0,0 +1,22 @@ +Device Tree bindings for Freescale DCU DRM Driver + +Required properties: +- compatible: Should be one of + * "fsl,ls1021a-dcu". + * "fsl,vf610-dcu". + +- reg: Address and length of the register set for dcu. +- clocks: From common clock binding: handle to dcu clock. +- clock-names: From common clock binding: Shall be "dcu". +- big-endian Boolean property, LS1021A DCU registers are big-endian. +- fsl,panel: The phandle to panel node. + +Examples: +dcu: dcu@2ce { + compatible = "fsl,ls1021a-dcu"; + reg = <0x0 0x2ce 0x0 0x1>; + clocks = <&platform_clk 0>; + clock-names = "dcu"; + big-endian; + fsl,panel = <&panel>; +}; diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index c46ca31..9cfd14e 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -231,6 +231,8 @@ source "drivers/gpu/drm/virtio/Kconfig" source "drivers/gpu/drm/msm/Kconfig" +source "drivers/gpu/drm/fsl-dcu/Kconfig" + source "drivers/gpu/drm/tegra/Kconfig" source "drivers/gpu/drm/panel/Kconfig" diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index 5713d05..11cb81e 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -70,3 +70,4 @@
Re: [PATCH v11 1/5] drm/layerscape: Add Freescale DCU DRM driver
On Fri, Jul 24, 2015 at 3:48 PM, Daniel Vetter wrote: > On Fri, Jul 24, 2015 at 11:21:57AM +0800, jianwei wang wrote: >> Hi Dave, >> >> I think Freescale DCU DRM driver is ready now, can it land? >> >> I have worked on this driver for about nine month. Daniel Vetter, >> Thierry Reding, Mark yao, >> Alexander Stein, Paul Bolle, Alison Wang, Stefan Agner reviewed this >> pathset. The latest >> version v11 has been send out about an week, and no more comments any more. > > On a quick look about overall process there's a few bits missing still: > - review from dt maintainer for the device-tree pieces (review from an > original author like Alice Wang doesn't count). > - needs one patch for MAINTAINER entry for drm/layerscape. > - just send a pull request to Dave once you have this all. > > Cheers, Daniel Okay, Thanks! BR. Jianwei >> >> BR. >> Jianwei >> >> On Mon, Jul 20, 2015 at 5:53 PM, Jianwei Wang >> wrote: >> > This patch add support for Two Dimensional Animation and Compositing >> > Engine (2D-ACE) on the Freescale SoCs. >> > >> > 2D-ACE is a Freescale display controller. 2D-ACE describes >> > the functionality of the module extremely well its name is a value >> > that cannot be used as a token in programming languages. >> > Instead the valid token "DCU" is used to tag the register names and >> > function names. >> > >> > The Display Controller Unit (DCU) module is a system master that >> > fetches graphics stored in internal or external memory and displays >> > them on a TFT LCD panel. A wide range of panel sizes is supported >> > and the timing of the interface signals is highly configurable. >> > Graphics are read directly from memory and then blended in real-time, >> > which allows for dynamic content creation with minimal CPU >> > intervention. >> > >> > The features: >> > (1) Full RGB888 output to TFT LCD panel. >> > (2) Blending of each pixel using up to 4 source layers >> > dependent >> > on size of panel. >> > (3) Each graphic layer can be placed with one pixel resolution >> > in either axis. >> > (4) Each graphic layer support RGB565 and RGB888 direct colors >> > without alpha channel and BGRA BGRA ARGB1555 direct >> > colors >> > with an alpha channel and YUV422 format. >> > (5) Each graphic layer support alpha blending with 8-bit >> > resolution. >> > >> > This is a simplified version, only one primary plane, one >> > framebuffer, one crtc, one connector and one encoder for TFT >> > LCD panel. >> > >> > Signed-off-by: Alison Wang >> > Signed-off-by: Xiubo Li >> > Signed-off-by: Jianwei Wang >> > Acked-by: Daniel Vetter >> > Reviewed-by: Alison Wang >> > --- >> > >> > >> > Changed in V11 >> > -set regmap_config.cache_type to REGCACHE_FLAT >> > Advanced by Alexander Stein >> > >> > Changed in V10 >> > -adjust commit log, remove meaningless statement >> > -cleanup code for it's format and style. >> > -remove platform related code out, including of tcon(vf610) and >> > scfg(ls1021a) >> > -remove useless sentences: encoder->crtc = crtc; and connector->encoder = >> > encoder; and so on >> > -add vendor prefix for panel pandle >> > -make a DCU_CTRLDESCLN(x, y) to avoid high repetition >> > -introduce per-SoC capability structure to avoid check on the OF node's >> > compatible string >> > -Implement some functions: crtc enable and disable, enable and disable >> > VBLANK, plane atomic_disable and atomic_enable -atomic_check and so on >> > -move DCU config sentence to the right place >> > -move get resources functions to ->probe() >> > -move fsl,dcu.txt to video/ folder >> > -add big-endian describe >> > All advaced by Thierry Reding >> > >> > Changed in V9 >> > >> > -put node after calling of_drm_find_panel >> > -split clk_prepare_enable() to clk_prepare() and clk_enable(), just call >> > clk_prepare once, and check return value >> > -check regmap_write/regmap_read return return value >> > -remove useless ".owner= THIS_MODULE," >> > All advanced by Mark Yao >> > >> > Changed in V8 >> > >> > - Remove useless code >> > #define DRIVER_NAME "fsl-dcu-drm" >> > MODULE_ALIAS("platform
Re: [PATCH v11 1/5] drm/layerscape: Add Freescale DCU DRM driver
Hi Dave, I think Freescale DCU DRM driver is ready now, can it land? I have worked on this driver for about nine month. Daniel Vetter, Thierry Reding, Mark yao, Alexander Stein, Paul Bolle, Alison Wang, Stefan Agner reviewed this pathset. The latest version v11 has been send out about an week, and no more comments any more. BR. Jianwei On Mon, Jul 20, 2015 at 5:53 PM, Jianwei Wang wrote: > This patch add support for Two Dimensional Animation and Compositing > Engine (2D-ACE) on the Freescale SoCs. > > 2D-ACE is a Freescale display controller. 2D-ACE describes > the functionality of the module extremely well its name is a value > that cannot be used as a token in programming languages. > Instead the valid token "DCU" is used to tag the register names and > function names. > > The Display Controller Unit (DCU) module is a system master that > fetches graphics stored in internal or external memory and displays > them on a TFT LCD panel. A wide range of panel sizes is supported > and the timing of the interface signals is highly configurable. > Graphics are read directly from memory and then blended in real-time, > which allows for dynamic content creation with minimal CPU > intervention. > > The features: > (1) Full RGB888 output to TFT LCD panel. > (2) Blending of each pixel using up to 4 source layers > dependent > on size of panel. > (3) Each graphic layer can be placed with one pixel resolution > in either axis. > (4) Each graphic layer support RGB565 and RGB888 direct colors > without alpha channel and BGRA BGRA ARGB1555 direct > colors > with an alpha channel and YUV422 format. > (5) Each graphic layer support alpha blending with 8-bit > resolution. > > This is a simplified version, only one primary plane, one > framebuffer, one crtc, one connector and one encoder for TFT > LCD panel. > > Signed-off-by: Alison Wang > Signed-off-by: Xiubo Li > Signed-off-by: Jianwei Wang > Acked-by: Daniel Vetter > Reviewed-by: Alison Wang > --- > > > Changed in V11 > -set regmap_config.cache_type to REGCACHE_FLAT > Advanced by Alexander Stein > > Changed in V10 > -adjust commit log, remove meaningless statement > -cleanup code for it's format and style. > -remove platform related code out, including of tcon(vf610) and scfg(ls1021a) > -remove useless sentences: encoder->crtc = crtc; and connector->encoder = > encoder; and so on > -add vendor prefix for panel pandle > -make a DCU_CTRLDESCLN(x, y) to avoid high repetition > -introduce per-SoC capability structure to avoid check on the OF node's > compatible string > -Implement some functions: crtc enable and disable, enable and disable > VBLANK, plane atomic_disable and atomic_enable -atomic_check and so on > -move DCU config sentence to the right place > -move get resources functions to ->probe() > -move fsl,dcu.txt to video/ folder > -add big-endian describe > All advaced by Thierry Reding > > Changed in V9 > > -put node after calling of_drm_find_panel > -split clk_prepare_enable() to clk_prepare() and clk_enable(), just call > clk_prepare once, and check return value > -check regmap_write/regmap_read return return value > -remove useless ".owner= THIS_MODULE," > All advanced by Mark Yao > > Changed in V8 > > - Remove useless code > #define DRIVER_NAME "fsl-dcu-drm" > MODULE_ALIAS("platform:fsl-dcu-drm"); > Adviced by Paul Bolle > > Changed in V7 > > - Remove redundant functions and replace deprecated hooker > Adviced by Daniel Vetter > - Replace drm_platform_init with drm_dev_alloc/register > Adviced by Daniel Vetter > > Changed in V6 > > - Add NEC nl4827hc19_05b panel to panel-simple.c > Adviced by Mark Yao > - Add DRIVER_ATOMIC for driver_features > Adviced by Mark Yao > - check fsl_dev if it's NULL at PM suspend/resume > Adviced by Mark Yao > > Changed in V5 > > - Update commit message > - Add layer registers initialization > - Remove unused functions > - Rename driver folder > Adviced by Stefan Agner > - Move pixel clock control functions to fsl_dcu_drm_drv.c > - remove redundant enable the clock implicitly using regmap > - Add maintainer message > > Changed in V4: > > -This version doesn't have functionality changed > Just a minor adjustment. > > Changed in V3: > > - Test driver on Vybrid board and add compatible string > - Remove unused functions > - set default crtc for encoder > - replace legacy functions with atomic help functions > Adviced by Daniel Vetter > - Set the unique name of the DRM device > - Implement irq handle function for vblank interrupt > > Changed in v2: > - Add atomic supp
[PATCH v11 1/5] drm/layerscape: Add Freescale DCU DRM driver
This patch add support for Two Dimensional Animation and Compositing Engine (2D-ACE) on the Freescale SoCs. 2D-ACE is a Freescale display controller. 2D-ACE describes the functionality of the module extremely well its name is a value that cannot be used as a token in programming languages. Instead the valid token "DCU" is used to tag the register names and function names. The Display Controller Unit (DCU) module is a system master that fetches graphics stored in internal or external memory and displays them on a TFT LCD panel. A wide range of panel sizes is supported and the timing of the interface signals is highly configurable. Graphics are read directly from memory and then blended in real-time, which allows for dynamic content creation with minimal CPU intervention. The features: (1) Full RGB888 output to TFT LCD panel. (2) Blending of each pixel using up to 4 source layers dependent on size of panel. (3) Each graphic layer can be placed with one pixel resolution in either axis. (4) Each graphic layer support RGB565 and RGB888 direct colors without alpha channel and BGRA BGRA ARGB1555 direct colors with an alpha channel and YUV422 format. (5) Each graphic layer support alpha blending with 8-bit resolution. This is a simplified version, only one primary plane, one framebuffer, one crtc, one connector and one encoder for TFT LCD panel. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang Acked-by: Daniel Vetter Reviewed-by: Alison Wang --- Changed in V11 -set regmap_config.cache_type to REGCACHE_FLAT Advanced by Alexander Stein Changed in V10 -adjust commit log, remove meaningless statement -cleanup code for it's format and style. -remove platform related code out, including of tcon(vf610) and scfg(ls1021a) -remove useless sentences: encoder->crtc = crtc; and connector->encoder = encoder; and so on -add vendor prefix for panel pandle -make a DCU_CTRLDESCLN(x, y) to avoid high repetition -introduce per-SoC capability structure to avoid check on the OF node's compatible string -Implement some functions: crtc enable and disable, enable and disable VBLANK, plane atomic_disable and atomic_enable -atomic_check and so on -move DCU config sentence to the right place -move get resources functions to ->probe() -move fsl,dcu.txt to video/ folder -add big-endian describe All advaced by Thierry Reding Changed in V9 -put node after calling of_drm_find_panel -split clk_prepare_enable() to clk_prepare() and clk_enable(), just call clk_prepare once, and check return value -check regmap_write/regmap_read return return value -remove useless ".owner= THIS_MODULE," All advanced by Mark Yao Changed in V8 - Remove useless code #define DRIVER_NAME "fsl-dcu-drm" MODULE_ALIAS("platform:fsl-dcu-drm"); Adviced by Paul Bolle Changed in V7 - Remove redundant functions and replace deprecated hooker Adviced by Daniel Vetter - Replace drm_platform_init with drm_dev_alloc/register Adviced by Daniel Vetter Changed in V6 - Add NEC nl4827hc19_05b panel to panel-simple.c Adviced by Mark Yao - Add DRIVER_ATOMIC for driver_features Adviced by Mark Yao - check fsl_dev if it's NULL at PM suspend/resume Adviced by Mark Yao Changed in V5 - Update commit message - Add layer registers initialization - Remove unused functions - Rename driver folder Adviced by Stefan Agner - Move pixel clock control functions to fsl_dcu_drm_drv.c - remove redundant enable the clock implicitly using regmap - Add maintainer message Changed in V4: -This version doesn't have functionality changed Just a minor adjustment. Changed in V3: - Test driver on Vybrid board and add compatible string - Remove unused functions - set default crtc for encoder - replace legacy functions with atomic help functions Adviced by Daniel Vetter - Set the unique name of the DRM device - Implement irq handle function for vblank interrupt Changed in v2: - Add atomic support Adviced by Daniel Vetter - Modify bindings file - Rename node for compatibility - Move platform related code out for compatibility Adviced by Stefan Agner .../devicetree/bindings/video/fsl,dcu.txt | 22 ++ MAINTAINERS| 8 + drivers/gpu/drm/Kconfig| 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/fsl-dcu/Kconfig| 18 + drivers/gpu/drm/fsl-dcu/Makefile | 7 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 208 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h | 19 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 403 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h | 197 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c| 23 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 43 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_output.h | 33 ++ drivers/gp
[PATCH v11 4/5] arm/dts/ls1021a: Add DCU dts node
Add DCU node, DCU is a display controller of Freescale named 2D-ACE. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang Reviewed-by: Alison Wang --- arch/arm/boot/dts/ls1021a.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi index c70bb27..6d6e3e2 100644 --- a/arch/arm/boot/dts/ls1021a.dtsi +++ b/arch/arm/boot/dts/ls1021a.dtsi @@ -383,6 +383,16 @@ <&platform_clk 1>; }; + dcu: dcu@2ce { + compatible = "fsl,ls1021a-dcu"; + reg = <0x0 0x2ce 0x0 0x1>; + interrupts = ; + clocks = <&platform_clk 0>; + clock-names = "dcu"; + big-endian; + status = "disabled"; + }; + mdio0: mdio@2d24000 { compatible = "gianfar"; device_type = "mdio"; -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v11 5/5] arm/dts/ls1021a: Add a TFT LCD panel dts node
Add a TFT LCD panel. the TFT LCD panel is WQVGA "480x272", and the bpp is 24. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang Reviewed-by: Alison Wang --- arch/arm/boot/dts/ls1021a-twr.dts | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a-twr.dts b/arch/arm/boot/dts/ls1021a-twr.dts index a2c591e..2443329 100644 --- a/arch/arm/boot/dts/ls1021a-twr.dts +++ b/arch/arm/boot/dts/ls1021a-twr.dts @@ -56,6 +56,17 @@ enet0_sgmii_phy = &sgmii_phy2; enet1_sgmii_phy = &sgmii_phy0; }; + + panel: panel { + compatible = "nec,nl4827hc19_05b"; + }; + +}; + +&dcu { + fsl,panel = <&panel>; + status = "okay"; + }; &dspi1 { -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v11 3/5] drm/panel: simple: Add support for NEC NL4827HC19-05B 480x272 panel
This adds support for the NEC NL4827HC19-05B 480x272 panel to the DRM simple panel driver. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang Acked-by: Daniel Vetter --- .../bindings/panel/nec,nl4827hc19_05b.txt | 7 ++ MAINTAINERS| 1 + drivers/gpu/drm/panel/panel-simple.c | 26 ++ 3 files changed, 34 insertions(+) create mode 100644 Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt diff --git a/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt b/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt new file mode 100644 index 000..20e9473 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt @@ -0,0 +1,7 @@ +NEC LCD Technologies,Ltd. WQVGA TFT LCD panel + +Required properties: +- compatible: should be "nec,nl4827hc19_05b" + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/MAINTAINERS b/MAINTAINERS index dc9d371..5a97a6a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3557,6 +3557,7 @@ L:dri-de...@lists.freedesktop.org S: Supported F: drivers/gpu/drm/fsl-dcu/ F: Documentation/devicetree/bindings/video/fsl,dcu.txt +F: Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt DRM DRIVERS FOR FREESCALE IMX M: Philipp Zabel diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index f94201b..db61dd1 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -943,6 +943,29 @@ static const struct panel_desc lg_lp129qe = { }, }; +static const struct drm_display_mode nec_nl4827hc19_05b_mode = { + .clock = 10870, + .hdisplay = 480, + .hsync_start = 480 + 2, + .hsync_end = 480 + 2 + 41, + .htotal = 480 + 2 + 41 + 2, + .vdisplay = 272, + .vsync_start = 272 + 2, + .vsync_end = 272 + 2 + 4, + .vtotal = 272 + 2 + 4 + 2, + .vrefresh = 74, +}; + +static const struct panel_desc nec_nl4827hc19_05b = { + .modes = &nec_nl4827hc19_05b_mode, + .num_modes = 1, + .size = { + .width = 95, + .height = 54, + }, + .bus_format = MEDIA_BUS_FMT_RGB888_1X24 +}; + static const struct drm_display_mode ortustech_com43h4m85ulc_mode = { .clock = 25000, .hdisplay = 480, @@ -1113,6 +1136,9 @@ static const struct of_device_id platform_of_match[] = { .compatible = "lg,lp129qe", .data = &lg_lp129qe, }, { + .compatible = "nec,nl4827hc19_05b", + .data = &nec_nl4827hc19_05b, + }, { .compatible = "ortustech,com43h4m85ulc", .data = &ortustech_com43h4m85ulc, }, { -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v11 2/5] devicetree: Add NEC to the vendor-prefix list
NEC represent NEC LCD Technologies, Ltd. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index d444757..42ca6bc 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@ -140,6 +140,7 @@ mundoreader Mundo Reader S.L. murata Murata Manufacturing Co., Ltd. mxicy Macronix International Co., Ltd. national National Semiconductor +necNEC LCD Technologies, Ltd. neonodeNeonode Inc. netgearNETGEAR netlogic Broadcom Corporation (formerly NetLogic Microsystems) -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v10 1/5] drm/layerscape: Add Freescale DCU DRM driver
Hi Alexander, Thank you for your review. On Mon, Jul 20, 2015 at 3:18 PM, Alexander Stein wrote: > On Friday 17 July 2015 18:38:59, Jianwei Wang wrote: >> [...] >> +static const struct regmap_config fsl_dcu_regmap_config = { >> + .reg_bits = 32, >> + .reg_stride = 4, >> + .val_bits = 32, >> +}; > > This defaults to REGCACHE_NONE which in the end sets regmap.cache_only = true. > >> [...] >> +#ifdef CONFIG_PM_SLEEP >> +static int fsl_dcu_drm_pm_suspend(struct device *dev) >> +{ >> + struct fsl_dcu_drm_device *fsl_dev = dev_get_drvdata(dev); >> + >> + if (!fsl_dev) >> + return 0; >> + >> + drm_kms_helper_poll_disable(fsl_dev->drm); >> + regcache_cache_only(fsl_dev->regmap, true); > > This should raise a warning (see > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/base/regmap/regcache.c#n472) > as map->cache_bypass is set because of REGCACHE_NONE. > I think you set the cache_type to REGCACHE_FLAT, but neither _LZO or _RBTREE > (see https://lkml.org/lkml/2015/7/16/552 for that) > okay BR. Jianwei > Best regards, > Alexander > -- > Dipl.-Inf. Alexander Stein > SYS TEC electronic GmbH > alexander.st...@systec-electronic.com > > Legal and Commercial Address: > Am Windrad 2 > 08468 Heinsdorfergrund > Germany > > Office: +49 (0) 3765 38600-11xx > Fax:+49 (0) 0) 3765 38600-41xx > > Managing Directors: > Director Technology/CEO: Dipl.-Phys. Siegmar Schmidt; > Director Commercial Affairs/COO: Dipl. Ing. (FH) Armin von Collrepp > Commercial Registry: > Amtsgericht Chemnitz, HRB 28082; USt.-Id Nr. DE150534010 > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v10 4/5] arm/dts/ls1021a: Add DCU dts node
From: Jianwei Wang Add DCU node, DCU is a display controller of Freescale named 2D-ACE. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang Reviewed-by: Alison Wang --- arch/arm/boot/dts/ls1021a.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi index c70bb27..6d6e3e2 100644 --- a/arch/arm/boot/dts/ls1021a.dtsi +++ b/arch/arm/boot/dts/ls1021a.dtsi @@ -383,6 +383,16 @@ <&platform_clk 1>; }; + dcu: dcu@2ce { + compatible = "fsl,ls1021a-dcu"; + reg = <0x0 0x2ce 0x0 0x1>; + interrupts = ; + clocks = <&platform_clk 0>; + clock-names = "dcu"; + big-endian; + status = "disabled"; + }; + mdio0: mdio@2d24000 { compatible = "gianfar"; device_type = "mdio"; -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v10 3/5] drm/panel: simple: Add support for NEC NL4827HC19-05B 480x272 panel
From: Jianwei Wang This adds support for the NEC NL4827HC19-05B 480x272 panel to the DRM simple panel driver. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang Acked-by: Daniel Vetter --- .../bindings/panel/nec,nl4827hc19_05b.txt | 7 ++ MAINTAINERS| 1 + drivers/gpu/drm/panel/panel-simple.c | 26 ++ 3 files changed, 34 insertions(+) create mode 100644 Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt diff --git a/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt b/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt new file mode 100644 index 000..20e9473 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt @@ -0,0 +1,7 @@ +NEC LCD Technologies,Ltd. WQVGA TFT LCD panel + +Required properties: +- compatible: should be "nec,nl4827hc19_05b" + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/MAINTAINERS b/MAINTAINERS index d4dfe14..387a84a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3404,6 +3404,7 @@ L:dri-de...@lists.freedesktop.org S: Supported F: drivers/gpu/drm/fsl-dcu/ F: Documentation/devicetree/bindings/video/fsl,dcu.txt +F: Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt DRM DRIVERS FOR FREESCALE IMX M: Philipp Zabel diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index f94201b..db61dd1 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -943,6 +943,29 @@ static const struct panel_desc lg_lp129qe = { }, }; +static const struct drm_display_mode nec_nl4827hc19_05b_mode = { + .clock = 10870, + .hdisplay = 480, + .hsync_start = 480 + 2, + .hsync_end = 480 + 2 + 41, + .htotal = 480 + 2 + 41 + 2, + .vdisplay = 272, + .vsync_start = 272 + 2, + .vsync_end = 272 + 2 + 4, + .vtotal = 272 + 2 + 4 + 2, + .vrefresh = 74, +}; + +static const struct panel_desc nec_nl4827hc19_05b = { + .modes = &nec_nl4827hc19_05b_mode, + .num_modes = 1, + .size = { + .width = 95, + .height = 54, + }, + .bus_format = MEDIA_BUS_FMT_RGB888_1X24 +}; + static const struct drm_display_mode ortustech_com43h4m85ulc_mode = { .clock = 25000, .hdisplay = 480, @@ -1113,6 +1136,9 @@ static const struct of_device_id platform_of_match[] = { .compatible = "lg,lp129qe", .data = &lg_lp129qe, }, { + .compatible = "nec,nl4827hc19_05b", + .data = &nec_nl4827hc19_05b, + }, { .compatible = "ortustech,com43h4m85ulc", .data = &ortustech_com43h4m85ulc, }, { -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v10 2/5] devicetree: Add NEC to the vendor-prefix list
From: Jianwei Wang NEC represent NEC LCD Technologies, Ltd. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index 8033919..9f22b3e 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@ -131,6 +131,7 @@ mundoreader Mundo Reader S.L. murata Murata Manufacturing Co., Ltd. mxicy Macronix International Co., Ltd. national National Semiconductor +necNEC LCD Technologies, Ltd. neonodeNeonode Inc. netgearNETGEAR netlogic Broadcom Corporation (formerly NetLogic Microsystems) -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v10 5/5] arm/dts/ls1021a: Add a TFT LCD panel dts node
From: Jianwei Wang Add a TFT LCD panel. the TFT LCD panel is WQVGA "480x272", and the bpp is 24. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang Reviewed-by: Alison Wang --- arch/arm/boot/dts/ls1021a-twr.dts | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a-twr.dts b/arch/arm/boot/dts/ls1021a-twr.dts index a2c591e..2443329 100644 --- a/arch/arm/boot/dts/ls1021a-twr.dts +++ b/arch/arm/boot/dts/ls1021a-twr.dts @@ -56,6 +56,17 @@ enet0_sgmii_phy = &sgmii_phy2; enet1_sgmii_phy = &sgmii_phy0; }; + + panel: panel { + compatible = "nec,nl4827hc19_05b"; + }; + +}; + +&dcu { + fsl,panel = <&panel>; + status = "okay"; + }; &dspi1 { -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v10 1/5] drm/layerscape: Add Freescale DCU DRM driver
From: Jianwei Wang This patch add support for Two Dimensional Animation and Compositing Engine (2D-ACE) on the Freescale SoCs. 2D-ACE is a Freescale display controller. 2D-ACE describes the functionality of the module extremely well its name is a value that cannot be used as a token in programming languages. Instead the valid token "DCU" is used to tag the register names and function names. The Display Controller Unit (DCU) module is a system master that fetches graphics stored in internal or external memory and displays them on a TFT LCD panel. A wide range of panel sizes is supported and the timing of the interface signals is highly configurable. Graphics are read directly from memory and then blended in real-time, which allows for dynamic content creation with minimal CPU intervention. The features: (1) Full RGB888 output to TFT LCD panel. (2) Blending of each pixel using up to 4 source layers dependent on size of panel. (3) Each graphic layer can be placed with one pixel resolution in either axis. (4) Each graphic layer support RGB565 and RGB888 direct colors without alpha channel and BGRA BGRA ARGB1555 direct colors with an alpha channel and YUV422 format. (5) Each graphic layer support alpha blending with 8-bit resolution. This is a simplified version, only one primary plane, one framebuffer, one crtc, one connector and one encoder for TFT LCD panel. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang Acked-by: Daniel Vetter Reviewed-by: Alison Wang --- Changed in V10 -adjust commit log, remove meaningless statement -cleanup code for it's format and style. -remove platform related code out, including of tcon(vf610) and scfg(ls1021a) -remove useless sentences: encoder->crtc = crtc; and connector->encoder = encoder; and so on -add vendor prefix for panel pandle -make a DCU_CTRLDESCLN(x, y) to avoid high repetition -introduce per-SoC capability structure to avoid check on the OF node's compatible string -Implement some functions: crtc enable and disable, enable and disable VBLANK, plane atomic_disable and atomic_enable -atomic_check and so on -move DCU config sentence to the right place -move get resources functions to ->probe() -move fsl,dcu.txt to video/ folder -add big-endian describe All advaced by Thierry Reding Changed in V9 -put node after calling of_drm_find_panel -split clk_prepare_enable() to clk_prepare() and clk_enable(), just call clk_prepare once, and check return value -check regmap_write/regmap_read return return value -remove useless ".owner= THIS_MODULE," All advanced by Mark Yao Changed in V8 - Remove useless code #define DRIVER_NAME "fsl-dcu-drm" MODULE_ALIAS("platform:fsl-dcu-drm"); Adviced by Paul Bolle Changed in V7 - Remove redundant functions and replace deprecated hooker Adviced by Daniel Vetter - Replace drm_platform_init with drm_dev_alloc/register Adviced by Daniel Vetter Changed in V6 - Add NEC nl4827hc19_05b panel to panel-simple.c Adviced by Mark Yao - Add DRIVER_ATOMIC for driver_features Adviced by Mark Yao - check fsl_dev if it's NULL at PM suspend/resume Adviced by Mark Yao Changed in V5 - Update commit message - Add layer registers initialization - Remove unused functions - Rename driver folder Adviced by Stefan Agner - Move pixel clock control functions to fsl_dcu_drm_drv.c - remove redundant enable the clock implicitly using regmap - Add maintainer message Changed in V4: -This version doesn't have functionality changed Just a minor adjustment. Changed in V3: - Test driver on Vybrid board and add compatible string - Remove unused functions - set default crtc for encoder - replace legacy functions with atomic help functions Adviced by Daniel Vetter - Set the unique name of the DRM device - Implement irq handle function for vblank interrupt Changed in v2: - Add atomic support Adviced by Daniel Vetter - Modify bindings file - Rename node for compatibility - Move platform related code out for compatibility Adviced by Stefan Agner .../devicetree/bindings/video/fsl,dcu.txt | 22 ++ MAINTAINERS| 8 + drivers/gpu/drm/Kconfig| 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/fsl-dcu/Kconfig| 18 + drivers/gpu/drm/fsl-dcu/Makefile | 7 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 208 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h | 19 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 402 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h | 197 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c| 23 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 43 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_output.h | 33 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c| 261 + driver
[PATCH v9 1/4] drm/layerscape: Add Freescale DCU DRM driver
This patch add support for Two Dimensional Animation and Compositing Engine (2D-ACE) on the Freescale SoCs. 2D-ACE is a Freescale display controller. 2D-ACE describes the functionality of the module extremely well its name is a value that cannot be used as a token in programming languages. Instead the valid token "DCU" is used to tag the register names and function names. The Display Controller Unit (DCU) module is a system master that fetches graphics stored in internal or external memory and displays them on a TFT LCD panel. A wide range of panel sizes is supported and the timing of the interface signals is highly configurable. Graphics are read directly from memory and then blended in real-time, which allows for dynamic content creation with minimal CPU intervention. The features: (1) Full RGB888 output to TFT LCD panel. (2) For the current LCD panel, WQVGA "480x272" is supported. (3) Blending of each pixel using up to 4 source layers dependent on size of panel. (4) Each graphic layer can be placed with one pixel resolution in either axis. (5) Each graphic layer support RGB565 and RGB888 direct colors without alpha channel and BGRA BGRA ARGB1555 direct colors with an alpha channel and YUV422 format. (6) Each graphic layer support alpha blending with 8-bit resolution. This is a simplified version, only one primary plane, one framebuffer, one crtc, one connector and one encoder for TFT LCD panel. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang Acked-by: Daniel Vetter Reviewed-by: Alison Wang --- Changed in V9 -put node after calling of_drm_find_panel -split clk_prepare_enable() to clk_prepare() and clk_enable(), just call clk_prepare once, and check return value -check regmap_write/regmap_read return return value -remove useless ".owner= THIS_MODULE," All advanced by Mark Yao Changed in V8 - Remove useless code #define DRIVER_NAME "fsl-dcu-drm" MODULE_ALIAS("platform:fsl-dcu-drm"); Adviced by Paul Bolle Changed in V7 - Remove redundant functions and replace deprecated hooker Adviced by Daniel Vetter - Replace drm_platform_init with drm_dev_alloc/register Adviced by Daniel Vetter Changed in V6 - Add NEC nl4827hc19_05b panel to panel-simple.c Adviced by Mark Yao - Add DRIVER_ATOMIC for driver_features Adviced by Mark Yao - check fsl_dev if it's NULL at PM suspend/resume Adviced by Mark Yao Changed in V5 - Update commit message - Add layer registers initialization - Remove unused functions - Rename driver folder Adviced by Stefan Agner - Move pixel clock control functions to fsl_dcu_drm_drv.c - remove redundant enable the clock implicitly using regmap - Add maintainer message Changed in V4: -This version doesn't have functionality changed Just a minor adjustment. Changed in V3: - Test driver on Vybrid board and add compatible string - Remove unused functions - set default crtc for encoder - replace legacy functions with atomic help functions Adviced by Daniel Vetter - Set the unique name of the DRM device - Implement irq handle function for vblank interrupt Changed in v2: - Add atomic support Adviced by Daniel Vetter - Modify bindings file - Rename node for compatibility - Move platform related code out for compatibility Adviced by Stefan Agner MAINTAINERS | 9 + drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile| 1 + drivers/gpu/drm/fsl-dcu/Kconfig | 18 + drivers/gpu/drm/fsl-dcu/Makefile| 7 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.c | 187 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.h | 31 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 212 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h | 22 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 453 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h | 222 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c | 26 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 42 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.h | 17 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c | 227 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h | 23 ++ 16 files changed, 1499 insertions(+) create mode 100644 drivers/gpu/drm/fsl-dcu/Kconfig create mode 100644 drivers/gpu/drm/fsl-dcu/Makefile create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c create mode 100644 d
[PATCH v9 2/4] drm/panel: simple: Add support for NEC NL4827HC19-05B 480x272 panel
This adds support for the NEC NL4827HC19-05B 480x272 panel to the DRM simple panel driver. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang Acked-by: Daniel Vetter --- .../bindings/panel/nec,nl4827hc19_05b.txt | 7 ++ .../devicetree/bindings/vendor-prefixes.txt| 1 + MAINTAINERS| 1 - drivers/gpu/drm/panel/panel-simple.c | 26 ++ 4 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt diff --git a/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt b/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt new file mode 100644 index 000..20e9473 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt @@ -0,0 +1,7 @@ +NEC LCD Technologies,Ltd. WQVGA TFT LCD panel + +Required properties: +- compatible: should be "nec,nl4827hc19_05b" + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index 8033919..9f22b3e 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@ -131,6 +131,7 @@ mundoreader Mundo Reader S.L. murata Murata Manufacturing Co., Ltd. mxicy Macronix International Co., Ltd. national National Semiconductor +necNEC LCD Technologies, Ltd. neonodeNeonode Inc. netgearNETGEAR netlogic Broadcom Corporation (formerly NetLogic Microsystems) diff --git a/MAINTAINERS b/MAINTAINERS index fffb8c9..e191ded 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3410,7 +3410,6 @@ M:Alison Wang L: dri-de...@lists.freedesktop.org S: Supported F: drivers/gpu/drm/fsl-dcu/ -F: Documentation/devicetree/bindings/drm/fsl-dcu/ F: Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt DRM DRIVERS FOR NVIDIA TEGRA diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index f94201b..eb12fe4 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -1036,6 +1036,29 @@ static const struct panel_desc shelly_sca07010_bfn_lnn = { .bus_format = MEDIA_BUS_FMT_RGB666_1X18, }; +static const struct drm_display_mode nec_nl4827hc19_05b_mode = { + .clock = 10870, + .hdisplay = 480, + .hsync_start = 480 + 2, + .hsync_end = 480 + 2 + 41, + .htotal = 480 + 2 + 41 + 2, + .vdisplay = 272, + .vsync_start = 272 + 2, + .vsync_end = 272 + 2 + 4, + .vtotal = 272 + 2 + 4 + 2, + .vrefresh = 74, +}; + +static const struct panel_desc nec_nl4827hc19_05b = { + .modes = &nec_nl4827hc19_05b_mode, + .num_modes = 1, + .size = { + .width = 95, + .height = 54, + }, + .bus_format = MEDIA_BUS_FMT_RGB888_1X24 +}; + static const struct of_device_id platform_of_match[] = { { .compatible = "ampire,am800480r3tmqwa1h", @@ -1125,6 +1148,9 @@ static const struct of_device_id platform_of_match[] = { .compatible = "shelly,sca07010-bfn-lnn", .data = &shelly_sca07010_bfn_lnn, }, { + .compatible = "nec,nl4827hc19_05b", + .data = &nec_nl4827hc19_05b, + }, { /* sentinel */ } }; -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v9 3/4] arm/dts/ls1021a: Add DCU dts node
Add DCU node, DCU is a display controller of Freescale named 2D-ACE. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang Reviewed-by: Alison Wang --- .../devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt | 20 MAINTAINERS | 1 + arch/arm/boot/dts/ls1021a.dtsi | 10 ++ 3 files changed, 31 insertions(+) create mode 100644 Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt diff --git a/Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt b/Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt new file mode 100644 index 000..eb61ea5 --- /dev/null +++ b/Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt @@ -0,0 +1,20 @@ +Device Tree bindings for Freescale DCU DRM Driver + +Required properties: +- compatible: Should be one of + * "fsl,ls1021a-dcu". + * "fsl,vf610-dcu". +- reg: Address and length of the register set for dcu. +- clocks: From common clock binding: handle to dcu clock. +- clock-names: From common clock binding: Shall be "dcu". +- panel: The phandle to panel node. + +Examples: +dcu: dcu@2ce { + compatible = "fsl,ls1021a-dcu"; + reg = <0x0 0x2ce 0x0 0x1>; + clocks = <&platform_clk 0>; + clock-names = "dcu"; + big-endian; + panel = <&panel>; +}; diff --git a/MAINTAINERS b/MAINTAINERS index e191ded..fffb8c9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3410,6 +3410,7 @@ M:Alison Wang L: dri-de...@lists.freedesktop.org S: Supported F: drivers/gpu/drm/fsl-dcu/ +F: Documentation/devicetree/bindings/drm/fsl-dcu/ F: Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt DRM DRIVERS FOR NVIDIA TEGRA diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi index c70bb27..6d6e3e2 100644 --- a/arch/arm/boot/dts/ls1021a.dtsi +++ b/arch/arm/boot/dts/ls1021a.dtsi @@ -383,6 +383,16 @@ <&platform_clk 1>; }; + dcu: dcu@2ce { + compatible = "fsl,ls1021a-dcu"; + reg = <0x0 0x2ce 0x0 0x1>; + interrupts = ; + clocks = <&platform_clk 0>; + clock-names = "dcu"; + big-endian; + status = "disabled"; + }; + mdio0: mdio@2d24000 { compatible = "gianfar"; device_type = "mdio"; -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v9 4/4] arm/dts/ls1021a: Add a TFT LCD panel dts node
Add a TFT LCD panel. the TFT LCD panel is WQVGA "480x272", and the bpp is 24. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang Reviewed-by: Alison Wang --- arch/arm/boot/dts/ls1021a-twr.dts | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a-twr.dts b/arch/arm/boot/dts/ls1021a-twr.dts index a2c591e..f6ad7ba 100644 --- a/arch/arm/boot/dts/ls1021a-twr.dts +++ b/arch/arm/boot/dts/ls1021a-twr.dts @@ -56,6 +56,17 @@ enet0_sgmii_phy = &sgmii_phy2; enet1_sgmii_phy = &sgmii_phy0; }; + + panel: panel { + compatible = "nec,nl4827hc19_05b"; + }; + +}; + +&dcu { + panel = <&panel>; + status = "okay"; + }; &dspi1 { -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v8 2/4] drm/panel: simple: Add support for NEC NL4827HC19-05B 480x272 panel
This adds support for the NEC NL4827HC19-05B 480x272 panel to the DRM simple panel driver. Signed-off-by: Jianwei Wang Acked-by: Daniel Vetter --- .../bindings/panel/nec,nl4827hc19_05b.txt | 7 ++ .../devicetree/bindings/vendor-prefixes.txt| 1 + MAINTAINERS| 1 + drivers/gpu/drm/panel/panel-simple.c | 26 ++ 4 files changed, 35 insertions(+) create mode 100644 Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt diff --git a/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt b/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt new file mode 100644 index 000..20e9473 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt @@ -0,0 +1,7 @@ +NEC LCD Technologies,Ltd. WQVGA TFT LCD panel + +Required properties: +- compatible: should be "nec,nl4827hc19_05b" + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index 8033919..9f22b3e 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@ -131,6 +131,7 @@ mundoreader Mundo Reader S.L. murata Murata Manufacturing Co., Ltd. mxicy Macronix International Co., Ltd. national National Semiconductor +necNEC LCD Technologies, Ltd. neonodeNeonode Inc. netgearNETGEAR netlogic Broadcom Corporation (formerly NetLogic Microsystems) diff --git a/MAINTAINERS b/MAINTAINERS index b25b948..e191ded 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3410,6 +3410,7 @@ M:Alison Wang L: dri-de...@lists.freedesktop.org S: Supported F: drivers/gpu/drm/fsl-dcu/ +F: Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt DRM DRIVERS FOR NVIDIA TEGRA M: Thierry Reding diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index f94201b..eb12fe4 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -1036,6 +1036,29 @@ static const struct panel_desc shelly_sca07010_bfn_lnn = { .bus_format = MEDIA_BUS_FMT_RGB666_1X18, }; +static const struct drm_display_mode nec_nl4827hc19_05b_mode = { + .clock = 10870, + .hdisplay = 480, + .hsync_start = 480 + 2, + .hsync_end = 480 + 2 + 41, + .htotal = 480 + 2 + 41 + 2, + .vdisplay = 272, + .vsync_start = 272 + 2, + .vsync_end = 272 + 2 + 4, + .vtotal = 272 + 2 + 4 + 2, + .vrefresh = 74, +}; + +static const struct panel_desc nec_nl4827hc19_05b = { + .modes = &nec_nl4827hc19_05b_mode, + .num_modes = 1, + .size = { + .width = 95, + .height = 54, + }, + .bus_format = MEDIA_BUS_FMT_RGB888_1X24 +}; + static const struct of_device_id platform_of_match[] = { { .compatible = "ampire,am800480r3tmqwa1h", @@ -1125,6 +1148,9 @@ static const struct of_device_id platform_of_match[] = { .compatible = "shelly,sca07010-bfn-lnn", .data = &shelly_sca07010_bfn_lnn, }, { + .compatible = "nec,nl4827hc19_05b", + .data = &nec_nl4827hc19_05b, + }, { /* sentinel */ } }; -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v8 4/4] arm/dts/ls1021a: Add a TFT LCD panel dts node
Add a TFT LCD panel. the TFT LCD panel is WQVGA "480x272", and the bpp is 24. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang Reviewed-by: Alison Wang --- arch/arm/boot/dts/ls1021a-twr.dts | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a-twr.dts b/arch/arm/boot/dts/ls1021a-twr.dts index a2c591e..f6ad7ba 100644 --- a/arch/arm/boot/dts/ls1021a-twr.dts +++ b/arch/arm/boot/dts/ls1021a-twr.dts @@ -56,6 +56,17 @@ enet0_sgmii_phy = &sgmii_phy2; enet1_sgmii_phy = &sgmii_phy0; }; + + panel: panel { + compatible = "nec,nl4827hc19_05b"; + }; + +}; + +&dcu { + panel = <&panel>; + status = "okay"; + }; &dspi1 { -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v8 3/4] arm/dts/ls1021a: Add DCU dts node
Add DCU node, DCU is a display controller of Freescale named 2D-ACE. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang Reviewed-by: Alison Wang --- .../devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt | 20 MAINTAINERS | 1 + arch/arm/boot/dts/ls1021a.dtsi | 10 ++ 3 files changed, 31 insertions(+) create mode 100644 Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt diff --git a/Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt b/Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt new file mode 100644 index 000..eb61ea5 --- /dev/null +++ b/Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt @@ -0,0 +1,20 @@ +Device Tree bindings for Freescale DCU DRM Driver + +Required properties: +- compatible: Should be one of + * "fsl,ls1021a-dcu". + * "fsl,vf610-dcu". +- reg: Address and length of the register set for dcu. +- clocks: From common clock binding: handle to dcu clock. +- clock-names: From common clock binding: Shall be "dcu". +- panel: The phandle to panel node. + +Examples: +dcu: dcu@2ce { + compatible = "fsl,ls1021a-dcu"; + reg = <0x0 0x2ce 0x0 0x1>; + clocks = <&platform_clk 0>; + clock-names = "dcu"; + big-endian; + panel = <&panel>; +}; diff --git a/MAINTAINERS b/MAINTAINERS index e191ded..fffb8c9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3410,6 +3410,7 @@ M:Alison Wang L: dri-de...@lists.freedesktop.org S: Supported F: drivers/gpu/drm/fsl-dcu/ +F: Documentation/devicetree/bindings/drm/fsl-dcu/ F: Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt DRM DRIVERS FOR NVIDIA TEGRA diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi index c70bb27..6d6e3e2 100644 --- a/arch/arm/boot/dts/ls1021a.dtsi +++ b/arch/arm/boot/dts/ls1021a.dtsi @@ -383,6 +383,16 @@ <&platform_clk 1>; }; + dcu: dcu@2ce { + compatible = "fsl,ls1021a-dcu"; + reg = <0x0 0x2ce 0x0 0x1>; + interrupts = ; + clocks = <&platform_clk 0>; + clock-names = "dcu"; + big-endian; + status = "disabled"; + }; + mdio0: mdio@2d24000 { compatible = "gianfar"; device_type = "mdio"; -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v8 1/4] drm/layerscape: Add Freescale DCU DRM driver
This patch add support for Two Dimensional Animation and Compositing Engine (2D-ACE) on the Freescale SoCs. 2D-ACE is a Freescale display controller. 2D-ACE describes the functionality of the module extremely well its name is a value that cannot be used as a token in programming languages. Instead the valid token "DCU" is used to tag the register names and function names. The Display Controller Unit (DCU) module is a system master that fetches graphics stored in internal or external memory and displays them on a TFT LCD panel. A wide range of panel sizes is supported and the timing of the interface signals is highly configurable. Graphics are read directly from memory and then blended in real-time, which allows for dynamic content creation with minimal CPU intervention. The features: (1) Full RGB888 output to TFT LCD panel. (2) For the current LCD panel, WQVGA "480x272" is supported. (3) Blending of each pixel using up to 4 source layers dependent on size of panel. (4) Each graphic layer can be placed with one pixel resolution in either axis. (5) Each graphic layer support RGB565 and RGB888 direct colors without alpha channel and BGRA BGRA ARGB1555 direct colors with an alpha channel and YUV422 format. (6) Each graphic layer support alpha blending with 8-bit resolution. This is a simplified version, only one primary plane, one framebuffer, one crtc, one connector and one encoder for TFT LCD panel. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang Acked-by: Daniel Vetter Reviewed-by: Alison Wang --- hanged in V8 - Remove useless code #define DRIVER_NAME "fsl-dcu-drm" MODULE_ALIAS("platform:fsl-dcu-drm"); Adviced by Paul Bolle Changed in V7 - Remove redundant functions and replace deprecated hooker Adviced by Daniel Vetter - Replace drm_platform_init with drm_dev_alloc/register Adviced by Daniel Vetter Changed in V6 - Add NEC nl4827hc19_05b panel to panel-simple.c Adviced by Mark Yao - Add DRIVER_ATOMIC for driver_features Adviced by Mark Yao - check fsl_dev if it's NULL at PM suspend/resume Adviced by Mark Yao Changed in V5 - Update commit message - Add layer registers initialization - Remove unused functions - Rename driver folder Adviced by Stefan Agner - Move pixel clock control functions to fsl_dcu_drm_drv.c - remove redundant enable the clock implicitly using regmap Adviced by Stefan Agner - Add maintainer message Changed in V4: -This version doesn't have functionality changed Just a minor adjustment. Changed in V3: - Test driver on Vybrid board and add compatible string - Remove unused functions - set default crtc for encoder - replace legacy functions with atomic help functions Adviced by Daniel Vetter - Set the unique name of the DRM device - Implement irq handle function for vblank interrupt Changed in v2: - Add atomic support Adviced by Daniel Vetter - Modify bindings file - Rename node for compatibility - Move platform related code out for compatibility Adviced by Stefan Agner MAINTAINERS | 7 + drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile| 1 + drivers/gpu/drm/fsl-dcu/Kconfig | 18 ++ drivers/gpu/drm/fsl-dcu/Makefile| 7 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.c | 183 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.h | 31 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 159 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h | 22 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 400 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h | 222 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c | 26 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 42 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.h | 17 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c | 195 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h | 23 ++ 16 files changed, 1355 insertions(+) create mode 100644 drivers/gpu/drm/fsl-dcu/Kconfig create mode 100644 drivers/gpu/drm/fsl-dcu/Makefile create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h diff --git a/MAINTAINERS b/MAINTAINERS index 6761318..b25b948 100644 --- a/MAINTAINERS +++ b/MAINTAI
[PATCH v7 3/4] arm/dts/ls1021a: Add DCU dts node
Add DCU node, DCU is a display controller of Freescale named 2D-ACE. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- .../devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt| 49 ++ MAINTAINERS| 1 + arch/arm/boot/dts/ls1021a.dtsi | 10 + 3 files changed, 60 insertions(+) create mode 100644 Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt diff --git a/Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt b/Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt new file mode 100644 index 000..d65631d --- /dev/null +++ b/Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt @@ -0,0 +1,49 @@ +Device Tree bindings for Freescale DCU DRM Driver + +Required properties: +- compatible: Should be one of + * "fsl,ls1021a-dcu". + * "fsl,vf610-dcu". +- reg: Address and length of the register set for dcu. +- clocks: From common clock binding: handle to dcu clock. +- clock-names: From common clock binding: Shall be "dcu". +- display: The phandle to display node. + +Required properties: +- bits-per-pixel: <16> for RGB565, + <24> for RGB888, + <32> for RGB. + +Required timing node for dispplay sub-node: +- display-timings: Refer to binding doc display-timing.txt for details. + +Examples: +dcu: dcu@2ce { + compatible = "fsl,ls1021a-dcu"; + reg = <0x0 0x2ce 0x0 0x1>; + clocks = <&platform_clk 0>; + clock-names = "dcu"; + big-endian; + display = <&display>; + + display: display@0 { + bits-per-pixel = <24>; + + display-timings { + native-mode = <&timing0>; + timing0: nl4827hc19 { + clock-frequency = <1087>; + hactive = <480>; + vactive = <272>; + hback-porch = <2>; + hfront-porch = <2>; + vback-porch = <1>; + vfront-porch = <1>; + hsync-len = <41>; + vsync-len = <2>; + hsync-active = <1>; + vsync-active = <1>; + }; + }; + }; +}; diff --git a/MAINTAINERS b/MAINTAINERS index e191ded..fffb8c9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3410,6 +3410,7 @@ M:Alison Wang L: dri-de...@lists.freedesktop.org S: Supported F: drivers/gpu/drm/fsl-dcu/ +F: Documentation/devicetree/bindings/drm/fsl-dcu/ F: Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt DRM DRIVERS FOR NVIDIA TEGRA diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi index c70bb27..6d6e3e2 100644 --- a/arch/arm/boot/dts/ls1021a.dtsi +++ b/arch/arm/boot/dts/ls1021a.dtsi @@ -383,6 +383,16 @@ <&platform_clk 1>; }; + dcu: dcu@2ce { + compatible = "fsl,ls1021a-dcu"; + reg = <0x0 0x2ce 0x0 0x1>; + interrupts = ; + clocks = <&platform_clk 0>; + clock-names = "dcu"; + big-endian; + status = "disabled"; + }; + mdio0: mdio@2d24000 { compatible = "gianfar"; device_type = "mdio"; -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v7 1/4] drm/layerscape: Add Freescale DCU DRM driver
This patch add support for Two Dimensional Animation and Compositing Engine (2D-ACE) on the Freescale SoCs. 2D-ACE is a Freescale display controller. 2D-ACE describes the functionality of the module extremely well its name is a value that cannot be used as a token in programming languages. Instead the valid token "DCU" is used to tag the register names and function names. The Display Controller Unit (DCU) module is a system master that fetches graphics stored in internal or external memory and displays them on a TFT LCD panel. A wide range of panel sizes is supported and the timing of the interface signals is highly configurable. Graphics are read directly from memory and then blended in real-time, which allows for dynamic content creation with minimal CPU intervention. The features: (1) Full RGB888 output to TFT LCD panel. (2) For the current LCD panel, WQVGA "480x272" is supported. (3) Blending of each pixel using up to 4 source layers dependent on size of panel. (4) Each graphic layer can be placed with one pixel resolution in either axis. (5) Each graphic layer support RGB565 and RGB888 direct colors without alpha channel and BGRA BGRA ARGB1555 direct colors with an alpha channel and YUV422 format. (6) Each graphic layer support alpha blending with 8-bit resolution. This is a simplified version, only one primary plane, one framebuffer created for fbdev, one crtc, one connector for TFT LCD panel, an encoder. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- Changed in V7 - Remove redundant functions and replace deprecated hooker Adviced by Daniel Vetter - Replace drm_platform_init with drm_dev_alloc/register Adviced by Daniel Vetter Changed in V6 - Add NEC nl4827hc19_05b panel to panel-simple.c Adviced by Mark Yao - Add DRIVER_ATOMIC for driver_features Adviced by Mark Yao - check fsl_dev if it's NULL at PM suspend/resume Adviced by Mark Yao Changed in V5 - Update commit message - Add layer registers initialization - Remove unused functions - Rename driver folder Adviced by Stefan Agner - Move pixel clock control functions to fsl_dcu_drm_drv.c - remove redundant enable the clock implicitly using regmap - Add maintainer message Changed in V4: -This version doesn't have functionality changed Just a minor adjustment. Changed in V3: - Test driver on Vybrid board and add compatible string - Remove unused functions - set default crtc for encoder - replace legacy functions with atomic help functions Adviced by Daniel Vetter - Set the unique name of the DRM device - Implement irq handle function for vblank interrupt Changed in v2: - Add atomic support Adviced by Daniel Vetter - Modify bindings file - Rename node for compatibility - Move platform related code out for compatibility Adviced by Stefan Agner MAINTAINERS | 7 + drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile| 1 + drivers/gpu/drm/fsl-dcu/Kconfig | 18 ++ drivers/gpu/drm/fsl-dcu/Makefile| 7 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.c | 183 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.h | 31 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 159 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h | 22 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 401 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h | 223 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c | 26 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 42 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.h | 17 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c | 195 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h | 23 ++ 16 files changed, 1357 insertions(+) create mode 100644 drivers/gpu/drm/fsl-dcu/Kconfig create mode 100644 drivers/gpu/drm/fsl-dcu/Makefile create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h diff --git a/MAINTAINERS b/MAINTAINERS index 6761318..b25b948 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3404,6 +3404,13 @@ S: Maintained F: drivers/gpu/drm/imx/ F: Documentation/devicetree/bindings/drm/imx/ +DRM DRIVERS FOR FREESCALE DCU +M: Jianwei Wang +M: Alison Wang +L: dri-
[PATCH v7 4/4] arm/dts/ls1021a: Add a TFT LCD panel dts node
Add a TFT LCD panel. the TFT LCD panel is WQVGA "480x272", and the bpp is 24. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- arch/arm/boot/dts/ls1021a-twr.dts | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a-twr.dts b/arch/arm/boot/dts/ls1021a-twr.dts index a2c591e..f6ad7ba 100644 --- a/arch/arm/boot/dts/ls1021a-twr.dts +++ b/arch/arm/boot/dts/ls1021a-twr.dts @@ -56,6 +56,17 @@ enet0_sgmii_phy = &sgmii_phy2; enet1_sgmii_phy = &sgmii_phy0; }; + + panel: panel { + compatible = "nec,nl4827hc19_05b"; + }; + +}; + +&dcu { + panel = <&panel>; + status = "okay"; + }; &dspi1 { -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v7 2/4] drm/panel: simple: Add support for NEC NL4827HC19-05B 480x272 panel
This adds support for the NEC NL4827HC19-05B 480x272 panel to the DRM simple panel driver. Signed-off-by: Jianwei Wang --- .../bindings/panel/nec,nl4827hc19_05b.txt | 7 ++ .../devicetree/bindings/vendor-prefixes.txt| 1 + MAINTAINERS| 1 + drivers/gpu/drm/panel/panel-simple.c | 26 ++ 4 files changed, 35 insertions(+) create mode 100644 Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt diff --git a/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt b/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt new file mode 100644 index 000..20e9473 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt @@ -0,0 +1,7 @@ +NEC LCD Technologies,Ltd. WQVGA TFT LCD panel + +Required properties: +- compatible: should be "nec,nl4827hc19_05b" + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index 8033919..9f22b3e 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@ -131,6 +131,7 @@ mundoreader Mundo Reader S.L. murata Murata Manufacturing Co., Ltd. mxicy Macronix International Co., Ltd. national National Semiconductor +necNEC LCD Technologies, Ltd. neonodeNeonode Inc. netgearNETGEAR netlogic Broadcom Corporation (formerly NetLogic Microsystems) diff --git a/MAINTAINERS b/MAINTAINERS index b25b948..e191ded 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3410,6 +3410,7 @@ M:Alison Wang L: dri-de...@lists.freedesktop.org S: Supported F: drivers/gpu/drm/fsl-dcu/ +F: Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt DRM DRIVERS FOR NVIDIA TEGRA M: Thierry Reding diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index f94201b..eee95f4 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -1036,6 +1036,29 @@ static const struct panel_desc shelly_sca07010_bfn_lnn = { .bus_format = MEDIA_BUS_FMT_RGB666_1X18, }; +static const struct drm_display_mode nec_nl4827hc19_05b_mode = { + .clock = 10870, + .hdisplay = 480, + .hsync_start = 480 + 2, + .hsync_end = 480 + 2 + 41, + .htotal = 480 + 2 + 41 + 2, + .vdisplay = 272, + .vsync_start = 272 + 2, + .vsync_end = 272 + 2 + 4, + .vtotal = 272 + 2 + 4 + 2, + .vrefresh = 74, +}; + +static const struct panel_desc nec_nl4827hc19_05b = { + .modes = &nec_nl4827hc19_05b_mode, + .num_modes = 1, + .size = { + .width = 480, + .height = 272, + }, + .bus_format = MEDIA_BUS_FMT_RGB888_1X24 +}; + static const struct of_device_id platform_of_match[] = { { .compatible = "ampire,am800480r3tmqwa1h", @@ -1125,6 +1148,9 @@ static const struct of_device_id platform_of_match[] = { .compatible = "shelly,sca07010-bfn-lnn", .data = &shelly_sca07010_bfn_lnn, }, { + .compatible = "nec,nl4827hc19_05b", + .data = &nec_nl4827hc19_05b, + }, { /* sentinel */ } }; -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v6 2/4] drm/panel: simple: Add support for NEC NL4827HC19-05B 480x272 panel
This adds support for the NEC NL4827HC19-05B 480x272 panel to the DRM simple panel driver. Signed-off-by: Jianwei Wang --- .../bindings/panel/nec,nl4827hc19_05b.txt | 8 +++ .../devicetree/bindings/vendor-prefixes.txt| 1 + MAINTAINERS| 1 + drivers/gpu/drm/panel/panel-simple.c | 26 ++ 4 files changed, 36 insertions(+) create mode 100644 Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt diff --git a/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt b/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt new file mode 100644 index 000..6f6dbdd --- /dev/null +++ b/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt @@ -0,0 +1,7 @@ +NEC LCD Technologies,Ltd. WQVGA TFT LCD panel + +Required properties: +- compatible: should be "nec,nl4827hc19_05b" + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index 8033919..9f22b3e 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@ -131,6 +131,7 @@ mundoreader Mundo Reader S.L. murata Murata Manufacturing Co., Ltd. mxicy Macronix International Co., Ltd. national National Semiconductor +necNEC LCD Technologies, Ltd. neonodeNeonode Inc. netgearNETGEAR netlogic Broadcom Corporation (formerly NetLogic Microsystems) diff --git a/MAINTAINERS b/MAINTAINERS index b25b948..9047c2b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3410,6 +3410,7 @@ M:Alison Wang L: dri-de...@lists.freedesktop.org S: Supported F: drivers/gpu/drm/fsl-dcu/ +F: Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt DRM DRIVERS FOR NVIDIA TEGRA M: Thierry Reding diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index f94201b..eee95f4 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -1036,6 +1036,29 @@ static const struct panel_desc shelly_sca07010_bfn_lnn = { .bus_format = MEDIA_BUS_FMT_RGB666_1X18, }; +static const struct drm_display_mode nec_nl4827hc19_05b_mode = { + .clock = 10870, + .hdisplay = 480, + .hsync_start = 480 + 2, + .hsync_end = 480 + 2 + 41, + .htotal = 480 + 2 + 41 + 2, + .vdisplay = 272, + .vsync_start = 272 + 2, + .vsync_end = 272 + 2 + 4, + .vtotal = 272 + 2 + 4 + 2, + .vrefresh = 74, +}; + +static const struct panel_desc nec_nl4827hc19_05b = { + .modes = &nec_nl4827hc19_05b_mode, + .num_modes = 1, + .size = { + .width = 480, + .height = 272, + }, + .bus_format = MEDIA_BUS_FMT_RGB888_1X24 +}; + static const struct of_device_id platform_of_match[] = { { .compatible = "ampire,am800480r3tmqwa1h", @@ -1125,6 +1148,9 @@ static const struct of_device_id platform_of_match[] = { .compatible = "shelly,sca07010-bfn-lnn", .data = &shelly_sca07010_bfn_lnn, }, { + .compatible = "nec,nl4827hc19_05b", + .data = &nec_nl4827hc19_05b, + }, { /* sentinel */ } }; -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v6 3/4] arm/dts/ls1021a: Add DCU dts node
Add DCU node, DCU is a display controller of Freescale named 2D-ACE. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- .../devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt| 49 ++ MAINTAINERS| 1 + arch/arm/boot/dts/ls1021a.dtsi | 10 + 3 files changed, 60 insertions(+) create mode 100644 Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt diff --git a/Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt b/Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt new file mode 100644 index 000..d65631d --- /dev/null +++ b/Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt @@ -0,0 +1,49 @@ +Device Tree bindings for Freescale DCU DRM Driver + +Required properties: +- compatible: Should be one of + * "fsl,ls1021a-dcu". + * "fsl,vf610-dcu". +- reg: Address and length of the register set for dcu. +- clocks: From common clock binding: handle to dcu clock. +- clock-names: From common clock binding: Shall be "dcu". +- display: The phandle to display node. + +Required properties: +- bits-per-pixel: <16> for RGB565, + <24> for RGB888, + <32> for RGB. + +Required timing node for dispplay sub-node: +- display-timings: Refer to binding doc display-timing.txt for details. + +Examples: +dcu: dcu@2ce { + compatible = "fsl,ls1021a-dcu"; + reg = <0x0 0x2ce 0x0 0x1>; + clocks = <&platform_clk 0>; + clock-names = "dcu"; + big-endian; + display = <&display>; + + display: display@0 { + bits-per-pixel = <24>; + + display-timings { + native-mode = <&timing0>; + timing0: nl4827hc19 { + clock-frequency = <1087>; + hactive = <480>; + vactive = <272>; + hback-porch = <2>; + hfront-porch = <2>; + vback-porch = <1>; + vfront-porch = <1>; + hsync-len = <41>; + vsync-len = <2>; + hsync-active = <1>; + vsync-active = <1>; + }; + }; + }; +}; diff --git a/MAINTAINERS b/MAINTAINERS index 9047c2b..b8d6ef5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3410,6 +3410,7 @@ M:Alison Wang L: dri-de...@lists.freedesktop.org S: Supported F: drivers/gpu/drm/fsl-dcu/ +F: Documentation/devicetree/bindings/drm/fsl-dcu/ F: Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt DRM DRIVERS FOR NVIDIA TEGRA diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi index c70bb27..6d6e3e2 100644 --- a/arch/arm/boot/dts/ls1021a.dtsi +++ b/arch/arm/boot/dts/ls1021a.dtsi @@ -383,6 +383,16 @@ <&platform_clk 1>; }; + dcu: dcu@2ce { + compatible = "fsl,ls1021a-dcu"; + reg = <0x0 0x2ce 0x0 0x1>; + interrupts = ; + clocks = <&platform_clk 0>; + clock-names = "dcu"; + big-endian; + status = "disabled"; + }; + mdio0: mdio@2d24000 { compatible = "gianfar"; device_type = "mdio"; -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v6 4/4] arm/dts/ls1021a: Add a TFT LCD panel dts node
Add a TFT LCD panel node. the TFT LCD panel is WQVGA "480x272", and the bpp is 24. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- arch/arm/boot/dts/ls1021a-twr.dts | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a-twr.dts b/arch/arm/boot/dts/ls1021a-twr.dts index a2c591e..f6ad7ba 100644 --- a/arch/arm/boot/dts/ls1021a-twr.dts +++ b/arch/arm/boot/dts/ls1021a-twr.dts @@ -56,6 +56,17 @@ enet0_sgmii_phy = &sgmii_phy2; enet1_sgmii_phy = &sgmii_phy0; }; + + panel: panel { + compatible = "nec,nl4827hc19_05b"; + }; + +}; + +&dcu { + panel = <&panel>; + status = "okay"; + }; &dspi1 { -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v6 1/4] drm/layerscape: Add Freescale DCU DRM driver
This patch add support for Two Dimensional Animation and Compositing Engine (2D-ACE) on the Freescale SoCs. 2D-ACE is a Freescale display controller. 2D-ACE describes the functionality of the module extremely well its name is a value that cannot be used as a token in programming languages. Instead the valid token "DCU" is used to tag the register names and function names. The Display Controller Unit (DCU) module is a system master that fetches graphics stored in internal or external memory and displays them on a TFT LCD panel. A wide range of panel sizes is supported and the timing of the interface signals is highly configurable. Graphics are read directly from memory and then blended in real-time, which allows for dynamic content creation with minimal CPU intervention. The features: (1) Full RGB888 output to TFT LCD panel. (2) For the current LCD panel, WQVGA "480x272" is supported. (3) Blending of each pixel using up to 4 source layers dependent on size of panel. (4) Each graphic layer can be placed with one pixel resolution in either axis. (5) Each graphic layer support RGB565 and RGB888 direct colors without alpha channel and BGRA BGRA ARGB1555 direct colors with an alpha channel and YUV422 format. (6) Each graphic layer support alpha blending with 8-bit resolution. This is a simplified version, only one primary plane, one framebuffer created for fbdev, one crtc, one connector for TFT LCD panel, an encoder. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- Changed in V6 - Add NEC nl4827hc19_05b panel to panel-simple.c Adviced by Mark Yao - Add DRIVER_ATOMIC for driver_features Adviced by Mark Yao - check fsl_dev if it's NULL at PM suspend/resume Adviced by Mark Yao Changed in V5 - Update commit message - Add layer registers initialization - Remove unused functions - Rename driver folder Adviced by Stefan Agner - Move pixel clock control functions to fsl_dcu_drm_drv.c - remove redundant enable the clock implicitly using regmap - Add maintainer message Changed in V4: -This version doesn't have functionality changed Just a minor adjustment. Changed in V3: - Test driver on Vybrid board and add compatible string - Remove unused functions - set default crtc for encoder - replace legacy functions with atomic help functions Adviced by Daniel Vetter - Set the unique name of the DRM device - Implement irq handle function for vblank interrupt Changed in v2: - Add atomic support Adviced by Daniel Vetter - Modify bindings file - Rename node for compatibility - Move platform related code out for compatibility Adviced by Stefan Agner MAINTAINERS | 7 + drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile| 1 + drivers/gpu/drm/fsl-dcu/Kconfig | 18 ++ drivers/gpu/drm/fsl-dcu/Makefile| 7 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.c | 200 + drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.h | 31 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 172 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h | 22 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 379 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h | 223 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c | 26 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 42 +++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.h | 17 ++ drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c | 195 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h | 23 ++ 16 files changed, 1365 insertions(+) create mode 100644 drivers/gpu/drm/fsl-dcu/Kconfig create mode 100644 drivers/gpu/drm/fsl-dcu/Makefile create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.h create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h diff --git a/MAINTAINERS b/MAINTAINERS index 6761318..b25b948 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3404,6 +3404,13 @@ S: Maintained F: drivers/gpu/drm/imx/ F: Documentation/devicetree/bindings/drm/imx/ +DRM DRIVERS FOR FREESCALE DCU +M: Jianwei Wang +M: Alison Wang +L: dri-de...@lists.freedesktop.org +S: Supported +F: drivers/gpu/drm/fsl-dcu/ + DRM DRIVERS FOR NVIDIA TEGRA M: Thierry Reding M: Terje Bergström diff --git a/drivers/gpu
[PATCH v3 3/4] arm/dts/ls1021a: Add DCU dts node
Add DCU node, DCU is a display controller of Freescale named 2D-ACE. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- arch/arm/boot/dts/ls1021a.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi index c70bb27..6d6e3e2 100644 --- a/arch/arm/boot/dts/ls1021a.dtsi +++ b/arch/arm/boot/dts/ls1021a.dtsi @@ -383,6 +383,16 @@ <&platform_clk 1>; }; + dcu: dcu@2ce { + compatible = "fsl,ls1021a-dcu"; + reg = <0x0 0x2ce 0x0 0x1>; + interrupts = ; + clocks = <&platform_clk 0>; + clock-names = "dcu"; + big-endian; + status = "disabled"; + }; + mdio0: mdio@2d24000 { compatible = "gianfar"; device_type = "mdio"; -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 4/4] arm/dts/ls1021a: Add a TFT LCD panel dts node for DCU
Add a required display-timings node for the TFT LCD panel the TFT LCD panel is WQVGA "480x272", and the bpp is 24. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- arch/arm/boot/dts/ls1021a-twr.dts | 26 ++ 1 file changed, 26 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a-twr.dts b/arch/arm/boot/dts/ls1021a-twr.dts index a2c591e..4780b11 100644 --- a/arch/arm/boot/dts/ls1021a-twr.dts +++ b/arch/arm/boot/dts/ls1021a-twr.dts @@ -58,6 +58,32 @@ }; }; +&dcu { + display = <&display>; + status = "okay"; + + display: display@0 { + bits-per-pixel = <24>; + + display-timings { + native-mode = <&timing0>; + timing0: nl4827hc19 { + clock-frequency = <1087>; + hactive = <480>; + vactive = <272>; + hback-porch = <2>; + hfront-porch = <2>; + vback-porch = <2>; + vfront-porch = <2>; + hsync-len = <41>; + vsync-len = <4>; + hsync-active = <1>; + vsync-active = <1>; + }; + }; + }; +}; + &dspi1 { bus-num = <0>; status = "okay"; -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 1/4] drm/layerscape: Add Freescale DCU DRM driver
This patch add support for Two Dimensional Animation and Compositing Engine (2D-ACE) on the Freescale SoCs. 2D-ACE is a Freescale display controller. 2D-ACE describes the functionality of the module extremely well its name is a value that cannot be used as a token in programming languages. Instead the valid token "DCU" is used to tag the register names and function names. The Display Controller Unit (DCU) module is a system master that fetches graphics stored in internal or external memory and displays them on a TFT LCD panel. A wide range of panel sizes is supported and the timing of the interface signals is highly configurable. Graphics are read directly from memory and then blended in real-time, which allows for dynamic content creation with minimal CPU intervention. The features: (1) Full RGB888 output to TFT LCD panel. (2) For the current LCD panel, WQVGA "480x272" is supported. (3) Blending of each pixel using up to 4 source layers dependent on size of panel. (4) Each graphic layer can be placed with one pixel resolution in either axis. (5) Each graphic layer support RGB565 and RGB888 direct colors without alpha channel and BGRA direct colors with an alpha channel. (6) Each graphic layer support alpha blending with 8-bit resolution. This is a simplified version, only one primary plane, one framebuffer created for fbdev, one crtc, one connector for TFT LCD panel, an encoder. Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- Changed in V3: - Test driver on Vybrid board and add compatible string - Remove unused functions - set default crtc for encoder - replace legacy functions with atomic help functions - Set the unique name of the DRM device - Implement irq handle function for vblank interrupt Changed in v2: - Add atomic support - Modify bindings file - Rename node for compatibility - Move platform related code out for compatibility .../devicetree/bindings/drm/fsl/fsl,dcu.txt| 50 drivers/gpu/drm/Kconfig| 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/fsl/Kconfig| 17 ++ drivers/gpu/drm/fsl/Makefile | 8 + drivers/gpu/drm/fsl/fsl_dcu_drm_connector.c| 193 drivers/gpu/drm/fsl/fsl_dcu_drm_connector.h| 30 ++ drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.c | 165 ++ drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.h | 26 ++ drivers/gpu/drm/fsl/fsl_dcu_drm_drv.c | 331 + drivers/gpu/drm/fsl/fsl_dcu_drm_drv.h | 210 + drivers/gpu/drm/fsl/fsl_dcu_drm_fbdev.c| 26 ++ drivers/gpu/drm/fsl/fsl_dcu_drm_kms.c | 42 +++ drivers/gpu/drm/fsl/fsl_dcu_drm_kms.h | 17 ++ drivers/gpu/drm/fsl/fsl_dcu_drm_plane.c| 192 drivers/gpu/drm/fsl/fsl_dcu_drm_plane.h| 23 ++ 16 files changed, 1333 insertions(+) create mode 100644 Documentation/devicetree/bindings/drm/fsl/fsl,dcu.txt create mode 100644 drivers/gpu/drm/fsl/Kconfig create mode 100644 drivers/gpu/drm/fsl/Makefile create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_connector.c create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_connector.h create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.c create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.h create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_drv.c create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_drv.h create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_fbdev.c create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_kms.c create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_kms.h create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_plane.c create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_plane.h diff --git a/Documentation/devicetree/bindings/drm/fsl/fsl,dcu.txt b/Documentation/devicetree/bindings/drm/fsl/fsl,dcu.txt new file mode 100644 index 000..bdc7d5b --- /dev/null +++ b/Documentation/devicetree/bindings/drm/fsl/fsl,dcu.txt @@ -0,0 +1,50 @@ +Device Tree bindings for Freescale DCU DRM Driver + +Required properties: +- compatible: Should be one of + * "fsl,ls1021a-dcu". + * "fsl,vf610-dcu". +- reg: Address and length of the register set for dcu. +- clocks: From common clock binding: handle to dcu clock. +- clock-names: From common clock binding: Shall be "dcu". +- display: The phandle to display node. + +Required properties: +- bits-per-pixel: <16> for RGB565, + <24> for RGB888, + <32> for RGB. + +Required timing node for dispplay sub-node: +- display-timings: Refer to binding doc display-timing.txt for details. + +Examples: +dcu: dcu@2ce { + compatible = "fsl,ls1021a-dcu"; + reg = <0x0 0x2ce 0x0 0x1>;
[PATCH v3 2/4] arm/layerscape/ls1021a: DCU pixel clock control
Enable DCU pixel clock when platform devices initinalizing and provide enable and disable pixel clock functions for drm driver Signed-off-by: Alison Wang Signed-off-by: Xiubo Li Signed-off-by: Jianwei Wang --- arch/arm/mach-imx/mach-ls1021a.c | 36 include/linux/fsl/dcu.h | 22 ++ 2 files changed, 58 insertions(+) create mode 100644 include/linux/fsl/dcu.h diff --git a/arch/arm/mach-imx/mach-ls1021a.c b/arch/arm/mach-imx/mach-ls1021a.c index b89c858..4fb346d 100644 --- a/arch/arm/mach-imx/mach-ls1021a.c +++ b/arch/arm/mach-imx/mach-ls1021a.c @@ -8,9 +8,44 @@ */ #include +#include +#include +#include +#include #include "common.h" +void dcu_pixclk_disable(void) +{ + struct regmap *scfg_regmap; + + scfg_regmap = syscon_regmap_lookup_by_compatible("fsl,ls1021a-scfg"); + if (IS_ERR(scfg_regmap)) { + pr_err("No syscfg phandle specified\n"); + return; + } + + regmap_write(scfg_regmap, SCFG_PIXCLKCR, PXCK_DISABLE); +} + +void dcu_pixclk_enable(void) +{ + struct regmap *scfg_regmap; + + scfg_regmap = syscon_regmap_lookup_by_compatible("fsl,ls1021a-scfg"); + if (IS_ERR(scfg_regmap)) { + pr_err("No syscfg phandle specified\n"); + return; + } + + regmap_write(scfg_regmap, SCFG_PIXCLKCR, PXCK_ENABLE); +} + +static void __init ls1021a_init_machine(void) +{ + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + dcu_pixclk_enable(); +} static const char * const ls1021a_dt_compat[] __initconst = { "fsl,ls1021a", NULL, @@ -18,5 +53,6 @@ static const char * const ls1021a_dt_compat[] __initconst = { DT_MACHINE_START(LS1021A, "Freescale LS1021A") .smp= smp_ops(ls1021a_smp_ops), + .init_machine = ls1021a_init_machine, .dt_compat = ls1021a_dt_compat, MACHINE_END diff --git a/include/linux/fsl/dcu.h b/include/linux/fsl/dcu.h new file mode 100644 index 000..1873057 --- /dev/null +++ b/include/linux/fsl/dcu.h @@ -0,0 +1,22 @@ +/* + * Copyright 2015 Freescale Semiconductor, Inc. + * + * Freescale DCU drm device driver + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#ifndef __FSL_DCU_H__ +#define __FSL_DCU_H__ + +#define SCFG_PIXCLKCR 0x28 +#define PXCK_ENABLEBIT(31) +#define PXCK_DISABLE 0 + +void dcu_pixclk_enable(void); +void dcu_pixclk_disable(void); + +#endif /* __FSL_DCU_H__ */ -- 2.1.0.27.g96db324 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html