From patchwork Wed Jul 20 15:52:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2200 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 B493A3F03E for ; Wed, 20 Jul 2022 17:54:05 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id c18-20020a170903235200b0016c37f6d48csf10648103plh.19 for ; Wed, 20 Jul 2022 08:54:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658332444; cv=pass; d=google.com; s=arc-20160816; b=iibTUEiqZ/lZK+zBH2iNC7ZeijAAB95DfEsd8JWssP3DQyeucy7cV2zk3uT8r446TZ Mz1E+RkgplbRRuu/KLNlhxXbGK+L1kVDNiM9cZoT7y1ZPVMPLkANwVHM3j3GKAZnDlYa w8nDPa6nPjhfCLh70HjG91/OfjOK5Vprpkt4eVxLnGOWiLPcW9YOtJ2ZUYF0sy4K/ITM Pfmi91zJdFRhx27UmatasRW97AB5T7Dqvfd3UMyyidp1vZVQ7eL53dt20CEaHVQUBP85 N3U+WOF+X1E2lz0T8r2dHGZSlqh7GVAZWiJttigi11PQ1dYR8WmQllGMTxMmfTng0Oze ECCA== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=/vNqNjhzkGeL+IP7psT0RcWglnXH/r/Zu3G2xWttA/s=; b=taNJi8VEH9Sq22Oh5w7NOtXFvcRN/6jDlwWYyTjTVNq+RHT1oQQfcjkAE/Jgg6IVpH pXtpZ1Rm6WLdnoVQPr9AxDQv2HhSVhgj+3JSosmqyRR4eqdajZu4K+yYzIxe2hMN7BX/ z3SnZOwR88nPYsFQC46ix5roLydhn0E1eIK6rBNMo3Ylpgdz2Uc63O801noLR6X76rFb u67O1eFCofbE7yUiyuwzaHWrqYUujV0ScReO5K7dm1DcoCc7CYx6OkbblQOFPSsOfPy4 SwzewVkJGC5kbUCivx9g63lbrOX61wuluSHG3BCCwrTxloQra32ekCb6dtSm9kvUaJg2 YIPQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Kvepmg+8; 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; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=/vNqNjhzkGeL+IP7psT0RcWglnXH/r/Zu3G2xWttA/s=; b=eisFNQJX2pul5dKYl/3N9FL2Vi7G8e3qk6MaV89OG6bbUihLtVxDMPQTbIqkfqYOUx WQg96zVlgkHWHsdGXZDZIjFt9Bq1d3zHVk9t1qQhvPg8KyGDg6wxB82HOFsLK5hcBV82 TmyE58+IsLXmuTu6/SeCxstrhOXIs63kULTVI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=/vNqNjhzkGeL+IP7psT0RcWglnXH/r/Zu3G2xWttA/s=; b=xlY0L/0J2zeI4uXpFs8B9UvEME1oxoGjFp22jpEawm2rnyQPN7+P9k+iWh070jCvGZ vWYs8Uk17Byd/a/Kd1emdbj8i/wjYcelQFqbMUEX5TlmjFk1aWf3yedjW+HNxhJCvenw gsODKTKUTddqhoKtEgrOqbcodRkWmNLyUeM25sgBugom5YV077Zol3WVzLG7GvVog5us 6tffi0rKnjWdDdjwJq/mlJdy4qIk3UU2+zTcwu2MYbF1BnzOUV50Om0CRPs7e5W2+g44 oZjXdt/8jTO88JbG6X8UzROADaidpV+a6n8BBw7g59JymGJC5LIXbF+IJAdhAZEijdMt tCOg== X-Gm-Message-State: AJIora/ANK/2lGONv4zK1nV1NqAvUaYihEPVBXM05weN/gIt4fUdI6hU ajocCFJ4CfBE2pIjQQd+zrptNz/B X-Google-Smtp-Source: AGRyM1vJtxmrbxLdWZMk+fkChoR2fo0uYfK0RopNvFluANQTBys/yg0KBpnM4+Z+XhH6KgyDVCnRRQ== X-Received: by 2002:a17:90a:fe07:b0:1f2:1a1e:e0db with SMTP id ck7-20020a17090afe0700b001f21a1ee0dbmr5307799pjb.106.1658332444520; Wed, 20 Jul 2022 08:54:04 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6a00:9a4:b0:50d:aaa9:b359 with SMTP id u36-20020a056a0009a400b0050daaa9b359ls195234pfg.3.-pod-prod-gmail; Wed, 20 Jul 2022 08:54:04 -0700 (PDT) X-Received: by 2002:a63:112:0:b0:419:e88d:7a2a with SMTP id 18-20020a630112000000b00419e88d7a2amr23806707pgb.410.1658332443591; Wed, 20 Jul 2022 08:54:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658332443; cv=none; d=google.com; s=arc-20160816; b=URazR3mRkCYS9avM1ArtmRuMPF/RH3VE4OLEYT8hzR/YL4bcIgPkfV+yLXINVv6J0P yuvqP6/nQY+Iovj4I9SLN3iku672doBisAPyzf6W3pF5LZqTTEHD7hkaodI/2cIItr4v ci31j96AjhTBvvGwr19R44Jhg7p9b7LfNcqml2flF5Af+l6Yl2D86OiSDHbrSRuJsDb1 oF96+aieevQZSYDLoBCTTUUkNuo5ZCxvETixDH6Mbk3tN6+KDRj8lKCrBG/6zO7ZZ8xv j+NF7H4eKprt/SvIpnS7mgZ8bDqda8TGEtBHnXFGrTGdktBlkVMRnpi9jmh84F7L0LVt A/Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=X6jxRQ9Oop0f01LfNyCcXEkFGJrvZaC01iuAVK7jrGE=; b=C9IDPBAzZoisPswsHuB5N0GSN2hW41b/WMhyJbvq7egQJTNyznwznbOU9ZucJ0pwXf q3kWg0Ge0n8CiBhIyBc5kqacBkJLALfjBFwl5eTaAcNdQ/jtfudnn+8l/SThqrnKN/Mt VZBioTfV2ABqIuTZxMqrElg8Ak7RmBP7Ic2iOVAf/1oMrJVcsS6b7jOVtPw0mC9A+5wa eTHbXv2gQCmCjv9GVOrGgX90JB6jRTphtbBom08g4+/i3b4qX2V17llS7uvNIygGQvJr gzw09uGjvz8dpBYfJETYsOOrGYTaJAohxp+No+6aqBzGBPrstRXPFgkjQZFf+lg5j0l9 3gKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Kvepmg+8; 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 l7-20020a170903244700b0016a425cf229sor7026360pls.117.2022.07.20.08.54.03 for (Google Transport Security); Wed, 20 Jul 2022 08:54:03 -0700 (PDT) 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:903:11c9:b0:16b:8293:c599 with SMTP id q9-20020a17090311c900b0016b8293c599mr38384479plh.136.1658332443279; Wed, 20 Jul 2022 08:54:03 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a073:d177:d5:aee:4f03]) by smtp.gmail.com with ESMTPSA id a8-20020a170902710800b0015e8d4eb1d7sm13919198pll.33.2022.07.20.08.53.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 08:54:02 -0700 (PDT) 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 , Laurent Pinchart Subject: [PATCH v3 13/13] drm: bridge: samsung-dsim: Add i.MX8MM support Date: Wed, 20 Jul 2022 21:22:10 +0530 Message-Id: <20220720155210.365977-14-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220720155210.365977-1-jagan@amarulasolutions.com> References: <20220720155210.365977-1-jagan@amarulasolutions.com> 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=Kvepmg+8; 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: , Samsung MIPI DSIM master can also be found in i.MX8MM SoC. Add compatible and associated driver_data for it. v3: * enable DSIM_QUIRK_FIXUP_SYNC_POL quirk v2: * collect Laurent r-b v1: * none Reviewed-by: Laurent Pinchart Signed-off-by: Jagan Teki --- drivers/gpu/drm/bridge/samsung-dsim.c | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c index ef439b49f2b8..3b859b61f493 100644 --- a/drivers/gpu/drm/bridge/samsung-dsim.c +++ b/drivers/gpu/drm/bridge/samsung-dsim.c @@ -360,6 +360,24 @@ static const unsigned int exynos5433_reg_values[] = { [PHYTIMING_HS_TRAIL] = DSIM_PHYTIMING2_HS_TRAIL(0x0c), }; +static const unsigned int imx8mm_dsim_reg_values[] = { + [RESET_TYPE] = DSIM_SWRST, + [PLL_TIMER] = 500, + [STOP_STATE_CNT] = 0xf, + [PHYCTRL_ULPS_EXIT] = 0, + [PHYCTRL_VREG_LP] = 0, + [PHYCTRL_SLEW_UP] = 0, + [PHYTIMING_LPX] = DSIM_PHYTIMING_LPX(0x06), + [PHYTIMING_HS_EXIT] = DSIM_PHYTIMING_HS_EXIT(0x0b), + [PHYTIMING_CLK_PREPARE] = DSIM_PHYTIMING1_CLK_PREPARE(0x07), + [PHYTIMING_CLK_ZERO] = DSIM_PHYTIMING1_CLK_ZERO(0x26), + [PHYTIMING_CLK_POST] = DSIM_PHYTIMING1_CLK_POST(0x0d), + [PHYTIMING_CLK_TRAIL] = DSIM_PHYTIMING1_CLK_TRAIL(0x08), + [PHYTIMING_HS_PREPARE] = DSIM_PHYTIMING2_HS_PREPARE(0x08), + [PHYTIMING_HS_ZERO] = DSIM_PHYTIMING2_HS_ZERO(0x0d), + [PHYTIMING_HS_TRAIL] = DSIM_PHYTIMING2_HS_TRAIL(0x0b), +}; + static const struct samsung_dsim_driver_data exynos3_dsi_driver_data = { .reg_ofs = exynos_reg_ofs, .plltmr_reg = 0x50, @@ -426,6 +444,19 @@ static const struct samsung_dsim_driver_data exynos5422_dsi_driver_data = { .quirks = DSIM_QUIRK_PLAT_DATA, }; +static const struct samsung_dsim_driver_data imx8mm_dsi_driver_data = { + .reg_ofs = exynos5433_reg_ofs, + .plltmr_reg = 0xa0, + .has_clklane_stop = 1, + .num_clks = 2, + .max_freq = 2100, + .wait_for_reset = 0, + .num_bits_resol = 12, + .pll_p_offset = 14, + .reg_values = imx8mm_dsim_reg_values, + .quirks = DSIM_QUIRK_FIXUP_SYNC_POL, +}; + static const struct of_device_id samsung_dsim_of_match[] = { { .compatible = "samsung,exynos3250-mipi-dsi", @@ -447,6 +478,10 @@ static const struct of_device_id samsung_dsim_of_match[] = { .compatible = "samsung,exynos5433-mipi-dsi", .data = &exynos5433_dsi_driver_data }, + { + .compatible = "fsl,imx8mm-mipi-dsim", + .data = &imx8mm_dsi_driver_data + }, { /* sentinel. */ } };