From patchwork Tue Jun 13 23:16:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 9784959 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 0ABF16038F for ; Tue, 13 Jun 2017 23:16:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F1ACA28592 for ; Tue, 13 Jun 2017 23:16:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E5952285B3; Tue, 13 Jun 2017 23:16:51 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 53929285A3 for ; Tue, 13 Jun 2017 23:16:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753963AbdFMXQr (ORCPT ); Tue, 13 Jun 2017 19:16:47 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:44881 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752525AbdFMXQ3 (ORCPT ); Tue, 13 Jun 2017 19:16:29 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id v5DNGQu1009964; Tue, 13 Jun 2017 18:16:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1497395786; bh=xhUWebR6LOIBtBm/DjQ6o5b/YYtdkPHInkl2/LGSJjg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=sUK4uddoRnvNgfwuzCUxjNkfuWqIzhXCHnzCfi69iTmRJ1RoyxVcS9OdNejw4rEr3 Brzn+Yi+aD5Q6tgXachIaC2qp5OcGtGkatAL0vKp3Q24Hawo9DP1AWprnW0uTWGrJx cua155G8VAsLyTqlY4FfymYVpfK2v5H/skVGgHq8= Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v5DNGQN5032246; Tue, 13 Jun 2017 18:16:26 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.294.0; Tue, 13 Jun 2017 18:16:25 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v5DNGQ41008867; Tue, 13 Jun 2017 18:16:26 -0500 Received: from localhost (uda0226610.dhcp.ti.com [128.247.59.147]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id v5DNGP321180; Tue, 13 Jun 2017 18:16:25 -0500 (CDT) From: Grygorii Strashko To: "David S. Miller" , , Sekhar Nori , Richard Cochran CC: , , , Grygorii Strashko Subject: [RFC/RFT PATCH 4/4] [debug] ARM: am335x: illustrate hwstamp Date: Tue, 13 Jun 2017 18:16:23 -0500 Message-ID: <20170613231623.28353-5-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20170613231623.28353-1-grygorii.strashko@ti.com> References: <20170613231623.28353-1-grygorii.strashko@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch allows to test CPTS HW_TS_PUSH functionality on am335x boards below sequence of commands will enable Timer7 to trigger 1sec periodic pulses on CPTS HW4_TS_PUSH input pin: # echo 1000000000 > /sys/class/pwm/pwmchip0/pwm0/period # echo 500000000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle # echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable # ./ptp/testptp -e 10 -i 3 external time stamp request okay event index 3 at 1493259028.376600798 event index 3 at 1493259029.377170898 event index 3 at 1493259030.377741039 event index 3 at 1493259031.378311139 event index 3 at 1493259032.378881279 event index 3 at 1493259033.379451424 event index 3 at 1493259034.380021520 event index 3 at 1493259035.380591660 event index 3 at 1493259036.381161765 event index 3 at 1493259037.381731909 Signed-off-by: Grygorii Strashko Acked-by: Tony Lindgren --- arch/arm/boot/dts/am335x-boneblack.dts | 6 ++++++ arch/arm/boot/dts/am335x-evm.dts | 7 +++++++ arch/arm/boot/dts/am33xx.dtsi | 1 + arch/arm/configs/omap2plus_defconfig | 2 +- 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts index 935ed17..997f5b4 100644 --- a/arch/arm/boot/dts/am335x-boneblack.dts +++ b/arch/arm/boot/dts/am335x-boneblack.dts @@ -25,4 +25,10 @@ oppnitro@1000000000 { opp-supported-hw = <0x06 0x0100>; }; + + pwm7: dmtimer-pwm { + compatible = "ti,omap-dmtimer-pwm"; + ti,timers = <&timer7>; + #pwm-cells = <3>; + }; }; diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts index 1c37a7c..ec36197 100644 --- a/arch/arm/boot/dts/am335x-evm.dts +++ b/arch/arm/boot/dts/am335x-evm.dts @@ -164,6 +164,13 @@ system-clock-frequency = <12000000>; }; }; + + pwm7: dmtimer-pwm { + compatible = "ti,omap-dmtimer-pwm"; + ti,timers = <&timer7>; + #pwm-cells = <3>; + }; + }; &am33xx_pinmux { diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index 9e24294..1a64b80 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi @@ -864,6 +864,7 @@ ranges; syscon = <&scm_conf>; status = "disabled"; + cpts-ext-ts-inputs = <4>; davinci_mdio: mdio@4a101000 { compatible = "ti,cpsw-mdio","ti,davinci_mdio"; diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig index a120ae8..6d3dcbc 100644 --- a/arch/arm/configs/omap2plus_defconfig +++ b/arch/arm/configs/omap2plus_defconfig @@ -459,7 +459,7 @@ CONFIG_CPCAP_ADC=m CONFIG_TI_AM335X_ADC=m CONFIG_BMP280=m CONFIG_PWM=y -CONFIG_PWM_OMAP_DMTIMER=m +CONFIG_PWM_OMAP_DMTIMER=y CONFIG_PWM_TIECAP=m CONFIG_PWM_TIEHRPWM=m CONFIG_PWM_TWL=m