From patchwork Mon Feb 13 11:33:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume Ranquet X-Patchwork-Id: 13138284 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 513DEC636D4 for ; Mon, 13 Feb 2023 11:38:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:MIME-Version:Message-Id:Date: Subject: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=aKFVUj+EWE5ZzsnC8UMgxFPz+24ddGqOeBCKG7drvaI=; b=gt/DAERebeJf0h g0iImYHNySipWWYBTeeIHRiC7vF8mW0/PqcCH6H4ReFH8RO5Cu4cu0cc5l6IUZO/uXSI9BpEPGowz ehmH5tWPHmLXzq08x9TFkwmz5tOp5+ZH+6JooQwrPc8Qc9Zp5UlRzij0j3FXUzsvNIRG81VysImYk iuxP1FNlltHIhwszrIm07Cn4E20rijoMr2rPzBXOJFgYSnLg848Mj4s443LLXULOlGJX2n+0360g+ YM+/ZFggkusqgXPIHNivpaS5Tt02Faxh3+Iq42pViSwEa8B8HjZWfkHyMnJyJJob6IJRMDHg4e1ml wHSx0ezoNMB7getlKt5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRXAU-00ESwj-C1; Mon, 13 Feb 2023 11:38:46 +0000 Received: from mail-ej1-x642.google.com ([2a00:1450:4864:20::642]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRXAQ-00ESsa-LR for linux-phy@lists.infradead.org; Mon, 13 Feb 2023 11:38:44 +0000 Received: by mail-ej1-x642.google.com with SMTP id ml19so31242888ejb.0 for ; Mon, 13 Feb 2023 03:38:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=+/90RUFFsyhxTIlGFCCXSL5k3Rb6p3EDGwQoGJDsxy0=; b=AAsSe626xpvEag3aibZRY1D+gnpLWbu/ZJLqDdAtfuLJy09JbPa0xddFDrF/lPUYp4 3Ad1KKUuqB907OPF0yodBzJWSGLJsfXuu5nuda6vLKFaqHIILotS0u0jZrhkB4m9qYWW g5CucycFXxWcZVEqxmj/0JdOFWmbxFlGavWcQ5rLpE7seNNT8V5DTP/g4cxiOwqS7vKn wv7ktizk2yPOYab5qrkhxgHXvx1momWjjOUrd2bnsH6sSE6Aci+PS+9eUHpHrnAES4pP s+jQLtdViE+8izHVfd231Bd1FhiPJ7edh65G+kEUYtdDpa1xMr5kx5516/4rWBOYn7e1 sNbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+/90RUFFsyhxTIlGFCCXSL5k3Rb6p3EDGwQoGJDsxy0=; b=k44OLCuWKFEukXRgPavaGE1px+KM3TKg0EWpMKYDv1zVF2ZZN8q8SHfJyg+cKnKzg/ 3vCbGwVh91u2umqidcoxEtfoEIXxE2D9OA9ZFu/y+AF3x3uLvSgV+DwZLjgUJPWOpItJ IgSyWXN88PjSNcvwQCjMo0rfPMu7n8yT65y6ZS5CrvAV2H1j4MwZ4FM8Fszau6RTkAq4 WCwjmhxpII4+g4Q1+wOZYMFYbIBsr6sookBkL5M9tDe8LdnqvPVFsKlm4+yQpuquNuSh EwXLMvmRCHGPkwMJmA+WkEVcrqJMPu96UyBLjPePmzxFtCRCdLffwf2sV8hdFw9FqNvu shYw== X-Gm-Message-State: AO0yUKVTQ0c53+ib8jtyjgZCUY2Ef4c7M1bgtagxgP908osNtNOph3by Qr9Jm3f4h8/DxhFb6uFThoLneA== X-Google-Smtp-Source: AK7set+DHNqIFOpozfBDldGxHMxVi/rXTgwwL0gV7IG1EfsqnQE7FkA4BM7FFcwSalBd3dxTJFcGrw== X-Received: by 2002:a17:906:4413:b0:878:673f:5492 with SMTP id x19-20020a170906441300b00878673f5492mr23699631ejo.40.1676288319630; Mon, 13 Feb 2023 03:38:39 -0800 (PST) Received: from [127.0.0.1] (2a02-8440-d206-ae05-3074-96af-9642-0003.rev.sfr.net. [2a02:8440:d206:ae05:3074:96af:9642:3]) by smtp.gmail.com with ESMTPSA id s20-20020a170906061400b0088ba2de323csm6638792ejb.181.2023.02.13.03.38.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 03:38:39 -0800 (PST) From: Guillaume Ranquet Subject: [PATCH v7 0/3] Add MT8195 HDMI phy support Date: Mon, 13 Feb 2023 12:33:31 +0100 Message-Id: <20220919-v7-0-b5b58c5ccc07@baylibre.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAAsg6mMC/23My2rDMBAF0F8JWldFGo1lKav+RwlFz1rUD5ASQ wj+9w7dFIRXw73cMy/WUi2psevlxWraSyvbSmF8u7AwufU78RIpMxAAwkrLp7iUr+X+w2jhXUv cV7eGiTbrY56pnEq7b/X593GXdD7/8S654GgQjdTBGmE+vHvOxdf0HraF3Yjv0BEgYlDaGDJmY eMJUR1RRJwRKoPWQsJ4QrAjSMTHADJJJcZkT8jQkYFIVqgR0QcczojuiCYCWaMMCBC87shxHL9 fFxI9kQEAAA== To: Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Chun-Kuang Hu , Philipp Zabel , David Airlie , Daniel Vetter , CK Hu , Jitao shi Cc: linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski , AngeloGioacchino Del Regno , mac.shen@mediatek.com, stuart.lee@mediatek.com, Guillaume Ranquet X-Mailer: b4 0.13-dev X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230213_033842_710018_51107D41 X-CRM114-Status: GOOD ( 11.55 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Add support for HDMI phy on MT8195. This is based on top of next-20230213 Signed-off-by: Guillaume Ranquet --- Changes in v7: - Removed lkp reported-by trailer - Fixed checkpatch --strict warnings/checks (besides two lines at 102 chars instead of 100) - Used constants where applicable as suggested by Vinod in v6 review - Link to v6: https://lore.kernel.org/r/20220919-v6-0-2f641c422cb6@baylibre.com Changes in v6: - Adapt clock bit ratio when TMDS is over 340M - Used sized integers for register read/writes - Removed useless comments - Shortened function names - Link to v5: https://lore.kernel.org/r/20220919-v5-0-f346444bc459@baylibre.com Changes in v5: - Fix compilation errors on 32 bits platform with no support for __udivdi3. Compile tested on mips with gcc-12 - Link to v4: https://lore.kernel.org/r/20220919-v4-0-bdc21e1307e9@baylibre.com Changes in v4: - Dedicated series for HDMI phy support (without the drm/ related changes) - Removed useless variable initializations in phy driver - Link to v3: https://lore.kernel.org/r/20220919-v3-0-a803f2660127@baylibre.com Changes in v3: - phy: Grouped register and bit definition together to add clarity - dt-bindings: Addressed comments - Link to v2: https://lore.kernel.org/r/20220919-v2-0-8419dcf4f09d@baylibre.com Changes in v2: - Removed syscon requirement from the hdmi node - Use as much as possible bit FIELD_PREP/FIELD_GET macros across all the patches - Make cec optional dynamically instead of hardcoded with a flag - Renamed hdmi variants to v1 (legacy) and v2 (mt8195) while waiting for a better name - Rework hdmi v2 code to use a connector (same as v1) - Remove "magic" 0x43 addr special handling in hdmi ddc code - Link to v1: https://lore.kernel.org/r/20220919-v1-0-4844816c9808@baylibre.com --- Guillaume Ranquet (3): dt-bindings: phy: mediatek: hdmi-phy: Add mt8195 compatible phy: phy-mtk-hdmi: Add generic phy configure callback phy: mediatek: add support for phy-mtk-hdmi-mt8195 .../devicetree/bindings/phy/mediatek,hdmi-phy.yaml | 1 + drivers/phy/mediatek/Makefile | 1 + drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c | 509 +++++++++++++++++++++ drivers/phy/mediatek/phy-mtk-hdmi-mt8195.h | 113 +++++ drivers/phy/mediatek/phy-mtk-hdmi.c | 15 + drivers/phy/mediatek/phy-mtk-hdmi.h | 3 + 6 files changed, 642 insertions(+) --- base-commit: 09e41676e35ab06e4bce8870ea3bf1f191c3cb90 change-id: 20220919-hdmi_mtk Best regards,