Comments (9)
Also, is device_type="cpu"
required, there are various .dts files in the linux kernel that don't seem to specify it?
from devicetree-specification.
Would be nice to get clarification on this part of the spec. too:
The device_type property was used in IEEE 1275 to describe the
device’s FCode programming model. Because DTSpec does not
have FCode, new use of the property is deprecated, and it should
be included only on cpu and memory nodes for compatibility with
IEEE 1275–derived devicetrees.
The way I'm reading it, device_type
is allowed on memory
and cpu
nodes as a concession to IEEE 1275-derived devicetrees, as it might be a pain to get rid of device_type
in e.g. Linux, but isn't required on those nodes.
Is that the way it was meant? The wording is a bit ambiguous at the moment.
This is from some arguments in https://github.com/zephyrproject-rtos/, which isn't Linux-based. I want to just have compatible = "foo"
on CPU and memory nodes, as device_type
doesn't add anything for us.
from devicetree-specification.
The specification was never updated from what ePAPR said to contain what Arm implemented for cpu nodes. This needs to be done.
The schema matches the common parts between Arm and Risc-V minimally. Probably some of the other FDT arches, but not PowerPC.
from devicetree-specification.
The specification was never updated from what ePAPR said to contain what Arm implemented for cpu nodes. This needs to be done.
The schema matches the common parts between Arm and Risc-V minimally. Probably some of the other FDT arches, but not PowerPC.
And to be pedantic, the schema says that device_type
, reg
and compatible
are required.
from devicetree-specification.
The specification was never updated from what ePAPR said to contain what Arm implemented for cpu nodes. This needs to be done.
The schema matches the common parts between Arm and Risc-V minimally. Probably some of the other FDT arches, but not PowerPC.And to be pedantic, the schema says that
device_type
,reg
andcompatible
are required.
You mean the Arm cpu schema (kernel:Documentation/devicetree/bindings/arm/cpus.yaml)?
That's correct. While we'd like to drop device_type, we can't. The kernel until recently still used device_type to find/iterate on cpu nodes. That changed recently to use /cpus and cpu node names instead (except for Power which uses the CPU model still for node names). We could also do the same for memory nodes, but haven't. So as long as there's a client program depending on device_type and until whatever backwards compatibility window expires (5 years, 10 years, never?), device_type will remain required. Though I guess that could be relaxed on new platforms.
from devicetree-specification.
You mean the Arm cpu schema (kernel:Documentation/devicetree/bindings/arm/cpus.yaml)?
That's correct. While we'd like to drop device_type, we can't. The kernel until recently still used device_type to find/iterate on cpu nodes. That changed recently to use /cpus and cpu node names instead (except for Power which uses the CPU model still for node names). We could also do the same for memory nodes, but haven't. So as long as there's a client program depending on device_type and until whatever backwards compatibility window expires (5 years, 10 years, never?), device_type will remain required. Though I guess that could be relaxed on new platforms.
Is this only for ARM, from a spec. standpoint?
I.e., does the spec. itself require that device_type
appears on all cpu
nodes, regardless of platform?
More pragmatically, I'd like to drop it in our case regardless, because we don't use/need it (compatible
is enough). Would help settle the spec. part at least though.
from devicetree-specification.
Is this only for ARM, from a spec. standpoint?
No. If anything the spec reflects PowerPC (and not necessarily IBM PowerPC). There was some work removing/moving PPC specific parts from ePAPR, but it's obviously not complete.
I.e., does the spec. itself require that
device_type
appears on allcpu
nodes, regardless of platform?
Probably the spec can be optional, but then it is up to the arch. Whether the arch is optional and it's up to individual platforms is the question.
More pragmatically, I'd like to drop it in our case regardless, because we don't use/need it (
compatible
is enough). Would help settle the spec. part at least though.
As long as we have something required by one client and optional on others, it pretty much has to be required. I'm hesitant to say making that per platform is okay.
from devicetree-specification.
Thanks for the clarifications!
I.e., does the spec. itself require that
device_type
appears on allcpu
nodes, regardless of platform?Probably the spec can be optional, but then it is up to the arch. Whether the arch is optional and it's up to individual platforms is the question.
More pragmatically, I'd like to drop it in our case regardless, because we don't use/need it (
compatible
is enough). Would help settle the spec. part at least though.As long as we have something required by one client and optional on others, it pretty much has to be required. I'm hesitant to say making that per platform is okay.
My fault. I meant "platform" in a broader sense, like completely different architectures. I agree that it'd be a mess if different .dts
files within the same arch could have different requirements for example.
Leaving it up to a per-arch decision makes sense to me.
from devicetree-specification.
Closing. Send spec changes if you want something changed.
from devicetree-specification.
Related Issues (20)
- Rewrite the specs in Kaitai Struct and generate the text docs from KS specs HOT 2
- Build latexpdf error HOT 1
- MIME type for DeviceTree dts files HOT 5
- Invalid MAC address in example HOT 1
- Memory terminology WIMG and VLE used w/o reference or definition HOT 3
- dma-ranges null and not present not well defined HOT 1
- This repo has both master and main branches HOT 3
- Interrupt tree example (current Fig 2.3) does not show in PDF HOT 8
- Generic node name for vibration motor / haptics HOT 1
- Provide more information about RAM from the bootloader HOT 6
- Enforce ARRAY_SIZE(property) == ARRAY_SIZE(property-names) HOT 2
- enhancement: addition of /delete-label/ HOT 3
- Codify array values syntax HOT 2
- Table 1: Revision History was not updated for Release v0.4 HOT 1
- WARNING: Invalid device tree, expect boot to fail | openbsd-current Firefly RK3399 ARM SoC HOT 3
- Architecture bindings? HOT 2
- Property inheritance HOT 6
- chapter2-devicetree-basics.rst refers to missing Appendix A HOT 1
- Usage of EfiReservedMemoryType
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from devicetree-specification.