Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp622371pxu; Wed, 14 Oct 2020 09:29:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJSsetcDznriigq+zN/GgTOKXf05ExpcCz64VVZTgHmcFjDSu+1HvmXGeEtG3ZfxEztTQJ X-Received: by 2002:a05:6402:2214:: with SMTP id cq20mr6002056edb.311.1602692960691; Wed, 14 Oct 2020 09:29:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602692960; cv=none; d=google.com; s=arc-20160816; b=c9t5OeY27411taoH6WAI7dbm9Qq2+QcVugpE5sibhlcm/4J4U9qHhsQnrBqGBDHTI2 g+0U6eVItAtjICDs4VwTiqdKnMhbDROriZhnUQJchOHEsSxQRMk3dc5+OOlXI8TK3hWN 73vBYzNL+Bb2MquqWAdAab9upgj0z+MReK3DVaWRK6ppBAYf0IR4XlqqaNudUwq6N1bz MZb80e8Bgwi8vgTy96lrm1cSLMaUyiLTnBJWXiS020SXnBLDp94dqPF2ryDOA8l4DXdR meL0yCBhAxYplTO2top/80IEr6G+Ylr/97qpVMF5BrkqT84Zi5rGUhCXxHt5TvttRP7d Z4eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=7kB3Gwtf/E3DxkDVy/0l62hrnMHjwOMwwyhyoEHtDaE=; b=rnZ6cT6Rng8F0JLlbV9HZHf963y1MfWfsMMxFfiV5cZITUImBPhHS/k4UCLanpTvD4 fq8MfYdjk6JYh1u1UULr7YgzxR7xJWIy1kuVbKJIkAO09KJ0C02qXiyM2erpsbnv7wBX 5I0ryYSLwpWlzXX7kBuxCxalD3Yo7NAKmaxIv14z6tf9SfSzXSS0X2yjnoH29iZhL/DQ z1aSLti0ommam1bEx1QnOOb29kollmdTp+Y1ZeDRzrIAnRm3c9PLW+9eQQFi4FMX2awy 0c5ImAa0a337H3WmzI2WNjIecxkiTUoIUh+9iE6zlycl2zwXAYbToTDwIswVogKL7SA0 p5yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fLBWb4iD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y7si116345ejd.450.2020.10.14.09.28.57; Wed, 14 Oct 2020 09:29:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fLBWb4iD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730905AbgJNNAM (ORCPT + 99 others); Wed, 14 Oct 2020 09:00:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:48462 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727187AbgJNNAM (ORCPT ); Wed, 14 Oct 2020 09:00:12 -0400 Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A1D3E2173E for ; Wed, 14 Oct 2020 13:00:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602680411; bh=EjQyMXBgmkGopUQIOpSQ0qJ6aFXvAlg6I7g92NkSgMQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=fLBWb4iDrpBUKe6rxTTtf70Eda3+Q02E2x6UnykIAPRRGz17bipaL0LMokMsx7Hsn XSss2EcKy7Wg9vQcmOrQPyfZJj6y+jF9GSwl8qWWWzNNfZBONfVakXBt1e7ETe7WZK klZDLKm6mkfNyobaMG16UmAXDuZBsz5C46GdbmMs= Received: by mail-ed1-f50.google.com with SMTP id p13so3014712edi.7 for ; Wed, 14 Oct 2020 06:00:10 -0700 (PDT) X-Gm-Message-State: AOAM532sbmVQyygcsbsE+MIKaLiHoJW7CK3aZR6cCmzCw0lN2vjFfVwL 8S9mU0SZ+3wJLiZsBr85oWRIE+W2YnDi33ETjQ== X-Received: by 2002:aa7:c3ca:: with SMTP id l10mr5129675edr.72.1602680409031; Wed, 14 Oct 2020 06:00:09 -0700 (PDT) MIME-Version: 1.0 References: <20201013181924.4143303-1-fparent@baylibre.com> <20201013181924.4143303-2-fparent@baylibre.com> In-Reply-To: <20201013181924.4143303-2-fparent@baylibre.com> From: Chun-Kuang Hu Date: Wed, 14 Oct 2020 20:59:55 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 2/2] drm/mediatek: mtk_hdmi: add MT8167 support for HDMI To: Fabien Parent Cc: linux-kernel , "moderated list:ARM/Mediatek SoC support" , Linux ARM , DRI Development , Matthias Brugger , Daniel Vetter , David Airlie , Philipp Zabel , Chun-Kuang Hu Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Fabien: Fabien Parent =E6=96=BC 2020=E5=B9=B410=E6=9C=8814= =E6=97=A5 =E9=80=B1=E4=B8=89 =E4=B8=8A=E5=8D=882:19=E5=AF=AB=E9=81=93=EF=BC= =9A > > Add support for HDMI on MT8167. HDMI on MT8167 is similar to > MT8173/MT2701 execpt for the two registers: SYS_CFG1C and SYS_CFG20 I think you should drop this series. According to Mediatek HDMI binding document [1], the second parameter of mediatek,syscon-hdmi is the register offset. I think you could set register offset to 0x800 for mt8167. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree= /Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.txt?h=3Dv= 5.9 Regards, Chun-Kuang. > > 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/mediat= ek/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_dat= a =3D { > .sys_cfg20 =3D HDMI_SYS_CFG20, > }; > > +static struct mtk_hdmi_data mt8167_hdmi_driver_data =3D { > + .sys_cfg1c =3D MT8167_HDMI_SYS_CFG1C, > + .sys_cfg20 =3D MT8167_HDMI_SYS_CFG20, > +}; > + > static const struct of_device_id mtk_drm_hdmi_of_ids[] =3D { > { .compatible =3D "mediatek,mt8173-hdmi", > .data =3D &mt8173_hdmi_driver_data }, > + { .compatible =3D "mediatek,mt8167-hdmi", > + .data =3D &mt8167_hdmi_driver_data }, > {} > }; > > diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_regs.h b/drivers/gpu/drm/m= ediatek/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) > -- > 2.28.0 >