From patchwork Sun Jul 9 13:28:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 9831811 X-Patchwork-Delegate: sboyd@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CC04A602BD for ; Sun, 9 Jul 2017 13:28:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BAADD27FB7 for ; Sun, 9 Jul 2017 13:28:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF4A9283C4; Sun, 9 Jul 2017 13:28:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4337D283C7 for ; Sun, 9 Jul 2017 13:28:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752354AbdGIN2q (ORCPT ); Sun, 9 Jul 2017 09:28:46 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:36242 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752257AbdGIN2p (ORCPT ); Sun, 9 Jul 2017 09:28:45 -0400 Received: by mail-wr0-f194.google.com with SMTP id 77so18766446wrb.3; Sun, 09 Jul 2017 06:28:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VMmHbUUkBZQGCrz9vts7S8G4SLeevUYaCQrU3EGWe2Y=; b=DyuOprvxdzRy0joTP68JNwPNOWrWa2dQp9HhXzrSrv0enBwkfUb4YYvWYAMY74iuio DVp+TuCDNPBW73P3MS4DoY3/8mcRK5oWMKeNlolncxs2H2x6tY84RMXbFDX3tVXkuU06 BxE337OYbwI+FOXF3j9BZ2ZOzlatpMWWZksRxZYvyzky/Dsxn89yncr+ojnIAnk2BCzz YuyoGacHFy0qWhuqnOyxkZW83F+47ketF4yDwxp5Ay/AwTd6fPrqmSkaC1+t/1xn5Arr jM5ZBmH9DptXPDJaKdHK2SJxA7OEfY8on6Z30RoYce4yjFmFEhdZwRyiZ09HnHkzyRL4 P2Cw== 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; bh=VMmHbUUkBZQGCrz9vts7S8G4SLeevUYaCQrU3EGWe2Y=; b=YXxV4jDSxTIE3KN7rzV1x1LldDwuoA7y400f43gHFg/sYmQllWhDID+qZiR3AVzE4Z oaT5Qd6BE/POzZn1ZJE5ediCq52waJ/4LSvhwDvabtiBZSoZdjxU5smVVrRX0fZNzg0F 2Dnyf1JS+r9tDrsBeF6XeYqmLiao7zY7cYkXmGxuq62UUkopTKuc28W0/8Dxk5Gj+8Jz JXelzV8EzJGdLuRU8yhZF1zpYOqVPCKdkyihSKsZKrTsBNvmYNczd5KpgG7fKKcmJz1s PRFe9Y0yTqU0aklDA/oRRomcuitDAVVtXFlM7rw8gpHK2lYnvEOShuJFB785ZiPrsnXj sf/w== X-Gm-Message-State: AIVw111ATSh7i33IIsaN2jJ+pH+ETGYTKDEGJHuOCyr+ty8tqo0bcUz8 jb2aPwfhlDJ4gFPXx0E= X-Received: by 10.223.153.65 with SMTP id x59mr4776855wrb.32.1499606923524; Sun, 09 Jul 2017 06:28:43 -0700 (PDT) Received: from kurokawa.lan (ip-86-49-107-50.net.upcbroadband.cz. [86.49.107.50]) by smtp.gmail.com with ESMTPSA id o197sm8482585wmd.9.2017.07.09.06.28.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Jul 2017 06:28:42 -0700 (PDT) From: Marek Vasut X-Google-Original-From: Marek Vasut To: linux-clk@vger.kernel.org Cc: Marek Vasut , Alexey Firago , Stephen Boyd , Michael Turquette , Laurent Pinchart , linux-renesas-soc@vger.kernel.org Subject: [PATCH V3 8/8] clk: vc5: Add support for IDT VersaClock 5P49V6901 Date: Sun, 9 Jul 2017 15:28:14 +0200 Message-Id: <20170709132814.2339-8-marek.vasut+renesas@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170709132814.2339-1-marek.vasut+renesas@gmail.com> References: <20170709132814.2339-1-marek.vasut+renesas@gmail.com> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Update IDT VersaClock 5 driver to support IDT VersaClock 6 5P49V6901. This chip has two clock inputs (external XTAL or external CLKIN), four fractional dividers (FODs) and five clock outputs (four universal clock outputs and one reference clock output at OUT0_SELB_I2C). Signed-off-by: Marek Vasut Cc: Alexey Firago Cc: Stephen Boyd Cc: Michael Turquette Cc: Laurent Pinchart Cc: linux-renesas-soc@vger.kernel.org Tested-by: Laurent Pinchart on Salvator-XS with the display LVDS output. --- V2: - Reword the commit message to explicitly mention the VC5 driver and the added support for VC6. - Mention VC6 in Kconfig V3: None --- drivers/clk/Kconfig | 6 +++--- drivers/clk/clk-versaclock5.c | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig index d406b087553f..99adcb0d799c 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -210,14 +210,14 @@ config COMMON_CLK_OXNAS Support for the OXNAS SoC Family clocks. config COMMON_CLK_VC5 - tristate "Clock driver for IDT VersaClock5 devices" + tristate "Clock driver for IDT VersaClock 5,6 devices" depends on I2C depends on OF select REGMAP_I2C help ---help--- - This driver supports the IDT VersaClock5 programmable clock - generator. + This driver supports the IDT VersaClock 5 and VersaClock 6 + programmable clock generators. source "drivers/clk/bcm/Kconfig" source "drivers/clk/hisilicon/Kconfig" diff --git a/drivers/clk/clk-versaclock5.c b/drivers/clk/clk-versaclock5.c index d0406b62133a..c894db298cbd 100644 --- a/drivers/clk/clk-versaclock5.c +++ b/drivers/clk/clk-versaclock5.c @@ -131,6 +131,7 @@ enum vc5_model { IDT_VC5_5P49V5923, IDT_VC5_5P49V5933, IDT_VC5_5P49V5935, + IDT_VC6_5P49V6901, }; /* Structure to describe features of a particular VC5 model */ @@ -686,6 +687,7 @@ static int vc5_map_index_to_output(const enum vc5_model model, return (n == 0) ? 0 : 3; case IDT_VC5_5P49V5923: case IDT_VC5_5P49V5935: + case IDT_VC6_5P49V6901: default: return n; } @@ -923,10 +925,18 @@ static const struct vc5_chip_info idt_5p49v5935_info = { .flags = VC5_HAS_INTERNAL_XTAL, }; +static const struct vc5_chip_info idt_5p49v6901_info = { + .model = IDT_VC6_5P49V6901, + .clk_fod_cnt = 4, + .clk_out_cnt = 5, + .flags = VC5_HAS_PFD_FREQ_DBL, +}; + static const struct i2c_device_id vc5_id[] = { { "5p49v5923", .driver_data = IDT_VC5_5P49V5923 }, { "5p49v5933", .driver_data = IDT_VC5_5P49V5933 }, { "5p49v5935", .driver_data = IDT_VC5_5P49V5935 }, + { "5p49v6901", .driver_data = IDT_VC6_5P49V6901 }, { } }; MODULE_DEVICE_TABLE(i2c, vc5_id); @@ -935,6 +945,7 @@ static const struct of_device_id clk_vc5_of_match[] = { { .compatible = "idt,5p49v5923", .data = &idt_5p49v5923_info }, { .compatible = "idt,5p49v5933", .data = &idt_5p49v5933_info }, { .compatible = "idt,5p49v5935", .data = &idt_5p49v5935_info }, + { .compatible = "idt,5p49v6901", .data = &idt_5p49v6901_info }, { }, }; MODULE_DEVICE_TABLE(of, clk_vc5_of_match);