From patchwork Fri Jan 27 15:55:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume Ranquet X-Patchwork-Id: 13118900 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 4CDC8C54EAA for ; Fri, 27 Jan 2023 16:01:40 +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:Message-Id:Date:From:MIME-Version :Subject: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=yGrHsNsPpDseabLyxBnp6hEu+TRDeENbJE9LW+KZcsU=; b=fD6NIEaB/D0LrR QDBwyUIIzshkoxeHz2tRMmQufI4oFwLeVj56wEBNoSGCwVd6vxhdjJDFcxm3Za6WQrOSAgWksomRG cUWNH+g+ZN2KR8RpAonSzcq5bi/bAIF1TIeiDV//SEhY74b+v5NdVtOdK0KrJPA13mjnhPzHGgCdV UfsJNp5AQBC9dDnQBAybmj6/M3n7GV8tEW5spS3aylXOYJekCFyl/C/kAWsSueKmGURbq+1kiasM4 Hj5X7/jahQrtsMSAvt+xPyCQOoUZ1ooEweBj5bO5KWwFakhj2Np++HaJnpZVOFXO/rGRNYZojQzuH 4HefI90eItidAv4V9aVA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pLR9B-00FZ62-3i; Fri, 27 Jan 2023 16:00:13 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pLR90-00FYyq-4w for linux-arm-kernel@lists.infradead.org; Fri, 27 Jan 2023 16:00:04 +0000 Received: by mail-wr1-x432.google.com with SMTP id t18so5402315wro.1 for ; Fri, 27 Jan 2023 08:00:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=cc:to:message-id:date:from:content-transfer-encoding:mime-version :subject:from:to:cc:subject:date:message-id:reply-to; bh=6AO8Wz0u03xQDCdINgTFwoolBurWKDLddXY3VYk4B+s=; b=cfGKXGy6jB1Gr9nmWaUv+Q92QA2JF0D1vQTXYRo/qtQPv/n8CxDqky+m4f/LapHdaC V1H6DhAQlIXeBzAm3PE2aw//nLeTCUJLwvd9Zb/nqxpqUB2VLaDc4gWFSZGN1CaX9vXn Kjst7ZgC+IkK5tNM0K65qh9PPz0D//eYBHe1P7cJ9mAornRjtTprXTsVkKljVFY98SBy rXTbgO+7qMA6ll8zBqboocigNzUuLU2y9FyA57Kd5/mnCKwsktyt/xCsIFnEdVg/DEvI qzV2VhX9403CCxSVF7uSjnKS8Z6tyoB6B6vzJSjW67tlH/CBiRUgJstJRlu7rEY+N0+J SD5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:message-id:date:from:content-transfer-encoding:mime-version :subject:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6AO8Wz0u03xQDCdINgTFwoolBurWKDLddXY3VYk4B+s=; b=Nk+y2VKsLt/nvCotlQEhb3SgiKr4EWRtOpU71nuiM24WzVRtbXOSlcsh8KoOPTDIgM tTZOwi9mcBKEUiXy7wXJw67dFSpVXuwdeX3HT+K1H+0KP3MQyJBPVleEIz036REqU0aR y6XplRVNcIKl9RQ5wskw5b6NzXLkfB0ygWEDxSuRdAjuN7+EvgoZOEtIW94qwqIZ3qb0 HIt3tmTMIbqO64SOMJ7zv5c/kVH2KpyBwbwF4kc1w81Xdq8V/l/8emF6SKBj7qz/YFbP YlI65Lqq0xCVd0tKF2V+81KJH7rWIQH+aWnPbLGUKMRO4eAVZb1/rezpbpNwWEcCp9Ja LUEw== X-Gm-Message-State: AO0yUKXiDeCrQTE3qMS9mQZTY9EwK8JAi8XC0qfmbkaKUzvj7oDFnh6z hRtl0s354k7bcAkZYC5RH5N4RA== X-Google-Smtp-Source: AK7set85MlINC1wX4kubGlvrGJsyxc6hLXlmKS/ArhQuSin31sebkVDcYK0X3xLR5HCG9POJz7mtaw== X-Received: by 2002:a5d:6dd2:0:b0:2bf:b0e6:f463 with SMTP id d18-20020a5d6dd2000000b002bfb0e6f463mr11858738wrz.13.1674835199706; Fri, 27 Jan 2023 07:59:59 -0800 (PST) Received: from [127.0.0.1] ([2a01:cb19:85c2:1100:7fe1:513:212f:568e]) by smtp.gmail.com with ESMTPSA id b11-20020adfe30b000000b002bfcc940014sm3171942wrj.82.2023.01.27.07.59.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Jan 2023 07:59:59 -0800 (PST) Subject: [PATCH v5 0/3] Add MT8195 HDMI phy support MIME-Version: 1.0 X-b4-tracking: H4sIANvz02MC/23MTQrDIBAF4KsE17WosYl21XuUUvxLlSYGNBVCyN07dFOQrIb3eN9sKLsUXEbXZk PJlZDDHCFcTg0yXsWXw8FCRowwRiSV2NspPKfljWChVXZYJxWNh038jCOUPuRlTuvvY6Fw7n9cKCaY C84F7YwURNy0WsegkzubeUIP4IVVhAERnEprBj4QaQ9IW5EWiBKkHVjXEcr6A8IrwoFoaxh1tCW9kx XZ9/0LLLTAOysBAAA= From: Guillaume Ranquet Date: Fri, 27 Jan 2023 16:55:07 +0100 Message-Id: <20220919-v5-0-cfb0e5ad29b2@baylibre.com> To: Vinod Koul , Jitao shi , Kishon Vijay Abraham I , Daniel Vetter , Matthias Brugger , Chunfeng Yun , Chun-Kuang Hu , Krzysztof Kozlowski , David Airlie , Philipp Zabel , Rob Herring , CK Hu Cc: linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, mac.shen@mediatek.com, Krzysztof Kozlowski , linux-phy@lists.infradead.org, Guillaume Ranquet , devicetree@vger.kernel.org, AngeloGioacchino Del Regno , stuart.lee@mediatek.com X-Mailer: b4 0.11.0-dev X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230127_080002_227324_9DD833A4 X-CRM114-Status: GOOD ( 14.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add support for HDMI phy on MT8195. This is split from the previous v3 to contain only the phy related changes to the HDMI support for mt8195 as suggested by Vinod. This is based on top of next-20221121 To: Chunfeng Yun To: Kishon Vijay Abraham I To: Vinod Koul To: Rob Herring To: Krzysztof Kozlowski To: Matthias Brugger To: Chun-Kuang Hu To: Philipp Zabel To: David Airlie To: Daniel Vetter To: CK Hu To: Jitao shi Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Cc: linux-phy@lists.infradead.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Cc: AngeloGioacchino Del Regno Cc: mac.shen@mediatek.com CC: stuart.lee@mediatek.com Signed-off-by: Guillaume Ranquet --- Changes in v5: - Adapt clock bit ratio when TMDS is over 340M - Used sized integers for register read/writes - Removed useless comments - Shortened function names - 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 | 523 +++++++++++++++++++++ drivers/phy/mediatek/phy-mtk-hdmi-mt8195.h | 111 +++++ drivers/phy/mediatek/phy-mtk-hdmi.c | 15 + drivers/phy/mediatek/phy-mtk-hdmi.h | 3 + 6 files changed, 654 insertions(+) --- base-commit: e2f86c02fdc96ca29ced53221a3cbf50aa6f8b49 change-id: 20220919-hdmi_mtk Best regards,