Home
last modified time | relevance | path

Searched +full:i2c +full:- +full:sda +full:- +full:delay (Results 1 – 25 of 244) sorted by relevance

12345678910

/openbmc/u-boot/drivers/i2c/
H A Di2c-gpio.c5 * This file is based on: drivers/i2c/soft-i2c.c,
6 * with added driver-model support and code cleanup.
11 #include <i2c.h>
29 * udelay - delay [us] between GPIO toggle operations,
30 * which is 1/4 of I2C speed clock period.
33 /* sda, scl */
37 static int i2c_gpio_sda_get(struct gpio_desc *sda) in i2c_gpio_sda_get() argument
39 return dm_gpio_get_value(sda); in i2c_gpio_sda_get()
42 static void i2c_gpio_sda_set(struct gpio_desc *sda, int bit) in i2c_gpio_sda_set() argument
45 dm_gpio_set_dir_flags(sda, GPIOD_IS_IN); in i2c_gpio_sda_set()
[all …]
H A Di2c-versatile.c1 // SPDX-License-Identifier: GPL-2.0+
11 #include <i2c.h>
21 #define SDA BIT(1) macro
25 u32 delay; member
30 writel(SDA, priv->base + (state ? I2C_SET_REG : I2C_CLEAR_REG)); in versatile_sda_set()
31 udelay(priv->delay); in versatile_sda_set()
36 int v = !!(readl(priv->base + I2C_CONTROL_REG) & SDA); in versatile_sda_get()
38 udelay(priv->delay); in versatile_sda_get()
44 writel(SCL, priv->base + (state ? I2C_SET_REG : I2C_CLEAR_REG)); in versatile_scl_set()
45 udelay(priv->delay); in versatile_scl_set()
[all …]
H A Drcar_i2c.c1 // SPDX-License-Identifier: GPL-2.0+
3 * drivers/i2c/rcar_i2c.c
7 * Clock configuration based on Linux i2c-rcar.c:
8 * Copyright (C) 2014-15 Wolfram Sang <wsa@sang-engineering.com>
9 * Copyright (C) 2011-2015 Renesas Electronics Corporation
10 * Copyright (C) 2012-14 Renesas Solutions Corp.
17 #include <i2c.h>
23 #define RCAR_I2C_ICMCR_MDBS BIT(7) /* non-fifo mode switch */
25 #define RCAR_I2C_ICMCR_FSDA BIT(5) /* override SDA pin */
50 * Defines 1st bit delay between SDA and SCL.
[all …]
/openbmc/linux/Documentation/devicetree/bindings/i2c/
H A Di2c-gpio.yaml1 # SPDX-License-Identifier: GPL-2.0
3 ---
4 $id: http://devicetree.org/schemas/i2c/i2c-gpio.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: GPIO bitbanged I2C
10 - Wolfram Sang <wsa@kernel.org>
13 - $ref: /schemas/i2c/i2c-controller.yaml#
18 - const: i2c-gpio
20 sda-gpios:
22 gpio used for the sda signal, this should be flagged as
[all …]
H A Dsamsung,s3c2410-i2c.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/i2c/samsung,s3c2410-i2c.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Samsung S3C/S5P/Exynos SoC I2C Controller
10 - Krzysztof Kozlowski <krzk@kernel.org>
15 - samsung,s3c2410-i2c
16 - samsung,s3c2440-i2c
17 # For s3c2440-like I2C used inside HDMIPHY block found on several SoCs:
18 - samsung,s3c2440-hdmiphy-i2c
[all …]
H A Di2c.txt1 Generic device tree bindings for I2C busses
4 This document describes generic bindings which can be used to describe I2C
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
21 -----------------------------
26 - clock-frequency
29 - i2c-bus
[all …]
/openbmc/u-boot/doc/device-tree-bindings/i2c/
H A Di2c-gpio.txt1 I2C gpio device binding
5 - drivers/i2c/i2c-gpio.c
7 Software i2c device-tree node properties:
9 * #address-cells = <1>;
10 * #size-cells = <0>;
11 * compatible = "i2c-gpio";
12 * gpios = <sda ...>, <scl ...>;
15 * i2c-gpio,delay-us = <5>;
16 The resulting transfer speed can be adjusted by setting the delay[us]
17 between gpio-toggle operations. Speed [Hz] = 1000000 / 4 * udelay[us],
[all …]
/openbmc/linux/arch/arm/boot/dts/samsung/
H A Dexynos5250-spring.dts1 // SPDX-License-Identifier: GPL-2.0
9 /dts-v1/;
10 #include <dt-bindings/clock/samsung,s2mps11.h>
11 #include <dt-bindings/gpio/gpio.h>
12 #include <dt-bindings/interrupt-controller/irq.h>
13 #include <dt-bindings/input/input.h>
19 chassis-type = "laptop";
33 stdout-path = "serial3:115200n8";
36 gpio-keys {
37 compatible = "gpio-keys";
[all …]
H A Dexynos5250-snow-common.dtsi1 // SPDX-License-Identifier: GPL-2.0
8 #include <dt-bindings/gpio/gpio.h>
9 #include <dt-bindings/clock/maxim,max77686.h>
10 #include <dt-bindings/interrupt-controller/irq.h>
11 #include <dt-bindings/input/input.h>
12 #include <dt-bindings/sound/samsung-i2s.h>
30 stdout-path = "serial3:115200n8";
33 gpio-keys {
34 compatible = "gpio-keys";
35 pinctrl-names = "default";
[all …]
H A Dexynos5250-smdk5250.dts1 // SPDX-License-Identifier: GPL-2.0
9 /dts-v1/;
10 #include <dt-bindings/clock/maxim,max77686.h>
11 #include <dt-bindings/gpio/gpio.h>
12 #include <dt-bindings/interrupt-controller/irq.h>
31 stdout-path = "serial2:115200n8";
34 vdd: fixed-regulator-vdd {
35 compatible = "regulator-fixed";
36 regulator-name = "vdd-supply";
37 regulator-min-microvolt = <1800000>;
[all …]
H A Ds5pv210-aries.dtsi1 // SPDX-License-Identifier: GPL-2.0
6 /dts-v1/;
7 #include <dt-bindings/gpio/gpio.h>
8 #include <dt-bindings/interrupt-controller/irq.h>
32 reserved-memory {
33 #address-cells = <1>;
34 #size-cells = <1>;
38 compatible = "shared-dma-pool";
39 no-map;
44 compatible = "shared-dma-pool";
[all …]
H A Dexynos4412-galaxy-s3.dtsi1 // SPDX-License-Identifier: GPL-2.0
9 /dts-v1/;
10 #include <dt-bindings/leds/common.h>
11 #include "exynos4412-midas.dtsi"
19 led-controller {
21 flen-gpios = <&gpj1 1 GPIO_ACTIVE_HIGH>;
22 enset-gpios = <&gpj1 2 GPIO_ACTIVE_HIGH>;
24 pinctrl-names = "default", "host", "isp";
25 pinctrl-0 = <&camera_flash_host>;
26 pinctrl-1 = <&camera_flash_host>;
[all …]
H A Dexynos4210-i9100.dts1 // SPDX-License-Identifier: GPL-2.0
3 * Samsung's Exynos4210 based Galaxy S2 (GT-I9100 version) device tree
11 /dts-v1/;
13 #include "exynos4412-ppmu-common.dtsi"
15 #include <dt-bindings/gpio/gpio.h>
16 #include <dt-bindings/input/linux-event-codes.h>
19 model = "Samsung Galaxy S2 (GT-I9100)";
21 chassis-type = "handset";
35 stdout-path = "serial2:115200n8";
38 vemmc_reg: regulator-0 {
[all …]
H A Dexynos5250-arndale.dts1 // SPDX-License-Identifier: GPL-2.0
9 /dts-v1/;
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/interrupt-controller/irq.h>
12 #include <dt-bindings/input/input.h>
13 #include <dt-bindings/clock/samsung,s2mps11.h>
14 #include <dt-bindings/sound/samsung-i2s.h>
32 stdout-path = "serial2:115200n8";
35 gpio-keys {
36 compatible = "gpio-keys";
[all …]
/openbmc/linux/Documentation/i2c/
H A Dgpio-fault-injection.rst2 Linux I2C fault injection
5 The GPIO based I2C bus master driver can be configured to provide fault
6 injection capabilities. It is then meant to be connected to another I2C bus
7 which is driven by the I2C bus master driver under test. The GPIO fault
8 injection driver can create special states on the bus which the other I2C bus
12 'i2c-fault-injector' subdirectory in the Kernel debugfs filesystem, usually
14 driven I2C bus. Each subdirectory will contain files to trigger the fault
15 injection. They will be described now along with their intended use-cases.
21 -----
30 "sda"
[all …]
/openbmc/linux/arch/riscv/boot/dts/starfive/
H A Djh7110-starfive-visionfive-2.dtsi1 // SPDX-License-Identifier: GPL-2.0 OR MIT
7 /dts-v1/;
9 #include "jh7110-pinfunc.h"
10 #include <dt-bindings/gpio/gpio.h>
26 stdout-path = "serial0:115200n8";
30 timebase-frequency = <4000000>;
38 gpio-restart {
39 compatible = "gpio-restart";
46 clock-frequency = <74250000>;
50 clock-frequency = <125000000>;
[all …]
/openbmc/linux/arch/arm/boot/dts/marvell/
H A Dkirkwood-km_common.dtsi1 // SPDX-License-Identifier: GPL-2.0
5 stdout-path = &uart0;
9 pinctrl: pin-controller@10000 {
10 pinctrl-0 = < &pmx_i2c_gpio_sda &pmx_i2c_gpio_scl >;
11 pinctrl-names = "default";
13 pmx_i2c_gpio_sda: pmx-gpio-sda {
17 pmx_i2c_gpio_scl: pmx-gpio-scl {
28 i2c {
29 compatible = "i2c-gpio";
30 gpios = < &gpio0 8 GPIO_ACTIVE_HIGH /* sda */
[all …]
/openbmc/u-boot/arch/arm/dts/
H A Dkirkwood-km_common.dtsi1 // SPDX-License-Identifier: GPL-2.0
5 stdout-path = &uart0;
9 pinctrl: pin-controller@10000 {
10 pinctrl-0 = < &pmx_i2c_gpio_sda &pmx_i2c_gpio_scl >;
11 pinctrl-names = "default";
13 pmx_i2c_gpio_sda: pmx-gpio-sda {
17 pmx_i2c_gpio_scl: pmx-gpio-scl {
28 i2c {
29 compatible = "i2c-gpio";
30 gpios = < &gpio0 8 GPIO_ACTIVE_HIGH /* sda */
[all …]
H A Dexynos5250-spring.dts1 // SPDX-License-Identifier: GPL-2.0
9 /dts-v1/;
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/interrupt-controller/irq.h>
12 #include <dt-bindings/input/input.h>
20 i2c0 = "/i2c@12C60000";
21 i2c1 = "/i2c@12C70000";
22 i2c2 = "/i2c@12C80000";
23 i2c3 = "/i2c@12C90000";
24 i2c4 = "/i2c@12CA0000";
[all …]
/openbmc/linux/drivers/i2c/busses/
H A Di2c-gpio.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Bitbanging I2C bus driver using the GPIO API
9 #include <linux/delay.h>
11 #include <linux/i2c-algo-bit.h>
12 #include <linux/i2c.h>
16 #include <linux/platform_data/i2c-gpio.h>
22 struct gpio_desc *sda; member
36 * Toggle SDA by changing the output value of the pin. This is only
44 gpiod_set_value_cansleep(priv->sda, state); in i2c_gpio_setsda_val()
49 * for pins that are configured as open drain and for output-only
[all …]
/openbmc/linux/include/linux/platform_data/
H A Di2c-gpio.h1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * i2c-gpio interface to platform code
11 * struct i2c_gpio_platform_data - Platform-dependent data for i2c-gpio
12 * @udelay: signal toggle delay. SCL frequency is (500 / udelay) kHz
15 * @sda_is_open_drain: SDA is configured as open drain, i.e. the pin
19 * @sda_is_output_only: SDA output drivers can't be turned off.
20 * This is for clients that can only read SDA/SCL.
21 * @sda_has_no_pullup: SDA is used in a non-compliant way and has no pull-up.
22 * Therefore disable open-drain.
26 * @scl_has_no_pullup: SCL is used in a non-compliant way and has no pull-up.
[all …]
/openbmc/linux/drivers/staging/sm750fb/
H A Dddk750_swi2c.c1 // SPDX-License-Identifier: GPL-2.0
5 * swi2c.c --- SM750/SM718 DDK
6 * This file contains the source code for I2C using software
16 * I2C Software Master Driver:
18 * Each i2c cycle is split into 4 sections. Each of these section marks
19 * a point in time where the SCL or SDA may be changed.
22 * +-------------+-------------+-------------+-------------+
29 * the SDA may only be changed in section 2. and section 4. The table
37 * ---------------+---+---+---+---+
38 * Tx Start SDA | | H | | L |
[all …]
/openbmc/linux/drivers/infiniband/hw/qib/
H A Dqib_twsi.c3 * Copyright (c) 2006 - 2012 QLogic Corporation. All rights reserved.
16 * - Redistributions of source code must retain the above
20 * - Redistributions in binary form must reproduce the above
35 #include <linux/delay.h>
43 * Originally written for a not-quite-i2c serial eeprom, which is
45 * variety of other uses, most board-specific, so the bit-boffing
47 * have been moved to chip-specific files.
51 * the restrictions of the generic i2c interface (e.g. no access from
59 * i2c_wait_for_writes - wait for a write
74 dd->f_gpio_mod(dd, 0, 0, 0); in i2c_wait_for_writes()
[all …]
/openbmc/linux/arch/arm/boot/dts/nxp/mxs/
H A Dimx23-sansa.dts2 * Copyright (C) 2013-2016 Marek Vasut <marek.vasut@gmail.com>
4 * This file is dual-licensed: you can use it either under the terms
44 /dts-v1/;
45 #include <dt-bindings/gpio/gpio.h>
60 compatible = "fsl,imx23-mmc";
61 pinctrl-names = "default";
62 pinctrl-0 = <&mmc0_4bit_pins_a &mmc0_pins_fixup>;
63 bus-width = <4>;
64 vmmc-supply = <&reg_vddio_sd0>;
65 cd-inverted;
[all …]
/openbmc/linux/arch/arm/boot/dts/nxp/imx/
H A Dimx6qdl-kontron-samx6i.dtsi1 // SPDX-License-Identifier: GPL-2.0 OR X11
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/sound/fsl-imx-audmux.h>
14 reg_1p0v_s0: regulator-1p0v-s0 {
15 compatible = "regulator-fixed";
16 regulator-name = "V_1V0_S0";
17 regulator-min-microvolt = <1000000>;
18 regulator-max-microvolt = <1000000>;
19 regulator-always-on;
20 regulator-boot-on;
[all …]

12345678910