From nobody Sun Jun 18 18:14:21 2023 X-Original-To: freebsd-drivers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qkgz25x8Cz4fWj9 for ; Sun, 18 Jun 2023 18:14:38 +0000 (UTC) (envelope-from john@sanren.ac.za) Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qkgz11Y5tz4CY1 for ; Sun, 18 Jun 2023 18:14:36 +0000 (UTC) (envelope-from john@sanren.ac.za) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=sanren-ac-za.20221208.gappssmtp.com header.s=20221208 header.b=lcfM1h8S; spf=pass (mx1.freebsd.org: domain of john@sanren.ac.za designates 2607:f8b0:4864:20::52b as permitted sender) smtp.mailfrom=john@sanren.ac.za; dmarc=none Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-52cb8e5e9f5so1672579a12.0 for ; Sun, 18 Jun 2023 11:14:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sanren-ac-za.20221208.gappssmtp.com; s=20221208; t=1687112073; x=1689704073; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=IjWADAFc/JNbpgq3doH6VxcguFolf1a95lxuFGrdqJI=; b=lcfM1h8S35W316ZYVOReuIeg3jCMKIjQ9gLNe3/o6QD4OAoFF4bBIaiHEgNx6PJSLh OLyH4bN5VzyaeD9tNDVMJ4jWN8h0oan+4yV+1vZM19ANFzLHPMkGb0XVQYWuaMxB6Gg0 SfmXIvB/yvjI9Tv9AfdxaVobJyPly8nxf+gE4KlxiV95P0RZWW9hwZyqBxFkFmA/GX63 sAF5uy4gB+ST8WRGgweuC8LTfTcDlBOdP6GPU0Fu8e3OTmhb6HufVB2PAseFAnrnF6af G8z2FMJvEDtJcjtkatBYqICT+da5t8SVfJtC4IjOvNyvGX6wEWuATDxowWFzlLgtErwG Vl9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687112073; x=1689704073; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=IjWADAFc/JNbpgq3doH6VxcguFolf1a95lxuFGrdqJI=; b=M5SOvvJVHq44GIZ47nx0965zwvL+C8SKcnkRI/jDCJeOSdymxb7m3ijGGcYs8pwPsG 5D5FlQgQ0e48ZVbeey3lbZ1Egd4FRqTRm82f2xg7Pt7AxJvhRYA2y4FcbEghDAxblFeC JtHOkfySsBzqWDXood+90L3qx6UtjbDoZgMFTX8u3Rb6cZ1hr2wg69nXRE+R7KqRxnY3 WaRglXX9Pl2IIeQWE4RfBfZjNRNBx21qeYOLvTu5sUPyn4KmBLHA9lUm44emR5Ycu4XW d9UcUvkKtBDfH5WX9IEmMMwUwak1P6+OM+y6W7zjiWXDcx2pJi5RTbBehUSnqWen2v/r 1gdw== X-Gm-Message-State: AC+VfDyPgtQlPQfQ5eBzsaPzv/KzVd82uh/o2FFEXlSayQLQ3F6Dk8KE 4Tkii3Vbbs32akP8KYBYyDqGhXaxzRc0Euj2hcoB994ELxvsESrb X-Google-Smtp-Source: ACHHUZ5ZjNT2U9UZk89Bss3QCTL19eYj8B4Dcq3ElL6AnybAqjxXgkZxqpkBT9qVI/10m+80FR3i2fYUfiEHVjkNXKA= X-Received: by 2002:a17:90a:a592:b0:25e:8355:33e4 with SMTP id b18-20020a17090aa59200b0025e835533e4mr10349222pjq.23.1687112072967; Sun, 18 Jun 2023 11:14:32 -0700 (PDT) List-Id: Writing device drivers for FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-drivers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-drivers@freebsd.org MIME-Version: 1.0 From: John Hay Date: Sun, 18 Jun 2023 20:14:21 +0200 Message-ID: Subject: driver for OCP TAP TimeCard To: freebsd-drivers@freebsd.org Content-Type: multipart/alternative; boundary="000000000000ce4c8005fe6b63e5" X-Spamd-Result: default: False [-3.49 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.988]; R_DKIM_ALLOW(-0.20)[sanren-ac-za.20221208.gappssmtp.com:s=20221208]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DKIM_TRACE(0.00)[sanren-ac-za.20221208.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::52b:from]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-drivers@freebsd.org]; BLOCKLISTDE_FAIL(0.00)[2607:f8b0:4864:20::52b:server fail]; ARC_NA(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; DMARC_NA(0.00)[sanren.ac.za]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; PREVIOUSLY_DELIVERED(0.00)[freebsd-drivers@freebsd.org]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4Qkgz11Y5tz4CY1 X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N --000000000000ce4c8005fe6b63e5 Content-Type: text/plain; charset="UTF-8" Hi, I'm thinking of writing a driver for the OCP TAP TimeCard, so I'm looking for ideas on how to approach it. The card is basically a PCIe card with a Xilinx FPGA at the core. It implements a counter that is synchronised / disciplined to TAI using one or more onboard GPS modules. The oscillator is also modular and can be anything from a lowly free running temperature compensated oscillator (TCXO), to oven controlled oscillators (OCXO), Rubidium and Cesium modules that will discipline themselves to the GPS PPS signal. Apart from the counter and other related functions, it also makes four 16550 UARTs, a I2C master, quad SPI master (same as the dev/xilinx/axi_quad_spi) available. The quad SPI is to reprogram the Xilinx flash, the UARTS to access the GPS and other modules that have a UART and the I2C to access onboard sensors. They are all memory mapped inside a single bar, 64k appart. It also has MSI interrupts with a seperate vector for each function. The "standard" functions (UART, I2C and SPI) are what I am wondering about. One way to make them available is something like what the puc driver did. I also saw dev/xilinx/xlnx_pcib.c that uses ofw and fdt, that might be a way, but that seems to be more geared towards the embedded processors. So I was wondering if there are other ways that might be better. If you want to, you can read more about the card at the links below: https://github.com/opencomputeproject/Time-Appliance-Project/tree/master/Time-Card And the programming at: https://github.com/opencomputeproject/Time-Appliance-Project/tree/master/Time-Card/FPGA/Open-Source/Implementation/Xilinx/TimeCard Regards John -- John Hay --000000000000ce4c8005fe6b63e5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I'm thinking of writ= ing a driver for the OCP TAP TimeCard, so I'm looking for ideas on how = to approach it.

The card is basically a PCIe card = with a Xilinx FPGA at the core. It implements a counter that is synchronise= d / disciplined to TAI using one or more onboard GPS modules. The oscillato= r is also modular and can be anything from a lowly free running temperature= compensated oscillator (TCXO), to oven controlled oscillators (OCXO), Rubi= dium and Cesium modules that will discipline themselves to the GPS PPS sign= al.

Apart from the counter and other related funct= ions, it also makes four 16550 UARTs, a I2C master, quad SPI master (same a= s the dev/xilinx/axi_quad_spi) available. The quad SPI is to reprogram the = Xilinx flash, the UARTS to access the GPS and other modules that have a UAR= T and the I2C to access onboard sensors. They are all memory mapped inside = a single bar, 64k appart. It also has MSI interrupts with a seperate vector= for each function.

The "standard" f= unctions (UART, I2C and SPI) are what I am wondering about. One way to make= them available is something like what the puc driver did. I also saw dev/x= ilinx/xlnx_pcib.c that uses ofw and fdt, that might be a way, but that seem= s to be more geared towards the embedded processors. So I was wondering if = there are other ways that might be better.

If= you want to, you can read more about the card at the links below:
https://github.com/opencomputeproject/Time-Appliance-= Project/tree/master/Time-Card
And the programming at:
http= s://github.com/opencomputeproject/Time-Appliance-Project/tree/master/Time-C= ard/FPGA/Open-Source/Implementation/Xilinx/TimeCard

Regards

John
--
Jo= hn Hay
--000000000000ce4c8005fe6b63e5--