Re: [PATCH v2 15/29] net: designware: fix non-1:1 mapped 64-bit systems

2021-06-21 Thread Sascha Hauer
On Sat, Jun 19, 2021 at 06:50:41AM +0200, Ahmad Fatoum wrote: > drivers/net/designware.c handles the older Designware < 4.x MAC IPs, > which do not support DMA beyond 32-bit. They are still being integrated > into SoCs with 64-bit CPUs like the StarFive JH7100, which additionally > needs a non 1:1

Re: [PATCH v2 15/29] net: designware: fix non-1:1 mapped 64-bit systems

2021-06-21 Thread Ahmad Fatoum
Hi, On 21.06.21 09:25, Sascha Hauer wrote: > On Sat, Jun 19, 2021 at 06:50:41AM +0200, Ahmad Fatoum wrote: >> drivers/net/designware.c handles the older Designware < 4.x MAC IPs, >> which do not support DMA beyond 32-bit. They are still being integrated >> into SoCs with 64-bit CPUs like the StarF

Re: [PATCH master] Documentation: devel: porting: update after clk_hw sync

2021-06-21 Thread Sascha Hauer
On Mon, Jun 21, 2021 at 08:46:46AM +0200, Ahmad Fatoum wrote: > Clock code sync with Linux got way more straight forward, now that > barebox knows about struct clk_hw. Remove the suggestion to replace > clk_hw with clk when porting. > > Signed-off-by: Ahmad Fatoum > --- > Documentation/devel/por

Re: [PATCH master] watchdog: dw_wdt: fix resource reservation error check

2021-06-21 Thread Sascha Hauer
On Mon, Jun 21, 2021 at 08:47:19AM +0200, Ahmad Fatoum wrote: > dev_request_mem_resource returns a possible error pointer. If it > succeeds mem->start will always be valid. Rectify the confusion. > > Signed-off-by: Ahmad Fatoum > --- > drivers/watchdog/dw_wdt.c | 5 +++-- > 1 file changed, 3 ins

Re: [PATCH] commands: md: don't leak heap memory with unaligned accesses

2021-06-21 Thread Sascha Hauer
On Sat, Jun 19, 2021 at 07:42:17AM +0200, Ahmad Fatoum wrote: > Doing unaligned near file end returns bogus results: > > barebox@Sandbox:/ md -s /dev/stickypage 4095 > 0fff: 959ff8ff . > > That 0x959ff8 is heap memory next to the buffer md

Re: [PATCH v4 07/10] of: of_firmware: add support for fpga bridges

2021-06-21 Thread Sascha Hauer
On Fri, Jun 18, 2021 at 10:32:58AM +0200, Steffen Trumtrar wrote: > > Steffen Trumtrar writes: > > diff --git a/include/of.h b/include/of.h > > index 645f429bdeed..3c922bdb1414 100644 > > --- a/include/of.h > > +++ b/include/of.h > > +int of_firmware_load_overlay(struct device_node *overlay, cons

Re: [PATCH v1 1/2] add device state flags and add error state

2021-06-21 Thread Ahmad Fatoum
On 06.06.21 14:23, Oleksij Rempel wrote: > Add state flags for each registered device and set error state on each > dev_err print. > This states can be used by users to identify erroneous device. I thought this over a bit. We have dev_err calls when: - probes are permanently deferred - have ac

Re: [PATCH v1 1/2] add device state flags and add error state

2021-06-21 Thread Bartosz Bilas
Hello, On 21.06.2021 10:07, Ahmad Fatoum wrote: On 06.06.21 14:23, Oleksij Rempel wrote: Add state flags for each registered device and set error state on each dev_err print. This states can be used by users to identify erroneous device. I thought this over a bit. We have dev_err calls when:

Re: [PATCH v2 00/29] RISC-V: add BeagleV Beta board support

2021-06-21 Thread Sascha Hauer
On Sat, Jun 19, 2021 at 06:50:26AM +0200, Ahmad Fatoum wrote: > The changes allow barebox to run second stage (after ddrinit and second > boot) on the BeagleV beta board. It does everything necessary to support > Ethernet, MMC, GPIO, pinmux, pinconf, clock, reset, watchdog, HWRNG and > DMA between

[PATCH 02/12] clk: rockchip rk3568: Initialize clocks

2021-06-21 Thread Sascha Hauer
This initializes the rk3568 clocks in the way U-Boot initializes them as well. Signed-off-by: Sascha Hauer Link: https://lore.barebox.org/20210615141641.31577-3-s.ha...@pengutronix.de Signed-off-by: Sascha Hauer --- drivers/clk/rockchip/clk-rk3568.c | 28 1 file cha

[PATCH v2 00/12] Rockchip RK3568 support

2021-06-21 Thread Sascha Hauer
Again the RK3568 support with some updates Changes since v1: - move clk_name_* prototypes to correct location - register softrst handlers - rk3568 EVB: Fix 2nd stage booting, need to relocate to current addr then - Make OP-TEE firmware optional Sascha Hauer (12): clk: Add clk_name_* function

[PATCH 03/12] filetype: Add Rockchip boot image type

2021-06-21 Thread Sascha Hauer
Newer Rockchip SoCs boot images starting with the magic "RKNS". There are older image formats currently not supported, this one is at least supported on the RK3568. Signed-off-by: Sascha Hauer Link: https://lore.barebox.org/20210615141641.31577-4-s.ha...@pengutronix.de Signed-off-by: Sascha Hauer

[PATCH 04/12] ARM: Rockchip: Add rkimage tool

2021-06-21 Thread Sascha Hauer
This adds a tool for generating "RKNS" type booting image for newer Rockchip SoCs. This image format is supported starting at least with RK3568. Older image types are not (yet) supported. Signed-off-by: Sascha Hauer Link: https://lore.barebox.org/20210615141641.31577-5-s.ha...@pengutronix.de Sign

[PATCH 10/12] ARM: Rockchip: Add rk3568 evb board support

2021-06-21 Thread Sascha Hauer
This adds support for the rk3568 evb board. Tested features so far are: - 1st stage booting - Network - SD card - eMMC The dts files are based on the ones posted on the mailing lists, they should be rebased on the upstream files once they show up in barebox. Signed-off-by: Sascha Hauer Link: ht

[PATCH 08/12] ARM: Add atf common support

2021-06-21 Thread Sascha Hauer
ARM trusted firmware has some common data structures passed to bl31. This patch imports the code supporting this taken from U-Boot. The defines and data structures are taken directly from U-Boot, the support code is heavily modified for the sake of readability. Signed-off-by: Sascha Hauer Link: h

[PATCH 12/12] fixup! clk: Rockchip: Add rk3568 clk support

2021-06-21 Thread Sascha Hauer
--- drivers/clk/rockchip/clk-rk3568.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/clk/rockchip/clk-rk3568.c b/drivers/clk/rockchip/clk-rk3568.c index 620d932a09..40ab7ee3d7 100644 --- a/drivers/clk/rockchip/clk-rk3568.c +++ b/drivers/clk/rockchip/clk-rk3568.c @@ -1619,6 +161

[PATCH 06/12] ARM: Rockchip: Add rk3568 dtsi files

2021-06-21 Thread Sascha Hauer
This adds the rk3568 dtsi files, taken from the mailing list. They should hit upstream soon and can be removed then. Signed-off-by: Sascha Hauer Link: https://lore.barebox.org/20210615141641.31577-7-s.ha...@pengutronix.de Signed-off-by: Sascha Hauer --- arch/arm/dts/rk3568-pinctrl.dtsi | 3111

[PATCH 01/12] clk: Add clk_name_* functions

2021-06-21 Thread Sascha Hauer
At some places a clk name may be known without having a struct clk * directly. Add some convenience functions to handle this situation and use them in the clk commands. Signed-off-by: Sascha Hauer Link: https://lore.barebox.org/20210615141641.31577-2-s.ha...@pengutronix.de Signed-off-by: Sascha H

[PATCH 11/12] Add rockchip_v8_defconfig

2021-06-21 Thread Sascha Hauer
Add a defconfig for the arm64 based Rockchip SoCs, currently only RK3568 Signed-off-by: Sascha Hauer Link: https://lore.barebox.org/20210615141641.31577-12-s.ha...@pengutronix.de Signed-off-by: Sascha Hauer --- arch/arm/configs/rockchip_v8_defconfig | 120 + 1 file chang

[PATCH 09/12] ARM: rockchip: Add bootm handler for RKNS images

2021-06-21 Thread Sascha Hauer
The rk3568 utilizes boot images starting with the magic 'RKNS'. Add a bootm handler for these to allow them to be chainloaded. Signed-off-by: Sascha Hauer Link: https://lore.barebox.org/20210615141641.31577-10-s.ha...@pengutronix.de Signed-off-by: Sascha Hauer --- arch/arm/mach-rockchip/Makefil

[PATCH 07/12] ARM: Rockchip: Add rk3568 support

2021-06-21 Thread Sascha Hauer
This adds basic support for the Rockchip rk3568 SoC. Signed-off-by: Sascha Hauer Link: https://lore.barebox.org/20210615141641.31577-8-s.ha...@pengutronix.de Signed-off-by: Sascha Hauer --- arch/arm/Kconfig | 3 - arch/arm/mach-rockchip/Kconfig| 1

[PATCH 05/12] ARM: Add relocate_to_adr_full()

2021-06-21 Thread Sascha Hauer
relocate_to_adr() currently relocates the PBL code to another address, but doesn't move the piggy data (compressed barebox image). This patch adds relocate_to_adr_full() which moves the full image including the piggy data. This is needed for upcoming Rockchip RK3568 support. Here we are started at

[PATCH] image-sparse: remove unused define

2021-06-21 Thread Rouven Czerwinski
CONFIG_FASTBOOT_FLASH_FILLBUF_SIZE is present since the very first addition of sparse image support. However its not used anywhere in the code, so remove it. Fixes: 13f649a4f960 ("Add support for fastboot sparse images") Signed-off-by: Rouven Czerwinski --- lib/image-sparse.c | 4 1 file c

Re: Compiled in boot environment and dtbo files

2021-06-21 Thread Konstantin Kletschke
Dear community, dear Sascha, an accident happened on my side. I totally overlooked that after my initial mail with the initial quoted error message the message changed. Probably either the change of compiling the dtb file (make dtbs DTC_FLAGS=-@) got me a __symbols__ node or another thing was

Re: [PATCH] aiodev: add driver for Rockchip SARADC

2021-06-21 Thread Michael Riesch
Hello Sascha, thanks for the review, I'll prepare a v2. On 6/21/21 6:30 AM, Sascha Hauer wrote: > Hi Michael, > > On Thu, Jun 17, 2021 at 04:36:54PM +0200, Michael Riesch wrote: >> +static int rockchip_saradc_read(struct aiochannel *chan, int *val) >> +{ >> +struct rockchip_saradc_data *data

[PATCH 7/7] fixup! phy: rockchip: Add naneng-combphy support

2021-06-21 Thread Sascha Hauer
--- drivers/phy/rockchip/phy-rockchip-naneng-combphy.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c index a8d7fd13d8..af4340f90d 100644 --- a/drivers/phy/rockchip

[PATCH 5/7] ARM: Rockchip: rk3568 EVB: Add USB support

2021-06-21 Thread Sascha Hauer
Enable the USB nodes for the ports found on the rk3568 EVB board. Signed-off-by: Sascha Hauer --- arch/arm/dts/rk3568-evb1-v10.dts | 95 1 file changed, 95 insertions(+) diff --git a/arch/arm/dts/rk3568-evb1-v10.dts b/arch/arm/dts/rk3568-evb1-v10.dts index ca6f9

[PATCH 1/7] usb: ehci: Handle clocks and phys

2021-06-21 Thread Sascha Hauer
The generic ehci binding also describes clocks and a phy. Add support for these properties to the driver. Signed-off-by: Sascha Hauer --- drivers/usb/host/ehci-hcd.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehc

[PATCH 6/7] fixup! phy: Rockchip: Add driver for usb2phy

2021-06-21 Thread Sascha Hauer
--- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c index 5c7d6ddb72..bb1a5c747e 100644 --- a/drivers/phy/rockchip/phy-rockch

[PATCH 4/7] ARM: Rockchip: rk3568: Add USB nodes

2021-06-21 Thread Sascha Hauer
The RK3568 has two DWC3 cores and two EHCI/OHCI cores. Add these nodes to the dtsi file. Signed-off-by: Sascha Hauer --- arch/arm/dts/rk3568.dtsi | 213 +++ 1 file changed, 213 insertions(+) diff --git a/arch/arm/dts/rk3568.dtsi b/arch/arm/dts/rk3568.dtsi ind

[PATCH 3/7] phy: rockchip: Add naneng-combphy support

2021-06-21 Thread Sascha Hauer
This adds driver for the PCIe/USB3.0/SATA phy found on Rockchip RK3568 SoCs. The driver has been taken from the Rockchip downstream Kernel repository. Signed-off-by: Sascha Hauer --- drivers/phy/rockchip/Kconfig | 7 + drivers/phy/rockchip/Makefile | 1 + ...

[PATCH 2/7] phy: Rockchip: Add driver for usb2phy

2021-06-21 Thread Sascha Hauer
This adds a driver for the Rockchip usb2phy. The driver has been taken from U-Boot which has the same codebase as the Kernel driver, but is easier to port over. Some features like clk provider support have been added from the kernel then. Signed-off-by: Sascha Hauer --- drivers/phy/Kconfig

Re: [PATCH 6/7] fixup! phy: Rockchip: Add driver for usb2phy

2021-06-21 Thread Sascha Hauer
On Tue, Jun 22, 2021 at 08:47:10AM +0200, Sascha Hauer wrote: > --- > drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 11 +++ > 1 file changed, 3 insertions(+), 8 deletions(-) Grumpf. -ENOCOFFEEBEFORESENDING Sascha > > diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c > b/dri