1/* 2 * Copyright (c) 2023 Renesas Electronics Corporation 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7#include <zephyr/dt-bindings/adc/adc.h> 8 9/ { 10 zephyr,user { 11 /* adjust channel number according to pinmux in board.dts */ 12 io-channels = <&adc 0 &adc 1 &adc 2 &adc 3 &sdadc 0 &sdadc 1 &sdadc 2>; 13 }; 14}; 15 16&pinctrl { 17 adc_default: adc_default { 18 group_1 { 19 pinmux = <SMARTBOND_PINMUX(ADC, 0, 25)>, 20 <SMARTBOND_PINMUX(ADC, 1, 9)>, 21 <SMARTBOND_PINMUX(ADC, 1, 19)>; 22 }; 23 }; 24 sdadc_default: sdadc_default { 25 group_1 { 26 pinmux = <SMARTBOND_PINMUX(ADC, 1, 14)>, 27 <SMARTBOND_PINMUX(ADC, 1, 20)>, 28 <SMARTBOND_PINMUX(ADC, 1, 21)>; 29 }; 30 }; 31}; 32 33&adc { 34 #address-cells = <1>; 35 #size-cells = <0>; 36 status = "okay"; 37 38 channel@0 { 39 reg = <0>; 40 zephyr,gain = "ADC_GAIN_1_3"; 41 zephyr,reference = "ADC_REF_INTERNAL"; 42 zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; 43 zephyr,resolution = <12>; 44 zephyr,oversampling = <7>; 45 zephyr,input-positive = <SMARTBOND_GPADC_P1_09>; 46 }; 47 channel@1 { 48 reg = <1>; 49 zephyr,gain = "ADC_GAIN_1_3"; 50 zephyr,reference = "ADC_REF_INTERNAL"; 51 zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; 52 zephyr,resolution = <12>; 53 zephyr,oversampling = <0>; 54 zephyr,input-positive = <SMARTBOND_GPADC_V30>; 55 }; 56 channel@2 { 57 reg = <2>; 58 zephyr,gain = "ADC_GAIN_1_3"; 59 zephyr,reference = "ADC_REF_INTERNAL"; 60 zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; 61 zephyr,resolution = <12>; 62 zephyr,oversampling = <0>; 63 zephyr,input-positive = <SMARTBOND_GPADC_P0_25>; 64 }; 65 channel@3 { 66 reg = <3>; 67 zephyr,gain = "ADC_GAIN_1_3"; 68 zephyr,reference = "ADC_REF_INTERNAL"; 69 zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; 70 zephyr,resolution = <12>; 71 zephyr,oversampling = <0>; 72 zephyr,input-positive = <SMARTBOND_GPADC_P1_19>; 73 }; 74 pinctrl-0 = <&adc_default>; 75 pinctrl-names = "default"; 76}; 77 78&sdadc { 79 #address-cells = <1>; 80 #size-cells = <0>; 81 status = "okay"; 82 83 channel@0 { 84 reg = <0>; 85 zephyr,gain = "ADC_GAIN_1"; 86 zephyr,reference = "ADC_REF_INTERNAL"; 87 zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; 88 zephyr,resolution = <14>; 89 zephyr,oversampling = <7>; 90 zephyr,input-positive = <SMARTBOND_SDADC_P1_14>; 91 }; 92 channel@1 { 93 reg = <1>; 94 zephyr,gain = "ADC_GAIN_1"; 95 zephyr,reference = "ADC_REF_INTERNAL"; 96 zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; 97 zephyr,resolution = <14>; 98 zephyr,oversampling = <7>; 99 zephyr,input-positive = <SMARTBOND_SDADC_P1_20>; 100 zephyr,input-negative = <SMARTBOND_SDADC_P1_21>; 101 }; 102 channel@2 { 103 reg = <2>; 104 zephyr,gain = "ADC_GAIN_1_4"; 105 zephyr,reference = "ADC_REF_INTERNAL"; 106 zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; 107 zephyr,resolution = <14>; 108 zephyr,oversampling = <7>; 109 zephyr,input-positive = <SMARTBOND_SDADC_VBAT>; 110 }; 111 pinctrl-0 = <&sdadc_default>; 112 pinctrl-names = "default"; 113}; 114