drivers: adc: add adc support for Smartbond devices
Renesas Renesas SmartBond(tm) have two ADC blocks: GPADC and SDADC. This change adds drivers for both. Each ADC supports only one channel setup, drivers allow to have multiply channels in sequence. Switching between ADC sources in done in software. GPADC has 10 bit resolution (accuracy can be increase with oversampling). Values up to 3.6V can be measured on selected pins. V30 and VBAT1 can also be measured. SDADC has 14 bit resolution and can take measurements from 8 pins (single of differential) and VBAT. Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
This commit is contained in:
parent
a232d5afeb
commit
ce4018511f
9 changed files with 785 additions and 0 deletions
21
dts/bindings/adc/renesas,smartbond-gpadc.yaml
Normal file
21
dts/bindings/adc/renesas,smartbond-gpadc.yaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Copyright (c) 2023 Renesas Electronics Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
description: Renesas SmartBond(tm) ADC node
|
||||
|
||||
compatible: "renesas,smartbond-adc"
|
||||
|
||||
include: [adc-controller.yaml, pinctrl-device.yaml]
|
||||
|
||||
properties:
|
||||
reg:
|
||||
required: true
|
||||
|
||||
interrupts:
|
||||
required: true
|
||||
|
||||
"#io-channel-cells":
|
||||
const: 1
|
||||
|
||||
io-channel-cells:
|
||||
- input
|
31
dts/bindings/adc/renesas,smartbond-sdadc.yaml
Normal file
31
dts/bindings/adc/renesas,smartbond-sdadc.yaml
Normal file
|
@ -0,0 +1,31 @@
|
|||
# Copyright (c) 2023 Renesas Electronics Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
description: Renesas SmartBond(tm) ADC node
|
||||
|
||||
compatible: "renesas,smartbond-sdadc"
|
||||
|
||||
include: [adc-controller.yaml, pinctrl-device.yaml]
|
||||
|
||||
properties:
|
||||
reg:
|
||||
required: true
|
||||
|
||||
interrupts:
|
||||
required: true
|
||||
|
||||
"#io-channel-cells":
|
||||
const: 1
|
||||
|
||||
clock-freq:
|
||||
type: int
|
||||
description: |
|
||||
SDADC clock frequency selector;
|
||||
enum:
|
||||
- 0 # 250 kHz
|
||||
- 1 # 500 kHz
|
||||
- 2 # 1 MHz (default)
|
||||
- 3 # 2 MHz
|
||||
|
||||
io-channel-cells:
|
||||
- input
|
Loading…
Add table
Add a link
Reference in a new issue