diff mbox series

[v3,2/2] devicetree bindings I2C Add bindings doc for Sunplus SP7021

Message ID 9831c3acbbd34ad0d82eec67916f51bff68ae7fe.1641188699.git.lhjeff911@gmail.com
State New
Headers show
Series Add I2C control driver for Sunplus SP7021 SoC | expand

Commit Message

Li-hao Kuo Jan. 3, 2022, 5:49 a.m. UTC
Add devicetree bindings I2C Add bindings doc for Sunplus SP7021

Signed-off-by: Li-hao Kuo <lhjeff911@gmail.com>
---
Changes in v3:
 - Addressed all comments from Mr. Rob Herring.
 - Modified the structure and register access method.
 - Modifiedthe the YAML file.

 .../devicetree/bindings/i2c/i2c-sunplus.yaml       | 72 ++++++++++++++++++++++
 MAINTAINERS                                        |  1 +
 2 files changed, 73 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-sunplus.yaml

Comments

Rob Herring (Arm) Jan. 10, 2022, 10:19 p.m. UTC | #1
On Mon, Jan 03, 2022 at 01:49:23PM +0800, Li-hao Kuo wrote:
> Add devicetree bindings I2C Add bindings doc for Sunplus SP7021
> 
> Signed-off-by: Li-hao Kuo <lhjeff911@gmail.com>
> ---
> Changes in v3:
>  - Addressed all comments from Mr. Rob Herring.
>  - Modified the structure and register access method.
>  - Modifiedthe the YAML file.
> 
>  .../devicetree/bindings/i2c/i2c-sunplus.yaml       | 72 ++++++++++++++++++++++
>  MAINTAINERS                                        |  1 +
>  2 files changed, 73 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/i2c/i2c-sunplus.yaml
> 
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-sunplus.yaml b/Documentation/devicetree/bindings/i2c/i2c-sunplus.yaml
> new file mode 100644
> index 0000000..ac03041
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/i2c-sunplus.yaml
> @@ -0,0 +1,72 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +# Copyright (C) Sunplus Co., Ltd.
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/i2c/i2c-sunplus.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Sunplus I2C controller
> +
> +allOf:
> +  - $ref: /schemas/i2c/i2c-controller.yaml#
> +
> +maintainers:
> +  - Li-hao Kuo <lhjeff911@gmail.com>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - sunplus,sp7021-i2cm
> +      - sunplus,q645-i2cm
> +
> +  reg:
> +    items:
> +      - description: I2C registers
> +      - description: I2C DMA registers
> +      - description: I2C DMA power registers
> +
> +  reg-names:
> +    items:
> +      - const: i2cm
> +      - const: i2cmdma
> +      - const: i2cdmapower
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +
> +  resets:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - reg-names
> +  - interrupts
> +  - clocks
> +  - resets
> +  - pinctrl-names
> +  - pinctrl-0
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/sp-sp7021.h>
> +    #include <dt-bindings/reset/sp-sp7021.h>
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    i2c@9C004600 {
> +        compatible = "sunplus,sp7021-i2cm";
> +			reg = <0x9c004600 0x80>, <0x9c004680 0x80>, <0x9c000000 0x80>;
> +			reg-names = "i2cm", "i2cmdma", "i2cdmapower";

Indentation is messed up. Use spaces.

> +        interrupt-parent = <&intc>;
> +        interrupts = <174 IRQ_TYPE_LEVEL_HIGH>;
> +        clocks = <&clkc I2CM0>;
> +        resets = <&rstc RST_I2CM0>;
> +        clock-frequency = <100000>;
> +        pinctrl-names = "default";
> +        pinctrl-0 = <&i2cm0_pins>;
> +    };
> +...
> diff --git a/MAINTAINERS b/MAINTAINERS
> index a06993b..2b8fa55 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -18246,6 +18246,7 @@ SUNPLUS I2C CONTROLLER INTERFACE DRIVER
>  M:	Li-hao Kuo <lhjeff911@gmail.com>
>  L:	linux-i2c@vger.kernel.org
>  S:	Maintained
> +F:	Documentation/devicetree/bindings/i2c/i2c-sunplus.yaml
>  F:	drivers/i2c/busses/i2c-sunplus.c
>  
>  SUPERH
> -- 
> 2.7.4
> 
>
Rob Herring (Arm) Jan. 10, 2022, 10:20 p.m. UTC | #2
On Mon, Jan 03, 2022 at 01:49:23PM +0800, Li-hao Kuo wrote:
> Add devicetree bindings I2C Add bindings doc for Sunplus SP7021

Please follow the subject format used by other files in the 
subsystem/directory. This should be clear with 'git log --oneline'.
'dt-bindings: i2c: ...' in this case.

> 
> Signed-off-by: Li-hao Kuo <lhjeff911@gmail.com>
> ---
> Changes in v3:
>  - Addressed all comments from Mr. Rob Herring.
>  - Modified the structure and register access method.
>  - Modifiedthe the YAML file.
> 
>  .../devicetree/bindings/i2c/i2c-sunplus.yaml       | 72 ++++++++++++++++++++++
>  MAINTAINERS                                        |  1 +
>  2 files changed, 73 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/i2c/i2c-sunplus.yaml
> 
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-sunplus.yaml b/Documentation/devicetree/bindings/i2c/i2c-sunplus.yaml
> new file mode 100644
> index 0000000..ac03041
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/i2c-sunplus.yaml
> @@ -0,0 +1,72 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +# Copyright (C) Sunplus Co., Ltd.
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/i2c/i2c-sunplus.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Sunplus I2C controller
> +
> +allOf:
> +  - $ref: /schemas/i2c/i2c-controller.yaml#
> +
> +maintainers:
> +  - Li-hao Kuo <lhjeff911@gmail.com>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - sunplus,sp7021-i2cm
> +      - sunplus,q645-i2cm
> +
> +  reg:
> +    items:
> +      - description: I2C registers
> +      - description: I2C DMA registers
> +      - description: I2C DMA power registers
> +
> +  reg-names:
> +    items:
> +      - const: i2cm
> +      - const: i2cmdma
> +      - const: i2cdmapower
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +
> +  resets:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - reg-names
> +  - interrupts
> +  - clocks
> +  - resets
> +  - pinctrl-names
> +  - pinctrl-0
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/sp-sp7021.h>
> +    #include <dt-bindings/reset/sp-sp7021.h>
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    i2c@9C004600 {
> +        compatible = "sunplus,sp7021-i2cm";
> +			reg = <0x9c004600 0x80>, <0x9c004680 0x80>, <0x9c000000 0x80>;
> +			reg-names = "i2cm", "i2cmdma", "i2cdmapower";
> +        interrupt-parent = <&intc>;
> +        interrupts = <174 IRQ_TYPE_LEVEL_HIGH>;
> +        clocks = <&clkc I2CM0>;
> +        resets = <&rstc RST_I2CM0>;
> +        clock-frequency = <100000>;
> +        pinctrl-names = "default";
> +        pinctrl-0 = <&i2cm0_pins>;
> +    };
> +...
> diff --git a/MAINTAINERS b/MAINTAINERS
> index a06993b..2b8fa55 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -18246,6 +18246,7 @@ SUNPLUS I2C CONTROLLER INTERFACE DRIVER
>  M:	Li-hao Kuo <lhjeff911@gmail.com>
>  L:	linux-i2c@vger.kernel.org
>  S:	Maintained
> +F:	Documentation/devicetree/bindings/i2c/i2c-sunplus.yaml
>  F:	drivers/i2c/busses/i2c-sunplus.c
>  
>  SUPERH
> -- 
> 2.7.4
> 
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/i2c/i2c-sunplus.yaml b/Documentation/devicetree/bindings/i2c/i2c-sunplus.yaml
new file mode 100644
index 0000000..ac03041
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-sunplus.yaml
@@ -0,0 +1,72 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright (C) Sunplus Co., Ltd.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/i2c/i2c-sunplus.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Sunplus I2C controller
+
+allOf:
+  - $ref: /schemas/i2c/i2c-controller.yaml#
+
+maintainers:
+  - Li-hao Kuo <lhjeff911@gmail.com>
+
+properties:
+  compatible:
+    enum:
+      - sunplus,sp7021-i2cm
+      - sunplus,q645-i2cm
+
+  reg:
+    items:
+      - description: I2C registers
+      - description: I2C DMA registers
+      - description: I2C DMA power registers
+
+  reg-names:
+    items:
+      - const: i2cm
+      - const: i2cmdma
+      - const: i2cdmapower
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  resets:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - interrupts
+  - clocks
+  - resets
+  - pinctrl-names
+  - pinctrl-0
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/sp-sp7021.h>
+    #include <dt-bindings/reset/sp-sp7021.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+    i2c@9C004600 {
+        compatible = "sunplus,sp7021-i2cm";
+			reg = <0x9c004600 0x80>, <0x9c004680 0x80>, <0x9c000000 0x80>;
+			reg-names = "i2cm", "i2cmdma", "i2cdmapower";
+        interrupt-parent = <&intc>;
+        interrupts = <174 IRQ_TYPE_LEVEL_HIGH>;
+        clocks = <&clkc I2CM0>;
+        resets = <&rstc RST_I2CM0>;
+        clock-frequency = <100000>;
+        pinctrl-names = "default";
+        pinctrl-0 = <&i2cm0_pins>;
+    };
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index a06993b..2b8fa55 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -18246,6 +18246,7 @@  SUNPLUS I2C CONTROLLER INTERFACE DRIVER
 M:	Li-hao Kuo <lhjeff911@gmail.com>
 L:	linux-i2c@vger.kernel.org
 S:	Maintained
+F:	Documentation/devicetree/bindings/i2c/i2c-sunplus.yaml
 F:	drivers/i2c/busses/i2c-sunplus.c
 
 SUPERH