From patchwork Fri Aug 10 09:51:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 10562533 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C6E7E139A for ; Fri, 10 Aug 2018 09:52:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B7ADD2B518 for ; Fri, 10 Aug 2018 09:52:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB16B2B681; Fri, 10 Aug 2018 09:52:36 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 567902B518 for ; Fri, 10 Aug 2018 09:52:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject: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=8AUfsDM0eEkTDp0UwKZxB5DueWIpcKXOmHVJaEKJudg=; b=kBX QIpyrwtyOfc7MBIuM1pWlroZztL5GI5OKUCQofOyFzIKoCzEk+6vRrIXP9/GKbcIq4sTXOaN0Uz2H gEJG2ohWd+tfN7epmqwtapC0ieIZL8LP4HVe6RBVcutFmydnPcKvfGef1l264hWFhHOcTnZhPnhkB aoZ5w9k0wA60WbJxj0jTb3+CMwAYBEQ8nMi4MQJaBYbpiDHKVpF1A/dVYGdyQ7m94h57Wiu4QDB7x bajbGgn6Ya4YdR/TNxLLgfqeAHt3JlPwI40ErNlUCJKdaNu0CAqY6H2Pqh2qcFXWtNJhPAi0gqu4k f04g2aQUIzfBPM5dKKv9EJnb33ke1bw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fo45w-0000wJ-OE; Fri, 10 Aug 2018 09:52:32 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fo45t-0000vD-J8 for linux-arm-kernel@lists.infradead.org; Fri, 10 Aug 2018 09:52:31 +0000 Received: by mail-pg1-x541.google.com with SMTP id y5-v6so4176169pgv.1 for ; Fri, 10 Aug 2018 02:52:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=B/Wq136zb0MCV57dOEVEM5K37uB2RSDGwJBOts+o2MQ=; b=I5fe8omdpFORiG1cLPYLGvAEqGavPStje+HQ18xjtYhAqiFTKDPlOfir1f8viGBITx XCrupjOnzUCkAsaIbooyz7WmAX2R6wXS7K7K6o1XfGVOCdDrmMyF2Y8zSFtZ4l3n+0Vj Bfg+ReR5h5k52VU5aFABfJizX2xMS/B7/WuUQ= 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; bh=B/Wq136zb0MCV57dOEVEM5K37uB2RSDGwJBOts+o2MQ=; b=Fq5bMy4PY4+Abby+WqwojFIdV74WL1NrG5Q94VSUoFQ8jooUjfxh/sYfZC0Yljm1Uu bniIUx3JuE1Y/FdGVk1LBcowYPJNhUbiTTLhMCRXQ8H2ETjn5Bzplb6y06y9i2+bpZ7q POp2jTpVbtMUAvBtqvgfoaGPUufxwMfQ1edIZFiBt+Ouqv5O83FfbRRRhZNaPLs1/whA 9PuTIS2pxHA/YU+oBG7QW+ufoF4Y9lcR4LtqoQB89LFoyPZkp9AJOdsF2oyCbkK4udYi sbPTSdch/YdClfTRblpGPE/LSCNznbZwMjtVhcnlia/LqleEUbFOCmIekLeZM6G4srOT GH5g== X-Gm-Message-State: AOUpUlF+8KvOoiOIB7pPJHq/rZlFU6ka5zX6wuu492yRW/V+iayxgLqe iQA7Km3zij7+JJ+A1Qrjy3ou X-Google-Smtp-Source: AA+uWPxsJO0211o8DKd6tGlsEN33gcaUzP8Y0o4y6BcjsHw4YIbdzxe51TDRlCS5e4lHnjz7crIOcQ== X-Received: by 2002:a62:4bc6:: with SMTP id d67-v6mr6269459pfj.175.1533894738258; Fri, 10 Aug 2018 02:52:18 -0700 (PDT) Received: from localhost.localdomain ([2409:4072:6391:e983:9562:f5f7:1a60:4363]) by smtp.gmail.com with ESMTPSA id n83-v6sm25315120pfk.19.2018.08.10.02.52.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Aug 2018 02:52:17 -0700 (PDT) From: Manivannan Sadhasivam To: p.zabel@pengutronix.de, mturquette@baylibre.com, sboyd@kernel.org, afaerber@suse.de, robh+dt@kernel.org Subject: [PATCH v3 0/9] Add Reset Controller support for Actions Semi Owl SoCs Date: Fri, 10 Aug 2018 15:21:04 +0530 Message-Id: <20180810095113.25292-1-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180810_025229_635661_EDF77C31 X-CRM114-Status: GOOD ( 14.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, daniel.thompson@linaro.org, manivannanece23@gmail.com, sravanhome@gmail.com, jeff.chen@actions-semi.com, thomas.liau@actions-semi.com, bdong@ucrobotics.com, liuwei@actions-semi.com, linux-kernel@vger.kernel.org, amit.kucheria@linaro.org, edgar.righi@lsitec.org.br, hzhang@ucrobotics.com, mp-cs@actions-semi.com, 96boards@ucrobotics.com, pn@denx.de, Manivannan Sadhasivam , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patchset adds Reset Controller (RMU) support for Actions Semi Owl SoCs, S900 and S700. For the Owl SoCs, RMU has been integrated into the clock subsystem in hardware. Hence, in software we integrate RMU support into common clock driver inorder to maintain compatibility. The syscon approach is not taken into account based on the review by Rob. This patch series depends on the recently posted S700 clk series: "[PATCH v7 0/5] Add clock driver for Actions S700 SoC". For the S700 clk series, driver and bindings patches are applied through the clk tree. But the DTS patches are not yet picked up by the platform maintainer, Andreas. Hence, Andreas is expected to pick the DTS patches in this series once reviewed by the maintainers along with S700 clk DTS patches. Because of the absence of the S500 SoC clk support, the reset controller registration code is added to both S700 and S900 SoC clk drivers for now. But once S500 clk support is added, the reset controller registration part will be moved to Owl SoCs common clk code. Thanks, Mani Changes in v3: * Reverted back the syscon approach based on the review by Rob Herring * Dropped the MAINTAINERS patch * Converted reset_map struct definitions to const based on the review by Philipp * Fixed S700 header in DT spotted by Parthiban * Added Reviewed-by tags from Rob for 3 bindings patches Changes in v2: * Converted the CMU and RMU drivers to syscon for a more cleaner approach * Declared the owl_reset_map structs to const * Used regmap_update_bits instead of a combined regmap_read and write * Removed unused headers in RMU drivers * Added MAINTAINERS entry for the RMU driver and bindings Manivannan Sadhasivam (9): clk: actions: Cache regmap info in private clock descriptor dt-bindings: clock: Add reset controller bindings for Actions Semi Owl SoCs dt-bindings: reset: Add binding constants for Actions Semi S700 RMU dt-bindings: reset: Add binding constants for Actions Semi S900 RMU arm64: dts: actions: Add Reset Controller support for S700 SoC arm64: dts: actions: Add Reset Controller support for S900 SoC clk: actions: Add Actions Semi Owl SoCs Reset Management Unit support clk: actions: Add Actions Semi S700 SoC Reset Management Unit support clk: actions: Add Actions Semi S900 SoC Reset Management Unit support .../bindings/clock/actions,owl-cmu.txt | 2 + arch/arm64/boot/dts/actions/s700.dtsi | 2 + arch/arm64/boot/dts/actions/s900.dtsi | 2 + drivers/clk/actions/Kconfig | 1 + drivers/clk/actions/Makefile | 1 + drivers/clk/actions/owl-common.c | 3 +- drivers/clk/actions/owl-common.h | 5 +- drivers/clk/actions/owl-reset.c | 66 ++++++++++++++ drivers/clk/actions/owl-reset.h | 31 +++++++ drivers/clk/actions/owl-s700.c | 55 +++++++++++- drivers/clk/actions/owl-s900.c | 86 ++++++++++++++++++- .../dt-bindings/reset/actions,s700-reset.h | 34 ++++++++ .../dt-bindings/reset/actions,s900-reset.h | 65 ++++++++++++++ 13 files changed, 347 insertions(+), 6 deletions(-) create mode 100644 drivers/clk/actions/owl-reset.c create mode 100644 drivers/clk/actions/owl-reset.h create mode 100644 include/dt-bindings/reset/actions,s700-reset.h create mode 100644 include/dt-bindings/reset/actions,s900-reset.h