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

boards/sipeed_longan_nano: separate board definition for Sipeed Longan Nano TFT #19824

Merged
merged 7 commits into from
Aug 7, 2023

Conversation

gschorcht
Copy link
Contributor

@gschorcht gschorcht commented Jul 13, 2023

Contribution description

This PR provides a minimal separate board definition for the Sipeed Longan Nano version with TFT display which is just an extension of boards/sipeed-longan-nano with enabled TFT display module.

From the lessons we had to learn with the Kconfig modelling of optional hardware, the TFT version of the Sipeed Longan Nano board has been split off into its own board definition based on the existing Siepeed Longan Nano board.

Commits ba29a5e, 237819e, 6d8b56d and c5faf34 are small cleanups of peripheral configurations and could be split from this PR as follow-up PR (changes +70 -36).

Testing procedure

Green CI

BOARD=sipeed-longan-nano-tft make -j8 -C tests/drivers/st77xx flash

should work

Issues/PRs references

Follow up to PR #19813 and PR #19814
Prerequisite for PR #19825 and PR #19827

@github-actions github-actions bot added Area: doc Area: Documentation Area: boards Area: Board ports Area: Kconfig Area: Kconfig integration labels Jul 13, 2023
@gschorcht gschorcht added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jul 13, 2023
@riot-ci
Copy link

riot-ci commented Jul 13, 2023

Murdock results

✔️ PASSED

41daa18 boards/sipeed-longan-nano: cleanup peripheral config

Success Failures Total Runtime
7907 0 7907 13m:29s

Artifacts

@gschorcht gschorcht requested a review from benpicco July 24, 2023 10:03
@github-actions github-actions bot added Area: tests Area: tests and testing framework Area: examples Area: Example Applications labels Jul 24, 2023
This commit introduces a separate board definition based on the `sipeed-longan-nano` board definition for the TFT version of the Sipeed Longan Nano board.
@gschorcht gschorcht force-pushed the boards/sipeed-longan-nano-tft branch 2 times, most recently from f550bb5 to c5faf34 Compare August 6, 2023 11:04
@benpicco
Copy link
Contributor

benpicco commented Aug 7, 2023

bors merge

bors bot added a commit that referenced this pull request Aug 7, 2023
19824: boards/sipeed_longan_nano: separate board definition for Sipeed Longan Nano TFT r=benpicco a=gschorcht

### Contribution description

This PR provides a minimal separate board definition for the Sipeed Longan Nano version with TFT display which is just an extension of `boards/sipeed-longan-nano` with enabled TFT display module.

From the lessons we had to learn with the Kconfig modelling of optional hardware, the TFT version of the Sipeed Longan Nano board has been split off into its own board definition based on the existing Siepeed Longan Nano board.

Commits ba29a5e, 237819e, 6d8b56d and c5faf34 are small cleanups of peripheral configurations and could be split from this PR as follow-up PR (changes +70 -36).

### Testing procedure

Green CI

```
BOARD=sipeed-longan-nano-tft make -j8 -C tests/drivers/st77xx flash
```
should work

### Issues/PRs references

Follow up to PR #19813 and PR #19814
Prerequisite for PR #19825 and PR #19827 

19855: gnrc_static: fix static PID assignment r=benpicco a=benpicco



Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
@bors
Copy link
Contributor

bors bot commented Aug 7, 2023

Build failed (retrying...):

bors bot added a commit that referenced this pull request Aug 7, 2023
19824: boards/sipeed_longan_nano: separate board definition for Sipeed Longan Nano TFT r=benpicco a=gschorcht

### Contribution description

This PR provides a minimal separate board definition for the Sipeed Longan Nano version with TFT display which is just an extension of `boards/sipeed-longan-nano` with enabled TFT display module.

From the lessons we had to learn with the Kconfig modelling of optional hardware, the TFT version of the Sipeed Longan Nano board has been split off into its own board definition based on the existing Siepeed Longan Nano board.

Commits ba29a5e, 237819e, 6d8b56d and c5faf34 are small cleanups of peripheral configurations and could be split from this PR as follow-up PR (changes +70 -36).

### Testing procedure

Green CI

```
BOARD=sipeed-longan-nano-tft make -j8 -C tests/drivers/st77xx flash
```
should work

### Issues/PRs references

Follow up to PR #19813 and PR #19814
Prerequisite for PR #19825 and PR #19827 

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
This commit includes the following cleanups:
- The macros `I2C_DEV_1_USED` and `SPI_DEV_1_USED` are now used with the values 0 and 1. This allows to enable but also to disable the second interface even if the board definition enables it by default.
- The second I2C device `I2C_DEV(1)` and the second SPI device `SPI_DEV(1)` are now disabled by default.
- The second SPI device `SPI_DEV(1)` now uses PB5 as default CS signal instead of PA4 to keep PA4 free for ADC or DAC even if `SPI_DEV(1)` is used, for example for the TFT display.
After cleaning up the default config of SPI, this commit cleans up the configuration for `sipeed-longan-nano` a bit:
- PA4 is no longer used as default CS for `SPI_DEV(1)`
- At least one DAC channel PA4 is always available if DAC is used.
- PA4 is always available as ADC channel if DAC is not used.
- The order of ADC and DAC channels has been changed accordingly.
@gschorcht gschorcht force-pushed the boards/sipeed-longan-nano-tft branch from c5faf34 to 41daa18 Compare August 7, 2023 10:48
@bors
Copy link
Contributor

bors bot commented Aug 7, 2023

Canceled.

@gschorcht
Copy link
Contributor Author

gschorcht commented Aug 7, 2023

Build failed (retrying...):

@benpicco Thanks for reviewing and approving the PR.

Unfortunatly, I had forgotten to remove a space I had introduced to trigger a syntax error for testing compilations with different configurations here

.miso_pin = GPIO_PIN(PORT_A, 6),
I removed the space and squashed it directly.

@gschorcht
Copy link
Contributor Author

Now the compilation failed due to the unrelated error with tests/net/gcoap_fileserver

@gschorcht gschorcht added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Aug 7, 2023
@MrKevinWeiss
Copy link
Contributor

yup, that is some flakey results that I guess we didn't fix, we can try again.

@MrKevinWeiss
Copy link
Contributor

bors merge

@bors
Copy link
Contributor

bors bot commented Aug 7, 2023

🕐 Waiting for PR status (GitHub check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@benpicco
Copy link
Contributor

benpicco commented Aug 7, 2023

bors merge

@bors
Copy link
Contributor

bors bot commented Aug 7, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit d512ff6 into RIOT-OS:master Aug 7, 2023
@gschorcht gschorcht deleted the boards/sipeed-longan-nano-tft branch August 8, 2023 05:33
bors bot added a commit that referenced this pull request Sep 6, 2023
19825: drivers: rename st7735 to more generic st77xx r=aabadie a=gschorcht

### Contribution description

This PR provides the following changes:
- renames the driver `st7735` to `st77xx`
- renames the test `st7735` to `st77xx`
- models controller variants as pseudomodules `st7735`, `st7789` and `st7796`
- removes the buggy initialization as a workaround to use reset defaults, see issue #19818 
- adds backward compatibility header files for `ST7735_PARAM_*` symbols
- adds a test board for compilation test of backward compatibility
- updates the corresponding board definitions

The PR should solve the remaining dependency issues in KConfig we had by using `st7735` module for different controller variants. The backward compatibility header files should work for boards that still use `ST7735_PARAM_*` in their board definitions so that the board defintions at user's side use shouldn't be affected.

~To be compilable, the PR includes PR #19824.~

### Testing procedure

- Green CI
- `tests/drivers/disp_dev` and `tests/drivers/st77xx` should still work for all boards using a ST77xx display.
- The PR was already tested for these tests for:
   - [x] `adafruit-pybadge`
   - [x] `esp32s2-lilygo-ttgo-t8`
   - [x] `esp32s3-usb-otg`
   - [x] `sipeed-longan-nano`

### Issues/PRs references

Workaround for issue #19818
Preqruisite for PR #19827 

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
bors bot added a commit that referenced this pull request Sep 7, 2023
19827: drivers/st77xx: implement initialization r=aabadie a=gschorcht

### Contribution description

This PR implements correct initialization for ST7735, ST7789 and ST7796. A number of configuration parameters are exposed via Kconfig. The user can decide whether to use custom configuration parameters or reset defaults.

~To be compilable, the PR includes PR #19824 and PR #19825~

### Testing procedure

- Green CI
- `tests/drivers/disp_dev` and `tests/drivers/st77xx` should still work for all boards using a ST77xx display.
- The PR was already tested for these tests for:
   - [x] `adafruit-pybadge`
   - [x] `esp32s2-lilygo-ttgo-t8`
   - [x] `esp32s3-usb-otg`
   - [x] `sipeed-longan-nano`

### Issues/PRs references

~Depends on #19825~
Fixes #19818 

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
@MrKevinWeiss MrKevinWeiss added this to the Release 2023.10 milestone Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports Area: doc Area: Documentation Area: examples Area: Example Applications Area: Kconfig Area: Kconfig integration Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants