From patchwork Mon Nov 28 16:17:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume Ranquet X-Patchwork-Id: 629044 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 109DBC4332F for ; Mon, 28 Nov 2022 16:21:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232678AbiK1QVv (ORCPT ); Mon, 28 Nov 2022 11:21:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232638AbiK1QVs (ORCPT ); Mon, 28 Nov 2022 11:21:48 -0500 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BD372098B for ; Mon, 28 Nov 2022 08:21:45 -0800 (PST) Received: by mail-wm1-x329.google.com with SMTP id j5-20020a05600c410500b003cfa9c0ea76so8761176wmi.3 for ; Mon, 28 Nov 2022 08:21:45 -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=qSSoTx14sBp+/R1ydiiF1swCqSgaAAS/RFqYam0nfSU=; b=ZRTwWarpwcayUpxJzRgrtg4c2XeVGb8nNkmkJpweInvESpP+xnjVD5+zc6XPcNdJuk bLgAxlNyOF62cELMAOEXshJGz+umN6jXAi6oAT8mn/aOmpf6/NWXGT6QPL232LuZa8hN F4LgeVs8+o62iVrSblFGUjzpEI8cIJN2Q+YCWrIZG/RkXVoZR/JmczlZw8csUdTor4kM EARazyWEzsNL95/hDGJwU9esHcg7DWnWWKdH+RZNDpIzRWvmZk19NNGadZQBdFXuQ9S2 gtKxALKXbg/izfheP+Sf+99Idmvqe/ZaiSCOP57u5AslA36kaG7miO8cD6XIDuw0agqu KIGw== 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=qSSoTx14sBp+/R1ydiiF1swCqSgaAAS/RFqYam0nfSU=; b=2g3hDq4kMDMe+iEklKzraxMqyuif1WPahEzSFs1kSYrVBv9oVZlnWW3NRGk4DtU96I YYKdT5xo2G6mGBjUSxSAHtS5iPIqMKSOZDZp1LMKCcNgzwygFt0GFDpms+cdmx8tk+kB nst0dBWfb0cnNswnNRXcnmQex5tzEcplU9C0EDfD1bYSvOOsxhqxEyWDGL+So7xsUuLE dldWeKX0Fg9lI+O4S9J1QfGcdKSSYXezK2HY14mh5CYj+Dp48zHd/NQ4xi6n51AiwcWs hBKqb2eC7ENj0RJhAnPMGfPHBJoWjbgUj3xfHqTneCxMDi9i/G33eXllePmqhMFov0+j PNCQ== X-Gm-Message-State: ANoB5pl+zsTwERgU17IiIDoLSZ0aSKqhu1FTbBDcndQgnFtA5cg6yle3 adHSR4gXZ76bDF/iWdKgEl+RLA== X-Google-Smtp-Source: AA0mqf7fGwMzUE1Ciq26LwjSbLIj1HTemOv/bJvoR+I2TGq+pQY37aZ4UVpsafa/xFsvjuhDAYgJBQ== X-Received: by 2002:a05:600c:4fd0:b0:3cf:70a0:f689 with SMTP id o16-20020a05600c4fd000b003cf70a0f689mr42860114wmq.161.1669652503650; Mon, 28 Nov 2022 08:21:43 -0800 (PST) Received: from [127.0.0.1] (2a02-8440-6340-f657-3074-96af-9642-0003.rev.sfr.net. [2a02:8440:6340:f657:3074:96af:9642:3]) by smtp.gmail.com with ESMTPSA id s10-20020a1cf20a000000b003cfe1376f68sm15311450wmc.9.2022.11.28.08.21.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Nov 2022 08:21:43 -0800 (PST) Subject: [PATCH v5 0/3] Add MT8195 HDMI phy support MIME-Version: 1.0 X-b4-tracking: H4sIAB/fhGMC/23MTQrDIBAF4KsE17WosYl21XuUUvxLlSYGNBVCyN07dFOQrIb3eN9sKLsUXEbXZk PJlZDDHCFcTg0yXsWXw8FCRowwRiSV2NspPKfljWChVXZYJxWNh038jCOUPuRlTuvvY6Fw7n9cKCaY C84F7YwURNy0WsegkzubeUIP4IVVhAERnEprBj4QaQ9IW5EWiBKkHVjXEcr6A8IrwoFoaxh1tCW9kx XZ9/0LLLTAOysBAAA= From: Guillaume Ranquet Date: Mon, 28 Nov 2022 17:17:35 +0100 Message-Id: <20220919-v5-0-f346444bc459@baylibre.com> To: Chunfeng Yun , Krzysztof Kozlowski , David Airlie , Matthias Brugger , Philipp Zabel , Rob Herring , Kishon Vijay Abraham I , Daniel Vetter , Vinod Koul , Chun-Kuang Hu , CK Hu , Jitao shi Cc: mac.shen@mediatek.com, Guillaume Ranquet , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, stuart.lee@mediatek.com, kernel test robot , linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, AngeloGioacchino Del Regno , linux-mediatek@lists.infradead.org X-Mailer: b4 0.11.0-dev Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add support for HDMI phy on MT8195. This is based on top of next-20221128 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: - 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 | 527 +++++++++++++++++++++ drivers/phy/mediatek/phy-mtk-hdmi-mt8195.h | 111 +++++ drivers/phy/mediatek/phy-mtk-hdmi.c | 15 + drivers/phy/mediatek/phy-mtk-hdmi.h | 2 + 6 files changed, 657 insertions(+) --- base-commit: 15f2f20ccbf2d04cb14e3e7635aa0447208c71e7 change-id: 20220919-hdmi_mtk Best regards,