From patchwork Tue Dec 29 13:58:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 1421210 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=zVyKB2tz; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D4wyv1LyVz9sVv for ; Wed, 30 Dec 2020 00:59:40 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8E9E582496; Tue, 29 Dec 2020 14:59:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="zVyKB2tz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1875382573; Tue, 29 Dec 2020 14:59:23 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A21FB81260 for ; Tue, 29 Dec 2020 14:59:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=narmstrong@baylibre.com Received: by mail-wm1-x334.google.com with SMTP id v14so2656254wml.1 for ; Tue, 29 Dec 2020 05:59:05 -0800 (PST) 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:mime-version :content-transfer-encoding; bh=TQaG2bavhs7h//ycYUz/5MmeRjujEo/b2b1EG5zQfHU=; b=zVyKB2tzuze2b5H7AitqmNERe10MEw0GU3BhHqqhJvzikBLedN6iieR+Xk/smZ2oT4 NFD5I3ekQgIyeLD+0d1ZNri/LUrh6qvt3WQkXqDBl431U9iL0es8ymPaoKj+pKoN5ZgM IZQuNQpO3QYU9tfC9T4LUd+gLwZK91+aIll+SLe/oKS1pzwgFUjg2AecJwrQ/8aaYTbQ wvHZ/0oepLgUEJFjB681G36LqmPRDrQFGVbnsEOk+ijM8DwpHu4sDk1XFTGWAhoGHX7K NBjTwTBY+mXEjgCzM8lVpfbum5E9iBtcpQYL+rRMjlFWpi8aG6/J0W2gd4g6cWVJsWSQ JR5w== 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:mime-version :content-transfer-encoding; bh=TQaG2bavhs7h//ycYUz/5MmeRjujEo/b2b1EG5zQfHU=; b=P97zifX0aRHhLV/1pEVsFC48Geako9jnbFmjA/xijP8MCGxD5LLeC+QKrmaGUHBVX5 AOzgLnx/+m/HwL4+7WX+6T/jRamyT6q44gvrWyCCL7RT9TB/TRaJeU/j2B8WmfC6ndpK 507fatM73NpeOyaPJtllAo0mp55JW5blKOV2td2DOvQ4IgHYHYqSiWtmJ4kGblc//C8f OxYaWygY89pALZ0oBQe5XwwPQ57z+lvqt1yo73h/75e/bBNCWH/oKWWfIESmFZ3TsGox NaFwLwDW2smXSqgdBtKKKn+siuDh8hsB8Cq6iYiYSP2p+QieHvyd8Y0oaCbdy3W5WRn+ nN3A== X-Gm-Message-State: AOAM533Xdkl5nEQrNCbScV3bgMWz9S8s4wiXh23gR4jQkyWWSCAIYge9 UOclfYsRwJrTR32hkNUGWPImqxnVpu53rQ== X-Google-Smtp-Source: ABdhPJwFUlCQ764pSEF9HM79Nbq/C4uNqEsdVqS3FH85kRTlLVPYhxSlTYkd7gBldqKjUUYefADGmw== X-Received: by 2002:a7b:c3d6:: with SMTP id t22mr3716283wmj.134.1609250344689; Tue, 29 Dec 2020 05:59:04 -0800 (PST) Received: from localhost.localdomain ([2a01:e35:2ec0:82b0:2464:c563:b017:7ce1]) by smtp.gmail.com with ESMTPSA id z22sm3666950wml.1.2020.12.29.05.59.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Dec 2020 05:59:03 -0800 (PST) From: Neil Armstrong To: u-boot@lists.denx.de, sjg@chromium.org Cc: u-boot-amlogic@groups.io, Neil Armstrong Subject: [PATCH 0/4] phy: add support for Amlogic Meson AXG MIPI-DSI PHY function Date: Tue, 29 Dec 2020 14:58:57 +0100 Message-Id: <20201229135901.30090-1-narmstrong@baylibre.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean The Amlogic AXg SoCs embeds a MIPI D-PHY to communicate with DSI panels, this adds the bindings. This D-PHY depends on a separate analog PHY. The Amlogic AXG MIPI + PCIe Analog PHY provides function for both PCIe and MIPI DSI at the same time. In order to configure the DSI PHY timings, a new "configure" PHY op is added to permit dynamic (re)configuration of the PHY function. Finally, the Linux MIPI D-PHY configuration helpers are imported to provide a standard set of default D-PHY timings, timings struct and correct calculations. Neil Armstrong (4): phy: dphy: Add configuration helpers generic-phy: add configure op phy: Add Amlogic AXG MIPI D-PHY driver phy: Add Amlogic AXG MIPI PCIe Analog PHY driver drivers/phy/Kconfig | 23 ++ drivers/phy/Makefile | 3 + drivers/phy/meson-axg-mipi-dphy.c | 393 +++++++++++++++++++++++ drivers/phy/meson-axg-mipi-pcie-analog.c | 233 ++++++++++++++ drivers/phy/phy-core-mipi-dphy.c | 161 ++++++++++ drivers/phy/phy-uclass.c | 11 + include/generic-phy.h | 23 ++ include/phy-mipi-dphy.h | 284 ++++++++++++++++ 8 files changed, 1131 insertions(+) create mode 100644 drivers/phy/meson-axg-mipi-dphy.c create mode 100644 drivers/phy/meson-axg-mipi-pcie-analog.c create mode 100644 drivers/phy/phy-core-mipi-dphy.c create mode 100644 include/phy-mipi-dphy.h