Commit graph

10 commits

Author SHA1 Message Date
Fabio Baltieri eb0a524972 yamllint: indentation: fix dts/bindings/
Fix the YAML files indentation for files in dts/bindings/.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 14:23:53 +01:00
Chris Friedt 83bea9a796 dts: bindings: clean up redundant required false attributes
DTS property attributes are (by default) not required.

Explicitly specifying `required: false` is redundant.
Perhaps a warning to that effect would be useful.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
2022-11-20 13:12:44 -05:00
Martin Jäger d5168a8d96 drivers: i2c: esp32: set timeout to allow clock stretching
The ESP32 series MCUs allow to set a timeout which triggers an error
if the SCL line is unchanged for the specified amount of time.

By default, the ESP-IDF HAL sets the timeout to an arbitrary value of
10 times the bus cycle.

This is not sufficient for chips like the TI bq76952, which pulls the
SCL line low (clock stretching) for several 100 µs.

The timeout should also not be dependent on the chosen bitrate, as it
is defined by the time a chip needs for internal calculation before it
can provide requested data or continue communication.

This commit adds a property to devicetree to allow configuration of
the scl timeout. This value is set via direct register access, as the
ESP-IDF HAL does not provide access to the enable bit and does not
give any information about the maximum size of the timeout (defined
in I2C clock cycles in the register).

Fixes #51351

Signed-off-by: Martin Jäger <martin@libre.solar>
2022-10-31 16:41:57 +09:00
Kumar Gala 35d93ef7bc drivers: i2c: esp32: Rework SDA/SDL pins as gpios in devicetree
For the !SOC_I2C_SUPPORT_HW_CLR_BUS in which we implement bus
reset via GPIOs, change the devicetree properties to be actual
gpio properties and update the code to reflect this.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-26 12:10:58 -05:00
Glauber Maroto Ferreira 5353f86af9 esp32: dts: bindings: i2c: update pin properties
After pinctrl's subsystem support, I2C pin properties are
no longer required for pin muxing, however, this information
is still valuable in an eventual FSM failure if the target
SoC has no harwared mechanisms to support bus recovery.

In this case, bus recovery uses pin information to restore
the I2C bus state.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-04-20 13:27:47 +02:00
Glauber Maroto Ferreira 7fb8fe7c13 esp32: dts: bindings: i2c: add pinctrl properties
and removes bindings previously used by the
pinmux driver.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2022-04-20 13:27:47 +02:00
Sylvio Alves ab91612a6d driver: esp32: I2C code refactoring
Use i2c_hal functions to enable support for
multiple SoCs.

Use DT compat to enable I2C from device
tree configuration

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2021-11-05 14:07:09 -04:00
Ulf Magnusson 2934ee2cda dts: bindings: Remove 'title:' and put all info. into 'description:'
Add any useful information from 'title:' to the 'description:' strings
(e.g. explanations of acronyms), and remove 'title:' as well as any
copy-pasted "this binding gives a ..." boilerplate.

Also clean some description strings up a bit.

Some other things could probably be cleaned up (replacing 'GPIO node'
with 'GPIO controller' on controllers for consistency, for example), but
I kept things close to the original to avoid accidentally messing up.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-18 11:52:45 +01:00
Ulf Magnusson b9240a3cbc dts: bindings: Preserve newlines in descriptions
With https://github.com/zephyrproject-rtos/zephyr/pull/20185, multi-line
descriptions will be formatted nicely, but using '>' breaks it, because
it removes internal newlines (including between paragraphs).

See https://yaml-multiline.info/.

Replace 'description: >' with 'description: |' to encourage '|'. That'll
prevent '>' from getting copied around and messing up long descriptions.

This will lead to some extra newlines in the output, but it's fine.
Line-wrapping messes up any manual formatting.

The replacement was done with

    $ git ls-files 'dts/bindings/*.yaml' | \
          xargs sed -i 's/description:\s*>/description: |/'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-30 07:55:51 +01:00
Mohamed ElShahawi 566d07e00c [ESP32] drivers: Add I2C Device tree support
- Add I2C modules to esp32.dtsi
- I2C Pins and bitrate config moved to esp32.dts

Signed-off-by: Mohamed ElShahawi <ExtremeGTX@hotmail.com>
2019-10-22 08:01:24 -05:00