Add a new section in the API reference for the newly added
devicetree/pinctrl.h macros.
Amend macros.bnf in the guide to reflect the new generated macros for
getting at pinctrl information by name.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This contains accessor macros for getting phandles out of pinctrl
properties by name and index. As usual, the representation in C for a
phandle is a node identifier.
Add these new macros:
- DT_PINCTRL_BY_IDX(node_id, pc_idx, idx): phandle at index idx
in the pinctrl-<pc_idx> property
- DT_PINCTRL_0(node_id, idx): pinctrl-0 convenience for the same
- DT_PINCTRL_BY_NAME(node_id, name, idx): phandle at index idx
in the pinctrl property named 'name'
- DT_PINCTRL_NAME_TO_IDX(node_id, name): convert a pinctrl property
name to its index number
- DT_NUM_PINCTRLS_BY_IDX(node_id, pc_idx): number of phandles in
pinctrl-<pc_idx>
- DT_NUM_PINCTRLS_BY_NAME(node_id, name): number of phandles in a
named pinctrl property
- DT_NUM_PINCTRL_STATES(node_id): total number of pinctrl-<pc_idx>
properties
- DT_PINCTRL_HAS_IDX(node_id, pc_idx): does pinctrl-<pc_idx> exist?
- DT_PINCTRL_HAS_NAME(node_id, name): does a named pinctrl property
exist?
- DT_PINCTRL_IDX_TO_NAME_TOKEN(node_id, pc_idx): convert a pinctrl
index to its name as a token, similar to DT_STRING_TOKEN()
- DT_PINCTRL_IDX_TO_NAME_UPPER_TOKEN(node_id, pc_idx): like
DT_PINCTRL_IDX_TO_NAME_TOKEN, but with an uppercase result
As well as DT_DRV_INST equivalents, which take inst wherever node_id
appears above:
- DT_INST_PINCTRL_BY_IDX()
- DT_INST_PINCTRL_0()
- DT_INST_PINCTRL_BY_NAME()
- DT_INST_PINCTRL_NAME_TO_IDX()
- DT_INST_NUM_PINCTRLS_BY_IDX()
- DT_INST_NUM_PINCTRLS_BY_NAME()
- DT_INST_NUM_PINCTRL_STATES()
- DT_INST_PINCTRL_HAS_IDX()
- DT_INST_PINCTRL_HAS_NAME()
- DT_INST_PINCTRL_IDX_TO_NAME_TOKEN()
- DT_INST_PINCTRL_IDX_TO_NAME_UPPER_TOKEN()
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
We need to be able to access pinctrl-<index> property contents by
name, convert names to indexes, convert indexes to names, and perform
existence checks by name and by index.
This is currently not possible because we don't track these properties
the same way we do other named properties. That in turn is because
they are different then the usual named properties.
The usual case looks like this, picking DMAs just for the sake of
example:
dmas = <&dma0 ...>, <&dma1 ...>;
dma-names = "tx", "rx";
So "tx" is the name for the <&dma0 ...> element, and "rx" is the name
for the <&dma1 ...> element, all in a single "dmas" property.
By contrast, pinctrl properties look like this:
pinctrl-0 = <&foo &bar ...>;
pinctrl-1 = <&baz &blub ...>;
pinctrl-names = "default", "sleep";
Here, "default" is the name for the entire pinctrl-0 property.
Similarly, "sleep" is the name of the pinctrl-1 property. It's a
strange situation where the node itself is kind of a container for an
array of pin control properties, which Zephyr's bindings language
can't really capture and has some special case handling in edtlib.
This is easiest to handle with ad-hoc code. Add special case macros
for pinctrls.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Move the partition handling code into its own function and rework the
comment. This is prep work for adding additional generated macros to
this function.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Move the IDT_LIST memory region to the location recommended by
`intlist.ld`. The documentation specifies that this region should not
overlap other regions, and there is no guarantee that the area after the
`SRAM` region is not used. The end of the address space is much less
likely to be a valid RAM address.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Move the IDT_LIST memory region to the location recommended by
`intlist.ld`. The documentation specifies that this region should not
overlap other regions, and there is no guarantee that the area after the
`SRAM` region is not used. The end of the address space is much less
likely to be a valid RAM address.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Removed implementation that used memcpy of received PDUs and
instead using the free Rx buffers; use the scratch PDU for
transmitting scan requests and connection requests.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add the lll_prof_reserve and lll_prof_reserve_send profiling
functions to use when profiling active scanning and
initiator.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
llcp.conn_param.ack was reset on tx of conn param rsp, however this
should only be done once the expected conn update ind is received
and sets the cu.ack flag to indicate cu procedure 'takes over'.
Signed-off-by: Erik Brockhoff <erbr@oticon.com>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The newly added CMake installation instruction incorrectly specified
*double* colon (literal block) instead of *single* colon after its list
item.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
These constants are based on (i.e. exactly as) the
recommended values for regular (i.e. non-periodic)
advertising.
The GAP spec does not actually specifiy these numbers (or any
numbers for periodic advertising), but they are sane
numbers to use for periodic advertisement.
The issue with using the non-periodic advertising
whereas the peridic advertising unit is 1.25ms.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Fix missing implementation to release Auxiliary PDU chains
and then resume back to scanning on primary channel.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add PDU time calculation macro for S2 and S8 Coded PHY.
Rename PKT_AC_US to PDU_AC_MAX_US.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add missing range delay value when calculating the header
complete timeout value for the reception of extended scan
response PDU.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Use the received coding scheme when scanning for correctly
calculating the receive chain delay and on-air PDU time.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The RISC-V Platform-Level Interrupt Controller (PLIC) was moved from the
RISC-V Privileged Specification v1.11 to a separate specification
(see https://github.com/riscv/riscv-plic-spec).
Reflect this by not automatically enabling the PLIC interrupt controller
driver for all RISC-V privileged SoCs, but only for SoCs with the
CONFIG_RISCV_HAS_PLIC Kconfig option enabled.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
After 31045c7 was merged, it was possible to use broadcast
iso without CONFIG_BT_CONN, but it did not properly handle
TX as there were missing support to read the buffer
size from the controller, as well as missing support
for handling the number of completed packets event.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Change so that num_completed_packets event handling is also
enabled for broadcast ISO only builds. This is because sending
data on a broadcast ISO still generates this event.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Move the function out of the ACL group as it may be used
for broadcast ISO only builds.
er 31045c7 was merged, it was possible to use broadcast
iso without CONFIG_BT_CONN, but it did not properly handle
TX and RX as there were missing support to read the buffer
size from the controller, as well as missing support
for handling the number of completed packets event.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Define soc_interrupt_init as a weak symbol in the common RISC-V
privileged instruction set SoC support.
This allows overriding soc_interrupt_init for SoCs which are not fully
compliant with the RISC-V privileged specification.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Define __soc_handle_irq as a weak symbol in the common RISC-V privileged
instruction set SoC support.
This allows overriding __soc_handle_irq for SoCs which are not fully
compliant with the RISC-V privileged specification.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Follow up on commit bfd45e5b8c
("drivers: remove Kconfig option CONFIG_UART_CONSOLE_ON_DEV_NAME")
Remove Kconfig options
CONFIG_BT_UART_ON_DEV_NAME and CONFIG_BT_MONITOR_ON_DEV_NAME
since all UART drivers are converted to devicetree and we can just use
DEVICE_DT_GET(DT_CHOSEN(zephyr_bt_uart)) and
DEVICE_DT_GET(DT_CHOSEN(zephyr_bt_mon_uart)).
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit updates the `arm_no_multithreading` test to run on the
recently added `mps3_an547` board.
The `mps3_an547` SoC includes the Cortex-M55 processor which implements
the ARMv8.1-M architecture that is not covered by any of the boards in
the current "allowed platforms" list for this test.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit fixes the FPSCR register initialisation validation test
for the ARMv8.1-M architecture.
For ARMv8.1-M, the newly added LTPSIZE field in the FPSCR may always
read the value of 4 when the M-Profile Vector Extension (MVE) is not
implemented or FP context is not active, so we must ignore its value
when validating the FPSCR register initialisation.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit fixes the FPSCR register initialisation validation test
for the ARMv8.1-M architecture.
For ARMv8.1-M, the newly added LTPSIZE field in the FPSCR may always
read the value of 4 when the M-Profile Vector Extension (MVE) is not
implemented or FP context is not active, so we must ignore its value
when validating the FPSCR register initialisation.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The IPC drivers rpmsg_service and rpmsg_multi_instance are not
explicitly enabling the RX IPM channel when two different devices are
used for TX and RX. While this could be redundant for some IPM drivers,
in some cases the hardware needs to be enabled before using it.
Add the missing calls to ipm_set_enabled() for both the devices.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
This became useless when _init_tokens() was refactored not to use
global variables (in "dtlib: use IntEnum for token IDs"), and the
linter is complaining about it now.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Similarly to what was done for dtlib, use f-strings in places where it
improves readability. Some places, e.g. __repr__ methods that
construct a string using something like
"<SomeType, {}>".format(", ".join(...))
are better left off as-is.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
The library was originally developed before Python 3.6 was the minimum
supported version. Use f-strings now that we can do that, as they tend
to be easier to read.
There are a few places where str.format() makes sense to preserve,
specifically where the same argument is used multiple times; leave
those alone.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
There were missing commands in local supported commands list that
are related with connectionless direction finding.
The commands are implemented but they haven't been added
to HCI_Read_Local_Supported_Commands list.
The commit fixes that.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>