Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support devicetree #642

Merged
merged 54 commits into from May 14, 2024
Merged

Support devicetree #642

merged 54 commits into from May 14, 2024

Conversation

blmaier
Copy link
Contributor

@blmaier blmaier commented Feb 13, 2024

No description provided.

nickcoutsos and others added 19 commits August 31, 2023 12:50
Define 'name' field for /delete-node/ and /delete-property/
Support `#include` directives in nodes
Removed Node latest from the build matrix, since tree-sitter is failing
to build on it.

Split up the GitHub workflow into separate build and linting workflows.
Added Mac and Windows builds to the tests, and added eslint.
"dts" is a much more common abbreviation for devicetree than "dt"
The other tree-sitter grammars I used as reference use a different main
branch name than I do. Fixed the branch name.
With the GitHub actions extension installed, these files are identified
as github-actions-workflow instead of yml.
Reworked labels to be a field on the labeled node instead of a separate
node type.

Added support for labels on property names and /memreserve/.
@blmaier blmaier force-pushed the support-devicetree branch 2 times, most recently from 6783443 to 7162112 Compare February 14, 2024 20:10
The Devicetree Specification v0.4, section 2.2.1 "Node Names", says

> The unit-address component of the name is specific to the bus type on
> which the node sits. It consists of one or more ASCII characters from
> the set of characters in Table 2.1.

Table 2.1 allows for all a-z characters, ',', '.', '_', '+', and '-'.

In normal use the unit-address is just a hex number and the devicetree
spec technically requires this by saying

> The unit-address must match the first address specified in the reg
> property of the node.

However the devicetree compiler supports the full ASCII table, and there
are a significant number of devicetrees in the Linux kernel that use the
unit-address as a "name" field. For example see
https://elixir.bootlin.com/linux/v6.7.4/source/arch/arm/boot/dts/marvell/armada-xp-crs328-4c-20s-4s.dtsi#L91
…5db2a9efabab958a27fd8ddf43038a2'

git-subtree-dir: vendored_parsers/tree-sitter-devicetree
git-subtree-mainline: 1b2099d
git-subtree-split: 2087a5b
@Wilfred Wilfred merged commit d3e5aa5 into Wilfred:master May 14, 2024
13 checks passed
@Wilfred
Copy link
Owner

Wilfred commented May 14, 2024

Merged, thank you!

There seems to be a weak preference for 'device tree' over 'devicetree' in my googling, so I've used that term.

@Wilfred Wilfred mentioned this pull request May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants