1/* 2 * Copyright 2023 Nordic Semiconductor ASA 3 * SPDX-License-Identifier: Apache-2.0 4 */ 5 6/ { 7 aliases { 8 qdec0 = &qdec1; 9 qenca = &phase_a; 10 qencb = &phase_b; 11 }; 12 13 encoder-emulate { 14 compatible = "gpio-leds"; 15 phase_a: phase_a { 16 /* Arduino A1 */ 17 gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>; 18 }; 19 phase_b: phase_b { 20 /* Arduino A3 */ 21 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; 22 }; 23 }; 24}; 25 26&pinctrl { 27 qdec_pinctrl: qdec_pinctrl { 28 group1 { 29 psels = <NRF_PSEL(QDEC_A, 0, 4)>, /* Ardiuno A0 */ 30 <NRF_PSEL(QDEC_B, 0, 6)>; /* Arduino A2 */ 31 }; 32 }; 33}; 34 35&qdec1 { 36 status = "okay"; 37 pinctrl-0 = <&qdec_pinctrl>; 38 pinctrl-names = "default"; 39 steps = < 120 >; 40 led-pre = < 500 >; 41}; 42