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: 9771553 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 918CD6034B for ; Wed, 7 Jun 2017 13:49:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CA0828472 for ; Wed, 7 Jun 2017 13:49:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 70F66284A6; Wed, 7 Jun 2017 13:49:33 +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 0114828472 for ; Wed, 7 Jun 2017 13:49:33 +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=E+sdrnEvS5ijVXCpxjwUi9p3Rs/PF7TeFyAk/BWCeI8=; b=pYS Laeo+NbeR5Fvx298GfnzzdisHfIvyos342/zkoSQYpg8k/CU6rEdGAQtSzzRt/ceDAtTBic2o/fj8 o5pENqCBzmGdO2HG96MQgAM8FbORCkaRttib1d0mrU+E6MBmOf71tI9Y6D/nEGSnMNYzdSJUAGypS /GBr8ubx9zE8dQcWvP962/STabx6RFCt1JxO8IlQ78hLPceiPQXUkWFUaBbN2HIxKvGhoQGdKsBaU KN5vtO+HYGrTfI2A/x2XJnaJohtr0/VunUf2PV+P3c/Cq3jKo4qaU/twlEnjLVoqMNNJ74pzWWN6+ 1U8n9nO8BbrRbNyP36iRxVH20kz1Pmw==; 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 1dIbKs-0006CN-2N; Wed, 07 Jun 2017 13:49:22 +0000 Received: from mail-wr0-x233.google.com ([2a00:1450:400c:c0c::233]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dIbKe-0005tH-Tf for linux-amlogic@lists.infradead.org; Wed, 07 Jun 2017 13:49:10 +0000 Received: by mail-wr0-x233.google.com with SMTP id v111so6443907wrc.3 for ; Wed, 07 Jun 2017 06:48:48 -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=gq35OnalFQAHqWAynM/N+7MYWjgItcFz4rx1kd/vOLs3c0qRSum29/PvDy3sTbZf1U xFHgfYa0i4U+aobrRjKx5DLvdJ0DGtkXRcXo6zwg2bf3YVl0AkWKSWKwJ3MJJib+N3NW 6BtB4axW7/YjHif13Ds3rlzYw3sbhDXg+xdsz0Ua/E2qi7prQpcGHYdz57GSpcafu5bu 60fYWZqV/BklUDYOtrjNJAzVzaMX2pM96qQyNkwUPUSFoZ+dUrW7tBeOKhpLAQ/YV8Nx YCtWveppzwDeh5wWRJHyYLhJk9+V6PHJN6GlUAnhGBCeaK/T4j9NqR8eDNV1KEk4fo6B Xiow== X-Gm-Message-State: AODbwcBTdMWzBhsVZliRzHtNgAWtdJsVURn94cNQjqSWz+cpwOD3CFu7 tCl5NfiBpFBAbNR1 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_064909_104963_7BF30211 X-CRM114-Status: GOOD ( 11.99 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=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 {