Jump to content
  • 0

VADJA_PWR_EN in eclypse


Kishore Kumar1

Question

Hi,

  we are using eclypse z7 board and using zmod for normal connection and now following the syzyzy standard. we want to enable  VADJA_PWR_EN by using I2C command, we tries all options from given register spec but we cannot enable it.  Assuming we dont have any POD connected on zmod connection could you explain I2C commands to enable Vadja bank power ?  we need this urgently

 

Thanks

Kishore

Link to comment
Share on other sites

17 answers to this question

Recommended Posts

  • 0

To the best of my recollection you need to write the VADJ_n_OVERRIDE register and set the fOverride bit to 1, set fEnable to 1, and set vltgSet10mV field to the voltage you want (in 10mV increments). This is described in section 6 of the Platform MCU Specification and the source code for the decutil application appears to write this register to enable the supply and set the voltage. Please note that you won't be able to set a voltage that would conflict with the requirements specified in the DNA of any module plugged into the port, or the requirements of the adjacent port if it's a double wide module. If the SYZYGY DNA of the module is blank they you should able to set any voltage that you want that meets the specifications for the supply.

I've attached a snippet from the decutil source code that shows the sequence of operations it takes to override the voltage. Hopefully this helps you get it working.

Thanks,
Michael

main.c PlatformMCU.h

Link to comment
Share on other sites

  • 0

Hi,

 we tried above   VADJ_n_OVERRIDE and  fOverride but still not working. we see SYZYZY_A_DET signal is not high ? Any requirements on this signal between FPGA and PMCU ? we see ENVADJA signal is always stuck to low in board. please suggest how we can override this from PMCU.

 

Thanks

Kishore

Link to comment
Share on other sites

  • 0

Are you using Linux or Baremetal?

I looked through the firmware and it appears that the SYZYGY_A_DET and SYZYGY_B_DET nets will only be driven to logic '1' if a pod is detected in the associated port and associated power good signal (PGVADJA, PGVADJB, PGVADJC) coming from IC25 or IC27 is logic '1'.

It appears that when the platform MCU firmware starts up it detects the presence of a pod by placing a start condition followed by SLA+W on the I2C bus at the address for each pod. If it receives an ACK then the pod is marked as present for that port and the minimum and maximum allowed voltages for the port are defaulted to 0. It then attempts to read the SYZYGY DNA and if present it will update the variables that are storing the min and maximum voltage allowed for the associated port.

When the override command is received the firmware forces the specified voltage to be within the range previous determined for the min and max voltage. What this means is that if you have a pod with an MCU that responds to SLA+W but does not return a valid SYZYGY DNA, then you won't be able to override the voltage on that port. This is a safety check to prevent users from accidentally damaging their pods.

I believe you should be able to force start the VIO supply at any voltage you want if no pod is present.

Do you have a pod plugged into the port whose VIO supply you are trying to enable? If so, does it have an MCU connected to the I2C bus, and if so, will it respond to SLA+W? If yes, is their a valid DNA that can be read back over I2C?

Thanks,
Michael

Link to comment
Share on other sites

  • 0

Hi,

  we dont have any pd connected on board, we are using zmod connector for normal GPIO signals to be driven to other board. your statements are contradicting as you "What this means is that if you have a pod with an MCU that responds to SLA+W but does not return a valid SYZYGY DNA, then you won't be able to override the voltage on that port."  and " I believe you should be able to force start the VIO supply at any voltage you want if no pod is present " .

as we dont have pod connected then we  tried this also ADJ_n_OVERRIDE register and set the fOverride bit to 1, set fEnable to 1, and set vltgSet10mV field to but we still see voltage on Vadja is always zero. 

could you please suggest how to override in this case? we need 1.8 on Vadja to FPGA. It looks to PMCU not getting ack then it is not allowing us to drive the override option ? In this we need some way to drive the bank voltage to FPGA. 

Please suggest 

Link to comment
Share on other sites

  • 0

Hi Kishore,

I don't see anything contradiction in my statement. If your "other board" has an MCU that has its I2C lines connected to the SYZYGY I2C lines and the MCU on your "other board" responds to SLA+W from the Eclypse platform MCU then the firmware will consider a pod present. In such case it will attempt to read the DNA and compute the CRC. If the DNA is valid then it will take the min and max voltage from the DNA. If no DNA is present, or it is corrupt, then the min and max voltage are set to 0V and you won't be able to use the override register to enable the supply. If the Eclypse platform MCU does not detect anything on the I2C lines then it will not consider a module present, and I believe it will then let you override the voltage settings and enable the supply. You should also be able to override the voltage when a valid DNA Is present, but the min and max voltage that you can specify is limited to voltage ranges specified in the DNA.

One thing I suggest trying is downloading our base Linux image and using the decutil / dpmutil (I think it was renamed to dpmutil for the final image but it was originally called decutil) to enable and override the voltage setting. Please do this without anything plugged into the ZMOD A or B ports. If this works then you will see LD3 and/or LD2 illuminate, depending on which supply you enable. I would try this myself but I'm unable to locate my SD card reader/write and cannot load the base image onto an SD card. As a result, I asked a colleague to try this and he has agreed to do so, but said he may not get to it today.

There are a couple of different ways to overwrite the MCU firmware.
1. Use an MPLAB SNAP Debugger to program firmware directly via header J9 (see attached image for location and signal names). Please note that J9 is accessible from the bottom of the board underneath PMOD A. The pin spacing is 0.1".
2. Write a Linux application that programs the MCU using SPI via the MCU_MISO, MCU_SCK, MCU_NRESET, and MCU_MOSI nets that are connected to bank 35 of the PL. I believe this is how the manufacturing test writes the MCU, using a custom application that's not included in the Eclypse Z7 base Linux image. We may be able to provide you with the source code for this application (Possibly requiring NDA), but I can't promise that it will work in newer versions of Petalinux, as it was written by a former employee and was last updated in August of 2019.

Thanks,
Michael

eclypse_z7_j9_location..jpg

Link to comment
Share on other sites

  • 0

Hi Kishore,

My colleague @artvvb loaded image 0.3 onto an SD card, booted the Eclypse Z7 without anything plugged into Zmod A or B, and confirmed that he was able to set the voltage to 1.8V and then 3.3V using the decutil setviocfg command. He measured voltages of 1.821V and 3.327V. Please download the v0.3 image here and then follow Step 2 of the "Setting up the Linux Projects" section described here to get our petalinux image up and running. Once you've booted please execute "sudo decutil setviocfg -chanid a -override y -enable y -voltage 1800" to set enable VADJA and set the voltage to 1.8V. If you want to do the same for VAJDB then you can execute "sudo decutil setviocfg -chanid b -override y -enable y -voltage 1800".

Please let me know if this works, and again, make sure you have no boards or cables connected to ZMOD A or ZMOD B.

Thanks,
Michael

Link to comment
Share on other sites

  • 0

Thanks, we will try 0.3 image in our board and get back to you. 

I) We are facing some issue with dpmutil integration with petalinux 2023.1 version. Because of that we are using I2C commands for read and write. 

Mentioning the steps we followed: 

Read 0x804C (VADJ_A_VOLTAGE). It is  0x0708 (Interpreted as 1800 in decimal).                                                    Command:  i2ctransfer -f -y 0 r2@0x60 0x80 0x4C r2  

image.png.90bb4b6d43cc24d68af6495d6712c7d8.png

Read 0x804E register is always 0x00 and LED3 is always OFF. 

  Command : i2ctransfer -f -y 0 r2@0x60 0x80 0x4E r2 

image.png.9a945e11a45fefe653b5138d38967b9a.png

So tried to override VADJ_A (0X804E) also using I2C commands VADJ_A and But results is 0x0000 only VADJ_STATUS(0X8088) also 0x0000 .  

 Command: i2ctransfer -f -y 0 w2@0x60 0x80 0x4E w2 0xC0 0xB4 

image.thumb.png.9b2e1f7c7d5d6d4c9433c58852a486e1.png

We have one doubt here. Since "vltgSet10mV" is only 10 bit as per below image what value need to keep for 1.8V (x0B4)?  

image.png.786a1a57bd5b63298e840ac595876c61.png

Any other changes need to do in Platform configuration or reset register ? 

II)Also, Is it possible to get complete firmware on PMCU. If yes please provide the process need to follow. We have Eclypse Z7 board purchased by customer already

 

image.png

Link to comment
Share on other sites

  • 0

Hi Kishore,

I) Register 0x804C is read only and should only contain the target voltage so if it's non-zero then that suggests that the value came from reading the SYZYGY DNA (if it exists) or from writing to the override register.

The value (0xC0B4) you specify for register 0x804E seems correct to me for overriding and enabling VADJA at 1.8V. I'm not sure why you read it back as 0 but one possibility is that there's a timing issue. I'm not familiar with the i2ctransfer application. One thing you might try is writing a custom application. I've attached the source code for the functions that are used by decutil to read and write the Platform MCU registers. Please note that there does appear to be a delay between reads.

It would be really helpful to know if decutil from our linux image works with our Linux image running when nothing is plugged in. That might tell us if this is a software or a hardware problem. If decutil is able to override and turn on the supplies then we know this is a software issue.

2^10 is 1024 so the maximum override voltage could be 10.23V. A value of 0xB4 corresponds to 180 and since it's in 10mV increments that gives you 1.8V so I don't see an issue there.

No changes are required to the platform configuration or reset registers.

II) What do you mean by "get complete firmware on PMCU"?

III) Yes, there is a difference between no DNA being present and nothing being connected to the ZMOD. Consider the following scenarios:

1. There is no board plugged into the ZMOD A port. This means that there isn't an MCU to ACK SLA+W from the PMCU so the PMCU will not think a module is present. In such case, you can use VADJ_n_OVERRIDE to set the voltage to anything within the valid range (I think its 1.2V to 3.6V on this board).

2. There is a board plugged into the ZMOD A port. The following scenarios are possible:

a. There is no MCU on the board and no other device on the board to respond to SLA+W. Therefore the PMCU thinks that no module is present and will allow override.

b. There is an MCU on the board but it doesn't respond to SLA+W. This is the same as scenario 2a and override will be allowed.

c. There is an MCU on the board and it responds to SLA+W but the DNA is empty or invalid due to CRC mismatch. The PMCU will think there is a module present and consider it unsafe to allow the VADJ supply to turn on because it can't determine if the requested voltage will damage the hardware. This is a safety mechanism and override will not be allowed. We did not build in any mechanism for disabling this safety feature. If you want to get around it while doing hardware development you could consider cutting the I2C traces on your board until you are ready to include proper DNA and then reconnect them.

d. There is an MCU on the board and it responds to SLA+W and the DNA is valid. Override will be allowed but the voltage will be limited to the range(s) specified in the DNA. In such case make sure your DNA contains one or more range with the voltage that you want to set or just set it to 1800mV min and max and the supply will just turn on automatically at 1.8V as desired (SmartVIO).

Please try decutil with our Linux image and no boards plugged in to help us determine if this is a hardware or software issue.

Thanks,
Michael

 

PlatformMCU.c

Link to comment
Share on other sites

  • 0

Hi,

 Thanks for details.

I) We are trying with Example image which you shared(Since our board is remotely connected facing some delay there).

II) Complete Firmware means, Codes shared here are main.c, PlatformMCU.h, PlatformMCU.c. In that not able to see how

 1. SYZYGY_A_det is controlled

 2. Fan control

3. Temp Control etc. if we tries to modify firmware only For SYZYGY det and program on Atmega, other function should not affect. Is it possible share all that ?

Please correct me if I am wrong.

 

Also we are not able to integrate decutil app in our Linux build may be  this is old version. we are using 2023.1 vivado. It will be great if you could share the latest decutil code .

 

Thanks for your constant replies which is helping us in our board bring as this is blocker for SW team developement 

Link to comment
Share on other sites

  • 0

Hi,

we checked your image with decutil and no boards plugged in and we see we could drive ZDMOD LED and voltage seems fine and below is screen shot. 

does this means it is SW issue on our board ? As is replied previously "Also we are not able to integrate decutil app in our Linux build may be this is old version. we are using 2023.1 vivado. It will be great if you could share the latest decutil code  " This will help us building our linux image.

Also in your shared boot image, could you share Vivado project also to know any specific changes we need to make in FPGA build ? 

Basically we see our main issue is we need to integrate decutil app and normal I2C commands wont work due to SW limitation ?

 

image.png.5ff39c9ccc913bf919578f43a241a998.png

Link to comment
Share on other sites

  • 0

Hi Kishore,

I'm sorry but the PMCU firmware on the Eclypse Z7 is Digilent IP that I'm unable to share.

One of our former employees took my decutil code and added a hardware abstraction layer to allow most of the code to function in both baremetal and Linux. It was then renamed to dpmutil and published on our github and you can find the code here. Can you try cloning that repository and building the application in whichever version of Petalinux you are using and see if it works? If it builds and runs but has an error finding or opening the I2C device then you might try one of the following:

1. Run it with sudo or switch to root with su and then run it.

2. Look at function I2CHALOpenI2cController in I2CHAL.c. It searches sysfs for an I2C device with name "pmcu-i2c" and if it finds one then it will open that device. Otherwise, it will attempt to open "/dev/i2c-0". It's possible that something changed with the sysfs directory struct since decutil was published and that might cause the I2C device not to be found. You can change variables szI2cDeviceName and szI2cDeviceNameDefault which are defined at lines 38 and 39 of I2CHAL or modify I2CHALOpenI2cController to skip the search entirely and just open the device using the path defined by szI2cDeviceNameDefault and then recompile the application.

As far as I can remember we didn't do anything special in the device tree, other than associate "pmcu-i2c" with I2C0 of the Zynq PS.

To answer your question, yes I'm convinced that this is some sort of software issue and integrating dpmutil (previously decutil) will allow you to communicate with the platform MCU from Linux to turn on the power supplies. That being said, none of this should even be necessary, as the SYZYGY specification expects anything you plug into a SYZYGY port to contain an MCU with the DNA for the module and contain the voltage ranges the module supports. If you program a valid DNA into the module then the power will turn on automatically and you shouldn't need to interact with the platform MCU at all.

Thanks,
Michael

Link to comment
Share on other sites

  • 0

Hi,

  our team is facing integrating the dpmutil. do you have any suggestion for below ?

There are several commands to create app and integrate it in the petalinux. We tried with the simple one which is

 1. "petalinux-create -t apps -n myapp --enable" .-- this way we are getting lots of error related to not indentifying the header files.

2."petalinux-create -t apps --template install --name dpmutil --enable" – In this case we are not facing any error but we are not sure the code is running correctly.

There are other commands also, I attached those in the screenshot. Can you please verify which is the correct command to use in this scenario?


image.png.00143043879e870ab851d3537d862e5a.png

Link to comment
Share on other sites

  • 0

Hi Kishore,

This is outside my field of expertise, as I wrote decutil and gave the source code to a colleague back in 2019 to integrate into our Petalinux image. I sent an email to someone who has more expertise in this and asked him to help answer your questions. It's already after-hours where he is located so it may be a day or two before he responds.

Thanks,
Michael

Link to comment
Share on other sites

  • 0

We are able to proceed with some changes in dpmutil integration our petalinux 2023.1 image and get Voltage at ZMOD A. Took Calibration reader as an example from github. Made similar changes. Now VADJA is hardcoded with 1.8V. As of now we are proceeding with this. Please try from your side on latest petalinux version if possible. Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...