Zephyr API Documentation
4.2.99
A Scalable Open Source RTOS
4.2.99
Toggle main menu visibility
Main Page
Related Pages
Topics
Data Structures
Data Structures
Data Structure Index
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Enumerator
Files
File List
Globals
All
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
f
g
h
i
k
l
m
n
o
p
r
s
t
u
x
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Macros
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Zephyr API Documentation
Introduction
Deprecated List
Topics
Data Structures
Files
File List
doc
kernel
lib
modules
subsys
zephyr
acpi
app_memory
arch
audio
bluetooth
canbus
console
crypto
data
debug
devicetree
dfu
display
drivers
adc
bluetooth
can
clock_control
comparator
console
dac
dma
edac
eeprom
ethernet
firmware
flash
gnss
gpio
haptics
i2c
i3c
addresses.h
ccc.h
devicetree.h
error_types.h
hdr_ddr.h
ibi.h
rtio.h
target_device.h
ieee802154
interrupt_controller
led
led_strip
mfd
mic_privacy
mipi_dsi
misc
mm
modem
mspi
pcie
pinctrl
pm_cpu_ops
power
psi5
pwm
regulator
retained_mem
rtc
sensor
sent
serial
sip_svc
spi
stepper
timer
uart
usb
usb_c
video
virtio
virtualization
adc.h
auxdisplay.h
bbram.h
bluetooth.h
cache.h
can.h
cellular.h
charger.h
clock_control.h
comparator.h
coredump.h
counter.h
dac.h
dai.h
disk.h
display.h
dma.h
edac.h
eeprom.h
emul.h
emul_bbram.h
emul_fuel_gauge.h
emul_sensor.h
emul_stub_device.h
entropy.h
espi.h
espi_emul.h
espi_saf.h
flash.h
fpga.h
fuel_gauge.h
gnss.h
gpio.h
haptics.h
hwinfo.h
hwspinlock.h
i2c.h
i2c_emul.h
i2s.h
i3c.h
ipm.h
led.h
led_strip.h
loopback_disk.h
lora.h
mbox.h
mdio.h
mipi_dbi.h
mipi_dsi.h
mspi.h
mspi_emul.h
peci.h
pinctrl.h
pm_cpu_ops.h
ps2.h
ptp_clock.h
pwm.h
regulator.h
reset.h
retained_mem.h
rtc.h
sdhc.h
sensor.h
sensor_attribute_types.h
sensor_clock.h
sensor_data_types.h
smbus.h
spi.h
spi_emul.h
stepper.h
swdp.h
syscon.h
tee.h
uart.h
uart_emul.h
uart_pipe.h
video-controls.h
video.h
virtio.h
w1.h
watchdog.h
dsp
dt-bindings
fs
input
internal
ipc
kernel
linker
llext
logging
lorawan
math
mem_mgmt
mgmt
misc
modbus
modem
multi_heap
net
platform
pm
pmci
portability
posix
psa
random
retention
rtio
sd
sensing
settings
shell
sip_svc
stats
storage
sys
task_wdt
timing
toolchain
tracing
usb
usb_c
xen
zbus
zvfs
bindesc.h
cache.h
device.h
devicetree.h
fatal.h
fatal_types.h
init.h
irq.h
irq_multilevel.h
irq_nextlevel.h
irq_offload.h
kernel.h
kernel_includes.h
kernel_structs.h
kernel_version.h
net_buf.h
shared_irq.h
smf.h
spinlock.h
sw_isr_table.h
sys_clock.h
syscall.h
toolchain.h
types.h
Globals
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
Loading...
Searching...
No Matches
devicetree.h
Go to the documentation of this file.
1
/*
2
* Copyright 2022 Intel Corporation
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
#ifndef ZEPHYR_INCLUDE_DRIVERS_I3C_DEVICETREE_H_
8
#define ZEPHYR_INCLUDE_DRIVERS_I3C_DEVICETREE_H_
9
16
17
#include <
stdint.h
>
18
19
#include <
zephyr/device.h
>
20
#include <
zephyr/devicetree.h
>
21
#include <
zephyr/sys/util.h
>
22
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
26
36
#define I3C_DEVICE_ID_DT(node_id) \
37
{ \
38
.pid = ((uint64_t)DT_PROP_BY_IDX(node_id, reg, 1) << 32)\
39
| DT_PROP_BY_IDX(node_id, reg, 2), \
40
}
36
#define I3C_DEVICE_ID_DT(node_id) \
…
41
52
#define I3C_DEVICE_ID_DT_INST(inst) \
53
I3C_DEVICE_ID_DT(DT_DRV_INST(inst))
52
#define I3C_DEVICE_ID_DT_INST(inst) \
…
54
60
62
#define I3C_SUPPORTS_SETAASA BIT(0)
64
#define I3C_V1P0_SUPPORT BIT(1)
65
67
78
#define I3C_DEVICE_DESC_DT(node_id) \
79
{ \
80
.bus = DEVICE_DT_GET(DT_BUS(node_id)), \
81
.dev = DEVICE_DT_GET(node_id), \
82
.static_addr = DT_PROP_BY_IDX(node_id, reg, 0), \
83
.pid = ((uint64_t)DT_PROP_BY_IDX(node_id, reg, 1) << 32) | \
84
DT_PROP_BY_IDX(node_id, reg, 2), \
85
.init_dynamic_addr = DT_PROP_OR(node_id, assigned_address, 0), \
86
.flags = FIELD_PREP(I3C_SUPPORTS_SETAASA, DT_PROP(node_id, supports_setaasa)) | \
87
FIELD_PREP(I3C_V1P0_SUPPORT, DT_PROP(node_id, v1p0_support)), \
88
},
78
#define I3C_DEVICE_DESC_DT(node_id) \
…
89
101
#define I3C_DEVICE_DESC_DT_INST(inst) \
102
I3C_DEVICE_DESC_DT(DT_DRV_INST(inst))
101
#define I3C_DEVICE_DESC_DT_INST(inst) \
…
103
110
#define I3C_DEVICE_DESC_DT_FILTERED(node_id) \
111
COND_CODE_0(DT_PROP_BY_IDX(node_id, reg, 1), \
112
(), (I3C_DEVICE_DESC_DT(node_id)))
110
#define I3C_DEVICE_DESC_DT_FILTERED(node_id) \
…
113
122
#define I3C_DEVICE_ARRAY_DT(node_id) \
123
{ \
124
DT_FOREACH_CHILD_STATUS_OKAY( \
125
node_id, \
126
I3C_DEVICE_DESC_DT_FILTERED) \
127
}
122
#define I3C_DEVICE_ARRAY_DT(node_id) \
…
128
139
#define I3C_DEVICE_ARRAY_DT_INST(inst) \
140
I3C_DEVICE_ARRAY_DT(DT_DRV_INST(inst))
139
#define I3C_DEVICE_ARRAY_DT_INST(inst) \
…
141
167
#define I3C_DEVICE_DT_DEFINE(node_id, init_fn, pm, data, config, level, \
168
prio, api, ...) \
169
DEVICE_DT_DEFINE(node_id, init_fn, pm, data, config, level, \
170
prio, api, __VA_ARGS__)
171
180
#define I3C_DEVICE_DT_INST_DEFINE(inst, ...) \
181
I3C_DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__)
180
#define I3C_DEVICE_DT_INST_DEFINE(inst, ...) \
…
182
192
#define I3C_I2C_DEVICE_DESC_DT(node_id) \
193
{ \
194
.bus = DEVICE_DT_GET(DT_BUS(node_id)), \
195
.addr = DT_PROP_BY_IDX(node_id, reg, 0), \
196
.lvr = DT_PROP_BY_IDX(node_id, reg, 2), \
197
},
192
#define I3C_I2C_DEVICE_DESC_DT(node_id) \
…
198
209
#define I3C_I2C_DEVICE_DESC_DT_INST(inst) \
210
I3C_I2C_DEVICE_DESC_DT(DT_DRV_INST(inst))
209
#define I3C_I2C_DEVICE_DESC_DT_INST(inst) \
…
211
212
219
#define I3C_I2C_DEVICE_DESC_DT_FILTERED(node_id) \
220
COND_CODE_0(DT_PROP_BY_IDX(node_id, reg, 1), \
221
(I3C_I2C_DEVICE_DESC_DT(node_id)), ())
219
#define I3C_I2C_DEVICE_DESC_DT_FILTERED(node_id) \
…
222
231
#define I3C_I2C_DEVICE_ARRAY_DT(node_id) \
232
{ \
233
DT_FOREACH_CHILD_STATUS_OKAY( \
234
node_id, \
235
I3C_I2C_DEVICE_DESC_DT_FILTERED) \
236
}
231
#define I3C_I2C_DEVICE_ARRAY_DT(node_id) \
…
237
248
#define I3C_I2C_DEVICE_ARRAY_DT_INST(inst) \
249
I3C_I2C_DEVICE_ARRAY_DT(DT_DRV_INST(inst))
248
#define I3C_I2C_DEVICE_ARRAY_DT_INST(inst) \
…
250
251
#ifdef __cplusplus
252
}
253
#endif
254
258
259
#endif
/* ZEPHYR_INCLUDE_DRIVERS_I3C_DEVICETREE_H_ */
device.h
devicetree.h
Devicetree main header.
stdint.h
util.h
Misc utilities.
zephyr
drivers
i3c
devicetree.h
Generated on
for Zephyr API Documentation by
1.14.0