freqme0 declares neither power-domains nor
zephyr,disabling-power-states, so with CONFIG_PM_DEVICE the block gets no
TURN_ON after a state that reset it, and with
CONFIG_PM_POLICY_DEVICE_CONSTRAINTS the policy may enter a state that stops
it while a measurement runs.
Per MCXAP172M240F70 RM Rev. 1 Draft F section 30.6 ("Module operation in
low power modes") the FME row reads Static in Power Down -- the legend
defines that as "the module is not active in state retention status" -- and
Off in both Deep Power Down and VBAT. The power domain table puts the
frequency measurement unit in the CORE domain, which Deep Power Down gates,
together with the peripheral input mux that routes its reference and target
clocks.
Give the node both properties.
Deep Sleep is listed although that cell reads Static/LP. On frdm_mcxa577 a
cycle started immediately before entering Deep Sleep completes having
counted no edges, which the driver reports as a lost clock, so the state
has to be blocked while the block is measuring.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
freqme0 declares neither power-domains nor
zephyr,disabling-power-states, so with CONFIG_PM_DEVICE the block gets no
TURN_ON after a state that reset it, and with
CONFIG_PM_POLICY_DEVICE_CONSTRAINTS the policy may enter a state that stops
it while a measurement runs.
Per MCXAP144M180FS6 RM Rev. 1 section 24.5 ("Module operation in low power
modes") the FME row reads Static in both Deep Sleep and Power Down -- the
legend defines that as "the module is not active in state retention status"
-- and Off in Deep Power Down. The power domain table puts the frequency
measurement unit in the CORE domain, which Deep Power Down gates, together
with the peripheral input mux that routes its reference and target clocks.
Give the node both properties.
Covers A266, A346 and A366.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
freqme0 declares neither power-domains nor
zephyr,disabling-power-states, so with CONFIG_PM_DEVICE the block gets no
TURN_ON after a state that reset it, and with
CONFIG_PM_POLICY_DEVICE_CONSTRAINTS the policy may enter a state that stops
it while a measurement runs.
Per MCXAP100M180F40 RM Rev. 1 section 24.5 ("Module operation in low power
modes") the FMEQME row reads Static in both Deep Sleep and Power Down --
the legend defines that as "the module is not active in state retention
status" -- and Off in Deep Power Down. The power domain table puts the unit
in the CORE domain, which Deep Power Down gates,
together with the peripheral input mux that routes its reference and target
clocks.
Give the node both properties.
Covers A343 and A344.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
freqme0 declares neither power-domains nor
zephyr,disabling-power-states, so with CONFIG_PM_DEVICE the block gets no
TURN_ON after a state that reset it, and with
CONFIG_PM_POLICY_DEVICE_CONSTRAINTS the policy may enter a state that stops
it while a measurement runs.
Per MCXAP100M96FS6 RM Rev. 7 section 23.5 ("Module operation in low power
modes") the FME row reads Static in both Deep Sleep and Power Down -- the
legend defines that as "the module is not active in state retention status"
-- and Off in Deep Power Down. Table 135 puts the frequency measurement
unit in the CORE domain, which Deep Power Down gates, together with the
peripheral input mux that routes its reference and target clocks.
Give the node both properties.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
freqme0 declares neither power-domains nor
zephyr,disabling-power-states, so with CONFIG_PM_DEVICE the block gets no
TURN_ON after a state that reset it, and with
CONFIG_PM_POLICY_DEVICE_CONSTRAINTS the policy may enter a state that stops
it while a measurement runs.
Per MCXAP64M96FS3 RM Rev. 7 section 23.5 ("Module operation in low power
modes") the FME row reads Static in Power Down -- the legend defines that
as "the module is not active in state retention status" -- and Off in Deep
Power Down. Table 135 puts the frequency measurement unit in the CORE
domain, which Deep Power Down gates, together with the peripheral input mux
that routes its reference and target clocks.
Give the node both properties.
Deep Sleep stays listed even though that cell reads Static/LP and the block
does keep measuring there. That holds only while both the selected
reference and target clocks keep running, which the source selection
decides, and the SoC devicetree makes no promise about an application's
clock tree. An application that selects sources surviving Deep Sleep can
drop &deepsleep in its own overlay.
Covers A153, A152, A143, A142, A133 and A132.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
freqme0 declares neither power-domains nor
zephyr,disabling-power-states, so with CONFIG_PM_DEVICE the block gets no
TURN_ON after a state that reset it, and with
CONFIG_PM_POLICY_DEVICE_CONSTRAINTS the policy may enter a state that stops
it while a measurement runs.
Per MCX Nx4x RM Rev. 6_RC2 Table 336 ("Module operation in low power
modes") the FREQME row reads Static in both Deep Sleep and Power Down --
the legend defines that as "the module is not active in state retention
status" -- and Off in Deep Power Down. Table 334 puts the frequency
measurement unit in CORE_MAIN, the domain Deep Power Down gates, together
with the peripheral input mux that routes its reference and target clocks.
Give the node both properties.
Covers N54x and N94x.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
freqme0 declares neither power-domains nor
zephyr,disabling-power-states, so with CONFIG_PM_DEVICE the block gets no
TURN_ON after a state that reset it, and with
CONFIG_PM_POLICY_DEVICE_CONSTRAINTS the policy may enter a state that stops
it while a measurement runs.
Per MCX N23x RM Rev. 4_RC2 Table 220 ("Module operation in low power
modes") the FREQME row reads Static in both Deep Sleep and Power Down --
the legend defines that as "the module is not active in state retention
status" -- and Off in Deep Power Down. Table 218 puts the frequency
measurement unit in CORE_MAIN, the domain Deep Power Down gates, together
with the peripheral input mux that routes its reference and target clocks.
Give the node both properties.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The LPUART nodes have no CORE-domain association. After Deep Power Down,
RESUME can access registers without a preceding TURN_ON to restore the
peripheral.
Per MCXAP172M240F70 RM Rev. 1 DraftF section 30.6 ("Module operation in low
power modes"), the LPUART row is Off in Deep Power Down.
Associate every declared LPUART with core_domain so power restoration
invokes the existing TURN_ON handler before RESUME.
Covers A577.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The LPUART nodes have no CORE-domain association. After Deep Power Down,
RESUME can access registers without a preceding TURN_ON to restore the
peripheral.
Per MCXAP144M180FS6 RM Rev. 1 section 24.5 ("Module operation in low power
modes"), the LPUART row is Off in Deep Power Down.
Associate every declared LPUART with core_domain so power restoration
invokes the existing TURN_ON handler before RESUME.
Covers A266, A346 and A366.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The LPUART nodes have no CORE-domain association. After Deep Power Down,
RESUME can access registers without a preceding TURN_ON to restore the
peripheral.
Per MCXAP100M180F40 RM Rev. 1 section 24.5 ("Module operation in low power
modes"), the LPUART row is Off in Deep Power Down.
Associate every declared LPUART with core_domain so power restoration
invokes the existing TURN_ON handler before RESUME.
Covers A343 and A344.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The LPUART nodes have no CORE-domain association. After Deep Power Down,
RESUME can access registers without a preceding TURN_ON to restore the
peripheral.
Per MCXAP100M96FS6 RM Rev. 7 section 23.5 ("Module operation in low power
modes"), the LPUART row is Off in Deep Power Down.
Associate every declared LPUART with core_domain so power restoration
invokes the existing TURN_ON handler before RESUME.
Covers A156.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The LPUART nodes have no CORE-domain association. After Deep Power Down,
RESUME can access registers without a preceding TURN_ON to restore the
peripheral.
Per MCXAP64M96FS3 RM Rev. 7 section 23.5 ("Module operation in low power
modes"), the LPUART row is Off in Deep Power Down.
Associate every declared LPUART with core_domain so power restoration
invokes the existing TURN_ON handler before RESUME.
Covers A153, A152, A143, A142, A133 and A132.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The OS Timer node has no handoff-power-states list. CONFIG_PM therefore
does not select its companion for a deadline in a state that stops the
timer.
Per MCXAP172M240F70 RM Rev. 1 DraftF section 30.6 ("Module operation in low
power modes"), the OS Event Timer is Static/LP in Deep Sleep, Static in
Power Down and Off in Deep Power Down.
Declare all three handoff states so the idle-entry hook arms the companion
for these transitions instead of relying on optional Deep Sleep operation.
Covers A577.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The OS Timer node has no handoff-power-states list. CONFIG_PM therefore
does not select its companion for a deadline in a state that stops the
timer.
Per MCXAP144M180FS6 RM Rev. 1 section 24.5 ("Module operation in low power
modes"), the OS Event Timer is Static/LP in Deep Sleep, Static in Power
Down and Off in Deep Power Down.
Declare all three handoff states so the idle-entry hook arms the companion
for these transitions instead of relying on optional Deep Sleep operation.
Covers A266, A346 and A366.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The OS Timer node has no handoff-power-states list. CONFIG_PM therefore
does not select its companion for a deadline in a state that stops the
timer.
Per MCXAP100M180F40 RM Rev. 1 section 24.5 ("Module operation in low power
modes"), the OS Event Timer is Static/LP in Deep Sleep, Static in Power
Down and Off in Deep Power Down.
Declare all three handoff states so the idle-entry hook arms the companion
for these transitions instead of relying on optional Deep Sleep operation.
Covers A343 and A344.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The OS Timer node has no handoff-power-states list. CONFIG_PM therefore
does not select its companion for a deadline in a state that stops the
timer.
Per MCXAP100M96FS6 RM Rev. 7 section 23.5 ("Module operation in low power
modes"), the OS Event Timer is Static/LP in Deep Sleep, Static in Power
Down and Off in Deep Power Down.
Declare all three handoff states so the idle-entry hook arms the companion
for these transitions instead of relying on optional Deep Sleep operation.
Covers A156.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The OS Timer node has no handoff-power-states list. CONFIG_PM therefore
does not select its companion for a deadline in a state that stops the
timer.
Per MCXAP64M96FS3 RM Rev. 7 section 23.5 ("Module operation in low power
modes"), the OS Event Timer is Static/LP in Deep Sleep, Static in Power
Down and Off in Deep Power Down.
Declare all three handoff states so the idle-entry hook arms the companion
for these transitions instead of relying on optional Deep Sleep operation.
Covers A153, A152, A143, A142, A133 and A132.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Deep Power Down gates the CORE power domain, so a CTIMER comes back from
it with its registers at reset values, but none of the three nodes
declared a power domain, so TURN_OFF never arrives and TURN_ON arrives
exactly once, from device init, where the registers were at reset values
anyway. None of the three declared zephyr,disabling-power-states either,
so with CONFIG_PM_POLICY_DEVICE_CONSTRAINTS the policy was free to enter
a state that stops the counter while a consumer was counting on it.
Point all three at the core_domain this SoC devicetree already declares;
its onoff list is &deeppowerdown, which the SoC devicetree leaves
disabled, so this stays inert until an application opts into that state.
Per the MCX A153/A152/A143/A142/A133/A132 RM Rev. 7, Section 23.5
("Module operation in low power modes"), CTimer0~2 is "On" in Sleep,
"Static/LP" in Deep Sleep, "Static" in Power Down, and "Off" in Deep
Power Down. LP means the module may run on an asynchronous functional
clock, so a counter outlasts Deep Sleep only while the clock the board
gave it does. frdm_mcxa153 board init attaches FRO_HF
(kFRO_HF_to_CTIMERx) without arranging for it to survive Deep Sleep or
Power Down, so the conservative list is the correct default for every
instance.
Covers A153.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Deep Power Down gates the CORE power domain, so a CTIMER comes back from
it with its registers at reset values, but none of the three nodes
declared a power domain, so TURN_OFF never arrives and TURN_ON arrives
exactly once, from device init, where the registers were at reset values
anyway. None of the three declared zephyr,disabling-power-states either,
so with CONFIG_PM_POLICY_DEVICE_CONSTRAINTS the policy was free to enter
a state that stops the counter while a consumer was counting on it.
Point all three at the core_domain this SoC devicetree already declares;
its onoff list is &deeppowerdown, which the SoC devicetree leaves
disabled, so this stays inert until an application opts into that state.
Per the MCX A343/A344 RM Rev. 1, Section 24.5 ("Module operation in low
power modes"), CTimer0~2 is "On" in Sleep, "Static/LP" in Deep Sleep,
"Static" in Power Down, and "Off" in Deep Power Down. LP means the
module may run on an asynchronous functional clock, so a counter
outlasts Deep Sleep only while the clock the board gave it does.
frdm_mcxa344 board init attaches FRO_HF (kFRO_HF_to_CTIMERx) without
arranging for it to survive Deep Sleep or Power Down, so the
conservative list is the correct default for every instance.
Covers A344.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Deep Power Down gates the CORE power domain, so a CTIMER comes back from
it with its registers at reset values, but none of the five nodes
declared a power domain, so TURN_OFF never arrives and TURN_ON arrives
exactly once, from device init, where the registers were at reset values
anyway. None of the five declared zephyr,disabling-power-states either,
so with CONFIG_PM_POLICY_DEVICE_CONSTRAINTS the policy was free to enter
a state that stops the counter while a consumer was counting on it.
Point all five at the core_domain this SoC devicetree already declares;
its onoff list is &deeppowerdown, which the SoC devicetree leaves
disabled, so this stays inert until an application opts into that state.
Per the MCX A156/A155/A154/A146/A145/A144 RM Rev. 7, Section 23.5
("Module operation in low power modes"), CTimer0~5 is "On" in Sleep,
"Static/LP" in Deep Sleep, "Static" in Power Down, and "Off" in Deep
Power Down. LP means the module may run on an asynchronous functional
clock, so a counter outlasts Deep Sleep only while the clock the board
gave it does. frdm_mcxa156 board init attaches FRO_HF
(kFRO_HF_to_CTIMERx) without arranging for it to survive Deep Sleep or
Power Down, so the conservative list is the correct default for every
instance.
Covers A156.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Deep Power Down gates the CORE power domain, so a CTIMER comes back from
it with its registers at reset values, but none of the five nodes
declared a power domain, so TURN_OFF never arrives and TURN_ON arrives
exactly once, from device init, where the registers were at reset values
anyway. None of the five declared zephyr,disabling-power-states either,
so with CONFIG_PM_POLICY_DEVICE_CONSTRAINTS the policy was free to enter
a state that stops the counter while a consumer was counting on it.
Point all five at the core_domain this SoC devicetree already declares;
its onoff list is &deeppowerdown, which the SoC devicetree leaves
disabled, so this stays inert until an application opts into that state.
Per the MCXA16xx/MCXA17xx/MCXA27xx RM Rev. 1, Section 24.5 ("Module
operation in low power modes"), CTimer0~5 is "On" in Sleep, "Static/LP"
in Deep Sleep, "Static" in Power Down, and "Off" in Deep Power Down. LP
means the module may run on an asynchronous functional clock, so a
counter outlasts Deep Sleep only while the clock the board gave it does.
frdm_mcxaxx6 board init attaches FRO_LF (kFRO_LF_DIV_to_CTIMERx) without
arranging for it to survive Deep Sleep or Power Down, so the
conservative list is the correct default for every instance.
Covers A266, A346 and A366.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Deep Power Down gates the CORE power domain, so a CTIMER comes back from
it with its registers at reset values, but none of the five nodes
declared a power domain, so TURN_OFF never arrives and TURN_ON arrives
exactly once, from device init, where the registers were at reset values
anyway. None of the five declared zephyr,disabling-power-states either,
so with CONFIG_PM_POLICY_DEVICE_CONSTRAINTS the policy was free to enter
a state that stops the counter while a consumer was counting on it.
Point all five at the core_domain this SoC devicetree already declares;
its onoff list is &deeppowerdown, which the SoC devicetree leaves
disabled, so this stays inert until an application opts into that state.
Per the MCX A577/A567/A566/A557/A556/A537/A536/A457/A456/A287/A286 RM
Rev. 1 (Draft F), Section 30.6 ("Module operation in low power modes"),
CTimer0~4 is "On" in Sleep, "Static/LP" in Deep Sleep, "Static" in Power
Down, and "Off" in Deep Power Down. (The table's fifth column, VBAT, has
no corresponding power state in this SoC's devicetree.) LP means the
module may run on an asynchronous functional clock, so a counter outlasts
Deep Sleep only while the clock the board gave it does. frdm_mcxa577
board init attaches PLL1 (kPll1ClkDiv_to_CTIMERx) without arranging for
it to survive Deep Sleep or Power Down, so the conservative list is the
correct default for every instance.
Covers A577, A567, A566, A557, A556, A537, A536, A457, A456, A287 and
A286.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Deep Power Down gates the CORE power domain, so a CTIMER comes back from
it with its registers at reset values: no prescale, no match value, no
match interrupt, and a counter that reads zero. The driver rebuilds all
of that from PM_DEVICE_ACTION_TURN_ON, but none of the five nodes
declared a power domain, so TURN_OFF never arrives and TURN_ON arrives
exactly once, from device init, where the registers were at reset values
anyway.
None of the five nodes declared zephyr,disabling-power-states either, so
with CONFIG_PM_POLICY_DEVICE_CONSTRAINTS the policy was free to enter a
state that stops the counter while a consumer was counting on it.
Point all five at the core_domain this SoC devicetree already declares,
so each instance is handed a TURN_OFF before the transition and a
TURN_ON after it. The domain's onoff list is &deeppowerdown, which the
SoC devicetree leaves disabled, so this stays inert until an application
opts into that state.
Per MCX N23x RM Rev. 4_RC2 Table 220 ("Module operation in low-power
modes") CTIMER0 is "LP/Static" in Deep Sleep and Power Down, CTIMER1-3
are "LP/Static" in Deep Sleep and "Static" in Power Down, and all four
are "Off" in Deep Power Down. CTIMER4 is not in that table. LP means the
module may run on an asynchronous functional clock, so a counter outlasts
one of these states only while the clock the board gave it does.
frdm_mcxn236 board init attaches PLL0 (kPLL0_to_CTIMERx) without
arranging for it to survive Deep Sleep or Power Down, so the conservative
list is the correct default for every instance.
Covers N235 and N236.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Deep Power Down gates the CORE power domain, so a CTIMER comes back from
it with its registers at reset values: no prescale, no match value, no
match interrupt, and a counter that reads zero. The driver rebuilds all
of that from PM_DEVICE_ACTION_TURN_ON, but none of the five nodes
declared a power domain, so TURN_OFF never arrives and TURN_ON arrives
exactly once, from device init, where the registers were at reset values
anyway.
None of the five nodes declared zephyr,disabling-power-states either, so
with CONFIG_PM_POLICY_DEVICE_CONSTRAINTS the policy was free to enter a
state that stops the counter while a consumer was counting on it.
Point all five at the core_domain this SoC devicetree already declares,
so each instance is handed a TURN_OFF before the transition and a
TURN_ON after it. The domain's onoff list is &deeppowerdown, which the
SoC devicetree leaves disabled, so this stays inert until an application
opts into that state.
Per MCX Nx4x RM Rev. 6 Table 336 ("Module operation in low-power modes")
CTIMER0 is "LP/Static" in Deep Sleep and Power Down, CTIMER1-3 are
"LP/Static" in Deep Sleep and "Static" in Power Down, and all four are
"Off" in Deep Power Down. CTIMER4 is not in that table. LP means the
module may run on an asynchronous functional clock, so a counter outlasts
one of these states only while the clock the board gave it does. Board
init on every in-tree target attaches PLL0, which stops in all three, so
the conservative list is the correct default for every instance.
Covers N947, N946, N547 and N546.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The CHT8305 is register-compatible with the TI HDC1000 family, only
IDs and conversion time differ. It can also stretch the I2C clock
during conversion, used by default instead of sleeping.
Also add a heater property for both compatibles.
Signed-off-by: Camille BAUD <mail@massdriver.space>
The example used the bare nexus indices, teaching the form the rest of
the tree has just moved away from. Use MIKROBUS_CS and MIKROBUS_INT
instead.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
Move the RP1 UART0 pin control group from the Raspberry Pi 5 SWD board
variant into rp1_common-pinctrl.dtsi next to rp1_common.dtsi, and add
default TX/RX groups for RP1 UART1 to UART4 (GPIO0/1, GPIO4/5, GPIO8/9
and GPIO12/13, ALT2). RX pins set input-enable, as the RP1 pinctrl
driver clears the pad input enable bit otherwise.
rpi_5-pinctrl.dtsi includes the new file, so both rpi_5 variants get
the groups. Tested by building hello_world for rpi_5/bcm2712/swd, and
for rpi_5 with an overlay enabling rp1_uart1 to rp1_uart4.
Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
The RP1 I/O controller is a separate chip attached to the BCM2712
through PCIe, not part of the SoC. Move its nodes out of bcm2712.dtsi
into rp1_common.dtsi, which adds them under &pcie2, and include it from
the Raspberry Pi 5 board devicetree.
No functional change: the generated devicetree for rpi_5 is identical
apart from source location comments.
Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
Declare the led device class in led-controller.yaml and directly in
the LED bindings that do not include it, so that every binding with an
LED driver can be enumerated with DT_FOREACH_CLASS_STATUS_OKAY(led).
Assisted-by: Claude:opus-5.5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Remove the stale comment about device_type being used by the
DT_FOREACH_CPU family of macros, as they have been migrated to use
gen_defines helper macros. Also, a CPU node's device_type property value
shall be "cpu" as per the Devicetree Specification. Thus const should be
used instead of default for the "device_type" property.
Assisted-by: Claude:claude-sonnet-5.5
Signed-off-by: Dev Joshi <devbhave@qti.qualcomm.com>
Both properties accept either a single 32-bit cell or a 64-bit value
encoded as two 32-bit cells (high word first), per the Devicetree
Specification. The previous type: int only accepted a single 32-bit cell.
The new type: var-uint64 assembles the 1- or 2-cell DTS value into a
single Python int in edtlib and emits a plain integer literal from
gen_defines. DT_PROP(node, clock_frequency) continues to expand to a
scalar integer, preserving backward compatibility with all existing
board DTS files and C call sites.
Assisted-by: Claude:claude-sonnet-5.5
Signed-off-by: Dev Joshi <devbhave@qti.qualcomm.com>
Add a ZTEST(devicetree_api, test_var_uint64_prop) that exercises the
full gen_defines.py -> devicetree_generated.h -> DT_* macro chain for
the new binding property type.
The test covers:
- DT_PROP on a 1-cell value: must return a plain scalar integer
- DT_PROP on a 2-cell value <1 0>: must return 4294967296 (uint64_t)
- DT_PROP_OR with property present: returns the property value
- DT_PROP_OR with property absent: returns the fallback
- DT_NODE_HAS_PROP: 1 for present, 0 for absent
- default: in binding used when property is absent from DTS
- Compile-time BUILD_ASSERT that no _LEN macro is emitted for
var-uint64
(var-uint64 is a scalar, not an array; if _LEN were emitted the
DT_PROP_LEN_OR expansion would reference an undefined identifier
and the translation unit would fail to compile)
Verified on native_sim.
Signed-off-by: Dev Joshi <devbhave@qti.qualcomm.com>
Assisted-by: opencode:gpt-6.1-sol
The node was missing the #mux-control-cells and #mux-state-cells the
binding requires, and the clocks phandle needed to ungate TRGMUX.
Add all three; the node stays disabled.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Assisted-by: Claude:claude-opus-5
Add the tcpwm0, tcpwm1 and tcpwm2 groups with all 82 instances so
the TCPWM PWM driver can be enabled on CYT4DN. Each instance carries
its register offset, TCPWM system interrupt, counter resolution and
peripheral clock destination (clk-dst), with a tcpwm-pwm child node.
Add pinctrl for cyt4dn pwm nodes.
Signed-off-by: Alexpandi Muniyandi <alexpandi@linumiz.com>
Add optional `clock-frequency` property to the Infineon TCPWM
binding for configuring the operating clock frequency on
cyt4dn devices.
Signed-off-by: Alexpandi Muniyandi <alexpandi@linumiz.com>
The PCA/PCAL series I2C GPIO expanders have a polarity inversion
register on every supported part, but the driver has it fully
commented out ("unused, omitted") in the register tables, cache maps
and reg_type enum, so it was never wired up.
Add a polarity-inversion devicetree property (32b, default 0, covering
up to 4 ports / p3.7..p0.0) and write it to the polarity inversion
register during reset, alongside the existing output_port/configuration
reset writes. The value is converted with sys_cpu_to_le32() before the
write, matching how every other multi-byte register write in this
driver already handles byteorder (e.g. the 2b_interrupt_edge write),
since the register spans up to 4 bytes depending on part_cfg->port_no.
Enabling the register also makes it cacheable like output_port and
configuration, so the cache-map arrays for all three register table
families (pca953x, pcal953x, pcal65xx) have every subsequent cache
slot index shifted by one, and the base cache-size count used by
GPIO_PCA_GET_CACHE_SIZE_BY_PART_NO_NO_INT goes from 2 to 3. The
per-part register address tables only needed the already-documented
address uncommented, since those are fixed hardware addresses.
Verified by hand that the cache-size formula still matches the
highest cache-map index for both the smallest (pca953x, no latch/pull)
and largest (pcal65xx, latch+pull+int_extend, up to 4 ports) part
families after the shift.
Signed-off-by: Jens Korinth <jnsk@tuta.io>
psoc6_03.dtsi uses DT_FREQ_M() for its cpus/timebase-frequency
property. Include <freq.h> (dts/common/freq.h), which defines the
macro, matching the sibling psoc6_01/02/04 dies.
Assisted-by: Copilot:claude-sonnet-5
Signed-off-by: Clark Jarvis <Clark.Jarvis@infineon.com>
Add Zephyr board support for the Infineon CY8CPROTO-062S3-4343W
PSOC(TM) 62S3 Wi-Fi BT Prototyping Kit: dual-core Arm Cortex-M4 +
Cortex-M0+ (SOC_CY8C6245LQI_S3D72).
Supports UART, I2C, and watchdog, with zephyr,flash-controller
referenced from the shared psoc6_03 die devicetree. Catalogs
cy8c6245lqi_s3d72 in soc/infineon/cat1a/soc.yml.
The board carries an onboard Murata LBEE5KL1DX (CYW4343W) Wi-Fi/BT
combo module, but Wi-Fi and BT are descoped from this board
definition: the Wi-Fi firmware blob alone (~420KB) does not fit
alongside an application in this SoC's 512KB internal flash. The
HCI-UART and SDIO/Wi-Fi devicetree nodes are present as disabled
hardware-reference scaffolding only, and are not part of the
supported feature set.
Signed-off-by: Hari Udayakumar <hariudkmr@gmail.com>
Assisted-by: Copilot:claude-sonnet-5
Signed-off-by: Clark Jarvis <Clark.Jarvis@infineon.com>
clock_init() fixes the roots of the ENET and ENET_1G 1588 timers to
SYS_PLL1_DIV2 / 5, which is 100 MHz. The roots are a SoC level setting,
so describe them as two child nodes of the CCM, enet_timer1_root and
enet_timer2_root, with a small i.MX RT11xx binding (clock-mux and
clock-div), and read them in clock_init(). The SoC devicetree keeps
SYS_PLL1_DIV2 / 5, so no existing board changes. A board or an
application selects another root with an overlay; the mux inputs have
named constants in the new nxp_imxrt11xx_enet_timer.h, because they
apply only to the RT11xx ENET_TIMER roots.
The inputs of the mux are not described as clock nodes, because the
RT11xx devicetree has no nodes for them, and modelling that part of the
clock tree is a larger change for an already released series.
The divider is checked by the binding, 1 to 255: the HAL root
configuration holds it in 8 bits, so 256 would become 0, which is a
divide by 1. SYS_PLL1_DIV5 is refused at build time, because
clock_init() does not enable that output.
The timer start still truncates the tick to a whole number of
nanoseconds, so only roots with a whole tick keep exact time.
Tested on an i.MX RT1170 EVK (ENET_1G). Without an overlay the root is
SYS_PLL1_DIV2 / 5 and the timer runs at 100 MHz as before. With
enet_timer2_root set to SYS_PLL1_DIV2 / 3 the root is 166.67 MHz and
PTP locks to the grandmaster. Built for the other i.MX RT11xx boards
(mimxrt1160_evk, frdm_imxrt1152, vmu_rt1170, the RT1170 CM4); a divider
of 256 and the SYS_PLL1_DIV5 source fail the build as intended.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Massimiliano Cialdi <massimiliano.cialdi@powersoft.com>
The FTM power lock only fires where a node lists a disabling state --
undeclared, it protects nothing.
List stop, pstop1 and pstop2 for the FTM on MCXE24x and KE1xZ, the two
families with both an FTM and power states in DT. Their RM manuals
confirm the FTM dies in all three PSTOPO substates, unlike peripherals
such as QuadSPI or CRC that survive STOP2. Runtime idle leaves the
counter running.
Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Add memc drivers for the NXP Smart External Memory Controller (SEMC)
and for SDRAM devices attached to it. The controller driver provides
reconfigure/soft-reset and SDRAM/SRAM/NOR/NAND configuration entry
points, while the SDRAM device driver is configured from devicetree
timing properties and implements the generic memc API
(get_mem_base/get_size; read/write default to a memcpy).
Switch the imxrt SoC dtsi files to the new nxp,semc compatible and
keep the SEMC node disabled by default, since the ROM boot code may
already initialize external memory that the kernel runs from.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
The mikro-bus binding documents its nexus pin numbering in prose only,
so every board spells its gpio-map with bare integers and a trailing
comment naming the signal, and consumers reference an index with no
comment at all.
Add MIKROBUS_* constants so the map and its consumers name the pin
directly, the way arduino-header-r3.h already does for the Arduino Uno
header. The index assignment is the one the binding already describes
and that every mikroBUS node in the tree uses.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
Describe the PSCI conduit exposed by the BCM2712 firmware so that
pm_system_reset() can issue a system reset for kernel reboot. The
firmware is reached through SMC and the node declares the PSCI 0.2
interface.
Raspberry Pi TF-A reports PSCI 1.1. The driver reads the firmware
version at runtime, so functions added after 0.2 are still available:
cold reset uses SYSTEM_RESET, and warm reset uses SYSTEM_RESET2 when
the firmware provides it.
No CPU bring-up depends on it: this SoC devicetree describes a single
core, and CONFIG_PM_CPU_OPS stays disabled unless an application or
board configuration enables it.
Signed-off-by: Hongquan Li <hongquan.li@processmission.com>
Assisted-by: Codex:gpt-6
The MRT channel nodes have no power-domains property, and the module
declares no power-domain cells. A runtime request on a channel with no
domain resumes that channel without requesting the module's shared bus
clock.
Name the module as every channel's power domain and declare its zero power-
domain cells. This describes the shared register and counter clock without
adding low-power-state constraints or a SoC-domain attachment.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The MRT channel nodes have no power-domains property, and the module
declares no power-domain cells. A runtime request on a channel with no
domain resumes that channel without requesting the module's shared bus
clock.
Name the module as every channel's power domain and declare its zero power-
domain cells. This describes the shared register and counter clock without
adding low-power-state constraints or a SoC-domain attachment.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The MRT channel nodes have no power-domains property, and the module
declares no power-domain cells. A runtime request on a channel with no
domain resumes that channel without requesting the module's shared bus
clock.
Name the module as every channel's power domain and declare its zero power-
domain cells. This describes the shared register and counter clock without
adding low-power-state constraints or a SoC-domain attachment.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The MRT channel nodes have no power-domains property, and the module
declares no power-domain cells. A runtime request on a channel with no
domain resumes that channel without requesting the module's shared bus
clock.
Name the module as every channel's power domain and declare its zero power-
domain cells. This describes the shared register and counter clock without
adding low-power-state constraints or a SoC-domain attachment.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The MRT channel nodes have no power-domains property, and the module
declares no power-domain cells. A runtime request on a channel with no
domain resumes that channel without requesting the module's shared bus
clock.
Name the module as every channel's power domain and declare its zero power-
domain cells. This describes the shared register and counter clock without
adding low-power-state constraints or a SoC-domain attachment.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The MRT channel nodes have no power-domains property. The existing suspend
and standby disabling-power-states list is on the module, but policy locks
are acquired on channel devices and constraint lookup does not inherit it.
Name the module as each channel's power domain and declare its zero power-
domain cells. Move the existing state list to every channel without
changing the state selection or attaching the module to a SoC power domain.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Assisted-by: Copilot:unknown
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The MRT channel nodes do not name their module as a power domain. The
module is not attached to core_domain, and the channels declare no
disabling-power-states.
Per MCX Nx4x RM Rev. 6_RC2 Table 334 ("Power domain assignments for
modules"), MRT0 belongs to CORE_MAIN, which is powered off in Deep Power
Down. Table 336 ("Module operation in low-power modes") lists MRT as On in
Sleep, Static in Deep Sleep and Power Down, and Off in Deep Power Down.
Static means the module is not active in state retention.
Name the module as each channel's power domain, declare its zero power-
domain cells and attach it to core_domain. Give each channel the deepsleep,
powerdown and deeppowerdown constraints used by the driver's per-channel
policy locks.
Covers N94x and N54x.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>