Skip to content

Commit 8794de2

Browse files
softwareckicarlescufi
authored andcommitted
intel_adsp: soc: ace: Add communication widget driver
Intel DSP Communication Widget is a device for generic sideband message transmit/receive between IPs in a SOC. Signed-off-by: Adrian Warecki <[email protected]>
1 parent 18ab7eb commit 8794de2

File tree

9 files changed

+1038
-0
lines changed

9 files changed

+1038
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright (c) 2022 Intel Corporation.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: Intel ADSP Communication Widget
5+
6+
compatible: "intel,adsp-communication-widget"
7+
8+
include: base.yaml
9+
10+
properties:
11+
reg:
12+
required: true

dts/xtensa/intel/intel_adsp_ace15_mtpm.dtsi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,14 @@
420420
};
421421
};
422422

423+
ace_comm_widget: ace_comm_widget@71C00 {
424+
compatible = "intel,adsp-communication-widget";
425+
reg = <0x00071C00 0x100>;
426+
interrupts = <0x19 0 0>;
427+
interrupt-parent = <&ace_intc>;
428+
status = "okay";
429+
};
430+
423431
shim: shim@71f00 {
424432
compatible = "intel,adsp-shim";
425433
reg = <0x71f00 0x100>;

soc/xtensa/intel_adsp/ace/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ zephyr_library_sources(
1212
power.c
1313
boot.c
1414
)
15+
16+
zephyr_library_sources_ifdef(CONFIG_SOC_INTEL_COMM_WIDGET comm_widget.c)
17+
zephyr_library_sources_ifdef(CONFIG_SOC_INTEL_COMM_WIDGET comm_widget_messages.c)

soc/xtensa/intel_adsp/ace/Kconfig.soc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,11 @@ choice
99
depends on SOC_SERIES_INTEL_ACE
1010

1111
endchoice
12+
13+
config SOC_INTEL_COMM_WIDGET
14+
bool "Intel Communication Widget driver"
15+
default y
16+
depends on DT_HAS_INTEL_ADSP_COMMUNICATION_WIDGET_ENABLED
17+
help
18+
Select this to enable Intel Communication Widget driver.
19+
DSP Communication Widget is a device for generic sideband message transmit/receive.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright (c) 2022 Intel Corporation.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include "comm_widget.h"
8+
9+
/*
10+
* Operation codes
11+
*/
12+
#define CW_OPCODE_CRRD 0x06
13+
#define CW_OPCODE_CRWR 0x07
14+
15+
void cw_sb_write(uint32_t dest, uint32_t func, uint16_t address, uint32_t data)
16+
{
17+
cw_upstream_set_attr(dest, func, CW_OPCODE_CRWR, 0, 0);
18+
cw_upstream_set_address16(address);
19+
cw_upstream_set_data(data);
20+
cw_upstream_do_pw();
21+
}

0 commit comments

Comments
 (0)