[PATCH 18/18] ARM: rockchip: Add Radxa ROCK 5B support

Sascha Hauer s.hauer at pengutronix.de
Thu May 4 03:08:41 PDT 2023


On Thu, May 04, 2023 at 11:36:55AM +0200, Ahmad Fatoum wrote:
> Hello Sascha,
> 
> On 04.05.23 10:17, Sascha Hauer wrote:
> > Add support for the Radxa ROCK 5B board.
> > 
> > Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
> > ---
> >  arch/arm/boards/Makefile               |   1 +
> >  arch/arm/boards/radxa-rock5/.gitignore |   1 +
> >  arch/arm/boards/radxa-rock5/Makefile   |   3 +
> >  arch/arm/boards/radxa-rock5/board.c    |  55 +++++++++++++
> >  arch/arm/boards/radxa-rock5/lowlevel.c |  25 ++++++
> >  arch/arm/dts/Makefile                  |   1 +
> >  arch/arm/dts/rk3588-rock-5b.dts        | 110 +++++++++++++++++++++++++
> >  arch/arm/mach-rockchip/Kconfig         |   6 ++
> >  images/Makefile.rockchip               |   7 ++
> 
> Can you enable it in the appropriate defconfigs as well?

Yes, sure.

> > +static int rock5_probe(struct device *dev)
> > +{
> > +	enum bootsource bootsource = bootsource_get();
> > +	int instance = bootsource_get_instance();
> > +	const struct rock5_model *model;
> > +
> > +	model = device_get_match_data(dev);
> > +
> > +	barebox_set_model(model->name);
> 
> This can be set in the DT via /model.
> 
> > +	barebox_set_hostname(model->shortname);
> 
> This would be rock-5b with the current machine compatible.
> Why set it in board code?

Wrong template copied. I'll just remove these lines.

> > +#include <arm64/rockchip/rk3588-rock-5b.dts>
> > +#include "rk3588.dtsi"
> > +#include <dt-bindings/pinctrl/rockchip.h>
> > +#include <dt-bindings/gpio/gpio.h>
> > +
> > +/ {
> > +	aliases {
> > +		mmc1 = &sdmmc;
> 
> Are there no aliases in the upstream DT? And why only
> mmc1 and not mmc0?

The upstream dts has:

		mmc0 = &sdhci;

sdmmc is not yet supported upstream, it's added in
arch/arm/dts/rk3588s.dtsi.

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 |



More information about the barebox mailing list