1*4882a593SmuzhiyunCS42L42 audio CODEC 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunRequired properties: 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun - compatible : "cirrus,cs42l42" 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun - reg : the I2C address of the device for I2C. 8*4882a593Smuzhiyun 9*4882a593Smuzhiyun - VP-supply, VCP-supply, VD_FILT-supply, VL-supply, VA-supply : 10*4882a593Smuzhiyun power supplies for the device, as covered in 11*4882a593Smuzhiyun Documentation/devicetree/bindings/regulator/regulator.txt. 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunOptional properties: 14*4882a593Smuzhiyun 15*4882a593Smuzhiyun - reset-gpios : a GPIO spec for the reset pin. If specified, it will be 16*4882a593Smuzhiyun deasserted before communication to the codec starts. 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun - interrupts : IRQ line info CS42L42. 19*4882a593Smuzhiyun (See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt 20*4882a593Smuzhiyun for further information relating to interrupt properties) 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun - cirrus,ts-inv : Boolean property. For jacks that invert the tip sense 23*4882a593Smuzhiyun polarity. Normal jacks will short tip sense pin to HS1 when headphones are 24*4882a593Smuzhiyun plugged in and leave tip sense floating when not plugged in. Inverting jacks 25*4882a593Smuzhiyun short tip sense when unplugged and float when plugged in. 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun 0 = (Default) Non-inverted 28*4882a593Smuzhiyun 1 = Inverted 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun - cirrus,ts-dbnc-rise : Debounce the rising edge of TIP_SENSE_PLUG. With no 31*4882a593Smuzhiyun debounce, the tip sense pin might be noisy on a plug event. 32*4882a593Smuzhiyun 33*4882a593Smuzhiyun 0 - 0ms, 34*4882a593Smuzhiyun 1 - 125ms, 35*4882a593Smuzhiyun 2 - 250ms, 36*4882a593Smuzhiyun 3 - 500ms, 37*4882a593Smuzhiyun 4 - 750ms, 38*4882a593Smuzhiyun 5 - (Default) 1s, 39*4882a593Smuzhiyun 6 - 1.25s, 40*4882a593Smuzhiyun 7 - 1.5s, 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun - cirrus,ts-dbnc-fall : Debounce the falling edge of TIP_SENSE_UNPLUG. 43*4882a593Smuzhiyun With no debounce, the tip sense pin might be noisy on an unplug event. 44*4882a593Smuzhiyun 45*4882a593Smuzhiyun 0 - 0ms, 46*4882a593Smuzhiyun 1 - 125ms, 47*4882a593Smuzhiyun 2 - 250ms, 48*4882a593Smuzhiyun 3 - 500ms, 49*4882a593Smuzhiyun 4 - 750ms, 50*4882a593Smuzhiyun 5 - (Default) 1s, 51*4882a593Smuzhiyun 6 - 1.25s, 52*4882a593Smuzhiyun 7 - 1.5s, 53*4882a593Smuzhiyun 54*4882a593Smuzhiyun - cirrus,btn-det-init-dbnce : This sets how long the driver sleeps after 55*4882a593Smuzhiyun enabling button detection interrupts. After auto-detection and before 56*4882a593Smuzhiyun servicing button interrupts, the HS bias needs time to settle. If you 57*4882a593Smuzhiyun don't wait, there is possibility for erroneous button interrupt. 58*4882a593Smuzhiyun 59*4882a593Smuzhiyun 0ms - 200ms, 60*4882a593Smuzhiyun Default = 100ms 61*4882a593Smuzhiyun 62*4882a593Smuzhiyun - cirrus,btn-det-event-dbnce : This sets how long the driver delays after 63*4882a593Smuzhiyun receiving a button press interrupt. With level detect interrupts, you want 64*4882a593Smuzhiyun to wait a small amount of time to make sure the button press is making a 65*4882a593Smuzhiyun clean connection with the bias resistors. 66*4882a593Smuzhiyun 67*4882a593Smuzhiyun 0ms - 20ms, 68*4882a593Smuzhiyun Default = 10ms 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun - cirrus,bias-lvls : For a level-detect headset button scheme, each button 71*4882a593Smuzhiyun will bias the mic pin to a certain voltage. To determine which button was 72*4882a593Smuzhiyun pressed, the driver will compare this biased voltage to sequential, 73*4882a593Smuzhiyun decreasing voltages and will stop when a comparator is tripped, 74*4882a593Smuzhiyun indicating a comparator voltage < bias voltage. This value represents a 75*4882a593Smuzhiyun percentage of the internally generated HS bias voltage. For different 76*4882a593Smuzhiyun hardware setups, a designer might want to tweak this. This is an array of 77*4882a593Smuzhiyun descending values for the comparator voltage. 78*4882a593Smuzhiyun 79*4882a593Smuzhiyun Array of 4 values 80*4882a593Smuzhiyun Each 0-63 81*4882a593Smuzhiyun < x1 x2 x3 x4 > 82*4882a593Smuzhiyun Default = < 15 8 4 1> 83*4882a593Smuzhiyun 84*4882a593Smuzhiyun 85*4882a593SmuzhiyunExample: 86*4882a593Smuzhiyun 87*4882a593Smuzhiyuncs42l42: cs42l42@48 { 88*4882a593Smuzhiyun compatible = "cirrus,cs42l42"; 89*4882a593Smuzhiyun reg = <0x48>; 90*4882a593Smuzhiyun VA-supply = <&dummy_vreg>; 91*4882a593Smuzhiyun VP-supply = <&dummy_vreg>; 92*4882a593Smuzhiyun VCP-supply = <&dummy_vreg>; 93*4882a593Smuzhiyun VD_FILT-supply = <&dummy_vreg>; 94*4882a593Smuzhiyun VL-supply = <&dummy_vreg>; 95*4882a593Smuzhiyun 96*4882a593Smuzhiyun reset-gpios = <&axi_gpio_0 1 0>; 97*4882a593Smuzhiyun interrupt-parent = <&gpio0>; 98*4882a593Smuzhiyun interrupts = <55 8> 99*4882a593Smuzhiyun 100*4882a593Smuzhiyun cirrus,ts-inv = <0x00>; 101*4882a593Smuzhiyun cirrus,ts-dbnc-rise = <0x05>; 102*4882a593Smuzhiyun cirrus,ts-dbnc-fall = <0x00>; 103*4882a593Smuzhiyun cirrus,btn-det-init-dbnce = <100>; 104*4882a593Smuzhiyun cirrus,btn-det-event-dbnce = <10>; 105*4882a593Smuzhiyun cirrus,bias-lvls = <0x0F 0x08 0x04 0x01>; 106*4882a593Smuzhiyun cirrus,hs-bias-ramp-rate = <0x02>; 107*4882a593Smuzhiyun}; 108