Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions boards/nxp/mr_canhubk3/mr_canhubk3.dts
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,6 @@
emios0_bus_a {
mode = "MCB_UP_COUNTER";
prescaler = <16>;
period = <1000>;
status = "okay";
};
};
Expand All @@ -513,63 +512,43 @@
pwm_0 {
channel = <0>;
pwm-mode = "OPWFMB";
period = <65535>;
duty-cycle = <0>;
prescaler = <8>;
polarity = "ACTIVE_HIGH";
};

pwm_1 {
channel = <1>;
pwm-mode = "OPWFMB";
period = <65535>;
duty-cycle = <0>;
prescaler = <8>;
polarity = "ACTIVE_HIGH";
};

pwm_2 {
channel = <2>;
pwm-mode = "OPWFMB";
period = <65535>;
duty-cycle = <0>;
prescaler = <8>;
polarity = "ACTIVE_HIGH";
};

pwm_3 {
channel = <3>;
pwm-mode = "OPWFMB";
period = <65535>;
duty-cycle = <0>;
prescaler = <8>;
polarity = "ACTIVE_HIGH";
};

pwm_4 {
channel = <4>;
pwm-mode = "OPWFMB";
period = <65535>;
duty-cycle = <0>;
prescaler = <8>;
polarity = "ACTIVE_HIGH";
};

pwm_5 {
channel = <5>;
pwm-mode = "OPWFMB";
period = <65535>;
duty-cycle = <0>;
prescaler = <8>;
polarity = "ACTIVE_HIGH";
};

rgb_red {
channel = <19>;
master-bus = <&emios0_bus_a>;
duty-cycle = <0>;
pwm-mode = "OPWMB";
polarity = "ACTIVE_LOW";
};
};
};
Expand All @@ -586,14 +565,12 @@
emios1_bus_a {
prescaler = <16>;
mode = "MCB_UP_COUNTER";
period = <1000>;
status = "okay";
};

emios1_bus_f {
prescaler = <16>;
mode = "MCB_UP_COUNTER";
period = <1000>;
status = "okay";
};
};
Expand All @@ -606,17 +583,13 @@
rgb_green {
channel = <10>;
master-bus = <&emios1_bus_a>;
duty-cycle = <0>;
pwm-mode = "OPWMB";
polarity = "ACTIVE_LOW";
};

rgb_blue {
channel = <5>;
master-bus = <&emios1_bus_f>;
duty-cycle = <0>;
pwm-mode = "OPWMB";
polarity = "ACTIVE_LOW";
};
};
};
Expand Down
2 changes: 2 additions & 0 deletions boards/nxp/s32z2xxdc2/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ The boards support the following hardware features:
+-----------+------------+-------------------------------------+
| DSPI | on-chip | spi |
+-----------+------------+-------------------------------------+
| eMIOS | on-chip | pwm |
+-----------+------------+-------------------------------------+

Other hardware features are not currently supported by the port.

Expand Down
1 change: 1 addition & 0 deletions boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ supported:
- adc
- i2c
- dma
- pwm
vendor: nxp
1 change: 1 addition & 0 deletions boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu0_D.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ supported:
- adc
- i2c
- dma
- pwm
vendor: nxp
1 change: 1 addition & 0 deletions boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ supported:
- adc
- i2c
- dma
- pwm
vendor: nxp
1 change: 1 addition & 0 deletions boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu1_D.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ supported:
- adc
- i2c
- dma
- pwm
vendor: nxp
9 changes: 1 addition & 8 deletions drivers/misc/nxp_s32_emios/nxp_s32_emios.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,24 +59,17 @@ static int nxp_s32_emios_init(const struct device *dev)
.enableGlobalTimeBase = true \
};

#define NXP_S32_EMIOS_MASTER_BUS_VERIFY(node_id) \
BUILD_ASSERT(IN_RANGE(DT_PROP(node_id, period), \
MIN_MASTER_BUS_PERIOD, MAX_MASTER_BUS_PERIOD), \
"Node "DT_NODE_PATH(node_id)": period is out of range");

#define NXP_S32_EMIOS_MASTER_BUS_CONFIG(node_id) \
{ \
.hwChannel = DT_PROP(node_id, channel), \
.defaultPeriod = DT_PROP(node_id, period), \
.defaultPeriod = MAX_MASTER_BUS_PERIOD, \
.masterBusPrescaler = DT_PROP(node_id, prescaler) - 1, \
.allowDebugMode = DT_PROP(node_id, freeze), \
.masterMode = NXP_S32_EMIOS_MASTER_BUS_MODE(DT_STRING_TOKEN(node_id, mode)), \
.masterBusAltPrescaler = 0, \
},

#define NXP_S32_EMIOS_GENERATE_MASTER_BUS_CONFIG(n) \
DT_FOREACH_CHILD_STATUS_OKAY(DT_INST_CHILD(n, master_bus), \
NXP_S32_EMIOS_MASTER_BUS_VERIFY) \
const Emios_Ip_MasterBusConfigType nxp_s32_emios_##n##_master_bus_config[] = { \
DT_FOREACH_CHILD_STATUS_OKAY(DT_INST_CHILD(n, master_bus), \
NXP_S32_EMIOS_MASTER_BUS_CONFIG) \
Expand Down
Loading
Loading