Skip to content

Commit 41a6d2a

Browse files
committed
mainboard/novacustom/nuc_box/: add
Signed-off-by: Filip Lewiński <[email protected]>
1 parent 3bbb2f8 commit 41a6d2a

24 files changed

+1072
-0
lines changed
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
## SPDX-License-Identifier: GPL-2.0-only
2+
3+
config BOARD_NOVACUSTOM_NUC_BOX_COMMON
4+
def_bool n
5+
select BOARD_ROMSIZE_KB_32768
6+
select CRB_TPM
7+
select DRIVERS_GENERIC_CBFS_SERIAL
8+
select DRIVERS_GENERIC_CBFS_UUID
9+
select DRIVERS_UART_8250IO
10+
select HAVE_ACPI_RESUME
11+
select HAVE_ACPI_TABLES
12+
select HAVE_CMOS_DEFAULT
13+
select HAVE_INTEL_PTT
14+
select HAVE_OPTION_TABLE
15+
select INTEL_GMA_HAVE_VBT
16+
select MAINBOARD_HAS_TPM2
17+
select NO_UART_ON_SUPERIO
18+
select PCIEXP_SUPPORT_RESIZABLE_BARS
19+
select SOC_INTEL_COMMON_BLOCK_HDA_VERB
20+
select SOC_INTEL_CRASHLOG
21+
select SOC_INTEL_METEORLAKE
22+
select SPD_READ_BY_WORD
23+
24+
config BOARD_NOVACUSTOM_NUC_BOX
25+
select BOARD_NOVACUSTOM_NUC_BOX_COMMON
26+
select SOC_INTEL_ENABLE_USB4_PCIE_RESOURCES
27+
select SOC_INTEL_METEORLAKE_U_H
28+
29+
if BOARD_NOVACUSTOM_NUC_BOX_COMMON
30+
31+
config MAINBOARD_DIR
32+
default "novacustom/nux_box"
33+
34+
config VARIANT_DIR
35+
default "nuc_box" if BOARD_NOVACUSTOM_NUC_BOX
36+
37+
config OVERRIDE_DEVICETREE
38+
default "variants/\$(CONFIG_VARIANT_DIR)/overridetree.cb"
39+
40+
config MAINBOARD_PART_NUMBER
41+
default "NUC BOX" if BOARD_NOVACUSTOM_NUC_BOX
42+
43+
config MAINBOARD_SMBIOS_PRODUCT_NAME
44+
default "NUX_BOX" if BOARD_NOVACUSTOM_NUC_BOX
45+
46+
config MAINBOARD_VERSION
47+
default "nuc_box" if BOARD_NOVACUSTOM_NUC_BOX
48+
49+
config CMOS_DEFAULT_FILE
50+
default "src/mainboard/\$(MAINBOARDDIR)/cmos.default"
51+
52+
config CONSOLE_POST
53+
default y
54+
55+
config D3COLD_SUPPORT
56+
default n
57+
58+
config DIMM_SPD_SIZE
59+
default 1024
60+
61+
config FMDFILE
62+
default "src/mainboard/\$(CONFIG_MAINBOARD_DIR)/variants/\$(CONFIG_VARIANT_DIR)/board.fmd"
63+
64+
config ONBOARD_VGA_IS_PRIMARY
65+
default y
66+
67+
config PCIEXP_DEFAULT_MAX_RESIZABLE_BAR_BITS
68+
default 36
69+
70+
config POST_DEVICE
71+
default n
72+
73+
config TPM_MEASURED_BOOT
74+
default y
75+
76+
config UART_FOR_CONSOLE
77+
default 0
78+
79+
# PM Timer Disabled, saves power
80+
config USE_PM_ACPI_TIMER
81+
default n
82+
83+
endif
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## SPDX-License-Identifier: GPL-2.0-only
2+
3+
config BOARD_NOVACUSTOM_NUC_BOX
4+
bool "nuc_box"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## SPDX-License-Identifier: GPL-2.0-only
2+
3+
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/include
4+
5+
bootblock-y += bootblock.c
6+
bootblock-y += variants/$(VARIANT_DIR)/gpio_early.c
7+
8+
romstage-y += variants/$(VARIANT_DIR)/romstage.c
9+
10+
ramstage-y += ramstage.c
11+
ramstage-y += variants/$(VARIANT_DIR)/hda_verb.c
12+
ramstage-y += variants/$(VARIANT_DIR)/gpio.c
13+
ramstage-y += variants/$(VARIANT_DIR)/ramstage.c
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* SPDX-License-Identifier: GPL-2.0-only */
2+
3+
Scope (\_SB) {
4+
#include "sio.asl"
5+
#include "sleep.asl"
6+
#include "s76.asl"
7+
}
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
/* SPDX-License-Identifier: GPL-2.0-only */
2+
3+
// Notifications:
4+
// 0x80 - hardware backlight toggle
5+
// 0x81 - backlight toggle
6+
// 0x82 - backlight down
7+
// 0x83 - backlight up
8+
// 0x84 - backlight color change
9+
// 0x85 - OLED screen toggle
10+
Device (S76D) {
11+
Name (_HID, "17761776")
12+
Name (_UID, 0)
13+
// Hide the device so that Windows does not warn about a missing driver.
14+
Name (_STA, 0xB)
15+
16+
OperationRegion (HMIO, SystemIO, 0x295, 0x02)
17+
Field (HMIO, ByteAcc, NoLock, Preserve) {
18+
// Hardware manager index
19+
HMID, 8,
20+
// Hardware manager data
21+
HMDT, 8,
22+
}
23+
24+
Method (INIT, 0, Serialized) {
25+
Printf ("S76D: INIT")
26+
Return (0)
27+
}
28+
29+
Method (FINI, 0, Serialized) {
30+
Printf ("S76D: FINI")
31+
Return (0)
32+
}
33+
34+
// Get Airplane LED
35+
Method (GAPL, 0, Serialized) {
36+
Return (0)
37+
}
38+
39+
// Set Airplane LED
40+
Method (SAPL, 1, Serialized) {}
41+
42+
// Get Keyboard Backlight Kind
43+
// 0 - No backlight
44+
// 1 - White backlight
45+
// 2 - RGB backlight
46+
Method (GKBK, 0, Serialized) {
47+
Return (0)
48+
}
49+
50+
// Get Keyboard Brightness
51+
Method (GKBB, 0, Serialized) {
52+
Return (0)
53+
}
54+
55+
// Set Keyboard Brightness
56+
Method (SKBB, 1, Serialized) {}
57+
58+
// Get Keyboard Color
59+
Method (GKBC, 0, Serialized) {
60+
Return (0)
61+
}
62+
63+
// Set Keyboard Color
64+
Method (SKBC, 1, Serialized) {}
65+
66+
// Fan names
67+
Method (NFAN, 0, Serialized) {
68+
Return (Package() {
69+
"CPU fan"
70+
})
71+
}
72+
73+
// Get fan duty cycle and RPM as a single value
74+
Method (GFAN, 1, Serialized) {
75+
// Set bank 0
76+
HMID = 0x4E
77+
HMDT = 0x80
78+
79+
// Read fan duty cycle
80+
HMID = 0x4B
81+
Local0 = HMDT
82+
83+
// Read fan RPM (low)
84+
HMID = 0x33
85+
Local1 = HMDT
86+
87+
// Read fan RPM (high)
88+
HMID = 0x32
89+
Local2 = HMDT
90+
91+
Return ((Local2 << 16) | (Local1 << 8) | Local0)
92+
}
93+
94+
// Temperature names
95+
Method (NTMP, 0, Serialized) {
96+
Return (Package() {
97+
"CPU temp"
98+
})
99+
}
100+
101+
// Get temperature
102+
Method (GTMP, 1, Serialized) {
103+
// Set bank 0
104+
HMID = 0x4E
105+
HMDT = 0x80
106+
107+
// Read temperature
108+
HMID = 0x19
109+
Local0 = HMDT
110+
111+
Return (Local0)
112+
}
113+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/* SPDX-License-Identifier: GPL-2.0-only */
2+
3+
Device (SIO) {
4+
Name (_ADR, 0x2E)
5+
OperationRegion (SIOA, SystemIO, 0x2E, 0x02)
6+
Field (SIOA, ByteAcc, NoLock, Preserve)
7+
{
8+
SI2E, 8,
9+
SI2F, 8,
10+
}
11+
IndexField (SI2E, SI2F, ByteAcc, NoLock, Preserve)
12+
{
13+
Offset (0x07),
14+
SLDN, 8, /* Logical Device Number */
15+
Offset(0xE5),
16+
SRE5, 8, /* Register 0xE5 */
17+
}
18+
19+
Method (ENTR, 0, Serialized) {
20+
// Enter config mode
21+
SI2E = 0x87
22+
SI2E = 0x87
23+
}
24+
25+
Method (EXIT, 0, Serialized) {
26+
// Exit config mode
27+
SI2E = 0xAA
28+
}
29+
30+
Method (PTS, 0, Serialized) {
31+
ENTR()
32+
33+
// Turn on fading LED
34+
SLDN = 0x15
35+
SRE5 = 0x43
36+
37+
EXIT()
38+
}
39+
40+
Method (WAK, 0, Serialized) {
41+
ENTR()
42+
43+
// Turn off fading LED
44+
SLDN = 0x15
45+
SRE5 = 0x42
46+
47+
EXIT()
48+
}
49+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/* SPDX-License-Identifier: GPL-2.0-only */
2+
3+
/* Method called from _PTS prior to enter sleep state */
4+
Method (MPTS, 1) {
5+
\_SB.SIO.PTS()
6+
}
7+
8+
/* Method called from _WAK prior to wakeup */
9+
Method (MWAK, 1) {
10+
\_SB.SIO.WAK()
11+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Vendor name: NovaCustom
2+
Category: desktop
3+
ROM package: WSON-8
4+
ROM protocol: SPI
5+
ROM socketed: y
6+
Flashrom support: y

0 commit comments

Comments
 (0)