1# Copyright (c) 2024 Nordic Semiconductor ASA 2# SPDX-License-Identifier: Apache-2.0 3 4description: | 5 Nordic nRF LPCOMP (analog Low-Power COMParator) 6 7 The following example displays the minimum node layout: 8 9 comp: comp@deadbeef { 10 compatible = "nordic,nrf-lpcomp"; 11 reg = <0xdeadbeef 0x1000>; 12 interrupts = <0 NRF_DEFAULT_IRQ_PRIORITY>; 13 status = "disabled"; 14 }; 15 16 Enabling the comparator node requires setting the default 17 configuration of the comparator. 18 19 The following example displays enabling the comparator 20 using an internal reference: 21 22 &comp { 23 status = "okay"; 24 psel = "AIN0"; 25 refsel = "VDD_4_8"; 26 enable-hyst; 27 }; 28 29 To select an external reference, select the "AREF" 30 reference and add the external reference: 31 32 &comp { 33 ... 34 refsel = "AREF"; 35 extrefsel = "AIN1"; 36 ... 37 }; 38 39compatible: "nordic,nrf-lpcomp" 40 41include: base.yaml 42 43properties: 44 psel: 45 type: string 46 enum: 47 - "AIN0" 48 - "AIN1" 49 - "AIN2" 50 - "AIN3" 51 - "AIN4" 52 - "AIN5" 53 - "AIN6" 54 - "AIN7" 55 56 extrefsel: 57 type: string 58 enum: 59 - "AIN0" 60 - "AIN1" 61 62 refsel: 63 type: string 64 enum: 65 - "VDD_1_8" 66 - "VDD_2_8" 67 - "VDD_3_8" 68 - "VDD_4_8" 69 - "VDD_5_8" 70 - "VDD_6_8" 71 - "VDD_7_8" 72 - "VDD_1_16" 73 - "VDD_3_16" 74 - "VDD_5_16" 75 - "VDD_7_16" 76 - "VDD_9_16" 77 - "VDD_11_16" 78 - "VDD_13_16" 79 - "VDD_15_16" 80 - "AREF" 81 82 enable-hyst: 83 type: boolean 84