From 2caa6d6baae38dce088d1a6e48c52088eab15bf1 Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Tue, 21 Nov 2023 03:31:26 +0000 Subject: [PATCH] Add display, trng, and i2c to the device tree --- boards/xtensa/minico2/minico2-pinctrl.dtsi | 20 +++++++++++ boards/xtensa/minico2/minico2.dts | 42 ++++++++++++++++++++++ 2 files changed, 62 insertions(+) diff --git a/boards/xtensa/minico2/minico2-pinctrl.dtsi b/boards/xtensa/minico2/minico2-pinctrl.dtsi index 8d2c14c..afdd8e3 100644 --- a/boards/xtensa/minico2/minico2-pinctrl.dtsi +++ b/boards/xtensa/minico2/minico2-pinctrl.dtsi @@ -13,4 +13,24 @@ bias-pull-up; }; }; + + i2c0_default: i2c0_default { + group1 { + pinmux = , + ; + bias-pull-up; + drive-open-drain; + output-high; + }; + }; + + spi2_default: spi2_default { + group1 { + pinmux = , + ; + }; + group2 { + pinmux = ; + }; + }; }; diff --git a/boards/xtensa/minico2/minico2.dts b/boards/xtensa/minico2/minico2.dts index 907aa91..9cca8cc 100644 --- a/boards/xtensa/minico2/minico2.dts +++ b/boards/xtensa/minico2/minico2.dts @@ -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 = ; + 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";