zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.2k stars 6.25k forks source link

Convert SAM SoC drivers to DT_INST #23107

Closed nandojve closed 4 years ago

nandojve commented 4 years ago

Is your enhancement proposal related to a problem? Please describe.

This is to keep tracking of drivers to DT_INST related to Atmel SoCs. The worked started with #22806.

Describe the solution you'd like

Move/Create DT_INST for below driver list:

SoC:

Boards:

Others:

Pinctrl: Feature #24236 #24319

Issues:

23281 fixed by #23289

23415 fixed by #23427

24399 fixed by #24401

nandojve commented 4 years ago

@galak

nandojve commented 4 years ago

@carlescufi @benpicco @stephanosio

nandojve commented 4 years ago

@jhedberg

galak commented 4 years ago

@nandojve are you able to get back to look at conversions for SAM now that we have the new DT macro's in place. Here's what I have (the # is count of DT_ references that need modification, or a rough estimate).

     10 drivers/adc/adc_sam_afec.c
      2 drivers/flash/flash_sam.c
     35 drivers/gpio/gpio_sam.c
      2 drivers/hwinfo/hwinfo_sam.c
     12 drivers/i2c/i2c_sam_twi.c
     18 drivers/i2c/i2c_sam_twihs.c
     35 drivers/serial/uart_sam.c
     24 drivers/serial/usart_sam.c
      5 drivers/spi/spi_sam.c
     28 drivers/usb/device/usb_dc_sam.c

     13 drivers/adc/adc_sam0.c
      9 drivers/counter/counter_sam0_tc32.c
     12 drivers/gpio/gpio_sam0.c
     35 drivers/i2c/i2c_sam0.c
     12 drivers/pinmux/pinmux_sam0.c
     46 drivers/serial/uart_sam0.c
     43 drivers/spi/spi_sam0.c
nandojve commented 4 years ago

Hi @galak, I can take look at weekend and try update full list. I saw tons of DT_INST moving and probably lots of SAM related.

galak commented 4 years ago

Hi @galak, I can take look at weekend and try update full list. I saw tons of DT_INST moving and probably lots of SAM related.

Thanks. All the DT_INST conversions should be complete. This work now would be moving away from something like DT_ATMEL_SAM0_SPI_... to DT_INST and DT_NODELABEL (nodelabel form used for cases like pinmux.c that you need to know the specific instance). The idea being that the node label in dts will match the SoC docs naming.

nandojve commented 4 years ago

@galak I believe is almost done with Atmel SAM/SAM0.

Drivers converted however not define the global DT_DRV_COMPAT: drivers/hwinfo/hwinfo_sam.c

Drivers without DT support: drivers/dma/dma_sam_xdmac.c drivers/i2s/i2s_sam_ssc.c

galak commented 4 years ago

@galak I believe is almost done with Atmel SAM/SAM0.

Drivers converted however not define the global DT_DRV_COMPAT: drivers/hwinfo/hwinfo_sam.c

I'm not sure it makes sense in this case, but ok if you want to submit a PR for it.

Drivers without DT support: drivers/dma/dma_sam_xdmac.c drivers/i2s/i2s_sam_ssc.c

Done.

nandojve commented 4 years ago

Atmel SoC DT_INST migration was concluded.