Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4636177ybb; Tue, 24 Mar 2020 02:25:31 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvkVbyNU2WPTlY3zTdHImVX1+TOXQOB480lT7GMvy/okKByvRD8KPXLSWG/nrrPOXNu9gSM X-Received: by 2002:a9d:64cd:: with SMTP id n13mr21263373otl.274.1585041930845; Tue, 24 Mar 2020 02:25:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585041930; cv=none; d=google.com; s=arc-20160816; b=CWBk8FVJDnRhYw/nqw3T1FI8Zn0DlOkcHRm538hcRK6gk/IfpujAa2GeFyvDGVTiR2 UX27vTOimC7ZTTdP0e+hedPpbeyFVtsrgy92gnUyTnoVwXuX6tksScr9dDPEFjFMB66a mLTORDkzc8gVruVutC/2o0s/JbqhfNyHnvVs/xFqwgN1pxDqlr/pLqUSbrXqq4CAquwA gN2c7x4fbDrhwlQDCFI+LCk60dOoUMMRmTtQMb6Zq+395c8pZPIu7dvei2lZjVuuWtvK KSAufegttCZ5fc9F6tTl+EsHeWGX73dxs7QjrNvIDDN2eFV61iY5igS+37XRFabeNt/8 j9JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr; bh=WoXynBfZGIXTfnV74J9hzRpI9NvUgjYz33PtEDi8J8U=; b=xrSojgbmO/te6CuhaAWiDc7gOZrH9HxsYRefFuXDhzJkzeaJNKSB8+pOHpAXn3q+90 HCk40mf+v53d5rdYznVr/E6T/6ThPoJiFyL//jVPoQfVP+Ar4sg/QfrVklqIHADuhkcG To2h6dj2qmGivLxbER8Q006fjSFs5ih8WKivoqn6A88CCgrSDLnuckL8xFiXyOUL1Llk Uy6l01QTga5fgQiPOWhvD+y6XY5scBGBeMneN4BLpUc6c8AEgFNROWyBafqSGfFqI5/1 4sR1icfSiI4KCjZYKP7qOjsQNZA5jSfWnQfovHUJjCitGHt1zyA0/5AVpUlwfG2Dxz2p XuyQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=microchip.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c67si3947585oif.5.2020.03.24.02.25.18; Tue, 24 Mar 2020 02:25:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727227AbgCXJYj (ORCPT + 99 others); Tue, 24 Mar 2020 05:24:39 -0400 Received: from esa5.microchip.iphmx.com ([216.71.150.166]:44566 "EHLO esa5.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727050AbgCXJYi (ORCPT ); Tue, 24 Mar 2020 05:24:38 -0400 IronPort-SDR: 9rNACHU5GfjfbxS52CSXzX4cpJYA2I123pBps2yVbW5cCG9XrQZadfkYQLVQE5HkzsT7qi2Prc zypdd4Rm+Giodg0ZhLNvpP4lfPWaA0AKUxSbOPTum/ZqpP9tF5hNdyW/ggINTBONSRcj6iPJNR nMdMpnAUGKnTocalTYMixM4ihZSeNlcY612xGuU0r/e1oznQ0Q7XdCjtFwvMz3Hn5Hk63mFjaE qPhMKejNa7wmLV1BCgaMJYba67d7Guq3q454J3MBscuHCleDlb+ibA8iGfwbd9IP1UiVFz1AL1 eW0= X-IronPort-AV: E=Sophos;i="5.72,299,1580799600"; d="scan'208";a="70035298" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 24 Mar 2020 02:24:38 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 24 Mar 2020 02:24:36 -0700 Received: from localhost (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Tue, 24 Mar 2020 02:24:37 -0700 Date: Tue, 24 Mar 2020 10:24:36 +0100 From: Horatiu Vultur To: Vladimir Oltean CC: Yangbo Lu , lkml , netdev , "David S . Miller" , "Richard Cochran" , Vladimir Oltean , Claudiu Manoil , "Andrew Lunn" , Vivien Didelot , "Florian Fainelli" , Alexandre Belloni , Microchip Linux Driver Support Subject: Re: [PATCH 6/6] ptp_ocelot: support 4 programmable pins Message-ID: <20200324092436.stq25qac2h4rm3il@soft-dev3.microsemi.net> References: <20200320103726.32559-1-yangbo.lu@nxp.com> <20200320103726.32559-7-yangbo.lu@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vladimir, The 03/20/2020 15:20, Vladimir Oltean wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > Hi Yangbo, > > On Fri, 20 Mar 2020 at 12:42, Yangbo Lu wrote: > > > > Support 4 programmable pins for only one function periodic > > signal for now. Since the hardware is not able to support > > absolute start time, driver starts periodic signal immediately. > > > > Are you absolutely sure it doesn't support absolute start time? > Because that would mean it's pretty useless if the phase of the PTP > clock signal is out of control. It looks like there is no support for absolute start time. But you should be able to control the phase using the register PIN_WF_LOW_PERIOD. > > I tested your patch on the LS1028A-RDB board using the following commands: > > # Select PEROUT function and assign a channel to each of pins > SWITCH_1588_DAT0 and SWITCH_1588_DAT1 > echo '2 0' > /sys/class/ptp/ptp1/pins/switch_1588_dat0 > echo '2 1' > /sys/class/ptp/ptp1/pins/switch_1588_dat1 > # Generate pulses with 1 second period on channel 0 > echo '0 0 0 1 0' > /sys/class/ptp/ptp1/period > # Generate pulses with 1 second period on channel 1 > echo '1 0 0 1 0' > /sys/class/ptp/ptp1/period > > And here is what I get: > https://drive.google.com/open?id=1ErWufJL0TWv6hKDQdF1pRL5gn4hn4X-r > > So the periodic output really starts 'now' just like the print says, > so the output from DAT0 is not even in sync with DAT1. > > > Signed-off-by: Yangbo Lu > > --- > > Thanks, > -Vladimir -- /Horatiu