-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add a device tree for Ulticontroller 3.2 LVDS and reeorganize device tree files. Now the specific ulticontroller dts (3.2 or 4.0) includes the ultimainboard5.0 dtsi (with all changes required by the ultimainboard 5.0). Then we have 2 device trees, the ulticontroller3.2-lvds-800x320.dts and the ulticontroller4.0-lvds-1024x600.dts The postinst script will check the /etc/ultimaker_firmware file for the first article number and set a symlink for the device tree file expected by UBoot pointing to the ulticontroller device tree for that article number. - Add kernel support to gpio expander PCA9570 used by Ulticontroller 3.2 LVDS
- Loading branch information
Showing
8 changed files
with
126 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
# This script reads the article number file for the list of article numbers | ||
# and tries to match the *first* article number in the list below. | ||
# Then it creates a symbolic link for that article number to the | ||
# correspondent device tree file. | ||
|
||
ARTNUM_FILE="/etc/ultimaker_firmware" | ||
|
||
TARGET_DTS="cgtsx8m-ultimain5.dtb" | ||
UC32_DTS="ulticontroller3.2-lvds-800x320.dtb" | ||
UC4_DTS="ulticontroller4.0-lvds-1024x600.dtb" | ||
|
||
# During the bootstrap configuration stage, if the kernel is configured | ||
# before the mawk package, there will be no awk link pointing to the | ||
# mawk binary, so below we need to specify the correct binary. | ||
|
||
first_article_number=$(mawk '/^article_numbers:/ {print $2}' ${ARTNUM_FILE}) | ||
|
||
echo "-> Recipe's first article number: ${first_article_number}" | ||
|
||
case "${first_article_number}" in | ||
10600|10700) | ||
echo "-> Setting Ulticontroller 3.2 LVDS device tree." | ||
ln -sf "${UC32_DTS}" "/boot/${TARGET_DTS}" | ||
;; | ||
227380|10500) | ||
echo "-> Setting Ulticontroller 4.0 LVDS device tree." | ||
ln -sf "${UC4_DTS}" "/boot/${TARGET_DTS}" | ||
;; | ||
# Fallback to the larger screen | ||
*) | ||
echo "-> Falling back to Ulticontroller 4.0 LVDS device tree." | ||
ln -sf "${UC4_DTS}" "/boot/${TARGET_DTS}" | ||
;; | ||
esac | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
### Device Tree Selection | ||
|
||
We have 2 device trees, one for each display currently supported by **Ultimainboard 5**: | ||
|
||
- *Ulticontroller 4* at 1024x600 (Factor 4, Falcon): `ulticontroller4.0-lvds-1024x600.dts` | ||
- *Ultricontroller 3.2 LVDS* at 800x600 (S6 and S8): `ulticontroller3.2-lvds-800x320.dts` | ||
|
||
Both device trees sources includes the Ultimainboard 5 device tree: `ultimainboard5-lvds.dtsi`. | ||
And this one includes the remaining IMX8 definitions (`congatec/imx8mm-cgtsx8m-lvds.dtsi`). | ||
|
||
The *UBoot* will look for a device tree file named **`cgtsx8m-ultimain5.dtb`** in the boot partition. | ||
In order to boot the correct DT, the um-kernel post install script will get the **first** recipe | ||
article number (from the file `/etc/ultimaker_firmware`) and will set a symlink named | ||
`cgtsx8m-ultimain5.dtb` pointing to one of those 2 device trees that should be used by this article number. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* | ||
* Copyright (C) 2020 - Ultimaker B.V. | ||
* Copyright (C) 2020 - Raymond Siudak <[email protected]> | ||
*/ | ||
|
||
#include "ultimainboard5-lvds.dtsi" | ||
|
||
/ { | ||
lvdspanel { | ||
panel-timing { | ||
clock-frequency = <25820000>; | ||
hactive = <800>; | ||
vactive = <320>; | ||
hsync-len = <46>; | ||
hfront-porch = <4>; | ||
hback-porch = <47>; | ||
vsync-len = <3>; | ||
vfront-porch = <15>; | ||
vback-porch = <184>; | ||
}; | ||
}; | ||
}; | ||
|
||
&i2c2 { | ||
clock-frequency = <100000>; | ||
panel_touchscreen: ft5426@38 { | ||
compatible = "edt,edt-ft5406"; | ||
reg = <0x38>; | ||
poll-interval = <30>; | ||
reset-gpios = <&panel_gpio 0 GPIO_ACTIVE_LOW>; | ||
touchscreen-size-x = <800>; | ||
touchscreen-size-y = <320>; | ||
}; | ||
|
||
panel_gpio: pca9570@24 { | ||
compatible = "nxp,pca9570"; | ||
gpio-controller; | ||
#gpio-cells = <2>; | ||
reg = <0x24>; | ||
gpio-line-names = "TOUCH_RST", "TOUCH_INT", "PWR_DWN", "ENABLE"; | ||
}; | ||
|
||
panel_lights: pca9632@60 { | ||
compatible = "nxp,pca9632"; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
reg = <0x60>; | ||
nxp,totem-pole; | ||
nxp,hw-blink; | ||
panel_backlight: backlight@3 { | ||
label = "white:panel_backlight"; | ||
reg = <3>; | ||
linux,default-trigger = "default-on"; | ||
}; | ||
}; | ||
|
||
edid_eeprom: 24c32@50 { /* 24LC02B 2K Microchip EEPROM */ | ||
// compatible = "24c32", "atmel,24c32"; | ||
compatible = "24c32"; | ||
reg = <0x50>; | ||
pagesize = <32>; | ||
size = <4096>; // 32Kb (4KB) EEPROM size | ||
}; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ | |
* Copyright (C) 2020 - Raymond Siudak <[email protected]> | ||
*/ | ||
|
||
#include "ultimainboard5-lvds.dtsi" | ||
|
||
/ { | ||
lvdspanel { | ||
panel-timing { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters