From patchwork Thu Jun 8 12:39:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 9774587 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 98CB160350 for ; Thu, 8 Jun 2017 12:40:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88C1C284D2 for ; Thu, 8 Jun 2017 12:40:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B8692854F; Thu, 8 Jun 2017 12:40:53 +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 112E0284D2 for ; Thu, 8 Jun 2017 12:40:52 +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: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=PnQYFTxkIb36ytMtrgLAD92CLFgVTYfw1N4dZiAHOPg=; b=MV0szzj48aRrj1X46hwd+LygLp Zh/lQfdjHmZ/c0HdpJ5YqvFI0+DsHXoTvSPSJIiYcsVUPaq36ObbBp4uQ97HSXCmcLSPHT4cj2KvZ mikDOZyb4jtiklS8UnjYqtzvhjx9YWv8PeebsBL+uaFPINVTZz7cx4WPAdsrc8ofG3apWyHEGKhff A+ri4LCewxwTJUc6r3dYOK3nUcTidBRsKVuJd86l2SRy8CJWZ+dmYTg+O5CcWHT8u+6Dph7LO3jRV AHDkXkTbK6lwaCC5Rs6tHZ4/meR69ONL6gu+PcIRfD94yTAsaWGY1xkN0jSYpmRY6Cjuy/bB8dc4V zcTbb6rQ==; 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 1dIwk1-00060x-2Z; Thu, 08 Jun 2017 12:40:45 +0000 Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dIwjl-0004pL-7f for linux-amlogic@lists.infradead.org; Thu, 08 Jun 2017 12:40:32 +0000 Received: by mail-wm0-x230.google.com with SMTP id d73so30148484wma.0 for ; Thu, 08 Jun 2017 05:40:09 -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; bh=ROhNhhSUOCHmAgkCgh3q5qbQuz6T9yplA9mH/0a1sT0=; b=xOn0+sqvPuDyvuMY0ynON6ai+VzVczVGHANJArqkv7jwU9ob+tcfAMI33DzOrRn5ej DJxgPq/SwxG1sTPYOAf7g/nInuyxR+kk2Y2e8ygDYQitqyWaiFENxOUmwwgtn22GfpQ+ jnFfuacfDoUFw71XgQZvAd7ef3Q9psfGIaHoj46JS7ROEDXJprNc8fV5hfLKUbAZfkw9 2sd/+auCRcBKcGU8WFH1ePuuL11IFGTZ3b7yPfvXljbJ+FazjM05en0KZdXcigBUkBVH 9zaLEMlYRhIde4NkM00zjtsPHvIht5zy2sf/hGovi5gLO57iJ8x428sIppuyiV0KG1Gm ygDg== 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; bh=ROhNhhSUOCHmAgkCgh3q5qbQuz6T9yplA9mH/0a1sT0=; b=V3LkgyU+JCY2U0iVbcKjA03EXOAaV6pzGG1iJlXlrEd2ERN8V4LWDvRviuS3JiTbG1 eFac1bYyHFH0/P11bj8bemfCjpja2TvkiBh730fNqKYa1PMToZ6ZW805H5lWHZgIox0u +6nhwJQm91TSrBkJ9xGQrNpiu2+gN6HnO6/Q3j6BgoVOojxa7Pd7ucw3tPSUJTGAu8oP sIgTcJDj0TR0lxKwfaAgiBoR9VuVfBmk2c+hLAkwTr6XgSJRBm+aA7ukXrlrj3w8u+na FK4HaVq1O05blMKilfwLUJwMjgzsaw0ot7HfXaLT+Y112uh6j3ZXzWZDAjSBTk0tLFUf 2s3Q== X-Gm-Message-State: AODbwcBYU7YnaTTfjYk5X0IVoW6zE6ntw2OaGw6ensmF8XBK6DviCUOK ZlMdXSKcRNWM7GNW X-Received: by 10.28.51.73 with SMTP id z70mr3289249wmz.65.1496925607587; Thu, 08 Jun 2017 05:40:07 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id x37sm9791863wrb.42.2017.06.08.05.40.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Jun 2017 05:40:07 -0700 (PDT) From: Jerome Brunet To: Kevin Hilman , devicetree@vger.kernel.org Subject: [PATCH RESEND] ARM64: dts: meson-gx: use specific compatible for the AO pwms Date: Thu, 8 Jun 2017 14:39:55 +0200 Message-Id: <20170608123955.3571-1-jbrunet@baylibre.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170608_054029_569801_E330B398 X-CRM114-Status: GOOD ( 12.62 ) 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 compatible 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 --- 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 ? Resend to correct the typo reported by Neil and update the dependency to the v2 of the pwm series. [0]: https://lkml.kernel.org/r/20170608122416.1993-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 {