drivers: mipi_dbi: mipi_dbi_spi: change reset pin polarity

Change reset pin polarity for MIPI DBI SPI controller, so that the board
devicetree is responsible for setting the GPIO to active low, and the
driver always sets the pin to a logic 1 to reset the display.

Fixes #68562

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
Daniel DeGrasse 2024-02-05 09:42:37 -06:00 committed by Henrik Brix Andersen
parent 801fbddfcc
commit c73428062d
8 changed files with 9 additions and 10 deletions

View file

@ -110,7 +110,7 @@
mipi_dbi {
compatible = "zephyr,mipi-dbi-spi";
reset-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
dc-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
spi-dev = <&spi2>;
write-only;

View file

@ -128,7 +128,7 @@
mipi_dbi {
compatible = "zephyr,mipi-dbi-spi";
dc-gpios = <&portc 6 GPIO_ACTIVE_HIGH>;
reset-gpios = <&portc 7 GPIO_ACTIVE_HIGH>;
reset-gpios = <&portc 7 GPIO_ACTIVE_LOW>;
#address-cells = <1>;
#size-cells = <0>;
spi-dev = <&sercom7>;

View file

@ -22,7 +22,7 @@
buydisplay_2_8_tft_touch_arduino_mipi_dbi {
compatible = "zephyr,mipi-dbi-spi";
dc-gpios = <&arduino_header 13 GPIO_ACTIVE_HIGH>; /* D7 */
reset-gpios = <&arduino_header 16 GPIO_ACTIVE_HIGH>; /* D10 */
reset-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>; /* D10 */
spi-dev = <&arduino_spi>;
write-only;
#address-cells = <1>;

View file

@ -22,7 +22,7 @@
buydisplay_3_5_tft_touch_arduino_mipi_dbi {
compatible = "zephyr,mipi-dbi-spi";
dc-gpios = <&arduino_header 13 GPIO_ACTIVE_HIGH>; /* D7 */
reset-gpios = <&arduino_header 16 GPIO_ACTIVE_HIGH>; /* D10 */
reset-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>; /* D10 */
spi-dev = <&arduino_spi>;
write-only;
#address-cells = <1>;

View file

@ -74,7 +74,7 @@
mipi_dbi {
compatible = "zephyr,mipi-dbi-spi";
dc-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
spi-dev = <&spi3>;
write-only;
#address-cells = <1>;

View file

@ -52,7 +52,7 @@
mipi_dbi {
compatible = "zephyr,mipi-dbi-spi";
dc-gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
reset-gpios = <&axp192_gpio 4 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_HIGH)>;
reset-gpios = <&axp192_gpio 4 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>;
spi-dev = <&spi3>;
write-only;
#address-cells = <1>;

View file

@ -251,12 +251,12 @@ static int mipi_dbi_spi_reset(const struct device *dev, uint32_t delay)
return -ENOTSUP;
}
ret = gpio_pin_set_dt(&config->reset, 0);
ret = gpio_pin_set_dt(&config->reset, 1);
if (ret < 0) {
return ret;
}
k_msleep(delay);
return gpio_pin_set_dt(&config->reset, 1);
return gpio_pin_set_dt(&config->reset, 0);
}
static int mipi_dbi_spi_init(const struct device *dev)

View file

@ -25,8 +25,7 @@ properties:
reset-gpios:
type: phandle-array
description: |
Reset GPIO pin. Used to reset the display during initialization.
Active low pin.
Reset GPIO pin. Set high to reset the display
write-only:
type: boolean