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