Adds dts bindings for the fxos8700 interrupt pins to all boards that
have this sensor. The frdm_k64f and hexiwear_k64 connect both sensor
interrupt pins to the mcu, but the frdm_kw41z connects only one.
The fxos8700 driver is currently only aware of one sensor interrupt pin,
therefore the routing of INT1 or INT2 to the driver is handled in each
board's dts.fixup.
The fxos8700 sample application has been broken since the refactoring of
the mcux gpio driver to dts in commit
4e8f29f319. The sample is now fixed.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Add a set of Kconfig symbols that allow us to set that the GPIO
driver/SoC support DTS (HAS_DTS_GPIO) and that drivers that need/use
GPIO support DTS as well (HAS_DTS_GPIO_DEVICE).
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
There are certain use cases where the application needs to be able to
explicitly set a specific identity address. This was previously
possible using the bt_storage API, however now that it's gone another
solution is needed.
This patch adds a ne bt_set_id_addr() API which the application can
use to set a specific identity address before calling bt_enable().
Fixes#7434
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add cs, irq and reset gpios description in spbtle controller
node and use generated defines instead of Kconfig symbols.
Define a bt alias to allow generation of defines with friendly
names.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
In order to generate GPIO definition for control pin of BlueNRG module
define reset-gpio and irq-gpio in st,spbtle-rf yaml binding.
Add HAS_DTS_SPI_PINS kconfig symbol to control use of the '#define'
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Now that we can generate gpio info from dts lets add optional support
fot the cs-gpios property in the bus controller node. This matches the
binding spec from Linux on how cs-gpios are handled.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
With recent dts script change we dropped _0 from define names if there
is only a single one. So for the MPU we need to use
CONFIG_SRAM_BASE_ADDRESS instead of CONFIG_SRAM_BASE_ADDRESS_0.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
When we included SoC specific Kconfig files we do something like:
gsource "arch/arm/soc/arm/*/Kconfig.soc"
However, we should do that inside an if block for that SoC family so as
to limit SoC family specific options to only being visible when that SoC
family is selected. So we simply move the gsource and related items
inside the if SOC_FAMILY_<SOC> block.
Fixes: #7452
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
In order to disable the execution of code from the RAM region
we need to declare it in arm_mpu_regions.c file.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
In dts.fixup files for used for NXP SoCs, IP clock name was
bound to SIM clock label. This is correct but would require
manual change if IP clock controller was changed in device tree.
Use reference to IP generated define "_CLOCK_CONTROLLER" to get
this value.
Besides, having all IP related values starting with the same prefix
will be easier for possible macro preprocessing (if required one day).
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
'cell_string' yaml attribute has been introduced in order to
help enforcement of specific string during defines generation.
This adds complexity in understanding script behavior as a black
box and create additional dependency which is not strictly required.
For node specific generation functions (pinctrl and interrupts),
this could be replaced directly by an hardcoded version
(as everyone used the same 'cell_string' anyway).
For extract_cells functions, string could be replaced by extracted
property name. As a consequence, we're now able to generate defines
for properties refering to these controllers via phandle.
For instance, in following node
spbtle-rf@0 {
compatible = "st,spbtle-rf";
reg = <0>;
reset-gpios = <&gpioa 8 0>;
};
We'll be able to generate:
#define ST_STM32_SPI_...LE_RF_0_RESET_GPIOS_CONTROLLER "GPIOA"
#define ST_STM32_SPI_...PBTLE_RF_0_RESET_GPIOS_FLAGS_0 0
#define ST_STM32_SPI_..._SPBTLE_RF_0_RESET_GPIOS_PIN_0 8
Only impact for this whole change is for NXP clocks which were the
only ones using 'cell_string' attribute with a value different than
the default one.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
extract_controller only handle the first phandle in a cell property.
However we could easily have something like this where the phandles
vary:
gpios = <&gpiod 13 GPIO_INT_ACTIVE_LOW
&gpioc 14 GPIO_INT_ACTIVE_LOW>;
So we need to walk the property list for each phandle and produce a
define associated with it.
Also, if alias to the node is defined, indexed alias define
is generated for every indexed controller define:
#define GPIO_LEDS_0_GPIO_CONTROLLER_0 "GPIOA"
#define GPIO_LEDS_0_GPIO_CONTROLLER_1 "GPIOB"
#define LED1_GPIO_CONTROLLER_0 GPIO_LEDS_0_GPIO_CONTROLLER_0
#define LED1_GPIO_CONTROLLER_1 GPIO_LEDS_0_GPIO_CONTROLLER_1
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
If we had something like:
gpios = <&gpiod 13 GPIO_INT_ACTIVE_LOW
&gpiod 14 GPIO_INT_ACTIVE_LOW>;
The script blows up in extract_cells. While extract_cells attempted to
handle more than a single item in such a list, it didn't manipulate the
prop list for the recursive calls properly.
Since we pop off items from the prop list as we use them we can easily
pass the prop list to the rescurive call to fix things.
Besides, if alias is defined for the node, indexed aliases defines are
generated:
#define GPIO_LEDS_0_GPIO_FLAGS_0 4
#define GPIO_LEDS_0_GPIO_FLAGS_1 0
#define GPIO_LEDS_0_GPIO_PIN_0 5
#define GPIO_LEDS_0_GPIO_PIN_1 6
#define LED1_GPIO_FLAGS_0 GPIO_LEDS_0_GPIO_FLAGS_0
#define LED1_GPIO_FLAGS_1 GPIO_LEDS_0_GPIO_FLAGS_1
#define LED1_GPIO_PIN_0 GPIO_LEDS_0_GPIO_PIN_0
#define LED1_GPIO_PIN_1 GPIO_LEDS_0_GPIO_PIN_1
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Indexed defines were systematically generated even when there
was only one element to generate.
So we ended up generated a lot of _0 defines.
Then we needed to generate aliases to these _0 indexed defines,
in order to get useful defines.
For instance:
#define GPIO_LEDS_0_GPIO_FLAGS_0 4
#define GPIO_LEDS_0_GPIO_PIN_0 5
#define GPIO_LEDS_0_GPIO_FLAGS GPIO_LEDS_0_GPIO_FLAGS_0
#define GPIO_LEDS_0_GPIO_PIN GPIO_LEDS_0_GPIO_PIN_0
This commit allows to generate _0 indexed define only if a
property has more than one elements to define.
Aliases generation to _0 indexed defines are also removed.
Note: IRQ are left untouched since this is frequent to handle
multiple IRQs in a driver
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Some functions were using y_key and y_val as argument. This was not
quite easy to read. Rename argument into more informative versions.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Add usb disconnect pin support.
Some boards use a GPIO pin to controll a transistor,
which drives the pull-up resistor on USB DP pin.
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
Add few tests to check access permissions of memory partitions
of a memory domain, validate memory domain destroy.
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
The mailing list hosting software change introduced some changes to
where mailing lists are hosted. Update the docs to point at the
specific sublists rather than the top-level site. (See issue #7437).
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
This commit implements consistency checks for the core registers
in ARMv6-M, ARMv7-M, and ARMv8-M architectures, ensuring that
the user cannot accidentally select registers that are not
implemented by the selected Cortex-M processor.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
The commit improves the help text of the ARMV7_M_ARMV8_M_MAINLINE
K-config option.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Newlib uses any RAM between _end and the bounds of physical
RAM for the _sbrk() heap. Set up a user-writable region
so that this works properly on x86.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The hts221 requires 2.2 ms at boot time to download
the flash content into the volatile mem and the
calibration values cannot be read before that.
This issue is causing following crash:
***** USAGE FAULT *****
Executing thread ID (thread): 0x20000234
Faulting instruction address: 0x80037de
Division by zero
Fatal fault in essential thread! Spinning...
Signed-off-by: Armando Visconti <armando.visconti@st.com>
With the introduction of --list-tests to sanitycheck, a few rules have
been added to how to declare test suites.
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
The disco_l475_iot1 board uses the vl53l0x sensor in XSHUT pin
master control configuration mode. So, it has to explicitly
enable it now.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
The XSHUT pin, used to shutdown the device when it is not
in current use, is optional and some boards (like ArgonKey)
leave it tied to vdd. So, the driver must provide a way to
make this part configurable.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
NET_APP settings was missing the device name and enabling the net shell
is nice to verify runtime configuration as well.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit adds a Context Synchronization Point immediately
after the reset handler switches to use the Process Stack
Pointer, during initialization.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
The current doxygen configuration settings create 4096 folders to hold
the generated HTML output (with names such as d3/ddb/). This makes it
difficult to know what an URL would be for a particular module's
(defgroup's) documentation. By not creating these subdirectories,
module documentation file names become quite predictable:
group__<group name>.html
(e.g., group__sensor__interface.html) allowing us to create
links from the Sphinx-generated documentation into the doxygen-generated
HTML content (this part is under investigation).
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Most calls to ztest_assert() contain a message with no trailing
newline. So when it fails, we get (eg:):
starting test - test_multilib
Assertion failed at multilib.c:19: test_multilib: (c not equal to 323)
smoke-test failed: wrong multilib selectedFAIL - test_multilib.
when we'd like to get:
smoke-test failed: wrong multilib selected
FAIL - test_multilib.
among other things, because it is easier to parse for correctness.
So this patch adds a trailing newline to the message instead of going
around trying to police every call site to do it.
print[kf]() is used vs k_str_out() as we need something that is
available also for unit tests. As this is not in any hot path,
performance wise is not such a big deal.
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
This commit adds the following changes from upstream:
- ed38e895ace ("Increase indent for implicit submenus to 4")
Suggested by Carles Cufí. Makes it easier to see the menu structure
at a glance.
- 1d252b30c77 ("menuconfig: Convert the C locale to a UTF-8 locale for
LC_CTYPE")
Makes Unicode input work on many systems with bad defaults.
Also fixes some interface ugliness, like down arrows turning into
upside-down T's.
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Instead of manually iterating all app keys and net keys, use the
bt_mesh_subnet_del() helper on all subnets. This will also clear any
app keys, and ensures that persistent storage is cleared as well.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Both the local sequence number as well as the Replay Protection List
(RPL) are states that may potentially change very often. In order not
to wear out the flash with these updates it makes sense to try to
avoid too frequent writes.
For the local sequence number a simple solution is not to write the
number on every increment. This patch introduces a new Kconfig option
to define after how many increments the sequence number gets written.
When the stack gets initialized it automatically adds the configured
number to the last stored one, thereby guaranteeing that the node
starts off with a number that's larger than the last used one.
The RPL is more problematic, since in principle it needs to be updated
every single time that we receive and process a message. Especially
security sentitive nodes will want this stored immediately to flash.
To give some use-case dependent flexibility, this patch introduces a
new Kconfig option to specify a timeout after which the RPL gets
written to flash.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
These are needed both for bt_mesh_provision() as well as persistent
storage-based network creation.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This variable is both redundant as well as problematic when it comes
to adding persistent-storage-based provisioning information, which
will not come through main.c or the bt_mesh_provision() API. Just
remove it and use bt_mesh.valid which serves the same purpose in
practice.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add APIs for storing core network values, such as Net and App Keys, IV
Index, Sequence number, RPL, etc.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add initial skeleton for doing settings-based persistent storage for
the mesh network state. This patch only includes restoring some core
network state such as IV Index, Sequence number, Net Keys, App Keys
and the Replay Protection list. The remaining state, and actually
storing the state, is left for follow-up patches.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>