Giter Site home page Giter Site logo

Comments (9)

galak avatar galak commented on August 16, 2024

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.

ulfalizer avatar ulfalizer commented on August 16, 2024

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.

robherring avatar robherring commented on August 16, 2024

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.

galak avatar galak commented on August 16, 2024

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.

robherring avatar robherring commented on August 16, 2024

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.

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.

ulfalizer avatar ulfalizer commented on August 16, 2024

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.

robherring avatar robherring commented on August 16, 2024

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 all cpu 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.

ulfalizer avatar ulfalizer commented on August 16, 2024

Thanks for the clarifications!

I.e., does the spec. itself require that device_type appears on all cpu 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.

robherring avatar robherring commented on August 16, 2024

Closing. Send spec changes if you want something changed.

from devicetree-specification.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.