Re: Adding new DTS binding for SAM0 I2C


Erwan Gouriou
 

Hi Léonard,

Some additional information on build error would help to provide you support.

Cheers
Erwan


On Sun, 1 Jul 2018 at 13:37, Léonard Bise <leonard.bise@...> wrote:
I'm trying to add support for SAM0 I2C. Currently my code is compiling as I see warnings in my i2c_sam0.c file. 
However I'm trying to add a new binding for that in zephyr/dts/bindings/i2c/atmel,sam0-i2c.yaml and hitting a wall.

---
title: Atmel SAM0 SERCOM I2C driver
id: atmel,sam0-i2c
version: 0.1
 
description: >
    This binding gives a base representation of the Atmel SAM0 SERCOM I2C driver
 
inherits:
    !include i2c.yaml
 
properties:
    compatible:
      type: string
      category: required
      description: compatible strings
      constraint: "atmel,sam0-i2c"
 
    reg:
      type: array
      description: mmio register space
      generation: define
      category: required
 
...

Then in my board dts I added the following:

&sercom3 {
status = "ok";
compatible = "atmel,sam0-i2c";
clock-frequency = <I2C_BITRATE_FAST>;
#address-cells = <1>;
#size-cells = <0>;
};

But something is missing because I keep getting an error when building that it cannot parse the device tree.
I looked around how the other SAM0 device are setup but I didn't find what I'm missing.

Any pointer on how I should go about setting up this binding ?

Best regards,
Léonard.


Join devel@lists.zephyrproject.org to automatically receive all group messages.