From patchwork Wed Jun 7 13:48:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 9771551 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5742B6034B for ; Wed, 7 Jun 2017 13:49:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 40A8528464 for ; Wed, 7 Jun 2017 13:49:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 345442847A; Wed, 7 Jun 2017 13:49:14 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 B9F2A28464 for ; Wed, 7 Jun 2017 13:49: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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=+jNbdlvZ5qdLDYGuBnMuY13qtVwdy63tpzaWCs9bk+M=; b=BFF 0Mv7js4qzW/PsIn87RZ4y+q+SvlyZQycpLjKUjbkgCaznieib1iWhYUHu3O1UQ8EMjOZqNrKZKth6 ZBbP6OlvBhNaRD7wmOmYsqVsI77brtMGatH0beP0r6ycxugJMXfy6PZwqXDIAAsCfeR/IcGdSAs4D pimtUf5r9j1Jgx+eLcAcoWGLIyGtkb8LTVNoIR4JuRnpCKxfAcoQ4Vlv8ZJpBZqOutXCbc5X6QBIg icPE8tY0dQ8F0Wxj5WgTOr6g68HS9TImaaQe5Wj2QHq8maw1cTp1gP5RYnD3kboyKHGlGaN4nM16p 9qn0HX4GIZaFXzTgV+WgZ1JIykgeF1w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dIbKi-00060f-Vu; Wed, 07 Jun 2017 13:49:13 +0000 Received: from mail-wr0-x22a.google.com ([2a00:1450:400c:c0c::22a]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dIbKe-0005tA-ES for linux-arm-kernel@lists.infradead.org; Wed, 07 Jun 2017 13:49:10 +0000 Received: by mail-wr0-x22a.google.com with SMTP id v111so6443777wrc.3 for ; Wed, 07 Jun 2017 06:48:47 -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; bh=MPg+4n5eHlt6q95uja0DLYLYM7fQudO7ms9ddEj+cOY=; b=X/96JMklw3baV27UqYP7jEf9ZD9tN7UNkc6jdujzAE+jyFrvmLx6I5o8XpxAGxjSUw bhJ0PGyShAkHGm4y9vBqVzX2up3bobQ7tp+DTgsfQaDBBLNC5imI4Gb0UUs8ztp+SQ+9 F581ZtXtwd+WSj2eDuJiPu9AKz/IJb65m1ZkbSOu1e1vws4/x4+BtY7nroMSX71qSdye z5aq3oZJwwrXoS5JAzZpOjoLDlK0r7XnPmTQzPq8wo7pOXsd+3/IQ8qKGQ/xBJtEAXJS uU6dOF5EDEwl1OyqCETPDotD8uSwS5ZYU6fEIa7Yo7lQv5zyedQ2yGn5ro0q60Ws1czg lUyg== 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; bh=MPg+4n5eHlt6q95uja0DLYLYM7fQudO7ms9ddEj+cOY=; b=HWHSe4Jvz/0so3jp+RItFrXHoBp4oQ7rXfOoOD+1OA0HYXYJQOY5BmZ2QmX4Xhlp4w ZxjMhGdxxpRLVarDC4FTmhEZuAu3TdPpjDvbPNhpdmtkFwJmr7G4IiRSN1KnmWdFiz6o /kNRn7Ij4Bar9uRdDUCK3eut+BVHxdlOR4iLovHcMfFJAhc9/Gt3wV2/h/1Gtw0k+lWa KLCMEyiKGlD2bw5q44mB2VnqwXpgOlTjAtG2TqSwj5WPrf4iriuKhiUm+0wRGyXDcck2 cb0Q54bRRzLdIa9gUjHuuFy86Fog5AinrhV2TKWVH6PN+1Iakii9d8dC4A/KsB4BKcB7 Zrqw== X-Gm-Message-State: AODbwcAmjvLFx+MjPi8nn9MAm0xsFOWJTMJdmOnppN4qynM8iM/wKMb8 pz8LU2v32Ug7DHzJ X-Received: by 10.223.173.38 with SMTP id p35mr24350952wrc.88.1496843326511; Wed, 07 Jun 2017 06:48:46 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id x126sm2924252wme.12.2017.06.07.06.48.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Jun 2017 06:48:46 -0700 (PDT) From: Jerome Brunet To: Kevin Hilman , devicetree@vger.kernel.org Subject: [PATCH] ARM64: dts: meson-gx: use specific compatible for the AO pwms Date: Wed, 7 Jun 2017 15:48:41 +0200 Message-Id: <20170607134841.6822-1-jbrunet@baylibre.com> X-Mailer: git-send-email 2.9.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170607_064908_649001_79308EB0 X-CRM114-Status: GOOD ( 13.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , linux-kernel@vger.kernel.org, Carlo Caione , linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Use the specific compatiable for AO pwms so the pwms input can be correctly set FDIV4 is not present on the pwm A0, so change kadhas vim input clocks to xtal. Signed-off-by: Jerome Brunet Reviewed-by: Neil Armstrong --- This patch depends on the pwm patchset available here [0] On the Khadas Vim I chose to replace FDIV4 with the crytal. Only PWM_AO_B is actually used and It is used for led dimming. The frequency, as long as it is high enough, does not matter. Only the duty cycle does. After testing, xtal seems to be fast enough. PWM_AO_A is outputed on the general purpose header, but no usage is defined for it. It might be bit late for that but I wonder why it defined and enabled ? Same goes for the other peripherals activated on this general purpose header. I know that's what shows the schematics but one could choose to do anything else possible with it ? like use in GPIO mode, or another function. In addition, we never which setting will be required ? (eg which clock source ?). Should we keep those ? or remove them ? [0]: https://lkml.kernel.org/r/20170607133013.4766-1-jbrunet@baylibre.com arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 2 +- arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi index 436b875060e7..fbaa6b598fca 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi @@ -391,7 +391,7 @@ }; pwm_AO_ab: pwm@550 { - compatible = "amlogic,meson-gx-pwm", "amlogic,meson-gxbb-pwm"; + compatible = "amlogic,meson-gx-ao-pwm", "amlogic,meson-gxbb-ao-pwm"; reg = <0x0 0x00550 0x0 0x10>; #pwm-cells = <3>; status = "disabled"; diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts index 6a81f0168da5..371f43cdd3ab 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts @@ -86,8 +86,8 @@ status = "okay"; pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>; pinctrl-names = "default"; - clocks = <&clkc CLKID_FCLK_DIV4>; - clock-names = "clkin0"; + clocks = <&xtal> , <&xtal>; + clock-names = "clkin0", "clkin1" ; }; &pwm_ef {