dts: bindings: dwc2: add extra hardware registers and devicetree entries#103015
dts: bindings: dwc2: add extra hardware registers and devicetree entries#103015josuah wants to merge 1 commit intozephyrproject-rtos:mainfrom
Conversation
|
Ping @roma-jam for review in case you was interested. |
| type: int | ||
| description: | | ||
| Value of the GSNPSID register, used to identify the version of the core | ||
| and avoid mismatch by checking the register at runtime. |
There was a problem hiding this comment.
I would remove the "and avoid mismatch by checking the register at runtime." as it implies how it is used.
In general, I am all in for having gsnpsid defined here, because there is benefit in knowing the core version at compile time when it comes to enabling workarounds (workaround code can be not compiled if core is not subject to the bug).
There was a problem hiding this comment.
You are right best describe the hardware only. I remember something involving testing gsnpsid in Linux for enabling/disabling workarounds.
I just pushed the change.
c73aadd to
077f1cb
Compare
|
Force-push:
|
|
|
Trying a 4.4 milestone in case this is trivial enough. Otherwise other PRs can just rebase on top of it. |
|
Now that Synaptics SR100 is merged, you can add to |
c028e4e to
b80daf6
Compare
Add 'gsnpsid' and 'ghwcfg3' to DWC2 USB peripheral in order to check that they are as expected at runtimne, which the host driver can use. Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
|
Force-push:
|
|
| gsnpsid = <0x5532430a>; | ||
| ghwcfg1 = <0x00000000>; | ||
| ghwcfg2 = <0x02882054>; // 8 endpoints, dynamic sizing | ||
| ghwcfg3 = <0x0c78c468>; |
There was a problem hiding this comment.
As for the other partial UHC DWC2 PRs, this change should be included in UHC DWC2 PR #102967. Also, there is no need to provide what is available at runtime through DT. ghwcfg1, ghwcfg2, and ghwcfg4 are workarounds for the peculiarities of nRF54 family.
There was a problem hiding this comment.
Ok, so removing ghwcfg3 and reading this information from hardware registers instead.
Should there still be gsnpsid?
If not, then it is possible to use gsnpsid != 0 to detect when the DWC2 core is not available (i.e. in ESP32-S3 before the PHY is powered on).



Very small PR to add extra hardware registers that can later be used inside drivers.
Given this has no dependency, I thought I might as well submit it directly on
mainso it's possible to use it from everywhere (device, host).The registers were obtained by logging their value out.