Skip to content

Conversation

@Sizurka
Copy link
Contributor

@Sizurka Sizurka commented Mar 7, 2019

This adds a SERCOM I2C driver for SAM0 series chips.

Tested with a SAM D21 chip against a SSD1306 display and a MLX90393
sensor. Only compile tested for SAM D20.

Signed-off-by: Derek Hageman [email protected]

@zephyrbot
Copy link

zephyrbot commented Mar 7, 2019

All checks are passing now.

Review history of this comment for details about previous failed status.
Note that some checks might have not completed yet.

@codecov-io
Copy link

codecov-io commented Mar 7, 2019

Codecov Report

Merging #14128 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #14128   +/-   ##
=======================================
  Coverage   52.92%   52.92%           
=======================================
  Files         309      309           
  Lines       45268    45268           
  Branches    10451    10451           
=======================================
  Hits        23956    23956           
  Misses      16544    16544           
  Partials     4768     4768

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5049694...fd05729. Read the comment docs.

@Sizurka
Copy link
Contributor Author

Sizurka commented Mar 22, 2019

Unfortunately, I think pulling the definitions from dts_fixup.h may have been premature. I'd thought you could just set an alias in the DTS (e.g. i2c-0 = &sercom3;) to get a stable define for the board's pinmux.c, but it looks like everything other than LED, SW, and PWM_LED are marked as deprecated by extract_dts_includes.py, unless they start with "DT_".

So it looks like you'd have to use the DT_ define with the address in it (e.g. DT_ATMEL_SAM0_I2C_42001400_BASE_ADDRESS), which is awkward or do a hack and name the alias something like dt-i2c-0 = &sercom3; which feels more like a bug than what's intended.

@Sizurka
Copy link
Contributor Author

Sizurka commented Mar 29, 2019

Note: I have a branch with DMA support here. That depends on #14861 for DMA support and can be squashed if that's merged or as a separate PR later.

@galak galak added the platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM) label Apr 20, 2019
@galak
Copy link
Contributor

galak commented Apr 26, 2019

Any plans to address the CODEOWNER issue?

@Sizurka
Copy link
Contributor Author

Sizurka commented Apr 26, 2019

@galak: Who should I set it to? I don't mind setting it to myself, but I'm not sure that's the best choice. This applies to the other SAM0 PRs in general, too.

benpicco added a commit to benpicco/zephyr that referenced this pull request Apr 26, 2019
Add the Atmel SAM R21 Xplained Pro Evaluation Kit to zephyr.

So far, UART, SPI, I2C (depends on zephyrproject-rtos#14128), debug LED and user button
have been tested.

Signed-off-by: Benjamin Valentin <[email protected]>
nashif pushed a commit that referenced this pull request Apr 28, 2019
Add the Atmel SAM R21 Xplained Pro Evaluation Kit to zephyr.

So far, UART, SPI, I2C (depends on #14128), debug LED and user button
have been tested.

Signed-off-by: Benjamin Valentin <[email protected]>
@Sizurka Sizurka force-pushed the sam0-i2c branch 2 times, most recently from 351f5dc to 7f82f64 Compare May 1, 2019 00:05
nashif pushed a commit that referenced this pull request May 3, 2019
Add the Atmel SAM R21 Xplained Pro Evaluation Kit to zephyr.

So far, UART, SPI, I2C (depends on #14128), debug LED and user button
have been tested.

Signed-off-by: Benjamin Valentin <[email protected]>
@nashif
Copy link
Member

nashif commented May 3, 2019

needs rebase

Sizurka added 2 commits May 3, 2019 14:57
This adds a SERCOM I2C driver for SAM0 series chips.

Tested with a SAMD21 chip on a SSD1306 display and a MLX90393
sensor.  Only compile tested for SAMD20 and SAMR21.

Signed-off-by: Derek Hageman <[email protected]>
Add myself as owner for the SAM0 I2C driver.

Signed-off-by: Derek Hageman <[email protected]>
@Sizurka
Copy link
Contributor Author

Sizurka commented May 3, 2019

Rebase done.

@nashif nashif merged commit 1892c67 into zephyrproject-rtos:master May 7, 2019
@Sizurka Sizurka deleted the sam0-i2c branch May 8, 2019 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: I2C platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants