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: 9774585 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 54E1460350 for ; Thu, 8 Jun 2017 12:40:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 459AE284D2 for ; Thu, 8 Jun 2017 12:40:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A2F72854F; Thu, 8 Jun 2017 12:40:36 +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 D6676284D2 for ; Thu, 8 Jun 2017 12:40:35 +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=SDgsAnoao6fELpu8qF7OO0x0jgwwhQfsbd80bTEUpbM=; b=axVPF2AZdRKjSrIpuw7pU9iwWl gGDRKXiYCzoqxWcv7fgru38APLUO8LdaLH1FMNE9gbSP+7JpuiUvHIpx0vj9cfMTIfYErg1OSkieU aCHgMoYviNjrswaF9KuC5SmjMYmEkZS9+jWWsL+cLC8MErK9Z90oVSb1XIcp8gwDlgrmpobK72ctQ ILVPemd+KeA3j6sPXjzyEpN9MbgSDjD3o8S9v0OQlpjHjwWIUCMUE16kqZApLfWK135OW32k/+0pw z8UP+m9/g4gijsXxJBXYTcZ5ZFO4zIYRMQMDqQ2UyYqTAWksbVyOtXMztX0u0VSZ8hKK6f1F92LKN 6DT0Oagg==; 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 1dIwjq-0005mv-Nn; Thu, 08 Jun 2017 12:40:34 +0000 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dIwjl-0004pG-G4 for linux-arm-kernel@lists.infradead.org; Thu, 08 Jun 2017 12:40:32 +0000 Received: by mail-wm0-x232.google.com with SMTP id 7so137057859wmo.1 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=CMY3MtxzUy6hCBv0BA26LaMF87qxT/e+Y9EtqQzQilnFTdA5McLEtegI0EYbrS/XxL l6oCvE1Iw95NebMXECH3nu/vMc/4DAUN3s9NYsrMojLOfE5JuwZK1mU2JJ78w8VWOra/ VaC3AITxKfqLysynz/EWSt6T3FUNNCEh3qYnwBCGkySt80PBLpWZMK/5XzbickB67u4m KAEJNAU5E9YHHfoBO/m1ZAo1nQZcPdCaL5SoyKsJr38i+K9i1If72dnVnM+0Hi/vuByB WNsT8MKwtaGRLtEANm522X3vVd++Z8tUpGr5zX4TB4kNH3U+FFC4VjLj2f+KELXDX3/x AO8A== X-Gm-Message-State: AODbwcB7PeDtM7kXRvVr0K6MyNXRTRYOgCjnt9PbK5pi/mkwc+UnXqls 3ZhnTFcS7jOG1Wsl 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_054030_171630_64D1899C X-CRM114-Status: GOOD ( 14.07 ) 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 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 {