Add display, trng, and i2c to the device tree

This commit is contained in:
Artemis Tosini 2023-11-21 03:31:26 +00:00
parent c8df9b3f20
commit 2caa6d6baa
Signed by: artemist
GPG key ID: ADFFE553DCBB831E
2 changed files with 62 additions and 0 deletions

View file

@ -13,4 +13,24 @@
bias-pull-up;
};
};
i2c0_default: i2c0_default {
group1 {
pinmux = <I2C0_SDA_GPIO32>,
<I2C0_SDA_GPIO33>;
bias-pull-up;
drive-open-drain;
output-high;
};
};
spi2_default: spi2_default {
group1 {
pinmux = <SPIM2_SCLK_GPIO16>,
<SPIM2_CSEL_GPIO17>;
};
group2 {
pinmux = <SPIM2_MOSI_GPIO4>;
};
};
};

View file

@ -11,6 +11,7 @@
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,flash = &flash0;
zephyr,display = &epd;
};
};
@ -29,6 +30,47 @@
pinctrl-names = "default";
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&i2c0 {
status = "okay";
clock-frequency = <I2C_BITRATE_STANDARD>;
sda-gpios = <&gpio0 32 GPIO_OPEN_DRAIN>;
scl-gpios = <&gpio0 33 GPIO_OPEN_DRAIN>;
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
};
&spi2 {
status = "okay";
pinctrl-0 = <&spi2_default>;
pinctrl-names = "default";
cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
#address-cells = <1>;
#size-cells = <0>;
epd: sd16xxfb@0 {
compatible = "gooddisplay,gdey0213b74", "solomon,ssd1680";
spi-max-frequency = <4000000>;
reg = <0>;
width = <250>;
height = <122>;
dc-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
reset-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
busy-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
};
};
&trng0 {
status = "okay";
};
/* Stolen from an Espressif devkit's dts, thanks Espressif */
&flash0 {
status = "okay";