From patchwork Mon Dec 10 11:52:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 68 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f69.google.com (cartago.priv [10.11.12.1]) by cassiopea (Postfix) with ESMTPS id CE3C92E549C for ; Mon, 10 Dec 2018 12:53:34 +0100 (CET) Received: by mail-wr1-f69.google.com with SMTP id w12sf3368403wru.20 for ; Mon, 10 Dec 2018 03:53:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1544442814; cv=pass; d=google.com; s=arc-20160816; b=TCK0qtwtOAyp6b8n8ItoC4ZpRx13N7O7aDpFBtIGdL0cC8hViMpe5LZKhFzgDZuAt+ p2Nv7UBACPdvYm9a07N1vE6y0SrddU/8XPuQP3T+eXBJu2Iyg8YWDmBxkWGKDRNwMhSx +RaXTf83pDCFc7XamReJzwNJeJTaVOrjDEE0QRFf/2ja8nOKd/UYxVLFVHTqe4fCHl7H FlipGsGKaNg3e1wI+ZdOa8qd/j3gvzvpSrMwErFa4tAQ4n5MhxtIBWg8HQ5Qr+4PEXL+ PuyKxpGvboAh2APIJbxwPjIT2PnQhITU+vDCe79GA8bPPvo2aBRWhF1y8b80igRhNrUM jAsA== 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=+Bcn7Nsev8NGAHdGxA2CyTs91LsMBI3kRpXrLo25w3c=; b=gq1FNYGJ1NVUIm8G+qiat8eSBQxDr++yVDdokUcdqGpoJqGUQoXCV7v6srczhobeFA J/7Qw4W/wRr6pYxxqLJW3yaule0jy2onbCo+i2aGsfj5MtOjJ26iXn2FRwITec53Fy/w dH/VGifGfS38gyshAYccXW08vZe1xcIp3+m4fhSCJVGuJDz9SUX9hdpJj1IgAeEt7SWU bRdiLEEcc9cS+W1eFjU1xKfCe1KtVwJmxeGugHh1llqv3Eva7cJlpaR79KtnoiDJQ8TM OaFsB2CGKG3VVNGVgqnFWeIph2gz8bbrE6ePaSgDpszVrJMlXIeaph6JOK7uV1trsH/0 mKkQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YjpI9uyv; 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=+Bcn7Nsev8NGAHdGxA2CyTs91LsMBI3kRpXrLo25w3c=; b=q4Y0MM2NJNdih197SIywpm61VQb1rsyhNluPElKN3ogLH4OU8LE6EYSeJfkBw/3Lmb JgCN4RvMTfnSMvbVR823aRrxL+FxMJ+yjQyC6Q1DXLL7pdwoZ9kMokxsoWvgJbt2xMhP 86D5V5N7JhePAUosLDR9FGUWNGdDGWrbgDDEU= 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=+Bcn7Nsev8NGAHdGxA2CyTs91LsMBI3kRpXrLo25w3c=; b=YVKiyw4v1O98mX9hL9rYIkYWGZR+Tr/33uk4lmgHxU0bVG2sY7DI/FjnDaqtw49CJB RuDpgDpwEYbv4GicHixgQQJArLfz/ByBgBGdztAMvyeFb/wa9Ph3gvw3UngZoXnW76Io CwnKFxWimJHDsy8jSSkw2OBLrgd0oskixFPfGfQbi4O0cmwL0vrTUL2zymbsRPzFkuYb x4EIrWsjSIlnUVImLFfKGzcUNaC87X3wg/nSx1XqAjGpCQs2cOci5v94ddQe08pHBQA5 KXmgwfDZKS52qBsmFr3+uIfitGaKahVuPX7+F/pjnEa3ZssBrx267kR1iByALID6pRl5 D28Q== X-Gm-Message-State: AA+aEWYBZUYqiLi5kp9fRE0if3aWu9hE1Nnjp0kRCSkvM9XV5QbuPRoy UTRtWiheJgW9/SS6DW5sFXYT82y2 X-Google-Smtp-Source: AFSGD/UxEfW8LHN+BZTxr8RjwNh7BJuw7JN36fT9452RAAHxr+Gb9EteVEPdz3vZCf89upWx0bTT6A== X-Received: by 2002:a1c:2088:: with SMTP id g130mr1124546wmg.6.1544442814525; Mon, 10 Dec 2018 03:53:34 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a1c:7902:: with SMTP id l2ls1579347wme.8.gmail; Mon, 10 Dec 2018 03:53:34 -0800 (PST) X-Received: by 2002:a1c:1593:: with SMTP id 141mr4127211wmv.85.1544442814093; Mon, 10 Dec 2018 03:53:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544442814; cv=none; d=google.com; s=arc-20160816; b=t6CordvCMM5qjemJIDhXG7bKU5LbGY6HfNfHBRR2hlV0TBWvd1waTFatTAKYWHUfyI N3+W+o7E/ydsRvSL0/0i6K8olRMrk+9Enkz3OLXo5vmp5rRGaOPZ9GGlTzXlHoUmBZuA T/sWz/n49ZRd4dGD3heuf7lsuaxs7d2UNvtjtqFhGxARoev776xq3CKBGrz+OM3PROA+ 9TK+jb45a22hj/zNqz+3U4cAA0DRAfj5jUz0A+DUsJVornEZ+/lIu2VE9lY1Sb8x3Ic0 bb/4oaHMyJmOsYOHq58t9AdHaB5hYIDHlui5o76Gav3U662ZH5LLn6nhZuaV+zx2Zwrr ECBg== 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=+Bcn7Nsev8NGAHdGxA2CyTs91LsMBI3kRpXrLo25w3c=; b=Sono5Y7vkRwdM9LZ202Aq76XBKv3C+SKQn8JQv0FYBFIprBHOzepl2w5Mi6Sa+sKcv 7rwuYwHwPLtxvKKLHDcPU05uHwH/M89F8qn8EDtTaRuzLiLds7Jtcp/IDWRCfXvWmkkL p8paXn5HaC+j1uNnWZAuPQ0EseQMrnJD3uEO14uKCKTVgB+j+uoPbiEp/xEoE3ZdE1Ha e+V5CzRWOrFmoOBBYkVQtE4QRCXD+pqin1q+GDxhb77Iwh62HY5ys6S8+oDT7rVIhL5a yeELJkXxEI2bve9cU7JnTaLAC9VpvYsOm1YEEJ+HwDCffyjsTua3UUo9chdht5MxuH11 6O+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YjpI9uyv; 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 g84sor7534022wmg.19.2018.12.10.03.53.34 for (Google Transport Security); Mon, 10 Dec 2018 03:53:34 -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:ac85:: with SMTP id v127mr9183651wme.62.1544442813661; Mon, 10 Dec 2018 03:53:33 -0800 (PST) Received: from localhost.localdomain (ip-162-59.sn-213-198.clouditalia.com. [213.198.162.59]) by smtp.gmail.com with ESMTPSA id b16sm7869243wrm.41.2018.12.10.03.53.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 03:53:33 -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 v3 3/6] media: sun6i: Set 300MHz mod clock for A64 Date: Mon, 10 Dec 2018 17:22:43 +0530 Message-Id: <20181210115246.8188-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181210115246.8188-1-jagan@amarulasolutions.com> References: <20181210115246.8188-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=YjpI9uyv; 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: , The default CSI_SCLK seems unable to drive the sensor to capture the image, so update it to working clock rate 300MHz 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 bbe45e893722..4b872800b244 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 need 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");