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:
parent
801fbddfcc
commit
c73428062d
|
@ -110,7 +110,7 @@
|
||||||
|
|
||||||
mipi_dbi {
|
mipi_dbi {
|
||||||
compatible = "zephyr,mipi-dbi-spi";
|
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>;
|
dc-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
|
||||||
spi-dev = <&spi2>;
|
spi-dev = <&spi2>;
|
||||||
write-only;
|
write-only;
|
||||||
|
|
|
@ -128,7 +128,7 @@
|
||||||
mipi_dbi {
|
mipi_dbi {
|
||||||
compatible = "zephyr,mipi-dbi-spi";
|
compatible = "zephyr,mipi-dbi-spi";
|
||||||
dc-gpios = <&portc 6 GPIO_ACTIVE_HIGH>;
|
dc-gpios = <&portc 6 GPIO_ACTIVE_HIGH>;
|
||||||
reset-gpios = <&portc 7 GPIO_ACTIVE_HIGH>;
|
reset-gpios = <&portc 7 GPIO_ACTIVE_LOW>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
spi-dev = <&sercom7>;
|
spi-dev = <&sercom7>;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
buydisplay_2_8_tft_touch_arduino_mipi_dbi {
|
buydisplay_2_8_tft_touch_arduino_mipi_dbi {
|
||||||
compatible = "zephyr,mipi-dbi-spi";
|
compatible = "zephyr,mipi-dbi-spi";
|
||||||
dc-gpios = <&arduino_header 13 GPIO_ACTIVE_HIGH>; /* D7 */
|
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>;
|
spi-dev = <&arduino_spi>;
|
||||||
write-only;
|
write-only;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
buydisplay_3_5_tft_touch_arduino_mipi_dbi {
|
buydisplay_3_5_tft_touch_arduino_mipi_dbi {
|
||||||
compatible = "zephyr,mipi-dbi-spi";
|
compatible = "zephyr,mipi-dbi-spi";
|
||||||
dc-gpios = <&arduino_header 13 GPIO_ACTIVE_HIGH>; /* D7 */
|
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>;
|
spi-dev = <&arduino_spi>;
|
||||||
write-only;
|
write-only;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
|
|
@ -74,7 +74,7 @@
|
||||||
mipi_dbi {
|
mipi_dbi {
|
||||||
compatible = "zephyr,mipi-dbi-spi";
|
compatible = "zephyr,mipi-dbi-spi";
|
||||||
dc-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
|
dc-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
|
||||||
reset-gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
|
reset-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
|
||||||
spi-dev = <&spi3>;
|
spi-dev = <&spi3>;
|
||||||
write-only;
|
write-only;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
mipi_dbi {
|
mipi_dbi {
|
||||||
compatible = "zephyr,mipi-dbi-spi";
|
compatible = "zephyr,mipi-dbi-spi";
|
||||||
dc-gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
|
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>;
|
spi-dev = <&spi3>;
|
||||||
write-only;
|
write-only;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
|
|
@ -251,12 +251,12 @@ static int mipi_dbi_spi_reset(const struct device *dev, uint32_t delay)
|
||||||
return -ENOTSUP;
|
return -ENOTSUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = gpio_pin_set_dt(&config->reset, 0);
|
ret = gpio_pin_set_dt(&config->reset, 1);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
k_msleep(delay);
|
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)
|
static int mipi_dbi_spi_init(const struct device *dev)
|
||||||
|
|
|
@ -25,8 +25,7 @@ properties:
|
||||||
reset-gpios:
|
reset-gpios:
|
||||||
type: phandle-array
|
type: phandle-array
|
||||||
description: |
|
description: |
|
||||||
Reset GPIO pin. Used to reset the display during initialization.
|
Reset GPIO pin. Set high to reset the display
|
||||||
Active low pin.
|
|
||||||
|
|
||||||
write-only:
|
write-only:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
Loading…
Reference in a new issue