From patchwork Wed Mar 6 22:41:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 10841871 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A431E1575 for ; Wed, 6 Mar 2019 22:41:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84A412E2D8 for ; Wed, 6 Mar 2019 22:41:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 72CC12EF72; Wed, 6 Mar 2019 22:41:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 145222E2D8 for ; Wed, 6 Mar 2019 22:41:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=GfuWuX4JU8bVe0dJHQ7/EDl22aiilx1Z4yjgHmjr39I=; b=Kj7 fVIqD/TFvM8FZ0OVxFaBeysjK50PT0Bh4aHcACTiJ5j21G9869FwLR7KZz9q+R6acEFHbhImA/hOm lmAM/SvCWdubU+QmTN3EUYIkswWVHyw1sLv2UiuJ2UWN4CjKgdOIGUYhri5dMHNJqlP5Oe34JzYYd nTN19Y7XQUdh/QOH90JJ2kbdCK4Z4K5yCzqCh6w0AOGh2FJGomXv+hUrL6zHeQvbdkIbN3G9Pdrzq j8FLG1uZzQuFGJvGg2QD/mljWsKipNIRSX4bcmzAqILeJqIZuyR81u8qfspdJm67jnwnH8ekgrStl suzL54NIA/nvuVWoPLMjHtmsCe34yLw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h1fEB-0003Tx-G9; Wed, 06 Mar 2019 22:41:31 +0000 Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h1fE7-0003SH-OD; Wed, 06 Mar 2019 22:41:29 +0000 Received: by mail-ed1-x543.google.com with SMTP id j89so11795726edb.9; Wed, 06 Mar 2019 14:41:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=QNy3H1vExVS7y9CR7yIN+hNajEJUqjOXXk8GHcBL0/c=; b=BF+ao9kZURjK23WgWao54RcihXoWnT2juIsU15P9vrVP/CP3/W8NWl8jbg3cZI+6YK jh3rpCIAEbktjf9FtntmhZR7aOC0NEl8HyEGauv8tiEVr3Ca3GE12mb0cvPDnRx7NgZA Hk/b6S1xyaSdcNbslrWJGWSGtWC6spwOTh0l4XuEXGlj9DdN5IRk02L3sOKBn7vtWo1c BOw5rRJ0TNdUS3qDgX7Ii3WNIWJPLc6zIasxP9CZDWKszmY7/wCMZASwobqYs1Xg+tdB xasLoij/wE14nchkvMKg3/XDpAEFKXRlcE8+NhxrZQFTd6gKqun58SIxorjmBaGyBGq1 beKA== 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; bh=QNy3H1vExVS7y9CR7yIN+hNajEJUqjOXXk8GHcBL0/c=; b=AbK7sNzFHGiasuMIF5Xn4LsC6lIj/A4dm0mXZoPqJzsHsANHcSpUwktY0AsN6hU9rS 6j2lJc0oD6LD3a6cUkbvVB1P05V73yGk64UPxzbI7mOCWRHzMuWBewk7YAHfX04D5gux 17/o4m7h/jrw2L7ZypVXEVOPcD24AFRjnA9aLaBZiItKwcOya2xacE6/IySZCRDGhTVa XfY7f9kEIBWFgByKwgw7tp2WXnrIFhhFrFc9Dm7uuvtEmQTKYoV1rf36l4EB3qgwIuNM gFVY4yhUk5lRr0EvDJLk7dnIq8mfaAWDHooC+gWnPD3obD6PrsdfE588poFU+VSwG36q ejUQ== X-Gm-Message-State: APjAAAU39ZVh/xkTba9pzD4MorUmBJQwhSv689eMm3Czwg5IuY+zqOzN gPFVYFkMBn7sPHXJJS4Pkz4= X-Google-Smtp-Source: APXvYqww04FKSGLrAU8/8wbNxeC1WN1xICzEQiR+QbM5ZWkhHIciXDRRW9YWw9nWi4OdlhEoegJBuw== X-Received: by 2002:a50:890f:: with SMTP id e15mr25594564ede.174.1551912084211; Wed, 06 Mar 2019 14:41:24 -0800 (PST) Received: from debian.home (ip51ccf9cd.speed.planet.nl. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id 36sm801356edz.58.2019.03.06.14.41.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Mar 2019 14:41:23 -0800 (PST) From: Johan Jonker To: heiko@sntech.de Subject: [PATCH v4 0/4] Enable rk3066 VOP and HDMI for MK808 Date: Wed, 6 Mar 2019 23:41:09 +0100 Message-Id: <20190306224113.24853-1-jbx6244@gmail.com> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190306_144127_792031_73229D28 X-CRM114-Status: GOOD ( 11.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, airlied@linux.ie, hjc@rock-chips.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, robh+dt@kernel.org, daniel@ffwll.ch, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP For testing only. Version: V4 Title: Enable rk3066 VOP and HDMI for MK808. This patch serie only works in combination with a MK808 TV stick and a rk3066 processor. Other boxes and tablets with a rk3066 need extra software for power management and lcd's. What does it do: With these kernel patches a MK808 can show 2 penguins and a console on a DVI-D monitor in combination with a framebuffer. Not tested: HDMI TV HDCP DRM Xorg Display managers Android etc. Problems: DRM functions keep changing every rc. With v5.0-rc8 the monitor doesn't blank on poweroff, it freezes. Fixed screen size for DVI-D. HDMI sound not included. etc. /////////////////////////////////////////// Changes V3 > V4: rockchip,rk3066-hdmi.txt change document name rk3066_hdmi.c add more info in commit message replace deprecated drmP.h include small text style changes explain vic variable remove enc_in_format change lock name change regmap name change cmp name replace hdmi->dev by dev use sentinel use HDMI_VIDEO_VSYNC_OFFSET_SHIFT define remove unused module macros change driver name for dmesg /////////////////////////////////////////// Changes V2 > V3: updated to v5.0-rc8 removed patches that are already added to linux-next rk3066_hdmi.c removed gpl text small style changes removed unused includes add include for: drm_helper_hpd_irq_event drm_helper_probe_single_connector_modes update drm_hdmi_avi_infoframe_from_display_mode function call rk3066_hdmi.h removed gpl text rk3066a.dtsi add extra port for hdmi connector node rk3066a-mk808.dts add hdmi connector node connect hdmi_out with hdmi_con_in rk3066-hdmi.txt add extra port for hdmi connector node /////////////////////////////////////////// # How to make rkfs.cpio find . | cpio -o --format=newc > ../rkfs.cpio # How to compile/flash make menuconfig ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- make -j4 ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- cp ./arch/arm/boot/zImage ../zImage-dtb cat ./arch/arm/boot/dts/rk3066a-mk808.dtb >> ../zImage-dtb ../tools/rkcrc -k ../zImage-dtb ../mk808.img sudo ../tools/rkflashtool w 0x4000 0x8000 < ../mk808.img sudo ../tools/rkflashtool b /////////////////////////////////////////// Johan Jonker (2): ARM: dts: rockchip: rk3066a-mk808: enable vop0 and hdmi nodes dt-bindings: display: rockchip: add document for rk3066 hdmi Zheng Yang (2): drm: rockchip: introduce rk3066 hdmi ARM: dts: rockchip: add rk3066 hdmi nodes .../display/rockchip/rockchip,rk3066-hdmi.txt | 72 ++ arch/arm/boot/dts/rk3066a-mk808.dts | 29 + arch/arm/boot/dts/rk3066a.dtsi | 52 ++ drivers/gpu/drm/rockchip/Kconfig | 8 + drivers/gpu/drm/rockchip/Makefile | 1 + drivers/gpu/drm/rockchip/rk3066_hdmi.c | 901 +++++++++++++++++++++ drivers/gpu/drm/rockchip/rk3066_hdmi.h | 226 ++++++ drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 2 + drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 1 + 9 files changed, 1292 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/rockchip/rockchip,rk3066-hdmi.txt create mode 100644 drivers/gpu/drm/rockchip/rk3066_hdmi.c create mode 100644 drivers/gpu/drm/rockchip/rk3066_hdmi.h