From patchwork Mon Oct 25 03:10:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nobuhiro Iwamatsu X-Patchwork-Id: 12580621 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F667C433F5 for ; Mon, 25 Oct 2021 03:12:19 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3E57660E08 for ; Mon, 25 Oct 2021 03:12:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3E57660E08 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=toshiba.co.jp Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=i8GCpASjOphkt+oxjEH9hdE5fpUAVgO3ylNIi3m7654=; b=XARD1z15OfaEuz mwCvMuc1sCfNMFzVRhLSpa19lihehU47yna8VfEXwXy47hzNlf0/Q8IZgljNOgtH8PPyl85bsS8zE SQ+bqxjkjjbptEfOYwv5r6Na4loqvC8apaQH0EVhb+hVCQkz8EB7OTpELLSL9rJJmK0XUoRzMgc2v i5Ldzh7ldlfCm0o0nDqRwnRN7oflxy8gFeMbc3v3rTCczdLNZFlVgtGOp3M1QwWaD5M5I4+IkwEVQ oWI0JTs3i/UTKclfmhMdirOc0dnAyuj68rRem+iFLW4YdAxhls4eGzPalsoIZgBw5V+e2aIXsycHm CRnZ7+fUm9vBxtgMBz3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1meqO3-00F4xw-Pg; Mon, 25 Oct 2021 03:10:59 +0000 Received: from mo-csw1515.securemx.jp ([210.130.202.154] helo=mo-csw.securemx.jp) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1meqNy-00F4vp-5S for linux-arm-kernel@lists.infradead.org; Mon, 25 Oct 2021 03:10:56 +0000 Received: by mo-csw.securemx.jp (mx-mo-csw1515) id 19P3AhKR003229; Mon, 25 Oct 2021 12:10:44 +0900 X-Iguazu-Qid: 34tIWSYHCieujeRQRA X-Iguazu-QSIG: v=2; s=0; t=1635131443; q=34tIWSYHCieujeRQRA; m=RK/Bg2T8APxsmPrQXug5NkOjYxXvMIPYIDMolk3DfcQ= Received: from imx2-a.toshiba.co.jp (imx2-a.toshiba.co.jp [106.186.93.35]) by relay.securemx.jp (mx-mr1512) id 19P3AfXF019206 (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 25 Oct 2021 12:10:42 +0900 Received: from enc01.toshiba.co.jp (enc01.toshiba.co.jp [106.186.93.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by imx2-a.toshiba.co.jp (Postfix) with ESMTPS id B7BEB1000CA; Mon, 25 Oct 2021 12:10:41 +0900 (JST) Received: from hop001.toshiba.co.jp ([133.199.164.63]) by enc01.toshiba.co.jp with ESMTP id 19P3Af6w004067; Mon, 25 Oct 2021 12:10:41 +0900 From: Nobuhiro Iwamatsu To: Michael Turquette , Stephen Boyd , Rob Herring Cc: punit1.agrawal@toshiba.co.jp, yuji2.ishikawa@toshiba.co.jp, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Nobuhiro Iwamatsu Subject: [PATCH v5 0/4] clk: visconti: Add support common clock driver and reset driver Date: Mon, 25 Oct 2021 12:10:34 +0900 X-TSB-HOP: ON Message-Id: <20211025031038.4180686-1-nobuhiro1.iwamatsu@toshiba.co.jp> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211024_201054_440416_2AE702C7 X-CRM114-Status: GOOD ( 16.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, This series is PLL, clock and reset driver for Toshiba's ARM SoC, Visconti[0]. Since the clock driver and reset driver are provided as one function, they are provided in cooperation with the clock driver. This provides DT binding documentation, device driver, MAINTAINER files. Best regards, Nobuhiro [0]: https://toshiba.semicon-storage.com/ap-en/semiconductor/product/image-recognition-processors-visconti.html dt-bindings: clock: Add DT bindings for PLL of Toshiba Visconti TMPV7708 SoC v4 -> v5: - Add Reviewed-by: Rob Herring . v3 -> v4: - Fix node name to clock-controller. - Remove osc2-clk-frequency, and this defines to DT as fixed-clock. - Add clocks. v2 -> v3: - Change file name. v1 -> v2: - Update subject. dt-bindings: clock: Add DT bindings for SMU of Toshiba Visconti TMPV7708 SoC v4 -> v5: - Add Reviewed-by: Rob Herring . - v5: Update to use syscon. v3 -> v4: - Move reset dt-binding header file. - Move clock dt-binding header file. - Change dt-binding header's License to 'GPL-2.0-only OR BSD-2-Clause' - Fix node name to clock-controller. v2 -> v3: - Change file name. v1 -> v2: - Update subject. clk: visconti: Add support common clock driver and reset driver v4 -> v5: - Makefile/Kconfig Update Kconfig with using COMPILE_TEST - clkc-tmpv770x.c Fix location of include file. Fix to use clk-provider.h. Update clock flags in pietherpll_clk_gate_tables and others. Use lowercase hex. Update to use syscon. Update to use platform driver instead of CLK_OF_DECLARE_DRIVER. - clkc.c Fix check of visconti_gate_clk_is_enabled. Drop visconti_gate_clk_is_enabled in visconti_gate_clk_enable(). Drop unnecessary comment. Update to use clk_parent_data instead of parent_names. Update to use devm_clk_hw_register(). Update to use struct device in visconti_clk_register_gate(). Update to get structure size from pointer with sizeof(). - clkc.h Update struct visconti_clk_gate_table to using struct clk_parent_data. Drop flags in struct visconti_clk_gate. - pll-tmpv770x.c Use lowercase hex. Update to use platform driver instead of CLK_OF_DECLARE_DRIVER. Update to use size_t in visconti_pll and move position. Update use FIELD_GET(). Drop braces. Use const point in visconti_get_pll_rate_from_data(). Update to comparison by memcmp in visconti_get_pll_rate_from_data(). Drop unnecessary comment. Drop unnecessary print. Drop unnecessary lock and unlock. Drop visconti_pll_is_enabled in visconti_pll_enable(). Drop unused flags. Update to use clk_hw_register(). Drop to use kmemdup(). - pll.h Drop __init. v3 -> v4: - Remove osc2 clock's code. Move to DT. v2 -> v3: - Fix return value in visconti_register_pll(). - Remove initialization of flags used by spin_lock_irqsave(). - - Change function name from *7708* to *770x*. - Fix some coding style. v1 -> v2: - Fix warning with W=1 MAINTAINERS: Add entries for Toshiba Visconti PLL and clock controller v4 -> v5: - no update. v3 -> v4: - no update. v2 -> v3: - Change path of DT binding files. v1 -> v2: Nobuhiro Iwamatsu (4): dt-bindings: clock: Add DT bindings for PLL of Toshiba Visconti TMPV770x SoC dt-bindings: clock: Add DT bindings for SMU of Toshiba Visconti TMPV770x SoC clk: visconti: Add support common clock driver and reset driver MAINTAINERS: Add entries for Toshiba Visconti PLL and clock controller .../clock/toshiba,tmpv770x-pipllct.yaml | 57 +++ .../clock/toshiba,tmpv770x-pismu.yaml | 52 +++ MAINTAINERS | 3 + drivers/clk/Kconfig | 1 + drivers/clk/Makefile | 1 + drivers/clk/visconti/Kconfig | 9 + drivers/clk/visconti/Makefile | 5 + drivers/clk/visconti/clkc-tmpv770x.c | 291 +++++++++++++++ drivers/clk/visconti/clkc.c | 206 +++++++++++ drivers/clk/visconti/clkc.h | 76 ++++ drivers/clk/visconti/pll-tmpv770x.c | 85 +++++ drivers/clk/visconti/pll.c | 339 ++++++++++++++++++ drivers/clk/visconti/pll.h | 62 ++++ drivers/clk/visconti/reset.c | 107 ++++++ drivers/clk/visconti/reset.h | 36 ++ include/dt-bindings/clock/toshiba,tmpv770x.h | 181 ++++++++++ include/dt-bindings/reset/toshiba,tmpv770x.h | 41 +++ 17 files changed, 1552 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/toshiba,tmpv770x-pipllct.yaml create mode 100644 Documentation/devicetree/bindings/clock/toshiba,tmpv770x-pismu.yaml create mode 100644 drivers/clk/visconti/Kconfig create mode 100644 drivers/clk/visconti/Makefile create mode 100644 drivers/clk/visconti/clkc-tmpv770x.c create mode 100644 drivers/clk/visconti/clkc.c create mode 100644 drivers/clk/visconti/clkc.h create mode 100644 drivers/clk/visconti/pll-tmpv770x.c create mode 100644 drivers/clk/visconti/pll.c create mode 100644 drivers/clk/visconti/pll.h create mode 100644 drivers/clk/visconti/reset.c create mode 100644 drivers/clk/visconti/reset.h create mode 100644 include/dt-bindings/clock/toshiba,tmpv770x.h create mode 100644 include/dt-bindings/reset/toshiba,tmpv770x.h