Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp639574ybl; Wed, 14 Aug 2019 03:46:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqwBClR3SeY5JO9dMQTxvcdujdHpz+7KjnZ5k6rcCvg4UrOdjmM/cJoSdoTCQe8hPBLGoSlf X-Received: by 2002:a62:5487:: with SMTP id i129mr47122603pfb.69.1565779587918; Wed, 14 Aug 2019 03:46:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565779587; cv=none; d=google.com; s=arc-20160816; b=fdeijd3JrSyiu5XgR861PCrd9EvVzX/2i9wg5QZs9aI4j/+AZVJE3qnMDnqWLWmnVR hJzoqYwbbxAtXg+6X1NRwftWpIxBJ2FPNdR9Q3JHeEdT/5+t9kfbY9x9EDm/07kyjPA0 dvUHWSsxbqUBK/ZOWRS10qG1vIIs8okYV9pCCg+FevtS66pzw8d/HbneqfKrYSlT4FGs u3gf+n76qlFNd91etbDCIfJrtXMXQxxuraeTO/B90+zCmXvJ7ReppzoS2NMheVKitQJs Wfzb1Nlp5WH5c2DV7cNt/OqNjtHhxRxKsDId6EB7lzBxHXfh7hBHyxRullk145l0DotT s0bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=v4PoUeSplzCUFus3O8e6oXXDADfOMem8b87IcjstYDQ=; b=eRiBHLZRf7VooXCEl3+vGtljpZqxxYiPO9qe6XaDg2jWQHwe0SRWnkcdGi16e51+gr p6cI7t6IGotfGyvmKoTwu5bMmLU7vUPDSB8c2V2YNV29TqmZDq8h/6QNHpG90/IwN5A0 ZWu0c8b/5vQFNNnFuFqtGsAgCT2AT9H38HD5ylXWGDoPCHVDwVBb+xRDqyqQqnlDiT7D SzY0OSnocN3XRu9vae/UH8FgV9QvZxFQ8Nxhgn5GSaOc2yHuYeHMWweKzVHOYEcqUI9S YBnQ8JP3X19fnh6d+75aJIriySoN0s4vPowPWzpFZ7BomEQkBIhrNYrrWH7ELzpidFnz sDIA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t7si60404337plr.27.2019.08.14.03.46.11; Wed, 14 Aug 2019 03:46:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727771AbfHNKpU (ORCPT + 99 others); Wed, 14 Aug 2019 06:45:20 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:53511 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727484AbfHNKpS (ORCPT ); Wed, 14 Aug 2019 06:45:18 -0400 X-UUID: d72f5f8f277a45a6b610e459151fc5ea-20190814 X-UUID: d72f5f8f277a45a6b610e459151fc5ea-20190814 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0707 with TLS) with ESMTP id 2021076256; Wed, 14 Aug 2019 18:45:10 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 14 Aug 2019 18:45:10 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 14 Aug 2019 18:45:10 +0800 From: Sam Shih To: Rob Herring , Mark Rutland , Matthias Brugger , Thierry Reding CC: Ryder Lee , John Crispin , , , , , sam shih Subject: [PATCH v2 10/10] arm: dts: mediatek: add mt7629 pwm support Date: Wed, 14 Aug 2019 18:43:40 +0800 Message-ID: <1565779497-23621-3-git-send-email-sam.shih@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <621e49c01b943edb6ddac9182f34719eb0727f01.1548313019.git.ryder.lee@mediatek.com> References: <621e49c01b943edb6ddac9182f34719eb0727f01.1548313019.git.ryder.lee@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 27BF008E58CB4D2053A06CEEFA952E5DF09D949F53CD1AA2DC22F59B95EF6DA62000:8 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: sam shih This adds pwm support for MT7629. Signed-off-by: Sam Shih --- arch/arm/boot/dts/mt7629.dtsi | 14 ++++++++++++++ drivers/pwm/pwm-mediatek.c | 7 +++++++ 2 files changed, 21 insertions(+) diff --git a/arch/arm/boot/dts/mt7629.dtsi b/arch/arm/boot/dts/mt7629.dtsi index 9608bc2ccb3f..352df8d61788 100644 --- a/arch/arm/boot/dts/mt7629.dtsi +++ b/arch/arm/boot/dts/mt7629.dtsi @@ -241,6 +241,18 @@ status = "disabled"; }; + pwm: pwm@11006000 { + compatible = "mediatek,mt7629-pwm"; + reg = <0 0x11006000 0 0x1000>; + interrupts = ; + clocks = <&topckgen CLK_TOP_PWM_SEL>, + <&pericfg CLK_PERI_PWM_PD>, + <&pericfg CLK_PERI_PWM1_PD>; + clock-names = "top", "main", "pwm1"; + num-pwms = <1>; + status = "disabled"; + }; + i2c: i2c@11007000 { compatible = "mediatek,mt7629-i2c", "mediatek,mt2712-i2c"; diff --git a/drivers/pwm/pwm-mediatek.c b/drivers/pwm/pwm-mediatek.c index 922a7543a2b1..d2352ca7792e 100644 --- a/drivers/pwm/pwm-mediatek.c +++ b/drivers/pwm/pwm-mediatek.c @@ -327,11 +327,18 @@ static const struct pwm_mediatek_of_data mt7628_pwm_data = { .has_clks = false, }; +static const struct pwm_mediatek_of_data mt7629_pwm_data = { + .fallback_npwms = 1, + .pwm45_fixup = false, + .has_clks = true, +}; + static const struct of_device_id pwm_mediatek_of_match[] = { { .compatible = "mediatek,mt2712-pwm", .data = &mt2712_pwm_data }, { .compatible = "mediatek,mt7622-pwm", .data = &mt7622_pwm_data }, { .compatible = "mediatek,mt7623-pwm", .data = &mt7623_pwm_data }, { .compatible = "mediatek,mt7628-pwm", .data = &mt7628_pwm_data }, + { .compatible = "mediatek,mt7629-pwm", .data = &mt7629_pwm_data }, { }, }; MODULE_DEVICE_TABLE(of, pwm_mediatek_of_match); -- 2.17.1