Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3572347imm; Wed, 5 Sep 2018 02:20:19 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYKu1DPkj5l4zM9m10URw8xgmr4QpRUedJK4M8F+OONat2bhOYjE9Em9M1w3SaIVv4Ft76j X-Received: by 2002:a63:5e45:: with SMTP id s66-v6mr35274055pgb.151.1536139219047; Wed, 05 Sep 2018 02:20:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536139218; cv=none; d=google.com; s=arc-20160816; b=GqqZk6PCpcGDAtZM9GnCcj4pbrqHMK0thUvAC49wgilDSG8rr0wBYU4SOKtq7qJ6dR QTNhsDiXC/JnnTQt6QnZhBQfxsiMfVybVyPnJyIv+9rddTJyereQReVrfVusZREaTXJW QMSS+KQpDS45rIhJcYzkvKBIjvGk1sMEaXRKlwqCU1MImTECIN/sA1kAG2JibM3D4vdf i0DZ14icwEynY6YOcOFPGic7NlBdvpv2GKc69E4yuiozxccKFo1LGLtLAgHQXlFmCHfM jZBmzvmkCzAdmF6ZmftCP1+IARl5sAH06c0Rs2F3cEZ5VAqaTBNLbNCkw0gFs8ICRodm 8GeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=dppv4WWrNSd3sHaR8VGQJJwuTwpVxZQmGim8vvpvv1Y=; b=0tkVy7GFZ3Wq/BW3gKU7k0lremtJ1zVO4C9L08Tg8WpKSWBTu7291SxP2h+P7DytDH m2RSYatiyqTF3I6eDRIGPFgUJBt1Kj9Y6AZ7QH0ySwW9xE4QFcK2Bgxoc8+ZShTI0nKE 5yWdPNs+iFveUe8trAyM/RboZxVSl3+kwOTwGS11QHIMVBu71IVWnE9O4hzgfkMcPAYr k8Sjr7MwYYY1qOBn8V8ZKTBGR1t9Wjo6r6LgdO+nVo0SvDRtTUETCfXn4DYzM45g+I62 Um7w+BSWq3GsQefiZY9U+ppus7ArsDKnwLPifNjIy9MPKntx/Shxp3ZbwDJSdG5opxpa 3V1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w14-v6si1481608pgc.527.2018.09.05.02.20.03; Wed, 05 Sep 2018 02:20:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727965AbeIENqL (ORCPT + 99 others); Wed, 5 Sep 2018 09:46:11 -0400 Received: from mail.bootlin.com ([62.4.15.54]:39597 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725862AbeIENqL (ORCPT ); Wed, 5 Sep 2018 09:46:11 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 8D2C520812; Wed, 5 Sep 2018 11:16:53 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (AAubervilliers-681-1-92-107.w90-88.abo.wanadoo.fr [90.88.33.107]) by mail.bootlin.com (Postfix) with ESMTPSA id 587EC20618; Wed, 5 Sep 2018 11:16:43 +0200 (CEST) From: Maxime Ripard To: Kishon Vijay Abraham I , Boris Brezillon Cc: Thomas Petazzoni , Laurent Pinchart , linux-media@vger.kernel.org, Archit Taneja , Andrzej Hajda , Chen-Yu Tsai , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Krzysztof Witos , Rafal Ciepiela , Maxime Ripard Subject: [PATCH 00/10] phy: Add configuration interface for MIPI D-PHY devices Date: Wed, 5 Sep 2018 11:16:31 +0200 Message-Id: X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Here is a set of patches to allow the phy framework consumers to test and apply runtime configurations. This is needed to support more phy classes that require tuning based on parameters depending on the current use case of the device, in addition to the power state management already provided by the current functions. A first test bed for that API are the MIPI D-PHY devices. There's a number of solutions that have been used so far to support these phy, most of the time being an ad-hoc driver in the consumer. That approach has a big shortcoming though, which is that this is quite difficult to deal with consumers integrated with multiple variants of phy, of multiple consumers integrated with the same phy. The latter case can be found in the Cadence DSI bridge, and the CSI transceiver and receivers. All of them are integrated with the same phy, or can be integrated with different phy, depending on the implementation. I've looked at all the MIPI DSI drivers I could find, and gathered all the parameters I could find. The interface should be complete, and most of the drivers can be converted in the future. The current set converts two of them: the above mentionned Cadence DSI driver so that the v4l2 drivers can use them, and the Allwinner MIPI-DSI driver. Let me know what you think, Maxime Maxime Ripard (10): phy: Add MIPI D-PHY mode phy: Add configuration interface phy: Add MIPI D-PHY configuration options phy: dphy: Add configuration helpers sun6i: dsi: Convert to generic phy handling phy: Move Allwinner A31 D-PHY driver to drivers/phy/ drm/bridge: cdns: Remove mode_check test drm/bridge: cdns: Separate DSI and D-PHY configuration phy: Add Cadence D-PHY support drm/bridge: cdns: Convert to phy framework drivers/gpu/drm/bridge/cdns-dsi.c | 506 ++------------------- drivers/gpu/drm/sun4i/Kconfig | 3 +- drivers/gpu/drm/sun4i/Makefile | 5 +- drivers/gpu/drm/sun4i/sun6i_mipi_dphy.c | 292 +------------ drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 30 +- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h | 17 +- drivers/phy/Kconfig | 9 +- drivers/phy/Makefile | 2 +- drivers/phy/allwinner/Kconfig | 12 +- drivers/phy/allwinner/Makefile | 1 +- drivers/phy/allwinner/phy-sun6i-mipi-dphy.c | 322 +++++++++++++- drivers/phy/cadence/Kconfig | 13 +- drivers/phy/cadence/Makefile | 1 +- drivers/phy/cadence/cdns-dphy.c | 499 +++++++++++++++++++++- drivers/phy/phy-core-mipi-dphy.c | 160 +++++++- drivers/phy/phy-core.c | 62 +++- include/linux/phy/phy-mipi-dphy.h | 247 ++++++++++- include/linux/phy/phy.h | 49 ++- 18 files changed, 1455 insertions(+), 775 deletions(-) delete mode 100644 drivers/gpu/drm/sun4i/sun6i_mipi_dphy.c create mode 100644 drivers/phy/allwinner/phy-sun6i-mipi-dphy.c create mode 100644 drivers/phy/cadence/Kconfig create mode 100644 drivers/phy/cadence/Makefile create mode 100644 drivers/phy/cadence/cdns-dphy.c create mode 100644 drivers/phy/phy-core-mipi-dphy.c create mode 100644 include/linux/phy/phy-mipi-dphy.h base-commit: 5b394b2ddf0347bef56e50c69a58773c94343ff3 -- git-series 0.9.1