mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Ian Abbott <abbotti@mev.co.uk>
Cc: barebox@lists.infradead.org
Subject: Re: Inconsistent "compatible" string for Terasic DE0-Nano-SoC / Atlas SoC Kit
Date: Thu, 4 Nov 2021 20:55:00 +0100	[thread overview]
Message-ID: <20211104195500.GD25698@pengutronix.de> (raw)
In-Reply-To: <ee2d159c-4f0f-e81f-baca-343b846ee62e@mev.co.uk>

Hi Ian,

On Tue, Nov 02, 2021 at 02:22:51PM +0000, Ian Abbott wrote:
> Hi there!
> 
> I have a slight issue getting BootLoaderSpec entries for Terasic
> DE0-Nano-SoC to work:
> 
> barebox@Terasic DE0-Nano-SoC/Atlas-SoC Kit:/ boot mmc0
> blspec: ignoring entry with incompatible devicetree "terasic,de0-atlas"
> Nothing bootable found on 'mmc0'
> Nothing bootable found
> 
> From the (recent) Linux kernel sources
> "arch/arm/boot/dts/socfpga_cyclone5_de0_nano_soc.dts":
> 
> 	model = "Terasic DE-0(Atlas)";
> 	compatible = "terasic,de0-atlas", "altr,socfpga-cyclone5", "altr,socfpga";
> 
> Of course, the above compatible string matches the barebox source
> "dts/src/arm/socfpga_cyclone5_de0_nano_soc.dts" file.
> 
> However the "model" and "compatible" strings get overridden by the barebox
> source "arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts":
> 
> 	model = "Terasic DE0-Nano-SoC/Atlas-SoC Kit";
> 	compatible = "terasic,de0-nano-soc","altr,socfpga-cyclone5",
> "altr,socfpga";
> 
> The socfpga_init() function in
> "arch/arm/boards/terasic-de0-nano-soc/board.c" also checks the "compatible"
> string for registering a PHY fixup:
> 
> static int socfpga_init(void)
> {
> 	if (!of_machine_is_compatible("terasic,de0-nano-soc"))
> 		return 0;
> 
> 	if (IS_ENABLED(CONFIG_PHYLIB))
> 		phy_register_fixup_for_uid(PHY_ID_KSZ9031, MICREL_PHY_ID_MASK, phy_fixup);
> 
> 	return 0;
> }
> 
> I think I can get everything working by changing barebox's "compatible"
> string to the following:
> 
> 	compatible = "terasic,de0-atlas", "terasic,de0-nano-soc",
> "altr,socfpga-cyclone5", "altr,socfpga";

You can drop the model and compatible properties from
arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts and change the
of_machine_is_compatible check to the upstream dts string. I don't think
we have a good reason to keep the terasic,de0-nano-soc compatible.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


      reply	other threads:[~2021-11-04 19:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-02 14:22 Ian Abbott
2021-11-04 19:55 ` Sascha Hauer [this message]

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=20211104195500.GD25698@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=abbotti@mev.co.uk \
    --cc=barebox@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