Commit 8d2dc2f9 authored by Daniel DeGrasse's avatar Daniel DeGrasse Committed by Anas Nashif
Browse files

drivers: display: ssd16xx: convert to MIPI DBI API



Convert SSD16XX display driver to use MIPI DBI API. This commit also
updates in tree board devicetrees to include the emulated MIPI DBI SPI
driver.

Signed-off-by: default avatarDaniel DeGrasse <daniel.degrasse@nxp.com>
parent 2690cacf
Loading
Loading
Loading
Loading
+48 −40
Original line number Diff line number Diff line
@@ -46,24 +46,21 @@
		pwm-led3 = &back_pwm_led;
		watchdog0 = &wdt0;
	};
};

&spi1 {
	compatible = "nordic,nrf-spi";
	status = "okay";
	cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
	mipi_dbi {
		compatible = "zephyr,mipi-dbi-spi";
		spi-dev = <&spi1>;
		reset-gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
		dc-gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
		#address-cells = <1>;
		#size-cells = <0>;

	pinctrl-0 = <&spi1_default>;
	pinctrl-1 = <&spi1_sleep>;
	pinctrl-names = "default", "sleep";
		ssd16xx: ssd16xxfb@0 {
			compatible = "gooddisplay,gdeh0213b1", "solomon,ssd1673";
		spi-max-frequency = <4000000>;
			mipi-max-frequency = <4000000>;
			reg = <0>;
			width = <250>;
			height = <122>;
		reset-gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
		dc-gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
			busy-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;

			full {
@@ -97,3 +94,14 @@
			};
		};
	};
};

&spi1 {
	compatible = "nordic,nrf-spi";
	status = "okay";
	cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;

	pinctrl-0 = <&spi1_default>;
	pinctrl-1 = <&spi1_sleep>;
	pinctrl-names = "default", "sleep";
};
+85 −77
Original line number Diff line number Diff line
@@ -27,24 +27,21 @@
	aliases {
		watchdog0 = &wdt0;
	};
};

&spi1 {
	compatible = "nordic,nrf-spi";
	status = "okay";
	cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
	mipi_dbi {
		compatible = "zephyr,mipi-dbi-spi";
		spi-dev = <&spi1>;
		reset-gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
		dc-gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
		#address-cells = <1>;
		#size-cells = <0>;

	pinctrl-0 = <&spi1_default>;
	pinctrl-1 = <&spi1_sleep>;
	pinctrl-names = "default", "sleep";
		ssd16xx: ssd16xxfb@0 {
			compatible = "gooddisplay,gdeh0213b72", "solomon,ssd1675a";
		spi-max-frequency = <4000000>;
			mipi-max-frequency = <4000000>;
			reg = <0>;
			width = <250>;
			height = <122>;
		reset-gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
		dc-gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
			busy-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;

			full {
@@ -115,3 +112,14 @@
			};
		};
	};
};

&spi1 {
	compatible = "nordic,nrf-spi";
	status = "okay";
	cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;

	pinctrl-0 = <&spi1_default>;
	pinctrl-1 = <&spi1_sleep>;
	pinctrl-names = "default", "sleep";
};
+21 −16
Original line number Diff line number Diff line
@@ -10,17 +10,21 @@
	chosen {
		zephyr,display = &ssd16xx_waveshare_epaper_gdeh0154a07;
	};
};

&arduino_spi {
	mipi_dbi_waveshare_epaper_gdeh0154a07 {
		compatible = "zephyr,mipi-dbi-spi";
		spi-dev = <&arduino_spi>;
		dc-gpios = <&arduino_header 15 GPIO_ACTIVE_HIGH>;	/* D9 */
		reset-gpios = <&arduino_header 14 GPIO_ACTIVE_LOW>;	/* D8 */
		#address-cells = <1>;
		#size-cells = <0>;

		ssd16xx_waveshare_epaper_gdeh0154a07: ssd16xxfb@0 {
			compatible = "gooddisplay,gdeh0154a07", "solomon,ssd1681";
		spi-max-frequency = <4000000>;
			mipi-max-frequency = <4000000>;
			reg = <0>;
			width = <200>;
			height = <200>;
		dc-gpios = <&arduino_header 15 GPIO_ACTIVE_LOW>;	/* D9 */
		reset-gpios = <&arduino_header 14 GPIO_ACTIVE_LOW>;	/* D8 */
			busy-gpios = <&arduino_header 13 GPIO_ACTIVE_HIGH>;	/* D7 */

			tssv = <0x80>;
@@ -34,3 +38,4 @@
			};
		};
	};
};
+42 −37
Original line number Diff line number Diff line
@@ -10,17 +10,21 @@
	chosen {
		zephyr,display = &ssd16xx_waveshare_epaper_gdeh0213b1;
	};
};

&arduino_spi {
	mipi_dbi_waveshare_epaper_gdeh0213b1 {
		compatible = "zephyr,mipi-dbi-spi";
		spi-dev = <&arduino_spi>;
		dc-gpios = <&arduino_header 15 GPIO_ACTIVE_HIGH>;	/* D9 */
		reset-gpios = <&arduino_header 14 GPIO_ACTIVE_LOW>;	/* D8 */
		#address-cells = <1>;
		#size-cells = <0>;

		ssd16xx_waveshare_epaper_gdeh0213b1: ssd16xxfb@0 {
			compatible = "gooddisplay,gdeh0213b1", "solomon,ssd1673";
		spi-max-frequency = <4000000>;
			mipi-max-frequency = <4000000>;
			reg = <0>;
			width = <250>;
			height = <120>;
		dc-gpios = <&arduino_header 15 GPIO_ACTIVE_LOW>;	/* D9 */
		reset-gpios = <&arduino_header 14 GPIO_ACTIVE_LOW>;	/* D8 */
			busy-gpios = <&arduino_header 13 GPIO_ACTIVE_HIGH>;	/* D7 */

			full {
@@ -54,3 +58,4 @@
			};
		};
	};
};
+58 −53
Original line number Diff line number Diff line
@@ -10,17 +10,21 @@
	chosen {
		zephyr,display = &ssd16xx_waveshare_epaper_gdeh0213b72;
	};
};

&arduino_spi {
	mipi_dbi_waveshare_epaper_gdeh0213b72 {
		compatible = "zephyr,mipi-dbi-spi";
		spi-dev = <&arduino_spi>;
		dc-gpios = <&arduino_header 15 GPIO_ACTIVE_HIGH>;	/* D9 */
		reset-gpios = <&arduino_header 14 GPIO_ACTIVE_LOW>;	/* D8 */
		#address-cells = <1>;
		#size-cells = <0>;

		ssd16xx_waveshare_epaper_gdeh0213b72: ssd16xxfb@0 {
			compatible = "gooddisplay,gdeh0213b72", "solomon,ssd1675a";
		spi-max-frequency = <4000000>;
			mipi-max-frequency = <4000000>;
			reg = <0>;
			width = <250>;
			height = <120>;
		dc-gpios = <&arduino_header 15 GPIO_ACTIVE_LOW>;	/* D9 */
		reset-gpios = <&arduino_header 14 GPIO_ACTIVE_LOW>;	/* D8 */
			busy-gpios = <&arduino_header 13 GPIO_ACTIVE_HIGH>;	/* D7 */

			full {
@@ -70,3 +74,4 @@
			};
		};
	};
};
Loading