From patchwork Tue Oct 13 17:28:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 11835707 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 62CBD7349 for ; Tue, 13 Oct 2020 18:11:51 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C49D425358 for ; Tue, 13 Oct 2020 17:30:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KUv0TvNk"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="D0TVrEyk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C49D425358 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: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:List-Owner; bh=fU+OE02HZKnneWFa4DTSF+ksoASm4EOmcUax5sM1HdA=; b=KUv0TvNkXdJ2G2CJke/thJ5Bm WZ2h1B7WxvgFFOBz6UWTp3wrVyltxNhnhWfqWPSjC56j7kHix+TGGdarve5DVyGD/jdgWioiEerB5 zAp9WPPpEFmuWtCZKXb5UDpejn+qYnn7yODRuQfIRON1NGG5zJv+JU2onqK562RPzgxKIA0YIUEsu lKEMo5o5r4LvDKOAutWmbEtq7LEmSG5wUBtJJTl4rGbG7+bdjSiYZ/g7beawhcRNGIYD8JujqZLt9 4gh6sxwpH3LIrmZKGXgpbe+nmXwrHlx1wzetHMng0Wpe45G5/ZPUrxsIGtgp6X+bUd0MDMiEmPduB WBZJolcyA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSO6S-0003Pz-NB; Tue, 13 Oct 2020 17:28:48 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSO6L-0003ND-Ty for linux-arm-kernel@lists.infradead.org; Tue, 13 Oct 2020 17:28:44 +0000 Received: by mail-wr1-x444.google.com with SMTP id b8so290773wrn.0 for ; Tue, 13 Oct 2020 10:28:41 -0700 (PDT) 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:in-reply-to:references :mime-version:content-transfer-encoding; bh=BlvyC7xO8X+UHJiYhKqKJwROYowmoGRyG38cye9lek4=; b=D0TVrEykWlhUm/bhD8ZKE0gqYKXdhzaQPwZnWz2KAvB+bJoSW4qWFnIWLlwPD8HqCV 07pjsS3ciagYi1TM74PzjqWI/LHA8n4Vmq2SVyVa3BLpXuDL+71kspidJi2ih8Qk1Nnx vV5/69FEsmRN85s9O9nXCt/zXoXMfuQYZHQDRYM2h1kdc8BVhudtr40OxORl1pVWBHdo Jz8N/i+sFqoHRircz4tWcKo4vXBbCZcpxY3+0byc28QSDoxEqtzXWJaA2Do1uYYWNGks 6rkMAECv++08P5bTNC6qU3aVYzM2+NnF2RC2mWfhlX1oFGVsit5GA6/PTwhZRBfMi+Jg EFew== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=BlvyC7xO8X+UHJiYhKqKJwROYowmoGRyG38cye9lek4=; b=ouD7AZD6pTneMVyd5d/AF9w4qom9qdcm5iVa8rgSlgZmCI2G8EHzQitJx/tku5nfY9 AbO87oLRNPNTTmtKvy5cwn344GTHjrekKERI+HFFJvNQnYf93JrmR/OacuK40ouM+i3y FnyWLCFjlxBzoJ2fmytGzfMet9xbjDUrJDMe6k3YOy9k1f5xkEbP9NSdDN4m1LyzFOVh 6M++k2rLQuA6CpUR/ajWKMLG9oE6tEc+DfjqIWB+kCFh37NLABh2TBgde/At8mDGFIIN Umi7ATrydS0G/9J2bDY8wgnbpJ+E1ICgHJ5tyAJ+ZiyUH4jHm4LbE3sWkWkBZUN4yDts Jj8Q== X-Gm-Message-State: AOAM531ISSnSJ3d2sPuxS9/IBy1vY7+w06coHFoAK2vi0+iJ8jbmGShz n7dks5mYSgaineLXeh+Kuon1pkf6/pd7+87u X-Google-Smtp-Source: ABdhPJyqabbY0J2ewYDvY5SXI4bIKi5qYlD68/sg3m435CHU1JYk/TdfVENPchAt/0NsWUmXwDj2Xg== X-Received: by 2002:adf:80e4:: with SMTP id 91mr795643wrl.223.1602610120882; Tue, 13 Oct 2020 10:28:40 -0700 (PDT) Received: from localhost.localdomain (26.165.185.81.rev.sfr.net. [81.185.165.26]) by smtp.gmail.com with ESMTPSA id c14sm315131wrv.12.2020.10.13.10.28.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Oct 2020 10:28:40 -0700 (PDT) From: Fabien Parent To: linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org Subject: [PATCH 2/2] drm/mediatek: mtk_hdmi: add MT8167 support for HDMI Date: Tue, 13 Oct 2020 19:28:32 +0200 Message-Id: <20201013172832.4055545-2-fparent@baylibre.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201013172832.4055545-1-fparent@baylibre.com> References: <20201013172832.4055545-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201013_132842_021304_2989780E X-CRM114-Status: GOOD ( 15.08 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:444 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: chunkuang.hu@kernel.org, daniel@ffwll.ch, airlied@linux.ie, Fabien Parent , p.zabel@pengutronix.de, matthias.bgg@gmail.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add support for HDMI on MT8167. HDMI on MT8167 is similar to MT8173/MT2701 execpt for the two registers: SYS_CFG1C and SYS_CFG20 Signed-off-by: Fabien Parent --- drivers/gpu/drm/mediatek/mtk_hdmi.c | 7 +++++++ drivers/gpu/drm/mediatek/mtk_hdmi_regs.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c index c70f195c21be..7762be5cb446 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c @@ -1835,9 +1835,16 @@ static struct mtk_hdmi_data mt8173_hdmi_driver_data = { .sys_cfg20 = HDMI_SYS_CFG20, }; +static struct mtk_hdmi_conf mt8167_hdmi_driver_data = { + .sys_cfg1c = MT8167_HDMI_SYS_CFG1C, + .sys_cfg20 = MT8167_HDMI_SYS_CFG20, +}; + static const struct of_device_id mtk_drm_hdmi_of_ids[] = { { .compatible = "mediatek,mt8173-hdmi", .data = &mt8173_hdmi_driver_data }, + { .compatible = "mediatek,mt8167-hdmi", + .data = &mt8167_hdmi_driver_data }, {} }; diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_regs.h b/drivers/gpu/drm/mediatek/mtk_hdmi_regs.h index 2050ba45b23a..a0f9c367d7aa 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi_regs.h +++ b/drivers/gpu/drm/mediatek/mtk_hdmi_regs.h @@ -195,6 +195,7 @@ #define GEN_RGB (0 << 7) #define HDMI_SYS_CFG1C 0x000 +#define MT8167_HDMI_SYS_CFG1C 0x800 #define HDMI_ON BIT(0) #define HDMI_RST BIT(1) #define ANLG_ON BIT(2) @@ -211,6 +212,7 @@ #define HTPLG_PIN_SEL_OFF BIT(30) #define AES_EFUSE_ENABLE BIT(31) #define HDMI_SYS_CFG20 0x004 +#define MT8167_HDMI_SYS_CFG20 0x804 #define DEEP_COLOR_MODE_MASK (3 << 1) #define COLOR_8BIT_MODE (0 << 1) #define COLOR_10BIT_MODE (1 << 1)