Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: display: ssd16xx: Add support for the ssd1677 EPD driver chip #75403

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nisargjhaveri
Copy link

@nisargjhaveri nisargjhaveri commented Jul 3, 2024

Add support for the SSD1677 EPD driver chip with support for up to 960x680 pixel displays.

Tested with the Waveshare 4.26" 800x480 display with XIAO BLE board. I believe it is the same as Good Display GDEQ0426T82. Tested with the samples/drivers/display sample.

The SSD1677 requires x address to be full address, instead of the byte address used by SSD16XX. Added a new quirk to handle this.

The display requires a different GDO control flag as the panel layout might be different, add an option to set this.

The display also requires the scan direction for y axis to be reversed, add an option to set this as well.

Example devicetree overlay for the display:

&spi2 {
    cs-gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
};

/ {
    chosen {
        zephyr,display = &ssd1677;
    };

    mipi_dbi {
        compatible = "zephyr,mipi-dbi-spi";
        spi-dev = <&spi2>;
        dc-gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
        reset-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
        #address-cells = <1>;
        #size-cells = <0>;

        ssd1677: ssd1677@0 {
            compatible = "solomon,ssd1677";
            mipi-max-frequency = <4000000>;
            reg = <0>;
            busy-gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;

            width = <480>;
            height = <800>;

            tssv = <0x80>;
            softstart = [AE C7 C3 C0 80];
            gdo-flags = <0x02>;
            scan-y-reverse;

            full {
                border-waveform = <0x01>;
            };

            partial {
                border-waveform = <0x80>;
            };
        };
    };
};

@zephyrbot zephyrbot added area: Devicetree Binding PR modifies or adds a Device Tree binding area: Display labels Jul 3, 2024
Copy link

github-actions bot commented Jul 3, 2024

Hello @nisargjhaveri, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

@decsny decsny removed their request for review July 29, 2024 20:11
Copy link
Collaborator

@danieldegrasse danieldegrasse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change itself looks ok to me- one formatting nit, and please address the errors highlighted by the compliance script. You should be able to see the specific lines in the Github UI when looking at the PR diff

drivers/display/ssd16xx.c Outdated Show resolved Hide resolved
Copy link
Collaborator

@danieldegrasse danieldegrasse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not add additional "fixup" commits to address reviewer requests- squash the commits making changes requested by reviewers back into your original commit, and force push over the PR branch. If you'd like to run clang format on the PR to silence those CI warnings that is ok, but please do so in a separate commit from where you have functional changes (it seems you already did this, just want to make sure it is clear this change should not be squashed into the commit adding functionality)

@nisargjhaveri
Copy link
Author

@danieldegrasse Thanks for the suggestions. I've rebased and force pushed the commits.

Copy link
Collaborator

@danieldegrasse danieldegrasse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need a commit body in both commits, that is going to fail the CI checks currently

@nisargjhaveri
Copy link
Author

@danieldegrasse Updated again. Sorry for the troubles. Hope it makes sense this time? :)

Add support for the SSD1677 EPD driver chip with support for up to
960x680 pixel displays.

Tested with the Waveshare 4.26" 800x480 display with XIAO BLE board.
I believe it is the same as Good Display GDEQ0426T82.
Tested with the samples/drivers/display sample.

The SSD1677 requires x address to be full address, instead of the byte
address used by SSD16XX. Added a new quirk to handle this.

The display requires a different GDO control flag as the panel layout
might be different, add an option to set this.

The display also requires the scan direction for y axis to be reversed,
add an option to set this as well.

Signed-off-by: Nisarg Jhaveri <nisargjhaveri@gmail.com>
Copy link
Contributor

@Snevzor Snevzor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropping my review as I don't think I can add any value here. My initial comment was answered and all is clear to me.

@nisargjhaveri
Copy link
Author

@danieldegrasse Could you have another look? I had to push more minor changes to fix the CI checks.

@danieldegrasse
Copy link
Collaborator

@danieldegrasse Could you have another look? I had to push more minor changes to fix the CI checks.

Looks like there is still an issue. You can run this check locally (on a Linux system) with ./scripts/ci/check_compliance.py, provided you install the python dependencies in scripts/requirements-compliance.txt

Run `clang format` on parts of `ssd16xx.c` to format some recent changes
correctly.

Signed-off-by: Nisarg Jhaveri <nisargjhaveri@gmail.com>
@nisargjhaveri
Copy link
Author

Thanks for that! I pushed again, and it passes the failing check (gitlint) locally.

@nisargjhaveri
Copy link
Author

Hi, @danieldegrasse. Is there anything else pending from my end? What needs to be done to merge this PR if it looks good?

Copy link
Collaborator

@danieldegrasse danieldegrasse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the ping, LGTM

@nisargjhaveri
Copy link
Author

@galak, @jfischer-no, could you please have a look as well? Let me know if this needs any more changes?

@jfischer-no
Copy link
Collaborator

@andysan Could you please take a look?

@jfischer-no jfischer-no requested review from andysan and removed request for galak October 7, 2024 14:54
@andysan
Copy link
Collaborator

andysan commented Oct 7, 2024

@andysan Could you please take a look?

I will, but it'll be a couple of days. I can't promise I'll be able to find time before the weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Devicetree Binding PR modifies or adds a Device Tree binding area: Display
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants