From patchwork Fri Apr 8 16:21:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1912 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 49A1F3F0D5 for ; Fri, 8 Apr 2022 18:23:40 +0200 (CEST) Received: by mail-pl1-f198.google.com with SMTP id j1-20020a170903028100b0014b1f9e0068sf4708411plr.8 for ; Fri, 08 Apr 2022 09:23:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1649435019; cv=pass; d=google.com; s=arc-20160816; b=pG5RsRXD13eB2tpo1LoBZgNXoOsZiUBTRcGDvDX64eDLcJgVoqAnQl+LdefO8IPsWo tp43IACXs8douA8Z56IYTVIarnIqRJqolj/f2iBKirp9Ih3N/8KJZoDq5DcMjZKL8hhC o4FqVc1aihF5Fvh5BMuorGqDs98t3fDTrV8J7v9Rgua/C6qav7VRy97kP7Rxmj+QB+96 M4nsYhUu9ao+VvbmBPZQjFSaG41opxiEbcPnNFjJB5F9WUOov23gbWqC2iWjTgwb+kXW uWMb49mNGPij4LfoEgj0hofpGlzHY2/IVGJaHQJSEM7SpEls0dNzbQvjkWPesLDE1L7B VkzQ== 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=2yW7P6S0XkPG8+LwSPYMBNnwGBbKFUr7cOasxMz7OYs=; b=Kfe8cWw7rAsR5tGS+Gz1MCtx3zdBfNVca/UJxnoeYd19S45HIdGPa0+1h34B9DwqCM hJbt3B39HGXRk+LAU9Gu5PuBZ2QW5Rf//6Kuj0nKlPPspAPcDKsVMKay4YVV4wwdxQcb fJMqb8Ro3SPRh7tX5aR01GZYqFAy2rw/h8CR7c5YUUOcB5f13Q+u7CFsaaNJ29ZGROtl xdLzxtJjnfhOr/2usDbOWN9XVN0FVOVcBAExGb71AJUKKD+m5hhZaaRX+nUkHil80Iuc F67gqUgrsqQPG3PUgtgXTBsQdXX9voqRI/7yH0Na5epO91/i8hR5Qk/fHV9PuGukxWGf Ye2A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=We3vH+y0; 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=2yW7P6S0XkPG8+LwSPYMBNnwGBbKFUr7cOasxMz7OYs=; b=C86Y4f5ykjj26INQEVKo9PJb8ipwx9mT0ZCEk+HoF1oEAwkIjEZ6O+iWDYzHEU7AoP J7x9rx9Lg0/ODokSfq4XsiuMKxg45jWOGqlqQCzY/mVVWhTn0a9uArDc/5aRYveoP7D8 AiAmoKfR9RyrDRWvrjXDwUMkbckN0qie8Tztk= 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=2yW7P6S0XkPG8+LwSPYMBNnwGBbKFUr7cOasxMz7OYs=; b=Hf/OsYmcHT75fs9EHcWHuUquD5QdEEXQuemyTl6jRGK/eW3UPks0dvEnhrOnKiJ1FC p+TTFcOFAuBUNAxR33W4y1Irgv+52tuBpo+kbq5j7c7RLgsl8oTtzCbLI7k5eqdmJnkD oraJYI/yTpuTJKKCYzApCXK29ltM+1zyXSCvk2voLT5LiFbdiaaj78tQ3kn7HrZaYm7u g4P5AGF8ihqphJO27UbVF2UObeZJ0osWiiH2QkiW4oO1rjTQAnqe9Tn3SDTdbbMfSxpK KQdBaFGbmQ1AIRmyF6CBudhy7sDFM8VKH4FpxX4N46ItSgBna/sl06AyZcR1M+z5fhBi ERUg== X-Gm-Message-State: AOAM531du2bHdf5rSt9O2tlswORamgPj0lk5OrV3dcXY16fkBvvsAivn 83he1Y8+CSzU5qtjz8i289AWHTf3 X-Google-Smtp-Source: ABdhPJyGHR18HLLla488/o/xh1IqMS6NATT7kl6uzD69O2g2RdX45ygC22qYjBDEC+ZY+3EpBbliGQ== X-Received: by 2002:a17:90a:a416:b0:1ca:b9f8:bcec with SMTP id y22-20020a17090aa41600b001cab9f8bcecmr22635200pjp.163.1649435019101; Fri, 08 Apr 2022 09:23:39 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:7a50:0:b0:398:36ed:d87d with SMTP id j16-20020a637a50000000b0039836edd87dls1154103pgn.8.gmail; Fri, 08 Apr 2022 09:23:38 -0700 (PDT) X-Received: by 2002:a63:c015:0:b0:385:fe06:eb86 with SMTP id h21-20020a63c015000000b00385fe06eb86mr16026761pgg.132.1649435018392; Fri, 08 Apr 2022 09:23:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649435018; cv=none; d=google.com; s=arc-20160816; b=GIaOvneO1IdlsfJX2iqq20zEVJ4OcG9q2+8DowTpcp8sLbWJ1orjtfDXhCYl0rJpXk d3DtGxwgnERyxs3R8JC6a6lzZBCTMww51v0qF2U3WoZmyaLRPuDmcZiYZV/xpHyNhkth GLDGfv4kiv+9rLtALo5p4CRSBPlnNuhr6DlrSxsdq6+KMql01vQbT4QahDnzUyeE76O3 8uAxindUrmZkQgVL4sLdca1Q3ug0XwMJOL+gLysaQTA9aN5sXIdzjfyETeo1CV8w26NK bWBcJvsZhv0sS3+KHkwaFWlsbhtvgjGZAlARYbmQaGayFruKJH0/pRUJXp3R4I5s3Omr a+rA== 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=7BcGnOMSzwjZFrNXSVlFPVWXXS7lgriFVwZOMf5bb+Q=; b=W2bzBdMQ2RsYEs7tRDS7sbASHnw/Q9TA7JjLcCi7MsKdB1hCsTybYLxXwnlIS58uK7 ghHms5BonKdXxyet1YRy+AoQFvgh0obCp3CypZBrE29LH2lZWCe4qPGXnUeCd5lrjaqn i8jz/s6ZiLfENtHVsKKTbPf4ZtY/Vpetec9dKgwRJVS8zwrXrm/frd6zg+rBk/XkYA9W LjKxAckdQ+Req8HpaiKSf6eU2gY47Du7JwgCpZ8ltghD3RMjUieyGwECQsM1nxQnqzvc EQnw5TvNiWWv3w7DHFn0yjVxVQ7CeYPReNvGJSsFXsWmmfsZ3qFg4u3J7KF/shvscl2m 8KBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=We3vH+y0; 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 k11-20020a170902694b00b001567abfbeadsor661709plt.151.2022.04.08.09.23.38 for (Google Transport Security); Fri, 08 Apr 2022 09:23:38 -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:2352:b0:155:d4e8:12c6 with SMTP id c18-20020a170903235200b00155d4e812c6mr20780844plh.27.1649435018093; Fri, 08 Apr 2022 09:23:38 -0700 (PDT) Received: from j-ThinkPad-E14-Gen-2.domain.name ([45.249.78.214]) by smtp.gmail.com with ESMTPSA id n18-20020a056a0007d200b004fdac35672fsm24929863pfu.68.2022.04.08.09.23.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Apr 2022 09:23:37 -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 , Rob Herring Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team , linux-amarula , Jagan Teki Subject: [PATCH 11/11] drm: bridge: samsung-dsim: Add i.MX8MM support Date: Fri, 8 Apr 2022 21:51:08 +0530 Message-Id: <20220408162108.184583-12-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220408162108.184583-1-jagan@amarulasolutions.com> References: <20220408162108.184583-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=We3vH+y0; 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. v1: * none Signed-off-by: Jagan Teki Reviewed-by: Laurent Pinchart --- 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 71bbaf19f530..d91510a51981 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. */ } };