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

dt-bindings: i2c: Rewrite Nomadik I2C bindings in YAML

This rewrites the Nomadik I2C bindings in YAML, some extra
tweaks were needed because of the way the original nomadik
names the compatible with two compatibles and the DB8500
with three, and the two main variants use a different clock
name.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>

authored by

Linus Walleij and committed by
Wolfram Sang
57758458 f2906aa8

+114 -24
-23
Documentation/devicetree/bindings/i2c/i2c-nomadik.txt
··· 1 - I2C for Nomadik based systems 2 - 3 - Required (non-standard) properties: 4 - - Nil 5 - 6 - Recommended (non-standard) properties: 7 - - clock-frequency : Maximum bus clock frequency for the device 8 - 9 - Optional (non-standard) properties: 10 - - Nil 11 - 12 - Example : 13 - 14 - i2c@80004000 { 15 - compatible = "stericsson,db8500-i2c", "st,nomadik-i2c"; 16 - reg = <0x80004000 0x1000>; 17 - interrupts = <0 21 0x4>; 18 - #address-cells = <1>; 19 - #size-cells = <0>; 20 - v-i2c-supply = <&db8500_vape_reg>; 21 - 22 - clock-frequency = <400000>; 23 - };
+113
Documentation/devicetree/bindings/i2c/st,nomadik-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/st,nomadik-i2c.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: ST Microelectronics Nomadik I2C Bindings 8 + 9 + description: The Nomadik I2C host controller began its life in the ST 10 + Microelectronics STn8800 SoC, and was then inherited into STn8810 and 11 + STn8815. It was part of the prototype STn8500 which then became ST-Ericsson 12 + DB8500 after the merge of these two companies wireless divisions. 13 + 14 + maintainers: 15 + - Linus Walleij <linus.walleij@linaro.org> 16 + 17 + allOf: 18 + - $ref: /schemas/i2c/i2c-controller.yaml# 19 + 20 + # Need a custom select here or 'arm,primecell' will match on lots of nodes 21 + select: 22 + properties: 23 + compatible: 24 + contains: 25 + enum: 26 + - st,nomadik-i2c 27 + required: 28 + - compatible 29 + 30 + properties: 31 + compatible: 32 + oneOf: 33 + # The variant found in STn8815 34 + - items: 35 + - const: st,nomadik-i2c 36 + - const: arm,primecell 37 + # The variant found in DB8500 38 + - items: 39 + - const: stericsson,db8500-i2c 40 + - const: st,nomadik-i2c 41 + - const: arm,primecell 42 + 43 + reg: 44 + maxItems: 1 45 + 46 + interrupts: 47 + maxItems: 1 48 + 49 + clocks: 50 + maxItems: 2 51 + 52 + clock-names: 53 + oneOf: 54 + # Clock name in STn8815 55 + - items: 56 + - const: mclk 57 + - const: apb_pclk 58 + # Clock name in DB8500 59 + - items: 60 + - const: i2cclk 61 + - const: apb_pclk 62 + 63 + resets: 64 + maxItems: 1 65 + 66 + clock-frequency: 67 + minimum: 1 68 + maximum: 400000 69 + 70 + required: 71 + - compatible 72 + - reg 73 + - interrupts 74 + - clocks 75 + - clock-names 76 + 77 + unevaluatedProperties: false 78 + 79 + examples: 80 + - | 81 + #include <dt-bindings/interrupt-controller/irq.h> 82 + #include <dt-bindings/interrupt-controller/arm-gic.h> 83 + #include <dt-bindings/reset/stericsson,db8500-prcc-reset.h> 84 + #include <dt-bindings/arm/ux500_pm_domains.h> 85 + i2c@80004000 { 86 + compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell"; 87 + reg = <0x80004000 0x1000>; 88 + interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; 89 + 90 + #address-cells = <1>; 91 + #size-cells = <0>; 92 + v-i2c-supply = <&db8500_vape_reg>; 93 + 94 + clock-frequency = <400000>; 95 + clocks = <&prcc_kclk 3 3>, <&prcc_pclk 3 3>; 96 + clock-names = "i2cclk", "apb_pclk"; 97 + power-domains = <&pm_domains DOMAIN_VAPE>; 98 + resets = <&prcc_reset DB8500_PRCC_3 DB8500_PRCC_3_RESET_I2C0>; 99 + }; 100 + 101 + i2c@101f8000 { 102 + compatible = "st,nomadik-i2c", "arm,primecell"; 103 + reg = <0x101f8000 0x1000>; 104 + interrupt-parent = <&vica>; 105 + interrupts = <20>; 106 + clock-frequency = <100000>; 107 + #address-cells = <1>; 108 + #size-cells = <0>; 109 + clocks = <&i2c0clk>, <&pclki2c0>; 110 + clock-names = "mclk", "apb_pclk"; 111 + }; 112 + 113 + ...
+1 -1
MAINTAINERS
··· 2416 2416 F: Documentation/devicetree/bindings/arm/ste-* 2417 2417 F: Documentation/devicetree/bindings/arm/ux500.yaml 2418 2418 F: Documentation/devicetree/bindings/arm/ux500/ 2419 - F: Documentation/devicetree/bindings/i2c/i2c-nomadik.txt 2419 + F: Documentation/devicetree/bindings/i2c/st,nomadik-i2c.yaml 2420 2420 F: arch/arm/boot/dts/ste-* 2421 2421 F: arch/arm/mach-nomadik/ 2422 2422 F: arch/arm/mach-ux500/