From patchwork Fri Dec 9 15:23:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 13069740 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 13EBDC2D0CB for ; Fri, 9 Dec 2022 15:25:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=WhZcEwm6AlJYmg2RD2eajDW6cAo7MrebwnCwf7STwhg=; b=4br9bnMINHIlcu uMr6BnwdcA2f/fjMKDbi3L48M0gQl1Mg2pQchL70peN+BHbaJtVKhj1IvauFLohFG4B0ow2vqRblj +L/w8jot4322h4rG4vfDGHgoCVdbdSW8bjebfcBbYIu4BbnE/Vl+Ar34GormstAHq23f3aqlgMGxM ouNUvW1/oeAc4PIaqPwbASZ6rTYqGQbsSg1x82mc9lRc/yXbM2PBym96Yser7fb8dGi0OZrfgQ4np 7RhD60df5nsIrcC10MBA4pKDxHYXQgjuW0yZpsPkwa0v0/CJ396E1vpvcPifaqayHrklnJLqyK/Be lkGRtezFJmpuSxUX5GNw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3fEw-008xkQ-Jl; Fri, 09 Dec 2022 15:24:42 +0000 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3fEq-008xh8-VO for linux-arm-kernel@lists.infradead.org; Fri, 09 Dec 2022 15:24:38 +0000 Received: by mail-pj1-x1032.google.com with SMTP id z8-20020a17090abd8800b00219ed30ce47so8464635pjr.3 for ; Fri, 09 Dec 2022 07:24:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=OXC2J8gtGNCluV+1whLnrK+sDhHk+0PxofuJ1e2mza8=; b=YaRRKeW7BmSh7/eDUD6hvrpr083Libsx4dFL8yRl321G+pnvH8Kr7xpVXQI2yYohTx xI8lmviM5Menr1GUazQkN2HyEPyD/23JiSMj0mA4o97EUOgAR3++polKKc/qtf8v1dG0 DXD0eMgsSLadOIXW+PkhPAfv0v82kJ4waXYrQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OXC2J8gtGNCluV+1whLnrK+sDhHk+0PxofuJ1e2mza8=; b=hIX0y3Bv7nT7tVCGtDy1DaxdRLPH5Uhe4fmxvr9AaiM/5oWN9E2MkCLczefXBkhVSo OeTt7Y37GLuDlZRFLH8hUVjCeFlJutoSX/JuRgVQ+covDYt35/Yshefw1+g8hT7k2JeQ vFjEeoL2sPJ2jjjVGqAk2zFWEh6VkUq24PUNOdkKz6Gob0pa9LNTfhWKbeLUFCz56Zes LWeWtcwikMldPHJYmycmZaq81Qq6HGxqNvUPRcpzuyZ456TVn3ezeNVCjMXEvcqg1KgF yi4B3c3DATqCqZys5Js+l52OA4Dp0Je/s9Iau48D/+CpwRczoJxKTx2MpcLU5aJ2CKps 9DUg== X-Gm-Message-State: ANoB5pkZDTyxtn5u37o8LBTAbjjH/vuTe/EHczcA4hmR3PVGQibFhxlI VLfIHOv31YAW2ss3MocBUxGnAg== X-Google-Smtp-Source: AA0mqf7LExIpN5F6hLQNhYaRnE5Gh3zL55dc+SLWtEF/Seev4CfPXwucnvYWAuSjoHgDtoST6thWlw== X-Received: by 2002:a17:903:3254:b0:189:907b:7cbb with SMTP id ji20-20020a170903325400b00189907b7cbbmr6539871plb.50.1670599473108; Fri, 09 Dec 2022 07:24:33 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a809:6ba1:bbda:c542:ba0b]) by smtp.gmail.com with ESMTPSA id x14-20020a170902ec8e00b00188c5f0f9e9sm1477587plg.199.2022.12.09.07.24.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 07:24:32 -0800 (PST) From: Jagan Teki To: Andrzej Hajda , Inki Dae , Marek Szyprowski , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Frieder Schrempf , Fancy Fang , Tim Harvey , Michael Nazzareno Trimarchi , Adam Ford , Neil Armstrong , Robert Foss , Laurent Pinchart , Tommaso Merciai , Marek Vasut Cc: Matteo Lisi , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team , linux-amarula , Jagan Teki Subject: [PATCH v9 00/18] drm: bridge: Add Samsung MIPI DSIM bridge Date: Fri, 9 Dec 2022 20:53:25 +0530 Message-Id: <20221209152343.180139-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221209_072437_074645_E05FD454 X-CRM114-Status: GOOD ( 13.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. 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 t 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://gitlab.com/openedev/kernel/-/commits/imx8mm-dsi-v9 v8: https://lore.kernel.org/all/20221110183853.3678209-1-jagan@amarulasolutions.com/ Any inputs? Jagan. Jagan Teki (16): drm: panel: Enable prepare_prev_first flag for samsung-s6e panels drm: exynos: dsi: Fix MIPI_DSI*_NO_* mode flags drm: exynos: dsi: Properly name HSA/HBP/HFP/HSE bits drm: bridge: Generalize Exynos-DSI driver into a Samsung DSIM bridge drm: bridge: samsung-dsim: Lookup OF-graph or Child node devices drm: bridge: samsung-dsim: Mark PHY as optional drm: bridge: samsung-dsim: Add host init in pre_enable drm: bridge: samsung-dsim: Init exynos host for first DSI transfer drm: bridge: samsung-dsim: Add atomic_check drm: bridge: samsung-dsim: Add platform PLL_P (PMS_P) offset drm: bridge: samsung-dsim: Add atomic_get_input_bus_fmts drm: bridge: samsung-dsim: Add input_bus_flags 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 drm: bridge: samsung-dsim: Add i.MX8M Plus support Marek Szyprowski (2): drm/bridge: tc358764: Enable pre_enable_prev_first flag drm: exynos: dsi: Restore proper bridge chain order .../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 | 1934 +++++++++++++++++ drivers/gpu/drm/bridge/tc358764.c | 1 + drivers/gpu/drm/exynos/Kconfig | 1 + drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1769 +-------------- drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c | 1 + .../gpu/drm/panel/panel-samsung-s6e63j0x03.c | 1 + drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c | 1 + include/drm/bridge/samsung-dsim.h | 116 + 12 files changed, 2195 insertions(+), 1653 deletions(-) create mode 100644 drivers/gpu/drm/bridge/samsung-dsim.c create mode 100644 include/drm/bridge/samsung-dsim.h Tested-by: Marek Szyprowski