i2c: mcux: Convert to supporting device tree
Update the MCUX I2C driver and related platforms to get their I2C information from the device tree. We also updated a few of the sensor drivers found on the FRDM & Hexiwear boards to get their I2C bus name from the device tree instead of directly from Kconfig. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
5b3a71a810
commit
563f8f1464
25 changed files with 199 additions and 47 deletions
|
@ -86,9 +86,6 @@ if I2C_0
|
||||||
config I2C_0_DEFAULT_CFG
|
config I2C_0_DEFAULT_CFG
|
||||||
default 0x12
|
default 0x12
|
||||||
|
|
||||||
config I2C_0_IRQ_PRI
|
|
||||||
default 0
|
|
||||||
|
|
||||||
endif # I2C_0
|
endif # I2C_0
|
||||||
|
|
||||||
config I2C_1
|
config I2C_1
|
||||||
|
@ -99,9 +96,6 @@ if I2C_1
|
||||||
config I2C_1_DEFAULT_CFG
|
config I2C_1_DEFAULT_CFG
|
||||||
default 0x12
|
default 0x12
|
||||||
|
|
||||||
config I2C_1_IRQ_PRI
|
|
||||||
default 0
|
|
||||||
|
|
||||||
endif # I2C_1
|
endif # I2C_1
|
||||||
|
|
||||||
endif # I2C
|
endif # I2C
|
||||||
|
@ -115,9 +109,6 @@ endif # ADC
|
||||||
|
|
||||||
if FXOS8700
|
if FXOS8700
|
||||||
|
|
||||||
config FXOS8700_I2C_NAME
|
|
||||||
default I2C_0_NAME
|
|
||||||
|
|
||||||
config FXOS8700_I2C_ADDRESS
|
config FXOS8700_I2C_ADDRESS
|
||||||
default 0x1d
|
default 0x1d
|
||||||
|
|
||||||
|
|
|
@ -83,9 +83,6 @@ if I2C_0
|
||||||
config I2C_0_DEFAULT_CFG
|
config I2C_0_DEFAULT_CFG
|
||||||
default 0x12
|
default 0x12
|
||||||
|
|
||||||
config I2C_0_IRQ_PRI
|
|
||||||
default 0
|
|
||||||
|
|
||||||
endif # I2C_0
|
endif # I2C_0
|
||||||
|
|
||||||
endif # I2C
|
endif # I2C
|
||||||
|
|
|
@ -65,9 +65,6 @@ if I2C_1
|
||||||
config I2C_1_DEFAULT_CFG
|
config I2C_1_DEFAULT_CFG
|
||||||
default 0x12
|
default 0x12
|
||||||
|
|
||||||
config I2C_1_IRQ_PRI
|
|
||||||
default 0
|
|
||||||
|
|
||||||
endif # I2C_1
|
endif # I2C_1
|
||||||
|
|
||||||
endif # I2C
|
endif # I2C
|
||||||
|
@ -81,9 +78,6 @@ endif # ADC
|
||||||
|
|
||||||
if FXOS8700
|
if FXOS8700
|
||||||
|
|
||||||
config FXOS8700_I2C_NAME
|
|
||||||
default I2C_1_NAME
|
|
||||||
|
|
||||||
config FXOS8700_I2C_ADDRESS
|
config FXOS8700_I2C_ADDRESS
|
||||||
default 0x1f
|
default 0x1f
|
||||||
|
|
||||||
|
|
|
@ -86,9 +86,6 @@ if I2C_0
|
||||||
config I2C_0_DEFAULT_CFG
|
config I2C_0_DEFAULT_CFG
|
||||||
default 0x12
|
default 0x12
|
||||||
|
|
||||||
config I2C_0_IRQ_PRI
|
|
||||||
default 0
|
|
||||||
|
|
||||||
endif # I2C_0
|
endif # I2C_0
|
||||||
|
|
||||||
config I2C_1
|
config I2C_1
|
||||||
|
@ -99,9 +96,6 @@ if I2C_1
|
||||||
config I2C_1_DEFAULT_CFG
|
config I2C_1_DEFAULT_CFG
|
||||||
default 0x12
|
default 0x12
|
||||||
|
|
||||||
config I2C_1_IRQ_PRI
|
|
||||||
default 0
|
|
||||||
|
|
||||||
endif # I2C_1
|
endif # I2C_1
|
||||||
|
|
||||||
endif # I2C
|
endif # I2C
|
||||||
|
@ -115,9 +109,6 @@ endif # ADC
|
||||||
|
|
||||||
if FXOS8700
|
if FXOS8700
|
||||||
|
|
||||||
config FXOS8700_I2C_NAME
|
|
||||||
default I2C_1_NAME
|
|
||||||
|
|
||||||
config FXOS8700_I2C_ADDRESS
|
config FXOS8700_I2C_ADDRESS
|
||||||
default 0x1e
|
default 0x1e
|
||||||
|
|
||||||
|
@ -131,9 +122,6 @@ endif # FXOS8700
|
||||||
|
|
||||||
if FXAS21002
|
if FXAS21002
|
||||||
|
|
||||||
config FXAS21002_I2C_NAME
|
|
||||||
default I2C_1_NAME
|
|
||||||
|
|
||||||
config FXAS21002_I2C_ADDRESS
|
config FXAS21002_I2C_ADDRESS
|
||||||
default 0x20
|
default 0x20
|
||||||
|
|
||||||
|
@ -145,13 +133,6 @@ config FXAS21002_GPIO_PIN
|
||||||
|
|
||||||
endif # FXAS21002
|
endif # FXAS21002
|
||||||
|
|
||||||
if MAX30101
|
|
||||||
|
|
||||||
config MAX30101_I2C_NAME
|
|
||||||
default I2C_0_NAME
|
|
||||||
|
|
||||||
endif # MAX30101
|
|
||||||
|
|
||||||
if PWM_K64_FTM
|
if PWM_K64_FTM
|
||||||
|
|
||||||
config PWM_K64_FTM_0
|
config PWM_K64_FTM_0
|
||||||
|
|
|
@ -57,9 +57,6 @@ if I2C
|
||||||
config I2C_1
|
config I2C_1
|
||||||
def_bool y
|
def_bool y
|
||||||
|
|
||||||
config I2C_1_IRQ_PRI
|
|
||||||
default 0
|
|
||||||
|
|
||||||
endif # I2C
|
endif # I2C
|
||||||
|
|
||||||
if ADC
|
if ADC
|
||||||
|
|
|
@ -63,6 +63,7 @@ config TWIHS_SAM
|
||||||
config I2C_MCUX
|
config I2C_MCUX
|
||||||
bool "MCUX I2C driver"
|
bool "MCUX I2C driver"
|
||||||
depends on HAS_MCUX
|
depends on HAS_MCUX
|
||||||
|
select HAS_DTS_I2C
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
Enable the mcux I2C driver.
|
Enable the mcux I2C driver.
|
||||||
|
|
|
@ -186,7 +186,7 @@ static const struct i2c_driver_api i2c_mcux_driver_api = {
|
||||||
static void i2c_mcux_config_func_0(struct device *dev);
|
static void i2c_mcux_config_func_0(struct device *dev);
|
||||||
|
|
||||||
static const struct i2c_mcux_config i2c_mcux_config_0 = {
|
static const struct i2c_mcux_config i2c_mcux_config_0 = {
|
||||||
.base = I2C0,
|
.base = (I2C_Type *)CONFIG_I2C_MCUX_0_BASE_ADDRESS,
|
||||||
.clock_source = I2C0_CLK_SRC,
|
.clock_source = I2C0_CLK_SRC,
|
||||||
.irq_config_func = i2c_mcux_config_func_0,
|
.irq_config_func = i2c_mcux_config_func_0,
|
||||||
.default_cfg.raw = CONFIG_I2C_0_DEFAULT_CFG,
|
.default_cfg.raw = CONFIG_I2C_0_DEFAULT_CFG,
|
||||||
|
@ -203,10 +203,10 @@ static void i2c_mcux_config_func_0(struct device *dev)
|
||||||
{
|
{
|
||||||
ARG_UNUSED(dev);
|
ARG_UNUSED(dev);
|
||||||
|
|
||||||
IRQ_CONNECT(IRQ_I2C0, CONFIG_I2C_0_IRQ_PRI,
|
IRQ_CONNECT(CONFIG_I2C_MCUX_0_IRQ, CONFIG_I2C_MCUX_0_IRQ_PRI,
|
||||||
i2c_mcux_isr, DEVICE_GET(i2c_mcux_0), 0);
|
i2c_mcux_isr, DEVICE_GET(i2c_mcux_0), 0);
|
||||||
|
|
||||||
irq_enable(I2C0_IRQn);
|
irq_enable(CONFIG_I2C_MCUX_0_IRQ);
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_I2C_0 */
|
#endif /* CONFIG_I2C_0 */
|
||||||
|
|
||||||
|
@ -214,7 +214,7 @@ static void i2c_mcux_config_func_0(struct device *dev)
|
||||||
static void i2c_mcux_config_func_1(struct device *dev);
|
static void i2c_mcux_config_func_1(struct device *dev);
|
||||||
|
|
||||||
static const struct i2c_mcux_config i2c_mcux_config_1 = {
|
static const struct i2c_mcux_config i2c_mcux_config_1 = {
|
||||||
.base = I2C1,
|
.base = (I2C_Type *)CONFIG_I2C_MCUX_1_BASE_ADDRESS,
|
||||||
.clock_source = I2C1_CLK_SRC,
|
.clock_source = I2C1_CLK_SRC,
|
||||||
.irq_config_func = i2c_mcux_config_func_1,
|
.irq_config_func = i2c_mcux_config_func_1,
|
||||||
.default_cfg.raw = CONFIG_I2C_1_DEFAULT_CFG,
|
.default_cfg.raw = CONFIG_I2C_1_DEFAULT_CFG,
|
||||||
|
@ -229,9 +229,9 @@ DEVICE_AND_API_INIT(i2c_mcux_1, CONFIG_I2C_1_NAME, &i2c_mcux_init,
|
||||||
|
|
||||||
static void i2c_mcux_config_func_1(struct device *dev)
|
static void i2c_mcux_config_func_1(struct device *dev)
|
||||||
{
|
{
|
||||||
IRQ_CONNECT(IRQ_I2C1, CONFIG_I2C_1_IRQ_PRI,
|
IRQ_CONNECT(CONFIG_I2C_MCUX_1_IRQ, CONFIG_I2C_MCUX_1_IRQ_PRI,
|
||||||
i2c_mcux_isr, DEVICE_GET(i2c_mcux_1), 0);
|
i2c_mcux_isr, DEVICE_GET(i2c_mcux_1), 0);
|
||||||
|
|
||||||
irq_enable(I2C1_IRQn);
|
irq_enable(CONFIG_I2C_MCUX_1_IRQ);
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_I2C_1 */
|
#endif /* CONFIG_I2C_1 */
|
||||||
|
|
|
@ -20,6 +20,7 @@ config FXAS21002_NAME
|
||||||
|
|
||||||
config FXAS21002_I2C_NAME
|
config FXAS21002_I2C_NAME
|
||||||
string "I2C device name"
|
string "I2C device name"
|
||||||
|
depends on !HAS_DTS_I2C
|
||||||
default I2C_0_NAME
|
default I2C_0_NAME
|
||||||
|
|
||||||
config FXAS21002_I2C_ADDRESS
|
config FXAS21002_I2C_ADDRESS
|
||||||
|
|
|
@ -19,7 +19,7 @@ config FXOS8700_NAME
|
||||||
|
|
||||||
config FXOS8700_I2C_NAME
|
config FXOS8700_I2C_NAME
|
||||||
string "I2C device name"
|
string "I2C device name"
|
||||||
depends on FXOS8700
|
depends on FXOS8700 && !HAS_DTS_I2C
|
||||||
default I2C_0_NAME
|
default I2C_0_NAME
|
||||||
|
|
||||||
config FXOS8700_I2C_ADDRESS
|
config FXOS8700_I2C_ADDRESS
|
||||||
|
|
|
@ -21,6 +21,7 @@ config MAX30101_NAME
|
||||||
config MAX30101_I2C_NAME
|
config MAX30101_I2C_NAME
|
||||||
string
|
string
|
||||||
prompt "I2C device name"
|
prompt "I2C device name"
|
||||||
|
depends on !HAS_DTS_I2C
|
||||||
default "I2C_0"
|
default "I2C_0"
|
||||||
|
|
||||||
config MAX30101_SMP_AVE
|
config MAX30101_SMP_AVE
|
||||||
|
|
|
@ -21,6 +21,9 @@
|
||||||
gpio_c = &gpioc;
|
gpio_c = &gpioc;
|
||||||
gpio_d = &gpiod;
|
gpio_d = &gpiod;
|
||||||
gpio_e = &gpioe;
|
gpio_e = &gpioe;
|
||||||
|
i2c_0 = &i2c0;
|
||||||
|
i2c_1 = &i2c1;
|
||||||
|
i2c_2 = &i2c2;
|
||||||
};
|
};
|
||||||
|
|
||||||
chosen {
|
chosen {
|
||||||
|
@ -39,6 +42,10 @@
|
||||||
status = "ok";
|
status = "ok";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&i2c0 {
|
||||||
|
status = "ok";
|
||||||
|
};
|
||||||
|
|
||||||
&uart0 {
|
&uart0 {
|
||||||
status = "ok";
|
status = "ok";
|
||||||
current-speed = <115200>;
|
current-speed = <115200>;
|
||||||
|
|
|
@ -33,3 +33,9 @@
|
||||||
#define CONFIG_ADC_1_IRQ NXP_KINETIS_ADC16_400BB000_IRQ_0
|
#define CONFIG_ADC_1_IRQ NXP_KINETIS_ADC16_400BB000_IRQ_0
|
||||||
#define CONFIG_ADC_1_IRQ_PRI NXP_KINETIS_ADC16_400BB000_IRQ_0_PRIORITY
|
#define CONFIG_ADC_1_IRQ_PRI NXP_KINETIS_ADC16_400BB000_IRQ_0_PRIORITY
|
||||||
#define CONFIG_ADC_1_NAME NXP_KINETIS_ADC16_400BB000_LABEL
|
#define CONFIG_ADC_1_NAME NXP_KINETIS_ADC16_400BB000_LABEL
|
||||||
|
|
||||||
|
#define CONFIG_I2C_0_NAME NXP_KINETIS_I2C_40066000_LABEL
|
||||||
|
#define CONFIG_FXOS8700_I2C_NAME NXP_KINETIS_I2C_40066000_LABEL
|
||||||
|
#define CONFIG_I2C_MCUX_0_BASE_ADDRESS NXP_KINETIS_I2C_40066000_BASE_ADDRESS_0
|
||||||
|
#define CONFIG_I2C_MCUX_0_IRQ NXP_KINETIS_I2C_40066000_IRQ_0
|
||||||
|
#define CONFIG_I2C_MCUX_0_IRQ_PRI NXP_KINETIS_I2C_40066000_IRQ_0_PRIORITY
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
aliases {
|
aliases {
|
||||||
adc_0 = &adc0;
|
adc_0 = &adc0;
|
||||||
uart_0 = &uart0;
|
uart_0 = &uart0;
|
||||||
|
i2c_0 = &i2c0;
|
||||||
|
i2c_1 = &i2c1;
|
||||||
};
|
};
|
||||||
|
|
||||||
chosen {
|
chosen {
|
||||||
|
@ -22,6 +24,10 @@
|
||||||
status = "ok";
|
status = "ok";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&i2c0 {
|
||||||
|
status = "ok";
|
||||||
|
};
|
||||||
|
|
||||||
&uart0 {
|
&uart0 {
|
||||||
status = "ok";
|
status = "ok";
|
||||||
current-speed = <115200>;
|
current-speed = <115200>;
|
||||||
|
|
|
@ -5,3 +5,8 @@
|
||||||
#define CONFIG_ADC_0_IRQ NXP_KINETIS_ADC16_4003B000_IRQ_0
|
#define CONFIG_ADC_0_IRQ NXP_KINETIS_ADC16_4003B000_IRQ_0
|
||||||
#define CONFIG_ADC_0_IRQ_PRI NXP_KINETIS_ADC16_4003B000_IRQ_0_PRIORITY
|
#define CONFIG_ADC_0_IRQ_PRI NXP_KINETIS_ADC16_4003B000_IRQ_0_PRIORITY
|
||||||
#define CONFIG_ADC_0_NAME NXP_KINETIS_ADC16_4003B000_LABEL
|
#define CONFIG_ADC_0_NAME NXP_KINETIS_ADC16_4003B000_LABEL
|
||||||
|
|
||||||
|
#define CONFIG_I2C_0_NAME NXP_KINETIS_I2C_40066000_LABEL
|
||||||
|
#define CONFIG_I2C_MCUX_0_BASE_ADDRESS NXP_KINETIS_I2C_40066000_BASE_ADDRESS_0
|
||||||
|
#define CONFIG_I2C_MCUX_0_IRQ NXP_KINETIS_I2C_40066000_IRQ_0
|
||||||
|
#define CONFIG_I2C_MCUX_0_IRQ_PRI NXP_KINETIS_I2C_40066000_IRQ_0_PRIORITY
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
gpio_a = &gpioa;
|
gpio_a = &gpioa;
|
||||||
gpio_b = &gpiob;
|
gpio_b = &gpiob;
|
||||||
gpio_c = &gpioc;
|
gpio_c = &gpioc;
|
||||||
|
i2c_0 = &i2c0;
|
||||||
|
i2c_1 = &i2c1;
|
||||||
};
|
};
|
||||||
|
|
||||||
chosen {
|
chosen {
|
||||||
|
@ -28,6 +30,10 @@
|
||||||
status = "ok";
|
status = "ok";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&i2c1 {
|
||||||
|
status = "ok";
|
||||||
|
};
|
||||||
|
|
||||||
&lpuart0 {
|
&lpuart0 {
|
||||||
status = "ok";
|
status = "ok";
|
||||||
current-speed = <115200>;
|
current-speed = <115200>;
|
||||||
|
|
|
@ -8,3 +8,9 @@
|
||||||
#define CONFIG_ADC_0_IRQ NXP_KINETIS_ADC16_4003B000_IRQ_0
|
#define CONFIG_ADC_0_IRQ NXP_KINETIS_ADC16_4003B000_IRQ_0
|
||||||
#define CONFIG_ADC_0_IRQ_PRI NXP_KINETIS_ADC16_4003B000_IRQ_0_PRIORITY
|
#define CONFIG_ADC_0_IRQ_PRI NXP_KINETIS_ADC16_4003B000_IRQ_0_PRIORITY
|
||||||
#define CONFIG_ADC_0_NAME NXP_KINETIS_ADC16_4003B000_LABEL
|
#define CONFIG_ADC_0_NAME NXP_KINETIS_ADC16_4003B000_LABEL
|
||||||
|
|
||||||
|
#define CONFIG_I2C_1_NAME NXP_KINETIS_I2C_40067000_LABEL
|
||||||
|
#define CONFIG_FXOS8700_I2C_NAME NXP_KINETIS_I2C_40067000_LABEL
|
||||||
|
#define CONFIG_I2C_MCUX_1_BASE_ADDRESS NXP_KINETIS_I2C_40067000_BASE_ADDRESS_0
|
||||||
|
#define CONFIG_I2C_MCUX_1_IRQ NXP_KINETIS_I2C_40067000_IRQ_0
|
||||||
|
#define CONFIG_I2C_MCUX_1_IRQ_PRI NXP_KINETIS_I2C_40067000_IRQ_0_PRIORITY
|
||||||
|
|
|
@ -21,6 +21,9 @@
|
||||||
gpio_c = &gpioc;
|
gpio_c = &gpioc;
|
||||||
gpio_d = &gpiod;
|
gpio_d = &gpiod;
|
||||||
gpio_e = &gpioe;
|
gpio_e = &gpioe;
|
||||||
|
i2c_0 = &i2c0;
|
||||||
|
i2c_1 = &i2c1;
|
||||||
|
i2c_2 = &i2c2;
|
||||||
};
|
};
|
||||||
|
|
||||||
chosen {
|
chosen {
|
||||||
|
@ -39,6 +42,14 @@
|
||||||
status = "ok";
|
status = "ok";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&i2c0 {
|
||||||
|
status = "ok";
|
||||||
|
};
|
||||||
|
|
||||||
|
&i2c1 {
|
||||||
|
status = "ok";
|
||||||
|
};
|
||||||
|
|
||||||
&uart0 {
|
&uart0 {
|
||||||
status = "ok";
|
status = "ok";
|
||||||
current-speed = <115200>;
|
current-speed = <115200>;
|
||||||
|
|
|
@ -33,3 +33,16 @@
|
||||||
#define CONFIG_ADC_1_IRQ NXP_KINETIS_ADC16_400BB000_IRQ_0
|
#define CONFIG_ADC_1_IRQ NXP_KINETIS_ADC16_400BB000_IRQ_0
|
||||||
#define CONFIG_ADC_1_IRQ_PRI NXP_KINETIS_ADC16_400BB000_IRQ_0_PRIORITY
|
#define CONFIG_ADC_1_IRQ_PRI NXP_KINETIS_ADC16_400BB000_IRQ_0_PRIORITY
|
||||||
#define CONFIG_ADC_1_NAME NXP_KINETIS_ADC16_400BB000_LABEL
|
#define CONFIG_ADC_1_NAME NXP_KINETIS_ADC16_400BB000_LABEL
|
||||||
|
|
||||||
|
#define CONFIG_I2C_0_NAME NXP_KINETIS_I2C_40066000_LABEL
|
||||||
|
#define CONFIG_MAX30101_I2C_NAME NXP_KINETIS_I2C_40066000_LABEL
|
||||||
|
#define CONFIG_I2C_MCUX_0_BASE_ADDRESS NXP_KINETIS_I2C_40066000_BASE_ADDRESS_0
|
||||||
|
#define CONFIG_I2C_MCUX_0_IRQ NXP_KINETIS_I2C_40066000_IRQ_0
|
||||||
|
#define CONFIG_I2C_MCUX_0_IRQ_PRI NXP_KINETIS_I2C_40066000_IRQ_0_PRIORITY
|
||||||
|
|
||||||
|
#define CONFIG_I2C_1_NAME NXP_KINETIS_I2C_40067000_LABEL
|
||||||
|
#define CONFIG_FXOS8700_I2C_NAME NXP_KINETIS_I2C_40067000_LABEL
|
||||||
|
#define CONFIG_FXAS21002_I2C_NAME NXP_KINETIS_I2C_40067000_LABEL
|
||||||
|
#define CONFIG_I2C_MCUX_1_BASE_ADDRESS NXP_KINETIS_I2C_40067000_BASE_ADDRESS_0
|
||||||
|
#define CONFIG_I2C_MCUX_1_IRQ NXP_KINETIS_I2C_40067000_IRQ_0
|
||||||
|
#define CONFIG_I2C_MCUX_1_IRQ_PRI NXP_KINETIS_I2C_40067000_IRQ_0_PRIORITY
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
gpio_a = &gpioa;
|
gpio_a = &gpioa;
|
||||||
gpio_b = &gpiob;
|
gpio_b = &gpiob;
|
||||||
gpio_c = &gpioc;
|
gpio_c = &gpioc;
|
||||||
|
i2c_0 = &i2c0;
|
||||||
|
i2c_1 = &i2c1;
|
||||||
};
|
};
|
||||||
|
|
||||||
chosen {
|
chosen {
|
||||||
|
@ -27,6 +29,10 @@
|
||||||
status = "ok";
|
status = "ok";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&i2c0 {
|
||||||
|
status = "ok";
|
||||||
|
};
|
||||||
|
|
||||||
&lpuart0 {
|
&lpuart0 {
|
||||||
status = "ok";
|
status = "ok";
|
||||||
current-speed = <115200>;
|
current-speed = <115200>;
|
||||||
|
|
|
@ -8,3 +8,8 @@
|
||||||
#define CONFIG_ADC_0_IRQ NXP_KINETIS_ADC16_4003B000_IRQ_0
|
#define CONFIG_ADC_0_IRQ NXP_KINETIS_ADC16_4003B000_IRQ_0
|
||||||
#define CONFIG_ADC_0_IRQ_PRI NXP_KINETIS_ADC16_4003B000_IRQ_0_PRIORITY
|
#define CONFIG_ADC_0_IRQ_PRI NXP_KINETIS_ADC16_4003B000_IRQ_0_PRIORITY
|
||||||
#define CONFIG_ADC_0_NAME NXP_KINETIS_ADC16_4003B000_LABEL
|
#define CONFIG_ADC_0_NAME NXP_KINETIS_ADC16_4003B000_LABEL
|
||||||
|
|
||||||
|
#define CONFIG_I2C_0_NAME NXP_KINETIS_I2C_40066000_LABEL
|
||||||
|
#define CONFIG_I2C_MCUX_0_BASE_ADDRESS NXP_KINETIS_I2C_40066000_BASE_ADDRESS_0
|
||||||
|
#define CONFIG_I2C_MCUX_0_IRQ NXP_KINETIS_I2C_40066000_IRQ_0
|
||||||
|
#define CONFIG_I2C_MCUX_0_IRQ_PRI NXP_KINETIS_I2C_40066000_IRQ_0_PRIORITY
|
||||||
|
|
|
@ -73,6 +73,36 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
i2c0: i2c@40066000 {
|
||||||
|
compatible = "nxp,kinetis-i2c";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
reg = <0x40066000 0x1000>;
|
||||||
|
interrupts = <24 0>;
|
||||||
|
label = "I2C_0";
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
i2c1: i2c@40067000 {
|
||||||
|
compatible = "nxp,kinetis-i2c";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
reg = <0x40067000 0x1000>;
|
||||||
|
interrupts = <25 0>;
|
||||||
|
label = "I2C_1";
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
i2c2: i2c@400e6000 {
|
||||||
|
compatible = "nxp,kinetis-i2c";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
reg = <0x400e6000 0x1000>;
|
||||||
|
interrupts = <74 0>;
|
||||||
|
label = "I2C_2";
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
uart0: uart@4006a000 {
|
uart0: uart@4006a000 {
|
||||||
compatible = "nxp,kinetis-uart";
|
compatible = "nxp,kinetis-uart";
|
||||||
reg = <0x4006a000 0x1000>;
|
reg = <0x4006a000 0x1000>;
|
||||||
|
|
|
@ -22,6 +22,26 @@
|
||||||
reg = <0 0x20000>;
|
reg = <0 0x20000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
i2c0: i2c@40066000 {
|
||||||
|
compatible = "nxp,kinetis-i2c";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
reg = <0x40066000 0x1000>;
|
||||||
|
interrupts = <8 0>;
|
||||||
|
label = "I2C_0";
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
i2c1: i2c@40067000 {
|
||||||
|
compatible = "nxp,kinetis-i2c";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
reg = <0x40067000 0x1000>;
|
||||||
|
interrupts = <9 0>;
|
||||||
|
label = "I2C_1";
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
uart0: uart@4006A000 {
|
uart0: uart@4006A000 {
|
||||||
compatible = "nxp,kinetis-lpsci";
|
compatible = "nxp,kinetis-lpsci";
|
||||||
reg = <0x4006A000 0xc>;
|
reg = <0x4006A000 0xc>;
|
||||||
|
|
|
@ -49,6 +49,26 @@
|
||||||
reg = <0 0x80000>;
|
reg = <0 0x80000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
i2c0: i2c@40066000 {
|
||||||
|
compatible = "nxp,kinetis-i2c";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
reg = <0x40066000 0x1000>;
|
||||||
|
interrupts = <8 0>;
|
||||||
|
label = "I2C_0";
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
i2c1: i2c@40067000 {
|
||||||
|
compatible = "nxp,kinetis-i2c";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
reg = <0x40067000 0x1000>;
|
||||||
|
interrupts = <9 0>;
|
||||||
|
label = "I2C_1";
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
lpuart0: lpuart@40054000 {
|
lpuart0: lpuart@40054000 {
|
||||||
compatible = "nxp,kinetis-lpuart";
|
compatible = "nxp,kinetis-lpuart";
|
||||||
reg = <0x40054000 0x18>;
|
reg = <0x40054000 0x18>;
|
||||||
|
|
|
@ -49,6 +49,26 @@
|
||||||
reg = <0 0x80000>;
|
reg = <0 0x80000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
i2c0: i2c@40066000 {
|
||||||
|
compatible = "nxp,kinetis-i2c";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
reg = <0x40066000 0x1000>;
|
||||||
|
interrupts = <8 0>;
|
||||||
|
label = "I2C_0";
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
i2c1: i2c@40067000 {
|
||||||
|
compatible = "nxp,kinetis-i2c";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
reg = <0x40067000 0x1000>;
|
||||||
|
interrupts = <9 0>;
|
||||||
|
label = "I2C_1";
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
lpuart0: lpuart@40054000 {
|
lpuart0: lpuart@40054000 {
|
||||||
compatible = "nxp,kinetis-lpuart";
|
compatible = "nxp,kinetis-lpuart";
|
||||||
reg = <0x40054000 0x18>;
|
reg = <0x40054000 0x18>;
|
||||||
|
|
28
dts/arm/yaml/nxp,kinetis-i2c.yaml
Normal file
28
dts/arm/yaml/nxp,kinetis-i2c.yaml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
---
|
||||||
|
title: Kinetis I2C Controller
|
||||||
|
version: 0.1
|
||||||
|
|
||||||
|
description: >
|
||||||
|
This is a representation of the Kinetis I2C nodes
|
||||||
|
|
||||||
|
inherits:
|
||||||
|
- !include i2c.yaml
|
||||||
|
|
||||||
|
properties:
|
||||||
|
- compatible:
|
||||||
|
type: string
|
||||||
|
category: required
|
||||||
|
description: compatible strings
|
||||||
|
constraint: "nxp,kinetis-i2c"
|
||||||
|
|
||||||
|
- reg:
|
||||||
|
type: int
|
||||||
|
description: mmio register space
|
||||||
|
generation: define
|
||||||
|
category: required
|
||||||
|
|
||||||
|
- interrupts:
|
||||||
|
type: compound
|
||||||
|
category: required
|
||||||
|
description: required interrupts
|
||||||
|
generation: define
|
Loading…
Add table
Add a link
Reference in a new issue