From patchwork Sun Dec 22 13:22:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 953 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 A1CB33F042 for ; Sun, 22 Dec 2019 14:29:42 +0100 (CET) Received: by mail-pg1-f197.google.com with SMTP id i8sf8659648pgs.3 for ; Sun, 22 Dec 2019 05:29:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1577021381; cv=pass; d=google.com; s=arc-20160816; b=KciXNYoEhX46LBsHbSyXtVApkeHY91C7gdJrwEvGEfX0+gflTCS1eXRLgCdU/yacVB mbBR1+E3IrRK21PwWI5wqZ+7Xval93IV0SzZXQ3CDlVCZpYkuNQ+J2MqLrn48IwKToWd HwxxNJavyevyYHyrZT5Z19euzNQETNrvG+jt4k+bTae0qO68zQoIKouu2WEueFVKsn4n Lmwkl+8kHqbCPEFHKLgBr4xNUfVDv0Ha1CL+chgV4Q6OQVr1+Gqzg4RrhxmcTJ0v9Ro4 E9fdKb6NlP41uIZLZAoljF1p+i1hy9ck47Jo8ucFN0usO52OkJIXk0Hqn4lEYcC+/Elf 8Yig== 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=idyllTPLxWLWQ2TIxNgVLFN6u1zw9e+o6TD3sj4p9ZM=; b=YRcO0UOtYtdZVUvG//FdexpfDviMkIICN4Lh56qhJhqUPLRmSAhB5gDARHWbyitaM0 YrKxMcjgbt8BEug0X4fPGvQ1rkqCrwwYXiymrbS7bNGhKbBm8cyaH6ycRFUsaefXUVDP +97fgXKuq0AB8kf00mxPwfGJLKv7qOstNjdj77ievPCtJ+qCSuDsyHJWFyp17LPQYlzW BSmh0usxaoqABBuLc2g9iKQUWZ+NAjA6VLuLg1tt0VSDAVlradhwR4ru5cH/cWaQyKP/ pHxGz6dKJNyvblslCdqwIDb6HDzZdieDKwY2fW5XO/ZeGBbUQHTQPfvAnECcXJCsqxQ7 rv3g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dNOsofgd; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@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=idyllTPLxWLWQ2TIxNgVLFN6u1zw9e+o6TD3sj4p9ZM=; b=DXoF+qfp0ansUMdkMOogufZ5Kd/R7XFl2pgV7F6zR+xCftIqURu8jrKpMOnAB1zwW5 RNAj12In3wtKOa910FDFEIwpUgW2M5YRk5kgB9wBwIDFAEww7Dc6fEvsWo3Z9M8JeYbx 0Gmht/3vjJ+ome0AIu+gQVgye2TlpJvc0ye3M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=idyllTPLxWLWQ2TIxNgVLFN6u1zw9e+o6TD3sj4p9ZM=; b=RLpbuf120BQjUIgjUsAzBLsBLnNR5dpw2fbkVcvqLPjHIJU0pGkCyeLA4iKbKCsQHp Fk5YxQ0fEJfphVD8GL85JBILzw25hn1RkINgm+6lkLw97d1NROV4tJBbyGLvxUW9yvcx d5DJk0mfktluJHwrgeTqcrgIgBbbQtrSxeFdQpEPqNcF+eNfw00EOaNAjcJ7x91Bs+4E khcgDi90Ag1gHiS45HFEILq0nEE1akZCryfcrbGewJEdvqtIzNPPbFtAbcmPCAXNjvR7 Fydn1mwmu+koyL6O2HfcMLy3INJ7skOUhC0WjfB3P96fKi9TpCtaySL8VTOSZKhBraK0 gfGg== X-Gm-Message-State: APjAAAWI8co664+b4ksoqjjWuwB+yc0s310AWjjDYDvZj9cxMD8NKcqy CII5UQ73rqRO+WNeQXDJL4RifSGO X-Google-Smtp-Source: APXvYqx9J/ZOkaT/Xfc8vHv/MA+SQcr9gw8wt9sZsUoCfiSViFVYTL+Vdu1Y6rCrOYRgxdjqU1/Y1g== X-Received: by 2002:a63:2d44:: with SMTP id t65mr27511193pgt.112.1577021381446; Sun, 22 Dec 2019 05:29:41 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:f8d:: with SMTP id 13ls3932404pjz.0.gmail; Sun, 22 Dec 2019 05:29:41 -0800 (PST) X-Received: by 2002:a17:902:8a8c:: with SMTP id p12mr12138472plo.6.1577021380867; Sun, 22 Dec 2019 05:29:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577021380; cv=none; d=google.com; s=arc-20160816; b=Hwa3idIaaeBbIPl/Lx/BXrHb2K5Tt3ibcOmUP+22WdNCtzNdMwRJRpHbzJePL8yD1x V2clUfR6vxOX42euZMw4YVVRHWpimBjljTSE5vIMGtpRfNauBooPSzOoTz0a6bblfODW YzIDHiOffHDvzAHwB9OMcPlbJGgcCGrUEYpmdRPY3CUOKo/pVI3lIO0xq1NJPd3EXUvF EmT7uji2flYQw4VIQrXJRAe/wT3CpQ8/eim6k91S10oOrvckpQe9ZsnMy5dh7U/bUR4I tabLSJNko3ZjQpqkmyJN/zRBTf29Qxm8KJAPwJTAjDZ1635GpUw/xT+VOtS/ge8be+sk g/GA== 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=NRAz4ZoqKI0Nd9TLnyy5Bof8VE4wzHjzOviJFUDWFYU=; b=EnnG3mu+IovS0J9rpJq4Lk+VlE9BJxEOt+1SktxFFDwmdvXGG9GHsYSlI2ghZhzDQr ZHQXml1pFNAaIEUVFTNQ4MLBYwjEDYwdL8BVcTcJFq71Kachi9cDwwRb2ZjnBGqACoyv x4kLQfpwqLR20TGdOYumyR5EQu248aMdcNak2Z0iitye+bdQ0aiAHNrQU6NrvESUODtF kC4sUjiwq+PDk/mFrgWoXhgMzHozgFObFlH6arOy+AbdCaylGlHdcNnnmb82tT7NkC6W hYRIm0C2KtFCWF6pG2gmUFK/v0R1cVWBbtlJRcNPLrLX3jtbtRuX2Yh0yi1e04QqbmzJ c6qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dNOsofgd; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id 31sor17151548plf.52.2019.12.22.05.29.40 for (Google Transport Security); Sun, 22 Dec 2019 05:29:40 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:90a:a4c4:: with SMTP id l4mr27148361pjw.48.1577021380573; Sun, 22 Dec 2019 05:29:40 -0800 (PST) Received: from localhost.localdomain ([49.206.202.16]) by smtp.gmail.com with ESMTPSA id o2sm12073058pjo.26.2019.12.22.05.29.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Dec 2019 05:29:40 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland Cc: michael@amarulasolutions.com, Icenowy Zheng , linux-sunxi , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v14 3/7] drm/sun4i: dsi: Get the mod clock for A31 Date: Sun, 22 Dec 2019 18:52:25 +0530 Message-Id: <20191222132229.30276-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191222132229.30276-1-jagan@amarulasolutions.com> References: <20191222132229.30276-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=dNOsofgd; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@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: , As per the user manual, look like mod clock is not mandatory for all Allwinner MIPI DSI controllers, it is connected to CLK_DSI_SCLK for A31 and not available in A64. So, add compatible check for A31 and get mod clock accordingly. Tested-by: Merlijn Wajer Signed-off-by: Jagan Teki --- Changes for v14: - none drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index c958ca9bae63..68b88a3dc4c5 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -1120,10 +1120,13 @@ static int sun6i_dsi_probe(struct platform_device *pdev) return PTR_ERR(dsi->reset); } - dsi->mod_clk = devm_clk_get(dev, "mod"); - if (IS_ERR(dsi->mod_clk)) { - dev_err(dev, "Couldn't get the DSI mod clock\n"); - return PTR_ERR(dsi->mod_clk); + if (of_device_is_compatible(dev->of_node, + "allwinner,sun6i-a31-mipi-dsi")) { + dsi->mod_clk = devm_clk_get(dev, "mod"); + if (IS_ERR(dsi->mod_clk)) { + dev_err(dev, "Couldn't get the DSI mod clock\n"); + return PTR_ERR(dsi->mod_clk); + } } /*