Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Apr 2015 17:24:46 +0300
From:      Daniel Braniss <danny@cs.huji.ac.il>
To:        Luiz Otavio O Souza <lists.br@gmail.com>
Cc:        "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>, Ian Lepore <ian@freebsd.org>
Subject:   Re: help with coding a loadable kernel module
Message-ID:  <62021BE7-5941-4B0C-A74D-01C9AC415AB8@cs.huji.ac.il>
In-Reply-To: <07F11A62-F2A0-404E-B409-6848418A3B29@cs.huji.ac.il>
References:  <EDB591F5-E056-4E53-9ED2-2A2E571F319C@cs.huji.ac.il> <20150417080839.GO2743@home.opsec.eu> <9B835088-661C-456E-84A7-47BC1835C0CB@cs.huji.ac.il> <20150417095536.GA38091@gmail.com> <32D7EBD3-813E-4062-8A06-ED8E82BA50DA@cs.huji.ac.il> <1429276417.1182.71.camel@freebsd.org> <C6A90444-22F4-4EDF-BE3D-C384F61BB0B4@cs.huji.ac.il> <FCC970B7-EA7C-4378-9B97-8E9B31329D47@bsdimp.com> <8C177A8C-F6B2-43D5-925F-A3C33B6CF577@cs.huji.ac.il> <CAB=2f8xhs9SHCFE6oAUhCS-m_9U2AGEe_520vfAdMaBbE_Ca9A@mail.gmail.com> <07F11A62-F2A0-404E-B409-6848418A3B29@cs.huji.ac.il>

next in thread | previous in thread | raw e-mail | index | archive | help
now that I=E2=80=99m ready to connect the hardware, where/how do I =
configure
the IRQ and RESET pins? I presume in the dts file =E2=80=A6
I probably have to reserve/define also the SPI lines?
If there is some documentation I should read instead, please let me =
know.

cheers,
	danny

> On Apr 18, 2015, at 4:17 PM, Daniel Braniss <danny@cs.huji.ac.il> =
wrote:
>=20
>=20
>> On Apr 18, 2015, at 3:51 AM, Luiz Otavio O Souza <lists.br@gmail.com> =
wrote:
>>=20
>> On 17 April 2015 at 11:08, Daniel Braniss  wrote:
>>>=20
>>>> On Apr 17, 2015, at 4:42 PM, Warner Losh wrote:
>>>>=20
>> ...
>>>>=20
>>>> If you are using FDT in your system, then you=E2=80=99ll put your =
device into the
>>>> FDT tree below the spibus to create the device_t node in the tree. =
When
>>>> your module is loaded, its probe routine will be called, and you =
can
>>>> match based on the compatible string given in the FDT.
>>>>=20
>>>=20
>>> I was afraid of that :-), this FDT stuff is new to me, and so far I =
was successful
>>> in adding a gpio/led, but grep has not found any spibus.
>>> any chance for a small template/example ? rpi or bbb would help!
>>>=20
>>> cheers
>>>       danny
>>=20
>> Hi Daniel,
>>=20
>> Here is an example of such change for RPi: http://pastie.org/10099132
>>=20
>> The SPI controller node is defined at
>> sys/boot/fdt/dts/arm/bcm2835.dtsi, but usually the local changes go =
in
>> sys/boot/fdt/dts/arm/rpi.dts.
>>=20
>> Once you boot your system you can check your DTS tree with ofwdump -a
>>=20
>> Cheers,
>> Luiz
>=20
> pending some cosmetics, the driver gets loaded! and a /dev/rfid0 =
appears!
>=20
> thanks guys, I still have to figure out some magics, and some SPI  =
MFRC protocol.
>=20
> as soon as I have a decent working version i=E2=80=99ll submit the =
driver.
>=20
> thanks again,
>=20
> 	danny
>=20
> _______________________________________________
> freebsd-arm@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?62021BE7-5941-4B0C-A74D-01C9AC415AB8>