1c66ec88fSEmmanuel VadotBinding for Silicon Labs Si5340, Si5341 Si5342, Si5344 and Si5345 programmable 2c66ec88fSEmmanuel Vadoti2c clock generator. 3c66ec88fSEmmanuel Vadot 4c66ec88fSEmmanuel VadotReference 5c66ec88fSEmmanuel Vadot[1] Si5341 Data Sheet 6c66ec88fSEmmanuel Vadot https://www.silabs.com/documents/public/data-sheets/Si5341-40-D-DataSheet.pdf 7c66ec88fSEmmanuel Vadot[2] Si5341 Reference Manual 8c66ec88fSEmmanuel Vadot https://www.silabs.com/documents/public/reference-manuals/Si5341-40-D-RM.pdf 9c66ec88fSEmmanuel Vadot[3] Si5345 Reference Manual 10c66ec88fSEmmanuel Vadot https://www.silabs.com/documents/public/reference-manuals/Si5345-44-42-D-RM.pdf 11c66ec88fSEmmanuel Vadot 12c66ec88fSEmmanuel VadotThe Si5341 and Si5340 are programmable i2c clock generators with up to 10 output 13c66ec88fSEmmanuel Vadotclocks. The chip contains a PLL that sources 5 (or 4) multisynth clocks, which 14c66ec88fSEmmanuel Vadotin turn can be directed to any of the 10 (or 4) outputs through a divider. 15c66ec88fSEmmanuel VadotThe internal structure of the clock generators can be found in [2]. 16c66ec88fSEmmanuel VadotThe Si5345 is similar to the Si5341 with the addition of fractional input 17c66ec88fSEmmanuel Vadotdividers and automatic input selection, as described in [3]. 18c66ec88fSEmmanuel VadotThe Si5342 and Si5344 are smaller versions of the Si5345, with 2 or 4 outputs. 19c66ec88fSEmmanuel Vadot 20c66ec88fSEmmanuel VadotThe driver can be used in "as is" mode, reading the current settings from the 21c66ec88fSEmmanuel Vadotchip at boot, in case you have a (pre-)programmed device. If the PLL is not 22c66ec88fSEmmanuel Vadotconfigured when the driver probes, it assumes the driver must fully initialize 23c66ec88fSEmmanuel Vadotit. 24c66ec88fSEmmanuel Vadot 25c66ec88fSEmmanuel VadotThe device type, speed grade and revision are determined runtime by probing. 26c66ec88fSEmmanuel Vadot 27*5956d97fSEmmanuel VadotThe driver currently does not support any fancy input configurations. They can 28*5956d97fSEmmanuel Vadotstill be programmed into the chip and the driver will leave them "as is". 29c66ec88fSEmmanuel Vadot 30c66ec88fSEmmanuel Vadot==I2C device node== 31c66ec88fSEmmanuel Vadot 32c66ec88fSEmmanuel VadotRequired properties: 33c66ec88fSEmmanuel Vadot- compatible: shall be one of the following: 34c66ec88fSEmmanuel Vadot "silabs,si5340" - Si5340 A/B/C/D 35c66ec88fSEmmanuel Vadot "silabs,si5341" - Si5341 A/B/C/D 36c66ec88fSEmmanuel Vadot "silabs,si5342" - Si5342 A/B/C/D 37c66ec88fSEmmanuel Vadot "silabs,si5344" - Si5344 A/B/C/D 38c66ec88fSEmmanuel Vadot "silabs,si5345" - Si5345 A/B/C/D 39c66ec88fSEmmanuel Vadot- reg: i2c device address, usually 0x74 40c66ec88fSEmmanuel Vadot- #clock-cells: from common clock binding; shall be set to 2. 41c66ec88fSEmmanuel Vadot The first value is "0" for outputs, "1" for synthesizers. 42c66ec88fSEmmanuel Vadot The second value is the output or synthesizer index. 43c66ec88fSEmmanuel Vadot- clocks: from common clock binding; list of parent clock handles, 44c66ec88fSEmmanuel Vadot corresponding to inputs. Use a fixed clock for the "xtal" input. 45c66ec88fSEmmanuel Vadot At least one must be present. 46c66ec88fSEmmanuel Vadot- clock-names: One of: "xtal", "in0", "in1", "in2" 47c66ec88fSEmmanuel Vadot 48c66ec88fSEmmanuel VadotOptional properties: 49*5956d97fSEmmanuel Vadot- vdd-supply: Regulator node for VDD 50c66ec88fSEmmanuel Vadot- vdda-supply: Regulator node for VDDA 51c66ec88fSEmmanuel Vadot- vdds-supply: Regulator node for VDDS 52c66ec88fSEmmanuel Vadot- silabs,pll-m-num, silabs,pll-m-den: Numerator and denominator for PLL 53c66ec88fSEmmanuel Vadot feedback divider. Must be such that the PLL output is in the valid range. For 54c66ec88fSEmmanuel Vadot example, to create 14GHz from a 48MHz xtal, use m-num=14000 and m-den=48. Only 55c66ec88fSEmmanuel Vadot the fraction matters, using 3500 and 12 will deliver the exact same result. 56c66ec88fSEmmanuel Vadot If these are not specified, and the PLL is not yet programmed when the driver 57c66ec88fSEmmanuel Vadot probes, the PLL will be set to 14GHz. 58c66ec88fSEmmanuel Vadot- silabs,reprogram: When present, the driver will always assume the device must 59c66ec88fSEmmanuel Vadot be initialized, and always performs the soft-reset routine. Since this will 60c66ec88fSEmmanuel Vadot temporarily stop all output clocks, don't do this if the chip is generating 61c66ec88fSEmmanuel Vadot the CPU clock for example. 62*5956d97fSEmmanuel Vadot- silabs,xaxb-ext-clk: When present, indicates that the XA/XB pins are used 63*5956d97fSEmmanuel Vadot in EXTCLK (external reference clock) rather than XTAL (crystal) mode. 64c66ec88fSEmmanuel Vadot- interrupts: Interrupt for INTRb pin. 65*5956d97fSEmmanuel Vadot- silabs,iovdd-33: When present, indicates that the I2C lines are using 3.3V 66*5956d97fSEmmanuel Vadot rather than 1.8V thresholds. 67*5956d97fSEmmanuel Vadot- vddoX-supply (where X is an output index): Regulator node for VDDO for the 68*5956d97fSEmmanuel Vadot specified output. The driver selects the output VDD_SEL setting based on this 69*5956d97fSEmmanuel Vadot voltage. 70c66ec88fSEmmanuel Vadot- #address-cells: shall be set to 1. 71c66ec88fSEmmanuel Vadot- #size-cells: shall be set to 0. 72c66ec88fSEmmanuel Vadot 73c66ec88fSEmmanuel Vadot 74c66ec88fSEmmanuel Vadot== Child nodes: Outputs == 75c66ec88fSEmmanuel Vadot 76c66ec88fSEmmanuel VadotThe child nodes list the output clocks. 77c66ec88fSEmmanuel Vadot 78c66ec88fSEmmanuel VadotEach of the clock outputs can be overwritten individually by using a child node. 79c66ec88fSEmmanuel VadotIf a child node for a clock output is not set, the configuration remains 80c66ec88fSEmmanuel Vadotunchanged. 81c66ec88fSEmmanuel Vadot 82c66ec88fSEmmanuel VadotRequired child node properties: 83c66ec88fSEmmanuel Vadot- reg: number of clock output. 84c66ec88fSEmmanuel Vadot 85c66ec88fSEmmanuel VadotOptional child node properties: 86c66ec88fSEmmanuel Vadot- silabs,format: Output format, one of: 87c66ec88fSEmmanuel Vadot 1 = differential (defaults to LVDS levels) 88c66ec88fSEmmanuel Vadot 2 = low-power (defaults to HCSL levels) 89c66ec88fSEmmanuel Vadot 4 = LVCMOS 90c66ec88fSEmmanuel Vadot- silabs,common-mode: Manually override output common mode, see [2] for values 91c66ec88fSEmmanuel Vadot- silabs,amplitude: Manually override output amplitude, see [2] for values 92c66ec88fSEmmanuel Vadot- silabs,synth-master: boolean. If present, this output is allowed to change the 93c66ec88fSEmmanuel Vadot multisynth frequency dynamically. 94c66ec88fSEmmanuel Vadot- silabs,silabs,disable-high: boolean. If set, the clock output is driven HIGH 95c66ec88fSEmmanuel Vadot when disabled, otherwise it's driven LOW. 96c66ec88fSEmmanuel Vadot 97c66ec88fSEmmanuel Vadot==Example== 98c66ec88fSEmmanuel Vadot 99c66ec88fSEmmanuel Vadot/* 48MHz reference crystal */ 100c66ec88fSEmmanuel Vadotref48: ref48M { 101c66ec88fSEmmanuel Vadot compatible = "fixed-clock"; 102c66ec88fSEmmanuel Vadot #clock-cells = <0>; 103c66ec88fSEmmanuel Vadot clock-frequency = <48000000>; 104c66ec88fSEmmanuel Vadot}; 105c66ec88fSEmmanuel Vadot 106c66ec88fSEmmanuel Vadoti2c-master-node { 107c66ec88fSEmmanuel Vadot /* Programmable clock (for logic) */ 108c66ec88fSEmmanuel Vadot si5341: clock-generator@74 { 109c66ec88fSEmmanuel Vadot reg = <0x74>; 110c66ec88fSEmmanuel Vadot compatible = "silabs,si5341"; 111c66ec88fSEmmanuel Vadot #clock-cells = <2>; 112c66ec88fSEmmanuel Vadot #address-cells = <1>; 113c66ec88fSEmmanuel Vadot #size-cells = <0>; 114c66ec88fSEmmanuel Vadot clocks = <&ref48>; 115c66ec88fSEmmanuel Vadot clock-names = "xtal"; 116c66ec88fSEmmanuel Vadot 117c66ec88fSEmmanuel Vadot silabs,pll-m-num = <14000>; /* PLL at 14.0 GHz */ 118c66ec88fSEmmanuel Vadot silabs,pll-m-den = <48>; 119c66ec88fSEmmanuel Vadot silabs,reprogram; /* Chips are not programmed, always reset */ 120c66ec88fSEmmanuel Vadot 121c66ec88fSEmmanuel Vadot out@0 { 122c66ec88fSEmmanuel Vadot reg = <0>; 123c66ec88fSEmmanuel Vadot silabs,format = <1>; /* LVDS 3v3 */ 124c66ec88fSEmmanuel Vadot silabs,common-mode = <3>; 125c66ec88fSEmmanuel Vadot silabs,amplitude = <3>; 126c66ec88fSEmmanuel Vadot silabs,synth-master; 127c66ec88fSEmmanuel Vadot }; 128c66ec88fSEmmanuel Vadot 129c66ec88fSEmmanuel Vadot /* 130c66ec88fSEmmanuel Vadot * Output 6 configuration: 131c66ec88fSEmmanuel Vadot * LVDS 1v8 132c66ec88fSEmmanuel Vadot */ 133c66ec88fSEmmanuel Vadot out@6 { 134c66ec88fSEmmanuel Vadot reg = <6>; 135c66ec88fSEmmanuel Vadot silabs,format = <1>; /* LVDS 1v8 */ 136c66ec88fSEmmanuel Vadot silabs,common-mode = <13>; 137c66ec88fSEmmanuel Vadot silabs,amplitude = <3>; 138c66ec88fSEmmanuel Vadot }; 139c66ec88fSEmmanuel Vadot 140c66ec88fSEmmanuel Vadot /* 141c66ec88fSEmmanuel Vadot * Output 8 configuration: 142c66ec88fSEmmanuel Vadot * HCSL 3v3 143c66ec88fSEmmanuel Vadot */ 144c66ec88fSEmmanuel Vadot out@8 { 145c66ec88fSEmmanuel Vadot reg = <8>; 146c66ec88fSEmmanuel Vadot silabs,format = <2>; 147c66ec88fSEmmanuel Vadot silabs,common-mode = <11>; 148c66ec88fSEmmanuel Vadot silabs,amplitude = <3>; 149c66ec88fSEmmanuel Vadot }; 150c66ec88fSEmmanuel Vadot }; 151c66ec88fSEmmanuel Vadot}; 152c66ec88fSEmmanuel Vadot 153c66ec88fSEmmanuel Vadotsome-video-node { 154c66ec88fSEmmanuel Vadot /* Standard clock bindings */ 155c66ec88fSEmmanuel Vadot clock-names = "pixel"; 156c66ec88fSEmmanuel Vadot clocks = <&si5341 0 7>; /* Output 7 */ 157c66ec88fSEmmanuel Vadot 158c66ec88fSEmmanuel Vadot /* Set output 7 to use syntesizer 3 as its parent */ 159c66ec88fSEmmanuel Vadot assigned-clocks = <&si5341 0 7>, <&si5341 1 3>; 160c66ec88fSEmmanuel Vadot assigned-clock-parents = <&si5341 1 3>; 161c66ec88fSEmmanuel Vadot /* Set output 7 to 148.5 MHz using a synth frequency of 594 MHz */ 162c66ec88fSEmmanuel Vadot assigned-clock-rates = <148500000>, <594000000>; 163c66ec88fSEmmanuel Vadot}; 164c66ec88fSEmmanuel Vadot 165c66ec88fSEmmanuel Vadotsome-audio-node { 166c66ec88fSEmmanuel Vadot clock-names = "i2s-clk"; 167c66ec88fSEmmanuel Vadot clocks = <&si5341 0 0>; 168c66ec88fSEmmanuel Vadot /* 169c66ec88fSEmmanuel Vadot * since output 0 is a synth-master, the synth will be automatically set 170c66ec88fSEmmanuel Vadot * to an appropriate frequency when the audio driver requests another 171c66ec88fSEmmanuel Vadot * frequency. We give control over synth 2 to this output here. 172c66ec88fSEmmanuel Vadot */ 173c66ec88fSEmmanuel Vadot assigned-clocks = <&si5341 0 0>; 174c66ec88fSEmmanuel Vadot assigned-clock-parents = <&si5341 1 2>; 175c66ec88fSEmmanuel Vadot}; 176