1c66ec88fSEmmanuel VadotDevicetree bindings for Maxim MAX9485 Programmable Audio Clock Generator 2c66ec88fSEmmanuel Vadot 3c66ec88fSEmmanuel VadotThis device exposes 4 clocks in total: 4c66ec88fSEmmanuel Vadot 5c66ec88fSEmmanuel Vadot- MAX9485_MCLKOUT: A gated, buffered output of the input clock of 27 MHz 6c66ec88fSEmmanuel Vadot- MAX9485_CLKOUT: A PLL that can be configured to 16 different discrete 7c66ec88fSEmmanuel Vadot frequencies 8c66ec88fSEmmanuel Vadot- MAX9485_CLKOUT[1,2]: Two gated outputs for MAX9485_CLKOUT 9c66ec88fSEmmanuel Vadot 10c66ec88fSEmmanuel VadotMAX9485_CLKOUT[1,2] are children of MAX9485_CLKOUT which upchain all rate set 11c66ec88fSEmmanuel Vadotrequests. 12c66ec88fSEmmanuel Vadot 13c66ec88fSEmmanuel VadotRequired properties: 14c66ec88fSEmmanuel Vadot- compatible: "maxim,max9485" 15*aa1a8ff2SEmmanuel Vadot- clocks: Input clock, must provide 27.000 MHz 16c66ec88fSEmmanuel Vadot- clock-names: Must be set to "xclk" 17c66ec88fSEmmanuel Vadot- #clock-cells: From common clock binding; shall be set to 1 18c66ec88fSEmmanuel Vadot 19c66ec88fSEmmanuel VadotOptional properties: 20c66ec88fSEmmanuel Vadot- reset-gpios: GPIO descriptor connected to the #RESET input pin 21c66ec88fSEmmanuel Vadot- vdd-supply: A regulator node for Vdd 22c66ec88fSEmmanuel Vadot- clock-output-names: Name of output clocks, as defined in common clock 23c66ec88fSEmmanuel Vadot bindings 24c66ec88fSEmmanuel Vadot 25c66ec88fSEmmanuel VadotIf not explicitly set, the output names are "mclkout", "clkout", "clkout1" 26c66ec88fSEmmanuel Vadotand "clkout2". 27c66ec88fSEmmanuel Vadot 28c66ec88fSEmmanuel VadotClocks are defined as preprocessor macros in the dt-binding header. 29c66ec88fSEmmanuel Vadot 30c66ec88fSEmmanuel VadotExample: 31c66ec88fSEmmanuel Vadot 32c66ec88fSEmmanuel Vadot #include <dt-bindings/clock/maxim,max9485.h> 33c66ec88fSEmmanuel Vadot 34c66ec88fSEmmanuel Vadot xo-27mhz: xo-27mhz { 35c66ec88fSEmmanuel Vadot compatible = "fixed-clock"; 36c66ec88fSEmmanuel Vadot #clock-cells = <0>; 37c66ec88fSEmmanuel Vadot clock-frequency = <27000000>; 38c66ec88fSEmmanuel Vadot }; 39c66ec88fSEmmanuel Vadot 40c66ec88fSEmmanuel Vadot &i2c0 { 41c66ec88fSEmmanuel Vadot max9485: audio-clock@63 { 42c66ec88fSEmmanuel Vadot reg = <0x63>; 43c66ec88fSEmmanuel Vadot compatible = "maxim,max9485"; 44c66ec88fSEmmanuel Vadot clock-names = "xclk"; 45c66ec88fSEmmanuel Vadot clocks = <&xo-27mhz>; 46c66ec88fSEmmanuel Vadot reset-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; 47c66ec88fSEmmanuel Vadot vdd-supply = <&3v3-reg>; 48c66ec88fSEmmanuel Vadot #clock-cells = <1>; 49c66ec88fSEmmanuel Vadot }; 50c66ec88fSEmmanuel Vadot }; 51c66ec88fSEmmanuel Vadot 52c66ec88fSEmmanuel Vadot // Clock consumer node 53c66ec88fSEmmanuel Vadot 54c66ec88fSEmmanuel Vadot foo@0 { 55c66ec88fSEmmanuel Vadot compatible = "bar,foo"; 56c66ec88fSEmmanuel Vadot /* ... */ 57c66ec88fSEmmanuel Vadot clock-names = "foo-input-clk"; 58c66ec88fSEmmanuel Vadot clocks = <&max9485 MAX9485_CLKOUT1>; 59c66ec88fSEmmanuel Vadot }; 60