Re: [PATCH RFC] gpio: Fix probing of gpio-hogs

2024-07-31 Thread Chris Webb
Hi Simon, Simon Glass wrote: On Wed, 31 Jul 2024 at 04:14, Chris Webb wrote: Alas I don't have any boards to test on for either of these platforms. If you have the inclination it is still worth sending a patch. The maintainer can check it. These sorts of counter-examples can be copie

Re: [PATCH RFC] gpio: Fix probing of gpio-hogs

2024-07-31 Thread Chris Webb
Hi Simon, Simon Glass wrote: Presumably it needs to apply to every mtk soc that uses mtk_pinctrl_common_probe() as they'll all be affected by this problem. Yes I suppose so. As well as the mediatek case (patch just sent), I thought I should look through the other pinctrl drivers for oth

[PATCH] pinctrl: mediatek: Bind gpio while binding pinctrl

2024-07-31 Thread Chris Webb
() to mtk_pinctrl_common_bind() and call this as the .bind method of each of the mediatek pinctrl drivers. Signed-off-by: Chris Webb --- drivers/pinctrl/mediatek/pinctrl-mt7622.c | 1 + drivers/pinctrl/mediatek/pinctrl-mt7623.c | 1 + drivers/pinctrl/mediatek/pinctrl-mt7629.c | 1

Re: [PATCH RFC] gpio: Fix probing of gpio-hogs

2024-07-29 Thread Chris Webb
Hi Simon, Simon Glass wrote: Well, yes, mt7981_pinctrl is wrong since it is not actually binding the GPIO devices until it itself is probed. It should do it when it is bound. Oh I see! Yes, I can see the mtk_gpiochip_register(dev) in mtk_pinctrl_common_probe() exactly as you say. Better

Re: [PATCH RFC] gpio: Fix probing of gpio-hogs

2024-07-29 Thread Chris Webb
Simon Glass wrote: We cannot probe devices when they are bound since it breaks the ordering of driver model. From your trace it looks like everything is happening after relocation. I can't quite see what is actually going wrong. But if you look at dm_init_and_scan(), it does the probe at the e

Re: [PATCH RFC] gpio: Fix probing of gpio-hogs

2024-07-29 Thread Chris Webb
Chris Webb wrote: Now the release is out, I'd be really keen to pick this one up and get it fixed upstream if possible. Hi Tom, is there anything more I can do to help out here? I'd love upstream 2024.10 to ship with gpio-hog that works again. Best wishes, Chris.

Re: [PATCH RFC] gpio: Fix probing of gpio-hogs

2024-07-03 Thread Chris Webb
Chris Webb wrote: Tom Rini wrote: Adding Marek, as the author of commit 48b3ecbedf82 ("gpio: Get rid of gpio_hog_probe_all()"). Thanks! I don't claim this is the correct way to fix this, just that it works. Specifically, the two things I found that got gpio-hog wor

Re: [PATCH RFC] gpio: Fix probing of gpio-hogs

2024-06-22 Thread Chris Webb
Tom Rini wrote: Adding Marek, as the author of commit 48b3ecbedf82 ("gpio: Get rid of gpio_hog_probe_all()"). Thanks! I don't claim this is the correct way to fix this, just that it works. Specifically, the two things I found that got gpio-hog working were (a) adding an explicit probe

[PATCH RFC] gpio: Fix probing of gpio-hogs

2024-06-13 Thread Chris Webb
: [...] CPU: MediaTek MT7981 Model: GL.iNet GL-X3000 DRAM: 512 MiB [...] Core: 34 devices, 14 uclasses, devicetree: separate MMC: mmc@1123: 0 [...] Probe them directly in gpio_post_bind instead. Signed-off-by: Chris Webb --- drivers/gpio/gpio-uclass.c | 4 +++- 1 file

Re: Debugging gpio-hogs which don't get probed

2024-06-11 Thread Chris Webb
Chris Webb wrote: This shows gpio_post_bind being called, then the four gpio-hogs found and set to probe after bind, but the gpio_hog_probe function is never actually called. Presumably this is the problem - if they're not probed then they'll never take effect? I enabled CONF

Debugging gpio-hogs which don't get probed

2024-06-11 Thread Chris Webb
I'm building u-boot for a mt7981a board, very similar to the in-tree mt7981-emmc-rfb. For reference, my device tree and output of make savedefconfig are here: https://gist.github.com/arachsys/98048980728c652bea641b42cfd41a40 Everything boots fine, but I have a handful of gpios which need t

Re: [U-Boot] [RFC PATCH] rockchip, Makefile: add u-boot-tpl-with-spl.img target

2019-08-13 Thread Chris Webb
Simon Glass wrote: Chris Webb wrote: My worry about using binman for cracking such a simple nut is the dependencies it pulls in that wouldn't otherwise be needed: the documentation suggests at least lzma-alone, liblz4, and pyelftools. I should probably update this. Unless yo

Re: [U-Boot] [RFC PATCH] rockchip, Makefile: add u-boot-tpl-with-spl.img target

2019-08-12 Thread Chris Webb
Mark Kettenis wrote: [Simon Glass wrote:] Well, for producing an image that works. E.g. producing a full image (TPL, SPL and U-Boot) for an SD card - it would be nice to have u-boot-rockchip.sd.bin or something like that. True. That'd be an image you write at certain offset I suppose s

Re: [U-Boot] [RFC PATCH] rockchip, Makefile: add u-boot-tpl-with-spl.img target

2019-08-11 Thread Chris Webb
Matwey V. Kornilov wrote: Here, we introduce generic u-boot-tpl-with-spl.img target which is the TPL image followed by the SPL binary. Having built U-Boot TPL + SPL images over and over again for testing on various rk3399 hardware, something like this would certainly be a convenience. It

Re: [U-Boot] [PATCH v3 3/3] arm64: dts: rockchip: Add support for Khadas Edge-Captain

2019-07-30 Thread Chris Webb
xieqin...@gmail.com wrote: From: Nick Xie Add devicetree support for Khadas Edge-Captain. Khadas Captain is the carrier board for Khadas Edge. Tested-by: Chris Webb Here's the boot log of TPL -> SPL -> U-Boot proper -> Linux on a 4GB Edge board in a Captain V12 carrier,

Re: [U-Boot] [PATCH v3 1/3] arm64: dts: rockchip: Add support for Khadas Edge

2019-07-30 Thread Chris Webb
xieqin...@gmail.com wrote: From: Nick Xie Add devicetree support for Khadas Edge. Khadas Edge is an expandable Rockchip RK3399 board with goldfinger. Tested-by: Chris Webb Here's the boot log of TPL -> SPL -> U-Boot proper -> Linux on a 4GB Edge board booting from an

Re: [U-Boot] [PATCH] rockchip: rk3399: Add Khadas Edge board support

2019-07-27 Thread Chris Webb
Nick Xie wrote: That's great! I'll update the patches and send them soon. I'll make sure I test your specific patch when you post it, but I can already confirm that u-boot.git master happily boots a Khadas Edge board. I just added the unmodified Edge device tree from mainline Linux into

Re: [U-Boot] [PATCH] rockchip: rk3399: Add Khadas Edge board support

2019-07-26 Thread Chris Webb
Hi Nick. I think Kever has merged the LPDDR4 series, and it's already made its way into the mainline u-boot master branch. https://gitlab.denx.de/u-boot/u-boot/commit/852f6ddd76fad2d5adef3f7e3a75d0065c68db3b and its ancestors are the v3 series Jagan posted to the list. There have also been

[U-Boot] [PATCH 2/2] rockchip: TPL banner should depend on CONFIG_TPL_BANNER_PRINT

2019-07-19 Thread Chris Webb
The generic code in common/spl/spl.c allows TPL/SPL banners to be silenced by unsetting CONFIG_TPL_BANNER_PRINT or CONFIG_SPL_BANNER_PRINT respectively. However, arch/arm/mach-rockchip/tpl.c prints this banner unconditionally. Fix the rockchip-specific tpl.c so that the TPL banner depends on CONFI

[U-Boot] [PATCH 1/2] rockchip: Fix TPL build without CONFIG_TPL_SERIAL_SUPPORT

2019-07-19 Thread Chris Webb
If CONFIG_DEBUG_UART is set but CONFIG_TPL_SERIAL_SUPPORT is not, the serial output should be available in SPL and full U-Boot, but not built in TPL. However, the rockchip tpl.c instead fails to compile with undefined references to the debug UART. Instead, initialise the debug UART and print the T

[U-Boot] [PATCH 0/2] rockchip: tpl.c #ifdef fixes

2019-07-19 Thread Chris Webb
These are two trivial patches which fix up the #ifdef conditionals in mach-rockchip/tpl.c to do the right thing in two configuration scenarios: 1. Debug UART enabled (for SPL and main U-Boot) but serial support disabled for the TPL stage. 2. TPL banner disabled by unsetting CONFIG_TPL_BANNER_PRIN

[U-Boot] [PATCH v3 2/2] rockchip: Remove obsolete references to pyelftools

2019-07-16 Thread Chris Webb
make_fit_atf.py no longer requires pyelftools, and nothing else in the rockchip build requires it either, so remove references to installing it from the documentation. Signed-off-by: Chris Webb --- board/rockchip/evb_rk3399/README | 6 -- doc/README.rockchip | 4 2 files

[U-Boot] [PATCH v3 1/2] rockchip: make_fit_atf.py: Eliminate pyelftools dependency

2019-07-16 Thread Chris Webb
the destructuring code is reasonably self-documenting. Signed-off-by: Chris Webb --- arch/arm/mach-rockchip/make_fit_atf.py | 75 +++--- 1 file changed, 32 insertions(+), 43 deletions(-) diff --git a/arch/arm/mach-rockchip/make_fit_atf.py b/arch/arm/mach-rockchip

[U-Boot] [PATCH v3 0/2] rockchip: make_fit_atf.py Eliminate pyelftools dependency

2019-07-16 Thread Chris Webb
Building for rockchip, make_fit_atf.py depends on pyelftools, a non-bundled python module that is not used elsewhere in building u-boot or the kernel. We only use pyelftools to pull out PT_LOAD segments. ELF is very simple, so doing this manually is easy and spares users the extra dependency. In f

Re: [U-Boot] [PATCH v2 1/2] rockchip: make_fit_atf.py: Eliminate pyelftools dependency

2019-07-16 Thread Chris Webb
Hi Andy and Kever Andy Yan writes: > One small coding style issue: > > offset = e_phoff + e_phentsize * index Thanks, will fix this. Kever Yang writes: > Please fix the coding style comment by Andy, for other codes: > > Reviewed-by: Kever Yang Newbie contributor so can I check: is it rig

[U-Boot] [PATCH v2 2/2] rockchip: Remove obsolete references to pyelftools

2019-07-14 Thread Chris Webb
make_fit_atf.py no longer requires pyelftools, and nothing else in the rockchip build requires it either, so remove references to installing it from the documentation. Signed-off-by: Chris Webb --- board/rockchip/evb_rk3399/README | 6 -- doc/README.rockchip | 4 2 files

[U-Boot] [PATCH v2 1/2] rockchip: make_fit_atf.py: Eliminate pyelftools dependency

2019-07-14 Thread Chris Webb
the destructuring code is reasonably self-documenting. Signed-off-by: Chris Webb --- arch/arm/mach-rockchip/make_fit_atf.py | 75 +++--- 1 file changed, 32 insertions(+), 43 deletions(-) diff --git a/arch/arm/mach-rockchip/make_fit_atf.py b/arch/arm/mach-rockchip

[U-Boot] [PATCH v2 0/2] rockchip: make_fit_atf.py Eliminate pyelftools dependency

2019-07-14 Thread Chris Webb
[Sorry for a respin so soon, but this fixes the overzealous documentation update and also ensures the script's behaviour is identical to the existing implementation in the case of a completely empty bl31 ELF file.] Building for Rockchip, make_fit_atf.py depends on pyelftools, a non-bundled python

Re: [U-Boot] [PATCH 2/2] rockchip: Remove obsolete references to pyelftools

2019-07-13 Thread Chris Webb
Oops, sorry; I'm an idiot. The synopsys board does indeed still use pyelftools, and therefore while these are correct: > board/rockchip/evb_rk3399/README | 6 -- > doc/README.rockchip | 4 these removals are incorrect: > .travis.yml | 1 - > board/syno

[U-Boot] [PATCH 2/2] rockchip: Remove obsolete references to pyelftools

2019-07-13 Thread Chris Webb
make_fit_atf.py no longer requires pyelftools, and nothing else in the tree requires it either, so remove references to installing it from the documentation and travis configuration. Signed-off-by: Chris Webb --- .travis.yml | 1 - board/rockchip/evb_rk3399/README | 6

[U-Boot] [PATCH 1/2] rockchip: make_fit_atf.py: Eliminate pyelftools dependency

2019-07-13 Thread Chris Webb
the destructuring code is reasonably self-documenting. Signed-off-by: Chris Webb --- arch/arm/mach-rockchip/make_fit_atf.py | 74 +++--- 1 file changed, 31 insertions(+), 43 deletions(-) diff --git a/arch/arm/mach-rockchip/make_fit_atf.py b/arch/arm/mach-rockchip

[U-Boot] [PATCH 0/2] rockchip: make_fit_atf.py Eliminate pyelftools dependency

2019-07-13 Thread Chris Webb
Building for rockchip, make_fit_atf.py depends on pyelftools, a non-bundled python module that is not used elsewhere in building u-boot or the kernel. We only use pyelftools to pull out PT_LOAD segments. ELF is very simple, so doing this manually is easy and spares users the extra dependency. In f

Re: [U-Boot] [PATCH v2 00/99] ram: rk3399: Add LPDDR4 support

2019-07-07 Thread Chris Webb
Jagan Teki writes: > This is the v2 set for supporting LPDDR4 with associated features Sorry for a late follow-up, but I've just tested this series (applied to today's master branch) on Khadas Edge. With these patches, a device tree copied from Linux -next, and a defconfig essentially the same