From patchwork Tue Jan 15 16:17:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 1025289 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="skcc5IjM"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 43fFr45jmzz9s2P for ; Wed, 16 Jan 2019 03:18:12 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 52D84C2208C; Tue, 15 Jan 2019 16:18:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E6D14C21DFB; Tue, 15 Jan 2019 16:18:05 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D95EFC21DFB; Tue, 15 Jan 2019 16:18:04 +0000 (UTC) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by lists.denx.de (Postfix) with ESMTPS id 78E17C21C8B for ; Tue, 15 Jan 2019 16:18:04 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id t200so3855666wmt.0 for ; Tue, 15 Jan 2019 08:18:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=a9rU3I88UrxK7zXnA0GpfZb1Gz+RQ0Dpw9A81f2X7l0=; b=skcc5IjMGDjrShVV5xoGX5OTpHnT4QJOWW/flqh9dHYizCARASglSvPqVyzgxzTuzf zw6CCHGIEWC+epB9QfBNcehXmzSONWCglCthpRstpZgyH1jZDqrPkfY0Y6dfLP8lgVfD BBPNtCq3Jk0Ilx855exPJ7e+KfTmPwLxwgbeGF82zA5A42AJnrAxhinFfZdD5xOBdlXU bh6Ye86ZhyK+6FKx6ZHgXjc6PMvaXgpbKmL/Cyq8ho1HwkEVUL+Mdv7lcNlRBzNuRpG5 74Tzafcmvht8nI34coksFVdIfeEpUTtLg7+xB62yqUM0o77FfwVHKB1N+CZmT73ybV00 Cq5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=a9rU3I88UrxK7zXnA0GpfZb1Gz+RQ0Dpw9A81f2X7l0=; b=JGEcrp3rdU/Nq7CIsJ2zspQhAxCj4S4UP3PLqHP7sl8bifkzoxWwBCod3ZCSHteUYM ZLyZOcB+6AQWmpEWn4CyXMLHHyiUKqRzKN6I0tttjFd0Av00HZLa18vmD3Z5dCaveWuy we+DyG6QnMQb/NDUcqsOl1tgGCLaJd2bvx66qjaojAVRCxLau1ik1UwZI8AFFV93lIZs OdFNlhovx/MGhB2hx1bImXOoFvus8ANN4Ns5+QjlYHScIdfEfkFhGrD6wfRswybnGKyb PxJWQ9oCJhA2D1SDjG6bD6Zlj8ZtKglRoFuXCk4t6//zs0yBYOi/q61h7fPYOUosWGdI wg+w== X-Gm-Message-State: AJcUukfrJf+w4cBHDWZfVgIBp5bQx/djEqfz26mbMAxRk3/g3arFsHBb HzNnyaN1+xbxAxuly5KCeyVeMQ== X-Google-Smtp-Source: ALg8bN4KMdssgFjpI4TgoEyJ8YL5b8XS1l0TqfxofXfkoVRhZ1J05y4ZowPQohjoyPBTGnmD8cSIBg== X-Received: by 2002:a1c:9dc4:: with SMTP id g187mr4088045wme.152.1547569083716; Tue, 15 Jan 2019 08:18:03 -0800 (PST) Received: from bender.baylibre.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id o81sm54014829wmd.10.2019.01.15.08.18.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 15 Jan 2019 08:18:03 -0800 (PST) From: Neil Armstrong To: agust@denx.de, u-boot@lists.denx.de Date: Tue, 15 Jan 2019 17:17:48 +0100 Message-Id: <20190115161759.1657-1-narmstrong@baylibre.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Cc: mjourdan@baylibre.com, linux-amlogic@lists.infradead.org Subject: [U-Boot] [PATCH u-boot 00/11] meson: add support for Video Output X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patchset adds support for CVBS and/or HDMI output for Amlogic Meson GX SoCs (GXBB, GXL and GXM) based on the Linux Meson DRM driver ported to the U-Boot Video DM model. It supports only the "DMT" video modes reported by the monitors since AVI InfoFrame management is missing from the U-Boot video model. The port includes some changes in the dw-hdmi driver to support custom PHY calls and support for the ColorSpace converter since the Amlogic Meson GX video pipeline can only output un YUV444 mode, thus activating the CSC is needed to output RGB for HDMI. Video Support needs some tweaks in the DT like the u-boot,dm-pre-reloc for the VPU node and a tweak to access the HHI registers from the DW-HDMI glue driver. A port of a linux patch is also necessary to hook a regulator to enable HDMI. Finally, it enables console mux and console env for all Amlogic boards and enabled Video Support for the Libre Computer AML-S905X-CC board. Jorge Ramirez-Ortiz (2): video: dw_hdmi: support SoC specific read/write ops video: dw_hdmi: add support for color conversion Maxime Jourdan (6): power: domain: meson-gx-pwrc-vpu: add missing depends arm64: dts: meson-gx: vpu should be probed before relocation arm64: dts: meson-gx: add hhi reg entry to hdmi_tx arm: meson: board-gx: Setup VPU in fdt arm: meson64: enable console mux and console env by default arm: libretech-cc: enable video by default Neil Armstrong (3): video: Add Meson Video Processing Unit Driver arm64: dts: meson-gx: Add hdmi_5v regulator as hdmi tx supply configs: meson64: use vidconsole and usbkbd if enabled arch/arm/dts/meson-gx-u-boot.dtsi | 21 + arch/arm/dts/meson-gxbb-nanopi-k2-u-boot.dtsi | 7 + arch/arm/dts/meson-gxbb-odroidc2-u-boot.dtsi | 7 + .../meson-gxl-s905x-khadas-vim-u-boot.dtsi | 7 + arch/arm/dts/meson-gxl-s905x-khadas-vim.dts | 1 + .../meson-gxl-s905x-libretech-cc-u-boot.dtsi | 7 + arch/arm/dts/meson-gxl-s905x-libretech-cc.dts | 1 + arch/arm/dts/meson-gxl-s905x-p212-u-boot.dtsi | 7 + arch/arm/dts/meson-gxl-s905x-p212.dts | 1 + .../arm/dts/meson-gxm-khadas-vim2-u-boot.dtsi | 7 + arch/arm/dts/meson-gxm-khadas-vim2.dts | 1 + arch/arm/include/asm/arch-meson/meson-vpu.h | 13 + arch/arm/mach-meson/board-gx.c | 5 + configs/khadas-vim2_defconfig | 2 + configs/khadas-vim_defconfig | 2 + configs/libretech-cc_defconfig | 8 + configs/odroid-c2_defconfig | 2 + configs/p212_defconfig | 2 + drivers/power/domain/Kconfig | 2 +- drivers/video/Kconfig | 2 + drivers/video/Makefile | 1 + drivers/video/dw_hdmi.c | 267 ++- drivers/video/meson/Kconfig | 12 + drivers/video/meson/Makefile | 9 + drivers/video/meson/meson_canvas.c | 45 + drivers/video/meson/meson_dw_hdmi.c | 445 +++++ drivers/video/meson/meson_dw_hdmi.h | 134 ++ drivers/video/meson/meson_plane.c | 177 ++ drivers/video/meson/meson_registers.h | 1393 ++++++++++++++++ drivers/video/meson/meson_vclk.c | 893 ++++++++++ drivers/video/meson/meson_venc.c | 1464 +++++++++++++++++ drivers/video/meson/meson_vpu.c | 211 +++ drivers/video/meson/meson_vpu.h | 97 ++ drivers/video/meson/meson_vpu_init.c | 440 +++++ drivers/video/meson/simplefb_common.c | 29 + drivers/video/meson/simplefb_common.h | 21 + include/configs/meson64.h | 23 + include/dw_hdmi.h | 74 + include/media_bus_format.h | 156 ++ 39 files changed, 5992 insertions(+), 4 deletions(-) create mode 100644 arch/arm/dts/meson-gx-u-boot.dtsi create mode 100644 arch/arm/dts/meson-gxbb-nanopi-k2-u-boot.dtsi create mode 100644 arch/arm/dts/meson-gxbb-odroidc2-u-boot.dtsi create mode 100644 arch/arm/dts/meson-gxl-s905x-khadas-vim-u-boot.dtsi create mode 100644 arch/arm/dts/meson-gxl-s905x-libretech-cc-u-boot.dtsi create mode 100644 arch/arm/dts/meson-gxl-s905x-p212-u-boot.dtsi create mode 100644 arch/arm/dts/meson-gxm-khadas-vim2-u-boot.dtsi create mode 100644 arch/arm/include/asm/arch-meson/meson-vpu.h create mode 100644 drivers/video/meson/Kconfig create mode 100644 drivers/video/meson/Makefile create mode 100644 drivers/video/meson/meson_canvas.c create mode 100644 drivers/video/meson/meson_dw_hdmi.c create mode 100644 drivers/video/meson/meson_dw_hdmi.h create mode 100644 drivers/video/meson/meson_plane.c create mode 100644 drivers/video/meson/meson_registers.h create mode 100644 drivers/video/meson/meson_vclk.c create mode 100644 drivers/video/meson/meson_venc.c create mode 100644 drivers/video/meson/meson_vpu.c create mode 100644 drivers/video/meson/meson_vpu.h create mode 100644 drivers/video/meson/meson_vpu_init.c create mode 100644 drivers/video/meson/simplefb_common.c create mode 100644 drivers/video/meson/simplefb_common.h create mode 100644 include/media_bus_format.h