1*ae5de77eSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2*ae5de77eSEmmanuel Vadot%YAML 1.2 3*ae5de77eSEmmanuel Vadot--- 4*ae5de77eSEmmanuel Vadot$id: http://devicetree.org/schemas/pwm/nxp,mc33xs2410.yaml# 5*ae5de77eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*ae5de77eSEmmanuel Vadot 7*ae5de77eSEmmanuel Vadottitle: High-side switch MC33XS2410 8*ae5de77eSEmmanuel Vadot 9*ae5de77eSEmmanuel Vadotmaintainers: 10*ae5de77eSEmmanuel Vadot - Dimitri Fedrau <dima.fedrau@gmail.com> 11*ae5de77eSEmmanuel Vadot 12*ae5de77eSEmmanuel VadotallOf: 13*ae5de77eSEmmanuel Vadot - $ref: pwm.yaml# 14*ae5de77eSEmmanuel Vadot - $ref: /schemas/spi/spi-peripheral-props.yaml# 15*ae5de77eSEmmanuel Vadot 16*ae5de77eSEmmanuel Vadotproperties: 17*ae5de77eSEmmanuel Vadot compatible: 18*ae5de77eSEmmanuel Vadot const: nxp,mc33xs2410 19*ae5de77eSEmmanuel Vadot 20*ae5de77eSEmmanuel Vadot reg: 21*ae5de77eSEmmanuel Vadot maxItems: 1 22*ae5de77eSEmmanuel Vadot 23*ae5de77eSEmmanuel Vadot spi-max-frequency: 24*ae5de77eSEmmanuel Vadot maximum: 10000000 25*ae5de77eSEmmanuel Vadot 26*ae5de77eSEmmanuel Vadot spi-cpha: true 27*ae5de77eSEmmanuel Vadot 28*ae5de77eSEmmanuel Vadot spi-cs-setup-delay-ns: 29*ae5de77eSEmmanuel Vadot minimum: 100 30*ae5de77eSEmmanuel Vadot default: 100 31*ae5de77eSEmmanuel Vadot 32*ae5de77eSEmmanuel Vadot spi-cs-hold-delay-ns: 33*ae5de77eSEmmanuel Vadot minimum: 10 34*ae5de77eSEmmanuel Vadot default: 10 35*ae5de77eSEmmanuel Vadot 36*ae5de77eSEmmanuel Vadot spi-cs-inactive-delay-ns: 37*ae5de77eSEmmanuel Vadot minimum: 300 38*ae5de77eSEmmanuel Vadot default: 300 39*ae5de77eSEmmanuel Vadot 40*ae5de77eSEmmanuel Vadot reset-gpios: 41*ae5de77eSEmmanuel Vadot description: 42*ae5de77eSEmmanuel Vadot GPIO connected to the active low reset pin. 43*ae5de77eSEmmanuel Vadot maxItems: 1 44*ae5de77eSEmmanuel Vadot 45*ae5de77eSEmmanuel Vadot "#pwm-cells": 46*ae5de77eSEmmanuel Vadot const: 3 47*ae5de77eSEmmanuel Vadot 48*ae5de77eSEmmanuel Vadot pwm-names: 49*ae5de77eSEmmanuel Vadot items: 50*ae5de77eSEmmanuel Vadot - const: di0 51*ae5de77eSEmmanuel Vadot - const: di1 52*ae5de77eSEmmanuel Vadot - const: di2 53*ae5de77eSEmmanuel Vadot - const: di3 54*ae5de77eSEmmanuel Vadot 55*ae5de77eSEmmanuel Vadot pwms: 56*ae5de77eSEmmanuel Vadot description: 57*ae5de77eSEmmanuel Vadot Direct inputs(di0-3) are used to directly turn-on or turn-off the 58*ae5de77eSEmmanuel Vadot outputs. 59*ae5de77eSEmmanuel Vadot maxItems: 4 60*ae5de77eSEmmanuel Vadot 61*ae5de77eSEmmanuel Vadot interrupts: 62*ae5de77eSEmmanuel Vadot maxItems: 1 63*ae5de77eSEmmanuel Vadot 64*ae5de77eSEmmanuel Vadot clocks: 65*ae5de77eSEmmanuel Vadot description: 66*ae5de77eSEmmanuel Vadot The external clock can be used if the internal clock doesn't meet 67*ae5de77eSEmmanuel Vadot timing requirements over temperature and voltage operating range. 68*ae5de77eSEmmanuel Vadot maxItems: 1 69*ae5de77eSEmmanuel Vadot 70*ae5de77eSEmmanuel Vadot vdd-supply: 71*ae5de77eSEmmanuel Vadot description: 72*ae5de77eSEmmanuel Vadot Logic supply voltage 73*ae5de77eSEmmanuel Vadot 74*ae5de77eSEmmanuel Vadot vspi-supply: 75*ae5de77eSEmmanuel Vadot description: 76*ae5de77eSEmmanuel Vadot Supply voltage for SPI 77*ae5de77eSEmmanuel Vadot 78*ae5de77eSEmmanuel Vadot vpwr-supply: 79*ae5de77eSEmmanuel Vadot description: 80*ae5de77eSEmmanuel Vadot Power switch supply 81*ae5de77eSEmmanuel Vadot 82*ae5de77eSEmmanuel Vadotrequired: 83*ae5de77eSEmmanuel Vadot - compatible 84*ae5de77eSEmmanuel Vadot - reg 85*ae5de77eSEmmanuel Vadot 86*ae5de77eSEmmanuel VadotunevaluatedProperties: false 87*ae5de77eSEmmanuel Vadot 88*ae5de77eSEmmanuel Vadotexamples: 89*ae5de77eSEmmanuel Vadot - | 90*ae5de77eSEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 91*ae5de77eSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 92*ae5de77eSEmmanuel Vadot spi { 93*ae5de77eSEmmanuel Vadot #address-cells = <1>; 94*ae5de77eSEmmanuel Vadot #size-cells = <0>; 95*ae5de77eSEmmanuel Vadot 96*ae5de77eSEmmanuel Vadot pwm@0 { 97*ae5de77eSEmmanuel Vadot compatible = "nxp,mc33xs2410"; 98*ae5de77eSEmmanuel Vadot reg = <0x0>; 99*ae5de77eSEmmanuel Vadot spi-max-frequency = <4000000>; 100*ae5de77eSEmmanuel Vadot spi-cpha; 101*ae5de77eSEmmanuel Vadot spi-cs-setup-delay-ns = <100>; 102*ae5de77eSEmmanuel Vadot spi-cs-hold-delay-ns = <10>; 103*ae5de77eSEmmanuel Vadot spi-cs-inactive-delay-ns = <300>; 104*ae5de77eSEmmanuel Vadot reset-gpios = <&gpio3 22 GPIO_ACTIVE_LOW>; 105*ae5de77eSEmmanuel Vadot #pwm-cells = <3>; 106*ae5de77eSEmmanuel Vadot pwm-names = "di0", "di1", "di2", "di3"; 107*ae5de77eSEmmanuel Vadot pwms = <&pwm0 0 1000000>, 108*ae5de77eSEmmanuel Vadot <&pwm1 0 1000000>, 109*ae5de77eSEmmanuel Vadot <&pwm2 0 1000000>, 110*ae5de77eSEmmanuel Vadot <&pwm3 0 1000000>; 111*ae5de77eSEmmanuel Vadot interrupt-parent = <&gpio0>; 112*ae5de77eSEmmanuel Vadot interrupts = <31 IRQ_TYPE_LEVEL_LOW>; 113*ae5de77eSEmmanuel Vadot clocks = <&clk_ext_fixed>; 114*ae5de77eSEmmanuel Vadot vdd-supply = <®_3v3>; 115*ae5de77eSEmmanuel Vadot vspi-supply = <®_3v3>; 116*ae5de77eSEmmanuel Vadot vpwr-supply = <®_24v0>; 117*ae5de77eSEmmanuel Vadot }; 118*ae5de77eSEmmanuel Vadot }; 119