From patchwork Mon Aug 5 12:58:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 11076841 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C9D811395 for ; Mon, 5 Aug 2019 12:59:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B7A122018F for ; Mon, 5 Aug 2019 12:59:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB4AD28910; Mon, 5 Aug 2019 12:59:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5ECB32018F for ; Mon, 5 Aug 2019 12:59:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=7H47YxHifbZF1Z1kM6R0rMW9AvGMDcb4KWJvLVG0DHU=; b=JT1zSeH7BkP/3k 6IVxOyPVQKUKDxIBJf4h/+hINzReB2rF8DVo53K5Gp08kmriy05BBSTzO3n4r8pZrua2HW6LpyZcL 5QujhqsYgWOZcURui+jxeSrBb2/RO61EkI80DCr/i/8enUuuR/En/Lx182jC1CpLLytXV0g7kycIw FB9ww42NmS5/UyDPGivYOZY+QsU3DxC86NKsr+4xNVXtciwpFBzbelzHFbbcdLSJaRjmZsQAtGCWE xB5KQtnsnHYVgYBCaROkds0RcK2YYsYr+A3ioWtV65WFWvOV3G06ZMYvcPtnBuZamFlys83f6APbz Zl/ImUej2bz4/873wriQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1huca0-0004U0-Vb; Mon, 05 Aug 2019 12:59:13 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hucZk-00045B-Bm for linux-mediatek@lists.infradead.org; Mon, 05 Aug 2019 12:59:00 +0000 Received: by mail-wr1-x443.google.com with SMTP id f9so5403592wre.12 for ; Mon, 05 Aug 2019 05:58:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=D1BgNM2O50qMEacQ9ueo5XhVsMsgr663mURR/65nCS8=; b=x6ZSwOQbFU227kVmjbkUTbeCX9UkSrwO9Y8Znms5YvqO/c1EY25vYimVjwyKE5XMlj xJMPeL++r0FG3YpFbrCEe+ky0RgbyXi55r9HvWZJkPtDGGM5+soXNUqG+O6o+sP7aYfD 212hWYsFrNbVLrGizdS5xi34j6WrVYVVFaZaZTqpO0hBgtuhzWNwvFwCOlllAmx5vL4q wVpuUveOgy8ouv555qscQY3uQEvTQtI7w6WJW5adzrJgmRnHwX96QTKEfN6Czmayd6ib pEL2h1ow0J8ZumiZ2bDybnyRVgaucZQ2U13go7woATDuA1K7P+UmMSjsMvmGd5jI7RD4 ldaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=D1BgNM2O50qMEacQ9ueo5XhVsMsgr663mURR/65nCS8=; b=BZYQTcnJnxwIZI2E9D45TV4zJvxgNKlS3i+Y1Gn/8uDJg0D55OLs37SbQjzR+HW3qu BpxW6wYJys3oLPCKATnhYkMK3X03vj3bUwgcvRVcozndegT32UWPhkoR8RdlWPf8yLry naSOBECS1hkLc6uaBeLh5Nk0VQ9k0b7oE2Uuf8PIGBdBYubzOQ8XRFBCcBb/EAW+K/o0 BLMwkcFTM9c27tzSofaxhuJiZYOndUp/mhaRX0bIuGIhgmC/rkLg1SqyFSMgKCJuHFJ4 tmJeG99YzHqb48pjIcse0mzuCDAZoAL/Uom+5FxvUi22sWRZ8/Kjms+SoVFgsqd7HOAl R5Gg== X-Gm-Message-State: APjAAAU8LS3ex5FC8DBmQ36s/MCAF21H4SBbSDFNYWcLRCYmT6uJotHL w6GcYtM6yjPSJ7dz5MtNt4CYMA== X-Google-Smtp-Source: APXvYqxjUyHGwnsENRGPnY7OdGXXY3X3GMtZZhvQF/96Pw7p0vEa9V6iBlA2Mnw7rhqJaFvPqAiD3g== X-Received: by 2002:adf:c003:: with SMTP id z3mr79675952wre.243.1565009931515; Mon, 05 Aug 2019 05:58:51 -0700 (PDT) Received: from radium.baylibre.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id k9sm15582779wrd.46.2019.08.05.05.58.50 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 05 Aug 2019 05:58:50 -0700 (PDT) From: Fabien Parent To: thierry.reding@gmail.com, robh+dt@kernel.org, matthias.bgg@gmail.com Subject: [PATCH 1/2] dt-bindings: pwm: pwm-mediatek: Add documentation for MT8516 Date: Mon, 5 Aug 2019 14:58:47 +0200 Message-Id: <20190805125848.15751-1-fparent@baylibre.com> X-Mailer: git-send-email 2.23.0.rc1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190805_055857_667907_96DBB691 X-CRM114-Status: UNSURE ( 8.41 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Fabien Parent , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add the device-tree documentation for the PWM IP on the MediaTek MT8516 SoCs. Signed-off-by: Fabien Parent Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/pwm/pwm-mediatek.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt b/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt index 991728cb46cb..9152bf5afe56 100644 --- a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt +++ b/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt @@ -6,6 +6,7 @@ Required properties: - "mediatek,mt7622-pwm": found on mt7622 SoC. - "mediatek,mt7623-pwm": found on mt7623 SoC. - "mediatek,mt7628-pwm": found on mt7628 SoC. + - "mediatek,mt8516-pwm": found on mt8516 SoC. - reg: physical base address and length of the controller's registers. - #pwm-cells: must be 2. See pwm.txt in this directory for a description of the cell format. From patchwork Mon Aug 5 12:58:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 11076837 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B77ED1395 for ; Mon, 5 Aug 2019 12:59:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A3CA528653 for ; Mon, 5 Aug 2019 12:59:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 973B22890E; Mon, 5 Aug 2019 12:59:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 219E428653 for ; Mon, 5 Aug 2019 12:59:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OCnPLM70SKbxnC+VKHAXIDSka6H7rmYDiyFeBTUTHoM=; b=ewXZIig/vRX9YG izbaRU9GAsfsjg3YbZ+xANS8+sVL20ihQz5LZttKHLakTIi1k6GGtgl7HnIndinOZPCDLnaCKu7Lb gawYYCVKDhespUNe7LeIk2uvJdHS/fOSxMAf/W48qloFEPjhK4tTzwncqYbsCjB8QJMgdfV62X4mA 4pueH8/nAefSH+YQlvGElW1j6U0Au+shrtkjxuZG1Almy59Yd12NrxrCf2E/iKrR5BACXTV6qTjc1 Wk0Ztg31SpF/cAHuyuRGpF42Q2+Tf0wWMX24cJEDGHjFbAA3PnEZDG2vbtv49hxLcXW9sNBxHhXYD Ut0s29W1e/Amrb+F/vmA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hucZn-000472-NE; Mon, 05 Aug 2019 12:58:59 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hucZk-00045F-C3 for linux-mediatek@lists.infradead.org; Mon, 05 Aug 2019 12:58:59 +0000 Received: by mail-wm1-x343.google.com with SMTP id x15so74664624wmj.3 for ; Mon, 05 Aug 2019 05:58:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=98lh3VhEJYcNP4cO6bfAWLsXJomqXzKBLTJKfb0rfuY=; b=tMnBMEYxd6Lk47wVxq8np1s07LPbtohRCD9xifUu+u/mzgsVZzai5W9om02Rx3+Nb1 tv62V9YKJ2x9GGQSuyYppVpgKlfNYYE9mhFKylGM4whvoeB5s2wWMLc+W4EmXTbO0gXB oLjGlL8FWWWdesfvwBYBq4LJ0Vi3usyG9KhMN/2TLtcowEOakLiV8qSWKkzmCeDfxKG3 qRtvMzkDWgc63UQxW79fR00LSbu9OWNG0btdqFgsNig9WykCCzGhqwgfs0YLE6eL0ohl JWXR8vRNpcJR0AGTyBKmbK1NXKrbojwL7TVJmgmCvj8GHPKFPfPXoWH9f3Nk+MRf2jzJ qLpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=98lh3VhEJYcNP4cO6bfAWLsXJomqXzKBLTJKfb0rfuY=; b=M13X9Dm9gmYZCjQQCbbRlsaltliKgYZsFp99q5mvuBTWmvZ6EEF924rlGy5qjGoDXd /I4BmQiKv7Qi/A0BBz5vzqTa4oM/FuVn9Obs4J4pDeoNUy9V6AQV9jBi9tMoYL0j6L9T 8E/eF4084ZkEbz/NIEhKdOLmZVlPbdGaA8f8l5NmidSyFeYS6m1denaMereHwsPsDt4o bRKfBlU9dK2OXYPmvewervHhbn0qK/mWFSms2FtkVOo4rC4c+0z2wN41cxGNliT6r0BI AGXYKS2kxPxMJqsmXh2s+zJD2isFMFZFP+YdCNnGOyzuFQaHIVeOgf3sFyKcSJSW9jkp Acjg== X-Gm-Message-State: APjAAAUI+M1mZ+DqxWZk0vhS/1Xz68P/95s3MRbZAopG33xaLadwnKF7 MIwLPtVHnkmBWaftzC3DUXsVig== X-Google-Smtp-Source: APXvYqzsqQmdgJj3jeIDVq76HPcJpxfluPpf19/xxhP3uizn5JqLt/VNLa8L7aHlrqKs6BQBR3c4qA== X-Received: by 2002:a1c:e108:: with SMTP id y8mr18411997wmg.65.1565009932852; Mon, 05 Aug 2019 05:58:52 -0700 (PDT) Received: from radium.baylibre.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id k9sm15582779wrd.46.2019.08.05.05.58.51 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 05 Aug 2019 05:58:52 -0700 (PDT) From: Fabien Parent To: thierry.reding@gmail.com, robh+dt@kernel.org, matthias.bgg@gmail.com Subject: [PATCH 2/2] pwm: pwm-mediatek: Add MT8516 SoC support Date: Mon, 5 Aug 2019 14:58:48 +0200 Message-Id: <20190805125848.15751-2-fparent@baylibre.com> X-Mailer: git-send-email 2.23.0.rc1 In-Reply-To: <20190805125848.15751-1-fparent@baylibre.com> References: <20190805125848.15751-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190805_055857_667979_793D24B8 X-CRM114-Status: UNSURE ( 9.03 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Fabien Parent , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add the compatible and the platform data to support PWM on the MT8516 SoC. Signed-off-by: Fabien Parent Reviewed-by: Matthias Brugger Acked-by: Uwe Kleine-König --- drivers/pwm/pwm-mediatek.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/pwm/pwm-mediatek.c b/drivers/pwm/pwm-mediatek.c index eb6674ce995f..6697e30811e7 100644 --- a/drivers/pwm/pwm-mediatek.c +++ b/drivers/pwm/pwm-mediatek.c @@ -302,11 +302,18 @@ static const struct mtk_pwm_platform_data mt7628_pwm_data = { .has_clks = false, }; +static const struct mtk_pwm_platform_data mt8516_pwm_data = { + .num_pwms = 5, + .pwm45_fixup = false, + .has_clks = true, +}; + static const struct of_device_id mtk_pwm_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,mt8516-pwm", .data = &mt8516_pwm_data }, { }, }; MODULE_DEVICE_TABLE(of, mtk_pwm_of_match);