Re: [PATCH v11 00/18] RISC-V SiFive FU540 support SPL

2020-05-19 Thread Bin Meng
Hi Sean, On Wed, May 20, 2020 at 2:38 PM Sean Anderson wrote: > > On 5/20/20 2:32 AM, Bin Meng wrote: > > Hi Sean, > > > > On Wed, May 20, 2020 at 2:06 PM Sean Anderson wrote: > >> > >> On 5/19/20 11:07 PM, Rick Chen wrote: > >>> Hi Bin > >>> > -Original Message- > From: Bin Me

[PATCH v11 21/21] riscv: Add Sipeed Maix support

2020-05-19 Thread Sean Anderson
The Sipeed Maix series is a collection of boards built around the RISC-V Kendryte K210 processor. This processor contains several peripherals to accelerate neural network processing and other "ai" tasks. This includes a "KPU" neural network processor, an audio processor supporting beamforming recep

[PATCH v11 19/21] riscv: Add device tree for K210 and Sipeed Maix BitM

2020-05-19 Thread Sean Anderson
Where possible, I have tried to find compatible drivers based on the layout of registers. However, many devices remain untested. All untested devices have been left disabled, but some tentative properties (such as compatible strings, and clocks, interrupts, and resets properties) have been added.

[PATCH v11 20/21] doc: riscv: Add documentation for Sipeed Maix Bit

2020-05-19 Thread Sean Anderson
This patch adds documentation for the Sipeed Maix bit, and more generally for the Kendryte K210 processor. Signed-off-by: Sean Anderson --- Changes in v9: - Mark dts code block as "none" explicitly Changes in v7: - Split off into its own patch - Fix size of clint doc/board/index.rst|

[PATCH v11 18/21] riscv: Enable cpu clock if it is present

2020-05-19 Thread Sean Anderson
The cpu clock is probably already enabled if we are executing code (though we could be executing from a different core). This patch prevents the cpu clock or its parents from being disabled. Signed-off-by: Sean Anderson Reviewed-by: Bin Meng --- This patch was previously submitted on its own as

[PATCH v11 17/21] riscv: Try to get cpu frequency from a "clocks" node if it exists

2020-05-19 Thread Sean Anderson
Instead of always using the "clock-frequency" property to determine cpu frequency, try using a clock in "clocks" if it exists. This patch also fixes a bug where there could be spurious higher frequencies if sizeof(u32) != sizeof(ulong). Signed-off-by: Sean Anderson Reviewed-by: Bin Meng --- This

[PATCH v11 16/21] riscv: Allow use of reset drivers

2020-05-19 Thread Sean Anderson
Currently, one cannot use a reset driver on RISC-V. Follow the MIPS example, and disable the default reset handler when the sysreset driver is enabled. Signed-off-by: Sean Anderson Reviewed-by: Bin Meng --- Changes in v3: - New arch/riscv/lib/reset.c | 2 ++ 1 file changed, 2 insertions(+) d

[PATCH v11 14/21] riscv: Clean up IPI initialization code

2020-05-19 Thread Sean Anderson
The previous IPI code initialized the device whenever the first call was made to a riscv_*_ipi function. This made it difficult to determine when the IPI device was initialized. This patch introduces a new function riscv_init_ipi. It is called once during arch_cpu_init_dm. In SPL, it is called in s

[PATCH v11 13/21] riscv: Clear pending interrupts before enabling IPIs

2020-05-19 Thread Sean Anderson
On some platforms (k210), the previous stage bootloader may have not cleared pending IPIs before transferring control to U-Boot. This can cause race conditions, as multiple harts all attempt to initialize the IPI controller at once. This patch clears IPIs before enabling them, ensuring that only on

[PATCH v11 15/21] riscv: Add option to support RISC-V privileged spec 1.9

2020-05-19 Thread Sean Anderson
Some older processors (notably the Kendryte K210) use an older version of the RISC-V privileged specification. The primary changes between the old and new are in virtual memory, and in the merging of three separate counter enable CSRs. Using the new CSR on an old processor causes an illegal instru

[PATCH v11 10/21] reset: Add generic reset driver

2020-05-19 Thread Sean Anderson
This patch adds a generic reset driver. It is designed to be useful when one has a register in a regmap which contains bits that reset other devices. I thought this seemed like a very generic use, so here is a generic driver. The overall structure has been modeled on the syscon-reboot driver. Sign

[PATCH v11 11/21] lib: Always set errno in hcreate_r

2020-05-19 Thread Sean Anderson
This could give a confusing error message if it failed and didn't set errno. Signed-off-by: Sean Anderson Reviewed-by: Bin Meng --- Changes in v5: - New lib/hashtable.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/hashtable.c b/lib/hashtable.c index b96dbe19

[PATCH v11 07/21] clk: Add K210 clock support

2020-05-19 Thread Sean Anderson
Due to the large number of clocks, I decided to use the CCF. The overall structure is modeled after the imx code. Clocks parameters are stored in several arrays, and are then instantiated at run-time. There are some translation macros (FOOIFY()) which allow for more dense packing. Signed-off-by: S

[PATCH v11 09/21] dm: Fix error handling for dev_read_addr_ptr

2020-05-19 Thread Sean Anderson
dev_read_addr_ptr had different semantics depending on whether OF_LIVE was enabled. This patch converts both implementations to return NULL on error, and converts all call sites which check for FDT_ADDR_T_NONE to check for NULL instead. This patch also removes the call to map_physmem, since we have

[PATCH v11 06/21] clk: Add a bypass clock for K210

2020-05-19 Thread Sean Anderson
This is a small driver to do a software bypass of a clock if hardware bypass is not working. I have tried to write this in a generic fashion, so that it could be potentially broken out of the kendryte code at some future date. For the K210, it is used to have aclk bypass pll0 and use in0 instead so

[PATCH v11 12/21] riscv: Add headers for asm/global_data.h

2020-05-19 Thread Sean Anderson
This header depended on bd_t and ulong, but did not include the appropriate headers. Signed-off-by: Sean Anderson Reviewed-by: Bin Meng --- Changes in v4: - Include compiler.h not linux/compiler.h arch/riscv/include/asm/global_data.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/

[PATCH v11 05/21] clk: Add K210 pll support

2020-05-19 Thread Sean Anderson
This pll code is primarily based on the code from the kendryte standalone sdk in lib/drivers/sysctl.c. k210_pll_calc_config is roughly analogous to the algorithm used to set the pll frequency, but it has been completely rewritten to be fixed-point based. Signed-off-by: Sean Anderson CC: Lukasz Ma

[PATCH v11 08/21] dm: Add support for simple-pm-bus

2020-05-19 Thread Sean Anderson
This type of bus is used in Linux to designate buses which have power domains and/or clocks which need to be enabled before their child devices can be used. Because power domains are automatically enabled before probing in U-Boot, we just need to enable any clocks present. Signed-off-by: Sean Ande

[PATCH v11 04/21] clk: Fix clk_get_by_* handling of index

2020-05-19 Thread Sean Anderson
clk_get_by_index_nodev only ever fetched clock 1, due to passing a boolean predicate instead of the index. Other clk_get_by_* functions got the clock correctly, but passed a predicate instead of the index to clk_get_by_tail. This could lead to confusing error messages. Signed-off-by: Sean Anderson

[PATCH v11 02/21] clk: Check that ops of composite clock components exist before calling

2020-05-19 Thread Sean Anderson
clk_composite_ops was shared between all devices in the composite clock driver. If one clock had a feature (such as supporting set_parent) which another clock did not, it could call a null pointer dereference. This patch does three things 1. It adds null-pointer checks to all composite clock func

[PATCH v11 01/21] clk: Always use the supplied struct clk

2020-05-19 Thread Sean Anderson
CCF clocks should always use the struct clock passed to their methods for extracting the driver-specific clock information struct. Previously, many functions would use the clk->dev->priv if the device was bound. This could cause problems with composite clocks. The individual clocks in a composite c

[PATCH v11 03/21] clk: Unconditionally recursively en-/dis-able clocks

2020-05-19 Thread Sean Anderson
For clocks not in the CCF, their parents will not have UCLASS_CLK, so we just enable them as normal. The enable count is local to the struct clk, but this will never result in the actual en-/dis-able op being called (unless the same struct clk is enabled twice). For clocks in the CCF, we always tr

[PATCH v11 00/21] riscv: Add Sipeed Maix support

2020-05-19 Thread Sean Anderson
This patch series adds support for Sipeed Maix boards and the Kendryte K210 CPU. Currently, only the Maix Bit V2.0 is supported, however other models are similar. CI passing for the SPL builds which were broken last time: https://travis-ci.org/github/Forty-Bot/u-boot/builds/689112153 Known Bugs/L

Re: [PATCH v11 00/18] RISC-V SiFive FU540 support SPL

2020-05-19 Thread Sean Anderson
On 5/20/20 2:32 AM, Bin Meng wrote: > Hi Sean, > > On Wed, May 20, 2020 at 2:06 PM Sean Anderson wrote: >> >> On 5/19/20 11:07 PM, Rick Chen wrote: >>> Hi Bin >>> -Original Message- From: Bin Meng [mailto:bmeng...@gmail.com] Sent: Tuesday, May 19, 2020 4:44 PM To: Prag

[PATCH 2/2] fdtdec: Honor #address-cells and #size-cells in fdtdec_add_reserved_memory()

2020-05-19 Thread Bin Meng
From: Bin Meng At present fdtdec_add_reserved_memory() calls fdtdec_get_addr_size() to get address and size for the subnodes of /reserved-memory node. We should honor #address-cells and #size-cells properties in the parent node. Signed-off-by: Bin Meng --- lib/fdtdec.c | 3 ++- 1 file change

[PATCH 1/2] fdtdec: Fix the types of addr and size in fdtdec_add_reserved_memory()

2020-05-19 Thread Bin Meng
From: Bin Meng fdtdec_get_addr_size() expects size is of type 'fdt_size_t', and return value is of type 'fdt_addr_t'. Adjust their types accordingly. Signed-off-by: Bin Meng --- lib/fdtdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/fdtdec.c b/lib/fdtdec.c inde

Re: [PATCH v11 00/18] RISC-V SiFive FU540 support SPL

2020-05-19 Thread Bin Meng
Hi Sean, On Wed, May 20, 2020 at 2:06 PM Sean Anderson wrote: > > On 5/19/20 11:07 PM, Rick Chen wrote: > > Hi Bin > > > >> -Original Message- > >> From: Bin Meng [mailto:bmeng...@gmail.com] > >> Sent: Tuesday, May 19, 2020 4:44 PM > >> To: Pragnesh Patel; Rick Jian-Zhi Chen(陳建志) > >> Sub

Re: [PATCH v11 00/18] RISC-V SiFive FU540 support SPL

2020-05-19 Thread Sean Anderson
On 5/19/20 11:07 PM, Rick Chen wrote: > Hi Bin > >> -Original Message- >> From: Bin Meng [mailto:bmeng...@gmail.com] >> Sent: Tuesday, May 19, 2020 4:44 PM >> To: Pragnesh Patel; Rick Jian-Zhi Chen(陳建志) >> Subject: Re: [PATCH v11 00/18] RISC-V SiFive FU540 support SPL >> >> Hi Rick, >> >>

Re: PINE64 Rock64 - How to get SPI driver working

2020-05-19 Thread Kamal R. Prasad
Hello, I want to add a helper function to uboot i.e uboot# help will show a list of commands. I want to add 1 for my own private command. which file contains the list of cmd that will be displayed and the indirection? thanks -kamal On Wed, May 20, 2020 at 8:58 AM Johannes Krottmayer wrote: >

pull request of u-boot-fsl-qoriq for v2020.07

2020-05-19 Thread Priyanka Jain
Dear Tom, Please find my pull-request for u-boot-fsl-qoriq/master https://travis-ci.org/github/p-priyanka-jain/u-boot/builds Summary Add DM_ETH support for lx2160aqds, ls2080aqds, ls1088aqds QSI related fixes on ls1012a, ls2080a, ls1046a, ls1088a, ls1043a based platforms Bug-fixes/updtaes relate

Re: [PATCH v1 00/15] add basic driver support for broadcom NS3 soc

2020-05-19 Thread Rayagonda Kokatanur
Hi Thomas, On Wed, May 20, 2020 at 7:34 AM Thomas Fitzsimmons wrote: > > Rayagonda Kokatanur writes: > > > On Tue, May 19, 2020 at 11:01 PM Tom Rini wrote: > >> > >> On Tue, May 19, 2020 at 10:39:49PM +0530, Rayagonda Kokatanur wrote: > >> > Hi Tom, > >> > > >> > > >> > On Tue, May 19, 2020 at

Re: [PATCH v10 17/18] configs: fu540: Add config options for U-Boot SPL

2020-05-19 Thread Bin Meng
Hi Jagan, On Wed, May 20, 2020 at 12:11 AM Jagan Teki wrote: > > On Sat, May 16, 2020 at 11:42 AM Pragnesh Patel > wrote: > > > > Hi Jagan, > > > > >-Original Message- > > >From: Jagan Teki > > >Sent: 15 May 2020 23:05 > > >To: Pragnesh Patel > > >Cc: U-Boot-Denx ; Atish Patra > > >; P

Re: rockpro64: Enable HDMI output

2020-05-19 Thread Anand Moon
On Friday, May 15, 2020, 5:28:36 PM GMT+5:30, Marcin Juszkiewicz wrote: Enable config options and console setting like on other rk3399 boards. --- configs/rockpro64-rk3399_defconfig | 4 include/configs/rockpro64_rk3399.h | 5 + 2 files changed, 9 insertions(+) diff --git c

Re: [PATCH] ARM: add psci_arch_init() declaration for CONFIG_ARMV7_PSCI

2020-05-19 Thread Masahiro Yamada
On Wed, May 20, 2020 at 12:09 PM Simon Glass wrote: > > HI Masahiro, > > On Tue, 19 May 2020 at 20:44, Masahiro Yamada > wrote: > > > > arch/arm/include/asm/system.h declares psci_arch_init(), but it is > > surrounded by #ifdef CONFIG_ARMV8_PSCI. > > > > psci_arch_init() is called for CONFIG_ARMV

[PATCH 5/6] ARM: uniphier: delete or replace includes

2020-05-19 Thread Masahiro Yamada
pulls in a lot of bloat. is unneeded in most of places. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/arm32/cache-uniphier.c | 1 - arch/arm/mach-uniphier/arm32/psci.c | 1 - arch/arm/mach-uniphier/arm32/timer.c | 2 +- arch/arm/mach-unip

[PATCH 3/6] ARM: uniphier: drop #include again from umc-pxs2.c

2020-05-19 Thread Masahiro Yamada
I do not understand the change made to this file by commit 691d719db718 ("common: Drop init.h from common header"). git show 691d719db718 -- arch/arm/mach-uniphier/dram/umc-pxs2.c This file does not call or define any functions declared in Simply revert the change made to this file. Signed-o

[PATCH 1/6] ARM: uniphier: include instead of from psci.c

2020-05-19 Thread Masahiro Yamada
I do not understand the change made to this file by commit 90526e9fbac4 ("common: Drop net.h from common header"). git show 90526e9fbac4 -- arch/arm/mach-uniphier/arm32/psci.c It added while this file does not call the standard cache functions at all. All the uniphier-specific cache functions

[PATCH 6/6] ARM: uniphier: remove board_eth_init()

2020-05-19 Thread Masahiro Yamada
This platform completely migrated to CONFIG_DM_ETH. board_eth_init() is only called from net/eth_legacy.c Remove the legacy hook. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/micro-support-card.c | 12 1 file changed, 12 deletions(-) diff --git a/arch/arm/mach-uniph

[PATCH 4/6] ARM: uniphier: drop #include again

2020-05-19 Thread Masahiro Yamada
I do not understand the changes made to these files by commit f7ae49fc4f36 ("common: Drop log.h from common header"). git show f7ae49fc4f36 -- arch/arm/mach-uniphier/ None of them uses the log function feature. Simply revert the changes made to these files. Signed-off-by: Masahiro Yamada ---

[PATCH 2/6] ARM: uniphier: remove #include again from micro-support-card.c

2020-05-19 Thread Masahiro Yamada
I do not understand the changes made to this file by commit 90526e9fbac4 ("common: Drop net.h from common header"). git show 90526e9fbac4 -- arch/arm/mach-uniphier/micro-support-card.c The necessary declaration is already included by at line 112. It also moved the inclusion, but I do not unde

Re: [PING][PATCH] Optionally: Set the serial# environment variable on the i.MX7.

2020-05-19 Thread Mark G
On Mon, 11 May 2020, Stefano Babic wrote: patch was hidden in the flood of other patches and I am unsure if this belongs to i.MX: No worries. To clarify the patch applies to all i.MX7 boards. On 19.02.20 22:01, Mark G wrote: +  Linux kernel will use this as the serial number of the m

PINE64 Rock64 - How to get SPI driver working

2020-05-19 Thread Johannes Krottmayer
Hello, I just compiled U-Boot v2020.04 for a PINE64 Rock media board. It compiles fine without errors, but when I try to probe the on board flash I get an error: => sf probe Invalid bus 0 (err=-19) Failed to initialize SPI flash at 0:0 (error -19) => SPI is activated in the Device-Tree blob. I a

Re: [RFC 5/6] dtoc: update dtb_platdata to support cd-gpios

2020-05-19 Thread Simon Glass
On Wed, 13 May 2020 at 14:14, Walter Lozano wrote: > > Currently dtoc does not support the property cd-gpios used to declare > the gpios for card detect in mmc. > > This patch adds support to cd-gpios property. > > Signed-off-by: Walter Lozano > --- > tools/dtoc/dtb_platdata.py | 13

Re: [PATCH v11 00/18] RISC-V SiFive FU540 support SPL

2020-05-19 Thread Rick Chen
Hi Bin > -Original Message- > From: Bin Meng [mailto:bmeng...@gmail.com] > Sent: Tuesday, May 19, 2020 4:44 PM > To: Pragnesh Patel; Rick Jian-Zhi Chen(陳建志) > Subject: Re: [PATCH v11 00/18] RISC-V SiFive FU540 support SPL > > Hi Rick, > > On Tue, May 19, 2020 at 3:04 PM Pragnesh Patel >

Re: [RFC 6/6] dtoc add test for cd-gpios

2020-05-19 Thread Simon Glass
On Wed, 13 May 2020 at 14:14, Walter Lozano wrote: > > Add a test for dtoc taking into account the cd-gpios property. > > Signed-off-by: Walter Lozano > --- > tools/dtoc/dtoc_test_phandle_cd_gpios.dts | 42 + > tools/dtoc/test_dtoc.py | 72 +++ >

Re: [PATCH] ARM: add psci_arch_init() declaration for CONFIG_ARMV7_PSCI

2020-05-19 Thread Simon Glass
HI Masahiro, On Tue, 19 May 2020 at 20:44, Masahiro Yamada wrote: > > arch/arm/include/asm/system.h declares psci_arch_init(), but it is > surrounded by #ifdef CONFIG_ARMV8_PSCI. > > psci_arch_init() is called for CONFIG_ARMV7_PSCI too. Add the missing > function declaration. > > Signed-off-by: M

Re: [RFC 4/6] dtoc: update tests to match new platdata

2020-05-19 Thread Simon Glass
On Wed, 13 May 2020 at 14:14, Walter Lozano wrote: > > After using a new approach to link nodes when OF_PLATDATA is enabled > the test cases need to be update. > > This patch updates the tests based on this new implementation. > > Signed-off-by: Walter Lozano > --- > tools/dtoc/test_dtoc.py | 12

Re: [RFC 3/6] dtoc: extend dtoc to use struct driver_info when linking nodes

2020-05-19 Thread Simon Glass
Hi Walter, On Wed, 13 May 2020 at 14:14, Walter Lozano wrote: > > In the current implementation, when dtoc parses a dtb to generate a struct > platdata it converts the information related to linked nodes as pointers > to struct platdata of destination nodes. By doing this, it makes > difficult to

Re: [RFC 2/6] core: extend struct driver_info to point to device

2020-05-19 Thread Simon Glass
Hi Walter, On Wed, 13 May 2020 at 14:14, Walter Lozano wrote: > > Currently when creating an U_BOOT_DEVICE entry a struct driver_info > is declared, which contains the data needed to instantiate the device. > However, the actual device is created at runtime and there is no proper > way to get the

Re: [PATCH 05/10] x86: Convert from ACCESS_ONCE to READ/WRITE_ONCE

2020-05-19 Thread Simon Glass
On Thu, 14 May 2020 at 06:30, Tom Rini wrote: > > In order to update our to a newer version that no > longer provides ACCESS_ONCE() but only READ_ONCE()/WRITE_ONCE() we need > to convert arch/x86/include/asm/atomic.h to the other macros. > > Cc: Simon Glass > Cc: Bin Meng > Signed-off-by: Tom R

Re: [RFC 1/6] dtoc: add support to scan drivers

2020-05-19 Thread Simon Glass
Hi Walter, On Wed, 13 May 2020 at 14:13, Walter Lozano wrote: > > Currently dtoc scans dtbs to convert them to struct platdata and > to generate U_BOOT_DEVICE entries. These entries need to be filled > with the driver name, but at this moment the information used is the > compatible name present

Re: [RFC 0/6] improve OF_PLATDATA support

2020-05-19 Thread Simon Glass
Hi Walter, On Wed, 13 May 2020 at 14:13, Walter Lozano wrote: > > When using OF_PLATDATA dtbs are converted to C structs in order to save > space as we can remove both dtbs and libraries from TPL/SPL binaries. > > This patchset tries to improve its support by overcoming some limitations > in the

Re: [PATCH v5 3/3] gpio: search for gpio label if gpio is not found through bank name

2020-05-19 Thread Simon Glass
Hi Heiko, On Fri, 15 May 2020 at 08:02, Heiko Schocher wrote: > > dm_gpio_lookup_name() searches for a gpio through > the bank name. But we have also gpio labels, and it > makes sense to search for a gpio also in the labels > we have defined, if no gpio is found through the > bank name definition

Re: [PATCH v5 1/3] gpio-uclass.c: save the GPIOD flags also in the gpio descriptor

2020-05-19 Thread Simon Glass
On Fri, 15 May 2020 at 08:01, Heiko Schocher wrote: > > save the GPIOD_ flags also in the gpio descriptor. > > Signed-off-by: Heiko Schocher > > > --- > > Changes in v5: > - add comment from patrick, update the descriptor flags > in _dm_gpio_set_dir_flags() if setting direction was OK. > > Chan

Re: [PATCH v3 2/7] uart: pl011: Add proper DM clock support

2020-05-19 Thread Simon Glass
Hi André, On Tue, 12 May 2020 at 08:27, André Przywara wrote: > > On 28/04/2020 18:57, Simon Glass wrote: > > Hi, > > sorry for the delay, found this, slightly mouldy already, in my draft > folder. > > First, thanks for the review! I saw the Tom merged this already, but > wanted to come back to t

Re: U-CLASS SPI Bus and Devices

2020-05-19 Thread Simon Glass
Hi Rudolf, On Tue, 12 May 2020 at 18:02, Rudolf J Streif wrote: > > Hi Simon, > > Thanks for your response. > > On 5/7/20 6:36 PM, Simon Glass wrote: > > Hi Rudolf, > > > > On Wed, 18 Mar 2020 at 05:25, Rudolf J Streif > > wrote: > >> I ran into an issue today with a U-CLASS SPI NOR flash devic

Re: [PATCH v5 2/3] sandbox, test: add test for GPIO_HOG function

2020-05-19 Thread Simon Glass
Hi Heiko, On Fri, 15 May 2020 at 08:02, Heiko Schocher wrote: > > currently gpio hog function is not tested with "ut dm gpio" > so add some basic tests for gpio hog functionality. > > For this enable GPIO_HOG in sandbox_defconfig, add > in DTS some gpio hog entries, and add testcase in > "ut dm g

[PATCH] ARM: add psci_arch_init() declaration for CONFIG_ARMV7_PSCI

2020-05-19 Thread Masahiro Yamada
arch/arm/include/asm/system.h declares psci_arch_init(), but it is surrounded by #ifdef CONFIG_ARMV8_PSCI. psci_arch_init() is called for CONFIG_ARMV7_PSCI too. Add the missing function declaration. Signed-off-by: Masahiro Yamada --- arch/arm/include/asm/system.h | 1 + 1 file changed, 1 inser

RE: [PATCH] cpu: imx8: use intended cpu-thermal device when getting temp value

2020-05-19 Thread Peng Fan
> Subject: [PATCH] cpu: imx8: use intended cpu-thermal device when getting > temp value > > This fixes getting DT alert and critical pdata values in imx_scu_thermal > driver. > On i.MX8QXP using not initialized alert pdata value resulted in boot hang and > endless loop outputting: > CPU Temperatu

Re: [PATCH v1 1/3] board: ns3: add optee based bnxt fw load driver

2020-05-19 Thread Thomas Fitzsimmons
Hi Rayagonda and Vikas, Rayagonda Kokatanur writes: > From: Vikas Gupta > > Add optee based bnxt fw load driver. What is "bnxt"? Maybe you could add a comment explaining what it is, or at least expanding it if it's an acronym? Thanks, Thomas

Re: [PATCH v1 00/15] add basic driver support for broadcom NS3 soc

2020-05-19 Thread Thomas Fitzsimmons
Rayagonda Kokatanur writes: > On Tue, May 19, 2020 at 11:01 PM Tom Rini wrote: >> >> On Tue, May 19, 2020 at 10:39:49PM +0530, Rayagonda Kokatanur wrote: >> > Hi Tom, >> > >> > >> > On Tue, May 19, 2020 at 12:46 AM Tom Rini wrote: >> > > >> > > On Sun, May 17, 2020 at 01:49:30PM +0530, Rayagond

Re: [PATCH v1 2/3] board: ns3: add FIT image its file

2020-05-19 Thread Thomas Fitzsimmons
Hi Rayagonda and Pramod, Rayagonda Kokatanur writes: > From: Pramod Kumar > > Add FIT image its file. The .its file and dev keys seem generic. Are you intending to add to the .its file subsequently, e.g., to demonstrate FIT usage unique to the NS3? Thomas

Re: patman: ImportError

2020-05-19 Thread Simon Glass
Hi Stefan, On Sun, 17 May 2020 at 07:54, Stefan Bosch wrote: > > Hi Simon, > > Am 17.05.20 um 01:03 schrieb Simon Glass: > > Hi Stefan, > > > > On Sat, 16 May 2020 at 05:27, Stefan Bosch wrote: > >> > >> Hello, > >> > >> recently, I updated my local repository (U-Boot master). Last commit is > >

[PATCH v2] patman: Avoid circular dependency between command and tools

2020-05-19 Thread Simon Glass
This seems to cause problems in some cases. Split the dependency by copying the code to command. Reported-by: Stefan Bosch Signed-off-by: Simon Glass --- Changes in v2: - Update gitutil as well tools/patman/command.py | 7 +++ tools/patman/gitutil.py | 1 - 2 files changed, 3 insertions(+

[PATCH] psci: add 'static inline' to invoke_psci_fn() stub

2020-05-19 Thread Masahiro Yamada
Avoid potential multiple definitions when CONFIG_ARM_PSCI_FW is disabled. Signed-off-by: Masahiro Yamada --- include/linux/psci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/psci.h b/include/linux/psci.h index 9433df836b..841dbc8da7 100644 --- a/include

Re: [PATCH 2/2] thermal: imx_scu_thermal: fix getting DT alert property value

2020-05-19 Thread Anatolij Gustschin
On Wed, 20 May 2020 00:05:01 +0200 Anatolij Gustschin ag...@denx.de wrote: ... > When uclass_get_device_by_name() is used, then > imx_sc_thermal_ofdata_to_platdata() > is called for "cpu-thermal0" device, here getting the list works > and alert/critical pdata values are initialized properly. This

[PATCH] cpu: imx8: use intended cpu-thermal device when getting temp value

2020-05-19 Thread Anatolij Gustschin
This fixes getting DT alert and critical pdata values in imx_scu_thermal driver. On i.MX8QXP using not initialized alert pdata value resulted in boot hang and endless loop outputting: CPU Temperature (47200C) has beyond alert (0C), close to critical (0C) waiting... While at it, preset CPU type va

[PATCH 25/26] x86: minnowmax: Enable the copy framebuffer

2020-05-19 Thread Simon Glass
Update the video driver to support this feature and enable it on minnowmax to speed up the display. With this change, the time taken to print the environment to the display without CONFIG_CONSOLE_SCROLL_LINES is reduced from over 13 seconds to 300ms, at 1280x1024. Signed-off-by: Simon Glass ---

[PATCH 26/26] x86: minnowmax: Drop screen resolution to 1024x768

2020-05-19 Thread Simon Glass
This seems like a more reasonable resolution for this board, since it is quite slow. It also allows it to work with a 5" LCD display in my lab. Signed-off-by: Simon Glass --- configs/minnowmax_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/minnowmax_defcon

[PATCH 22/26] x86: video: Support copy framebuffer with probed devices

2020-05-19 Thread Simon Glass
For PCI video devices that are not mentioned in the devicetree, U-Boot does not bind a driver before relocation, since PCI is not fully probed at that point. Furthermore it is possible for the video device to be on a secondary bus which is not even scanned. This is fine if the framebuffer is alloc

[PATCH 23/26] x86: chromebook_samus: Enable the copy framebuffer

2020-05-19 Thread Simon Glass
Update the video driver to support this feature and enable it on samus. Also remove the multi-line scrolling since normal scrolling is fast enough now. With this change, the time taken to print the environment to the display without CONFIG_CONSOLE_SCROLL_LINES is reduced from about 430ms to 12ms.

[PATCH 24/26] x86: chromebook_link: Enable the copy framebuffer

2020-05-19 Thread Simon Glass
Update the video driver to support this feature and enable it on link. Also remove the multi-line scrolling since normal scrolling is fast enough now. With this change, the time taken to print the environment to the display without CONFIG_CONSOLE_SCROLL_LINES is reduced from about 930ms to 29ms.

[PATCH 20/26] x86: fsp: video: Allocate a frame buffer when needed

2020-05-19 Thread Simon Glass
When the copy framebuffer is in use, we must also have the standard U-Boot framebuffer available. Update the FSP driver to support this. Signed-off-by: Simon Glass --- arch/x86/lib/fsp/fsp_graphics.c | 12 1 file changed, 12 insertions(+) diff --git a/arch/x86/lib/fsp/fsp_graphics

[PATCH 21/26] video: Correctly handle multiple framebuffers

2020-05-19 Thread Simon Glass
At present video_bottom is set to the bottom of each framebuffer when it is allocated. This is not correct, since it should hold the bottom of the entire area available for framebuffers. Fix this by adding a private address in the uclass which keeps track of the next available spot for a framebuff

[PATCH 17/26] video: Add comments to struct sandbox_sdl_plat

2020-05-19 Thread Simon Glass
This struct is not commented but needs it. Also fix the comment in check_vidconsole_output() about the encoding for the rotation value. Signed-off-by: Simon Glass --- include/dm/test.h | 14 +- test/dm/video.c | 3 ++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git

[PATCH 18/26] video: sandbox: Add support for the copy framebuffer

2020-05-19 Thread Simon Glass
Enable this feature on sandbox by updating the SDL driver to have two framebuffers. Update the video tests to check that the copy framebuffer is kept in sync. Signed-off-by: Simon Glass --- configs/sandbox_defconfig | 1 + drivers/video/sandbox_sdl.c | 9 +- test/dm/video.c

[PATCH 19/26] video: pci: Set up the copy framebuffer

2020-05-19 Thread Simon Glass
When using a copy framebuffer we need to tell the video subsystem its address. U-Boot's normally allocated framebuffer is used as the working buffer, but nothing is displayed until it is copied to the copy framebuffer. For this to work the video driver must request that a framebuffer be allocated

[PATCH 15/26] video: Update rotated console to support copy buffer

2020-05-19 Thread Simon Glass
Update the implementation to keep a track of what it changes in the frame buffer and then tell the copy buffer about it. Use the special vidconsole_memmove() helper so that memmove() operations are also reflected in the copy buffer. Signed-off-by: Simon Glass --- drivers/video/console_rotate.c

[PATCH 16/26] video: Update the copy framebuffer when writing bitmaps

2020-05-19 Thread Simon Glass
Adjust the bitmap code to sync to the copy framebuffer when done. Signed-off-by: Simon Glass --- drivers/video/video_bmp.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/video/video_bmp.c b/drivers/video/video_bmp.c index eb9636541d..732ce3bcc1 100

[PATCH 14/26] video: Update truetype console to support copy buffer

2020-05-19 Thread Simon Glass
Update the implementation to keep a track of what it changes in the frame buffer and then tell the copy buffer about it. Use the special vidconsole_memmove() helper so that memmove() operations are also reflected in the copy buffer. Signed-off-by: Simon Glass --- drivers/video/console_truetype.

[PATCH 13/26] video: Update normal console to support copy buffer

2020-05-19 Thread Simon Glass
Update the implementation to keep a track of what it changes in the frame buffer and then tell the copy buffer about it. Use the special vidconsole_memmove() helper so that memmove() operations are also reflected in the copy buffer. Signed-off-by: Simon Glass --- drivers/video/console_normal.c

[PATCH 11/26] video: Clear the copy framebuffer when clearing the screen

2020-05-19 Thread Simon Glass
Update video_clear() to also sync to the copy framebuffer. Signed-off-by: Simon Glass --- drivers/video/video-uclass.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 0c97377ea9..4d6f950eab 100644 --- a/drivers/video/vide

[PATCH 12/26] video: Add helpers for vidconsole for the copy framebuffer

2020-05-19 Thread Simon Glass
Add a convenience function to call video_sync_copy() for a vidconsole. Also add a memmove() helper, which does the memmove() as well as the sync. Signed-off-by: Simon Glass --- drivers/video/vidconsole-uclass.c | 22 ++ include/video_console.h | 49

[PATCH 10/26] video: Set up the copy framebuffer when enabled

2020-05-19 Thread Simon Glass
This framebuffer is separately mapped. Update the video post-probe function to set this up. Signed-off-by: Simon Glass --- drivers/video/video-uclass.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 9fbaa8db10..0c97377ea9

[PATCH 09/26] video: Add support for copying to a hardware framebuffer

2020-05-19 Thread Simon Glass
Some architectures use a cached framebuffer and flush the cache as needed so that changes are visible. This is supported by U-Boot. However x86 uses an uncached framebuffer with a 'write-combining' feature to speed up writes. Reads are permitted but they are extremely expensive. Unfortunately, r

[PATCH 07/26] video: Drop unnecessary #ifdef around vid_console_color()

2020-05-19 Thread Simon Glass
All of the functions in this file only apply if DM_VIDEO is enabled. Drop the #ifdef as it just clutters things up. Add the needed forward declaration. Signed-off-by: Simon Glass --- include/video_console.h | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/video_

[PATCH 02/26] console: Add a way to output to serial only

2020-05-19 Thread Simon Glass
In the video drivers it is useful to print errors while debugging but doing so risks an infinite loop as the debugging info itself may go through the video drivers. Add a new console function that prints information only to the serial device, thus making it safe for use in debugging. Signed-off-b

[PATCH 08/26] video: Add a comment for struct video_uc_platdata

2020-05-19 Thread Simon Glass
Add a few notes to explain the purpose of each member of this struct. Signed-off-by: Simon Glass --- include/video.h | 12 1 file changed, 12 insertions(+) diff --git a/include/video.h b/include/video.h index e7c58e86cb..813b5653b0 100644 --- a/include/video.h +++ b/include/video.

[PATCH 06/26] video: Adjust rotated console to start at right edge

2020-05-19 Thread Simon Glass
At present when the console is rotated 180 degrees it starts almost a whole character to the left of the right edge (typically 7 pixels with an 8-pixel-wide font). On a display which aligns with the font width, this just wastes space. On a display that does not this can result in x_frac going negat

[PATCH 04/26] sandbox: video: Allow selection of rotated console

2020-05-19 Thread Simon Glass
Add a devicetree property to select a rotated console. This uses the same encoding as vidconsole itself: 0=normal; 1=90 degrees clockwise, 2=upside down, 3=90 degrees anticlockwise. Signed-off-by: Simon Glass --- drivers/video/sandbox_sdl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dr

[PATCH 03/26] video: Show an error when a vidconsole function fails

2020-05-19 Thread Simon Glass
At present these functions fail silently even when debugging, which is not very helpful. Add a way to print a message to the serial output when an error is detected. Signed-off-by: Simon Glass --- drivers/video/vidconsole-uclass.c | 22 +++--- 1 file changed, 19 insertions(+), 3

[PATCH 05/26] video: Split out expression parts into variables

2020-05-19 Thread Simon Glass
The functions in this file do similar things but not always in the same way. To make the code easier to read and compare, use a separate 'linenum' variable in every function. This is then multiplied by the line length to get the offset within the frame buffer to modify. Also use an 'x' variable to

Re: U-Boot DM device tree and Linux device tree - what are the differences and why?

2020-05-19 Thread Rudolf J Streif
Hi Fabio On 5/19/20 5:23 AM, Fabio Estevam wrote: > Hi Rudolf, > > On Tue, May 19, 2020 at 1:28 AM Rudolf J Streif > wrote: >> I solved the problem with u-boot not recognizing the eMMC. The device >> tree is working now for u-boot. >> >> However, i.MX6 is using SPL which is loaded into OCRAM. If

[PATCH 01/26] x86: fsp: Reinit the FPU after FSP meminit

2020-05-19 Thread Simon Glass
The APL FSP appears to leave the FPU in a bad state in that it has registers in use. This causes an error when the next FPU operation is performed. Work around this by re-resetting the FPU after calling FSP-M. This allows the freetype console to work correctly. Signed-off-by: Simon Glass --- a

[PATCH 00/26] x86: video: Speed up the framebuffer

2020-05-19 Thread Simon Glass
Some architectures use a cached framebuffer and flush the cache as needed so that changes are visible. This is supported by U-Boot. However x86 uses an uncached framebuffer with a 'write-combining' feature to speed up writes. Reads are permitted but they are extremely expensive. Unfortunately, re

Re: [PATCH v2 1/2] spi: call WATCHDOG_RESET() in spi_nor_wait_till_ready_with_timeout()

2020-05-19 Thread Rasmus Villemoes
On 20/03/2020 11.14, Rasmus Villemoes wrote: > I have a board for which doing "sf erase 0x10 0x8" > consistently causes the external watchdog circuit to reset the > board. Make sure to pet the watchdog during slow operations such as > erasing or writing large areas of a spi nor flash. Ping

Re: [PATCH 2/2] thermal: imx_scu_thermal: fix getting DT alert property value

2020-05-19 Thread Anatolij Gustschin
On Tue, 19 May 2020 11:45:55 + Peng Fan peng@nxp.com wrote: ... > Do you have more insights about uclass_get_device and > uclass_get_device_byname? > uclass_get_device not work, but uclass_get_device_byname work. well, we have three thermal uclass devices on i.MX8QXP: thermal 0 [

[PATCH v2 10/10] test: dm: rtc: add tests of rtc shell command

2020-05-19 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- test/dm/rtc.c | 61 +++ 1 file changed, 61 insertions(+) diff --git a/test/dm/rtc.c b/test/dm/rtc.c index 5301805d19..d1d8ff0375 100644 --- a/test/dm/rtc.c +++ b/test/dm/rtc.c @@ -5,6 +5,7 @@ */ #include +#

[PATCH v2 07/10] rtc: sandbox-rtc: fix set method

2020-05-19 Thread Rasmus Villemoes
The current set method is broken; a simple test case is to first set the date to something in April, then change the date to 31st May: => date 040412122020.34 Date: 2020-04-04 (Saturday)Time: 12:12:34 => date 053112122020.34 Date: 2020-05-01 (Friday)Time: 12:12:34 or via the amending of t

[PATCH v2 09/10] test: dm: rtc: add test of rtc_read, rtc_write

2020-05-19 Thread Rasmus Villemoes
Define a few aux registers and check that they can be read/written individually. Also check that one can access the time-keeping registers directly and get the expected results. Signed-off-by: Rasmus Villemoes --- arch/sandbox/include/asm/rtc.h | 5 test/dm/rtc.c | 45

  1   2   3   >