From patchwork Tue Oct 13 18:19:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 11836039 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 998301130 for ; Tue, 13 Oct 2020 18:19:52 +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 69AFB208D5 for ; Tue, 13 Oct 2020 18:19:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JOiP6dpN"; 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="XaJ/M1ab" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 69AFB208D5 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=i5/dmUokZHBmR5vaAmmqd3VLHTuWxUh/YVwBg4VEAGw=; b=JOiP6dpNk1lMYhkn3IFfiPHn4 bGHgKm6Rxofy8kQVAcbQALAlci6UbTRxwaVjRQzYnbKj/n58bBm9Qc/7Qz1Ebg20yQQdm7r7qJvV3 kEsAm64BN9BqQeTZe89E8bMXwWrWGZhtJwUuTPLE3CfPSr1nwjMcVxHU61i1jhcr5CiWL3gLRYKk0 IqMOHR+b7r7A9zg/GDr3PHYeRFDqZFTOckWodqeDS55xeo95Iohfk+LOjDMJet31eFtrjmEsPm6EM GwntzcYxY+KgPGbchOHtQ3TLij0/ikSVv7RPLzktk7Wt2bLEG/THuLq8m3bYI1Wcph0oUMRYdixSB UXOMfwing==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSOth-00007v-Kj; Tue, 13 Oct 2020 18:19:41 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSOte-00006Z-7b for linux-arm-kernel@lists.infradead.org; Tue, 13 Oct 2020 18:19:39 +0000 Received: by mail-wr1-x441.google.com with SMTP id e18so427384wrw.9 for ; Tue, 13 Oct 2020 11:19:38 -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=DtmadPtoPcokiIT8ReATg1pXkhzL2SuRBo5LddIMSVk=; b=XaJ/M1ab0sb3wmangM5YA2nqcNI4cEEK4J6J89RdjZa7KK4sbY6rvX6VV/uDqCY7eO BprKBVKFXAG30XVHwS7YwvDUaWfw0dXOKYgetZjYxpT/n+Ia5D7O55KZihuxApT5Pyki sbzNbcI3uvDJ1ZBR/KYTICZUnQS/SlRcHS2ZEM/N2HSx665DzSjuHKS7vc8cWnrAYct8 SbiI2gfLvKdP5sLgqQkcgjoxbuFtBm2XSjhdOeuz/kSJa1/HQIiF84fRT+s+N35dz+dn Bl/jOSnjWmGuofs/y0yw1TpV3mHyL/6vgt+zExdqElnlh3fGLf8nFLMl9Vf6SuTYbn3h SIqQ== 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=DtmadPtoPcokiIT8ReATg1pXkhzL2SuRBo5LddIMSVk=; b=sY8e8ACMrIgjzB++Ob0wNUk1+25GCDTyY6+CEsvsQoyOYWDwtOJPYl25j24mGWf6+V unzyzBBMlKckAfUW6OsGU5s6ugGbHGLG/1grZRSS4g3S/9yv/kO2+utPYP6yczK9MJH3 aZAZFpvQwWhXU1iLQymAaldPkv/S2HZPH51I9Rtqei+chxi8qs8bTGDaZhoiRM0z4ix1 EWKy265JzjCNBVVWw/dQoqUsWdTXKeSXDROLa655kCYZjtcjmpAhHMOefjyXHFl90Ln5 V+B7UPOcJ4dDjmiBMyHD9/8mR7Ogn4B3iIgAW9MwtzXsvLCG11UuMm2mRIOjgzz/9phN upsA== X-Gm-Message-State: AOAM5331URe3fmSGeUy/hyDh+NovXnx2DLQHjBlnpqbhsSsAcc4DWgI+ ChLKIHinnblfsW3TZV6L3rAM+V7nN0OSL10O X-Google-Smtp-Source: ABdhPJyYKFgxPBtvreY/bLMuxhTn3K88Do7E39RQO4MJweOu72cwzI7cuyOtwYsoYixEPS6WFk3dGg== X-Received: by 2002:adf:8541:: with SMTP id 59mr1042100wrh.61.1602613177428; Tue, 13 Oct 2020 11:19:37 -0700 (PDT) Received: from localhost.localdomain (26.165.185.81.rev.sfr.net. [81.185.165.26]) by smtp.gmail.com with ESMTPSA id w11sm490261wrs.26.2020.10.13.11.19.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Oct 2020 11:19:36 -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 v2 2/2] drm/mediatek: mtk_hdmi: add MT8167 support for HDMI Date: Tue, 13 Oct 2020 20:19:24 +0200 Message-Id: <20201013181924.4143303-2-fparent@baylibre.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201013181924.4143303-1-fparent@baylibre.com> References: <20201013181924.4143303-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_141938_327825_845473B9 X-CRM114-Status: GOOD ( 15.34 ) 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:441 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 --- Changelog: v2: fix name of pdata structure 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 57370c036497..484ea9cd654a 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_data 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)