diff --git a/meta-facebook/yv4-sd/boards/ast1030_evb.overlay b/meta-facebook/yv4-sd/boards/ast1030_evb.overlay index 6947e6009f..f35f598e8c 100644 --- a/meta-facebook/yv4-sd/boards/ast1030_evb.overlay +++ b/meta-facebook/yv4-sd/boards/ast1030_evb.overlay @@ -224,3 +224,8 @@ dma-mode; dma-ringbuf-size = <0x4000>; }; + +&kcs3 { + status = "okay"; + addr = <0xca2>; +}; \ No newline at end of file diff --git a/meta-facebook/yv4-sd/src/platform/plat_init.c b/meta-facebook/yv4-sd/src/platform/plat_init.c index d075ae1217..0f2a62fbfe 100644 --- a/meta-facebook/yv4-sd/src/platform/plat_init.c +++ b/meta-facebook/yv4-sd/src/platform/plat_init.c @@ -34,6 +34,7 @@ #include "plat_class.h" #include "plat_i3c.h" #include "pcc.h" +#include "plat_kcs.h" SCU_CFG scu_cfg[] = { //register value @@ -88,6 +89,7 @@ void pal_post_init() { plat_mctp_init(); pcc_init(); + kcs_init(); pldm_load_state_effecter_table(PLAT_PLDM_MAX_STATE_EFFECTER_IDX); pldm_assign_gpio_effecter_id(PLAT_EFFECTER_ID_GPIO_HIGH_BYTE); } diff --git a/meta-facebook/yv4-sd/src/platform/plat_kcs.c b/meta-facebook/yv4-sd/src/platform/plat_kcs.c new file mode 100644 index 0000000000..4618d70bc1 --- /dev/null +++ b/meta-facebook/yv4-sd/src/platform/plat_kcs.c @@ -0,0 +1,24 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "plat_kcs.h" +#include "kcs.h" + +void kcs_init(void) +{ + char *kcs_config[] = { "KCS3" }; + kcs_device_init(kcs_config, ARRAY_SIZE(kcs_config)); +} diff --git a/meta-facebook/yv4-sd/src/platform/plat_kcs.h b/meta-facebook/yv4-sd/src/platform/plat_kcs.h new file mode 100644 index 0000000000..4b24cc108d --- /dev/null +++ b/meta-facebook/yv4-sd/src/platform/plat_kcs.h @@ -0,0 +1,22 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef PLAT_KCS_H +#define PLAT_KCS_H + +void kcs_init(void); + +#endif