mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Christian Melki <christian.melki@t2data.com>
To: Michael Riesch <michael.riesch@wolfvision.net>, ptxdist@pengutronix.de
Cc: m.tretter@pengutronix.de
Subject: Re: [ptxdist] [PATCH 2/3] add package for rockchip firmware binaries
Date: Sat, 4 Dec 2021 16:37:13 +0100	[thread overview]
Message-ID: <7fcfc32f-5065-1f6f-6325-b1f1c0d4279b@t2data.com> (raw)
In-Reply-To: <b2e89ae2-0ad6-4ac5-5355-3fa64ebde78c@wolfvision.net>

On 12/4/21 08:10, Michael Riesch wrote:
> Hi Christian,
> 
> (fixed Michael Tretter's mail address in Cc:)
> 
> On 12/3/21 6:55 PM, Christian Melki wrote:
>> Hi.
>>
>> Good idea with a non-free firmware section.
>> But these Rockchip things looks like they are highly board/project
>> dependent.
>> A non-JEDEC timing named DDR-blob? For what board?
>> RK3566/8 are SoCs afaiu, not complete system implementations?
>> Also, ARM Trustzone blobs can also be very project specific?
> 
> The RK356x SoCs are relatively new and there are not too much boards
> around yet. AFAIK all existing boards rely on those binaries due to the
> lack of alternatives. Therefore, I thought it would be a nice idea to
> provide this package to have at least one solution that works for the
> first few boards around (such as the Quartz64 by Pine64 with the RK3566
> as well as the RK3568 EVB1).
> 
> Future alternative SDRAM setups will indeed require a (possibly
> per-board) initialization. Rockchip offers a tool to adjust the binary
> blobs to target a different SDRAM setup. Maybe this can be even
> integrated into the rule file in a later step -- I haven't figured out
> the workflow yet.
> 
> A similar thing can be said with regard to the ARM Trustzone blobs. The
> two files work on both SoCs (the RK3566 and RK3568 are very similar,
> consider the 66 as little brother of the 68) and those files are the
> only thing that is available right now. Rockchip has indicated that
> there are plans to bring TF-A support for the RK356x mainline, but not
> before Q2/2022 IIRC. For the time being, the package under discussion
> enables initial support for the currently available boards.
> 
> In summary, consider this package as a tool to kick-start development on
> recent and future Rockchip SoCs. It is not yet the optimal solution but
> it is enables early support for the boards that are available at the
> moment. The suggested rule file allows to en/disable the individual
> binaries, hence it should be easy to let a different package generate
> and install e.g., the TF-A binary.
> 
> Best regards,
> Michael
> 

I don't mind. I like the firmware effort. But could you please change
the Kconfig help to indicate which board(s)/board versions this is meant
to run on? As that's the implementation it's actually tied to.

Best regards,
Christian

>> Regards,
>> Christian
>>
>> On 12/3/21 17:54, Michael Riesch wrote:
>>> Rockchip provides the SDRAM initialization as well as BL31/BL32
>>> firmware for their SoCs in binary from. Add a package that downloads
>>> those binaries for further use in e.g., barebox.
>>>
>>> Signed-off-by: Michael Tretter <michael.tretter@pengutronix.de>
>>> [revised and extended Kconfig]
>>> Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net>
>>> ---
>>>   platforms/firmware-rockchip.in | 35 ++++++++++++++++
>>>   rules/firmware-rockchip.make   | 75 ++++++++++++++++++++++++++++++++++
>>>   2 files changed, 110 insertions(+)
>>>   create mode 100644 platforms/firmware-rockchip.in
>>>   create mode 100644 rules/firmware-rockchip.make
>>>
>>> diff --git a/platforms/firmware-rockchip.in b/platforms/firmware-rockchip.in
>>> new file mode 100644
>>> index 000000000..3b7c996bb
>>> --- /dev/null
>>> +++ b/platforms/firmware-rockchip.in
>>> @@ -0,0 +1,35 @@
>>> +## SECTION=non_free_firmware
>>> +
>>> +menuconfig FIRMWARE_ROCKCHIP
>>> +	bool
>>> +	prompt "Rockchip firmware binaries    "
>>> +	help
>>> +	  Rockchip prebuilt SDRAM initialization and TF-A binaries.
>>> +
>>> +if FIRMWARE_ROCKCHIP
>>> +
>>> +config FIRMWARE_ROCKCHIP_RK3566_SDRAM
>>> +       bool
>>> +       prompt "RK3566 SDRAM init"
>>> +       help
>>> +         Rockchip RK3566 SDRAM initialization binary.
>>> +
>>> +config FIRMWARE_ROCKCHIP_RK3568_SDRAM
>>> +       bool
>>> +       prompt "RK3568 SDRAM init"
>>> +       help
>>> +         Rockchip RK3568 SDRAM initialization binary.
>>> +
>>> +config FIRMWARE_ROCKCHIP_RK356x_BL31
>>> +       bool
>>> +       prompt "RK356x BL31 binary"
>>> +       help
>>> +         Rockchip RK3566/RK3568 BL31 binary.
>>> +
>>> +config FIRMWARE_ROCKCHIP_RK356x_BL32
>>> +       bool
>>> +       prompt "RK356x BL32 binary"
>>> +       help
>>> +         Rockchip RK3566/RK3568 BL32 binary.
>>> +
>>> +endif
>>> diff --git a/rules/firmware-rockchip.make b/rules/firmware-rockchip.make
>>> new file mode 100644
>>> index 000000000..54a0b7493
>>> --- /dev/null
>>> +++ b/rules/firmware-rockchip.make
>>> @@ -0,0 +1,75 @@
>>> +# -*-makefile-*-
>>> +#
>>> +# Copyright (C) 2021 by Michael Tretter <m.tretter@pengutronix.de>
>>> +#
>>> +# For further information about the PTXdist project and license conditions
>>> +# see the README file.
>>> +#
>>> +
>>> +#
>>> +# We provide this package
>>> +#
>>> +PACKAGES-$(PTXCONF_FIRMWARE_ROCKCHIP) += firmware-rockchip
>>> +
>>> +FIRMWARE_ROCKCHIP_VERSION	:= 2021-06-01-g7d631e0d
>>> +FIRMWARE_ROCKCHIP_MD5		:= bfb7b9601b88784e263c2cc6baa5da9f
>>> +FIRMWARE_ROCKCHIP		:= firmware-rockchip-$(FIRMWARE_ROCKCHIP_VERSION)
>>> +FIRMWARE_ROCKCHIP_SUFFIX	:= tar.xz
>>> +FIRMWARE_ROCKCHIP_URL		:= \
>>> +	git://github.com/rockchip-linux/rkbin;tag=$(FIRMWARE_ROCKCHIP_VERSION)
>>> +FIRMWARE_ROCKCHIP_SOURCE	:= $(SRCDIR)/$(FIRMWARE_ROCKCHIP).$(FIRMWARE_ROCKCHIP_SUFFIX)
>>> +FIRMWARE_ROCKCHIP_DIR		:= $(BUILDDIR)/$(FIRMWARE_ROCKCHIP)
>>> +FIRMWARE_ROCKCHIP_LICENSE	:= unknown
>>> +
>>> +# ----------------------------------------------------------------------------
>>> +# Prepare
>>> +# ----------------------------------------------------------------------------
>>> +
>>> +FIRMWARE_ROCKCHIP_CONF_TOOL:= NO
>>> +
>>> +# ----------------------------------------------------------------------------
>>> +# Compile
>>> +# ----------------------------------------------------------------------------
>>> +
>>> +$(STATEDIR)/firmware-rockchip.compile:
>>> +	@$(call targetinfo)
>>> +	@$(call touch)
>>> +
>>> +# ----------------------------------------------------------------------------
>>> +# Install
>>> +# ----------------------------------------------------------------------------
>>> +
>>> +$(STATEDIR)/firmware-rockchip.install:
>>> +	@$(call targetinfo)
>>> +
>>> +ifdef PTXCONF_FIRMWARE_ROCKCHIP_RK3566_SDRAM
>>> +	install -v -D -m644 $(FIRMWARE_ROCKCHIP_DIR)/bin/rk35/rk3566_ddr_1056MHz_v1.08.bin \
>>> +		$(FIRMWARE_ROCKCHIP_PKGDIR)/usr/lib/firmware/rk3566_ddr_1056MHz_v1.08.bin
>>> +endif
>>> +
>>> +ifdef PTXCONF_FIRMWARE_ROCKCHIP_RK3568_SDRAM
>>> +	install -v -D -m644 $(FIRMWARE_ROCKCHIP_DIR)/bin/rk35/rk3568_ddr_1560MHz_v1.08.bin \
>>> +		$(FIRMWARE_ROCKCHIP_PKGDIR)/usr/lib/firmware/rk3568_ddr_1560MHz_v1.08.bin
>>> +endif
>>> +
>>> +ifdef PTXCONF_FIRMWARE_ROCKCHIP_RK356x_BL31
>>> +	install -v -D -m644 $(FIRMWARE_ROCKCHIP_DIR)/bin/rk35/rk3568_bl31_v1.24.elf \
>>> +		$(FIRMWARE_ROCKCHIP_PKGDIR)/usr/lib/firmware/rk3568_bl31_v1.24.elf
>>> +endif
>>> +
>>> +ifdef PTXCONF_FIRMWARE_ROCKCHIP_RK356x_BL32
>>> +	install -v -D -m644 $(FIRMWARE_ROCKCHIP_DIR)/bin/rk35/rk3568_bl32_v1.05.bin \
>>> +		$(FIRMWARE_ROCKCHIP_PKGDIR)/usr/lib/firmware/rk3568_bl32_v1.05.bin
>>> +endif
>>> +
>>> +	@$(call touch)
>>> +
>>> +# ----------------------------------------------------------------------------
>>> +# Target-Install
>>> +# ----------------------------------------------------------------------------
>>> +
>>> +$(STATEDIR)/firmware-rockchip.targetinstall:
>>> +	@$(call targetinfo)
>>> +	@$(call touch)
>>> +
>>> +# vim: syntax=make
>>>
>>


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


  reply	other threads:[~2021-12-04 15:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-03 16:54 [ptxdist] [PATCH 0/3] Add support for Rockchip firmware blobs Michael Riesch
2021-12-03 16:54 ` [ptxdist] [PATCH 1/3] platforms: add section for non-free " Michael Riesch
2021-12-03 16:54 ` [ptxdist] [PATCH 2/3] add package for rockchip firmware binaries Michael Riesch
2021-12-03 17:55   ` Christian Melki
2021-12-04  7:10     ` Michael Riesch
2021-12-04 15:37       ` Christian Melki [this message]
2021-12-06  6:06         ` Michael Riesch
2021-12-05  0:56   ` Roland Hieber
2021-12-05  1:00     ` Roland Hieber
2021-12-05  9:07       ` Michael Riesch
2021-12-06  6:27     ` Michael Riesch
2021-12-03 16:54 ` [ptxdist] [RFC PATCH 3/3] barebox: add integration of firmware blobs Michael Riesch

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=7fcfc32f-5065-1f6f-6325-b1f1c0d4279b@t2data.com \
    --to=christian.melki@t2data.com \
    --cc=m.tretter@pengutronix.de \
    --cc=michael.riesch@wolfvision.net \
    --cc=ptxdist@pengutronix.de \
    /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