/openbmc/linux/Documentation/i2c/ |
H A D | i2c-sysfs.rst | 1 .. SPDX-License-Identifier: GPL-2.0 4 Linux I2C Sysfs 10 I2C topology can be complex because of the existence of I2C MUX 11 (I2C Multiplexer). The Linux 12 kernel abstracts the MUX channels into logical I2C bus numbers. However, there 13 is a gap of knowledge to map from the I2C bus physical number and MUX topology 14 to logical I2C bus number. This doc is aimed to fill in this gap, so the 16 the concept of logical I2C buses in the kernel, by knowing the physical I2C 17 topology and navigating through the I2C sysfs in Linux shell. This knowledge is 18 useful and essential to use ``i2c-tools`` for the purpose of development and [all …]
|
H A D | instantiating-devices.rst | 2 How to instantiate I2C devices 5 Unlike PCI or USB devices, I2C devices are not enumerated at the hardware 7 I2C bus segment, and what address these devices are using. For this 8 reason, the kernel code must instantiate I2C devices explicitly. There are 12 Method 1: Declare the I2C devices statically 13 -------------------------------------------- 15 This method is appropriate when the I2C bus is a system bus as is the case 16 for many embedded systems. On such systems, each I2C bus has a number which 17 is known in advance. It is thus possible to pre-declare the I2C devices 18 which live on this bus. [all …]
|
/openbmc/entity-manager/src/ |
H A D | devices.hpp | 8 // http://www.apache.org/licenses/LICENSE-2.0 32 // I2C device drivers may create a /hwmon subdirectory. For example the tmp75 33 // driver creates a /sys/bus/i2c/devices/<busnum>-<i2caddr>/hwmon 36 // not reliable. I2C devices flagged with hasHWMonDir are tested for correct 41 // Devices such as I2C EEPROMs do not generate this file structure. These 56 ExportTemplate(const char* params, const char* bus, const char* constructor, in ExportTemplate() 58 parameters(params), busPath(bus), add(constructor), remove(destructor), in ExportTemplate() 70 ExportTemplate("24c01 $Address", "/sys/bus/i2c/devices/i2c-$Bus", 74 ExportTemplate("24c02 $Address", "/sys/bus/i2c/devices/i2c-$Bus", 78 ExportTemplate("24c04 $Address", "/sys/bus/i2c/devices/i2c-$Bus", [all …]
|
/openbmc/openbmc/meta-facebook/meta-harma/recipes-phosphor/configuration/entity-manager/ |
H A D | device-driver-probe | 3 # shellcheck source=meta-facebook/meta-harma/recipes-phosphor/gpio/phosphor-gpio-monitor/device-util 4 source /usr/libexec/phosphor-gpio-monitor/device-util 7 local bus="$1" 11 if /usr/sbin/i2cget -f -y "$bus" "$addr" 2>/dev/null; then 24 i2cset -f -y 29 0x1d 0x2e 0xff 25 i2cset -f -y 29 0x1f 0x2e 0xff 29 echo pca9546 0x71 > /sys/bus/i2c/devices/i2c-9/new_device 32 echo pca9546 0x71 > /sys/bus/i2c/devices/i2c-11/new_device 42 i2cset -f -y 36 0x1d 0x2e 0xff 43 echo adc128d818 0x1d > /sys/bus/i2c/devices/i2c-36/new_device [all …]
|
/openbmc/openbmc/meta-ibm/recipes-phosphor/sensors/ |
H A D | phosphor-hwmon_%.bbappend | 3 SRC_URI:append:ibm-ac-server = " \ 4 file://70-hwmon.rules \ 8 bus@1e78a000/i2c@100/max31785@52 \ 9 bus@1e78a000/i2c@100/power-supply@68 \ 10 bus@1e78a000/i2c@100/power-supply@69 \ 11 bus@1e78a000/i2c@100/bmp280@77 \ 12 bus@1e78a000/i2c@100/dps310@76 \ 13 bus@1e78a000/i2c@140/ir35221@70 \ 14 bus@1e78a000/i2c@140/ir35221@71 \ 15 bus@1e78a000/i2c@180/ir35221@70 \ [all …]
|
/openbmc/linux/arch/arm/boot/dts/aspeed/ |
H A D | ibm-power9-dual.dtsi | 1 // SPDX-License-Identifier: GPL-2.0+ 7 #address-cells = <1>; 8 #size-cells = <1>; 9 chip-id = <0>; 16 i2c@1800 { 17 compatible = "ibm,fsi-i2c-master"; 19 #address-cells = <1>; 20 #size-cells = <0>; 22 cfam0_i2c0: i2c-bus@0 { 26 cfam0_i2c1: i2c-bus@1 { [all …]
|
/openbmc/linux/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/ |
H A D | base.c | 26 #include "bus.h" 32 #include <subdev/bios/i2c.h> 35 nvkm_i2c_pad_find(struct nvkm_i2c *i2c, int id) in nvkm_i2c_pad_find() argument 39 list_for_each_entry(pad, &i2c->pad, head) { in nvkm_i2c_pad_find() 40 if (pad->id == id) in nvkm_i2c_pad_find() 48 nvkm_i2c_bus_find(struct nvkm_i2c *i2c, int id) in nvkm_i2c_bus_find() argument 50 struct nvkm_bios *bios = i2c->subdev.device->bios; in nvkm_i2c_bus_find() 51 struct nvkm_i2c_bus *bus; in nvkm_i2c_bus_find() local 55 u16 i2c = dcb_i2c_table(bios, &ver, &hdr, &cnt, &len); in nvkm_i2c_bus_find() local 56 if (i2c && ver >= 0x30) { in nvkm_i2c_bus_find() [all …]
|
H A D | bus.c | 24 #include "bus.h" 30 * i2c-algo-bit 35 struct nvkm_i2c_bus *bus = container_of(adap, typeof(*bus), i2c); in nvkm_i2c_bus_pre_xfer() local 36 return nvkm_i2c_bus_acquire(bus); in nvkm_i2c_bus_pre_xfer() 42 struct nvkm_i2c_bus *bus = container_of(adap, typeof(*bus), i2c); in nvkm_i2c_bus_post_xfer() local 43 return nvkm_i2c_bus_release(bus); in nvkm_i2c_bus_post_xfer() 49 struct nvkm_i2c_bus *bus = data; in nvkm_i2c_bus_setscl() local 50 bus->func->drive_scl(bus, state); in nvkm_i2c_bus_setscl() 56 struct nvkm_i2c_bus *bus = data; in nvkm_i2c_bus_setsda() local 57 bus->func->drive_sda(bus, state); in nvkm_i2c_bus_setsda() [all …]
|
/openbmc/u-boot/drivers/i2c/ |
H A D | Kconfig | 2 # I2C subsystem configuration 5 menu "I2C support" 8 bool "Enable Driver Model for I2C drivers" 11 Enable driver model for I2C. The I2C uclass interface: probe, read, 12 write and speed, is implemented with the bus drivers operations, 13 which provide methods for bus setting and data transfer. Each chip 14 device (bus child) info is kept as parent platdata. The interface 15 is defined in include/i2c.h. When i2c bus driver supports the i2c 20 bool "Enable I2C compatibility layer" 23 Enable old-style I2C functions for compatibility with existing code. [all …]
|
/openbmc/linux/drivers/i2c/ |
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 3 # I2C subsystem configuration 6 menu "I2C support" 8 config I2C config 9 tristate "I2C support" 13 I2C (pronounce: I-squared-C) is a slow serial bus protocol used in 15 or System Management Bus is a subset of the I2C protocol. More 16 information is contained in the directory <file:Documentation/i2c/>, 19 Both I2C and SMBus are supported here. You will need this for 22 If you want I2C support, you should say Y here and also to the [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/i2c/ |
H A D | i2c.txt | 1 Generic device tree bindings for I2C busses 4 This document describes generic bindings which can be used to describe I2C 7 Required properties (per bus) 8 ----------------------------- 10 - #address-cells - should be <1>. Read more about addresses below. 11 - #size-cells - should be <0>. 12 - compatible - name of I2C bus controller 17 The cells properties above define that an address of children of an I2C bus 20 Optional properties (per bus) 21 ----------------------------- [all …]
|
H A D | i2c-arb-gpio-challenge.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 4 $id: http://devicetree.org/schemas/i2c/i2c-arb-gpio-challenge.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: GPIO-based I2C Arbitration Using a Challenge & Response Mechanism 10 - Doug Anderson <dianders@chromium.org> 11 - Peter Rosin <peda@axentia.se> 15 the master of an I2C bus in a multimaster situation. 18 standard I2C multi-master rules. Using GPIOs is generally useful in the case 19 where there is a device on the bus that has errata and/or bugs that makes [all …]
|
/openbmc/qemu/hw/ppc/ |
H A D | pnv_i2c.c | 2 * QEMU PowerPC PowerNV Processor I2C model 4 * Copyright (c) 2019-2023, IBM Corporation. 6 * SPDX-License-Identifier: GPL-2.0-or-later 15 #include "hw/qdev-properties.h" 25 #include "hw/i2c/pnv_i2c_regs.h" 27 static I2CBus *pnv_i2c_get_bus(PnvI2C *i2c) in pnv_i2c_get_bus() argument 29 uint8_t port = GETFIELD(I2C_MODE_PORT_NUM, i2c->regs[I2C_MODE_REG]); in pnv_i2c_get_bus() 31 if (port >= i2c->num_busses) { in pnv_i2c_get_bus() 32 qemu_log_mask(LOG_GUEST_ERROR, "I2C: invalid bus number %d/%d\n", port, in pnv_i2c_get_bus() 33 i2c->num_busses); in pnv_i2c_get_bus() [all …]
|
/openbmc/linux/drivers/base/regmap/ |
H A D | regmap-i2c.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // Register map access API - I2C support 10 #include <linux/i2c.h> 19 struct i2c_client *i2c = to_i2c_client(dev); in regmap_smbus_byte_reg_read() local 23 return -EINVAL; in regmap_smbus_byte_reg_read() 25 ret = i2c_smbus_read_byte_data(i2c, reg); in regmap_smbus_byte_reg_read() 38 struct i2c_client *i2c = to_i2c_client(dev); in regmap_smbus_byte_reg_write() local 41 return -EINVAL; in regmap_smbus_byte_reg_write() 43 return i2c_smbus_write_byte_data(i2c, reg, val); in regmap_smbus_byte_reg_write() 55 struct i2c_client *i2c = to_i2c_client(dev); in regmap_smbus_word_reg_read() local [all …]
|
/openbmc/u-boot/include/ |
H A D | i2c.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 4 * Copyright (C) 2009 - 2013 Heiko Schocher <hs@denx.de> 5 * Changes for multibus/multiadapter I2C support. 10 * The original I2C interface was 12 * AIRVENT SAM s.p.a - RIMINI(ITALY) 20 * For now there are essentially two parts to this file - driver model 28 DM_I2C_CHIP_10BIT = 1 << 0, /* Use 10-bit addressing */ 35 * struct dm_i2c_chip - information about an i2c chip 37 * An I2C chip is a device on the I2C bus. It sits at a particular address 38 * and normally supports 7-bit or 10-bit addressing. [all …]
|
/openbmc/qemu/include/hw/i2c/ |
H A D | i2c.h | 4 #include "hw/qdev-core.h" 7 /* The QEMU I2C implementation only supports simple transfers that complete 22 #define TYPE_I2C_SLAVE "i2c-slave" 29 /* Master to slave. Returns non-zero for a NAK, 0 for success. */ 42 * Notify the slave of a bus state change. For start event, 43 * returns non-zero to NAK an operation. For other events the 62 /* Remaining fields for internal use by the I2C code. */ 66 #define TYPE_I2C_BUS "i2c-bus" 93 /* Set from slave currently mastering the bus. */ 98 int i2c_bus_busy(I2CBus *bus); [all …]
|
/openbmc/linux/drivers/i2c/busses/ |
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 6 menu "I2C Hardware Bus support" 16 for Cypress CCGx Type-C controller. Individual bus drivers 25 controller is part of the 7101 device, which is an ACPI-compliant 29 will be called i2c-ali1535. 37 controller is part of the 7101 device, which is an ACPI-compliant 41 will be called i2c-ali1563. 48 Acer Labs Inc. (ALI) M1514 and M1543 motherboard I2C interfaces. 51 will be called i2c-ali15x3. 58 756/766/768 mainboard I2C interfaces. The driver also includes [all …]
|
H A D | i2c-s3c2410.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* linux/drivers/i2c/busses/i2c-s3c2410.c 7 * S3C2410 I2C Controller 13 #include <linux/i2c.h> 34 #include <linux/platform_data/i2c-s3c2410.h> 80 /* Max time to wait for bus to become idle after a xfer (in us) */ 86 /* i2c controller state */ 124 .name = "s3c2410-i2c", 127 .name = "s3c2440-i2c", 130 .name = "s3c2440-hdmiphy-i2c", [all …]
|
/openbmc/openbmc/meta-ingrasys/meta-zaius/recipes-phosphor/sensors/ |
H A D | phosphor-hwmon_%.bbappend | 3 ZAIUS_CHIPS = "bus@1e78a000/i2c@40/ucd90160@64" 4 ZAIUS_CHIPS += " bus@1e78a000/i2c@300/pca9541a@70/i2c-arb/hotswap@54" 5 ZAIUS_CHIPS += " pwm-tacho-controller@1e786000" 6 ZAIUS_CHIPS += " bus@1e78a000/i2c@300/power-brick@30" 7 ZAIUS_CHIPS += " bus@1e78a000/i2c@300/power-brick@6a" 8 ZAIUS_CHIPS += " bus@1e78a000/i2c@300/vrm@40" 9 ZAIUS_CHIPS += " bus@1e78a000/i2c@300/vrm@41" 10 ZAIUS_CHIPS += " bus@1e78a000/i2c@300/vrm@43" 11 ZAIUS_CHIPS += " bus@1e78a000/i2c@300/vrm@60" 12 ZAIUS_CHIPS += " bus@1e78a000/i2c@300/vrm@64" [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/rtc/ |
H A D | trivial-rtc.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/rtc/trivial-rtc.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Alexandre Belloni <alexandre.belloni@bootlin.com> 18 - $ref: rtc.yaml# 23 # AB-RTCMC-32.768kHz-B5ZE-S3: Real Time Clock/Calendar Module with I2C Interface 24 - abracon,abb5zes3 25 # AB-RTCMC-32.768kHz-EOZ9: Real Time Clock/Calendar Module with I2C Interface 26 - abracon,abeoz9 [all …]
|
/openbmc/qemu/tests/functional/ |
H A D | test_arm_aspeed_ast2600.py | 5 # SPDX-License-Identifier: GPL-2.0-or-later 22 ('https://github.com/legoater/qemu-aspeed-boot/raw/master/' 23 'images/ast2600-evb/buildroot-2023.11/flash.img'), 27 self.set_machine('ast2600-evb') 31 self.vm.add_args('-device', 32 'tmp105,bus=aspeed.i2c.bus.3,address=0x4d,id=tmp-test'); 33 self.vm.add_args('-device', 34 'ds1338,bus=aspeed.i2c.bus.3,address=0x32'); 35 self.vm.add_args('-device', 36 'i2c-echo,bus=aspeed.i2c.bus.3,address=0x42'); [all …]
|
/openbmc/linux/include/linux/i3c/ |
H A D | master.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 14 #include <linux/i2c.h> 38 * struct i3c_i2c_dev_desc - Common part of the I3C/I2C device descriptor 39 * @node: node element used to insert the slot into the I2C or I3C device 42 * I2C/I3C transfers 46 * This structure is describing common I3C/I2C dev information. 61 * struct i2c_dev_boardinfo - I2C device board information 62 * @node: used to insert the boardinfo object in the I2C boardinfo list 63 * @base: regular I2C board information 65 * the I2C device limitations [all …]
|
/openbmc/qemu/hw/i2c/ |
H A D | bitbang_i2c.c | 2 * Bit-Bang i2c emulation extracted from 9 * Contributions after 2012-01-13 are licensed under the terms of the 15 #include "hw/i2c/bitbang_i2c.h" 48 static void bitbang_i2c_set_state(bitbang_i2c_interface *i2c, in bitbang_i2c_set_state() argument 51 trace_bitbang_i2c_state(sname[i2c->state], sname[state]); in bitbang_i2c_set_state() 52 i2c->state = state; in bitbang_i2c_set_state() 55 static void bitbang_i2c_enter_stop(bitbang_i2c_interface *i2c) in bitbang_i2c_enter_stop() argument 57 if (i2c->current_addr >= 0) in bitbang_i2c_enter_stop() 58 i2c_end_transfer(i2c->bus); in bitbang_i2c_enter_stop() 59 i2c->current_addr = -1; in bitbang_i2c_enter_stop() [all …]
|
/openbmc/openbmc/meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-utils/ |
H A D | ampere_power_on_driver_binder.sh | 4 declare -a DRIVER_NAMEs=( 5 "107-0070" 6 "100-0071" 7 "101-0071" 8 "102-0071" 9 "103-0071" 10 "104-0071" 11 "100-0050" 12 "101-0050" 13 "102-0050" [all …]
|
/openbmc/linux/Documentation/driver-api/ |
H A D | i2c.rst | 4 I\ :sup:`2`\ C (or without fancy typography, "I2C") is an acronym for 5 the "Inter-IC" bus, a simple bus protocol which is widely used where low 7 some vendors use another name (such as "Two-Wire Interface", TWI) for 8 the same bus. I2C only needs two signals (SCL for clock, SDA for data), 10 I2C devices use seven bit addresses, and bus speeds of up to 400 kHz; 12 I2C is a multi-master bus; open drain signaling is used to arbitrate 16 The Linux I2C programming interfaces support the master side of bus 18 structured around two kinds of driver, and two kinds of device. An I2C 22 I2C bus segment it manages. On each I2C bus segment will be I2C devices 26 are functions to perform various I2C protocol operations; at this writing [all …]
|