sio/nuvoton/common/nuvoton.h: Add common Nuvoton SIO LDNs

Put the most commonly shared Nuvoton SIO logical device numbers into
one central header. It will be handy when they start sharing per-LDN
setup code.

Block iasl from seeing anything other than the LDNs.

Rename the re-inclusion guard symbol as its use is no longer limited to
pre-RAM stages.

It references NCT677x because that reference is hidden in every single
Nuvoton SIO chip datasheet in my possession.

Change-Id: Ibf01c0e0ffdecbedc34df62b582e3be0c5c0a852
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89739
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Keith Hui 2025-10-21 21:39:21 -04:00 committed by Matt DeVillier
commit 4047a44b68

View file

@ -1,13 +1,28 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef SUPERIO_NUVOTON_COMMON_PRE_RAM_H
#define SUPERIO_NUVOTON_COMMON_PRE_RAM_H
#ifndef SUPERIO_NUVOTON_COMMON_H
#define SUPERIO_NUVOTON_COMMON_H
#ifndef __ACPI__
#include <device/pnp_type.h>
#include <stdint.h>
void nuvoton_pnp_enter_conf_state(pnp_devfn_t dev);
void nuvoton_pnp_exit_conf_state(pnp_devfn_t dev);
void nuvoton_enable_serial(pnp_devfn_t dev, u16 iobase);
#endif
#endif /* SUPERIO_NUVOTON_COMMON_PRE_RAM_H */
/*
* Logical Device Numbers (LDN) common to all Nuvoton SIOs.
* Because they will be incorporated into ACPI device IDs,
* they must be written as decimal.
*/
#define NCT677X_PP 1 /* Parallel port */
#define NCT677X_SP1 2 /* COM1 */
#define NCT677X_SP2 3 /* COM2 & IR */
#define NCT677X_KBC 5 /* PS/2 keyboard and mouse */
#define NCT677X_ACPI 10 /* ACPI */
#define NCT677X_HWM_FPLED 11 /* Hardware monitor & front LED */
#define NCT677X_MAXLDN 22 /* The highest known LDN of these chips (0x16) */
#endif /* SUPERIO_NUVOTON_COMMON_H */