Commit graph

75 commits

Author SHA1 Message Date
Josh Gao 88ac292f77 doc: s/devicetree/device tree/
Commit 27e5dd13 fixed a bunch of uses of "device tree" in the
documentation, but accidentally hit the part of the documentation
that stated that "devicetree" should be preferred over "device tree".

Signed-off-by: Josh Gao <josh@jmgao.dev>
2019-12-13 18:47:23 +01:00
Daniel Leung b7eb04b300 x86: consolidate x86_64 architecture, SoC and boards
There are two set of code supporting x86_64: x86_64 using x32 ABI,
and x86 long mode, and this consolidates both into one x86_64
architecture and SoC supporting truly 64-bit mode.

() Removes the x86_64:x32 architecture and SoC, and replaces
   them with the existing x86 long mode arch and SoC.
() Replace qemu_x86_64 with qemu_x86_long as qemu_x86_64.
() Updates samples and tests to remove reference to
   qemu_x86_long.
() Renames CONFIG_X86_LONGMODE to CONFIG_X86_64.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-10-25 17:57:55 -04:00
Peter Bigot 4d97252cdf doc: dts: describe nexus node magic required for shield gpio translation
Document why and how we use the devicetree nexus map properties to
preserve devicetree flag specifications.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-10-22 14:40:41 -05:00
Marti Bolivar 27e5dd131f doc: s/device tree/devicetree/
DTSpec writes this as a single word, presumably to make it easier to
grep for / more precise. Follow along in the rest of the docs now that
our main DT docs page agrees with this usage.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-10-08 11:53:40 +02:00
Marti Bolivar 9935fdd110 doc: dts: move example to the right place
The K6X example is part of the wrong subsection (devicetree vs
kconfig) currently. Move it up to the right place (the section which
was recently renamed to "input and output files")

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-10-08 11:53:40 +02:00
Marti Bolivar 85fa523cf0 doc: dts: add more explanations, with diagrams
Re-work the introductory sections of the devicetree documentation,
adding several figures and cross-references to other useful parts of
the documentation.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-10-08 11:53:40 +02:00
Ulf Magnusson a778868805 doc: dts: Include #cells in legacy syntax section
Give an example for an interrupt controller, where 'interrupt-cells'
should be used instead.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-03 05:57:26 -07:00
Ulf Magnusson 842e1d4dd1 doc: dts: Fix 'child-binding' typo in legacy syntax section
'child-node' should be 'child-binding'.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-02 18:26:23 -07:00
Ulf Magnusson 5bc06e8250 doc: release notes: Mention devicetree script changes for 2.0 and 2.1
Added in 2.0, along with some binding format simplifications in 2.1.

Bunch of other stuff that could be mentioned, but keep it relatively
short.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-19 20:48:23 -04:00
Ulf Magnusson a0fceff1a2 scripts: dts: Simplify and improve 'compatible' matching
Instead of

    properties:
        compatible:
            constraint: "foo"

, just have

    compatible: "foo"

at the top level of the binding.

For backwards compatibility, the old 'properties: compatible: ...' form
is still accepted for now, and is treated the same as a single-element
'compatible:'.

The old syntax was inspired by dt-schema (though it isn't
dt-schema-compatible), which is in turn a thin wrapper around
json-schema (the idea is to transform .dts files into YAML and then
verify them).

Maybe the idea was to gradually switch the syntax over to dt-schema and
then be able to use unmodified dt-schema bindings, but dt-schema is
really a different kind of tool (a completely standalone linter), and
works very differently from our stuff (see schemas/dt-core.yaml in the
dt-schema repo to get an idea of just how differently).

Better to keep it simple.

This commit also piggybacks some clarifications to the binding template
re. '#cells:'.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:25:02 -05:00
Kumar Gala c24a791d0c dts/bindings: move template out of YAML dir
As we parse for valid yamls, the template shouldn't get parsed

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-09-07 10:25:02 -05:00
Ulf Magnusson 4620bbf0c8 doc: dts: Add more information to .dtsi example
- Explain what it means to enable nodes (and for a node to be disabled)
   with some sample code from the .dts(i) files

 - Explain the '&foo { ... }' syntax

 - Linkify files with :zephyr_path:

 - Simplify and shorten wording a bit

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-30 13:44:51 -04:00
Ulf Magnusson 0294f826a6 dts: bindings: Rename binding template to binding-template.yaml
More guessable than device_node.yaml.template.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-30 11:01:51 -04:00
Ulf Magnusson 850e3626da dts: bindings: Add lots more documentation
Add some information that would've saved me a lot of time:

 - Give an overview of how device tree nodes and bindings fit together,
   with examples. Assume people might be coming at it without knowing
   anything about device tree.

 - Explain how 'inherits' works in more detail

 - Explain what 'parent/child: bus: ...' does more concretely, and what
   problem it solves

 - Add more examples to show what things look like in the .dts file

 - Clean up the language a bit and make things more consistent

Also fix some errors, like 'properties: compatible: ...' being wrong
(missing 'constraint:' and compatible strings in the wrong place).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-07-30 11:01:51 -04:00
Kumar Gala 284bc9d964 dts: Rename SW._GPIO_* -> DT_ALIAS_SW._GPIOS_*
We use the following commands to rename any
SW._GPIO_{CONTROLLER,PIN,FLAGS} to
DT_ALIAS_SW._GPIOS_{CONTROLLER,PIN,FLAGS}

git grep -l SW._GPIO_CONTROLLER | xargs sed -i 's/SW\(.\)_GPIO_CONTROLLER/DT_ALIAS_SW\1_GPIOS_CONTROLLER/g'
git grep -l SW._GPIO_PIN | xargs sed -i 's/SW\(.\)_GPIO_PIN/DT_ALIAS_SW\1_GPIOS_PIN/g'
git grep -l SW._GPIO_FLAGS | xargs sed -i 's/SW\(.\)_GPIO_FLAGS/DT_ALIAS_SW\1_GPIOS_FLAGS/g'

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-07-01 07:14:36 -05:00
Kumar Gala a614a026b7 dts: Rename DT_.*_GPIO_* to DT_.*_GPIOS_*
Convert DT_.*_GPIO_{CONTROLLER,PIN,FLAGS} ->
	DT_.*_GPIOS_{CONTROLLER,PIN,FLAGS)

Used the following commands to make these conversions:

git grep -l DT_.*_GPIO_CONTROLLER | xargs sed -i 's/DT_\(.*\)_GPIO_CONTROLLER/DT_\1_GPIOS_CONTROLLER/g'
git grep -l DT_.*_GPIO_PIN | xargs sed -i 's/DT_\(.*\)_GPIO_PIN/DT_\1_GPIOS_PIN/g'
git grep -l DT_.*_GPIO_FLAGS | xargs sed -i 's/DT_\(.*\)_GPIO_FLAGS/DT_\1_GPIOS_FLAGS/g'

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-27 13:02:34 -05:00
Kumar Gala 95f28eb764 scripts/dts: Remove DT_CHOSEN generation
We never used DT_CHOSEN so lets remove this and add it back if/when
there's an actual need for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-06-25 08:43:58 -05:00
Erwan Gouriou 45962cbe33 doc: dts: Remove orphan section
'orphan:' appears before Flash Partitions section on
https://docs.zephyrproject.org/latest/guides/dts/index.html page.
Fix this

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-03-29 04:56:21 -05:00
David B. Kinder 6000a6205a doc: prepare for improving doc API linking
Linking to API material requires knowing the pecularities of how
doxygen, sphinx, and breathe work. In an attempt to hide some of this
we're preparing the current docs to allow use of configuration defaults
that will let us more simply use a default role that will hunt for a
reference target in the various domains that are available by using a
default "role" of "all".  This will let us use the simple notation
`functionname` or `typename` without fully specifying the reference as
:c:func:`functionname`.

This patch cleans up exising docs that were (incorrectly) using single
backtics where double backtics should have been used, and also found
some typos (such as a space between the role name and the reference,
such as :file: `filename`, and a missing colon such as
c:func:`functionname`)

This is a start to address issue #14313

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-03-15 05:47:19 +01:00
Ulf Magnusson 4099b972e1 doc: dts: Clarify CONFIG_SRAM documentation
There is no symbol called CONFIG_SRAM. Mention CONFIG_SRAM_SIZE and
CONFIG_SRAM_BASE_ADDRESS instead, and also mention that the DT_* values
they're generated from.

This gets rid of a false-positive undefined Kconfig symbol reference
too.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-02 03:46:10 +01:00
Ulf Magnusson dd5ff3957c doc/guide/dts: Clean up DTS template
Add a missing semicolon after /dts-v1/, and a blank line between
/dts-v1/ and the root node.

Use 'code-block:: none' instead of 'code-block:: yaml' as well.
DTS is not YAML.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-02-26 17:27:51 -08:00
Erwan Gouriou 8223cfb18a doc/guide/dts: DTS documentation add-on
Update dts documentation.
Rework some parts to provide more clarity and elaborate
yaml bindings usage.

Fixes #10318

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-02-19 15:09:08 -05:00
Kumar Gala ff70b3444f dts: Convert CONFIG_ to DT_ symbols for chosen props
Replace generating CONFIG_ symbols with DT_ symbols for chosen
properties like 'zephyr,console' or 'zephyr,bt-mon-uart'.  We now use a
kconfigfunctions (dt_str_val) to extract the info from dts into Kconfig.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 11:41:26 -06:00
Kumar Gala bfaaa6bbe9 dts: Convert CONFIG_CCM to DT_CCM
Since we know do DTS before Kconfig we should try and remove dts from
creating Kconfig namespaced symbols and leave that to Kconfig.  So
rename CONFIG_CCM_<FOO> to DT_CCM_<FOO>.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 10:29:57 -06:00
Anas Nashif d6f72a67fc doc: introduce final structure
Move guides and APIs into separate directories and cleanup naming
introducing index files rather than named section files.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-05 07:04:40 -05:00