Cathy WicksNeeraj DantuJason Kridner
Published © GPL3+

Expand PocketBeagle Easily with Mikro click Boards: OLED C

MikroElecktronika Click Boards & Device Tree Software make extending your BeagleBoard.org PocketBeagle easy! Start with the OLED C display!

BeginnerFull instructions provided2 hours4,013
Expand PocketBeagle Easily with Mikro click Boards: OLED C

Things used in this project

Hardware components

PocketBeagle
BeagleBoard.org PocketBeagle
×1
Mikroelektronika OLED C Click - MIKROE-1585
×1

Story

Read more

Code

PocketBeagle OLED-C Click Device Tree Overlay source (PB-SPI1-OLEDC-CLICK.dts)

ActionScript
This is the source file for the device tree overlay binary that can be modified as needed
/*
 * Copyright (C) 2018 Texas Instruments, Jason Kridner <jdk@ti.com>
 * Copyright (C) 2018 Octavo Systems, Neeraj Dantu <neeraj.dantu@octavosystems.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * https://www.mikroe.com/oled-c-click
 * https://download.mikroe.com/documents/add-on-boards/click/oled-c/oled-c-click-schematic-v101.pdf
 */

/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/am33xx.h>
#include <dt-bindings/interrupt-controller/irq.h>

/ {
	/*
	 * Free up the pins used by the cape from the pinmux helpers.
	 */
	fragment@0 {
		target = <&ocp>;
		__overlay__ {
			P1_34_pinmux { status = "disabled"; };  /* EN - gpio0_26*/
			P1_36_pinmux { status = "disabled"; };	/* D/C - gpio3_14*/
			P2_25_pinmux { status = "disabled"; };	/* MOSI - gpio1_9 */
			P2_27_pinmux { status = "disabled"; };	/* MISO - gpio1_8 */
			P2_29_pinmux { status = "disabled"; };	/* CLK - gpio0_7 */
			P2_31_pinmux { status = "disabled"; };	/* CS - gpio0_19 */
			P2_33_pinmux { status = "disabled"; };	/* RST - gpio1_13 */
			cape-universal { status = "disabled"; };
			cape-universal@1 { status = "disabled"; };
		};
	};

	fragment@1 {
		target = <&spi1>;
		__overlay__ {
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";

			channel@0 {
				status = "disabled";
			};
			channel@1 {
				status = "disabled";
			};

			mikroe_oledc: mikroe_oledc@0{
				compatible = "solomon,ssd1351";
				pinctrl-names = "default";
				pinctrl-0 = <
					&P2_31_spi_cs_pin
					&P2_29_spi_sclk_pin
					&P2_27_spi_pin
					&P2_25_spi_pin
					&P1_36_gpio_pin
					&P2_33_gpio_pin
				>;
				spi-max-frequency = <6000000>;
				width = <128>;
				height = <128>;
				fps = <40>;
				reg = <0>;
				regwidth = <0x8>;
				buswidth = <8>;
				backlight = <2>;
				debug = <3>;
				reset-gpios = <&gpio1 13 0>;
				dc-gpios = <&gpio3 14 0>;
			};
		};
		
	};
	
	fragment@2 {
		target = <&ocp>;
		__overlay__ {
			cape-universal@1 {
				compatible = "gpio-of-helper";
				status = "okay";
				pinctrl-names = "default";
				pinctrl-0 = <>;

				P1_34 {
					gpio-name = "P1_34";
					gpio = <&gpio0 26 0>;
					output;
					init-high;
				};
			};
		};
	};
};

PB-SPI1-OLEDC-CLICK.dtbo (PocketBeagle OLED-C Click Device Tree Overlay Binary)

BatchFile
Copy this file into /lib/firmware directory and change /boot/uEnv.txt to invoke device tree overlay on boot
No preview (download only).

Credits

Cathy Wicks

Cathy Wicks

19 projects • 22 followers
Beagleboard.org fan
Neeraj Dantu

Neeraj Dantu

9 projects • 11 followers
Jason Kridner

Jason Kridner

19 projects • 59 followers
Co-founder of BeagleBoard.org

Comments