Only basic support has been added as some drivers require some fixes.
I have successfully tested the following examples:
- samples/hello_world
- samples/basic/blinky
- samples/basic/button
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
This change removes the hardcoded subsystem list in gen_kobject_list.py
favor of marking the relevant driver API structs with the _subsystem
sentinel.
Signed-off-by: Corey Wharton <coreyw7@fb.com>
This change extends the parse_syscalls.py script to scan for a
__subsystem sentinal added to driver api declarations. It thens
generates a list that is passed into gen_kobject_list.py to extend
the subsystems list. This allows subsystems to be declared in the
code instead of a separate python list and provides a mechanism for
defining out-of-tree subsystems.
Signed-off-by: Corey Wharton <coreyw7@fb.com>
The TCP connection might be concurrently modified from the
TR/TX threads, so add a mutex to protect from the concurrent
modification.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
After removing the test windows, update test protocol
functions for the TTCN-3 sanity check.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
These test receive windows were used by TTCN-3 sanity check,
but it's possible to do without them.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
In order to drop dependency on a heap, drop the
test send window.
Use net_tcp_queue_data() to receive the outgoing data
from the socket layer.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
In order to drop dependency on a heap, drop the test
receive window.
The receive window was needed for TTCN-3 sanity check,
but it's possible to do without it.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
On incoming SYN+ACK, use the existing TCP connection.
This problem was overlooked earlier and was found while
testing TCP2 client side.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
In SYN_SENT check the ack number of the incoming TCP message
against our sequence number.
This problem was overlooked earlier and was found while
testing TCP2 client side.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
Don't erroneously instantiate an extra TCP connection
on TCP connect.
This problem was overlooked earlier and found while testing
TCP2 client side.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
k_timer callback is executed from ISR context, which isn't
currenty compatible with Zephyr's shell implementation.
This problem was found while testing TCP2 client side.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
In order to support TTCN-3 based TCP2 sanity check,
register test inputs with net_conn_register() and adjust
test functions to account for this.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
In order to support IPv4/IPv6, work with packet through
net_pkt_ip_hdr_len(), net_pkt_ip_opts_len() which account
for IPv4/IPv6, IPv4 options and IPv6 extension headers.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
Remove temporary interception of TCP, UDP for TTCN-3 based
TCP2 sanity check.
As a part of adding IPv6 support, TCP2 will register test
callbacks/inputs with net_conn_register().
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
In order to run the TTCN-3 based sanity check, add a TCP
sample app and instructions for running the sanity check.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
Allocate tcp2.c endpoints before storing port numbers or addresses.
Select the IPv4 source address since net_context_create_ipv4_new()
is not currently called on packet output.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
The 48MHz PLL on MEC1501 is shut off during deep sleep (i.e. heavy
sleep in datasheet). When coming out of deep sleep, this PLL needs
about 3ms to lock. Most peripherals are using this PLL as clock
source and timing would be off before PLL is locked. Example of
this is seen on serial console where garbage characters are sent
as the UART block is not pushing characters out at the configured
baud rate. This likely affects all other peripherals such as I2C
and eSPI. Luckily, there is a register to indicate whether the PLL
is ready. So spin on it when coming out of deep sleep.
Fixes#23207
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add girq and girq-bit to encode per device information. This allows the
driver to get any device unique info from device tree.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert driver to use DT_INST_ defines. The preferred defines for
drivers are DT_INST_. The driver mostly used DT_INST_ defines but
a few IRQ priority defines needed conversion.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert driver to use DT_INST_ defines. The preferred defines for
drivers are DT_INST_.
As part of this change we utilize the device tree for GIRQ info and
rename timer3 to 2 since we are doing this by instance number.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add girq and girq-bit to encode per device information. This allows the
driver to get any device unique info from device tree.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The max-value should just be an int and not an array. Change the type
to 'int' in the binding and fixup the driver to match.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add a function takes a 'label' and returns "y" if we find an
"enabled" node that has a 'nodelabel' of 'label' in the EDT
otherwise we return "n"
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Pad node identifiers to 60 characters. This results in better
alignment in practice than the current value of 40, which is a bit
low.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This too is an attempt to reimplement the previous behavior exactly,
modulo the order in which things are defined.
This is the last function which is calling into the previous
implementation's out_node and node_*_alias() functions, so these can
be removed now.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This is similar to the work already done for regs.
Other than the order in which they appear and comments, the output
before and after this patch should be exactly the same.
We're intentionally leaving some of the helpers in module scope here
to use some of the subroutines elsewhere later on when reworking
write_spi_dev().
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Mirror the change already done to write_regs().
Other than the order in which they appear and comments, the output
before and after this patch should be exactly the same.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Use augmented nodes to print macros grouped by namespace.
Other than the order in which they appear and comments, the output
before and after this patch should be exactly the same.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Group the macros together by namespace rather than putting all the
BASE_ADDRESS macros together and all the SIZE macros together. E.g.,
all the DT_INST_<x> namespace macros for each node now appear
consecutively.
Add a comment making it clear that this output comes from "regs",
since "BASE_ADDRESS" and "SIZE" are not property names.
Other than the order in which they appear and comments, the output
before and after this patch should be exactly the same.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>