1*4381b88bSAnimesh Agarwal# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*4381b88bSAnimesh Agarwal%YAML 1.2 3*4381b88bSAnimesh Agarwal--- 4*4381b88bSAnimesh Agarwal$id: http://devicetree.org/schemas/sound/realtek,rt5677.yaml# 5*4381b88bSAnimesh Agarwal$schema: http://devicetree.org/meta-schemas/core.yaml# 6*4381b88bSAnimesh Agarwal 7*4381b88bSAnimesh Agarwaltitle: RT5677 audio CODEC 8*4381b88bSAnimesh Agarwal 9*4381b88bSAnimesh Agarwalmaintainers: 10*4381b88bSAnimesh Agarwal - Animesh Agarwal <animeshagarwal28@gmail.com> 11*4381b88bSAnimesh Agarwal 12*4381b88bSAnimesh Agarwaldescription: | 13*4381b88bSAnimesh Agarwal This device supports I2C only. 14*4381b88bSAnimesh Agarwal 15*4381b88bSAnimesh Agarwal Pins on the device (for linking into audio routes): 16*4381b88bSAnimesh Agarwal * IN1P 17*4381b88bSAnimesh Agarwal * IN1N 18*4381b88bSAnimesh Agarwal * IN2P 19*4381b88bSAnimesh Agarwal * IN2N 20*4381b88bSAnimesh Agarwal * MICBIAS1 21*4381b88bSAnimesh Agarwal * DMIC1 22*4381b88bSAnimesh Agarwal * DMIC2 23*4381b88bSAnimesh Agarwal * DMIC3 24*4381b88bSAnimesh Agarwal * DMIC4 25*4381b88bSAnimesh Agarwal * LOUT1 26*4381b88bSAnimesh Agarwal * LOUT2 27*4381b88bSAnimesh Agarwal * LOUT3 28*4381b88bSAnimesh Agarwal 29*4381b88bSAnimesh AgarwalallOf: 30*4381b88bSAnimesh Agarwal - $ref: dai-common.yaml# 31*4381b88bSAnimesh Agarwal 32*4381b88bSAnimesh Agarwalproperties: 33*4381b88bSAnimesh Agarwal compatible: 34*4381b88bSAnimesh Agarwal const: realtek,rt5677 35*4381b88bSAnimesh Agarwal 36*4381b88bSAnimesh Agarwal reg: 37*4381b88bSAnimesh Agarwal maxItems: 1 38*4381b88bSAnimesh Agarwal 39*4381b88bSAnimesh Agarwal interrupts: 40*4381b88bSAnimesh Agarwal maxItems: 1 41*4381b88bSAnimesh Agarwal 42*4381b88bSAnimesh Agarwal gpio-controller: true 43*4381b88bSAnimesh Agarwal 44*4381b88bSAnimesh Agarwal '#gpio-cells': 45*4381b88bSAnimesh Agarwal const: 2 46*4381b88bSAnimesh Agarwal 47*4381b88bSAnimesh Agarwal realtek,pow-ldo2-gpio: 48*4381b88bSAnimesh Agarwal maxItems: 1 49*4381b88bSAnimesh Agarwal description: CODEC's POW_LDO2 pin. 50*4381b88bSAnimesh Agarwal 51*4381b88bSAnimesh Agarwal realtek,reset-gpio: 52*4381b88bSAnimesh Agarwal maxItems: 1 53*4381b88bSAnimesh Agarwal description: CODEC's RESET pin. Active low. 54*4381b88bSAnimesh Agarwal 55*4381b88bSAnimesh Agarwal realtek,gpio-config: 56*4381b88bSAnimesh Agarwal description: | 57*4381b88bSAnimesh Agarwal Array of six 8bit elements that configures GPIO. 58*4381b88bSAnimesh Agarwal 0 - floating (reset value) 59*4381b88bSAnimesh Agarwal 1 - pull down 60*4381b88bSAnimesh Agarwal 2 - pull up 61*4381b88bSAnimesh Agarwal $ref: /schemas/types.yaml#/definitions/uint32-array 62*4381b88bSAnimesh Agarwal minItems: 6 63*4381b88bSAnimesh Agarwal maxItems: 6 64*4381b88bSAnimesh Agarwal items: 65*4381b88bSAnimesh Agarwal maximum: 2 66*4381b88bSAnimesh Agarwal 67*4381b88bSAnimesh Agarwal realtek,jd1-gpio: 68*4381b88bSAnimesh Agarwal $ref: /schemas/types.yaml#/definitions/uint32 69*4381b88bSAnimesh Agarwal enum: 70*4381b88bSAnimesh Agarwal - 0 # OFF 71*4381b88bSAnimesh Agarwal - 1 # GPIO1 for jd1. 72*4381b88bSAnimesh Agarwal - 2 # GPIO2 for jd1. 73*4381b88bSAnimesh Agarwal - 3 # GPIO3 for jd1. 74*4381b88bSAnimesh Agarwal description: Configures GPIO Mic Jack detection 1. 75*4381b88bSAnimesh Agarwal 76*4381b88bSAnimesh Agarwal realtek,jd2-gpio: 77*4381b88bSAnimesh Agarwal $ref: /schemas/types.yaml#/definitions/uint32 78*4381b88bSAnimesh Agarwal enum: 79*4381b88bSAnimesh Agarwal - 0 # OFF 80*4381b88bSAnimesh Agarwal - 1 # GPIO4 for jd2. 81*4381b88bSAnimesh Agarwal - 2 # GPIO5 for jd2. 82*4381b88bSAnimesh Agarwal - 3 # GPIO6 for jd2. 83*4381b88bSAnimesh Agarwal description: Configures GPIO Mic Jack detection 2. 84*4381b88bSAnimesh Agarwal 85*4381b88bSAnimesh Agarwal realtek,jd3-gpio: 86*4381b88bSAnimesh Agarwal $ref: /schemas/types.yaml#/definitions/uint32 87*4381b88bSAnimesh Agarwal enum: 88*4381b88bSAnimesh Agarwal - 0 # OFF 89*4381b88bSAnimesh Agarwal - 1 # GPIO4 for jd3. 90*4381b88bSAnimesh Agarwal - 2 # GPIO5 for jd3. 91*4381b88bSAnimesh Agarwal - 3 # GPIO6 for jd3. 92*4381b88bSAnimesh Agarwal description: Configures GPIO Mic Jack detection 3. 93*4381b88bSAnimesh Agarwal 94*4381b88bSAnimesh AgarwalpatternProperties: 95*4381b88bSAnimesh Agarwal '^realtek,in[1-2]-differential$': 96*4381b88bSAnimesh Agarwal type: boolean 97*4381b88bSAnimesh Agarwal description: Indicate MIC1/2 input are differential, rather than 98*4381b88bSAnimesh Agarwal single-ended. 99*4381b88bSAnimesh Agarwal 100*4381b88bSAnimesh Agarwal '^realtek,lout[1-3]-differential$': 101*4381b88bSAnimesh Agarwal type: boolean 102*4381b88bSAnimesh Agarwal description: Indicate LOUT1/2/3 outputs are differential, rather than 103*4381b88bSAnimesh Agarwal single-ended. 104*4381b88bSAnimesh Agarwal 105*4381b88bSAnimesh Agarwalrequired: 106*4381b88bSAnimesh Agarwal - compatible 107*4381b88bSAnimesh Agarwal - reg 108*4381b88bSAnimesh Agarwal - interrupts 109*4381b88bSAnimesh Agarwal - gpio-controller 110*4381b88bSAnimesh Agarwal - '#gpio-cells' 111*4381b88bSAnimesh Agarwal 112*4381b88bSAnimesh AgarwalunevaluatedProperties: false 113*4381b88bSAnimesh Agarwal 114*4381b88bSAnimesh Agarwalexamples: 115*4381b88bSAnimesh Agarwal - | 116*4381b88bSAnimesh Agarwal #include <dt-bindings/gpio/gpio.h> 117*4381b88bSAnimesh Agarwal #include <dt-bindings/interrupt-controller/irq.h> 118*4381b88bSAnimesh Agarwal 119*4381b88bSAnimesh Agarwal i2c { 120*4381b88bSAnimesh Agarwal #address-cells = <1>; 121*4381b88bSAnimesh Agarwal #size-cells = <0>; 122*4381b88bSAnimesh Agarwal 123*4381b88bSAnimesh Agarwal codec@2c { 124*4381b88bSAnimesh Agarwal compatible = "realtek,rt5677"; 125*4381b88bSAnimesh Agarwal reg = <0x2c>; 126*4381b88bSAnimesh Agarwal interrupt-parent = <&gpio>; 127*4381b88bSAnimesh Agarwal interrupts = <3 IRQ_TYPE_LEVEL_HIGH>; 128*4381b88bSAnimesh Agarwal gpio-controller; 129*4381b88bSAnimesh Agarwal #gpio-cells = <2>; 130*4381b88bSAnimesh Agarwal realtek,pow-ldo2-gpio = <&gpio 3 GPIO_ACTIVE_HIGH>; 131*4381b88bSAnimesh Agarwal realtek,reset-gpio = <&gpio 3 GPIO_ACTIVE_LOW>; 132*4381b88bSAnimesh Agarwal realtek,in1-differential; 133*4381b88bSAnimesh Agarwal realtek,gpio-config = <0 0 0 0 0 2>; 134*4381b88bSAnimesh Agarwal }; 135*4381b88bSAnimesh Agarwal }; 136