Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Mar 2019 09:55:12 -0500
From:      Karl Denninger <karl@denninger.net>
To:        freebsd-arm@freebsd.org
Subject:   Re: Options for FBSD support with LCD device - new project [[Maybe related: I2c issues on the Pi2]]
Message-ID:  <f60ea6d2-b696-d896-7bcb-ac628f41f7b8@denninger.net>
In-Reply-To: <CE40E2B5-2244-4EF9-B67F-34A54D71E2E8@jeditekunum.com>
References:  <ad61a598-53af-02a5-41db-0128da7d1a34@optiplex-networks.com> <CAF19XBLAjP4yKtGSBzA4QdT346Bnbnr8MutQNZgmERLbJkWAyA@mail.gmail.com> <8df902f6-20a3-31c4-71ac-91f5d5fdf50d@optiplex-networks.com> <0ecf23e129ca7ac6a92a01bbb34c03f1ac8c6dc8.camel@freebsd.org> <e5d42c67-e1f2-ede1-965f-c89226de46da@optiplex-networks.com> <89f5b8d1ab0614ac8d88b5d5f1afc63e640c3c17.camel@freebsd.org> <4EB5C6C1-7DB9-4DEE-BB23-CD1259581271@jeditekunum.com> <004ddba628b94b80845d8e509ddcb648d21fd6c9.camel@freebsd.org> <C68D7E6E-03C1-448F-8638-8BD1717DBF44@jeditekunum.com> <ac7d434f16f3a89f5ef247678d6becdbeded5c3f.camel@freebsd.org> <CE40E2B5-2244-4EF9-B67F-34A54D71E2E8@jeditekunum.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a cryptographically signed message in MIME format.

--------------ms030807010106010901060906
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 3/19/2019 09:26, Jedi Tek'Unum wrote:
> On Mar 18, 2019, at 2:57 PM, Ian Lepore <ian@freebsd.org> wrote:
>> On Mon, 2019-03-18 at 14:51 -0500, Jedi Tek'Unum wrote:
>>> My impression wasn=E2=80=99t that support wasn=E2=80=99t there - but =
=E2=80=9Cout of the box=E2=80=9D
>>> configuration wasn=E2=80=99t there. In comparison, I didn=E2=80=99t h=
ave to do
>>> anything to get I2C enabled in the binary distribution of Linux that
>>> comes through the manufacturer.
>>>
>>> Its the enabling part that isn=E2=80=99t obvious to most people IMO.
>>>
>>> Documentation/wiki is great. But even better would be all the
>>> enabling overlays already in place and the entries in loader.conf
>>> already there and commented out. It would be so much easier to go to
>>> a =E2=80=9Ccommon place=E2=80=9D (loader.conf), skim through the note=
s, find the
>>> thing that one wants, and then just uncomment the referenced line!
>>> (Or any other similarly easy method.)
>>>
>>>
>>> For FBSD to get a better foothold in this space it needs to be better=

>>> documented. For example, the wiki for NEO2 <
>>> http://wiki.friendlyarm.com/wiki/index.php/NanoPi_NEO2>; is a step-by-=

>>> step guide for how to acquire and configure Linux for it.
>>>
>>>
>> On one of my imx6 boards I have 5 SPI devices.  Each device can use 3
>> or 4 different sets of pins for clock, data-in, and data-out.  Plus,
>> each can use literally any number of whatever gpio pins they want as
>> chip selects.  Even limiting the chipsels to a handfull, there would
>> literally be thousands of possible combinations of devices and pin
>> configurations, each one needing to be a separate overlay.
>>
>> Maybe you have experience primarily with rpi or some similarly cripple=
d
>> devices that only offer one or two choices?
> If memory serves correctly, there are only 2 I2C devices on the H3/H5 a=
nd the NanoPi NEO/2 implementations only externalize 1. There is only 1 S=
PI AFAIK.
>
> I wouldn=E2=80=99t call that crippled. I chose this platform exactly be=
cause of its characteristics - small, fast, cheap. It fits the project I=E2=
=80=99m using it for perfectly. In fact, I can see uses for even smaller =
(see Giant Board <https://groboards.com/giant-board/>). I understand othe=
r projects may have different requirements and would drive one towards di=
fferent solutions - and require more of the various interfaces. But they =
aren=E2=80=99t going to be typical of hobbyist projects.
>
> Maybe I should pose the question in another way. What is the philosophy=
 for choosing GPIO as default for all the pins? These boards have a very =
limited number of pins and my preference would be that the broadest range=
 of interface types would be the default. There are 2 UARTs exposed so I =
would have picked 1 to be enabled by default. After that, with I2C and SP=
I enabled, there are still 6 GPIO available. For a tiny board like this t=
hat seems to be reasonable. If people have a need for slightly more GPIO =
then I would expect they would be the ones configuring overlays.
>
> Apparently the developers of the Linux packages for these boards have c=
hosen the diverse approach (=E2=80=9CFriendlyCore=E2=80=9D based on Ubunt=
uCore Xenial).
>
> IMHO, most =E2=80=9Chobbyists=E2=80=9D would prefer the diversity appro=
ach. I=E2=80=99m completely capable of becoming an expert in FBSD and thi=
s sort of configuration stuff yet it isn=E2=80=99t a priority for me - I =
just want to use it like any other hobbyist. The way things are now pushe=
s this type of user away from FBSD.
>
> If there is some philosophical perspective against the diversity approa=
ch then the next best thing is to have documentation that clearly and sim=
ply tells people how to enable the other functionality.
>
> Finally, I think there is an opportunity to grow FBSD in the hobbyist w=
orld of these small products. We are past the point where people can have=
 a real operating system running on systems at Arduino size and cost. Lin=
ux has been aggressively deployed there but I can say from experience tha=
t it ain=E2=80=99t pretty - I won=E2=80=99t say more as everyone reading =
this has a clear understanding of why that is.

I'm currently working an issue similar to this, but one that rates
"highly annoying" right now rather than "catastrophically bad."

The environment is a RPI2 which has GPIO and I2c configured; GPIO to
drive outputs, I2c is used to read analog channels.

On 11.0 this code ran perfectly well.

On 12-STABLE )FreeBSD 12.0-STABLE r344818 GENERIC)
=C2=A0it also runs well *BUT* generates a huge number of console messages=

about spurious interrupts:

intc0: Spurious interrupt detected
local_intc0: Spurious interrupt detected
intc0: Spurious interrupt detected
intc0: Spurious interrupt detected
local_intc0: Spurious interrupt detected
local_intc0: Spurious interrupt detected

=2E...

The issue is coming from the i2c side as I have another one of these
that has no I2c defined in the configuration (but is running identical
code) and no messages.

Something is indeed generating an /insane /number of interrupts on one
of the channels:

Interrupts
530k total
=C2=A01159 local_intc
494k local_intc
=C2=A08047 local_intc

For obvious reasons I'd like to track this down (it's also generating a
load average of 1.0, where it should be 0.1 or thereabouts) but I'm not
sure where to start looking.

config.txt looks like this:

root@Pool-MCP:/mnt # cat config.txt
init_uart_clock=3D3000000
enable_uart=3D1
kernel=3Du-boot.bin
kernel7=3Du-boot.bin
dtoverlay=3Dmmc
#audio_pwm_mode=3D2
dtparam=3Di2c_arm=3Don

The only "change" from what is in the default is the i2c_arm=3Don line.

The "something" appears to be the i2c code, *or* it's something that's
gone wrong in the DTS changes that are in the newer way of building the
boot area (where the grab is of the "standard" versions from ports and
then just copied over.)

I suspect this would bite you equally hard if you had a RTC configured
on I2c as well.....

Killing the process that has the I2c interface open (so the I2c
interface is not in active use, but is configured of course) does *not*
stop the insane interrupt storm.

--=20
Karl Denninger
karl@denninger.net <mailto:karl@denninger.net>
/The Market Ticker/
/[S/MIME encrypted email preferred]/

--------------ms030807010106010901060906
Content-Type: application/pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG9w0BBwEAAKCC
DdgwggagMIIEiKADAgECAhMA5EiKghDOXrvfxYxjITXYDdhIMA0GCSqGSIb3DQEBCwUAMIGL
MQswCQYDVQQGEwJVUzEQMA4GA1UECAwHRmxvcmlkYTESMBAGA1UEBwwJTmljZXZpbGxlMRkw
FwYDVQQKDBBDdWRhIFN5c3RlbXMgTExDMRgwFgYDVQQLDA9DdWRhIFN5c3RlbXMgQ0ExITAf
BgNVBAMMGEN1ZGEgU3lzdGVtcyBMTEMgMjAxNyBDQTAeFw0xNzA4MTcxNjQyMTdaFw0yNzA4
MTUxNjQyMTdaMHsxCzAJBgNVBAYTAlVTMRAwDgYDVQQIDAdGbG9yaWRhMRkwFwYDVQQKDBBD
dWRhIFN5c3RlbXMgTExDMRgwFgYDVQQLDA9DdWRhIFN5c3RlbXMgQ0ExJTAjBgNVBAMMHEN1
ZGEgU3lzdGVtcyBMTEMgMjAxNyBJbnQgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIK
AoICAQC1aJotNUI+W4jP7xQDO8L/b4XiF4Rss9O0B+3vMH7Njk85fZ052QhZpMVlpaaO+sCI
KqG3oNEbuOHzJB/NDJFnqh7ijBwhdWutdsq23Ux6TvxgakyMPpT6TRNEJzcBVQA0kpby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I7h5Oyi3Qom7NUap
hYSzDy9ViSy2rfPHVurX2Zew3CCicz9IyBfFLRsSW5aaqSEIkyltUMtrIPkXQcc2erGoajoh
P78eeC8FZ6OmVkZtPp2z3JEbgnMm3lXGCTOFqxKVrNgnC2sA7X5po//xsI/97uUNyhrzBjoN
nFGUkzLlrJfDfm23ETleU64Kzv3kpiS2lPBgSjof2x2hrjizEsW7Szpmf1g1bhVdLeoVuzKX
09uMupnE5aRrFfK++ma5cNhKkb2TK6OhlLB7Os0BWh5T1K9h8UvFGq6+cmL/yb+cZO/e5lB9
UGo0cRVbmWSZp/ooESNU0rhOT189BoD1jm7rgU6Gi3/WbWGI+WNF9n3JzN+niItctNJQmzEq
vq8KULxNxeLPEdWnp1/z7VRZo7J58umR4z6YubyqqBK3Vlz9tFYvGBM7qs5I+DuyAcyCGq7x
8IKiYXHqVhQsQVCCVFrrLz2R3io+KrSokodXdtnzNbu7yQkxIIGL21qA40eMr/qCzvAn6rYC
tRyWpBGvj00u7GSeyzNOlkJys5R6fARmayTylgHKWgAAAAAAAA==
--------------ms030807010106010901060906--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f60ea6d2-b696-d896-7bcb-ac628f41f7b8>