Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2424742pxu; Fri, 18 Dec 2020 12:58:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJxSkD8a4j2CffDEop1U0EkRqICBC/oDBL3s9bHugJBa9f3xJd+zTo5PgrMoOfsrRoaadWoN X-Received: by 2002:a17:906:65a:: with SMTP id t26mr277766ejb.394.1608325100910; Fri, 18 Dec 2020 12:58:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608325100; cv=none; d=google.com; s=arc-20160816; b=0CYct9663+XKzBdixafHgCPmugOgr4qiciU0dcd34zZ2xxZiypnDKogODUYoez4Vq4 0AGtePCn+UVter4SPtb/ftqSi7rhOvAv38FhI9JOA++4qyBDDI8qknrhthPC48zYIIQJ Wp/lSXd+WcHXyADlk97lUJGE0byRR2TenjIR3cJlZ++o+d/sQnzgpQsAdaBcDX73cYmR 6+L03zIpKYnVcrw8U5LSa9e0p7JHdFN8rtoTf7GtStMA1L2Ad9crC/tBBO9VnhDBhVWN mv62weJHzphheCfHkGC8w5PFPsvxVwdcOCKPmWBOv86tcHvaj89lOzBudPC/0/Gx7tEG h/eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=PaQsD2ndT894tiQRn29TYoDT6OvExSR3M+eGLixiIiQ=; b=DipQM+wtIT/52b+Mk2sCCsNMouMPYVxDpk+fhWt51RBBGRHFmF6yqSxST7WfFdkmIj ZSKDIxnj7TcJXyqLlfSwJq4b98isOXEYzncJ8MKG602sc/8KUkTyZqOWXL58sngz8n8x naeShYLX01aCPSOXakZD/xXuDB2FHFSmwjrt/azKsw9X484MTpOQSZnDdxmUwZJ4M+Pg Ep5acL9TQiyvdW3Z4vDc0z/MJA98yMlhdc+daOGvWLgfjCWk4ZdE2VssIoUq4MQQ85Pj VCmjQMt5A0jy39tQO9JWvtz9gSwl0M4pUhUYL20920BUrIHJufU/GkEcoLBHcD6+5Ees wa9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lz11si5296584ejb.341.2020.12.18.12.57.57; Fri, 18 Dec 2020 12:58:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726177AbgLRUzr (ORCPT + 99 others); Fri, 18 Dec 2020 15:55:47 -0500 Received: from leonov.paulk.fr ([185.233.101.22]:42878 "EHLO leonov.paulk.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725775AbgLRUzq (ORCPT ); Fri, 18 Dec 2020 15:55:46 -0500 Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id E5A6EBFDE9; Fri, 18 Dec 2020 21:55:03 +0100 (CET) Received: by gagarine.paulk.fr (Postfix, from userid 114) id 58D14C1D27; Fri, 18 Dec 2020 21:55:03 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on gagarine.paulk.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.2 Received: from localhost.localdomain (collins [192.168.1.129]) by gagarine.paulk.fr (Postfix) with ESMTP id 4F57AC1D23; Fri, 18 Dec 2020 21:54:38 +0100 (CET) From: Paul Kocialkowski To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Rob Herring , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Paul Kocialkowski Subject: [PATCH v2 2/2] ARM: dts: sun8i-v3s: Add PWM controller and pins definitions Date: Fri, 18 Dec 2020 21:54:36 +0100 Message-Id: <20201218205436.2326872-2-contact@paulk.fr> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201218205436.2326872-1-contact@paulk.fr> References: <20201218205436.2326872-1-contact@paulk.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This introduces definitions for the PWM controller found in the V3s, as well as associated pins. This fashion of the controller has two PWM outputs and is register-compatible with the A20. Both PWM outputs were tested on a Lichee Pi Zero with a simple transistor-LED setup. Signed-off-by: Paul Kocialkowski --- arch/arm/boot/dts/sun8i-v3s.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi index bff822b9fa01..f02aa988156d 100644 --- a/arch/arm/boot/dts/sun8i-v3s.dtsi +++ b/arch/arm/boot/dts/sun8i-v3s.dtsi @@ -404,6 +404,16 @@ spi0_pins: spi0-pins { pins = "PC0", "PC1", "PC2", "PC3"; function = "spi0"; }; + + pwm0_pin: pwm0-pin { + pins = "PB4"; + function = "pwm0"; + }; + + pwm1_pin: pwm1-pin { + pins = "PB5"; + function = "pwm1"; + }; }; timer@1c20c00 { @@ -422,6 +432,15 @@ wdt0: watchdog@1c20ca0 { clocks = <&osc24M>; }; + pwm: pwm@1c21400 { + compatible = "allwinner,sun8i-v3s-pwm", + "allwinner,sun7i-a20-pwm"; + reg = <0x01c21400 0xc>; + clocks = <&osc24M>; + #pwm-cells = <3>; + status = "disabled"; + }; + lradc: lradc@1c22800 { compatible = "allwinner,sun4i-a10-lradc-keys"; reg = <0x01c22800 0x400>; -- 2.29.2