From patchwork Sat Mar 30 09:56:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 10878239 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 EF4111708 for ; Sat, 30 Mar 2019 09:56:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3B1E28555 for ; Sat, 30 Mar 2019 09:56:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C6D9628936; Sat, 30 Mar 2019 09:56:56 +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 3B84128555 for ; Sat, 30 Mar 2019 09:56:56 +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=FRqjfGfYpEEpi3IJkYFY746fr318mSUybiXGGmhN+Ys=; b=rKm 8WliEdTnJ/woSKfJe98eRqbqIwet2/3ssmRtAftxFO1ct2ACngPpiL7Z0BC9JI2aiqre0v7UgFdn0 W0Dovf9IZCHhVLwL/rIMTe+Twi+9ejwn9+vTApAVJP33ZD5J1KewsxgQGXOKrnqTDG3LHrO4wv7PY uo23prnrOki4e2qteiCG49OEl1Trydp8WiK2s93CfSxnl83HQiivCRjQDeb9z66dmbsJPeVPi2YLS EmJubAwWBkQkgEYYjWQMZD/s11mC1gMGCHXWCFcbZtQmdklxRf26c0onwdqQ8aMkoM8R3gBIDO2pr F8uS7J1W8z8LQHoYbKHpFMYXeCGuFng==; 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 1hAAjO-0003Mg-HY; Sat, 30 Mar 2019 09:56:54 +0000 Received: from mail-ed1-x544.google.com ([2a00:1450:4864:20::544]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hAAjL-0003Lw-Dy; Sat, 30 Mar 2019 09:56:53 +0000 Received: by mail-ed1-x544.google.com with SMTP id a25so4061943edc.8; Sat, 30 Mar 2019 02:56:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=16XSbTMVUwZ3JNwu/W9jFRi0xaDPkYIj5jWeTQ9pjYQ=; b=Q88YAj0oBnXTct6TJPrAsr31cuMTGJ5YmxIl/OefZoWQzXTlUaPb+3vtz945yi1JPy kuT88noVYmZGmXrwrJUjZa5X3TtG7Kvi3l9uLlB103bIGTxcphNqE7Dk+gKO1GlWx7Pl Ztu5cd3RMA61ZqAGm7y07C3JN0AbtOqkDP4HhGE2SkRG3//Wqz5P3TNwy3TUe7KtW95E T1NiY8yif50cHVNmf3YWxDLhv0+O9lwXS3gYCBnMtnYp0bsuL2fkvZ7fQ2QuZnvVh4Iv JEcP4nkWKvhvGRcxm9cU9RxDSWXAB8eLj6joIaF0oUr5aFHYTKzO65pSUEum7VlSctq0 D3eg== 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=16XSbTMVUwZ3JNwu/W9jFRi0xaDPkYIj5jWeTQ9pjYQ=; b=MKEIDT3UGaVvJ8kr9U5dICSWRzjdOt2cQLIS/UgFAiw8TQZRI6c7C1AukmmjFtRDNJ JJcD/83XqphtBc7ght1WDCEwatK8wm/3rWQnl8sLuWft/ieicF4vbbtj2IUx2oNM+T8p WGdpSjbl4tzH0Cw/6dguhIxNOdtmlZBqrB/Yf4db3ujDGJpDaR3vxd7AKExMLV1PqulX Y4fv27cL6ULRmGLzkMus1ID6zUOjKgiGNldFEpBtVeaiHXEGqPpgXqXVwC/e8oZe8OgV gpYnCjiJyFvCW5j4TIN2Z6f2xf0zOvjIXxYoEbzWTOUpEEMjpo0H5nT9xP2uStxJl3SE Wo3Q== X-Gm-Message-State: APjAAAXUOyWSkV2/L3zsNS9yDSXai+VcWPzoslOf1CWquQXsKAYoaUGS xEcG/FK65H6MbVfHTeZlWgQ= X-Google-Smtp-Source: APXvYqyTlU9xDIi3XQDn4k9ya9klKcxBmqs4vl+T2bFeS53SXTYDfjEFoRI85kdUusd2QyCjkgrCMQ== X-Received: by 2002:a17:906:c2d0:: with SMTP id ch16mr16127804ejb.197.1553939809276; Sat, 30 Mar 2019 02:56:49 -0700 (PDT) Received: from debian.home (ip51ccf9cd.speed.planet.nl. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id b34sm1087921edd.24.2019.03.30.02.56.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 Mar 2019 02:56:48 -0700 (PDT) From: Johan Jonker To: heiko@sntech.de Subject: [PATCH v6 0/4] Enable rk3066 VOP and HDMI for MK808 Date: Sat, 30 Mar 2019 10:56:35 +0100 Message-Id: <20190330095639.14626-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-20190330_025651_494930_E846E364 X-CRM114-Status: GOOD ( 13.14 ) 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: V6 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.1-rc1 the monitor doesn't blank on poweroff, it freezes due to a patch revert some time ago. drm/rockchip: shutdown drm subsystem on shutdown https://patchwork.kernel.org/patch/10556151/ drm/rockchip: Allow driver to be shutdown on reboot/kexec https://patchwork.kernel.org/patch/10556135/ [for-4.20] Revert "drm/rockchip: Allow driver to be shutdown on reboot/kexec" https://patchwork.kernel.org/patch/10714725/ DVI-D monitors without CEA modes can add a fixed mode to the kernel command line as workaround. For example: video=HDMI-A-1:1280x720@60 HDMI sound not included. etc. /////////////////////////////////////////// Changes V6: rk3066_hdmi.c add goto err_cleanup_hdmi to rk3066_hdmi_bind function small text style changes /////////////////////////////////////////// Changes V5: rockchip,rk3066-hdmi.txt add Reviewed-by tag rk3066_hdmi.c change order in unbind function add goto err_disable_i2c to rk3066_hdmi_bind function change dev_foobar calls to their DRM_* equivalents remove rk3066_hdmi_i2c_irq function use define constants in rk3066_hdmi_encoder_enable function add comment to rk3066_hdmi_config_phy function small text style changes remove DVI-D support rk3066_hdmi.h add define constants /////////////////////////////////////////// Changes 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 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 | 869 +++++++++++++++++++++ drivers/gpu/drm/rockchip/rk3066_hdmi.h | 229 ++++++ drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 2 + drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 1 + 9 files changed, 1263 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