diff --git a/boards/arm/scsat1_adcs/Kconfig.defconfig b/boards/sc/scsat1_adcs/Kconfig.defconfig similarity index 87% rename from boards/arm/scsat1_adcs/Kconfig.defconfig rename to boards/sc/scsat1_adcs/Kconfig.defconfig index 0e127782..7c824d5f 100644 --- a/boards/arm/scsat1_adcs/Kconfig.defconfig +++ b/boards/sc/scsat1_adcs/Kconfig.defconfig @@ -5,9 +5,6 @@ if BOARD_SCSAT1_ADCS -config BOARD - default "scsat1_adcs" - config CPU_CORTEX_M_HAS_SYSTICK default y diff --git a/boards/arm/scsat1_adcs/Kconfig.board b/boards/sc/scsat1_adcs/Kconfig.scsat1_adcs similarity index 50% rename from boards/arm/scsat1_adcs/Kconfig.board rename to boards/sc/scsat1_adcs/Kconfig.scsat1_adcs index 92f0ecdd..27d638c2 100644 --- a/boards/arm/scsat1_adcs/Kconfig.board +++ b/boards/sc/scsat1_adcs/Kconfig.scsat1_adcs @@ -1,8 +1,5 @@ -# SC-Sat1 ADCS Board configuration - # Copyright (c) 2023 Space Cubics, LLC. # SPDX-License-Identifier: Apache-2.0 config BOARD_SCSAT1_ADCS - bool "SC-Sat1 ADCS Board" - depends on SOC_SERIES_ARM_DESIGNSTART + select SOC_DESIGNSTART_FPGA_CORTEX_M3 diff --git a/boards/arm/scsat1_adcs/board.cmake b/boards/sc/scsat1_adcs/board.cmake similarity index 100% rename from boards/arm/scsat1_adcs/board.cmake rename to boards/sc/scsat1_adcs/board.cmake diff --git a/boards/sc/scsat1_adcs/board.yml b/boards/sc/scsat1_adcs/board.yml new file mode 100644 index 00000000..18a9748e --- /dev/null +++ b/boards/sc/scsat1_adcs/board.yml @@ -0,0 +1,5 @@ +board: + name: scsat1_adcs + vendor: sc + socs: + - name: designstart_fpga_cortex_m3 diff --git a/boards/arm/scsat1_adcs/dts/bindings/sc,hrmem.yaml b/boards/sc/scsat1_adcs/dts/bindings/sc,hrmem.yaml similarity index 100% rename from boards/arm/scsat1_adcs/dts/bindings/sc,hrmem.yaml rename to boards/sc/scsat1_adcs/dts/bindings/sc,hrmem.yaml diff --git a/boards/arm/scsat1_adcs/scsat1_adcs.dts b/boards/sc/scsat1_adcs/scsat1_adcs.dts similarity index 100% rename from boards/arm/scsat1_adcs/scsat1_adcs.dts rename to boards/sc/scsat1_adcs/scsat1_adcs.dts diff --git a/boards/arm/scsat1_adcs/scsat1_adcs.yaml b/boards/sc/scsat1_adcs/scsat1_adcs.yaml similarity index 100% rename from boards/arm/scsat1_adcs/scsat1_adcs.yaml rename to boards/sc/scsat1_adcs/scsat1_adcs.yaml diff --git a/boards/arm/scsat1_adcs/scsat1_adcs_defconfig b/boards/sc/scsat1_adcs/scsat1_adcs_defconfig similarity index 72% rename from boards/arm/scsat1_adcs/scsat1_adcs_defconfig rename to boards/sc/scsat1_adcs/scsat1_adcs_defconfig index fcbe374b..f74c97f4 100644 --- a/boards/arm/scsat1_adcs/scsat1_adcs_defconfig +++ b/boards/sc/scsat1_adcs/scsat1_adcs_defconfig @@ -1,8 +1,5 @@ # SPDX-License-Identifier: Apache-2.0 -CONFIG_SOC_SERIES_ARM_DESIGNSTART=y -CONFIG_SOC_ARM_DESIGNSTART_FPGA_CORTEX_M3=y -CONFIG_BOARD_SCSAT1_ADCS=y CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=48000000 CONFIG_ARM_MPU=n diff --git a/boards/arm/scsat1_adcs/support/akizuki-m-02990.cfg b/boards/sc/scsat1_adcs/support/akizuki-m-02990.cfg similarity index 100% rename from boards/arm/scsat1_adcs/support/akizuki-m-02990.cfg rename to boards/sc/scsat1_adcs/support/akizuki-m-02990.cfg diff --git a/boards/arm/scsat1_adcs/support/openocd-ft232r.cfg b/boards/sc/scsat1_adcs/support/openocd-ft232r.cfg similarity index 100% rename from boards/arm/scsat1_adcs/support/openocd-ft232r.cfg rename to boards/sc/scsat1_adcs/support/openocd-ft232r.cfg diff --git a/boards/arm/scsat1_adcs/support/openocd-ftdi.cfg b/boards/sc/scsat1_adcs/support/openocd-ftdi.cfg similarity index 100% rename from boards/arm/scsat1_adcs/support/openocd-ftdi.cfg rename to boards/sc/scsat1_adcs/support/openocd-ftdi.cfg diff --git a/boards/arm/scsat1_adcs/support/openocd.cfg b/boards/sc/scsat1_adcs/support/openocd.cfg similarity index 100% rename from boards/arm/scsat1_adcs/support/openocd.cfg rename to boards/sc/scsat1_adcs/support/openocd.cfg diff --git a/boards/arm/scsat1_adcs/support/scobc-module1.cfg b/boards/sc/scsat1_adcs/support/scobc-module1.cfg similarity index 100% rename from boards/arm/scsat1_adcs/support/scobc-module1.cfg rename to boards/sc/scsat1_adcs/support/scobc-module1.cfg diff --git a/boards/arm/scsat1_main/Kconfig.defconfig b/boards/sc/scsat1_main/Kconfig.defconfig similarity index 87% rename from boards/arm/scsat1_main/Kconfig.defconfig rename to boards/sc/scsat1_main/Kconfig.defconfig index d2d2c00f..9db0eb52 100644 --- a/boards/arm/scsat1_main/Kconfig.defconfig +++ b/boards/sc/scsat1_main/Kconfig.defconfig @@ -5,9 +5,6 @@ if BOARD_SCSAT1_MAIN -config BOARD - default "scsat1_main" - config CPU_CORTEX_M_HAS_SYSTICK default y diff --git a/boards/arm/scsat1_main/Kconfig.board b/boards/sc/scsat1_main/Kconfig.scsat1_main similarity index 50% rename from boards/arm/scsat1_main/Kconfig.board rename to boards/sc/scsat1_main/Kconfig.scsat1_main index 49697d2c..920afbf8 100644 --- a/boards/arm/scsat1_main/Kconfig.board +++ b/boards/sc/scsat1_main/Kconfig.scsat1_main @@ -1,8 +1,5 @@ -# SC-Sat1 MAIN Board configuration - # Copyright (c) 2023 Space Cubics, LLC. # SPDX-License-Identifier: Apache-2.0 config BOARD_SCSAT1_MAIN - bool "SC-Sat1 MAIN Board" - depends on SOC_SERIES_ARM_DESIGNSTART + select SOC_DESIGNSTART_FPGA_CORTEX_M3 diff --git a/boards/arm/scsat1_main/board.cmake b/boards/sc/scsat1_main/board.cmake similarity index 100% rename from boards/arm/scsat1_main/board.cmake rename to boards/sc/scsat1_main/board.cmake diff --git a/boards/sc/scsat1_main/board.yml b/boards/sc/scsat1_main/board.yml new file mode 100644 index 00000000..571d70c9 --- /dev/null +++ b/boards/sc/scsat1_main/board.yml @@ -0,0 +1,5 @@ +board: + name: scsat1_main + vendor: sc + socs: + - name: designstart_fpga_cortex_m3 diff --git a/boards/arm/scsat1_main/dts/bindings/sc,dstrx3.yaml b/boards/sc/scsat1_main/dts/bindings/sc,dstrx3.yaml similarity index 100% rename from boards/arm/scsat1_main/dts/bindings/sc,dstrx3.yaml rename to boards/sc/scsat1_main/dts/bindings/sc,dstrx3.yaml diff --git a/boards/arm/scsat1_main/dts/bindings/sc,hrmem.yaml b/boards/sc/scsat1_main/dts/bindings/sc,hrmem.yaml similarity index 100% rename from boards/arm/scsat1_main/dts/bindings/sc,hrmem.yaml rename to boards/sc/scsat1_main/dts/bindings/sc,hrmem.yaml diff --git a/boards/arm/scsat1_main/scsat1_main.dts b/boards/sc/scsat1_main/scsat1_main.dts similarity index 100% rename from boards/arm/scsat1_main/scsat1_main.dts rename to boards/sc/scsat1_main/scsat1_main.dts diff --git a/boards/arm/scsat1_main/scsat1_main.yaml b/boards/sc/scsat1_main/scsat1_main.yaml similarity index 100% rename from boards/arm/scsat1_main/scsat1_main.yaml rename to boards/sc/scsat1_main/scsat1_main.yaml diff --git a/boards/arm/scsat1_main/scsat1_main_defconfig b/boards/sc/scsat1_main/scsat1_main_defconfig similarity index 72% rename from boards/arm/scsat1_main/scsat1_main_defconfig rename to boards/sc/scsat1_main/scsat1_main_defconfig index 88993489..f74c97f4 100644 --- a/boards/arm/scsat1_main/scsat1_main_defconfig +++ b/boards/sc/scsat1_main/scsat1_main_defconfig @@ -1,8 +1,5 @@ # SPDX-License-Identifier: Apache-2.0 -CONFIG_SOC_SERIES_ARM_DESIGNSTART=y -CONFIG_SOC_ARM_DESIGNSTART_FPGA_CORTEX_M3=y -CONFIG_BOARD_SCSAT1_MAIN=y CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=48000000 CONFIG_ARM_MPU=n diff --git a/boards/arm/scsat1_main/support/akizuki-m-02990.cfg b/boards/sc/scsat1_main/support/akizuki-m-02990.cfg similarity index 100% rename from boards/arm/scsat1_main/support/akizuki-m-02990.cfg rename to boards/sc/scsat1_main/support/akizuki-m-02990.cfg diff --git a/boards/arm/scsat1_main/support/openocd-ft232r.cfg b/boards/sc/scsat1_main/support/openocd-ft232r.cfg similarity index 100% rename from boards/arm/scsat1_main/support/openocd-ft232r.cfg rename to boards/sc/scsat1_main/support/openocd-ft232r.cfg diff --git a/boards/arm/scsat1_main/support/openocd-ftdi.cfg b/boards/sc/scsat1_main/support/openocd-ftdi.cfg similarity index 100% rename from boards/arm/scsat1_main/support/openocd-ftdi.cfg rename to boards/sc/scsat1_main/support/openocd-ftdi.cfg diff --git a/boards/arm/scsat1_main/support/openocd.cfg b/boards/sc/scsat1_main/support/openocd.cfg similarity index 100% rename from boards/arm/scsat1_main/support/openocd.cfg rename to boards/sc/scsat1_main/support/openocd.cfg diff --git a/boards/arm/scsat1_main/support/scobc-module1.cfg b/boards/sc/scsat1_main/support/scobc-module1.cfg similarity index 100% rename from boards/arm/scsat1_main/support/scobc-module1.cfg rename to boards/sc/scsat1_main/support/scobc-module1.cfg diff --git a/west.yml b/west.yml index a7e35e9e..305bb83c 100644 --- a/west.yml +++ b/west.yml @@ -3,7 +3,7 @@ manifest: projects: - name: zephyr url: https://github.com/zephyrproject-rtos/zephyr - revision: v3.6.0 + revision: v3.7-branch path: zephyr west-commands: scripts/west-commands.yml import: diff --git a/zephyr/drivers/can/can_sccan.c b/zephyr/drivers/can/can_sccan.c index 55a43bbd..31a5ad8d 100644 --- a/zephyr/drivers/can/can_sccan.c +++ b/zephyr/drivers/can/can_sccan.c @@ -883,7 +883,7 @@ static void sc_can_set_state_change_callback(const struct device *dev, data->common.state_change_cb_user_data = user_data; } -#ifndef CONFIG_CAN_AUTO_BUS_OFF_RECOVERY +#ifdef CONFIG_CAN_MANUAL_RECOVERY_MODE static int sc_can_recover(const struct device *dev, k_timeout_t timeout) { const struct sc_can_cfg *config = dev->config; @@ -1050,7 +1050,7 @@ static int sc_can_init(const struct device *dev) uint32_t v; /* Set timing according to dts default setting */ - ret = can_calc_timing(dev, &timing, config->common.bus_speed, config->common.sample_point); + ret = can_calc_timing(dev, &timing, config->common.bitrate, config->common.sample_point); if (ret == -EINVAL) { LOG_ERR("Can't find timing for given param"); return -EIO; @@ -1102,7 +1102,7 @@ static const struct can_driver_api sc_can_driver_api = { .add_rx_filter = sc_can_add_rx_filter, .remove_rx_filter = sc_can_remove_rx_filter, .get_state = sc_can_get_state, -#ifndef CONFIG_CAN_AUTO_BUS_OFF_RECOVERY +#ifdef CONFIG_CAN_MANUAL_RECOVERY_MODE .recover = sc_can_recover, #endif .set_state_change_callback = sc_can_set_state_change_callback, @@ -1153,7 +1153,7 @@ static const struct can_driver_api sc_can_driver_api = { static struct sc_can_tx_cb_data tx_cb_data_list_##n[DT_INST_PROP(n, tx_fifo_depth)]; \ static struct sc_can_rx_filters rx_filters_##n[DT_INST_PROP(n, max_filter)]; \ static const struct sc_can_cfg sc_can_cfg_##n = { \ - .common = CAN_DT_DRIVER_CONFIG_INST_GET(n, 1000000), \ + .common = CAN_DT_DRIVER_CONFIG_INST_GET(n, 0, 1000000), \ .reg_addr = DT_INST_REG_ADDR(n), \ .irq_init = sc_can_##n##_irq_init, \ .clock_frequency = DT_INST_PROP(n, clock_frequency), \