From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751738AbaGVNLn (ORCPT ); Tue, 22 Jul 2014 09:11:43 -0400 Received: from top.free-electrons.com ([176.31.233.9]:33157 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750985AbaGVNLl (ORCPT ); Tue, 22 Jul 2014 09:11:41 -0400 From: Boris BREZILLON To: Nicolas Ferre , Jean-Christophe Plagniol-Villard , Alexandre Belloni , Andrew Victor , David Airlie , dri-devel@lists.freedesktop.org, Thierry Reding , linux-pwm@vger.kernel.org, Samuel Ortiz , Lee Jones , Rob Clark , Laurent Pinchart Cc: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bo Shen , Boris BREZILLON Subject: [PATCH v4 00/11] drm: add support for Atmel HLCDC Display Controller Date: Tue, 22 Jul 2014 15:11:24 +0200 Message-Id: <1406034695-15534-1-git-send-email-boris.brezillon@free-electrons.com> X-Mailer: git-send-email 1.8.3.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, This patch series adds support for Atmel HLCDC (HLCD Controller) available on some Atmel SoCs (i.e. the sama5d3 family). The HLCDC actually provides a Display Controller and a PWM device, hence I decided to declare an MFD device exposing 2 subdevices: a display controller and a PWM chip. This also solves a circular dependency issue preventing HLCDC driver from unloading. The HLCDC request a drm_panel device, which request a backlight device (a PWM backlight), which depends on a PWM which is provided by the HLCDC driver (hlcdc -> panel -> backlight -> hlcdc (pwm part)). The current implementation only supports sama5d3 SoCs but other SoCs should be easily ported by defining new compatible strings and adding HLCDC description structures for these SoCs. The drivers supports basic CRTC functionalities, several overlays and an hardware cursor. At the moment, it only supports connection to LCD panels through an RGB connector (defined as an LVDS connector in my implementation), though connection to other kind of devices (like DRM bridges) could be added later. It also supports several RGB formats on all planes and some YUV formats on the HEO overlay plane. This series depends on 2 other series currently under review: [1] and [2]. Best Regards, Boris [1]http://lkml.iu.edu/hypermail/linux/kernel/1407.1/04171.html [2]http://www.spinics.net/lists/kernel/msg1791681.html Changes since v3: - rework the layer code to simplify several parts (locking and layer disabling) - make use of the drm_flip_work infrastructure - rely on default HW cursor implementation using on the cursor plane - rework the display controller DT bindings (based on OF graph representation) - add rotation support - retrive RGB bus format from drm_display_info - drop the dynamic pinctrl state selection - rework HLCDC output handling (previously specialized to interface with LCD panels) - drop ".module = THIS_MODULE" lines - change display controller compatible string Changes since v2: - fix coding style issues (macro indentation) - make use of GENMASK in several places - declare regmap config as a static structure - rework hlcdc plane update API - rework cursor handling to make use of the new plane update API - fix backporch config - do not use devm_regmap_init_mmio_clk to avoid extra clk_enable clk disable calls when accessing registers - explicitely include regmap and clk headers instead of relying on atmel-hlcdc.h inclusions - make the atmel-hlcdc driver depends on CONFIG_OF - separate DT bindings documentation from driver implementation - support several pin muxing for HLCDC pins on sama5d3 SoCs Changes since v1: - replace the backlight driver by a PWM driver - make use of drm_panel infrastructure - split driver code in several subsystem: MFD, PWM and DRM - add support for overlays - add support for hardware cursor Boris BREZILLON (11): mfd: add atmel-hlcdc driver mfd: add documentation for atmel-hlcdc DT bindings pwm: add support for atmel-hlcdc-pwm device pwm: add DT bindings documentation for atmel-hlcdc-pwm driver drm: add Atmel HLCDC Display Controller support drm: add DT bindings documentation for atmel-hlcdc-dc driver ARM: AT91/dt: split sama5d3 lcd pin definitions to match RGB mode configs ARM: AT91/dt: add alternative pin muxing for sama5d3 lcd pins ARM: at91/dt: define the HLCDC node available on sama5d3 SoCs ARM: at91/dt: add LCD panel description to sama5d3xdm.dtsi ARM: at91/dt: enable the LCD panel on sama5d3xek boards .../devicetree/bindings/drm/atmel-hlcdc-dc.txt | 54 ++ .../devicetree/bindings/mfd/atmel-hlcdc.txt | 50 ++ .../devicetree/bindings/pwm/atmel-hlcdc-pwm.txt | 55 ++ arch/arm/boot/dts/sama5d31ek.dts | 20 + arch/arm/boot/dts/sama5d33ek.dts | 20 + arch/arm/boot/dts/sama5d34ek.dts | 20 + arch/arm/boot/dts/sama5d36ek.dts | 20 + arch/arm/boot/dts/sama5d3_lcd.dtsi | 205 +++++- arch/arm/boot/dts/sama5d3xdm.dtsi | 58 ++ drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/atmel-hlcdc/Kconfig | 11 + drivers/gpu/drm/atmel-hlcdc/Makefile | 7 + drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 286 ++++++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 488 +++++++++++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 224 ++++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.c | 635 ++++++++++++++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.h | 396 ++++++++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 478 ++++++++++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 804 +++++++++++++++++++++ drivers/mfd/Kconfig | 12 + drivers/mfd/Makefile | 1 + drivers/mfd/atmel-hlcdc.c | 118 +++ drivers/pwm/Kconfig | 9 + drivers/pwm/Makefile | 1 + drivers/pwm/pwm-atmel-hlcdc.c | 229 ++++++ include/linux/mfd/atmel-hlcdc.h | 78 ++ 27 files changed, 4251 insertions(+), 31 deletions(-) create mode 100644 Documentation/devicetree/bindings/drm/atmel-hlcdc-dc.txt create mode 100644 Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt create mode 100644 Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt create mode 100644 drivers/gpu/drm/atmel-hlcdc/Kconfig create mode 100644 drivers/gpu/drm/atmel-hlcdc/Makefile create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.c create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.h create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c create mode 100644 drivers/mfd/atmel-hlcdc.c create mode 100644 drivers/pwm/pwm-atmel-hlcdc.c create mode 100644 include/linux/mfd/atmel-hlcdc.h -- 1.8.3.2 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris BREZILLON Subject: [PATCH v4 00/11] drm: add support for Atmel HLCDC Display Controller Date: Tue, 22 Jul 2014 15:11:24 +0200 Message-ID: <1406034695-15534-1-git-send-email-boris.brezillon@free-electrons.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Nicolas Ferre , Jean-Christophe Plagniol-Villard , Alexandre Belloni , Andrew Victor , David Airlie , dri-devel@lists.freedesktop.org, Thierry Reding , linux-pwm@vger.kernel.org, Samuel Ortiz , Lee Jones , Rob Clark , Laurent Pinchart Cc: Mark Rutland , devicetree@vger.kernel.org, Pawel Moll , Ian Campbell , linux-kernel@vger.kernel.org, Rob Herring , Bo Shen , Kumar Gala , linux-arm-kernel@lists.infradead.org List-Id: devicetree@vger.kernel.org Hello, This patch series adds support for Atmel HLCDC (HLCD Controller) available on some Atmel SoCs (i.e. the sama5d3 family). The HLCDC actually provides a Display Controller and a PWM device, hence I decided to declare an MFD device exposing 2 subdevices: a display controller and a PWM chip. This also solves a circular dependency issue preventing HLCDC driver from unloading. The HLCDC request a drm_panel device, which request a backlight device (a PWM backlight), which depends on a PWM which is provided by the HLCDC driver (hlcdc -> panel -> backlight -> hlcdc (pwm part)). The current implementation only supports sama5d3 SoCs but other SoCs should be easily ported by defining new compatible strings and adding HLCDC description structures for these SoCs. The drivers supports basic CRTC functionalities, several overlays and an hardware cursor. At the moment, it only supports connection to LCD panels through an RGB connector (defined as an LVDS connector in my implementation), though connection to other kind of devices (like DRM bridges) could be added later. It also supports several RGB formats on all planes and some YUV formats on the HEO overlay plane. This series depends on 2 other series currently under review: [1] and [2]. Best Regards, Boris [1]http://lkml.iu.edu/hypermail/linux/kernel/1407.1/04171.html [2]http://www.spinics.net/lists/kernel/msg1791681.html Changes since v3: - rework the layer code to simplify several parts (locking and layer disabling) - make use of the drm_flip_work infrastructure - rely on default HW cursor implementation using on the cursor plane - rework the display controller DT bindings (based on OF graph representation) - add rotation support - retrive RGB bus format from drm_display_info - drop the dynamic pinctrl state selection - rework HLCDC output handling (previously specialized to interface with LCD panels) - drop ".module = THIS_MODULE" lines - change display controller compatible string Changes since v2: - fix coding style issues (macro indentation) - make use of GENMASK in several places - declare regmap config as a static structure - rework hlcdc plane update API - rework cursor handling to make use of the new plane update API - fix backporch config - do not use devm_regmap_init_mmio_clk to avoid extra clk_enable clk disable calls when accessing registers - explicitely include regmap and clk headers instead of relying on atmel-hlcdc.h inclusions - make the atmel-hlcdc driver depends on CONFIG_OF - separate DT bindings documentation from driver implementation - support several pin muxing for HLCDC pins on sama5d3 SoCs Changes since v1: - replace the backlight driver by a PWM driver - make use of drm_panel infrastructure - split driver code in several subsystem: MFD, PWM and DRM - add support for overlays - add support for hardware cursor Boris BREZILLON (11): mfd: add atmel-hlcdc driver mfd: add documentation for atmel-hlcdc DT bindings pwm: add support for atmel-hlcdc-pwm device pwm: add DT bindings documentation for atmel-hlcdc-pwm driver drm: add Atmel HLCDC Display Controller support drm: add DT bindings documentation for atmel-hlcdc-dc driver ARM: AT91/dt: split sama5d3 lcd pin definitions to match RGB mode configs ARM: AT91/dt: add alternative pin muxing for sama5d3 lcd pins ARM: at91/dt: define the HLCDC node available on sama5d3 SoCs ARM: at91/dt: add LCD panel description to sama5d3xdm.dtsi ARM: at91/dt: enable the LCD panel on sama5d3xek boards .../devicetree/bindings/drm/atmel-hlcdc-dc.txt | 54 ++ .../devicetree/bindings/mfd/atmel-hlcdc.txt | 50 ++ .../devicetree/bindings/pwm/atmel-hlcdc-pwm.txt | 55 ++ arch/arm/boot/dts/sama5d31ek.dts | 20 + arch/arm/boot/dts/sama5d33ek.dts | 20 + arch/arm/boot/dts/sama5d34ek.dts | 20 + arch/arm/boot/dts/sama5d36ek.dts | 20 + arch/arm/boot/dts/sama5d3_lcd.dtsi | 205 +++++- arch/arm/boot/dts/sama5d3xdm.dtsi | 58 ++ drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/atmel-hlcdc/Kconfig | 11 + drivers/gpu/drm/atmel-hlcdc/Makefile | 7 + drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 286 ++++++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 488 +++++++++++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 224 ++++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.c | 635 ++++++++++++++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.h | 396 ++++++++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 478 ++++++++++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 804 +++++++++++++++++++++ drivers/mfd/Kconfig | 12 + drivers/mfd/Makefile | 1 + drivers/mfd/atmel-hlcdc.c | 118 +++ drivers/pwm/Kconfig | 9 + drivers/pwm/Makefile | 1 + drivers/pwm/pwm-atmel-hlcdc.c | 229 ++++++ include/linux/mfd/atmel-hlcdc.h | 78 ++ 27 files changed, 4251 insertions(+), 31 deletions(-) create mode 100644 Documentation/devicetree/bindings/drm/atmel-hlcdc-dc.txt create mode 100644 Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt create mode 100644 Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt create mode 100644 drivers/gpu/drm/atmel-hlcdc/Kconfig create mode 100644 drivers/gpu/drm/atmel-hlcdc/Makefile create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.c create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.h create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c create mode 100644 drivers/mfd/atmel-hlcdc.c create mode 100644 drivers/pwm/pwm-atmel-hlcdc.c create mode 100644 include/linux/mfd/atmel-hlcdc.h -- 1.8.3.2 From mboxrd@z Thu Jan 1 00:00:00 1970 From: boris.brezillon@free-electrons.com (Boris BREZILLON) Date: Tue, 22 Jul 2014 15:11:24 +0200 Subject: [PATCH v4 00/11] drm: add support for Atmel HLCDC Display Controller Message-ID: <1406034695-15534-1-git-send-email-boris.brezillon@free-electrons.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hello, This patch series adds support for Atmel HLCDC (HLCD Controller) available on some Atmel SoCs (i.e. the sama5d3 family). The HLCDC actually provides a Display Controller and a PWM device, hence I decided to declare an MFD device exposing 2 subdevices: a display controller and a PWM chip. This also solves a circular dependency issue preventing HLCDC driver from unloading. The HLCDC request a drm_panel device, which request a backlight device (a PWM backlight), which depends on a PWM which is provided by the HLCDC driver (hlcdc -> panel -> backlight -> hlcdc (pwm part)). The current implementation only supports sama5d3 SoCs but other SoCs should be easily ported by defining new compatible strings and adding HLCDC description structures for these SoCs. The drivers supports basic CRTC functionalities, several overlays and an hardware cursor. At the moment, it only supports connection to LCD panels through an RGB connector (defined as an LVDS connector in my implementation), though connection to other kind of devices (like DRM bridges) could be added later. It also supports several RGB formats on all planes and some YUV formats on the HEO overlay plane. This series depends on 2 other series currently under review: [1] and [2]. Best Regards, Boris [1]http://lkml.iu.edu/hypermail/linux/kernel/1407.1/04171.html [2]http://www.spinics.net/lists/kernel/msg1791681.html Changes since v3: - rework the layer code to simplify several parts (locking and layer disabling) - make use of the drm_flip_work infrastructure - rely on default HW cursor implementation using on the cursor plane - rework the display controller DT bindings (based on OF graph representation) - add rotation support - retrive RGB bus format from drm_display_info - drop the dynamic pinctrl state selection - rework HLCDC output handling (previously specialized to interface with LCD panels) - drop ".module = THIS_MODULE" lines - change display controller compatible string Changes since v2: - fix coding style issues (macro indentation) - make use of GENMASK in several places - declare regmap config as a static structure - rework hlcdc plane update API - rework cursor handling to make use of the new plane update API - fix backporch config - do not use devm_regmap_init_mmio_clk to avoid extra clk_enable clk disable calls when accessing registers - explicitely include regmap and clk headers instead of relying on atmel-hlcdc.h inclusions - make the atmel-hlcdc driver depends on CONFIG_OF - separate DT bindings documentation from driver implementation - support several pin muxing for HLCDC pins on sama5d3 SoCs Changes since v1: - replace the backlight driver by a PWM driver - make use of drm_panel infrastructure - split driver code in several subsystem: MFD, PWM and DRM - add support for overlays - add support for hardware cursor Boris BREZILLON (11): mfd: add atmel-hlcdc driver mfd: add documentation for atmel-hlcdc DT bindings pwm: add support for atmel-hlcdc-pwm device pwm: add DT bindings documentation for atmel-hlcdc-pwm driver drm: add Atmel HLCDC Display Controller support drm: add DT bindings documentation for atmel-hlcdc-dc driver ARM: AT91/dt: split sama5d3 lcd pin definitions to match RGB mode configs ARM: AT91/dt: add alternative pin muxing for sama5d3 lcd pins ARM: at91/dt: define the HLCDC node available on sama5d3 SoCs ARM: at91/dt: add LCD panel description to sama5d3xdm.dtsi ARM: at91/dt: enable the LCD panel on sama5d3xek boards .../devicetree/bindings/drm/atmel-hlcdc-dc.txt | 54 ++ .../devicetree/bindings/mfd/atmel-hlcdc.txt | 50 ++ .../devicetree/bindings/pwm/atmel-hlcdc-pwm.txt | 55 ++ arch/arm/boot/dts/sama5d31ek.dts | 20 + arch/arm/boot/dts/sama5d33ek.dts | 20 + arch/arm/boot/dts/sama5d34ek.dts | 20 + arch/arm/boot/dts/sama5d36ek.dts | 20 + arch/arm/boot/dts/sama5d3_lcd.dtsi | 205 +++++- arch/arm/boot/dts/sama5d3xdm.dtsi | 58 ++ drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/atmel-hlcdc/Kconfig | 11 + drivers/gpu/drm/atmel-hlcdc/Makefile | 7 + drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 286 ++++++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 488 +++++++++++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 224 ++++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.c | 635 ++++++++++++++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.h | 396 ++++++++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 478 ++++++++++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 804 +++++++++++++++++++++ drivers/mfd/Kconfig | 12 + drivers/mfd/Makefile | 1 + drivers/mfd/atmel-hlcdc.c | 118 +++ drivers/pwm/Kconfig | 9 + drivers/pwm/Makefile | 1 + drivers/pwm/pwm-atmel-hlcdc.c | 229 ++++++ include/linux/mfd/atmel-hlcdc.h | 78 ++ 27 files changed, 4251 insertions(+), 31 deletions(-) create mode 100644 Documentation/devicetree/bindings/drm/atmel-hlcdc-dc.txt create mode 100644 Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt create mode 100644 Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt create mode 100644 drivers/gpu/drm/atmel-hlcdc/Kconfig create mode 100644 drivers/gpu/drm/atmel-hlcdc/Makefile create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.c create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.h create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c create mode 100644 drivers/mfd/atmel-hlcdc.c create mode 100644 drivers/pwm/pwm-atmel-hlcdc.c create mode 100644 include/linux/mfd/atmel-hlcdc.h -- 1.8.3.2