From patchwork Mon Aug 29 18:40:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2330 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 417B740F47 for ; Mon, 29 Aug 2022 20:42:21 +0200 (CEST) Received: by mail-pg1-f197.google.com with SMTP id q7-20020a63e947000000b004297f1e1f86sf4405949pgj.12 for ; Mon, 29 Aug 2022 11:42:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1661798540; cv=pass; d=google.com; s=arc-20160816; b=cHJOp8K1cxVMUhNypDfG8nCs0sgGPNGn3yIKmS3Z7Xc+rsgLqQjqturIuW2T1gRMQi 7zlschmO20lnM8tAOFSMzgBbFhvdDj6LJ0J0rB1Ss1+13Kjyndo0Cyzh7rTfuWnab+8a nfgN7UPSSWfjqUZBPW/Qi4SAdwsy4bMiwLOie9t9oTZvym0kyHK4BEUFGGGZsgK8Ml8q MlaH6ZhIPJGU/li5VPXdc7sc0P5ZJorzus1RilzUqKb0K0cZ3FbSKoDbFQUnguKwfmpr YFYPrnn/xyWj6uaKxSCHfe1pWZCLB1RcPYJfUZNOdK5iV8KAIA1N3hM/nCYvopTFRNHQ kzYg== 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=11jdhatI+cgQtLF9ippcWi+d+mj57zSaiGNMFk5xzLo=; b=MwiNlXDlqnS5wLnWMsWCCMBMPzDqefmUg7PEVimdZ0uu3usYtpRS9T6AARJIM4/obQ 6DzI7uPhGWH9dSFTlmf/LXlHtA9yXs/7ueegOb2pnslmfKAdAUtigbGoyoReW1hIU10Q BvFDDsJtGcBM6beLlqp/y2Ev3RJ/WRFZKb7b34AnwLQi2Hf5lLhbLg/3qpq/OVtnq+Dq JSP5TkRjyb3SxFg5L9wqt5L69znYnJWcp0kow7NeqiceWmhxyoQLFvvtRY2wIPyn1lyA jnhkddhPgnNmG3CkxCCoi2qOvIr2rumaw/E/F+GuGDNwGsmr3CixodhJXBZqwJAosYRI GXwA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="kyEZ9/UC"; 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=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc; bh=11jdhatI+cgQtLF9ippcWi+d+mj57zSaiGNMFk5xzLo=; b=FeZlw6E+4ZL0E+9e28Vr516OES/C3xArlV3piELk2kbStPDH5i4dTH4iNTpI/g/G7y fXr2QvfHQ+qQtrQDwaxMxy26CWgbmPqxGsM4vgQ/e987mmwsk6brSi/AmJRNb3CWeNEf ow6TzHNsiaS07jRp05k85p4N0HLvJylb3MrP4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc; bh=11jdhatI+cgQtLF9ippcWi+d+mj57zSaiGNMFk5xzLo=; b=W0NZZmK0SdxW+7U6xYGUhu+iJ4onL26wLepb6fYHicvVhUBWr7TkgtmNQ0VgYFLUF6 O7T9DgsalsqTfVmwcWzhcCV8rfA3hMzD9h4d+szS4Xyc3N6zxuSO+qn+yM5yQX6PMY6d TbDrAzzhFp9k2dSAzT92ENd6PFZo0oWGPm72itYLzXWntaqzHrMN9zRd8ZlwtfYy+EW4 iAddyBp/7+XKXojHqajpLkE/o6djIml1+RleOKn6VRmS7dyNQgX1ror2EQKOwYXSvK6I Q1WpOvXLCNMqTcl93cZnmpiRlItHajPLwI+5I4E/w0H0G0hOpgy5oRjUpdIW0j4CxGkE PCYQ== X-Gm-Message-State: ACgBeo2aduP+XFuf1tLHrWXXrxPGeYud2S+qKlPFJsN+aAD8b5AH5L1a uWWP6XLcJNQlyPPnBz1pWRz88Jvz X-Google-Smtp-Source: AA6agR6t/ZITHtm+JafHQhppxpriGeVg2HSSWi69/LAXPUTnm6rzSNGzeMnyHhcE81k45Wx3N50LEw== X-Received: by 2002:a17:90b:4a48:b0:1fd:df0a:eac1 with SMTP id lb8-20020a17090b4a4800b001fddf0aeac1mr4748361pjb.161.1661798540015; Mon, 29 Aug 2022 11:42:20 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:6452:0:b0:50d:aaa9:b359 with SMTP id y79-20020a626452000000b0050daaa9b359ls4513819pfb.3.-pod-prod-gmail; Mon, 29 Aug 2022 11:42:19 -0700 (PDT) X-Received: by 2002:a63:231a:0:b0:429:fb01:3c5d with SMTP id j26-20020a63231a000000b00429fb013c5dmr14578230pgj.583.1661798539117; Mon, 29 Aug 2022 11:42:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661798539; cv=none; d=google.com; s=arc-20160816; b=TpMbqI1uWRZFBMUSDfKAtcBCFvzgGLmUQyPFJdT36/WHCfSaXowF8K2yJav5uz3gpN igURl5m0O+WpcFZ/Y4+OJ+UtA1oJJ3INDH36CQtvFLBlEQISheJpyPsQiQbx0ZvWAcDW gz9uxDmupr3XmUz2ZEY6mzOk8jrW6TeywkQOiR0R5cCVHpxaPXeeeBeZO395RX2vbyn8 L6HZoXETuuD6z0/BwHJmJu+MK/2JKY49WkqJ6TeT+mBUtI9/yNjNEnKyV/CmYP6fElit CVxJz2Sv/x+9ir4qQjQdoa2PpCNLObcoSnypTxK6xwo/2CbrudOvSvTv+jr7JZ8J+7FE H5nw== 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=8WDhZieMsByGwgQC3v545Iffr6do/AWQnpqTM/oRp20=; b=m9R5tj4HzMhIEXUWrbiYFDGzvbxnhglnWe5sDmnkP6AVW69NDkyorIHfcOs4pOYUUz XCV1ToHpldthwmP6hf0q67Uw75tQ5CIA7gvaKLwV5XA2K6Cc0eiWbxm3LEwpK9YkMgO3 9hsCokRrDWmjtIPy4C7j02rzo9mMhq6ZNVZFYgM6ntHuv7dn6cAWK62Hnvb2BgWaN8/A hBsIBgxozKHliZhZnHjL/nIGfH5JqBFI40U9H5xCso2Ecdzi1FokqQjqlcVz/X7dC4Ow MhRD+q7KdPhDhlcIOYz7rVIrok1c4seJFnOw30FfWjlWD+nj2EzHwA+4SsZke/DpZ3Bl j7ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="kyEZ9/UC"; 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 w18-20020a1709027b9200b0016d72723946sor4139628pll.19.2022.08.29.11.42.19 for (Google Transport Security); Mon, 29 Aug 2022 11:42:19 -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:902:d2ca:b0:174:cbbc:3630 with SMTP id n10-20020a170902d2ca00b00174cbbc3630mr5789765plc.76.1661798538790; Mon, 29 Aug 2022 11:42:18 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a073:43f7:1644:6259:830d]) by smtp.gmail.com with ESMTPSA id k13-20020aa7998d000000b005385e2e86eesm1619042pfh.18.2022.08.29.11.42.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Aug 2022 11:42:18 -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 v4 12/12] drm: bridge: samsung-dsim: Add i.MX8MM support Date: Tue, 30 Aug 2022 00:10:31 +0530 Message-Id: <20220829184031.1863663-13-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220829184031.1863663-1-jagan@amarulasolutions.com> References: <20220829184031.1863663-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="kyEZ9/UC"; 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. v4: * none 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 f3b5e265b027..749b11e19217 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. */ } };