Skip to content

Commit 2020290

Browse files
ananglgalak
authored andcommitted
dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig
These changes were obtained by running a script created by Ulf Magnusson <[email protected]> for the following specification: 1. Read the contents of all dts_fixup.h files in Zephyr 2. Check the left-hand side of the #define macros (i.e. the X in #define X Y) 3. Check if that name is also the name of a Kconfig option 3.a If it is, then do nothing 3.b If it is not, then replace CONFIG_ with DT_ or add DT_ if it has neither of these two prefixes 4. Replace the use of the changed #define in the code itself (.c, .h, .ld) Additionally, some tweaks had to be added to this script to catch some of the macros used in the code in a parameterized form, e.g.: - CONFIG_GPIO_STM32_GPIO##__SUFFIX##_BASE_ADDRESS - CONFIG_UART_##idx##_TX_PIN - I2C_SBCON_##_num##_BASE_ADDR and to prevent adding DT_ prefix to the following symbols: - FLASH_START - FLASH_SIZE - SRAM_START - SRAM_SIZE - _ROM_ADDR - _ROM_SIZE - _RAM_ADDR - _RAM_SIZE which are surprisingly also defined in some dts_fixup.h files. Finally, some manual corrections had to be done as well: - name##_IRQ -> DT_##name##_IRQ in uart_stm32.c Signed-off-by: Andrzej Głąbek <[email protected]>
1 parent d4a17b4 commit 2020290

File tree

304 files changed

+5335
-5335
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

304 files changed

+5335
-5335
lines changed

arch/arm/core/irq_manage.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ void _irq_priority_set(unsigned int irq, unsigned int prio, u32_t flags)
108108
* affecting performance (can still be useful on systems with a
109109
* reduced set of priorities, like Cortex-M0/M0+).
110110
*/
111-
__ASSERT(prio <= ((1 << CONFIG_NUM_IRQ_PRIO_BITS) - 1),
111+
__ASSERT(prio <= ((1 << DT_NUM_IRQ_PRIO_BITS) - 1),
112112
"invalid priority %d! values must be less than %d\n",
113113
prio - _IRQ_PRIO_OFFSET,
114-
(1 << CONFIG_NUM_IRQ_PRIO_BITS) - (_IRQ_PRIO_OFFSET));
114+
(1 << DT_NUM_IRQ_PRIO_BITS) - (_IRQ_PRIO_OFFSET));
115115
NVIC_SetPriority((IRQn_Type)irq, prio);
116116
}
117117

boards/arc/arduino_101_sss/dts_fixup.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
#define CONFIG_BMI160_SLAVE DT_SNPS_DESIGNWARE_SPI_80010100_BOSCH_BMI160_1_BASE_ADDRESS
8-
#define CONFIG_BMI160_SPI_PORT_NAME DT_SNPS_DESIGNWARE_SPI_80010100_BOSCH_BMI160_1_BUS_NAME
9-
#define CONFIG_BMI160_GPIO_DEV_NAME DT_SNPS_DESIGNWARE_SPI_80010100_BOSCH_BMI160_1_INT_GPIOS_CONTROLLER
10-
#define CONFIG_BMI160_GPIO_PIN_NUM DT_SNPS_DESIGNWARE_SPI_80010100_BOSCH_BMI160_1_INT_GPIOS_PIN
11-
#define CONFIG_BMI160_NAME DT_SNPS_DESIGNWARE_SPI_80010100_BOSCH_BMI160_1_LABEL
12-
#define CONFIG_BMI160_SPI_BUS_FREQ DT_SNPS_DESIGNWARE_SPI_80010100_BOSCH_BMI160_1_SPI_MAX_FREQUENCY
7+
#define DT_BMI160_SLAVE DT_SNPS_DESIGNWARE_SPI_80010100_BOSCH_BMI160_1_BASE_ADDRESS
8+
#define DT_BMI160_SPI_PORT_NAME DT_SNPS_DESIGNWARE_SPI_80010100_BOSCH_BMI160_1_BUS_NAME
9+
#define DT_BMI160_GPIO_DEV_NAME DT_SNPS_DESIGNWARE_SPI_80010100_BOSCH_BMI160_1_INT_GPIOS_CONTROLLER
10+
#define DT_BMI160_GPIO_PIN_NUM DT_SNPS_DESIGNWARE_SPI_80010100_BOSCH_BMI160_1_INT_GPIOS_PIN
11+
#define DT_BMI160_NAME DT_SNPS_DESIGNWARE_SPI_80010100_BOSCH_BMI160_1_LABEL
12+
#define DT_BMI160_SPI_BUS_FREQ DT_SNPS_DESIGNWARE_SPI_80010100_BOSCH_BMI160_1_SPI_MAX_FREQUENCY
1313

boards/arc/em_starterkit/arc_mpu_regions.c

+12-12
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@ static struct arc_mpu_region mpu_regions[] = {
2727
AUX_MPU_RDP_KW | AUX_MPU_RDP_KR),
2828

2929
#else
30-
#if CONFIG_ICCM_SIZE > 0
30+
#if DT_ICCM_SIZE > 0
3131
/* Region ICCM */
3232
MPU_REGION_ENTRY("ICCM",
33-
CONFIG_ICCM_BASE_ADDRESS,
34-
CONFIG_ICCM_SIZE * 1024,
33+
DT_ICCM_BASE_ADDRESS,
34+
DT_ICCM_SIZE * 1024,
3535
REGION_FLASH_ATTR),
3636
#endif
37-
#if CONFIG_DCCM_SIZE > 0
37+
#if DT_DCCM_SIZE > 0
3838
/* Region DCCM */
3939
MPU_REGION_ENTRY("DCCM",
40-
CONFIG_DCCM_BASE_ADDRESS,
41-
CONFIG_DCCM_SIZE * 1024,
40+
DT_DCCM_BASE_ADDRESS,
41+
DT_DCCM_SIZE * 1024,
4242
AUX_MPU_RDP_KW | AUX_MPU_RDP_KR),
4343
#endif
4444
#if CONFIG_SRAM_SIZE > 0
@@ -58,18 +58,18 @@ static struct arc_mpu_region mpu_regions[] = {
5858
};
5959
#else /* CONFIG_USERSPACE */
6060
static struct arc_mpu_region mpu_regions[] = {
61-
#if CONFIG_ICCM_SIZE > 0
61+
#if DT_ICCM_SIZE > 0
6262
/* Region ICCM */
6363
MPU_REGION_ENTRY("ICCM",
64-
CONFIG_ICCM_BASE_ADDRESS,
65-
CONFIG_ICCM_SIZE * 1024,
64+
DT_ICCM_BASE_ADDRESS,
65+
DT_ICCM_SIZE * 1024,
6666
REGION_FLASH_ATTR),
6767
#endif
68-
#if CONFIG_DCCM_SIZE > 0
68+
#if DT_DCCM_SIZE > 0
6969
/* Region DCCM */
7070
MPU_REGION_ENTRY("DCCM",
71-
CONFIG_DCCM_BASE_ADDRESS,
72-
CONFIG_DCCM_SIZE * 1024,
71+
DT_DCCM_BASE_ADDRESS,
72+
DT_DCCM_SIZE * 1024,
7373
REGION_RAM_ATTR),
7474
#endif
7575
#if CONFIG_SRAM_SIZE > 0

boards/arc/nsim_em/arc_mpu_regions.c

+12-12
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@ static struct arc_mpu_region mpu_regions[] = {
2727
AUX_MPU_RDP_KW | AUX_MPU_RDP_KR),
2828

2929
#else
30-
#if CONFIG_ICCM_SIZE > 0
30+
#if DT_ICCM_SIZE > 0
3131
/* Region ICCM */
3232
MPU_REGION_ENTRY("ICCM",
33-
CONFIG_ICCM_BASE_ADDRESS,
34-
CONFIG_ICCM_SIZE * 1024,
33+
DT_ICCM_BASE_ADDRESS,
34+
DT_ICCM_SIZE * 1024,
3535
REGION_FLASH_ATTR),
3636
#endif
37-
#if CONFIG_DCCM_SIZE > 0
37+
#if DT_DCCM_SIZE > 0
3838
/* Region DCCM */
3939
MPU_REGION_ENTRY("DCCM",
40-
CONFIG_DCCM_BASE_ADDRESS,
41-
CONFIG_DCCM_SIZE * 1024,
40+
DT_DCCM_BASE_ADDRESS,
41+
DT_DCCM_SIZE * 1024,
4242
AUX_MPU_RDP_KW | AUX_MPU_RDP_KR),
4343
#endif
4444
#endif /* ARC_MPU_VER == 3 */
@@ -50,18 +50,18 @@ static struct arc_mpu_region mpu_regions[] = {
5050
};
5151
#else /* CONFIG_USERSPACE */
5252
static struct arc_mpu_region mpu_regions[] = {
53-
#if CONFIG_ICCM_SIZE > 0
53+
#if DT_ICCM_SIZE > 0
5454
/* Region ICCM */
5555
MPU_REGION_ENTRY("ICCM",
56-
CONFIG_ICCM_BASE_ADDRESS,
57-
CONFIG_ICCM_SIZE * 1024,
56+
DT_ICCM_BASE_ADDRESS,
57+
DT_ICCM_SIZE * 1024,
5858
REGION_FLASH_ATTR),
5959
#endif
60-
#if CONFIG_DCCM_SIZE > 0
60+
#if DT_DCCM_SIZE > 0
6161
/* Region DCCM */
6262
MPU_REGION_ENTRY("DCCM",
63-
CONFIG_DCCM_BASE_ADDRESS,
64-
CONFIG_DCCM_SIZE * 1024,
63+
DT_DCCM_BASE_ADDRESS,
64+
DT_DCCM_SIZE * 1024,
6565
REGION_RAM_ATTR),
6666
#endif
6767
/* Region Peripheral */

boards/arm/96b_argonkey/dts_fixup.h

+14-14
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@
99
* generated data matches the driver definitions.
1010
*/
1111

12-
#define CONFIG_HTS221_NAME DT_ST_STM32_I2C_V1_40005800_ST_HTS221_5F_LABEL
13-
#define CONFIG_HTS221_I2C_MASTER_DEV_NAME DT_ST_STM32_I2C_V1_40005800_ST_HTS221_5F_BUS_NAME
12+
#define DT_HTS221_NAME DT_ST_STM32_I2C_V1_40005800_ST_HTS221_5F_LABEL
13+
#define DT_HTS221_I2C_MASTER_DEV_NAME DT_ST_STM32_I2C_V1_40005800_ST_HTS221_5F_BUS_NAME
1414

15-
#define CONFIG_LPS22HB_DEV_NAME DT_ST_STM32_I2C_V1_40005800_ST_LPS22HB_PRESS_5D_LABEL
16-
#define CONFIG_LPS22HB_I2C_ADDR DT_ST_STM32_I2C_V1_40005800_ST_LPS22HB_PRESS_5D_BASE_ADDRESS
17-
#define CONFIG_LPS22HB_I2C_MASTER_DEV_NAME DT_ST_STM32_I2C_V1_40005800_ST_LPS22HB_PRESS_5D_BUS_NAME
15+
#define DT_LPS22HB_DEV_NAME DT_ST_STM32_I2C_V1_40005800_ST_LPS22HB_PRESS_5D_LABEL
16+
#define DT_LPS22HB_I2C_ADDR DT_ST_STM32_I2C_V1_40005800_ST_LPS22HB_PRESS_5D_BASE_ADDRESS
17+
#define DT_LPS22HB_I2C_MASTER_DEV_NAME DT_ST_STM32_I2C_V1_40005800_ST_LPS22HB_PRESS_5D_BUS_NAME
1818

19-
#define CONFIG_VL53L0X_NAME DT_ST_STM32_I2C_V1_40005800_ST_VL53L0X_29_LABEL
20-
#define CONFIG_VL53L0X_I2C_ADDR DT_ST_STM32_I2C_V1_40005800_ST_VL53L0X_29_BASE_ADDRESS
21-
#define CONFIG_VL53L0X_I2C_MASTER_DEV_NAME DT_ST_STM32_I2C_V1_40005800_ST_VL53L0X_29_BUS_NAME
19+
#define DT_VL53L0X_NAME DT_ST_STM32_I2C_V1_40005800_ST_VL53L0X_29_LABEL
20+
#define DT_VL53L0X_I2C_ADDR DT_ST_STM32_I2C_V1_40005800_ST_VL53L0X_29_BASE_ADDRESS
21+
#define DT_VL53L0X_I2C_MASTER_DEV_NAME DT_ST_STM32_I2C_V1_40005800_ST_VL53L0X_29_BUS_NAME
2222

23-
#define CONFIG_LSM6DSL_DEV_NAME DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_LABEL
24-
#define CONFIG_LSM6DSL_SPI_SELECT_SLAVE DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_BASE_ADDRESS
25-
#define CONFIG_LSM6DSL_SPI_MASTER_DEV_NAME DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_BUS_NAME
26-
#define CONFIG_LSM6DSL_SPI_BUS_FREQ DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_SPI_MAX_FREQUENCY
27-
#define CONFIG_LSM6DSL_GPIO_DEV_NAME DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_IRQ_GPIOS_CONTROLLER
28-
#define CONFIG_LSM6DSL_GPIO_PIN_NUM DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_IRQ_GPIOS_PIN
23+
#define DT_LSM6DSL_DEV_NAME DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_LABEL
24+
#define DT_LSM6DSL_SPI_SELECT_SLAVE DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_BASE_ADDRESS
25+
#define DT_LSM6DSL_SPI_MASTER_DEV_NAME DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_BUS_NAME
26+
#define DT_LSM6DSL_SPI_BUS_FREQ DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_SPI_MAX_FREQUENCY
27+
#define DT_LSM6DSL_GPIO_DEV_NAME DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_IRQ_GPIOS_CONTROLLER
28+
#define DT_LSM6DSL_GPIO_PIN_NUM DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_IRQ_GPIOS_PIN
2929

3030
#define CONFIG_LP3943_DEV_NAME DT_ST_STM32_I2C_V1_40005C00_TI_LP3943_60_LABEL
3131
#define CONFIG_LP3943_I2C_ADDRESS DT_ST_STM32_I2C_V1_40005C00_TI_LP3943_60_BASE_ADDRESS

boards/arm/adafruit_feather_m0_basic_proto/pinmux.c

+15-15
Original file line numberDiff line numberDiff line change
@@ -9,54 +9,54 @@
99

1010
static int board_pinmux_init(struct device *dev)
1111
{
12-
struct device *muxa = device_get_binding(CONFIG_PINMUX_SAM0_A_LABEL);
13-
#if CONFIG_SPI_SAM0_SERCOM4_BASE_ADDRESS
14-
struct device *muxb = device_get_binding(CONFIG_PINMUX_SAM0_B_LABEL);
12+
struct device *muxa = device_get_binding(DT_PINMUX_SAM0_A_LABEL);
13+
#if DT_SPI_SAM0_SERCOM4_BASE_ADDRESS
14+
struct device *muxb = device_get_binding(DT_PINMUX_SAM0_B_LABEL);
1515
#endif
1616
ARG_UNUSED(dev);
1717

18-
#if CONFIG_UART_SAM0_SERCOM0_BASE_ADDRESS
18+
#if DT_UART_SAM0_SERCOM0_BASE_ADDRESS
1919
/* SERCOM0 on RX=PA11/pad 3, TX=PA10/pad 2 */
2020
pinmux_pin_set(muxa, 11, PINMUX_FUNC_C);
2121
pinmux_pin_set(muxa, 10, PINMUX_FUNC_C);
2222
#endif
2323

24-
#if CONFIG_UART_SAM0_SERCOM1_BASE_ADDRESS
24+
#if DT_UART_SAM0_SERCOM1_BASE_ADDRESS
2525
#error Pin mapping is not configured
2626
#endif
27-
#if CONFIG_UART_SAM0_SERCOM2_BASE_ADDRESS
27+
#if DT_UART_SAM0_SERCOM2_BASE_ADDRESS
2828
#error Pin mapping is not configured
2929
#endif
30-
#if CONFIG_UART_SAM0_SERCOM3_BASE_ADDRESS
30+
#if DT_UART_SAM0_SERCOM3_BASE_ADDRESS
3131
#error Pin mapping is not configured
3232
#endif
33-
#if CONFIG_UART_SAM0_SERCOM4_BASE_ADDRESS
33+
#if DT_UART_SAM0_SERCOM4_BASE_ADDRESS
3434
#error Pin mapping is not configured
3535
#endif
36-
#if CONFIG_UART_SAM0_SERCOM5_BASE_ADDRESS
36+
#if DT_UART_SAM0_SERCOM5_BASE_ADDRESS
3737
#error Pin mapping is not configured
3838
#endif
3939

40-
#if CONFIG_SPI_SAM0_SERCOM4_BASE_ADDRESS
40+
#if DT_SPI_SAM0_SERCOM4_BASE_ADDRESS
4141
/* SPI SERCOM4 on MISO=PA12/pad 0, MOSI=PB10/pad 2, SCK=PB11/pad 3 */
4242
pinmux_pin_set(muxa, 12, PINMUX_FUNC_D);
4343
pinmux_pin_set(muxb, 10, PINMUX_FUNC_D);
4444
pinmux_pin_set(muxb, 11, PINMUX_FUNC_D);
4545
#endif
4646

47-
#if CONFIG_SPI_SAM0_SERCOM0_BASE_ADDRESS
47+
#if DT_SPI_SAM0_SERCOM0_BASE_ADDRESS
4848
#error Pin mapping is not configured
4949
#endif
50-
#if CONFIG_SPI_SAM0_SERCOM1_BASE_ADDRESS
50+
#if DT_SPI_SAM0_SERCOM1_BASE_ADDRESS
5151
#error Pin mapping is not configured
5252
#endif
53-
#if CONFIG_SPI_SAM0_SERCOM2_BASE_ADDRESS
53+
#if DT_SPI_SAM0_SERCOM2_BASE_ADDRESS
5454
#error Pin mapping is not configured
5555
#endif
56-
#if CONFIG_SPI_SAM0_SERCOM3_BASE_ADDRESS
56+
#if DT_SPI_SAM0_SERCOM3_BASE_ADDRESS
5757
#error Pin mapping is not configured
5858
#endif
59-
#if CONFIG_SPI_SAM0_SERCOM5_BASE_ADDRESS
59+
#if DT_SPI_SAM0_SERCOM5_BASE_ADDRESS
6060
#error Pin mapping is not configured
6161
#endif
6262

boards/arm/adafruit_trinket_m0/pinmux.c

+13-13
Original file line numberDiff line numberDiff line change
@@ -9,58 +9,58 @@
99

1010
static int board_pinmux_init(struct device *dev)
1111
{
12-
struct device *muxa = device_get_binding(CONFIG_PINMUX_SAM0_A_LABEL);
12+
struct device *muxa = device_get_binding(DT_PINMUX_SAM0_A_LABEL);
1313

1414
ARG_UNUSED(dev);
1515

16-
#if CONFIG_UART_SAM0_SERCOM0_BASE_ADDRESS
16+
#if DT_UART_SAM0_SERCOM0_BASE_ADDRESS
1717
/* SERCOM0 on RX=PA7/pad 3, TX=PA6/pad 2 */
1818
pinmux_pin_set(muxa, 7, PINMUX_FUNC_D);
1919
pinmux_pin_set(muxa, 6, PINMUX_FUNC_D);
2020
#endif
2121

22-
#if CONFIG_UART_SAM0_SERCOM2_BASE_ADDRESS
22+
#if DT_UART_SAM0_SERCOM2_BASE_ADDRESS
2323
/* SERCOM2 on RX=PA9/pad 1, TX=PA8/pad 0 */
2424
pinmux_pin_set(muxa, 9, PINMUX_FUNC_D);
2525
pinmux_pin_set(muxa, 8, PINMUX_FUNC_D);
2626
#endif
2727

28-
#if CONFIG_UART_SAM0_SERCOM1_BASE_ADDRESS
28+
#if DT_UART_SAM0_SERCOM1_BASE_ADDRESS
2929
#error Pin mapping is not configured
3030
#endif
31-
#if CONFIG_UART_SAM0_SERCOM3_BASE_ADDRESS
31+
#if DT_UART_SAM0_SERCOM3_BASE_ADDRESS
3232
#error Pin mapping is not configured
3333
#endif
34-
#if CONFIG_UART_SAM0_SERCOM4_BASE_ADDRESS
34+
#if DT_UART_SAM0_SERCOM4_BASE_ADDRESS
3535
#error Pin mapping is not configured
3636
#endif
37-
#if CONFIG_UART_SAM0_SERCOM5_BASE_ADDRESS
37+
#if DT_UART_SAM0_SERCOM5_BASE_ADDRESS
3838
#error Pin mapping is not configured
3939
#endif
4040

41-
#if CONFIG_SPI_SAM0_SERCOM0_BASE_ADDRESS
41+
#if DT_SPI_SAM0_SERCOM0_BASE_ADDRESS
4242
/* SPI SERCOM0 on MISO=PA9/pad 1, MOSI=PA6/pad 2, SCK=PA7/pad 3 */
4343
pinmux_pin_set(muxa, 9, PINMUX_FUNC_D);
4444
pinmux_pin_set(muxa, 6, PINMUX_FUNC_D);
4545
pinmux_pin_set(muxa, 7, PINMUX_FUNC_D);
4646
#endif
4747

48-
#if CONFIG_SPI_SAM0_SERCOM1_BASE_ADDRESS
48+
#if DT_SPI_SAM0_SERCOM1_BASE_ADDRESS
4949
/* SPI SERCOM1 on MOSI=PA0/pad 0, SCK=PA1/pad 1 */
5050
pinmux_pin_set(muxa, 0, PINMUX_FUNC_D);
5151
pinmux_pin_set(muxa, 1, PINMUX_FUNC_D);
5252
#endif
5353

54-
#if CONFIG_SPI_SAM0_SERCOM2_BASE_ADDRESS
54+
#if DT_SPI_SAM0_SERCOM2_BASE_ADDRESS
5555
#error Pin mapping is not configured
5656
#endif
57-
#if CONFIG_SPI_SAM0_SERCOM3_BASE_ADDRESS
57+
#if DT_SPI_SAM0_SERCOM3_BASE_ADDRESS
5858
#error Pin mapping is not configured
5959
#endif
60-
#if CONFIG_SPI_SAM0_SERCOM4_BASE_ADDRESS
60+
#if DT_SPI_SAM0_SERCOM4_BASE_ADDRESS
6161
#error Pin mapping is not configured
6262
#endif
63-
#if CONFIG_SPI_SAM0_SERCOM5_BASE_ADDRESS
63+
#if DT_SPI_SAM0_SERCOM5_BASE_ADDRESS
6464
#error Pin mapping is not configured
6565
#endif
6666

boards/arm/arduino_zero/pinmux.c

+14-14
Original file line numberDiff line numberDiff line change
@@ -9,56 +9,56 @@
99

1010
static int board_pinmux_init(struct device *dev)
1111
{
12-
struct device *muxa = device_get_binding(CONFIG_PINMUX_SAM0_A_LABEL);
13-
struct device *muxb = device_get_binding(CONFIG_PINMUX_SAM0_B_LABEL);
12+
struct device *muxa = device_get_binding(DT_PINMUX_SAM0_A_LABEL);
13+
struct device *muxb = device_get_binding(DT_PINMUX_SAM0_B_LABEL);
1414

1515
ARG_UNUSED(dev);
1616

17-
#if CONFIG_UART_SAM0_SERCOM0_BASE_ADDRESS
17+
#if DT_UART_SAM0_SERCOM0_BASE_ADDRESS
1818
/* SERCOM0 on RX=PA11, TX=PA10 */
1919
pinmux_pin_set(muxa, 11, PINMUX_FUNC_C);
2020
pinmux_pin_set(muxa, 10, PINMUX_FUNC_C);
2121
#endif
2222

23-
#if CONFIG_UART_SAM0_SERCOM5_BASE_ADDRESS
23+
#if DT_UART_SAM0_SERCOM5_BASE_ADDRESS
2424
/* SERCOM5 on RX=PB23, TX=PB22 */
2525
pinmux_pin_set(muxb, 23, PINMUX_FUNC_D);
2626
pinmux_pin_set(muxb, 22, PINMUX_FUNC_D);
2727
#endif
2828

29-
#if CONFIG_UART_SAM0_SERCOM1_BASE_ADDRESS
29+
#if DT_UART_SAM0_SERCOM1_BASE_ADDRESS
3030
#error Pin mapping is not configured
3131
#endif
32-
#if CONFIG_UART_SAM0_SERCOM2_BASE_ADDRESS
32+
#if DT_UART_SAM0_SERCOM2_BASE_ADDRESS
3333
#error Pin mapping is not configured
3434
#endif
35-
#if CONFIG_UART_SAM0_SERCOM3_BASE_ADDRESS
35+
#if DT_UART_SAM0_SERCOM3_BASE_ADDRESS
3636
#error Pin mapping is not configured
3737
#endif
38-
#if CONFIG_UART_SAM0_SERCOM4_BASE_ADDRESS
38+
#if DT_UART_SAM0_SERCOM4_BASE_ADDRESS
3939
#error Pin mapping is not configured
4040
#endif
4141

42-
#if CONFIG_SPI_SAM0_SERCOM4_BASE_ADDRESS
42+
#if DT_SPI_SAM0_SERCOM4_BASE_ADDRESS
4343
/* SPI SERCOM4 on MISO=PA12/pad 0, MOSI=PB10/pad 2, SCK=PB11/pad 3 */
4444
pinmux_pin_set(muxa, 12, PINMUX_FUNC_D);
4545
pinmux_pin_set(muxb, 10, PINMUX_FUNC_D);
4646
pinmux_pin_set(muxb, 11, PINMUX_FUNC_D);
4747
#endif
4848

49-
#if CONFIG_SPI_SAM0_SERCOM0_BASE_ADDRESS
49+
#if DT_SPI_SAM0_SERCOM0_BASE_ADDRESS
5050
#error Pin mapping is not configured
5151
#endif
52-
#if CONFIG_SPI_SAM0_SERCOM1_BASE_ADDRESS
52+
#if DT_SPI_SAM0_SERCOM1_BASE_ADDRESS
5353
#error Pin mapping is not configured
5454
#endif
55-
#if CONFIG_SPI_SAM0_SERCOM2_BASE_ADDRESS
55+
#if DT_SPI_SAM0_SERCOM2_BASE_ADDRESS
5656
#error Pin mapping is not configured
5757
#endif
58-
#if CONFIG_SPI_SAM0_SERCOM3_BASE_ADDRESS
58+
#if DT_SPI_SAM0_SERCOM3_BASE_ADDRESS
5959
#error Pin mapping is not configured
6060
#endif
61-
#if CONFIG_SPI_SAM0_SERCOM5_BASE_ADDRESS
61+
#if DT_SPI_SAM0_SERCOM5_BASE_ADDRESS
6262
#error Pin mapping is not configured
6363
#endif
6464

0 commit comments

Comments
 (0)