From patchwork Thu Mar 15 16:25:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harald Geyer X-Patchwork-Id: 886352 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ccbib.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 402DVs48R7z9sVj for ; Fri, 16 Mar 2018 03:26:29 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752197AbeCOQZc (ORCPT ); Thu, 15 Mar 2018 12:25:32 -0400 Received: from h1.radempa.de ([176.9.142.194]:52224 "EHLO mail.cosmopool.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752087AbeCOQZa (ORCPT ); Thu, 15 Mar 2018 12:25:30 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cosmopool.net (Postfix) with ESMTP id 47688903539; Thu, 15 Mar 2018 17:25:29 +0100 (CET) Received: from mail.cosmopool.net ([127.0.0.1]) by localhost (mail.your-server.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CRLXC5ILn_6f; Thu, 15 Mar 2018 17:25:28 +0100 (CET) Received: from huygens.ccbib.org (unknown [10.0.10.106]) by mail.cosmopool.net (Postfix) with SMTP id CC1009012D0; Thu, 15 Mar 2018 17:25:27 +0100 (CET) Received: by huygens.ccbib.org (sSMTP sendmail emulation); Thu, 15 Mar 2018 16:25:27 +0000 From: Harald Geyer To: Maxime Ripard , Chen-Yu Tsai Cc: Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Andre Przywara , Icenowy Zheng , info@olimex.com, Harald Geyer Subject: [PATCHv2 2/5] arm64: dts: allwinner: a64: Add watchdog Date: Thu, 15 Mar 2018 16:25:07 +0000 Message-Id: <20180315162510.11669-3-harald@ccbib.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180315162510.11669-1-harald@ccbib.org> References: <20180315162510.11669-1-harald@ccbib.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add a watchdog node for the A64, automatically enabled on all boards. Since the device is compatible with an existing driver, we only reserve a new compatible string to be used together with the fall back. Tested on Olimex Teres-I. Signed-off-by: Harald Geyer Reviewed-by: Rob Herring --- changes since v1: * add and use a specific compatible string Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt | 6 ++++-- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 7 +++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt index 62dd5baad70e..04fc368d828f 100644 --- a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt +++ b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt @@ -2,8 +2,10 @@ Allwinner SoCs Watchdog timer Required properties: -- compatible : should be either "allwinner,sun4i-a10-wdt" or - "allwinner,sun6i-a31-wdt" +- compatible : should be one of + "allwinner,sun4i-a10-wdt" + "allwinner,sun6i-a31-wdt" + "allwinner,sun50i-a64-wdt","allwinner,sun6i-a31-wdt" - reg : Specifies base physical address and size of the registers. Example: diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 64e452a758fa..8401e7f887ff 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -665,5 +665,12 @@ #address-cells = <1>; #size-cells = <0>; }; + + wdt0: watchdog@1c20ca0 { + compatible = "allwinner,sun50i-a64-wdt", + "allwinner,sun6i-a31-wdt"; + reg = <0x01c20ca0 0x20>; + interrupts = ; + }; }; }; From patchwork Thu Mar 15 16:25:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harald Geyer X-Patchwork-Id: 886351 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ccbib.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 402DVk2YWcz9sVj for ; Fri, 16 Mar 2018 03:26:22 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752372AbeCOQ0L (ORCPT ); Thu, 15 Mar 2018 12:26:11 -0400 Received: from h1.radempa.de ([176.9.142.194]:52251 "EHLO mail.cosmopool.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752205AbeCOQZc (ORCPT ); Thu, 15 Mar 2018 12:25:32 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cosmopool.net (Postfix) with ESMTP id 6741B903599; Thu, 15 Mar 2018 17:25:31 +0100 (CET) Received: from mail.cosmopool.net ([127.0.0.1]) by localhost (mail.your-server.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KLqiFTY_ZFtx; Thu, 15 Mar 2018 17:25:31 +0100 (CET) Received: from huygens.ccbib.org (unknown [10.0.10.106]) by mail.cosmopool.net (Postfix) with SMTP id F0DE89012D0; Thu, 15 Mar 2018 17:25:29 +0100 (CET) Received: by huygens.ccbib.org (sSMTP sendmail emulation); Thu, 15 Mar 2018 16:25:29 +0000 From: Harald Geyer To: Maxime Ripard , Chen-Yu Tsai Cc: Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Andre Przywara , Icenowy Zheng , info@olimex.com, Harald Geyer Subject: [PATCHv2 4/5] arm64: dts: allwinner: a64: Add pwm device Date: Thu, 15 Mar 2018 16:25:09 +0000 Message-Id: <20180315162510.11669-5-harald@ccbib.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180315162510.11669-1-harald@ccbib.org> References: <20180315162510.11669-1-harald@ccbib.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This device is compatible with A13, so no new driver is needed. A new compatible string is reserved in the binding documentation, to be used together with the proper fall back. Tested on Teres-I. Signed-off-by: Harald Geyer Reviewed-by: Rob Herring --- changes since v1: * add and use an A64 specific compatible string * claim the full memory range I saw that Andre Przywara has been working on A64 pwm too and has submitted some patches a few days ago. I think his patches are functionally equivalent to this one here, but clean up things a bit and additionally add support for r_pwm and thus are preferable. See: https://groups.google.com/forum/#!topic/linux-sunxi/hQFeteP591k I'm including my patch here mostly to have a consistent series for others to test. OTOH you might merge the device tree changes here and pick up the cleanup patches from him. Either way should work fine. Documentation/devicetree/bindings/pwm/pwm-sun4i.txt | 1 + arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/Documentation/devicetree/bindings/pwm/pwm-sun4i.txt b/Documentation/devicetree/bindings/pwm/pwm-sun4i.txt index 51ff54c8b8ef..5986a3b2a504 100644 --- a/Documentation/devicetree/bindings/pwm/pwm-sun4i.txt +++ b/Documentation/devicetree/bindings/pwm/pwm-sun4i.txt @@ -5,6 +5,7 @@ Required properties: - "allwinner,sun4i-a10-pwm" - "allwinner,sun5i-a10s-pwm" - "allwinner,sun5i-a13-pwm" + - "allwinner,sun50i-a64-pwm","allwinner,sun5i-a13-pwm" - "allwinner,sun7i-a20-pwm" - "allwinner,sun8i-h3-pwm" - reg: physical base address and length of the controller's registers diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 1b2ef28c42bd..7e72eadd07b1 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -364,6 +364,11 @@ bias-pull-up; }; + pwm_pin: pwm_pin { + pins = "PD22"; + function = "pwm"; + }; + rmii_pins: rmii_pins { pins = "PD10", "PD11", "PD13", "PD14", "PD17", "PD18", "PD19", "PD20", "PD22", "PD23"; @@ -629,6 +634,15 @@ #interrupt-cells = <3>; }; + pwm: pwm@1c21400 { + compatible = "allwinner,sun50i-a64-pwm", + "allwinner,sun5i-a13-pwm"; + reg = <0x01c21400 0x400>; + clocks = <&osc24M>; + #pwm-cells = <3>; + status = "disabled"; + }; + rtc: rtc@1f00000 { compatible = "allwinner,sun6i-a31-rtc"; reg = <0x01f00000 0x54>;