Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 235b84fc authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull i2c updates from Wolfram Sang:
 "This pull request contains:

   - i2c core reorganization. One source file became too monolithic. It
     is now split up, yet we still have the same named object as the
     final output. This should ease maintenance.

   - new drivers: ZTE ZX2967 family, ASPEED 24XX/25XX

   - designware driver gained slave mode support

   - xgene-slimpro driver gained ACPI support

   - bigger overhaul for pca-platform driver

   - the algo-bit module now supports messages with enforced STOP

   - slightly bigger than usual set of driver updates and improvements

  and with much appreciated quality assurance from Andy Shevchenko"

* 'i2c/for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (51 commits)
  i2c: Provide a stub for i2c_detect_slave_mode()
  i2c: designware: Let slave adapter support be optional
  i2c: designware: Make HW init functions static
  i2c: designware: fix spelling mistakes
  i2c: pca-platform: propagate error from i2c_pca_add_numbered_bus
  i2c: pca-platform: correctly set algo_data.reset_chip
  i2c: acpi: Do not create i2c-clients for LNXVIDEO ACPI devices
  i2c: designware: enable SLAVE in platform module
  i2c: designware: add SLAVE mode functions
  i2c: zx2967: drop COMPILE_TEST dependency
  i2c: zx2967: always use the same device when printing errors
  i2c: pca-platform: use dev_warn/dev_info instead of printk
  i2c: pca-platform: use device managed allocations
  i2c: pca-platform: add devicetree awareness
  i2c: pca-platform: switch to struct gpio_desc
  dt-bindings: add bindings for i2c-pca-platform
  i2c: cadance: fix ctrl/addr reg write order
  i2c: zx2967: add i2c controller driver for ZTE's zx2967 family
  dt: bindings: add documentation for zx2967 family i2c controller
  i2c: algo-bit: add support for I2C_M_STOP
  ...
parents fb4e3bee 8f1a357d
Loading
Loading
Loading
Loading
+48 −0
Original line number Diff line number Diff line
Device tree configuration for the I2C busses on the AST24XX and AST25XX SoCs.

Required Properties:
- #address-cells	: should be 1
- #size-cells		: should be 0
- reg			: address offset and range of bus
- compatible		: should be "aspeed,ast2400-i2c-bus"
			  or "aspeed,ast2500-i2c-bus"
- clocks		: root clock of bus, should reference the APB
			  clock
- interrupts		: interrupt number
- interrupt-parent	: interrupt controller for bus, should reference a
			  aspeed,ast2400-i2c-ic or aspeed,ast2500-i2c-ic
			  interrupt controller

Optional Properties:
- bus-frequency	: frequency of the bus clock in Hz defaults to 100 kHz when not
		  specified
- multi-master	: states that there is another master active on this bus.

Example:

i2c {
	compatible = "simple-bus";
	#address-cells = <1>;
	#size-cells = <1>;
	ranges = <0 0x1e78a000 0x1000>;

	i2c_ic: interrupt-controller@0 {
		#interrupt-cells = <1>;
		compatible = "aspeed,ast2400-i2c-ic";
		reg = <0x0 0x40>;
		interrupts = <12>;
		interrupt-controller;
	};

	i2c0: i2c-bus@40 {
		#address-cells = <1>;
		#size-cells = <0>;
		#interrupt-cells = <1>;
		reg = <0x40 0x40>;
		compatible = "aspeed,ast2400-i2c-bus";
		clocks = <&clk_apb>;
		bus-frequency = <100000>;
		interrupts = <0>;
		interrupt-parent = <&i2c_ic>;
	};
};
+15 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ Optional properties :
 - i2c-sda-falling-time-ns : should contain the SDA falling time in nanoseconds.
   This value which is by default 300ns is used to compute the tHIGH period.

Example :
Examples :

	i2c@f0000 {
		#address-cells = <1>;
@@ -43,3 +43,17 @@ Example :
		i2c-sda-falling-time-ns = <300>;
		i2c-scl-falling-time-ns = <300>;
	};

	i2c@1120000 {
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x2000 0x100>;
		clock-frequency = <400000>;
		clocks = <&i2cclk>;
		interrupts = <0>;

		eeprom@64 {
			compatible = "linux,slave-24c02";
			reg = <0x40000064>;
		};
	};
+29 −0
Original line number Diff line number Diff line
* NXP PCA PCA9564/PCA9665 I2C controller

The PCA9564/PCA9665 serves as an interface between most standard
parallel-bus microcontrollers/microprocessors and the serial I2C-bus
and allows the parallel bus system to communicate bi-directionally
with the I2C-bus.

Required properties :

 - reg : Offset and length of the register set for the device
 - compatible : one of "nxp,pca9564" or "nxp,pca9665"

Optional properties
 - interrupts : the interrupt number
 - interrupt-parent : the phandle for the interrupt controller.
   If an interrupt is not specified polling will be used.
 - reset-gpios : gpio specifier for gpio connected to RESET_N pin. As the line
   is active low, it should be marked GPIO_ACTIVE_LOW.
 - clock-frequency : I2C bus frequency.

Example:
	i2c0: i2c@80000 {
		compatible = "nxp,pca9564";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x80000 0x4>;
		reset-gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
		clock-frequency = <100000>;
	};
+22 −0
Original line number Diff line number Diff line
ZTE zx2967 I2C controller

Required properties:
 - compatible: must be "zte,zx296718-i2c"
 - reg: physical address and length of the device registers
 - interrupts: a single interrupt specifier
 - clocks: clock for the device
 - #address-cells: should be <1>
 - #size-cells: should be <0>
 - clock-frequency: the desired I2C bus clock frequency.

Examples:

	i2c@112000 {
		compatible = "zte,zx296718-i2c";
		reg = <0x00112000 0x1000>;
		interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
		clocks = <&osc24m>;
		#address-cells = <1>
		#size-cells = <0>;
		clock-frequency = <1600000>;
	};
+4 −1
Original line number Diff line number Diff line
@@ -41,5 +41,8 @@ i2c_adapter devices which don't support those I2C operations.
.. kernel-doc:: drivers/i2c/i2c-boardinfo.c
   :functions: i2c_register_board_info

.. kernel-doc:: drivers/i2c/i2c-core.c
.. kernel-doc:: drivers/i2c/i2c-core-base.c
   :export:

.. kernel-doc:: drivers/i2c/i2c-core-smbus.c
   :export:
Loading