Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp679812ybb; Fri, 20 Mar 2020 06:21:42 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvlktbZ8TEsDxF7dkOUNHQxQ4B9elFb10dZvzt/q9bGHy2qsmME2x/i4HxMCHqDoTw+0wi5 X-Received: by 2002:a9d:5c0c:: with SMTP id o12mr6631629otk.145.1584710501884; Fri, 20 Mar 2020 06:21:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584710501; cv=none; d=google.com; s=arc-20160816; b=G9VMV7rGPXCv9YGWQT5OeMdUg44ut+Z8HVK/nNlHin+mcFuKmhA946pAKsZCZY+iyw 7li7yVSP6wH3mOUrkBB9ds2rZKyzfq1t7sUjBqKjbl74gpmnY56oEPHssPKfEgh1ragy iUhss8SIknpwrNCvLrKcdYMkX1P/lEwEW7LOl58KbxHlS+tsWW+PVFaOmeCbjbilrbQf ckT857zKvfXy1MRE1Z7Vm/kNjTYU1oFCWc4f9TyFit7JnkmLZb1WSTKIblyr9JAiUGXZ qe/AH9DRkDrZXzANZzQp11Tm/kdbIol1EnaNkNOGn9gBSH7+kSx7Wb5O7DDLY+PJJGi5 x2fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=dUEEIXwK5ES9niBblpQmidtobsRZQ/p8qQvEflwvR7Y=; b=D9ExEByLFqS2GS0Gal3kIcq9UQ/72IEzzUsGgIT/wzzThD5+k3V25GW3Zo2hC2mwJ3 z2jfP7N+SatZuxj4ZuxuxB31anR1+YzI6pCzgF3J+9UwyVh2xQaz+WPD9uwzdm2wL0YJ RCVheoprMsscyuA2aEiPT5xRc78H1Iy95fdGgkPGIVo1aSJox7HDKX919kp+PGPruUP0 i8o2W0n0pVKxsncCQ+l7aHa7PTbaJ/TebKO5A8IVN1qtyCWRL62k/6xKA8C6hUhliprh U0OXsp4pM4TNr0uXaLGvh5x5loh5YlSF2NBqNhHnr5Sgq2IDMLN65zjZhZMpEokfXMeJ JA8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ovz1jPHk; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c14si3092360otm.146.2020.03.20.06.21.21; Fri, 20 Mar 2020 06:21:41 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ovz1jPHk; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727217AbgCTNUq (ORCPT + 99 others); Fri, 20 Mar 2020 09:20:46 -0400 Received: from mail-ed1-f50.google.com ([209.85.208.50]:32788 "EHLO mail-ed1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727113AbgCTNUq (ORCPT ); Fri, 20 Mar 2020 09:20:46 -0400 Received: by mail-ed1-f50.google.com with SMTP id z65so7110951ede.0; Fri, 20 Mar 2020 06:20:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dUEEIXwK5ES9niBblpQmidtobsRZQ/p8qQvEflwvR7Y=; b=Ovz1jPHkhhJXMWr1p86lFmV8kwp9F0zmQBsHj5nURFj1OHPjfpeI9eXBePgTjUGs6q F4XeQCwxH2ABKBKNstH7Dn/I5b2lm/f76I1Ru7fytTc9A3L1tJc+HFP7p7G0YMbQuVD0 Z/+GAuXaQnvTlXkrnoCBVPejq4bu1Es8/Fom7djd/1ID5Gqj4fwvr1L7xZn1kGLDVLTA agtEJcd8A88InIo5pQDqrJgdT4VKHXjl0RWyjNKpLRERBX/29yg+KQ+gTPC6h+H5hOMI 4l/vRvbId5dA7bWwZhYtln7/b00jt6NEiBTi0VMs9omcRHT/gDE+9Sq3MD5dpsdnFqoc +ZFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dUEEIXwK5ES9niBblpQmidtobsRZQ/p8qQvEflwvR7Y=; b=IJmpOJzIsdi1q5dklFjB4zeKmoniGJX1Xmd+dA1ufsc/RaCFC77qYG6ebQw6ODpq/J oX8qLCVY8UGyHzOdHxqW/BJw5sTgIhxqRDjrFPdWOVHdmF67rsIbgQVFeFQvBdV9ZXde 7GwXdpbZajFrov3QnY62s+ZkXKV/pEO2l3ikkwbFbgP4V27A4vDoCogiMqPnyVVTy3pq bWbLxTIMUgS1diQuE6buG8YA6cb2H4FFjYaO5jUtF3tCKWsZyzofnuVO9WNQSqnxzgkV AdtsyD0AgiDSq9FOVYaujpGxGg+QHoSNhhpxUnha1oAoVCgxB2PbDGe6nik3wuYXQhMT 4BCw== X-Gm-Message-State: ANhLgQ3BiKTzUMsFzCZFJihsry3fF4Tp7tyJ06CI1L+9Fw+Tg1o7NJ9o MHVZ7Kkb4ZYCmCqXaq8lsn789FjnHGy6psarKdOJzlQv4fEb/w== X-Received: by 2002:a17:906:4956:: with SMTP id f22mr7897973ejt.293.1584710443930; Fri, 20 Mar 2020 06:20:43 -0700 (PDT) MIME-Version: 1.0 References: <20200320103726.32559-1-yangbo.lu@nxp.com> <20200320103726.32559-7-yangbo.lu@nxp.com> In-Reply-To: <20200320103726.32559-7-yangbo.lu@nxp.com> From: Vladimir Oltean Date: Fri, 20 Mar 2020 15:20:32 +0200 Message-ID: Subject: Re: [PATCH 6/6] ptp_ocelot: support 4 programmable pins To: Yangbo Lu Cc: lkml , netdev , "David S . Miller" , Richard Cochran , Vladimir Oltean , Claudiu Manoil , Andrew Lunn , Vivien Didelot , Florian Fainelli , Alexandre Belloni , Microchip Linux Driver Support Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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