1*c66ec88fSEmmanuel VadotCirrus Logic CS4271 DT bindings 2*c66ec88fSEmmanuel Vadot 3*c66ec88fSEmmanuel VadotThis driver supports both the I2C and the SPI bus. 4*c66ec88fSEmmanuel Vadot 5*c66ec88fSEmmanuel VadotRequired properties: 6*c66ec88fSEmmanuel Vadot 7*c66ec88fSEmmanuel Vadot - compatible: "cirrus,cs4271" 8*c66ec88fSEmmanuel Vadot 9*c66ec88fSEmmanuel VadotFor required properties on SPI, please consult 10*c66ec88fSEmmanuel VadotDocumentation/devicetree/bindings/spi/spi-bus.txt 11*c66ec88fSEmmanuel Vadot 12*c66ec88fSEmmanuel VadotRequired properties on I2C: 13*c66ec88fSEmmanuel Vadot 14*c66ec88fSEmmanuel Vadot - reg: the i2c address 15*c66ec88fSEmmanuel Vadot 16*c66ec88fSEmmanuel Vadot 17*c66ec88fSEmmanuel VadotOptional properties: 18*c66ec88fSEmmanuel Vadot 19*c66ec88fSEmmanuel Vadot - reset-gpio: a GPIO spec to define which pin is connected to the chip's 20*c66ec88fSEmmanuel Vadot !RESET pin 21*c66ec88fSEmmanuel Vadot - cirrus,amuteb-eq-bmutec: When given, the Codec's AMUTEB=BMUTEC flag 22*c66ec88fSEmmanuel Vadot is enabled. 23*c66ec88fSEmmanuel Vadot - cirrus,enable-soft-reset: 24*c66ec88fSEmmanuel Vadot The CS4271 requires its LRCLK and MCLK to be stable before its RESET 25*c66ec88fSEmmanuel Vadot line is de-asserted. That also means that clocks cannot be changed 26*c66ec88fSEmmanuel Vadot without putting the chip back into hardware reset, which also requires 27*c66ec88fSEmmanuel Vadot a complete re-initialization of all registers. 28*c66ec88fSEmmanuel Vadot 29*c66ec88fSEmmanuel Vadot One (undocumented) workaround is to assert and de-assert the PDN bit 30*c66ec88fSEmmanuel Vadot in the MODE2 register. This workaround can be enabled with this DT 31*c66ec88fSEmmanuel Vadot property. 32*c66ec88fSEmmanuel Vadot 33*c66ec88fSEmmanuel Vadot Note that this is not needed in case the clocks are stable 34*c66ec88fSEmmanuel Vadot throughout the entire runtime of the codec. 35*c66ec88fSEmmanuel Vadot 36*c66ec88fSEmmanuel Vadot - vd-supply: Digital power 37*c66ec88fSEmmanuel Vadot - vl-supply: Logic power 38*c66ec88fSEmmanuel Vadot - va-supply: Analog Power 39*c66ec88fSEmmanuel Vadot 40*c66ec88fSEmmanuel VadotExamples: 41*c66ec88fSEmmanuel Vadot 42*c66ec88fSEmmanuel Vadot codec_i2c: cs4271@10 { 43*c66ec88fSEmmanuel Vadot compatible = "cirrus,cs4271"; 44*c66ec88fSEmmanuel Vadot reg = <0x10>; 45*c66ec88fSEmmanuel Vadot reset-gpio = <&gpio 23 0>; 46*c66ec88fSEmmanuel Vadot vd-supply = <&vdd_3v3_reg>; 47*c66ec88fSEmmanuel Vadot vl-supply = <&vdd_3v3_reg>; 48*c66ec88fSEmmanuel Vadot va-supply = <&vdd_3v3_reg>; 49*c66ec88fSEmmanuel Vadot }; 50*c66ec88fSEmmanuel Vadot 51*c66ec88fSEmmanuel Vadot codec_spi: cs4271@0 { 52*c66ec88fSEmmanuel Vadot compatible = "cirrus,cs4271"; 53*c66ec88fSEmmanuel Vadot reg = <0x0>; 54*c66ec88fSEmmanuel Vadot reset-gpio = <&gpio 23 0>; 55*c66ec88fSEmmanuel Vadot spi-max-frequency = <6000000>; 56*c66ec88fSEmmanuel Vadot }; 57*c66ec88fSEmmanuel Vadot 58