Skip to content

Commit 32d7c0c

Browse files
authored
Merge branch 'master' into nxp-docker-img-update
2 parents f474b6f + 884d9fa commit 32d7c0c

File tree

99 files changed

+2100
-596
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+2100
-596
lines changed

.github/workflows/examples-nxp.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ jobs:
274274
with:
275275
platform-name: RW61X
276276
zephyr:
277-
name: ZEPHYR_RW61X
277+
name: ZEPHYR
278278

279279
runs-on: ubuntu-latest
280280
if: github.actor != 'restyled-io[bot]'
@@ -290,12 +290,13 @@ jobs:
290290
with:
291291
platform: nxp
292292

293-
- name: Build RW61x Zephyr examples
293+
- name: Build NXP Zephyr examples
294294
run: |
295295
scripts/run_in_build_env.sh "\
296296
./scripts/build/build_examples.py \
297297
--target nxp-rw61x-zephyr-all-clusters \
298298
--target nxp-rw61x-zephyr-thermostat \
299299
--target nxp-rw61x-zephyr-laundry-washer-factory \
300+
--target nxp-rw61x_eth-zephyr-thermostat-ethernet \
300301
build \
301302
"

.github/workflows/examples-openiotsdk.yaml

+1-5
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@
1515
name: Build example - Open IoT SDK
1616

1717
on:
18-
push:
19-
branches-ignore:
20-
- 'dependabot/**'
21-
pull_request:
22-
merge_group:
18+
# Workflow disabled due to lack of maintainer
2319
workflow_dispatch:
2420

2521
concurrency:

config/nxp/chip-module/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ endif()
123123

124124
if (CONFIG_NET_L2_OPENTHREAD)
125125
matter_add_gn_arg_string("chip_mdns" "platform")
126-
elseif(CONFIG_WIFI_NXP)
126+
elseif(CONFIG_WIFI_NXP OR CONFIG_CHIP_ETHERNET)
127127
matter_add_gn_arg_string("chip_mdns" "minimal")
128128
else()
129129
matter_add_gn_arg_string("chip_mdns" "none")

config/nxp/chip-module/Kconfig.defaults

+16-4
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,6 @@ choice SCHED_ALGORITHM
252252
default SCHED_MULTIQ
253253
endchoice
254254

255-
choice LIBC_IMPLEMENTATION
256-
default NEWLIB_LIBC
257-
endchoice
258-
259255
choice WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_CHOICE
260256
default WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_INF
261257
endchoice
@@ -326,6 +322,22 @@ config CHIP_MALLOC_SYS_HEAP_SIZE
326322

327323
endif
328324

325+
if CHIP_ETHERNET || CHIP_WIFI
326+
327+
choice LIBC_IMPLEMENTATION
328+
default NEWLIB_LIBC
329+
endchoice
330+
331+
endif
332+
333+
if CHIP_ETHERNET
334+
335+
choice NXP_ENET_DRIVER
336+
default ETH_NXP_ENET
337+
endchoice
338+
339+
endif
340+
329341
# Configure MBEDTLS lib
330342
config MBEDTLS
331343
default y

config/nxp/chip-module/Kconfig.features

+23
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,27 @@ config CHIP_WIFI_CONNECTION_RECOVERY_JITTER
7676
a random jitter interval is added to it to avoid periodicity. The random jitter is selected
7777
within range [-JITTER; +JITTER].
7878

79+
config CHIP_ETHERNET
80+
bool "Enable NXP Ethernet support"
81+
default n
82+
depends on !CHIP_WIFI
83+
select NET_MGMT_EVENT
84+
select NET_MGMT_EVENT_INFO
85+
select NET_L2_ETHERNET
86+
select NET_L2_ETHERNET_MGMT
87+
select NET_UDP
88+
select NET_IP
89+
select NET_CONFIG_SETTINGS
90+
select NET_MGMT
91+
select NET_IPV4
92+
select NET_DHCPV4
93+
select NET_NATIVE_IPV4
94+
select NET_NATIVE
95+
select NET_TCP
96+
select DNS_RESOLVER
97+
select MDNS_RESOLVER
98+
select MBEDTLS_PKCS5_C
99+
select MBEDTLS_HKDF_C
100+
select MBEDTLS_ECDSA_C
101+
select PSA_CRYPTO_ENABLE_ALL
79102
endif # CHIP

config/nxp/cmake/common.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ matter_add_gn_arg_bool ("chip_detail_logging" CONFIG_MATTER_
4444
matter_add_gn_arg_bool ("chip_automation_logging" FALSE)
4545
matter_add_gn_arg_bool ("chip_malloc_sys_heap" CONFIG_CHIP_MALLOC_SYS_HEAP)
4646
matter_add_gn_arg_bool ("chip_enable_wifi" CONFIG_CHIP_WIFI)
47+
matter_add_gn_arg_bool ("chip_enable_ethernet" CONFIG_CHIP_ETHERNET)
4748
matter_add_gn_arg_bool ("chip_system_config_provide_statistics" CONFIG_CHIP_STATISTICS)
4849
matter_add_gn_arg_bool ("chip_enable_icd_server" CONFIG_CHIP_ENABLE_ICD_SUPPORT)
4950
matter_add_gn_arg_bool ("enable_eventlist_attribute" TRUE)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright (c) 2024 Project CHIP Authors
3+
* All rights reserved.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http: //www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
#include "rd_rw612_bga.overlay"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#
2+
# Copyright (c) 2024 Project CHIP Authors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
CONFIG_SETTINGS_NVS_SECTOR_COUNT=16
18+
19+
# 0xA226
20+
CONFIG_CHIP_DEVICE_PRODUCT_ID=41510
21+
CONFIG_CHIP_DEVICE_PRODUCT_URL="https://www.nxp.com/products/wireless-connectivity/wi-fi-plus-bluetooth-plus-802-15-4/wireless-mcu-with-integrated-tri-radio-1x1-wi-fi-6-plus-bluetooth-low-energy-5-3-802-15-4:RW612"
22+
CONFIG_CHIP_DEVICE_PRODUCT_LABEL="RW612"
23+
CONFIG_CHIP_DEVICE_PART_NUMBER="RW612"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#
2+
# Copyright (c) 2024 Project CHIP Authors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
# Options needed for Ethernet are located in this file
18+
19+
# ethernet discriminator
20+
CONFIG_CHIP_DEVICE_DISCRIMINATOR=0x700
21+
22+
CONFIG_CHIP_WIFI=n
23+
CONFIG_CHIP_ETHERNET=y
24+
25+
CONFIG_NET_DEFAULT_IF_WIFI=n
26+
CONFIG_BT=n
27+
CONFIG_BT_DEVICE_NAME=""

examples/contact-sensor-app/nxp/k32w1/BUILD.gn

+2
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,11 @@ mcxw71_k32w1_executable("contact_sensor_app") {
139139
"${common_example_dir}/low_power/include",
140140
"${common_example_dir}/operational_keystore/include",
141141
"${common_example_dir}/ui_feedback/include",
142+
"${common_example_dir}/app_ble/include",
142143
]
143144

144145
sources += [
146+
"${common_example_dir}/app_ble/source/BLEApplicationManagerEmpty.cpp",
145147
"${common_example_dir}/app_task/source/AppTaskBase.cpp",
146148
"${common_example_dir}/app_task/source/AppTaskFreeRTOS.cpp",
147149
"${common_example_dir}/clusters/source/ZclCallbacks.cpp",

examples/contact-sensor-app/nxp/mcxw71/BUILD.gn

+2
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,11 @@ mcxw71_k32w1_executable("contact_sensor_app") {
138138
"${common_example_dir}/low_power/include",
139139
"${common_example_dir}/operational_keystore/include",
140140
"${common_example_dir}/ui_feedback/include",
141+
"${common_example_dir}/app_ble/include",
141142
]
142143

143144
sources += [
145+
"${common_example_dir}/app_ble/source/BLEApplicationManagerEmpty.cpp",
144146
"${common_example_dir}/app_task/source/AppTaskBase.cpp",
145147
"${common_example_dir}/app_task/source/AppTaskFreeRTOS.cpp",
146148
"${common_example_dir}/clusters/source/ZclCallbacks.cpp",

examples/fabric-admin/BUILD.gn

+2
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ static_library("fabric-admin-utils") {
8888
"device_manager/DeviceSubscriptionManager.h",
8989
"device_manager/DeviceSynchronization.cpp",
9090
"device_manager/DeviceSynchronization.h",
91+
"device_manager/PairingManager.cpp",
92+
"device_manager/PairingManager.h",
9193
"device_manager/UniqueIdGetter.cpp",
9294
"device_manager/UniqueIdGetter.h",
9395
]

examples/fabric-admin/commands/common/CHIPCommand.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "IcdManager.h"
2222
#include <controller/CHIPDeviceControllerFactory.h>
2323
#include <credentials/attestation_verifier/FileAttestationTrustStore.h>
24+
#include <device_manager/PairingManager.h>
2425
#include <lib/core/CHIPConfig.h>
2526
#include <lib/core/CHIPVendorIdentifiers.hpp>
2627
#include <lib/support/CodeUtils.h>
@@ -181,6 +182,8 @@ CHIP_ERROR CHIPCommand::MaybeSetUpStack()
181182
mCredIssuerCmds->SetCredentialIssuerOption(CredentialIssuerCommands::CredentialIssuerOptions::kAllowTestCdSigningKey,
182183
allowTestCdSigningKey);
183184

185+
PairingManager::Instance().Init(&CurrentCommissioner());
186+
184187
return CHIP_NO_ERROR;
185188
}
186189

examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.cpp

+2-10
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ CHIP_ERROR FabricSyncRemoveLocalBridgeCommand::RunCommand()
274274
return CHIP_NO_ERROR;
275275
}
276276

277-
void FabricSyncDeviceCommand::OnCommissioningWindowOpened(NodeId deviceId, CHIP_ERROR err, chip::SetupPayload payload)
277+
void FabricSyncDeviceCommand::OnCommissioningWindowOpened(NodeId deviceId, CHIP_ERROR err, SetupPayload payload)
278278
{
279279
ChipLogProgress(NotSpecified, "FabricSyncDeviceCommand::OnCommissioningWindowOpened");
280280

@@ -344,15 +344,7 @@ CHIP_ERROR FabricSyncDeviceCommand::RunCommand(EndpointId remoteId)
344344
return CHIP_NO_ERROR;
345345
}
346346

347-
OpenCommissioningWindowCommand * openCommand =
348-
static_cast<OpenCommissioningWindowCommand *>(CommandMgr().GetCommandByName("pairing", "open-commissioning-window"));
349-
350-
if (openCommand == nullptr)
351-
{
352-
return CHIP_ERROR_NOT_IMPLEMENTED;
353-
}
354-
355-
openCommand->RegisterDelegate(this);
347+
PairingManager::Instance().SetOpenCommissioningWindowDelegate(this);
356348

357349
DeviceMgr().OpenRemoteDeviceCommissioningWindow(remoteId);
358350

examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
#pragma once
2020

2121
#include <commands/common/CHIPCommand.h>
22-
#include <commands/pairing/OpenCommissioningWindowCommand.h>
2322
#include <commands/pairing/PairingCommand.h>
23+
#include <device_manager/PairingManager.h>
2424

2525
// Constants
2626
constexpr uint32_t kCommissionPrepareTimeMs = 500;

examples/fabric-admin/commands/pairing/OpenCommissioningWindowCommand.cpp

+1-9
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,8 @@ CHIP_ERROR OpenCommissioningWindowCommand::RunCommand()
6868
}
6969

7070
void OpenCommissioningWindowCommand::OnOpenCommissioningWindowResponse(void * context, NodeId remoteId, CHIP_ERROR err,
71-
chip::SetupPayload payload)
71+
SetupPayload payload)
7272
{
73-
OpenCommissioningWindowCommand * self = static_cast<OpenCommissioningWindowCommand *>(context);
74-
if (self->mDelegate)
75-
{
76-
self->mDelegate->OnCommissioningWindowOpened(remoteId, err, payload);
77-
self->UnregisterDelegate();
78-
}
79-
80-
LogErrorOnFailure(err);
8173
OnOpenBasicCommissioningWindowResponse(context, remoteId, err);
8274
}
8375

examples/fabric-admin/commands/pairing/OpenCommissioningWindowCommand.h

-11
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@
2222
#include <controller/CommissioningWindowOpener.h>
2323
#include <lib/support/CHIPMem.h>
2424

25-
class CommissioningWindowDelegate
26-
{
27-
public:
28-
virtual void OnCommissioningWindowOpened(chip::NodeId deviceId, CHIP_ERROR err, chip::SetupPayload payload) = 0;
29-
virtual ~CommissioningWindowDelegate() = default;
30-
};
31-
3225
class OpenCommissioningWindowCommand : public CHIPCommand
3326
{
3427
public:
@@ -57,9 +50,6 @@ class OpenCommissioningWindowCommand : public CHIPCommand
5750
"params if absent");
5851
}
5952

60-
void RegisterDelegate(CommissioningWindowDelegate * delegate) { mDelegate = delegate; }
61-
void UnregisterDelegate() { mDelegate = nullptr; }
62-
6353
/////////// CHIPCommand Interface /////////
6454
CHIP_ERROR RunCommand() override;
6555

@@ -71,7 +61,6 @@ class OpenCommissioningWindowCommand : public CHIPCommand
7161
NodeId mNodeId;
7262
chip::EndpointId mEndpointId;
7363
chip::Controller::CommissioningWindowOpener::CommissioningWindowOption mCommissioningWindowOption;
74-
CommissioningWindowDelegate * mDelegate = nullptr;
7564
uint16_t mCommissioningWindowTimeout;
7665
uint32_t mIteration;
7766
uint16_t mDiscriminator;

0 commit comments

Comments
 (0)