dts: misc: npcx: add new DT node for booter variant
The booter (bootloader) behavior may be different in different NPCX chip series. One example is that the booter sets host interface type in NPCX7 series but leave the firmware to set it in NPCX9 series. This commit adds a new DT node to record variants in its properties. NPCX drivers can understand if they need to configure the related setting by checking the node's properties. Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
This commit is contained in:
parent
b3bf6d854e
commit
b804956a7d
|
@ -671,6 +671,10 @@
|
|||
compatible = "nuvoton,npcx-soc-id";
|
||||
family-id = <0x20>;
|
||||
};
|
||||
|
||||
booter-variant {
|
||||
compatible = "nuvoton,npcx-booter-variant";
|
||||
};
|
||||
};
|
||||
|
||||
&nvic {
|
||||
|
|
|
@ -202,4 +202,8 @@
|
|||
chip-id = <0x07>;
|
||||
revision-reg = <0x00007FFC 1>;
|
||||
};
|
||||
|
||||
booter-variant {
|
||||
hif-type-auto;
|
||||
};
|
||||
};
|
||||
|
|
14
dts/bindings/misc/nuvoton,npcx-booter-variant.yaml
Normal file
14
dts/bindings/misc/nuvoton,npcx-booter-variant.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Copyright (c) 2021 Nuvoton Technology Corporation.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
description: Nuvoton, NPCX booter variant options
|
||||
|
||||
compatible: "nuvoton,npcx-booter-variant"
|
||||
|
||||
properties:
|
||||
hif-type-auto:
|
||||
type: boolean
|
||||
required: false
|
||||
description: |
|
||||
The host interface type (LPC/eSPI/SHI) is configured by booter
|
||||
if true; otherwise, it should be configured by the firmware.
|
|
@ -705,4 +705,14 @@
|
|||
#define NPCX_DT_PSL_OUT_PIN(inst) DT_PROP(DT_INST(inst, nuvoton_npcx_psl_out), \
|
||||
pin)
|
||||
|
||||
/**
|
||||
* @brief Check if the host interface type is automatically configured by
|
||||
* booter.
|
||||
*
|
||||
* @return TRUE - if the host interface is configured by booter,
|
||||
* FALSE - otherwise.
|
||||
*/
|
||||
#define NPCX_BOOTER_IS_HIF_TYPE_SET() \
|
||||
DT_PROP(DT_PATH(booter_variant), hif_type_auto)
|
||||
|
||||
#endif /* _NUVOTON_NPCX_SOC_DT_H_ */
|
||||
|
|
Loading…
Reference in a new issue