1# Copyright (c) 2022, Joep Buruma 2# SPDX-License-Identifier: Apache-2.0 3 4description: Raspberry Pi Pico PWM 5 6compatible: "raspberrypi,pico-pwm" 7 8include: [pwm-controller.yaml, pinctrl-device.yaml, reset-device.yaml, base.yaml] 9 10properties: 11 reg: 12 required: true 13 14 interrupts: 15 required: true 16 17 divider-int-0: 18 type: int 19 description: | 20 The integral part of the divider for pwm slice 0. 21 If a value between 1 and 255 is set, it will be set to the register 22 as the integer part of the divider. 23 If the value is set to 0 or this property is not defined when setting 24 the number of cycles to PWM, a division ratio appropriate to that value is set. 25 26 divider-frac-0: 27 type: int 28 description: | 29 The fractional part of the divider for pwm slice 0. 30 This number should be in the range 0 - 15. 31 When the "divider-int-0" is set to 0 or is not defined, this property will be 32 ignored. 33 34 divider-int-1: 35 type: int 36 description: See divider-int-0 for help 37 38 divider-frac-1: 39 type: int 40 description: See divider-frac-0 for help 41 42 divider-int-2: 43 type: int 44 description: See divider-int-0 for help 45 46 divider-frac-2: 47 type: int 48 description: See divider-frac-0 for help 49 50 divider-int-3: 51 type: int 52 description: See divider-int-0 for help 53 54 divider-frac-3: 55 type: int 56 description: See divider-frac-0 for help 57 58 divider-int-4: 59 type: int 60 description: See divider-int-0 for help 61 62 divider-frac-4: 63 type: int 64 description: See divider-frac-0 for help 65 66 divider-int-5: 67 type: int 68 description: See divider-int-0 for help 69 70 divider-frac-5: 71 type: int 72 description: See divider-frac-0 for help 73 74 divider-int-6: 75 type: int 76 description: See divider-int-0 for help 77 78 divider-frac-6: 79 type: int 80 description: See divider-frac-0 for help 81 82 divider-int-7: 83 type: int 84 description: See divider-int-0 for help 85 86 divider-frac-7: 87 type: int 88 description: See divider-frac-0 for help 89 90 "#pwm-cells": 91 const: 3 92 93pwm-cells: 94 # The rpi pico pwm peripheral is divided in 8 slices with an individual 95 # clock setting and two output channels. The pwm channels are mapped the 96 # following way PWM_CH0_A is addressed as <&pwm 0 PWM_FLAGS>, PWM_CH0B 97 # is <&pwm 1 PMW_FLAGS>, PWM_CH1_A si <&pwm 2 PWM_FLAGS> and so on. 98 - channel 99 - period 100 - flags 101