You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "g2gps (via GitHub)" <gi...@apache.org> on 2024/03/18 23:14:48 UTC
[PR] arch/risc-v/litex: Allow FDT to be passed from previous boot change. [nuttx]
g2gps opened a new pull request, #11939:
URL: https://github.com/apache/nuttx/pull/11939
## Summary
Allows a flattened device tree to be passed from either openSBI or the LiteX bios. The FDT is registered can be used, if supported.
## Impact
The Litex framework has tooling to generate device trees for the chosen configuration. NuttX can use the compiled FDT to dynamically register hardware peripherals.
This begins to address issues mentioned here:
- https://github.com/apache/nuttx/issues/1020
And provide a better solution to the workarounds in:
- https://github.com/apache/nuttx/pull/8233
- https://github.com/apache/nuttx/pull/8225
As well as this being mentioned in:
- https://github.com/apache/nuttx/pull/2844
- https://github.com/apache/nuttx/pull/638
The long term-plan is to roll out the device tree integration used internally, to the LiteX drivers, where needed. This greatly improves the NuttX support for LiteX, which is essentially broken unless configured in exactly one way. See the limitation section on the LiteX CI repository https://github.com/enjoy-digital/litex_hw_ci/tree/main/nuttx
## Testing
Internal testing on our hardware.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arch/risc-v/litex: Allow FDT to be passed from previous boot change. [nuttx]
Posted by "AndrewD (via GitHub)" <gi...@apache.org>.
AndrewD commented on PR #11939:
URL: https://github.com/apache/nuttx/pull/11939#issuecomment-2007959015
@enjoy-digital this is the start of the litex device tree integration we discussed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arch/risc-v/litex: Allow FDT to be passed from previous boot change. [nuttx]
Posted by "g2gps (via GitHub)" <gi...@apache.org>.
g2gps commented on PR #11939:
URL: https://github.com/apache/nuttx/pull/11939#issuecomment-2008272779
I've added some brief documentation on how to build the FDT for NuttX as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arch/risc-v/litex: Allow FDT to be passed from previous boot change. [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #11939:
URL: https://github.com/apache/nuttx/pull/11939
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arch/risc-v/litex: Allow FDT to be passed from previous boot change. [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #11939:
URL: https://github.com/apache/nuttx/pull/11939#discussion_r1530224336
##########
arch/risc-v/src/litex/Make.defs:
##########
@@ -62,3 +62,8 @@ endif
ifeq ($(CONFIG_LITEX_PWM),y)
CHIP_CSRCS += litex_pwm.c
endif
+
+ifeq ($(CONFIG_LIBC_FDT),y)
+CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)libs$(DELIM)libc$(DELIM)fdt$(DELIM)dtc$(DELIM)libfdt
Review Comment:
don't need search libfdt
##########
arch/risc-v/src/litex/litex_start.c:
##########
@@ -104,6 +108,17 @@ void __litex_start(void)
*dest++ = *src++;
}
+ /* Assume the FDT address was passed in if not NULL */
+
+ if (fdt)
+ {
+ fdt_register((const char *)fdt);
Review Comment:
```suggestion
fdt_register(fdt);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arch/risc-v/litex: Allow FDT to be passed from previous boot change. [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #11939:
URL: https://github.com/apache/nuttx/pull/11939#issuecomment-2006660213
Nice, let's how to make the fdt usage inside litex/qemu general enough for other chip/board.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] arch/risc-v/litex: Allow FDT to be passed from previous boot change. [nuttx]
Posted by "g2gps (via GitHub)" <gi...@apache.org>.
g2gps commented on code in PR #11939:
URL: https://github.com/apache/nuttx/pull/11939#discussion_r1531202697
##########
arch/risc-v/src/litex/Make.defs:
##########
@@ -62,3 +62,8 @@ endif
ifeq ($(CONFIG_LITEX_PWM),y)
CHIP_CSRCS += litex_pwm.c
endif
+
+ifeq ($(CONFIG_LIBC_FDT),y)
+CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)libs$(DELIM)libc$(DELIM)fdt$(DELIM)dtc$(DELIM)libfdt
Review Comment:
You're right, this was a side-effect of our out-of-tree board configuration.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org