From: slash.tmp@free.fr (Mason)
To: linux-arm-kernel@lists.infradead.org
Subject: Converting "board file" to device tree one device at a time?
Date: Fri, 31 Jul 2015 11:57:26 +0200 [thread overview]
Message-ID: <55BB4686.8030509@free.fr> (raw)
Hello,
I'm using an ARM Cortex A9 based platform. I have a minimal
3.14 port working (UART and Ethernet, loads a root file system
over NFS) using a board file.
I'm trying to convert the port to device tree, so that I can
(try to) push it upstream.
As I can't wrap my head around the concept, I'm trying to do
the conversion "one device at a time", starting with just the
UART, then Ethernet, then the clock tree, and that's basically
all I need to boot the board.
I started by enabling
CONFIG_ARM_APPENDED_DTB=y
CONFIG_ARM_ATAG_DTB_COMPAT=y
CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y
CONFIG_SERIAL_OF_PLATFORM=y
and wrote this dts:
/dts-v1/;
/ {
compatible = "sigma,tango4-soc";
#address-cells = <1>;
#size-cells = <1>;
soc {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges;
uart0: serial at 10700 {
compatible = "ns16550a";
reg = <0x10700 0x100>;
interrupts = <1>;
clock-frequency = <7372800>;
reg-shift = <2>;
no-loopback-test;
#address-cells = <1>;
#size-cells = <1>;
};
};
};
and added "sigma,tango4-soc" to my struct machine_desc .dt_compat
Then I generated a kernel with appended DT using:
$ make dtbs
$ make -j2 zImage && cat arch/arm/boot/zImage arch/arm/boot/dts/tango.dtb >XXX
$ mv XXX arch/arm/boot/zImage && make uImage
Then I set a breakpoint in of_platform_serial_probe, hoping
to witness the miracle... and nothing. Looks like device is
never registered :-(
Can anyone point me where to look?
What did I do wrong?
Where does the kernel parse the appended DTB?
Is it setup_machine_fdt?
When/Where is the UART description in the device tree supposed
to be used to register the device?
Any help greatly appreciated!
Regards.
next reply other threads:[~2015-07-31 9:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-31 9:57 Mason [this message]
2015-07-31 14:54 ` Converting "board file" to device tree one device at a time? Mason
2015-07-31 15:05 ` Russell King - ARM Linux
2015-07-31 15:13 ` Mason
2015-07-31 16:17 ` Mason
2015-07-31 16:46 ` Russell King - ARM Linux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55BB4686.8030509@free.fr \
--to=slash.tmp@free.fr \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).