Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13958343ybl; Mon, 30 Dec 2019 01:05:26 -0800 (PST) X-Google-Smtp-Source: APXvYqzsbnGA4gKXww3IsBpUM99aPNAx9xKLfbM4/JmxId9TGvTxIAF3d9k8VrFGWg98B1QtKbwB X-Received: by 2002:a05:6830:4b9:: with SMTP id l25mr74807364otd.266.1577696726768; Mon, 30 Dec 2019 01:05:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577696726; cv=none; d=google.com; s=arc-20160816; b=nNf7uHI0wxWO4w4cSV+6DvzbkmoAZa+zbjkCnKGD1X54f5KbQPJppC6AH1VM89MX0p Cmg4EChSKGbCeV0QMuBX4MIB9S7HKiafHN1bTE8xtGnDq9S4gzhcWnUb59F/z4k0EOso C3ptXAwcjKoV8Sv75MtUQu2wSZee8TBgQLajlAVmhOXZ4jAQiteLjAhsnvq2UbsbRbx6 xSWX0UCFimWYv6iYwMF7Mom3a+ywF7VbeinbOBjeKYPAF3sp9IELwY7KewyHwa5xk5IN vwOq/3/GMlrLSnkA8HEnwDJbQ1xv1F8ENG4pG8S8LC4srmODb65nW0jUw0ycofT4Ww12 8m7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=F6lLopw6yuAO8noPF1ZXDNOoVan9MiwWoXMIvTqjoqE=; b=VHiJjIjILCB+3hYx+ihABMgEvq1uDFiAgUSN3Q9ZpzlZz/JE0nJArmFQGPrY1LX8MU nHhplbNPddHPS3GS5Joboc0wDYxylntvAt5FktAbnCQAXad6TPKsoiSt+GhO+lYEJbRF G31BVKdRAa+JlVPNgn/8NlM1p5UZrC2gXUtCKfbhByH3vrSjWZm8MkgNuwmxS+e2+tba HryzvdPgnpkw74ZBFLPo+On0IK39oHgi3IYM9X9RdOio1iljymx+Zuwnq71NqCHmI2ze QNPtT3GKBBB6G+MIXy8JrGDASXbyqiZ55PK7KphqjmCj6zV4MrnANxym3klOy9G0A+oU ehoA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v18si23456194otn.202.2019.12.30.01.05.14; Mon, 30 Dec 2019 01:05:26 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727334AbfL3JEa (ORCPT + 99 others); Mon, 30 Dec 2019 04:04:30 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:35432 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727175AbfL3JEa (ORCPT ); Mon, 30 Dec 2019 04:04:30 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id A6F8926AE6A From: Enric Balletbo i Serra To: linux-kernel@vger.kernel.org Cc: Collabora Kernel ML , matthias.bgg@gmail.com, drinkcat@chromium.org, hsinyi@chromium.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Jonas Karlman , Andrzej Hajda , Ulrich Hecht , Philipp Zabel , dri-devel@lists.freedesktop.org, Neil Armstrong , Rob Herring , linux-mediatek@lists.infradead.org, David Airlie , Mark Rutland , Jitao Shi , Laurent Pinchart , Jernej Skrabec , Daniel Vetter Subject: [PATCH v24 0/2] drm/bridge: PS8640 MIPI-to-eDP bridge Date: Mon, 30 Dec 2019 10:04:17 +0100 Message-Id: <20191230090419.137141-1-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, This is another version of the driver. Note that the driver changed significally and is a more simply because now is using the panel_bridge helpers. Apart from this, I addressed the comments from Maxime, Laurent and Ezequiel. This bridge is required to have the embedded display working on an Acer Chromebook R13 ("Elm"). Hopefully we are a bit more close to have this driver merged. If more changes are required, please let me know and I will work on it. Note: Along these around 20 revisions of this driver I was unable to reconstruct the full changelog history, so I'm skipping this. Sorry about that, I promise I'll maintain the changelog for future revisions. Thanks, Enric Changes in v24: - Fix GPIO polarity as all GPIO descriptors should be handled as active high (Laurent Pinchart) - Make static ps8640_bridge_attach (Ezequiel Garcia) - Use a define for the number of lanes (Ezequiel Garcia) Changes in v23: - Merge mute/unmute functions into one (Nicolas Boichat) - Use enum for ENABLE/DISABLE instead of bool (Ezequiel Garcia) - Rename mute/unmute to vdo_control and fix error messages (Nicolas Boichat and Enric) - Add space between address and address parameter 'address%02x' (Nicolas Boichat) - Add Tested-by Hsin-Yi - Added me as author after the refactor Changes in v22: - Migrate to YAML format (Maxime Ripart) - Remove mode-sel property. - Rename sleep-gpios to powerdown-gpios. - Remove sysfs attributes because are not really used (Enric Balletbo) - Use enum for address page offsets (Ezequiel Garcia) - Remove enable tracking (Enric Balletbo) - Use panel_bridge API (Laurent Pinchart) - Do not use kernel-doc format for non kernel-doc formatted commands (Enric Balletbo) - Remove verbose message for PAGE1_VSTART command (Ezequiel Garcia) - Use time_is_after_jiffies idiom (Ezequiel Garcia) - Remove unused macros (Ezequiel Garcia) - Fix weird alignment in dsi->mode_flags (Laurent Pinchart) - Use drm_of_find_panel_or_bridge helper (Laurent Pinchart) - Remove mode-sel-gpios as is not used (Laurent Pinchart) - Remove error messages to get gpios as the core will already report it (Enric Balletbo) - Remove redundant message getting the regulators (Laurent Pinchart) - Rename sleep-gpios to powerdown-gpios (Laurent Pinchart) - Use ARRAY_SIZE(ps_bridge->page) instead of MAX_DEV when possible (Laurent Pinchart) - Fix race with userspace accessing the sysfs attributes (Laurent Pinchart) - Remove id_table as is only used on DR platforms (Laurent Pinchart) - Convert to new i2c device probe() (Laurent Pinchart) - Use i2c_smbus_read/write helpers instead of open coding it (Laurent Pinchart) - Remove unnused global variables (Laurent Pinchart) - Remove unnused fields in ps8640 struct (Laurent Pinchart) - Remove commented-out headers (Laurent Pinchart) Changes in v21: - Use devm_i2c_new_dummy_device and fix build issue using deprecated i2c_new_dummy - Fix build issue due missing drm_bridge.h - Do not remove in ps8640_remove device managed resources Changes in v19: - fixed return value of ps8640_probe() when no panel is found Changes in v18: - followed DRM API changes - use DEVICE_ATTR_RO() - remove firmware update code - add SPDX identifier Changes in v17: - remove some unused head files. - add macros for ps8640 pages. - remove ddc_i2c client - add mipi_dsi_device_register_full - remove the manufacturer from the name and i2c_device_id Changes in v16: - Disable ps8640 DSI MCS Function. - Rename gpios name more clearly. - Tune the ps8640 power on sequence. Changes in v15: - Drop drm_connector_(un)register calls from parade ps8640. The main DRM driver mtk_drm_drv now calls drm_connector_register_all() after drm_dev_register() in the mtk_drm_bind() function. That function should iterate over all connectors and call drm_connector_register() for each of them. So, remove drm_connector_(un)register calls from parade ps8640. Changes in v14: - update copyright info. - change bridge_to_ps8640 and connector_to_ps8640 to inline function. - fix some coding style. - use sizeof as array counter. - use drm_get_edid when read edid. - add mutex when firmware updating. Changes in v13: - add const on data, ps8640_write_bytes(struct i2c_client *client, const u8 *data, u16 data_len) - fix PAGE2_SW_REST tyro. - move the buf[3] init to entrance of the function. Changes in v12: - fix hw_chip_id build warning Changes in v11: - Remove depends on I2C, add DRM depends - Reuse ps8640_write_bytes() in ps8640_write_byte() - Use timer check for polling like the routines in - Fix no drm_connector_unregister/drm_connector_cleanup when ps8640_bridge_attach fail - Check the ps8640 hardware id in ps8640_validate_firmware - Remove fw_version check - Move ps8640_validate_firmware before ps8640_enter_bl - Add ddc_i2c unregister when probe fail and ps8640_remove Jitao Shi (2): Documentation: bridge: Add documentation for ps8640 DT properties drm/bridge: Add I2C based driver for ps8640 bridge .../bindings/display/bridge/ps8640.yaml | 112 ++++++ drivers/gpu/drm/bridge/Kconfig | 11 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/parade-ps8640.c | 348 ++++++++++++++++++ 4 files changed, 472 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/ps8640.yaml create mode 100644 drivers/gpu/drm/bridge/parade-ps8640.c -- 2.24.1