1*878f4c36SAnimesh Agarwal# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*878f4c36SAnimesh Agarwal%YAML 1.2 3*878f4c36SAnimesh Agarwal--- 4*878f4c36SAnimesh Agarwal$id: http://devicetree.org/schemas/sound/realtek,rt5659.yaml# 5*878f4c36SAnimesh Agarwal$schema: http://devicetree.org/meta-schemas/core.yaml# 6*878f4c36SAnimesh Agarwal 7*878f4c36SAnimesh Agarwaltitle: RT5659/RT5658 audio CODEC 8*878f4c36SAnimesh Agarwal 9*878f4c36SAnimesh Agarwalmaintainers: 10*878f4c36SAnimesh Agarwal - Animesh Agarwal <animeshagarwal28@gmail.com> 11*878f4c36SAnimesh Agarwal 12*878f4c36SAnimesh Agarwaldescription: | 13*878f4c36SAnimesh Agarwal This device supports I2C only. 14*878f4c36SAnimesh Agarwal 15*878f4c36SAnimesh Agarwal Pins on the device (for linking into audio routes) for RT5659/RT5658: 16*878f4c36SAnimesh Agarwal * DMIC L1 17*878f4c36SAnimesh Agarwal * DMIC R1 18*878f4c36SAnimesh Agarwal * DMIC L2 19*878f4c36SAnimesh Agarwal * DMIC R2 20*878f4c36SAnimesh Agarwal * IN1P 21*878f4c36SAnimesh Agarwal * IN1N 22*878f4c36SAnimesh Agarwal * IN2P 23*878f4c36SAnimesh Agarwal * IN2N 24*878f4c36SAnimesh Agarwal * IN3P 25*878f4c36SAnimesh Agarwal * IN3N 26*878f4c36SAnimesh Agarwal * IN4P 27*878f4c36SAnimesh Agarwal * IN4N 28*878f4c36SAnimesh Agarwal * HPOL 29*878f4c36SAnimesh Agarwal * HPOR 30*878f4c36SAnimesh Agarwal * SPOL 31*878f4c36SAnimesh Agarwal * SPOR 32*878f4c36SAnimesh Agarwal * LOUTL 33*878f4c36SAnimesh Agarwal * LOUTR 34*878f4c36SAnimesh Agarwal * MONOOUT 35*878f4c36SAnimesh Agarwal * PDML 36*878f4c36SAnimesh Agarwal * PDMR 37*878f4c36SAnimesh Agarwal * SPDIF 38*878f4c36SAnimesh Agarwal 39*878f4c36SAnimesh AgarwalallOf: 40*878f4c36SAnimesh Agarwal - $ref: dai-common.yaml# 41*878f4c36SAnimesh Agarwal 42*878f4c36SAnimesh Agarwalproperties: 43*878f4c36SAnimesh Agarwal compatible: 44*878f4c36SAnimesh Agarwal enum: 45*878f4c36SAnimesh Agarwal - realtek,rt5659 46*878f4c36SAnimesh Agarwal - realtek,rt5658 47*878f4c36SAnimesh Agarwal 48*878f4c36SAnimesh Agarwal reg: 49*878f4c36SAnimesh Agarwal maxItems: 1 50*878f4c36SAnimesh Agarwal 51*878f4c36SAnimesh Agarwal interrupts: 52*878f4c36SAnimesh Agarwal maxItems: 1 53*878f4c36SAnimesh Agarwal 54*878f4c36SAnimesh Agarwal clocks: 55*878f4c36SAnimesh Agarwal maxItems: 1 56*878f4c36SAnimesh Agarwal 57*878f4c36SAnimesh Agarwal clock-names: 58*878f4c36SAnimesh Agarwal const: mclk 59*878f4c36SAnimesh Agarwal 60*878f4c36SAnimesh Agarwal realtek,dmic1-data-pin: 61*878f4c36SAnimesh Agarwal $ref: /schemas/types.yaml#/definitions/uint32 62*878f4c36SAnimesh Agarwal enum: 63*878f4c36SAnimesh Agarwal - 0 # dmic1 is not used 64*878f4c36SAnimesh Agarwal - 1 # using IN2N pin as dmic1 data pin 65*878f4c36SAnimesh Agarwal - 2 # using GPIO5 pin as dmic1 data pin 66*878f4c36SAnimesh Agarwal - 3 # using GPIO9 pin as dmic1 data pin 67*878f4c36SAnimesh Agarwal - 4 # using GPIO11 pin as dmic1 data pin 68*878f4c36SAnimesh Agarwal description: Specify which pin to be used as DMIC1 data pin. 69*878f4c36SAnimesh Agarwal default: 0 70*878f4c36SAnimesh Agarwal 71*878f4c36SAnimesh Agarwal realtek,dmic2-data-pin: 72*878f4c36SAnimesh Agarwal $ref: /schemas/types.yaml#/definitions/uint32 73*878f4c36SAnimesh Agarwal enum: 74*878f4c36SAnimesh Agarwal - 0 # dmic2 is not used 75*878f4c36SAnimesh Agarwal - 1 # using IN2P pin as dmic2 data pin 76*878f4c36SAnimesh Agarwal - 2 # using GPIO6 pin as dmic2 data pin 77*878f4c36SAnimesh Agarwal - 3 # using GPIO10 pin as dmic2 data pin 78*878f4c36SAnimesh Agarwal - 4 # using GPIO12 pin as dmic2 data pin 79*878f4c36SAnimesh Agarwal description: Specify which pin to be used as DMIC2 data pin. 80*878f4c36SAnimesh Agarwal default: 0 81*878f4c36SAnimesh Agarwal 82*878f4c36SAnimesh Agarwal realtek,jd-src: 83*878f4c36SAnimesh Agarwal $ref: /schemas/types.yaml#/definitions/uint32 84*878f4c36SAnimesh Agarwal enum: 85*878f4c36SAnimesh Agarwal - 0 # No JD is used 86*878f4c36SAnimesh Agarwal - 1 # using JD3 as JD source 87*878f4c36SAnimesh Agarwal - 2 # JD source for Intel HDA header 88*878f4c36SAnimesh Agarwal description: Specify which JD source be used. 89*878f4c36SAnimesh Agarwal default: 0 90*878f4c36SAnimesh Agarwal 91*878f4c36SAnimesh Agarwal realtek,ldo1-en-gpios: 92*878f4c36SAnimesh Agarwal maxItems: 1 93*878f4c36SAnimesh Agarwal description: CODEC's LDO1_EN pin. 94*878f4c36SAnimesh Agarwal 95*878f4c36SAnimesh Agarwal realtek,reset-gpios: 96*878f4c36SAnimesh Agarwal maxItems: 1 97*878f4c36SAnimesh Agarwal description: CODEC's RESET pin. 98*878f4c36SAnimesh Agarwal 99*878f4c36SAnimesh Agarwal ports: 100*878f4c36SAnimesh Agarwal $ref: /schemas/graph.yaml#/properties/ports 101*878f4c36SAnimesh Agarwal 102*878f4c36SAnimesh Agarwal port: 103*878f4c36SAnimesh Agarwal $ref: audio-graph-port.yaml# 104*878f4c36SAnimesh Agarwal unevaluatedProperties: false 105*878f4c36SAnimesh Agarwal 106*878f4c36SAnimesh Agarwalrequired: 107*878f4c36SAnimesh Agarwal - compatible 108*878f4c36SAnimesh Agarwal - reg 109*878f4c36SAnimesh Agarwal - interrupts 110*878f4c36SAnimesh Agarwal 111*878f4c36SAnimesh AgarwalunevaluatedProperties: false 112*878f4c36SAnimesh Agarwal 113*878f4c36SAnimesh Agarwalexamples: 114*878f4c36SAnimesh Agarwal - | 115*878f4c36SAnimesh Agarwal #include <dt-bindings/gpio/gpio.h> 116*878f4c36SAnimesh Agarwal #include <dt-bindings/interrupt-controller/irq.h> 117*878f4c36SAnimesh Agarwal 118*878f4c36SAnimesh Agarwal i2c { 119*878f4c36SAnimesh Agarwal #address-cells = <1>; 120*878f4c36SAnimesh Agarwal #size-cells = <0>; 121*878f4c36SAnimesh Agarwal 122*878f4c36SAnimesh Agarwal codec@1b { 123*878f4c36SAnimesh Agarwal compatible = "realtek,rt5659"; 124*878f4c36SAnimesh Agarwal reg = <0x1b>; 125*878f4c36SAnimesh Agarwal interrupt-parent = <&gpio>; 126*878f4c36SAnimesh Agarwal interrupts = <3 IRQ_TYPE_LEVEL_HIGH>; 127*878f4c36SAnimesh Agarwal realtek,ldo1-en-gpios = <&gpio 3 GPIO_ACTIVE_HIGH>; 128*878f4c36SAnimesh Agarwal }; 129*878f4c36SAnimesh Agarwal }; 130