Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3796159pxu; Wed, 9 Dec 2020 00:14:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJxGwMm1rRx0SjFcbcEQk38LnxHj6m82x8tsh21sOi5JLKKWNVLGqOS6wGcB+xZnkodl/w9f X-Received: by 2002:a17:906:7104:: with SMTP id x4mr1088101ejj.141.1607501647323; Wed, 09 Dec 2020 00:14:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607501647; cv=none; d=google.com; s=arc-20160816; b=cUonCLXVaxYSGCQECDtAtbXugd0MmsHF/fPARiXucB1Nf7JM0K8BuIvPq+aTcy0uOM mVkSNdrvBsKvqgQOp0KLCaF20X0g5vpFdZZMKSLS0o0+kTel3P2LhOdmkq93DG2lHYbM tCXBlnLMI5DkY0G73u7IBovro3odZBs0K65I0/YpBr5TYjGdim8emheTNCbH0XYX2rKo lh2uyn4MkHsz7mbL5qrS66qiaPYt6G22IisnLJsW8wuPNyZLwzF01ofhbEQ+RT5Rg0Xh +4rrsgBkmeKg79y+9FRwQmfKeObwy8j+9nF/hXFqvMK/mtIv9lDeVw0CnF+5qnjdewJU 7ieQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=CDExQ0WVSv2zrwhz0AedY4E9+qEbxerw2C4/lYVGiuw=; b=LAVe1x7SIgz8vwtQmhLM/7r0sH0lu9S6rTrJzR4yfAk8hNuDYev7EXPD532oHI6wfU IPRsHq+SrtVi6QPvKwY8QCOgDnvINK1lknoKGPOQmrfPhFpn6YfNzXvRtScLPhGtO4KV P+tkHa/ufwUSWm74BVSEU34LpiBZQFnRSREX5Hg/KTChSSaAvWTT9FlSCorIEnP4Mbn3 +it3Ux8mrnEiTr16he7XwQFEhW3DjChEbNVE6HQxzQzFwSvMn0iBbQt4a0xPz4KU/CdC 5t22JOOKwHjKEklje5AcVagg6MeByIoHnvZgfH7iehTtUa2OCddsdbn2GwApjMmPSxID G8gw== 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 v29si426284edi.58.2020.12.09.00.13.44; Wed, 09 Dec 2020 00:14:07 -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 S1728121AbgLIIJe (ORCPT + 99 others); Wed, 9 Dec 2020 03:09:34 -0500 Received: from twspam01.aspeedtech.com ([211.20.114.71]:46460 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728438AbgLIICc (ORCPT ); Wed, 9 Dec 2020 03:02:32 -0500 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 0B97uWqI009073; Wed, 9 Dec 2020 15:56:32 +0800 (GMT-8) (envelope-from troy_lee@aspeedtech.com) Received: from TroyLee-PC.localdomain (192.168.100.253) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 9 Dec 2020 15:59:28 +0800 From: Troy Lee To: , Jean Delvare , "Guenter Roeck" , Rob Herring , Joel Stanley , Andrew Jeffery , Jonathan Corbet , Philipp Zabel , "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 2/4] ARM: dts: aspeed: Add Aspeed AST2600 PWM/Fan node in devicetree Date: Wed, 9 Dec 2020 15:59:18 +0800 Message-ID: <20201209075921.26689-3-troy_lee@aspeedtech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201209075921.26689-1-troy_lee@aspeedtech.com> References: <20201209075921.26689-1-troy_lee@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain 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 0B97uWqI009073 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 ast2600-evb dts file. Signed-off-by: Troy Lee --- arch/arm/boot/dts/aspeed-ast2600-evb.dts | 149 +++++++++++++++++++++++ arch/arm/boot/dts/aspeed-g6.dtsi | 10 ++ 2 files changed, 159 insertions(+) diff --git a/arch/arm/boot/dts/aspeed-ast2600-evb.dts b/arch/arm/boot/dts/aspeed-ast2600-evb.dts index 89be13197780..51e00cf60749 100644 --- a/arch/arm/boot/dts/aspeed-ast2600-evb.dts +++ b/arch/arm/boot/dts/aspeed-ast2600-evb.dts @@ -23,6 +23,155 @@ }; }; +&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@0 { + reg = <0x00>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + aspeed,fan-tach-ch = /bits/ 8 <0x00>; + aspeed,pulse-pr = <2>; + }; + + fan@1 { + reg = <0x01>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + aspeed,fan-tach-ch = /bits/ 8 <0x01>; + aspeed,pulse-pr = <2>; + }; + + fan@2 { + reg = <0x02>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + aspeed,fan-tach-ch = /bits/ 8 <0x02>; + aspeed,pulse-pr = <2>; + }; + + fan@3 { + reg = <0x03>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + aspeed,fan-tach-ch = /bits/ 8 <0x03>; + aspeed,pulse-pr = <2>; + }; + + fan@4 { + reg = <0x04>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + aspeed,fan-tach-ch = /bits/ 8 <0x04>; + aspeed,pulse-pr = <2>; + }; + + fan@5 { + reg = <0x05>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + aspeed,fan-tach-ch = /bits/ 8 <0x05>; + aspeed,pulse-pr = <2>; + }; + + fan@6 { + reg = <0x06>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + aspeed,fan-tach-ch = /bits/ 8 <0x06>; + aspeed,pulse-pr = <2>; + }; + + fan@7 { + reg = <0x07>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + aspeed,fan-tach-ch = /bits/ 8 <0x07>; + aspeed,pulse-pr = <2>; + }; + + fan@8 { + reg = <0x08>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + aspeed,fan-tach-ch = /bits/ 8 <0x08>; + aspeed,pulse-pr = <2>; + }; + + fan@9 { + reg = <0x09>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + aspeed,fan-tach-ch = /bits/ 8 <0x09>; + aspeed,pulse-pr = <2>; + }; + + fan@10 { + reg = <0x0a>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + aspeed,fan-tach-ch = /bits/ 8 <0x0a>; + aspeed,pulse-pr = <2>; + }; + + fan@11 { + reg = <0x0b>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + aspeed,fan-tach-ch = /bits/ 8 <0x0b>; + aspeed,pulse-pr = <2>; + }; + + fan@12 { + reg = <0x0c>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + aspeed,fan-tach-ch = /bits/ 8 <0x0c>; + aspeed,pulse-pr = <2>; + }; + + fan@13 { + reg = <0x0d>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + aspeed,fan-tach-ch = /bits/ 8 <0x0d>; + aspeed,pulse-pr = <2>; + }; + + fan@14 { + reg = <0x0e>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + aspeed,fan-tach-ch = /bits/ 8 <0x0e>; + aspeed,pulse-pr = <2>; + }; + + fan@15 { + reg = <0x0f>; + aspeed,pwm-freq = <25000>; + cooling-levels = /bits/ 8 <125 151 177 203 229 255>; + aspeed,fan-tach-ch = /bits/ 8 <0x0f>; + aspeed,pulse-pr = <2>; + }; +}; + &mdio0 { status = "okay"; diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi index 97ca743363d7..7687d37bba26 100644 --- a/arch/arm/boot/dts/aspeed-g6.dtsi +++ b/arch/arm/boot/dts/aspeed-g6.dtsi @@ -298,6 +298,16 @@ #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.17.1