From patchwork Wed Mar 8 16:39:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2780 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 334DF414B5 for ; Wed, 8 Mar 2023 17:40:24 +0100 (CET) Received: by mail-pl1-f197.google.com with SMTP id p10-20020a170902e74a00b0019ec1acba17sf5649643plf.0 for ; Wed, 08 Mar 2023 08:40:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678293622; cv=pass; d=google.com; s=arc-20160816; b=D4AeinvVT5Yd5XLVqjiCps8yFXLaoS6GWtXuYhmDYU5OVQiYI2XvktFQmXlzG5lSRS mQWjTTCc/o6i6V/HfPlwBhonYYfBg9iJji72bi7Rz2S4Qi8D2tMMTGVxfkBmY24PSlWS nmqnihR1Obc8YSGOYEN8lSbPZtC6t8BR5sODcs/dVCP1ECOX1IWTqsXZqwS0iKAiJIlc Xu9Lva7bf3UTWAuWEtf45Y+tgc1jZmzP9RWcAUCz8iZAjpZDjqPcoUbfDL6ZNR0FlodL OMtlG8gQ1InLtkglaSljORQmSL6xGEAO2IcRJwxO5m8kmMGwXYGUhvkYLALMrby9PvML /rkw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=bA744QOKuEtBdVuOYXtjH0a/DpAD0ge6u3OTSalWuaM=; b=LQjz7fNDSH5WAOGtrds6qmNliDzW8WWymw6vy4CLqf+7l1BWxYTusrFV/vvneD4VE9 8qtnKQjlnGAPIYIi0aHDIpzYHqBepHpzBKICjxwnGs9Ac4uIydIqEflZhMHl9dwijv0o dOzYEavt+UNmGleS7Zkmpf3vkMvAuH4xTUq93TcBhHdysEi92nax07IqNaeiU4Qbbggj 2dezsS7a8eQZiC8rIKU7VXRj0gJzuF7x+pYxZqPAJGxlDSiAJOQsR+rlBDqAjPOXxKmb iSPH+OyAUxOSoVkPH6n15v44uusrj18gmjZVQktVnJK62T7mQOelk7GdurAW5RWT2zuY VvpA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZjiHB3ea; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1678293622; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :from:to:cc:subject:date:message-id:reply-to; bh=bA744QOKuEtBdVuOYXtjH0a/DpAD0ge6u3OTSalWuaM=; b=DpFxnSUca+1t075QCgaxAB1kpiv5YSq2rH6K2KwHqP+ruFak7lJBFe+cCubbe00HFN V0NRVu//KU0P36yGVzLUadd/0PYjnAOEJcv2Vj75jMJgpfdfgfeyOra5HUaAq6vZ9jtN BSD89VxYAQKlVmx7y9DZhezrUC/LuV3jc6YRQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678293622; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bA744QOKuEtBdVuOYXtjH0a/DpAD0ge6u3OTSalWuaM=; b=1ODYw1iSq+YpX5/IrHzJ9juIeu8KBSBCZWHcdf/ht523TDznjUBAPcktv4fOtjOZiu cpKnPl+uAe1/oQxEJeqzVLZhCSFGRMXKSkcRCD4TYYQNDP8nXOtJ3pcb/qSA6u0yIITS YTiv4fhiLmojOPWeH5jUwUkBkwkOIZQ4V7Dcxlwz9uHFOtD8RzbPobhACgFBZF3tRbon a6bI8AaPOMH146tY9L0IzlmlgzHW8+zKHZYP7AdAvQsQtKjwBm4MeppQJtbW4E3+LV6i IJoF91g2Mk1PP5CaiMNEpIPbVLjamMChbBt7SUPSfgmFknKbjf90KWkCK4xwuKW79uZP ERhA== X-Gm-Message-State: AO0yUKVI5OXHzPi9phZwCRtDvMPHiQC5yiqj/783mpTjurCKaDegFQGt PURr7Njqu6Za+93slao7IImPa3fJ X-Google-Smtp-Source: AK7set8i/t5DyE3XbkPCTCQ2oe96VvjfejPDmO4GeCBwo0A8xB5tyZk14HWBbFeXaFKbAftCp6ta/Q== X-Received: by 2002:a63:7242:0:b0:507:3e33:43e3 with SMTP id c2-20020a637242000000b005073e3343e3mr4195307pgn.7.1678293622633; Wed, 08 Mar 2023 08:40:22 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:cec6:b0:19c:b3c9:49d5 with SMTP id d6-20020a170902cec600b0019cb3c949d5ls16355266plg.6.-pod-prod-gmail; Wed, 08 Mar 2023 08:40:21 -0800 (PST) X-Received: by 2002:a17:902:ef96:b0:19e:2bcc:4e88 with SMTP id iz22-20020a170902ef9600b0019e2bcc4e88mr16986142plb.5.1678293621517; Wed, 08 Mar 2023 08:40:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678293621; cv=none; d=google.com; s=arc-20160816; b=gVPdFKIqlO90FBb5XR580MOAn6YiSE8L0FRoAJloJZ8boBpyY/URLtWZTVxq738n6X ZoPWJe7dmbfEnJbPdWghp3n40iZV+AGoLN/Ekmv1jZRSgYxXba1/Y0lIYJSsV1YhogRK t7iuPs135m6IwDzvLZBlyt+edZ5tgzoth3qOIOBQAWbCo8bTd09y59t+UzoDpKPVI0IA 2TabQKj5eHxASd/wv5Z+7vrPoy9u9CZyhSdcLz6G9jGbtu41nXA5DoNqkTQvj9apwZRC KoGOpUVCnMm1T/8CaHdurKhhPwM+u3eFgg3J03dq0gEPw36aCSnZewifv6JYMdlMPrlJ zxnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=uStuQWLPamCtqTgyfCCLlARBeEJ/VwnOwbsUlq7p83Q=; b=sYjkx1CE2gV76n1ZeRQC5Etwx9CT8/2Af4b/hu7PUnzHIzTRpxWQrYpBOZcc5zPmUM In9MOI/xTELpz6t3INiHv94TpnyzZM253pEAU3KyZ9FG3nyqTPA0uQ6O4g329LyJnPp3 bl2TguIge3u3bDsM9VMTrsOGwPw77QiwL7T1Gy2iC+2jw+KaPaaSB0g9rAlg/MYaiswy EO8U7SdDGoy/dP+HJsrSoDy8HeOxl1rcgyBUJT1uBJOzwyz81N5aWf5IXRwlmAgzIVz8 zDKLn72Fxemvic3Vw9fhmF2ibjX3NkokbhzVU8ZPez+FRxRFD7vZHFEjuC4ll3VzweIp hDVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZjiHB3ea; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id m13-20020a170902db0d00b0019cce0fae42sor7411969plx.57.2023.03.08.08.40.21 for (Google Transport Security); Wed, 08 Mar 2023 08:40:21 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:902:6bc6:b0:19d:138b:7c41 with SMTP id m6-20020a1709026bc600b0019d138b7c41mr15866572plt.64.1678293620940; Wed, 08 Mar 2023 08:40:20 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a8a1:b545:91cc:80b2:f9fe]) by smtp.gmail.com with ESMTPSA id kq3-20020a170903284300b0019b9a075f1fsm10046540plb.80.2023.03.08.08.40.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Mar 2023 08:40:20 -0800 (PST) From: Jagan Teki To: Andrzej Hajda , Inki Dae , Marek Szyprowski , Neil Armstrong , Marek Vasut , Maxime Ripard Cc: Seung-Woo Kim , Kyungmin Park , Frieder Schrempf , Tim Harvey , Adam Ford , Matteo Lisi , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-amarula , Jagan Teki Subject: [PATCH v16 00/16] drm: Add Samsung MIPI DSIM bridge Date: Wed, 8 Mar 2023 22:09:37 +0530 Message-Id: <20230308163953.28506-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZjiHB3ea; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This series supports common bridge support for Samsung MIPI DSIM which is used in Exynos and i.MX8MM SoC's. The final bridge supports both the Exynos and i.MX8M Mini/Nano/Plus. Inki Dae: please note that this series added on top of exynos-drm-next since few exynos dsi changes are not been part of drm-misc-next. Request you to pick these via exynos-drm-next, or let me know if you have any comments? Patch 0001 - 0002: find child DSI bridge and panel Patch 0003 - 0004: optional PHY, PMS_P offset Patch 0005 : introduce hw_type Patch 0006 : fixing host init Patch 0007 : atomic_check Patch 0008 : input_bus_flags Patch 0009 : atomic_get_input_bus_fmts Patch 0010 - 0011: component vs bridge Patch 0012 : DSIM bridge Patch 0013 - 0014: i.MX8M Mini/Nano Patch 0015 - 0016: i.MX8M Plus Changes for v16: - collect RB from Marek V - collect TB from Marek S - fix multiline comment - fix explicit bridge detach - properly handle TE_GPIO Changes for v15: - drop drm_of helpers - re-added find DSI bridge/Panel helper in dsim - collect RB from Marek V - fixed leading underscore in function names - commit messages updated - rebased on exynos-drm-next Changes for v13: - remove devm call for DSI panel or bridge finding - rebased on drm-misc-next Changes for v12: - collect RB from Marek V - add te_irq_handler hook - fix comments from Marek V - update atomic_get_input_bus_fmts logic Changes for v11: - collect RB from Frieder Schrempf - collect ACK from Rob - collect ACK from Robert - fix BIT macro replacements - fix checkpatch --strict warnings - fix unneeded commit text - drop extra lines Changes for v10: - rebase on drm-misc-next - add drm_of_dsi_find_panel_or_bridge - add devm_drm_of_dsi_get_bridge - fix host initialization (Thanks to Marek Szyprowski) - rearrange the tiny patches for easy to review - update simple names for enum hw_type - add is_hw_exynos macro - rework on commit messages Changes for v9: - rebase on drm-misc-next - drop drm bridge attach fix for Exynos - added prepare_prev_first flag - added pre_enable_prev_first flag - fix bridge chain order for exynos - added fix for Exynos host init for first DSI transfer - added MEDIA_BUS_FMT_FIXED - return MEDIA_BUS_FMT_RGB888_1X24 output_fmt if supported output_fmt list is unsupported. - added MEDIA_BUS_FMT_YUYV10_1X20 - added MEDIA_BUS_FMT_YUYV12_1X24 Changes for v8: * fixed comment lines * fixed commit messages * fixed video mode bits * collect Marek Ack * fixed video mode bit names * update input formats logic * added imx8mplus support Changes for v7: * fix the drm bridge attach chain for exynos drm dsi driver * fix the hw_type checking logic Changes for v6: * handle previous bridge for exynos dsi while attaching bridge Changes for v5: * bridge changes to support multi-arch * updated and clear commit messages * add hw_type via plat data * removed unneeded quirk * rebased on linux-next Changes for v4: * include Inki Dae in MAINTAINERS * remove dsi_driver probe in exynos_drm_drv to support multi-arch build * update init handling to ensure host init done on first cmd transfer Changes for v3: * fix the mult-arch build * fix dsi host init * updated commit messages Changes for v2: * fix bridge handling * fix dsi host init * correct the commit messages Tested in Engicam i.Core MX8M Mini SoM. Repo: https://github.com/openedev/kernel/tree/imx8mm-dsi-v16 v15: https://lore.kernel.org/all/20230303145138.29233-1-jagan@amarulasolutions.com/ Any inputs? Jagan. Jagan Teki (14): drm: exynos: dsi: Drop explicit call to bridge detach drm: exynos: dsi: Lookup OF-graph or Child node devices drm: exynos: dsi: Mark PHY as optional drm: exynos: dsi: Add platform PLL_P (PMS_P) offset drm: exynos: dsi: Introduce hw_type platform data drm: exynos: dsi: Add atomic check drm: exynos: dsi: Add input_bus_flags drm: exynos: dsi: Add atomic_get_input_bus_fmts drm: exynos: dsi: Consolidate component and bridge drm: exynos: dsi: Add host helper for te_irq_handler drm: bridge: Generalize Exynos-DSI driver into a Samsung DSIM bridge dt-bindings: display: exynos: dsim: Add NXP i.MX8M Mini/Nano support drm: bridge: samsung-dsim: Add i.MX8M Mini/Nano support dt-bindings: display: exynos: dsim: Add NXP i.MX8M Plus support Marek Szyprowski (1): drm: exynos: dsi: Handle proper host initialization Marek Vasut (1): drm: bridge: samsung-dsim: Add i.MX8M Plus support .../bindings/display/exynos/exynos_dsim.txt | 2 + MAINTAINERS | 9 + drivers/gpu/drm/bridge/Kconfig | 12 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/samsung-dsim.c | 1967 +++++++++++++++++ drivers/gpu/drm/exynos/Kconfig | 1 + drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1813 +-------------- include/drm/bridge/samsung-dsim.h | 115 + 8 files changed, 2191 insertions(+), 1729 deletions(-) create mode 100644 drivers/gpu/drm/bridge/samsung-dsim.c create mode 100644 include/drm/bridge/samsung-dsim.h