From patchwork Tue Dec 18 11:33:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 104 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f72.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id 0A6F72E550E for ; Tue, 18 Dec 2018 12:33:36 +0100 (CET) Received: by mail-wr1-f72.google.com with SMTP id d11sf5210486wrw.4 for ; Tue, 18 Dec 2018 03:33:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1545132815; cv=pass; d=google.com; s=arc-20160816; b=LvfzXPw8oib+AhbA1SLJ968WsuFUHZhKb0E3pokEY4goIVrffaHeYZBDahiDmNekrw z1dtn7Hgu+2cvEv2NxVvlUo6lM1rKnRGuJ/C3jVwiNB1+0gb/UcshNAwBo3AwIOmkjJy DSmwZ9FCL6l1vomp3S19+DkZRN70dybWOk/WFRifpmdPYXnaXVkifSLv+OX4RATkvdmJ Oqq4nb09illt9hNa0L8oHJW59h5E67t7z2qiUrNF+fW6hLB1cujlqFKiWtZ8r8+C8aI6 sk5susSoTlqcYqQRJvUyNa0f+B64ig2ivzsa5eNz1XqUdvb9bbRhJuimTaQF7ukZzr/o C4ng== 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:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6G+51hXPmeJR9ykNhp8vQ9iLEEAvCO5U6f8uZ2c4pz0=; b=DKuIEUjkOPWkF13qRzfbEcB/BxQ85eauPkk6ajUpVm2B+gEUiIxgLl7bMh/IjvpjSQ 7J7AzWIvxVdnearuC7crQv6n6XeKYuHeGI+XlPHZz/+Ot3PVXdwalp7pXad+T5PTHsig brnL0rn2n9kp3d58W1COMRgDf2L5te8TXHTPBrGncVWVFo/sCuFfZ25WWcHgW6FCjUE9 tcTf6Q2+4LO2DHdC5UnJ3e9BGkUAE5ILgGsJN2WpsLfkekUK3U1GdAYYkhPC79DjkTP4 HVL17aCeh1jtxbGgTb1iolWgpEPC/nbkFrX+3jjIi7fl8n6qNihzpMW3cW9ho6YqmTwY 0T9Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="m/xol0We"; 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:content-transfer-encoding:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=6G+51hXPmeJR9ykNhp8vQ9iLEEAvCO5U6f8uZ2c4pz0=; b=gywXDx3wgm/SeiljAnb/TVeD2X3oLstntGmUSCfFH6Ane0oMBQJoEbRLWwPOJhDu8C mpax/SVxMLG6CLcfhmCtctgRLtbOC2VJdejqJWiK4CbQgTfqPziC2zW5pUmYfELPNwlm rztxHxPmvTxE+7OjJ3b4kYE3BgE+taTq3zqzw= 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:content-transfer-encoding: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=6G+51hXPmeJR9ykNhp8vQ9iLEEAvCO5U6f8uZ2c4pz0=; b=pDe1XPEkFqPYj31KnY3JtNz16CnrNeR93aubSBHKM4pDc6TH2d4qM0eP+v/AttC+q4 ezPuNLXBW+jYyAszs7HttLtE0CLQZ9f3m7njyXw5ZTQHw1otMFelYOoQXQ6O1XLwGUW7 PjSi3WG2n0j5Odn2T0D854makt9qnoSVo7iSyYZ/gIarZnZ79t8VeKZww7Qmu/twZZ8T YPeYX3H22nCfvrtNbo1N+pD8Jy5drI8J0D1hIHq8X2JA/RDD9sJYOZW5hrpk/t4XShW5 C2b6RtKbqrvNh9W4A4qmHADejZHkvJTVU065fR4rL8Muk1jcR77bvr//AhzVztIf0k8X mwpQ== X-Gm-Message-State: AA+aEWYrhdXiudu4A8kJ6fB0/BrNv6wh/iFTHX+e+8jU/U6pixWIJfI4 h22JzyrML2tmTWmWOjKd3xR6lHxv X-Google-Smtp-Source: AFSGD/UUwOpnMFqE/kthlHi5VRm2IqarwkyZ28C+V4aEtsBhScu7MVqJT9WHJ6M9v/3+W7uVg+Q6iA== X-Received: by 2002:a1c:af89:: with SMTP id y131mr298471wme.18.1545132815754; Tue, 18 Dec 2018 03:33:35 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a1c:a9d1:: with SMTP id s200ls157392wme.2.canary-gmail; Tue, 18 Dec 2018 03:33:35 -0800 (PST) X-Received: by 2002:a1c:9ed7:: with SMTP id h206mr2724767wme.28.1545132815314; Tue, 18 Dec 2018 03:33:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545132815; cv=none; d=google.com; s=arc-20160816; b=rEfXUe8OI6/l7uu1JaRnh4C8HT/JDKuGjYM8BSUPdMC2S5gEEKLUVC0ISUJ0U3/ACJ h4Zse4E5AstADVU2R1Bd1sixOciKUWhbwGnbjBmRBjmolnVs5J+w8/I+W42qFTFGCEKP CWKkkR8P+2HliJxlHgBwdfFTu21aPUyFjEff9nHkCPriqseKB5UyhmSjS/SavE77H+SP faMxpqifolKtsOq5nT4PyJmqs6mo/qXfdN3taJLBw6w1SYX9Jmnuto2vdfNF5+1314w4 icnN+JQfepAru7n+8WAbLd5JqZ4yzMv+FY/W19dHCzqN8a42B9GIYt4RiiUjW3D84fYB YnZw== 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=6G+51hXPmeJR9ykNhp8vQ9iLEEAvCO5U6f8uZ2c4pz0=; b=ngNmG7qfrS3QzdjmWFeYnsgjRihKIh3yE/bu+y79i0PaVYkVpA7geTIBQfq9JvCzCB vS/lDUGpOMpoZQfNnQPcPefF3OSBh8zt+onGxJBjdR0fPvMZ4ts6amZAnn5vTJIW1Niy KufZd0X752p8rmYhA+o2EFaWaKhlCn5MY5Za7dUC505d+UvjFuvDGAWtLTHE1KhXxFL9 HtIJOiI+8LcmisjUd7KxPkDjVcTZbgIGjzrKzqDhuMVkt9oeNyanhjxjJAZggyqme/Bx WobGS4T7nSxze8ddkele6trtD63OFYSa7yVDPfuu7STBQpQk/C/h1jjuZd6FQ7n+E2Ge q8BA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="m/xol0We"; 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 r134sor1480492wmg.20.2018.12.18.03.33.35 for (Google Transport Security); Tue, 18 Dec 2018 03:33:35 -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:a1c:1286:: with SMTP id 128mr3000248wms.70.1545132815033; Tue, 18 Dec 2018 03:33:35 -0800 (PST) Received: from jagan-XPS-13-9350.homenet.telecomitalia.it (host230-181-static.228-95-b.business.telecomitalia.it. [95.228.181.230]) by smtp.gmail.com with ESMTPSA id h2sm4276184wrv.87.2018.12.18.03.33.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Dec 2018 03:33:34 -0800 (PST) From: Jagan Teki To: Yong Deng , Mauro Carvalho Chehab , Maxime Ripard , Rob Herring , Mark Rutland , Chen-Yu Tsai , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi , linux-amarula@amarulasolutions.com, Michael Trimarchi Cc: Jagan Teki Subject: [PATCH v4 3/6] media: sun6i: Update default CSI_SCLK for A64 Date: Tue, 18 Dec 2018 17:03:17 +0530 Message-Id: <20181218113320.4856-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181218113320.4856-1-jagan@amarulasolutions.com> References: <20181218113320.4856-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="m/xol0We"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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: , Unfortunately A64 CSI cannot work with default CSI_SCLK rate. A64 BSP is using 300MHz clock rate as default csi clock, so sun6i_csi require explicit change to update CSI_SCLK rate to 300MHZ for A64 SoC's. So, set the clk_mod to 300MHz only for A64. Signed-off-by: Jagan Teki --- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c index 9ff61896e4bb..91470edf7581 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c @@ -822,6 +822,11 @@ static int sun6i_csi_resource_request(struct sun6i_csi_dev *sdev, return PTR_ERR(sdev->clk_mod); } + /* A64 require 300MHz mod clock to operate properly */ + if (of_device_is_compatible(pdev->dev.of_node, + "allwinner,sun50i-a64-csi")) + clk_set_rate_exclusive(sdev->clk_mod, 300000000); + sdev->clk_ram = devm_clk_get(&pdev->dev, "ram"); if (IS_ERR(sdev->clk_ram)) { dev_err(&pdev->dev, "Unable to acquire dram-csi clock\n");