Xilinx / Xilinx/embeddedsw

rfsoc.c and xrfclk_example_app.c: Incorrect Linux gpio ID passed to XRFClk_Init() for GPIO to control the SPI SDO Mux on the CLK104

Open
#284 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
1.2k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

For the ZCU216, the Linux gpio id passed to XRFClk_Init() is incorrect on line 276 of rfsoc.c ret = XRFClk_Init(485);, is incorrect. The same applies to line 142 of xrfclk_example_app.c that passes gpio486, XRFClk_Init(486);. This causes RfclkReadReg commands from the RF Evaluation GUI to return an incorrect value because the SPI SDO mux is not properly controlled. It is possible that the Linux gpio specified for the ZCU208 might also be incorrect. In the Vivado block design of the GEN3 RF Evaluation for the ZCU216, the axi_gpio_spi_mux block is assigned a base address of 0x00_A020_5000. The gpiochip corresponding to this base address is gpiochip481 (see below).

xilinx-zcu216-20222:~$ cat /sys/class/gpio/gpiochip481/label
a0205000.gpio

For the ZCU216, both files should be corrected to XRFClk_Init(481); to enable proper control the SPI SDO Mux on the CLK104 to enable valid register reads of the PLLs on the CLK104.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect line 276 of rfsoc.c and line 142 of xrfclk_example_app.c, then compare their XRFClk_Init() GPIO values with the GEN3 RF Evaluation Vivado block design and the gpiochip label shown in the issue. Confirm the ZCU216 value is gpiochip481 and investigate whether the ZCU208 GPIO is also incorrect. Validate that RfclkReadReg commands return valid CLK104 PLL register values.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
embedded-iot, operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.