Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: si5341: Add silabs,iovdd-33 property

Add a property to allow specifying that the external I2C IO pins are using
3.3V voltage thresholds rather than 1.8V.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Link: https://lore.kernel.org/r/20210325192643.2190069-9-robert.hancock@calian.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Robert Hancock and committed by
Stephen Boyd
2f02c5e4 ab89a343

+9 -1
+9 -1
drivers/clk/clk-si5341.c
··· 81 81 u8 num_synth; 82 82 u16 chip_id; 83 83 bool xaxb_ext_clk; 84 + bool iovdd_33; 84 85 }; 85 86 #define to_clk_si5341(_hw) container_of(_hw, struct clk_si5341, hw) 86 87 ··· 104 103 #define SI5341_IN_SEL 0x0021 105 104 #define SI5341_DEVICE_READY 0x00FE 106 105 #define SI5341_XAXB_CFG 0x090E 106 + #define SI5341_IO_VDD_SEL 0x0943 107 107 #define SI5341_IN_EN 0x0949 108 108 #define SI5341_INX_TO_PFD_EN 0x094A 109 109 ··· 353 351 { 0x0804, 0x00 }, /* Not in datasheet */ 354 352 { 0x090E, 0x02 }, /* XAXB_EXTCLK_EN=0 XAXB_PDNB=1 (use XTAL) */ 355 353 { 0x091C, 0x04 }, /* ZDM_EN=4 (Normal mode) */ 356 - { 0x0943, 0x00 }, /* IO_VDD_SEL=0 (0=1v8, use 1=3v3) */ 357 354 { 0x0949, 0x00 }, /* IN_EN (disable input clocks) */ 358 355 { 0x094A, 0x00 }, /* INx_TO_PFD_EN (disabled) */ 359 356 { 0x0A02, 0x00 }, /* Not in datasheet */ ··· 1161 1160 int res; 1162 1161 u32 revision; 1163 1162 1163 + res = regmap_write(data->regmap, SI5341_IO_VDD_SEL, 1164 + data->iovdd_33 ? 1 : 0); 1165 + if (res < 0) 1166 + return res; 1167 + 1164 1168 res = regmap_read(data->regmap, SI5341_DEVICE_REV, &revision); 1165 1169 if (res < 0) 1166 1170 return res; ··· 1550 1544 } 1551 1545 data->xaxb_ext_clk = of_property_read_bool(client->dev.of_node, 1552 1546 "silabs,xaxb-ext-clk"); 1547 + data->iovdd_33 = of_property_read_bool(client->dev.of_node, 1548 + "silabs,iovdd-33"); 1553 1549 1554 1550 if (initialization_required) { 1555 1551 /* Populate the regmap cache in preparation for "cache only" */