From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C22CEC433FE for ; Tue, 11 Oct 2022 08:48:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6U1dX1/obrm5ygLIEKSfgOmVmr5h8jHu5DCFheMk0ds=; b=CrwV5o75QHxXgD Lq66Wyv6hWG4xVUrZXt0xSHdGX22vRYxVkzE8lPXpqWhdJviRu67rx9UPHoEcWYHFDRDX6flDXNp3 HM4U5CRPodXXjtVzDdehLErvfI34/5qYjrVKjk9pEHkjCXLlaHzkqTkedNJBJ6XTJHjypF4lZkUw3 p+x45zltd9NU+Jc4ATgG8FlZbh6WoscoyhivkHZ98hl6vhnS0Ei2zwsLxFNOOblOQBRsd9gIJ7DLX L7IN+t8srJAhkx11Wgk/URXSPqRfuvisflimlhPCkCnXCVrQ89GOyo0yofY1dW0FJs/0cAunp5GGk 5j9nMc3bWcFP09TsHRlw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oiAuy-003lWH-Fe; Tue, 11 Oct 2022 08:47:16 +0000 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oiAuv-003lVA-8U for linux-arm-kernel@lists.infradead.org; Tue, 11 Oct 2022 08:47:14 +0000 Received: by mail-ej1-x631.google.com with SMTP id qw20so29242666ejc.8 for ; Tue, 11 Oct 2022 01:47:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20210112.gappssmtp.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=LK95q74XIadLRG8UNQxgJhN9fL+IlgoqYblU0SzXCh8=; b=A/Vx135nKgYBGqsMpFR3ZJPhtMdCqDjjhnOaqdeqKr0D24HYjfYXxqjYaQpM6NU/qb ralcbMVh16ryYzi7mGrqux//glGa01eCv8mSCPDNvmjbaV+suo5mm41Rwp/vUaHDz3KW UGVi/bw/ac756KJESbu8mvt1mW+q1ay3ZvDJ1whC+4cb1fpUJA9+BQuiErag2u423HBw myH0mv3Cd1c7NwiyV8Jndq6Um3i9QQSiVLhexoH11YX17XUzxPxf/RZrA52Elf4OQCsH ZppFdgpwIIi2GteHAyYyY67eAu5lkopbd0pIQsUO4FI78mFySC2BN+kYtdaveigQS+v3 ianA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=LK95q74XIadLRG8UNQxgJhN9fL+IlgoqYblU0SzXCh8=; b=xMJfUvg4MPU8zcy7tP2MzW4DhiGmZEkUD8cFo3QtKryNU+rqtmLfTHGJ/TyClmaRLP c9R2jshqQP88QX8ZmMfmsio7sR37c3znAfWwbpD1ihArVu65OrBRA1tgLQxwn1o1rp8a SCnrX3x4QvjdfuepZqUy7M1v0lYTnjwwnMvkyW6V0a0Om6+3QyZV60ptZq2fTfyO+UNO rAhqfeTxlDLbJWQeicgKWe9nXBmxgkKOEldd7mabAROKvBJuTduKJecwUilI2/OHD6ij hFMu+BZHb/9oEAAHSKg4BMNrfiSfAr38jNhzMIoTmggHEYCBehaAdF1+ME6pe0AngiBy vwbg== X-Gm-Message-State: ACrzQf3MPu+UqFh9AC6E12DoqQOvBvELgT5dd9ci1tIbbWEZ86jXnvIo svgWWdAfYHZMiRRNFRRPVKG7bCZRkeC8RyhE X-Google-Smtp-Source: AMsMyM5+hP9RU4wT1m5tt5KypA6kO/GWwcR9/era6nY/8kWGijTj2YDqjkWYQGh2kWquIc1bEOFo2Q== X-Received: by 2002:a17:906:730f:b0:783:27c5:f65f with SMTP id di15-20020a170906730f00b0078327c5f65fmr19132415ejc.142.1665478025961; Tue, 11 Oct 2022 01:47:05 -0700 (PDT) Received: from localhost (host-213-179-129-39.customer.m-online.net. [213.179.129.39]) by smtp.gmail.com with ESMTPSA id 2-20020a170906300200b0077a11b79b9bsm2277917ejz.133.2022.10.11.01.47.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 01:47:05 -0700 (PDT) Date: Tue, 11 Oct 2022 10:47:04 +0200 From: Jiri Pirko To: Vadim Fedorenko Cc: Jakub Kicinski , Arkadiusz Kubalewski , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, Vadim Fedorenko Subject: Re: [RFC PATCH v3 1/6] dpll: Add DPLL framework base functions Message-ID: References: <20221010011804.23716-1-vfedorenko@novek.ru> <20221010011804.23716-2-vfedorenko@novek.ru> <24d1d750-7fd0-44e2-318c-62f6a4a23ea5@novek.ru> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221011_014713_321396_2CF60E19 X-CRM114-Status: GOOD ( 23.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Tue, Oct 11, 2022 at 10:32:22AM CEST, jiri@resnulli.us wrote: >Mon, Oct 10, 2022 at 09:54:26PM CEST, vfedorenko@novek.ru wrote: >>On 10.10.2022 10:18, Jiri Pirko wrote: >>> Mon, Oct 10, 2022 at 03:17:59AM CEST, vfedorenko@novek.ru wrote: >>> > From: Vadim Fedorenko [...] >>I see your point. We do have hardware which allows changing type of SMA >>connector, and even the direction, each SMA could be used as input/source or >>output of different signals. But there are limitation, like not all SMAs can >>produce IRIG-B signal or only some of them can be used to get GNSS 1PPS. The > >Okay, so that is not the *type* of source, but rather attribute of it. >Example: > >$ dpll X show >index 0 > type EXT > signal 1PPS > supported_signals > 1PPS 10MHz > >$ dpll X set source index 1 signal_type 10MHz >$ dpll X show >index 0 > type EXT > signal 10MHz > supported_signals > 1PPS 10MHz > >So one source with index 0 of type "EXT" (could be "SMA", does not >matter) supports 1 signal types. > > >Thinking about this more and to cover the case when one SMA could be >potencially used for input and output. It already occured to me that >source/output are quite similar, have similar/same attributes. What if >they are merged together to say a "pin" object only with extra >PERSONALITY attribute? > >Example: > >-> DPLL_CMD_PIN_GET - dump > ATTR_DEVICE_ID X > ><- DPLL_CMD_PIN_GET > > ATTR_DEVICE_ID X > ATTR_PIN_INDEX 0 > ATTR_PIN_TYPE EXT > ATTR_PIN_SIGNAL 1PPS (selected signal) > ATTR_PIN_SUPPORTED_SIGNALS (nest) > ATTR_PIN_SIGNAL 1PPS > ATTR_PIN_SIGNAL 10MHZ > ATTR_PIN_PERSONALITY OUTPUT (selected personality) > ATTR_PIN_SUPPORTED_PERSONALITIES (nest) > ATTR_PIN_PERSONALITY DISCONNECTED > ATTR_PIN_PERSONALITY INPUT > ATTR_PIN_PERSONALITY OUTPUT (note this supports both input and > output) > > ATTR_DEVICE_ID X > ATTR_PIN_INDEX 1 > ATTR_PIN_TYPE EXT > ATTR_PIN_SIGNAL 10MHz (selected signal) > ATTR_PIN_SUPPORTED_SIGNALS (nest) > ATTR_PIN_SIGNAL 1PPS > ATTR_PIN_SIGNAL 10MHZ > ATTR_PIN_PERSONALITY DISCONNECTED (selected personality - not > connected currently) > ATTR_PIN_SUPPORTED_PERSONALITIES (nest) > ATTR_PIN_PERSONALITY DISCONNECTED > ATTR_PIN_PERSONALITY INPUT (note this supports only input) > > ATTR_DEVICE_ID X > ATTR_PIN_INDEX 2 > ATTR_PIN_TYPE GNSS > ATTR_PIN_SIGNAL 1PPS (selected signal) > ATTR_PIN_SUPPORTED_SIGNALS (nest) > ATTR_PIN_SIGNAL 1PPS > ATTR_PIN_PERSONALITY INPUT (selected personality - note this is > now he selected source, being only > pin with INPUT personality) > ATTR_PIN_SUPPORTED_PERSONALITIES (nest) > ATTR_PIN_PERSONALITY DISCONNECTED > ATTR_PIN_PERSONALITY INPUT (note this supports only input) > > ATTR_DEVICE_ID X > ATTR_PIN_INDEX 3 > ATTR_PIN_TYPE SYNCE_ETH_PORT > ATTR_PIN_NETDEV_IFINDEX 20 > ATTR_PIN_PERSONALITY OUTPUT (selected personality) > ATTR_PIN_SUPPORTED_PERSONALITIES (nest) > ATTR_PIN_PERSONALITY DISCONNECTED > ATTR_PIN_PERSONALITY INPUT > ATTR_PIN_PERSONALITY OUTPUT (note this supports both input and > output) > > ATTR_DEVICE_ID X > ATTR_PIN_INDEX 4 > ATTR_PIN_TYPE SYNCE_ETH_PORT > ATTR_PIN_NETDEV_IFINDEX 30 > ATTR_PIN_PERSONALITY OUTPUT (selected personality) > ATTR_PIN_SUPPORTED_PERSONALITIES (nest) > ATTR_PIN_PERSONALITY DISCONNECTED > ATTR_PIN_PERSONALITY INPUT > ATTR_PIN_PERSONALITY OUTPUT (note this supports both input and > output) > > >This allows the user to actually see the full picture: >1) all input/output pins in a single list, no duplicates >2) each pin if of certain type (ATTR_PIN_TYPE) EXT/GNSS/SYNCE_ETH_PORT >3) the pins that can change signal type contain the selected and list of > supported signal types (ATTR_PIN_SIGNAL, ATTR_PIN_SUPPORTED_SIGNALS) >4) direction/connection of the pin to the DPLL is exposed over > ATTR_PIN_PERSONALITY. For each pin, the driver would expose it can > act as INPUT/OUTPUT and even more, it can indicate the pin can > disconnect from DPLL entirely (if possible). >5) user can select the source by setting ATTR_PIN_PERSONALITY of certain > pin to INPUT. Only one pin could be set to INPUT and that is the > souce of DPLL. > In case no pin have personality set to INPUT, the DPLL is > free-running. Okay, thinking about it some more, I would leave the source select indepentent from the ATTR_PIN_PERSONALITY and selectable using device set cmd and separate attribute. It works better even more when consider autoselect mode. Well of course only pins with ATTR_PIN_PERSONALITY INPUT could be selected as source. > >This would introduce quite nice flexibility, exposes source/output >capabilities and provides good visilibity of current configuration. > > >>interface was created to cover such case. I believe we have to improve it to >>cover SyncE configuration better, but I personally don't have SyncE hardware >>ready to test and that's why I have to rely on suggestions from yours or >>Arkadiusz's experience. From what I can see now there is need for special >>attribute to link source to net device, and I'm happy to add it. In case of >>fixed configuration of sources, the device should provide only one type as >>supported and that's it. >> [...] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel