Re: [BUG] sandbox: './u-boot -l ' fails

2020-09-27 Thread Heinrich Schuchardt
Am 28. September 2020 06:24:38 MESZ schrieb Simon Glass : >Hi Heinrich, > >On Sat, 19 Sep 2020 at 13:48, Heinrich Schuchardt >wrote: >> >> Hello Simon, >> >> when I try to run ./u-boot -l the sandbox stalls. Shouldn't it run >out >> of the box? >> >> $ ./u-boot -l -d arch/sandbox/dts/sandbox.dtb

[PATCH 32/32] x86: fsp: Adjust calculations for MTRR range and DRAM top

2020-09-27 Thread Simon Glass
At present the top of available DRAM is the same as the top of the range of the low-memory MTRR. In fact, U-Boot is allowed to use memory up until the start of the FSP reserved memory. Use that value for low_end, since it makes more memory available. Keep the same calculation as before for

[PATCH 31/32] x86: pinctrl: Silence the warning when a pin is not found

2020-09-27 Thread Simon Glass
This does not necessarily indicate a problem, since some pins are optional. Let the caller show an error if necessary. Signed-off-by: Simon Glass --- drivers/pinctrl/intel/pinctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/intel/pinctrl.c

[PATCH 21/32] x86: acpi: Put the generated code first in DSDT

2020-09-27 Thread Simon Glass
The current implementation for DSDT tables is not correct for the case where there is generated code, as the length ends up being incorrect. Also, we want the generated code to go first in the table. Rewrite this piece to correct these problems. Signed-off-by: Simon Glass ---

[PATCH 28/32] x86: Silence some logging statements

2020-09-27 Thread Simon Glass
Quite a few log_info() calls are included in the x86 code which should use log_debug() instead. Convert them to reduce unwanted output. Signed-off-by: Simon Glass --- arch/x86/cpu/apollolake/fsp_s.c| 8 arch/x86/cpu/intel_common/intel_opregion.c | 2 +-

[PATCH 22/32] acpi: Don't reset the tables with every new generation

2020-09-27 Thread Simon Glass
At present if SSDT and DSDT code is created, only the latter is retained for examination by the 'acpi items' command. Fix this by only resetting the list when explicitly requested. Signed-off-by: Simon Glass --- arch/x86/lib/acpi_table.c | 1 + drivers/core/acpi.c | 10 ++

[PATCH 30/32] x86: acpi: Don't show the UART address by default

2020-09-27 Thread Simon Glass
This is useful when using Linux's earlycon since the MMIO address must be provided on some platforms, e.g.: earlycon=uart8250,mmio32,0xddffc000,115200n8 However this is only for debugging, so don't show it by default. Signed-off-by: Simon Glass --- arch/x86/lib/acpi_table.c | 2 +- 1 file

[PATCH 26/32] x86: Boot coral into Chrome OS by default

2020-09-27 Thread Simon Glass
Add a script to boot Chrome OS from the internal MMC. This involved adding a few commands and options. Signed-off-by: Simon Glass --- configs/chromebook_coral_defconfig | 10 +++--- include/configs/chromebook_coral.h | 9 - 2 files changed, 15 insertions(+), 4 deletions(-) diff

[PATCH 27/32] x86: fsp: Convert fsp_dram to use log_debug()

2020-09-27 Thread Simon Glass
Use log_debug() instead of debug() in this file, to enable the extra features. Signed-off-by: Simon Glass --- arch/x86/lib/fsp2/fsp_dram.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/x86/lib/fsp2/fsp_dram.c b/arch/x86/lib/fsp2/fsp_dram.c index

[PATCH 29/32] x86: acpi: Include the TPMv1 table only if needed

2020-09-27 Thread Simon Glass
This table is not needed if a v2 TPM is in use. Add a condition to avoid adding it when not needed. Signed-off-by: Simon Glass --- arch/x86/lib/acpi_table.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/arch/x86/lib/acpi_table.c

[PATCH 25/32] x86: Set up Chrome OS to boot into developer mode

2020-09-27 Thread Simon Glass
Set up a few fields necessarily to make Chrome OS boot without showing a firmware error. Signed-off-by: Simon Glass --- arch/x86/cpu/apollolake/acpi.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/arch/x86/cpu/apollolake/acpi.c

[PATCH 20/32] x86: acpi: Allow the SSDT to be empty

2020-09-27 Thread Simon Glass
If there is nothing in the SSDT we should not include it in the tables. Update the implementation to check this. Signed-off-by: Simon Glass --- arch/x86/lib/acpi_table.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/arch/x86/lib/acpi_table.c

[PATCH 23/32] x86: Define the Chrome OS GNVS region

2020-09-27 Thread Simon Glass
It is not possible to boot Chrome OS properly without passing some basic information from U-Boot. This applies even if verified boot is not being used. Add a structure definition for this. Signed-off-by: Simon Glass --- arch/x86/include/asm/intel_gnvs.h | 49 +++ 1

[PATCH 19/32] acpi: Correct reset handling in acpi_device_add_power_res()

2020-09-27 Thread Simon Glass
If there is no reset line, this still emits ACPI code for the reset GPIO. Fix it by updating the check. Signed-off-by: Simon Glass --- lib/acpi/acpi_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/acpi/acpi_device.c b/lib/acpi/acpi_device.c index

[PATCH 24/32] x86: Use CONFIG_CHROMEOS_VBOOT for verified boot

2020-09-27 Thread Simon Glass
At present CONFIG_CHROMEOS is used to determine whether verified boot is in use. The code to implement that is not in U-Boot mainline. However, it is useful to be able to boot a Chromebook in developer mode in U-Boot mainline without needing the verified boot code. To allow this, use

[PATCH 17/32] x86: Show the interrupt pointer with 'irqinfo'

2020-09-27 Thread Simon Glass
It is useful for this command to show the address of the interrupt table. Add support for this. Signed-off-by: Simon Glass --- arch/x86/cpu/i386/interrupt.c| 14 +++--- arch/x86/include/asm/interrupt.h | 17 + arch/x86/lib/interrupts.c| 3 +++ 3 files

[PATCH 18/32] x86: sound: Correct error handling

2020-09-27 Thread Simon Glass
A few functions have changed to return pin numbers or I2C addresses. The error checking for some of the callers is therefore wrong. Fix them. Signed-off-by: Simon Glass --- drivers/sound/da7219.c| 4 ++-- drivers/sound/max98357a.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)

[PATCH 13/32] x86: Use if instead of #ifdef in write_tables()

2020-09-27 Thread Simon Glass
Use if() to remove the extra build path in this code. Signed-off-by: Simon Glass --- arch/x86/lib/tables.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/arch/x86/lib/tables.c b/arch/x86/lib/tables.c index 43b61a7aeac..62be6746282

[PATCH 16/32] x86: nhlt: Fix a few bugs in the table generation

2020-09-27 Thread Simon Glass
At present these tables do not have the correct header, and there is an occasional incorrect value due to uninited data. Fix these bugs. Signed-off-by: Simon Glass --- arch/x86/lib/acpi_nhlt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/lib/acpi_nhlt.c

[PATCH 15/32] x86: nhlt: Correct output of bytes and 16-bit data

2020-09-27 Thread Simon Glass
At present these functions are incorrect. Fix them and add some logging and checking to avoid future problems. Signed-off-by: Simon Glass --- arch/x86/lib/acpi_nhlt.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/x86/lib/acpi_nhlt.c

[PATCH 14/32] x86: Allow putting some tables in the bloblist

2020-09-27 Thread Simon Glass
At present all tables are placed starting at address f in memory, and can be up to 64KB in size. If the tables are very large, this may not provide enough space. Also if the tables point to other tables (such as console log or a ramoops area) then we must allocate other memory anyway. The

[PATCH 12/32] x86: Move ROM_TABLE_ADDR into the C file

2020-09-27 Thread Simon Glass
At present this is defined in the header file, along with a few related defines. The code that used to need this has been removed. Move it into the C file instead. Signed-off-by: Simon Glass --- arch/x86/include/asm/tables.h | 8 arch/x86/lib/tables.c | 8 2 files

[PATCH 10/32] x86: Add SMBIOS info for Coral

2020-09-27 Thread Simon Glass
This is required by Chrome OS so that the audio and other unibuild features work correctly. Add it. Signed-off-by: Simon Glass --- arch/x86/dts/chromebook_coral.dts | 8 1 file changed, 8 insertions(+) diff --git a/arch/x86/dts/chromebook_coral.dts

[PATCH 09/32] x86: coral: Drop the duplicate PCIe settings

2020-09-27 Thread Simon Glass
These settings are included twice. The second lot are correct, so drop the others. Signed-off-by: Simon Glass Reported-by: Wolfgang Wallner --- arch/x86/dts/chromebook_coral.dts | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/dts/chromebook_coral.dts

[PATCH 11/32] x86: coral: Correct max98357 file

2020-09-27 Thread Simon Glass
This somehow ended up as an empty file. Fix it. Signed-off-by: Simon Glass --- .../max98357-render-2ch-48khz-24b.dat | Bin 0 -> 116 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/board/google/chromebook_coral/max98357-render-2ch-48khz-24b.dat

[PATCH 07/32] x86: Store the FADT so we can avoid searching for it

2020-09-27 Thread Simon Glass
Put the FADT in global_data and access it as needed. Drop the functions which search for it. Signed-off-by: Simon Glass --- arch/x86/cpu/cpu.c | 6 ++-- arch/x86/include/asm/acpi.h | 9 -- arch/x86/lib/acpi.c | 57 -

[PATCH 08/32] x86: Don't bother clearing global NVS

2020-09-27 Thread Simon Glass
The bloblist guarantees that blobs are zeroed so there is no need to do an additional memset(). Drop it. Signed-off-by: Simon Glass --- arch/x86/cpu/intel_common/acpi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/cpu/intel_common/acpi.c b/arch/x86/cpu/intel_common/acpi.c index

[PATCH 05/32] x86: Allow writing tables to fail

2020-09-27 Thread Simon Glass
At present write_tables() can fail but does not report this problem to its caller. Fix this by changing the return type. Signed-off-by: Simon Glass --- arch/x86/cpu/cpu.c| 7 ++- arch/x86/include/asm/tables.h | 4 +++- arch/x86/lib/tables.c | 5 - 3 files changed,

[PATCH 06/32] x86: acpi: Store the ACPI context in global_data

2020-09-27 Thread Simon Glass
At present we create the ACPI context but then drop it after generation of tables is complete. This is annoying because we have to then search for tables later. To fix this, allocate the context and store it in global_data. Signed-off-by: Simon Glass --- arch/x86/lib/acpi_table.c | 7

[PATCH 03/32] x86: Add a layout for Chrome OS verified boot

2020-09-27 Thread Simon Glass
Add definitions for part of the vboot context used with verified boot. Signed-off-by: Simon Glass --- arch/x86/include/asm/acpi/vbnv_layout.h | 38 + 1 file changed, 38 insertions(+) create mode 100644 arch/x86/include/asm/acpi/vbnv_layout.h diff --git

[PATCH 04/32] x86: Add support for private files

2020-09-27 Thread Simon Glass
Some boards need to include binary data into the image for use during the boot process. Add a node for these. An example is the audio-codec configuration used by some audio drivers on Intel platforms. If no private files are provided, they will be omitted. Signed-off-by: Simon Glass ---

[PATCH 02/32] x86: apl: Add core init for the SoC

2020-09-27 Thread Simon Glass
Set up MSRs required for Apollo Lake. This enables Linux to use the timers correctly. Also write the fixed MSRs for this platform. Signed-off-by: Simon Glass --- arch/x86/cpu/apollolake/cpu.c | 84 ++ arch/x86/cpu/apollolake/cpu_common.c | 25 +++

Re: [PATCH v2 2/2] pwm: Add a driver for Chrome OS EC PWM

2020-09-27 Thread Simon Glass
On Sat, 26 Sep 2020 at 14:09, Alper Nebi Yasak wrote: > > This PWM is used in rk3399-gru-bob and rk3399-gru-kevin to control > the display brightness. We can only change the duty cycle, so on > set_config() we just try to match the duty cycle that dividing duty_ns > by period_ns gives us. To

Re: [PATCH v3 3/3] doc: global data pointer

2020-09-27 Thread Simon Glass
On Sun, 27 Sep 2020 at 06:41, Heinrich Schuchardt wrote: > > Add the description of the global data pointer to the generated HTML > documentation. > > Signed-off-by: Heinrich Schuchardt > --- > v3: > x86 uses register fs for global data pointer > v2: > no change > --- >

[PATCH 00/32] x86: Allow Coral to boot into Chrome OS

2020-09-27 Thread Simon Glass
This series adds various minor features and tweaks to allow Coral to boot into Chrome OS from U-Boot. It relies on three other series which have been recently sent: - smbios (u-boot-dm/smbios-working) - bootm (u-boot-dm/bootm-working) - misca (u-boot-dm/misca-working) This should

Re: [PATCH v2 1/2] video: backlight: Support PWMs without a known period_ns

2020-09-27 Thread Simon Glass
On Sat, 26 Sep 2020 at 14:09, Alper Nebi Yasak wrote: > > The PWM device provided by Chrome OS EC doesn't really support anything > other than setting a relative duty cycle. To support it as a backlight, > this patch makes the PWM period optional in the device tree and pretends > the valid

[PATCH 01/32] Add an assembly guard around linux/bitops.h

2020-09-27 Thread Simon Glass
This file can be included by any header but it includes C code. Guard it to avoid errors when compiling ASL, etc. Signed-off-by: Simon Glass --- include/linux/bitops.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/bitops.h b/include/linux/bitops.h index

Re: [BUG] sandbox: './u-boot -l ' fails

2020-09-27 Thread Simon Glass
Hi Heinrich, On Sat, 19 Sep 2020 at 13:48, Heinrich Schuchardt wrote: > > Hello Simon, > > when I try to run ./u-boot -l the sandbox stalls. Shouldn't it run out > of the box? > > $ ./u-boot -l -d arch/sandbox/dts/sandbox.dtb For the record you should be able to use -D to get the same effect as

Re: [PATCH v4 8/9] binman: Add support for SCP firmware

2020-09-27 Thread Simon Glass
On Sat, 12 Sep 2020 at 15:35, Samuel Holland wrote: > > Add an entry type for a firmware blob for a Sytem Control Processor, > given by an entry arg. This firmware is a raw binary blob. > > Signed-off-by: Samuel Holland > --- > Makefile | 2 +- > tools/binman/etype/scp.py

Re: chromebook_coral.dts: multiple FSP-S entries for same parameters

2020-09-27 Thread Simon Glass
Hi Wolfgang, On Thu, 10 Sep 2020 at 08:00, Wolfgang Wallner wrote: > > Hi Simon, > > chromebook_coral.dts contains multiple entries of fsps,pcie-root-port-en > and fsps,pcie-rp-hot-plug. > > I don't think this is intentional, as the code parsing the FSP-S settings will > only use one of those

Re: [PATCH] log: Allow LOG_DEBUG to always enable log output

2020-09-27 Thread Simon Glass
Hi, On Wed, 5 Aug 2020 at 13:32, Tom Rini wrote: > > On Wed, Aug 05, 2020 at 09:08:40PM +0200, Heinrich Schuchardt wrote: > > Am 5. August 2020 21:03:28 MESZ schrieb Tom Rini : > > >On Wed, Aug 05, 2020 at 12:56:17PM -0600, Simon Glass wrote: > > >> Hi Tom, > > >> > > >> On Wed, 5 Aug 2020 at

Re: [PATCH] Kconfig: Use hex values for CONFIG_{SPL,TPL}_SIZE_LIMIT

2020-09-27 Thread Simon Glass
Hi Ovidiu, On Fri, 25 Sep 2020 at 12:15, Ovidiu Panait wrote: > > CONFIG_{SPL,TPL}_SIZE_LIMIT are defined as hex (SPL_SIZE_LIMIT was > converted in b51882d0 ("spl: Convert CONFIG_SPL_SIZE_LIMIT to hex"), but > there are still places that reference integer values. Change those to hex > as well.

Re: [PATCH 11/12] i2c: designware: Use log_debug() for debugging

2020-09-27 Thread Heiko Schocher
Hello Simon, Am 28.09.2020 um 02:46 schrieb Simon Glass: We don't want the debug output to be visible in a normal boot. Silence it. Signed-off-by: Simon Glass --- drivers/i2c/designware_i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Heiko Schocher bye,

Re: [PATCH v5 2/9] timer: Add helper for drivers using timebase fallback

2020-09-27 Thread Rick Chen
Hi Sean > This function is designed to be used when a timer used to be initialized by > the cpu (e.g. RISC-V timers), but now is initialized by dm_timer_init. In > such a case, the timer may prefer to use the clocks and clock-frequency > properties, but should be able to fall back on using the

Re: [patch 1/8] RFC: drivers/video/rockchip/rk_vop.c: Use endpoint compatible string to find VOP mode

2020-09-27 Thread Kever Yang
Add Andy for this patch review. Thanks, - Kever On 2020/9/26 上午2:36, Arnaud Patard (Rtp) wrote: The current code is using an hard coded enum and the of node reg value of endpoint to find out if the endpoint is mipi/hdmi/lvds/edp/dp. The order is different between rk3288, rk3399 vop little,

Re: [PATCH v2 27/46] phy: rockchip: Fix not calling dev_err with a device

2020-09-27 Thread Kever Yang
On 2020/9/15 下午10:45, Sean Anderson wrote: Get the device from phy, or pass the phy in. Signed-off-by: Sean Anderson Reviewed-by: Kever Yang Thanks, - Kever --- Changes in v2: - New drivers/phy/rockchip/phy-rockchip-pcie.c | 14 +++---

Re: [PATCH v2 0/7] rockchip: Add Engicam PX30.Core support

2020-09-27 Thread Kever Yang
Hi Suniel,     Seems like the comments in V1 does not addressed.     And for the DRAM support, all the DRAM type driver for PX30 has been support, what's the reason you can't add DRAM support in TPL for this board? Thanks, - Kever On 2020/9/14 下午11:36, Suniel Mahesh wrote: PX30.Core is

Re: [PATCH next v7 00/10] Add support MediaTek USB3 DRD driver

2020-09-27 Thread Chunfeng Yun
Hi Marek, On Mon, 2020-09-28 at 04:12 +0200, Marek Vasut wrote: > On 9/28/20 4:01 AM, Chunfeng Yun wrote: > [...] > >> create mode 100644 drivers/usb/mtu3/mtu3_core.c > >> create mode 100644 drivers/usb/mtu3/mtu3_dr.h > >> create mode 100644 drivers/usb/mtu3/mtu3_gadget.c > >> create mode

Re: [PATCH next v7 00/10] Add support MediaTek USB3 DRD driver

2020-09-27 Thread Marek Vasut
On 9/28/20 4:01 AM, Chunfeng Yun wrote: [...] >> create mode 100644 drivers/usb/mtu3/mtu3_core.c >> create mode 100644 drivers/usb/mtu3/mtu3_dr.h >> create mode 100644 drivers/usb/mtu3/mtu3_gadget.c >> create mode 100644 drivers/usb/mtu3/mtu3_gadget_ep0.c >> create mode 100644

Re: [PATCH 2/2] rockchip: dts: tinker: remove unnecessary node

2020-09-27 Thread Kever Yang
On 2020/9/4 下午10:11, Stefan Agner wrote: The property reg-shift with the same value is present in the base device tree already. Remove unnecessary node from rk3288-tinker.dts. Signed-off-by: Stefan Agner Reviewed-by: Kever Yang Thanks, - Kever --- arch/arm/dts/rk3288-tinker.dts |

Re: [PATCH 1/2] rockchip: dts: tinker: move i2c node to shared device tree

2020-09-27 Thread Kever Yang
On 2020/9/4 下午10:11, Stefan Agner wrote: The I2C EEPROM is present on Tinker Board S as well. Move the i2c node to the shared, U-Boot specific rk3288-tinker-u-boot.dtsi device tree. Cc: Jonas Karlman Signed-off-by: Stefan Agner Reviewed-by: Kever Yang Thanks, - Kever ---

Re: [PATCH] clk: rockchip: rk3399: implement getting wdt/alive clocks

2020-09-27 Thread Kever Yang
On 2020/9/17 下午5:42, Jack Mitchell wrote: In order to correctly calculate the designware watchdog timeouts, the watchdog clock is required. Implement required clocks to facilitate this. Signed-off-by: Jack Mitchell Reviewed-by: Kever Yang Thanks, - Kever ---

Re: [PATCH next v7 00/10] Add support MediaTek USB3 DRD driver

2020-09-27 Thread Chunfeng Yun
Hi Marek, Lukasz Any comments on this patch series? Thanks a lot On Fri, 2020-09-18 at 17:10 +0800, Chunfeng Yun wrote: > These patches introduce the MediaTek USB3 Dual-Role Controller > driver. > The driver can be configured as Peripheral only and Host only(xHCI) > modes, and it's ported

Re: [PATCH 09/12] log: Fix the comment for struct log_driver()

2020-09-27 Thread Heinrich Schuchardt
Am 28. September 2020 02:46:21 MESZ schrieb Simon Glass : >This is missing a comment for the 'emit' member. Add it. > >Signed-off-by: Simon Glass >--- > > include/log.h | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/include/log.h b/include/log.h >index dc1b6b5e4c6..b49f5c99859 100644 >---

Re: [PATCH 01/12] log: Add missing category names

2020-09-27 Thread Heinrich Schuchardt
Am 28. September 2020 02:46:13 MESZ schrieb Simon Glass : >Add some category names that were missed in recent changes. Update the >comment as a reminder. > >Signed-off-by: Simon Glass >--- > > common/log.c | 5 + > include/log.h | 4 +++- > 2 files changed, 8 insertions(+), 1 deletion(-) >

SPI bus not probed

2020-09-27 Thread Michal Suchánek
Hello, When I enable SPI support I do not get a SPI bus. Config: --- a/configs/orangepi_zero_defconfig +++ b/configs/orangepi_zero_defconfig @@ -11,3 +11,21 @@ CONFIG_CONSOLE_MUX=y CONFIG_SUN8I_EMAC=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_OHCI_HCD=y +CONFIG_SPI=y +CONFIG_DM_SPI=y

[PATCH 08/12] binman: Support multiple images in the library

2020-09-27 Thread Simon Glass
Add support for multiple images, since these are used on x86 now. Select the first image for now, since that is generally the correct one. At some point we can add a way to determine which image is currently running. Signed-off-by: Simon Glass --- lib/binman.c | 7 +++ 1 file changed, 7

[PATCH 10/12] board: Show memory for frame buffers

2020-09-27 Thread Simon Glass
When debugging is enabled, show the memory allocated to video frame buffers. Signed-off-by: Simon Glass --- common/board_f.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/board_f.c b/common/board_f.c index e99277d7e88..9f441c44f17 100644 --- a/common/board_f.c +++

[PATCH 12/12] tpm: cr50: Correct logging statements

2020-09-27 Thread Simon Glass
Fix up some logging statements in this file. Most of them should use log_debug(), apart from one error. Signed-off-by: Simon Glass --- drivers/tpm/cr50_i2c.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/tpm/cr50_i2c.c b/drivers/tpm/cr50_i2c.c index

[PATCH 09/12] log: Fix the comment for struct log_driver()

2020-09-27 Thread Simon Glass
This is missing a comment for the 'emit' member. Add it. Signed-off-by: Simon Glass --- include/log.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/log.h b/include/log.h index dc1b6b5e4c6..b49f5c99859 100644 --- a/include/log.h +++ b/include/log.h @@ -304,6 +304,7 @@ struct

[PATCH 11/12] i2c: designware: Use log_debug() for debugging

2020-09-27 Thread Simon Glass
We don't want the debug output to be visible in a normal boot. Silence it. Signed-off-by: Simon Glass --- drivers/i2c/designware_i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/designware_i2c.c b/drivers/i2c/designware_i2c.c index

[PATCH 06/12] bloblist: Place on a 4KB boundary

2020-09-27 Thread Simon Glass
It is much easier to read the bloblist addresses if it starts on a 4KB boundary. Update it to align it accordingly. Signed-off-by: Simon Glass --- common/board_f.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/board_f.c b/common/board_f.c index

[PATCH 07/12] binman: Add a way to read the ROM offset

2020-09-27 Thread Simon Glass
Provide a function to read the ROM offset so that we can store the value in one place and clients don't need to store it themselves after calling binman_set_rom_offset(). Signed-off-by: Simon Glass --- include/binman.h | 7 +++ lib/binman.c | 7 ++- 2 files changed, 13

[PATCH 03/12] x86: zimage: Sanity-check the kernel version before printing it

2020-09-27 Thread Simon Glass
With Chrome OS the kernel setup block is stored in a separate place from the kernel, so it is not possible to access the kernel version string. At present, garbage is printed. Add a sanity check to avoid this. Signed-off-by: Simon Glass --- arch/x86/lib/zimage.c | 9 + 1 file changed,

[PATCH 04/12] x86: zimage: Quieten down the zimage boot process

2020-09-27 Thread Simon Glass
Much of the output is not very useful. The bootm command is quite a bit quieter. Convert some output to use log_debug(). Signed-off-by: Simon Glass --- arch/x86/lib/zimage.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/x86/lib/zimage.c

[PATCH 00/12] Various minor patches

2020-09-27 Thread Simon Glass
This series contains a number of minor patches collected while completing the ACPI updates for U-Boot. Simon Glass (12): log: Add missing category names x86: zimage: Add a little more logging x86: zimage: Sanity-check the kernel version before printing it x86: zimage: Quieten down the

[PATCH 01/12] log: Add missing category names

2020-09-27 Thread Simon Glass
Add some category names that were missed in recent changes. Update the comment as a reminder. Signed-off-by: Simon Glass --- common/log.c | 5 + include/log.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/common/log.c b/common/log.c index 9a5f100da34..38336d84e3c

[PATCH 02/12] x86: zimage: Add a little more logging

2020-09-27 Thread Simon Glass
Add logging for each part of the boot process, using a new Signed-off-by: Simon Glass --- arch/x86/lib/zimage.c | 6 ++ common/log.c | 1 + include/log.h | 1 + 3 files changed, 8 insertions(+) diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index

[PATCH 05/12] syscon: Drop the logging in syscon_get_by_driver_data()

2020-09-27 Thread Simon Glass
This function can be called when it is not known whether it will find anything. This results in confusing log messages if the device is not found. It is better for the caller to log the failure, if necessary. Drop the logging from this function. Signed-off-by: Simon Glass ---

Re: [PATCH 2/2] watchdog: add watchdog behavior configuration

2020-09-27 Thread Michael Walle
Am 2020-09-26 14:44, schrieb Tom Rini: [..] If we want to have a hardware based watchdog in the UEFI context, we need a U-Boot internal API by which we can enable and disable a hardware watchdog with an arbitrary duration (>> 5 min) with 1 second resolution. Then our implementation of

Re: [PATCH v2] log: Allow LOG_DEBUG to always enable log output

2020-09-27 Thread Simon Glass
+Tom Rini too On Sun, 27 Sep 2020 at 09:55, Simon Glass wrote: > > At present if CONFIG_LOG enabled, putting LOG_DEBUG at the top of a file > (before log.h inclusion) causes _log() to be executed for every log() > call, regardless of the build- or run-time logging level. > > However there is no

[PATCH v2] log: Allow LOG_DEBUG to always enable log output

2020-09-27 Thread Simon Glass
At present if CONFIG_LOG enabled, putting LOG_DEBUG at the top of a file (before log.h inclusion) causes _log() to be executed for every log() call, regardless of the build- or run-time logging level. However there is no guarantee that the log record will actually be displayed. If the current log

Re: [patch 0/8] RFC: Pinebook pro EDP support

2020-09-27 Thread Alper Nebi Yasak
On 25/09/2020 21:36, Arnaud Patard (Rtp) wrote: > This patchset add support for the rk3399 edp. It has been tested on the > pinebook > pro devices. The only missing part is a hack used to get stable edp output > after > a warn reset, which is possibly specific to this device. I'm not sure if

Re: [PATCH v2 2/2] pwm: Add a driver for Chrome OS EC PWM

2020-09-27 Thread Alper Nebi Yasak
On 27/09/2020 12:29, Arnaud Patard (Rtp) wrote: > Peter Robinson writes: >> A quick look at the Linux DT for the GRU Chromebooks and it looks like >> the panels are also attached via EDP like on the Pinebook Pro so this >> patch series adding initial support for the rk3399 EDP might be of use >>

[PATCH 4/4] smbios: Add documentation and devicetree binding

2020-09-27 Thread Simon Glass
Add information about how to set SMBIOS properties using the devicetree. Signed-off-by: Simon Glass --- doc/arch/x86.rst | 8 + doc/device-tree-bindings/board/board_x86.txt | 36 2 files changed, 44 insertions(+) create mode 100644

[PATCH 2/4] smbios: Allow properties to come from the device tree

2020-09-27 Thread Simon Glass
Support a way to put SMBIOS properties in the device tree. These can be placed in a 'board' device in an 'smbios' subnode. Signed-off-by: Simon Glass --- lib/smbios.c | 55 ++-- 1 file changed, 49 insertions(+), 6 deletions(-) diff --git

[PATCH 3/4] smbios: Add more properties

2020-09-27 Thread Simon Glass
The current tables only support a subset of the available fields defined by the SMBIOS spec. Add a few more. Signed-off-by: Simon Glass --- lib/smbios.c | 4 1 file changed, 4 insertions(+) diff --git a/lib/smbios.c b/lib/smbios.c index 1b5f43ef989..f3bbf7f02c8 100644 --- a/lib/smbios.c

[PATCH 0/4] x86: Updates to SMBIOS

2020-09-27 Thread Simon Glass
At present there are a few Kconfig options which allow SMBIOS fields to be specified at build time. Not all fields are supported. Also, defining these at build-time is limiting since a factory system cannot insert values for particular boards or models without rebuilding U-Boot. This series adds

[PATCH 1/4] x86: Pass an ofnode into each SMBIOS function

2020-09-27 Thread Simon Glass
As a first step to obtaining SMBIOS information from the devicetree, add an ofnode parameter to the writing functions. Signed-off-by: Simon Glass --- include/smbios.h | 5 - lib/smbios.c | 40 +++- 2 files changed, 27 insertions(+), 18 deletions(-)

Re: IMX8MM 4GiB boundary issue

2020-09-27 Thread Marek Vasut
On 9/27/20 4:35 AM, Peng Fan wrote: >> Subject: Re: IMX8MM 4GiB boundary issue >> >> On 9/27/20 2:56 AM, Peng Fan wrote: >> >> [...] >> > I can imagine that either the FEC/SDHCI is limited to 32bit > addressing in hardware (the DMA can only operate on 32bit range due > to it coming

Re: [PATCH 13/13] usb: ehci-mx6: Improve the bind function

2020-09-27 Thread Marek Vasut
On 9/27/20 4:38 AM, Peng Fan wrote: > Hi Marek, > >> Subject: Re: [PATCH 13/13] usb: ehci-mx6: Improve the bind function >> >> On 9/16/20 3:56 PM, Peng Fan wrote: >>> Hi Marek, >> >> Hi, >> Subject: Re: [PATCH 13/13] usb: ehci-mx6: Improve the bind function On 9/16/20 2:57 PM,

i386: GDT, global data pointer

2020-09-27 Thread Heinrich Schuchardt
Hello Bin, in arch/x86/include/asm/global_data.h #ifndef __ASSEMBLY__ # if defined(CONFIG_EFI_APP) || CONFIG_IS_ENABLED(X86_64) /* TODO(s...@chromium.org): Consider using a fixed register for gd on x86_64 */ #define gd global_data_ptr #define DECLARE_GLOBAL_DATA_PTR extern struct global_data

[PATCH 1/1] efi_loader: efidebug display RNG protocol

2020-09-27 Thread Heinrich Schuchardt
Add the Random Number Generator (RNG) protocol to the GUIDs that the 'efidebug dh' protocol can replace by a text. Signed-off-by: Heinrich Schuchardt --- cmd/efidebug.c | 5 + 1 file changed, 5 insertions(+) diff --git a/cmd/efidebug.c b/cmd/efidebug.c index 9874838b00..5288b9920b 100644

[PATCH v3 2/3] global_data.h: add Sphinx documentation

2020-09-27 Thread Heinrich Schuchardt
Add the missing Sphinx documentation for struct global_data and gd_board_type(). Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- v3: no change v2: no change --- include/asm-generic/global_data.h | 354 ++ 1 file changed, 308

[PATCH v3 3/3] doc: global data pointer

2020-09-27 Thread Heinrich Schuchardt
Add the description of the global data pointer to the generated HTML documentation. Signed-off-by: Heinrich Schuchardt --- v3: x86 uses register fs for global data pointer v2: no change --- doc/develop/global_data.rst | 53 +

[PATCH v3 1/3] global_data.h: convert GD_FLG_* to enum

2020-09-27 Thread Heinrich Schuchardt
Sphinx documentation is only available for enums not for #defines. Anyway it is better to keep related definitions in an enum. Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- v3: no change v2: enum gd_flags must not be exposed to assembler code ---

[PATCH v3 0/3] doc: global data pointer

2020-09-27 Thread Heinrich Schuchardt
Add the description of the global data pointer to the generated HTML documentation. The first patch converts the GD_FLG_* constants to an enum. The second adds move Sphinx comments. The third finally provides the HTML documentation. v3: x86 uses register fs for global data pointer v2:

Re: [PATCH v2 1/1] riscv: restore global data pointer in trap handler

2020-09-27 Thread Heinrich Schuchardt
On 9/27/20 10:51 AM, Bin Meng wrote: > Hi Heinrich, > > On Sun, Sep 27, 2020 at 4:46 PM Heinrich Schuchardt > wrote: >> >> On 9/27/20 10:40 AM, Bin Meng wrote: >>> On Sun, Sep 27, 2020 at 4:24 PM Heinrich Schuchardt >>> wrote: The gp register is used to store U-Boot's global data

Re: [PATCH v2 2/2] pwm: Add a driver for Chrome OS EC PWM

2020-09-27 Thread Rtp
Peter Robinson writes: > On Sat, Sep 26, 2020 at 9:09 PM Alper Nebi Yasak > wrote: >> >> This PWM is used in rk3399-gru-bob and rk3399-gru-kevin to control >> the display brightness. We can only change the duty cycle, so on >> set_config() we just try to match the duty cycle that dividing

Re: [PATCH v2 1/1] riscv: restore global data pointer in trap handler

2020-09-27 Thread Bin Meng
Hi Heinrich, On Sun, Sep 27, 2020 at 4:46 PM Heinrich Schuchardt wrote: > > On 9/27/20 10:40 AM, Bin Meng wrote: > > On Sun, Sep 27, 2020 at 4:24 PM Heinrich Schuchardt > > wrote: > >> > >> The gp register is used to store U-Boot's global data pointer. We should > >> not assume that an UEFI

Re: [PATCH v2 1/1] riscv: restore global data pointer in trap handler

2020-09-27 Thread Heinrich Schuchardt
On 9/27/20 10:40 AM, Bin Meng wrote: > On Sun, Sep 27, 2020 at 4:24 PM Heinrich Schuchardt > wrote: >> >> The gp register is used to store U-Boot's global data pointer. We should >> not assume that an UEFI application leaves the gp register unchanged as >> the UEFI specifications does not define

Re: [PATCH v2 1/1] riscv: restore global data pointer in trap handler

2020-09-27 Thread Bin Meng
On Sun, Sep 27, 2020 at 4:24 PM Heinrich Schuchardt wrote: > > The gp register is used to store U-Boot's global data pointer. We should > not assume that an UEFI application leaves the gp register unchanged as > the UEFI specifications does not define who is the owner of the gp and tp >

[PATCH v2 1/1] riscv: restore global data pointer in trap handler

2020-09-27 Thread Heinrich Schuchardt
The gp register is used to store U-Boot's global data pointer. We should not assume that an UEFI application leaves the gp register unchanged as the UEFI specifications does not define who is the owner of the gp and tp registers. So the following sequence should be followed in the trap handler:

Re: [PATCH v2 2/2] pwm: Add a driver for Chrome OS EC PWM

2020-09-27 Thread Peter Robinson
On Sat, Sep 26, 2020 at 9:09 PM Alper Nebi Yasak wrote: > > This PWM is used in rk3399-gru-bob and rk3399-gru-kevin to control > the display brightness. We can only change the duty cycle, so on > set_config() we just try to match the duty cycle that dividing duty_ns > by period_ns gives us. To

[PATCHv2] pci: layerscape: Fixup PCIe EP mode DT nodes for LX2160A rev2

2020-09-27 Thread Zhiqiang Hou
From: Hou Zhiqiang LX2160A rev2 uses different PCIe controller, so EP mode DT nodes also need to be fixed up. Signed-off-by: Hou Zhiqiang --- V2: - Fix a dead loop issue. drivers/pci/pcie_layerscape_fixup_common.c | 28 ++ 1 file changed, 28 insertions(+) diff --git