Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp145713pxb; Tue, 12 Jan 2021 23:12:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJzod1R5roENEqB1De8dFcqW3TRuofqY9QPQ/jmmmj/cdAx1v/b2bPxYNrhLbGYf95PeGNxX X-Received: by 2002:a50:fc96:: with SMTP id f22mr701739edq.162.1610521958361; Tue, 12 Jan 2021 23:12:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610521958; cv=none; d=google.com; s=arc-20160816; b=moUhx9JV33ovnzKpryUC+EaKEI85x/axfAEuD1LFtmBEj7DmAm2DPvxmigGtgUDP12 fhdsW8ZZiLDM+qrE5KqcHx6pWtNZvI5vXraMo2p4cyOns5KhgFN5BGwsPYujxK61CqyQ 7YJ43iiyxRzB27X42nBhV2kBINQsOcjxVw4ZonG/20+4705O3UI7sKsWexT3fPoXTOed syuhPAg+I0AjFDZKvVUa2/LFahVYK/ZDf3+gzBmqlqi31UWWRfLLzlkL9HbZn2eaBuFo NE6hXALOpeJGD4oQrYrdih4fhoDATFL3s+ulX8mzz4qQZnX52Gt+lJhAZiw/Nv52HHBM UxZg== 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=5BMp6tOKKHPGeRUj9Rb9kpm1F0kd/j/xAfvDFAA/O8s=; b=03sppFw8SD9+QHv1w1A/OYYxGWQSUNb3xg4QsHHH23FJzrbQRvvTrZXVni6nCJvf1L 8w3We8i+09K7tCJB0PxSRShPQm7VIeptdfEIqfEIgjTAvVZT4vHCME5MjOlWaHW/rgxR XJWJfwU7RE5ei8IfT5shfT6J/5pg41LLbYH/4VLvHAuAvWxmhehs0R1ZASS0utDAYVE7 h7rIWbXKak6+9QjQ64gWSA6Ic6Eq91wwo1ch/vAWw+LtgbINYLo/VlNDNKJG0DHAOE7U 4CZR3iUOcCnCuTL9tA+yjXJf60LfwyJmdmyBkT5zJNk3PVki3Q3hswaOjgxNhOSlYJUd tY/w== 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 m10si604631eds.453.2021.01.12.23.12.14; Tue, 12 Jan 2021 23:12:38 -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 S1726633AbhAMHLp (ORCPT + 99 others); Wed, 13 Jan 2021 02:11:45 -0500 Received: from twspam01.aspeedtech.com ([211.20.114.71]:52878 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726475AbhAMHLo (ORCPT ); Wed, 13 Jan 2021 02:11:44 -0500 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 10D741ul005404; Wed, 13 Jan 2021 15:04:01 +0800 (GMT-8) (envelope-from troy_lee@aspeedtech.com) Received: from localhost.localdomain (192.168.100.253) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 13 Jan 2021 15:09:01 +0800 From: Troy Lee To: , Jean Delvare , "Guenter Roeck" , Rob Herring , Joel Stanley , Andrew Jeffery , Jonathan Corbet , Philipp Zabel , Ryan Chen , "open list:HARDWARE MONITORING" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , open list , "open list:DOCUMENTATION" CC: , , Subject: [PATCH v2 3/4] ARM: dts: aspeed: Add Aspeed AST2600 PWM/Fan node in devicetree Date: Wed, 13 Jan 2021 07:08:47 +0000 Message-ID: <20210113070850.1184506-4-troy_lee@aspeedtech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210113070850.1184506-1-troy_lee@aspeedtech.com> References: <20210113070850.1184506-1-troy_lee@aspeedtech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [192.168.100.253] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 10D741ul005404 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Create a common node in aspeed-g6.dtsi and add fan nodes for aspeed-ast2600-evb.dts file. Changes since v1: - rename properties name in child node Signed-off-by: Troy Lee --- arch/arm/boot/dts/aspeed-ast2600-evb.dts | 152 +++++++++++++++++++++++ arch/arm/boot/dts/aspeed-g6.dtsi | 10 ++ 2 files changed, 162 insertions(+) diff --git a/arch/arm/boot/dts/aspeed-ast2600-evb.dts b/arch/arm/boot/dts/aspeed-ast2600-evb.dts index 89be13197780..d94e70b957fb 100644 --- a/arch/arm/boot/dts/aspeed-ast2600-evb.dts +++ b/arch/arm/boot/dts/aspeed-ast2600-evb.dts @@ -23,6 +23,158 @@ memory@80000000 { }; }; +&pwm_tacho { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pwm0_default &pinctrl_tach0_default + &pinctrl_pwm1_default &pinctrl_tach1_default + &pinctrl_pwm2_default &pinctrl_tach2_default + &pinctrl_pwm3_default &pinctrl_tach3_default + &pinctrl_pwm4_default &pinctrl_tach4_default + &pinctrl_pwm5_default &pinctrl_tach5_default + &pinctrl_pwm6_default &pinctrl_tach6_default + &pinctrl_pwm7_default &pinctrl_tach7_default + &pinctrl_pwm8g1_default &pinctrl_tach8_default + &pinctrl_pwm9g1_default &pinctrl_tach9_default + &pinctrl_pwm10g1_default &pinctrl_tach10_default + &pinctrl_pwm11g1_default &pinctrl_tach11_default + &pinctrl_pwm12g1_default &pinctrl_tach12_default + &pinctrl_pwm13g1_default &pinctrl_tach13_default + &pinctrl_pwm14g1_default &pinctrl_tach14_default + &pinctrl_pwm15g1_default &pinctrl_tach15_default>; + + fan@1 { + reg = <0x00>; + aspeed,pwm-freq = <25000>; + aspeed,falling-point = /bits/ 8 <100>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + fan-tach-ch = /bits/ 8 <0x00>; + aspeed,tacho-div = <3>; + pulses-per-revolution = <1>; + }; + + fan@2 { + reg = <0x01>; + aspeed,pwm-freq = <25000>; + aspeed,falling-point = /bits/ 8 <100>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + fan-tach-ch = /bits/ 8 <0x01>; + pulses-per-revolution = <1>; + }; + + fan@3 { + reg = <0x02>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + fan-tach-ch = /bits/ 8 <0x02>; + pulses-per-revolution = <2>; + }; + + fan@4 { + reg = <0x03>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + fan-tach-ch = /bits/ 8 <0x03>; + pulses-per-revolution = <2>; + }; + + fan@5 { + reg = <0x04>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + fan-tach-ch = /bits/ 8 <0x04>; + pulses-per-revolution = <2>; + }; + + fan@6 { + reg = <0x05>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + fan-tach-ch = /bits/ 8 <0x05>; + pulses-per-revolution = <2>; + }; + + fan@7 { + reg = <0x06>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + fan-tach-ch = /bits/ 8 <0x06>; + pulses-per-revolution = <2>; + }; + + fan@8 { + reg = <0x07>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + fan-tach-ch = /bits/ 8 <0x07>; + pulses-per-revolution = <2>; + }; + + fan@9 { + reg = <0x08>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + fan-tach-ch = /bits/ 8 <0x08>; + pulses-per-revolution = <2>; + }; + + fan@10 { + reg = <0x09>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + fan-tach-ch = /bits/ 8 <0x09>; + pulses-per-revolution = <2>; + }; + + fan@11 { + reg = <0x0a>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + fan-tach-ch = /bits/ 8 <0x0a>; + pulses-per-revolution = <2>; + }; + + fan@12 { + reg = <0x0b>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + fan-tach-ch = /bits/ 8 <0x0b>; + pulses-per-revolution = <2>; + }; + + fan@13 { + reg = <0x0c>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + fan-tach-ch = /bits/ 8 <0x0c>; + pulses-per-revolution = <2>; + }; + + fan@14 { + reg = <0x0d>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + fan-tach-ch = /bits/ 8 <0x0d>; + pulses-per-revolution = <2>; + }; + + fan@15 { + reg = <0x0e>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + fan-tach-ch = /bits/ 8 <0x0e>; + pulses-per-revolution = <2>; + }; + + fan@16 { + reg = <0x0f>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + fan-tach-ch = /bits/ 8 <0x0f>; + pulses-per-revolution = <2>; + }; +}; + &mdio0 { status = "okay"; diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi index 810b0676ab03..0369f8db123a 100644 --- a/arch/arm/boot/dts/aspeed-g6.dtsi +++ b/arch/arm/boot/dts/aspeed-g6.dtsi @@ -304,6 +304,16 @@ apb { #size-cells = <1>; ranges; + pwm_tacho: pwm-tacho-controller@1e610000 { + compatible = "aspeed,ast2600-pwm-tachometer"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x1e610000 0x100>; + clocks = <&syscon ASPEED_CLK_AHB>; + resets = <&syscon ASPEED_RESET_PWM>; + status = "disabled"; + }; + syscon: syscon@1e6e2000 { compatible = "aspeed,ast2600-scu", "syscon", "simple-mfd"; reg = <0x1e6e2000 0x1000>; -- 2.25.1