[PATCH] dt-bindings: i2c: convert to dt schema
Conor Dooley
conor at kernel.org
Wed Jun 19 10:27:26 PDT 2024
On Wed, Jun 19, 2024 at 09:19:36PM +0530, Kanak Shilledar wrote:
$subject is missing a prefix for the device in question.
> diff --git a/Documentation/devicetree/bindings/i2c/nxp,lpc1788-i2c.yaml b/Documentation/devicetree/bindings/i2c/nxp,lpc1788-i2c.yaml
> new file mode 100644
> index 000000000000..79d6774dd54f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/nxp,lpc1788-i2c.yaml
> @@ -0,0 +1,66 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/i2c/nxp,lpc1788-i2c.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NXP I2C controller for LPC2xxx/178x/18xx/43xx
> +
> +maintainers:
> + - Vladimir Zapolskiy <vz at mleia.com>
> +
> +allOf:
> + - $ref: /schemas/i2c/i2c-controller.yaml#
> +
> +properties:
> + compatible:
> + const: nxp,lpc1788-i2c
> +
> + reg:
> + description: physical address and length of the device registers
Drop all of these descriptions as they're obvious, other than...
> + maxItems: 1
> +
> + interrupts:
> + description: a single interrupt specifier
> + maxItems: 1
> +
> + clocks:
> + description: clock for the device
> + maxItems: 1
> +
> + clock-frequency:
> + description: the desired I2C bus clock frequency in Hz
..maybe this one. Otherwise this looks okay to me.
Thanks,
Conor.
> + default: 100000
> +
> + resets:
> + description: reset for the device
> + maxItems: 1
> +
> + '#address-cells':
> + const: 1
> +
> + '#size-cells':
> + const: 0
These two come for free with the ref to i2c-controller.yaml :)
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - clocks
> + - "#address-cells"
> + - "#size-cells"
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include "dt-bindings/clock/lpc18xx-ccu.h"
> +
> + i2c at 400a1000 {
> + compatible = "nxp,lpc1788-i2c";
> + reg = <0x400a1000 0x1000>;
> + interrupts = <18>;
> + clocks = <&ccu1 CLK_APB1_I2C0>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + };
> --
> 2.45.2
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20240619/c84d3916/attachment.sig>
More information about the linux-arm-kernel
mailing list