From patchwork Wed May 4 11:40:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1941 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 99E063F110 for ; Wed, 4 May 2022 13:42:11 +0200 (CEST) Received: by mail-pl1-f200.google.com with SMTP id l4-20020a170903244400b0015ebe12a192sf601216pls.16 for ; Wed, 04 May 2022 04:42:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1651664530; cv=pass; d=google.com; s=arc-20160816; b=xKKVLLHo4XwPrOgilU0u4qD63+KXmOjF9rBfyxURAsdJJXeWx+vHJh+XQNfz8ZiVJL gS5s0YAwVN83DB3X2shCX6OHcWzBgliDrekU1PCrDVb0Q2/w1IWtKMVm5sUowf3I1tib vOQltWBhjA9oiF5CTPaCz0/XSgQUJXSBhPzD462vKvuzKYoZu73EfU97Xufl+xwB0GzK So7BdxFmWf4bpeZK/Kc2sod4aNrTgPPCc785tNYQ/apT4GSHjTkxVHitqPgZ0ONP1rBd zkXuOe1X/Nq8AOX1RFpKVe+CA0tKcaR5nM++Cv79r8GmT1E5z4JncP9RUcCFlt2dKJWb d6hA== 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=45W+tl6c88d6DN28bkKIfeOCuOlkyA4qke0qOxI+05Q=; b=Hh9nQaYqWoxQHOrObFrOnnktm29bSas7GwLvzMufRmjAq3KSH5AXYaTh9GPQjyF35+ cCuI4Uv35Q411FZOS9r5Pa6Axih53BzYBqtL7goZ8WhtAvpQFmkIPfxPJkC7YuQE4Cp1 3uiILIZyNfOwS+SyKO55yUBdJ6UwLNcEM33Mf3DyViPE3+u5v3nMgc6nSlnAXWRKTvn9 fIJ+MUpOJMYkF1suqzg2IFpN99HGOicJxeQhnFilzIqc/c43xxV++aDxw8ITk8w3m/In 3hJtU9AK/xheAvPxSPUUPYpQw1PRvn6K0ckeWTmUV6BRXJ9tW8XzK5G6oEJ47g7mG0wu 49UA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=klRpm+bn; 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=45W+tl6c88d6DN28bkKIfeOCuOlkyA4qke0qOxI+05Q=; b=lyo0sb2twJiXcJF96mYbKxFBBujOgmQmooM8DnkwctbFo7z6D1tkOW/cSScJlWj+Hq H7vSMgjJE40oUK8KVIpUlzDOszwDMWPuW4t51tDdKOQuD8JHHB27QZAus0zWbJVtBKxt TDrEcT003puC82czwKsVglgLs1znG2jJD1jT4= 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=45W+tl6c88d6DN28bkKIfeOCuOlkyA4qke0qOxI+05Q=; b=ee9HWauuGGLJkeJCllS2JHldDDMDU19Fy248nFrFvUetd2MqL3uwfMvUS4dP4YaelI 2YxAT/ESU2kywTzPlWkY2GodxoRzRaXzHQCeGkhhrZ9IxF9Jm+5j65yI7kmkuV+J/zCQ aOqfazPkItnhlmWzramzk2zXCrb2QCs5BpbzBsn9nSkTIL0agzVFJRiQXzqklTJTdxb/ ndXkFvdOMNTO9mUqALKG/iQ3LacPi/yb49xojtNOl4QpnBV3/uRvjMv0LOGg7nfmtrRq DTTwjlWInEZhn8ViwUWSUWErq9rncFYoi0IE9aiGQ3M0ernBe07bLXoNgZogFZAOKxvS Zzfw== X-Gm-Message-State: AOAM5320NZ/wu/J0LK9VRej5J8xkZEtn26uU7zRE4aFd9qdLiwWMliYt /9tpLAO0t2F41MA5+MqgfSd0fv2b X-Google-Smtp-Source: ABdhPJyRRrZAxN7ao4iVSYPi53QykjNaaE7qJTDVTV09XRTbeRBcRaDv1EB4SRRJryW3jGqWxLE4EQ== X-Received: by 2002:a17:90b:4c03:b0:1dc:50f5:e291 with SMTP id na3-20020a17090b4c0300b001dc50f5e291mr9857670pjb.214.1651664530434; Wed, 04 May 2022 04:42:10 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:e811:b0:15e:a1b8:c1dc with SMTP id u17-20020a170902e81100b0015ea1b8c1dcls1194089plg.2.gmail; Wed, 04 May 2022 04:42:10 -0700 (PDT) X-Received: by 2002:a17:902:c40f:b0:15e:bc6b:6980 with SMTP id k15-20020a170902c40f00b0015ebc6b6980mr6018096plk.145.1651664529788; Wed, 04 May 2022 04:42:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651664529; cv=none; d=google.com; s=arc-20160816; b=opAoM7g1l5S42eApgBuOYBATias+GrsxmW1mmTC+Ej4GqbDN+cD14EAEwv7X+v7KYX U6oSGa/0aZL5NUUEXBmaawtfoN9W4Tc1JMFrXwfWtOagtTenMS8o4OxaJqXKV4qv5klo WK3UZoTYBxM9ucvppwCFP3W/AIzHMpfqenK+POW3Gsu3bzCee1ql0NDjSLSCSSUO3VAw elOd52rVL8t+VyCJisPefxH0rMe6NJk4NZSYXCNjfCFO0vli5WqNVeXiUO0+5OPFKDXz 3UjByV7Tm3+lr3l+wftvHfeCNI63k6ukNxfdbDt0IQdQsFdMnlQHjmBRyL8R+BFpmSao mYLg== 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=cVMCRacZCx0pOFgSAXyCugFOs6e7iXb5CCX+AZorTUs=; b=sOnixu0jFH3zfUSOCFsruFzufaUe6HWmIyI8qX+3Naq+wX4MtuQxPPK+6sQR8WaIDE paRUxNnBhI6RGlemA8cejgBjRkxoGOOEoF6OyMdL0M2tMIigFYUIwVKsNuagADldOgYy cOerkhFSSBEFtHkqljw5EPMlvAOQrtaFSHeqyYFiHu7tlIQPqMK+iHtX7BSfMe/kIk39 mLYvDdYXpnXhNC+IvwaqkAS3DEHlA9wRapoWiZK3aPg3k4qAbWVsq3ZqDkEsZ1bxQL3X sLrlcaQzDhrlA1+upu2MyYviRX2vxiySfGK/yyHM02IZyfarJL5QVTnyzVZPuqn180ci nwvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=klRpm+bn; 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 w15-20020a17090a380f00b001c62fb0ed2csor1927388pjb.35.2022.05.04.04.42.09 for (Google Transport Security); Wed, 04 May 2022 04:42:09 -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:90a:d593:b0:1d9:2bc9:f1a6 with SMTP id v19-20020a17090ad59300b001d92bc9f1a6mr9770441pju.207.1651664529532; Wed, 04 May 2022 04:42:09 -0700 (PDT) Received: from localhost.localdomain ([183.83.137.38]) by smtp.gmail.com with ESMTPSA id k15-20020aa790cf000000b0050dc7628174sm8027498pfk.78.2022.05.04.04.42.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 May 2022 04:42:09 -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 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 v2 12/12] drm: bridge: samsung-dsim: Add i.MX8MM support Date: Wed, 4 May 2022 17:10:21 +0530 Message-Id: <20220504114021.33265-13-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220504114021.33265-1-jagan@amarulasolutions.com> References: <20220504114021.33265-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=klRpm+bn; 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. v2: * collect Laurent r-b v1: * none Reviewed-by: Laurent Pinchart Signed-off-by: Jagan Teki --- drivers/gpu/drm/bridge/samsung-dsim.c | 34 +++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c index 28ed6b096fd0..138323dec0eb 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,18 @@ static const struct samsung_dsim_driver_data exynos5422_dsi_driver_data = { .platform_init = true, }; +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, +}; + static const struct of_device_id samsung_dsim_of_match[] = { { .compatible = "samsung,exynos3250-mipi-dsi", @@ -447,6 +477,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. */ } };