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

dt-bindings: i2c: Convert i2c-jz4780.txt to YAML

Convert the i2c-jz4780.txt file to ingenic,i2c.yaml.

Two things were changed in the process:
- the clock-frequency property can now only be set to the two values
that can be set by the hardware;
- the dmas and dma-names properties are now required.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
[robh: add ref to i2c-controller.yaml]
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Paul Cercueil and committed by
Rob Herring
118a209d 6e172df7

+88 -33
-33
Documentation/devicetree/bindings/i2c/i2c-jz4780.txt
··· 1 - * Ingenic JZ4780 I2C Bus controller 2 - 3 - Required properties: 4 - - compatible: should be one of the following: 5 - - "ingenic,jz4780-i2c" for the JZ4780 6 - - "ingenic,x1000-i2c" for the X1000 7 - - reg: Should contain the address & size of the I2C controller registers. 8 - - interrupts: Should specify the interrupt provided by parent. 9 - - clocks: Should contain a single clock specifier for the JZ4780 I2C clock. 10 - - clock-frequency: desired I2C bus clock frequency in Hz. 11 - 12 - Recommended properties: 13 - - pinctrl-names: should be "default"; 14 - - pinctrl-0: phandle to pinctrl function 15 - 16 - Example 17 - 18 - / { 19 - i2c4: i2c4@10054000 { 20 - compatible = "ingenic,jz4780-i2c"; 21 - reg = <0x10054000 0x1000>; 22 - 23 - interrupt-parent = <&intc>; 24 - interrupts = <56>; 25 - 26 - clocks = <&cgu JZ4780_CLK_SMB4>; 27 - clock-frequency = <100000>; 28 - pinctrl-names = "default"; 29 - pinctrl-0 = <&pins_i2c4_data>; 30 - 31 - }; 32 - }; 33 -
+88
Documentation/devicetree/bindings/i2c/ingenic,i2c.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/i2c/ingenic,i2c.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Ingenic SoCs I2C controller devicetree bindings 8 + 9 + maintainers: 10 + - Paul Cercueil <paul@crapouillou.net> 11 + 12 + allOf: 13 + - $ref: /schemas/i2c/i2c-controller.yaml# 14 + 15 + properties: 16 + $nodename: 17 + pattern: "^i2c@[0-9a-f]+$" 18 + 19 + compatible: 20 + enum: 21 + - ingenic,jz4780-i2c 22 + - ingenic,x1000-i2c 23 + 24 + reg: 25 + maxItems: 1 26 + 27 + interrupts: 28 + maxItems: 1 29 + 30 + clocks: 31 + maxItems: 1 32 + 33 + clock-frequency: 34 + enum: [ 100000, 400000 ] 35 + 36 + dmas: 37 + items: 38 + - description: DMA controller phandle and request line for RX 39 + - description: DMA controller phandle and request line for TX 40 + 41 + dma-names: 42 + items: 43 + - const: rx 44 + - const: tx 45 + 46 + required: 47 + - compatible 48 + - reg 49 + - interrupts 50 + - clocks 51 + - clock-frequency 52 + - dmas 53 + - dma-names 54 + 55 + unevaluatedProperties: false 56 + 57 + examples: 58 + - | 59 + #include <dt-bindings/clock/jz4780-cgu.h> 60 + #include <dt-bindings/dma/jz4780-dma.h> 61 + #include <dt-bindings/interrupt-controller/irq.h> 62 + i2c@10054000 { 63 + compatible = "ingenic,jz4780-i2c"; 64 + #address-cells = <1>; 65 + #size-cells = <0>; 66 + reg = <0x10054000 0x1000>; 67 + 68 + interrupt-parent = <&intc>; 69 + interrupts = <56>; 70 + 71 + clocks = <&cgu JZ4780_CLK_SMB4>; 72 + pinctrl-names = "default"; 73 + pinctrl-0 = <&pins_i2c4_data>; 74 + 75 + dmas = <&dma JZ4780_DMA_SMB4_RX 0xffffffff>, 76 + <&dma JZ4780_DMA_SMB4_TX 0xffffffff>; 77 + dma-names = "rx", "tx"; 78 + 79 + clock-frequency = <400000>; 80 + 81 + rtc@51 { 82 + compatible = "nxp,pcf8563"; 83 + reg = <0x51>; 84 + 85 + interrupt-parent = <&gpf>; 86 + interrupts = <30 IRQ_TYPE_LEVEL_LOW>; 87 + }; 88 + };