xref: /netbsd-src/share/man/man4/ssdfb.4 (revision 826c516bfb16045f2ad4238da60ce5feec72061e)
1.\"	$NetBSD: ssdfb.4,v 1.8 2022/06/15 15:54:40 brad Exp $
2.\"
3.\" Copyright (c) 2019 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Tobias Nygren.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd August 5, 2021
31.Dt SSDFB 4
32.Os
33.Sh NAME
34.Nm ssdfb
35.Nd OLED/PLED framebuffer device driver
36.Sh SYNOPSIS
37.Cd "options FONT_SPLEEN5x8"
38.Cd "ssdfb* at iic? addr ?"
39.Cd "ssdfb* at iic? addr 0x3c"
40.Cd "ssdfb* at iic? addr 0x3d flags 0x102"
41.Cd "ssdfb* at spi? slave ? flags 0x105"
42.Cd "wsdisplay* at ssdfb?"
43.Sh DESCRIPTION
44The
45.Nm
46driver provides
47.Xr wsdisplay 4
48support for OLED/PLED framebuffer modules based on one
49of the following controller chips:
50.Bl -bullet -offset indent
51.It
52Solomon Systech Ltd SSD1306
53.It
54Sino Wealth Electronic Ltd SH1106
55.It
56Solomon Systech Ltd SSD1322
57.It
58Solomon Systech Ltd SSD1353
59.El
60.Pp
61The following products (controller + panel assemblies) are supported:
62.Bl -bullet -offset indent
63.It
64.Em 0x01 :
65Generic SSD1306 modules using default settings
66.It
67.Em 0x02 :
68Generic SH1106 modules using default settings
69.It
70.Em 0x03 :
71Adafruit Industries, LLC product 931 (128x32)
72.It
73.Em 0x04 :
74Adafruit Industries, LLC product 938 (128x64)
75.It
76.Em 0x05 :
77Generic SSD1322 modules using default settings
78.It
79.Em 0x06 :
80Generic SSD1353 modules using default settings
81.It
82.Em 0x07 :
83Display Elektronik GmbH DEP 160128A(1)-RGB
84.El
85.Pp
86The flags value can contain one or more of the following, bitwise OR'ed:
87.Bl -bullet -offset indent
88.It
89.Em 0x0?? :
90Exactly one product id from the above list
91.It
92.Em 0x100 :
93indicates that the display is mounted upside down and flips the screen
94.It
95.Em 0x200 :
96enable inverse video
97.It
98.Em 0x400 :
99forcibly attach as console
100.El
101.Pp
102On most displays, the contrast setting can be adjusted with the
103.Xr wsconsctl 8
104program.
105.Sh EXAMPLES
106To attach an SSD1322 display using the 4-wire
107.Xr spi 4
108interface on an
109Allwinner A20 ARM single board computer, the following Device Tree overlay
110can be used:
111.Bd -literal -offset indent
112&spi0 {
113	ssdfb@0 {
114		compatible = "solomon,ssd1322";
115		reg = <0x00>;
116		dc-gpio = <0x10 0x07 0x02 0x00>;
117		status = "okay";
118	};
119};
120.Ed
121.Pp
122To attach an SSD1306 display using the
123.Xr iic 4
124interface on the same board, use:
125.Bd -literal -offset indent
126&i2c2 {
127	ssdfb@3c {
128		compatible = "solomon,ssd1306fb-i2c";
129		reg = <0x3c>;
130		status = "okay";
131	};
132};
133.Ed
134.Sh SEE ALSO
135.Xr iic 4 ,
136.Xr wsdisplay 4
137.Sh HISTORY
138An
139.Nm
140driver first appeared in
141.Ox 6.4
142and later in
143.Nx 9.0 .
144.Sh AUTHORS
145.An -nosplit
146The
147.Nm
148driver
149was written by
150.An Tobias Nygren Aq Mt tnn@NetBSD.org .
151.Pp
152It was inspired by (and shares its name with) the
153.Ox
154driver written by
155.An Patrick Wildt Aq Mt patrick@blueri.se
156but does not share any code.
157