From d99fb64a98af3bebf6b0c134291c4fb89e177aa2 Mon Sep 17 00:00:00 2001 From: Jonas Karlman Date: Mon, 21 Aug 2023 22:30:24 +0000 Subject: power: regulator: Only run autoset once for each regulator With the commit 4fcba5d556b4 ("regulator: implement basic reference counter"), keeping regulator enablement in balance become more important. Calling regulator_autoset multiple times on a fixed regulator increase the enable count for each call, resulting in an unbalanced enable count. Introduce a AUTOSET_DONE flag and use it to mark that autoset has run for the regulator. Return -EALREADY on any subsequent call to autoset. This fixes so that the enable count is only ever increased by one per regulator for autoset. Fixes: 4fcba5d556b4 ("regulator: implement basic reference counter") Signed-off-by: Jonas Karlman Reviewed-by: Kever Yang --- include/power/regulator.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/power/regulator.h b/include/power/regulator.h index ff1bfc2435a..200652cb3d7 100644 --- a/include/power/regulator.h +++ b/include/power/regulator.h @@ -134,6 +134,7 @@ struct dm_regulator_mode { enum regulator_flag { REGULATOR_FLAG_AUTOSET_UV = 1 << 0, REGULATOR_FLAG_AUTOSET_UA = 1 << 1, + REGULATOR_FLAG_AUTOSET_DONE = 1 << 2, }; /** -- cgit v1.2.3 From ce6ab56401c6f91c77bdadd3128df94b2e3f046e Mon Sep 17 00:00:00 2001 From: Manoj Sai Date: Mon, 18 Sep 2023 00:56:25 +0530 Subject: spl: fit: support for booting a GZIP-compressed U-boot binary If GZIP Compression support is enabled, GZIP compressed U-Boot binary will be at a specified RAM location which is defined at CONFIG_SYS_LOAD_ADDR and will be assign it as the source address. gunzip function in spl_load_fit_image ,will decompress the GZIP compressed U-Boot binary which is placed at source address(CONFIG_SYS_LOAD_ADDR) to the default CONFIG_SYS_TEXT_BASE location. spl_load_fit_image function will load the decompressed U-Boot binary, which is placed at the CONFIG_SYS_TEXT_BASE location. Signed-off-by: Manoj Sai Signed-off-by: Suniel Mahesh Reviewed-by: Kever Yang Reviewed-by: Simon Glass Reviewed-by: Tom Rini --- include/spl.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') diff --git a/include/spl.h b/include/spl.h index 0fedddd00ef..320ed942739 100644 --- a/include/spl.h +++ b/include/spl.h @@ -897,4 +897,14 @@ struct legacy_img_hdr *spl_get_load_buffer(ssize_t offset, size_t size); void board_boot_order(u32 *spl_boot_list); void spl_save_restore_data(void); + +/* + * spl_decompression_enabled() - check decompression support is enabled for SPL build + * + * Returns true if decompression support is enabled, else False + */ +static inline bool spl_decompression_enabled(void) +{ + return IS_ENABLED(CONFIG_SPL_GZIP); +} #endif -- cgit v1.2.3 From a1b7fd7f0af2bf342ec4899be3dda72e02d29c1e Mon Sep 17 00:00:00 2001 From: Manoj Sai Date: Mon, 18 Sep 2023 00:56:26 +0530 Subject: spl: fit: support for booting a LZMA-compressed U-boot binary If LZMA Compression support is enabled, LZMA compressed U-Boot binary will be placed at a specified RAM location which is defined at CONFIG_SYS_LOAD_ADDR and will be assigned as the source address. image_decomp() function, will decompress the LZMA compressed U-Boot binary which is placed at source address(CONFIG_SYS_LOAD_ADDR) to the default CONFIG_SYS_TEXT_BASE location. spl_load_fit_image function will load the decompressed U-Boot binary, which is placed at the CONFIG_SYS_TEXT_BASE location. Signed-off-by: Manoj Sai Signed-off-by: Suniel Mahesh Reviewed-by: Simon Glass Reviewed-by: Kever Yang Reviewed-by: Tom Rini --- include/spl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/spl.h b/include/spl.h index 320ed942739..f62f385afaf 100644 --- a/include/spl.h +++ b/include/spl.h @@ -905,6 +905,6 @@ void spl_save_restore_data(void); */ static inline bool spl_decompression_enabled(void) { - return IS_ENABLED(CONFIG_SPL_GZIP); + return IS_ENABLED(CONFIG_SPL_GZIP) || IS_ENABLED(CONFIG_SPL_LZMA); } #endif -- cgit v1.2.3 From 74273f1d9c88f0ed4a05048bd42d599726fa69b5 Mon Sep 17 00:00:00 2001 From: FUKAUMI Naoki Date: Tue, 5 Sep 2023 20:47:35 +0900 Subject: arm: dts: rockchip: sync DT for RK3588 series with Linux Sync the device tree for RK3588 series with Linux 6.6-rc1. Signed-off-by: FUKAUMI Naoki Reviewed-by: Kever Yang --- include/dt-bindings/ata/ahci.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 include/dt-bindings/ata/ahci.h (limited to 'include') diff --git a/include/dt-bindings/ata/ahci.h b/include/dt-bindings/ata/ahci.h new file mode 100644 index 00000000000..b3f3b7cf9af --- /dev/null +++ b/include/dt-bindings/ata/ahci.h @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */ +/* + * This header provides constants for most AHCI bindings. + */ + +#ifndef _DT_BINDINGS_ATA_AHCI_H +#define _DT_BINDINGS_ATA_AHCI_H + +/* Host Bus Adapter generic platform capabilities */ +#define HBA_SSS (1 << 27) +#define HBA_SMPS (1 << 28) + +/* Host Bus Adapter port-specific platform capabilities */ +#define HBA_PORT_HPCP (1 << 18) +#define HBA_PORT_MPSP (1 << 19) +#define HBA_PORT_CPD (1 << 20) +#define HBA_PORT_ESP (1 << 21) +#define HBA_PORT_FBSCP (1 << 22) + +#endif -- cgit v1.2.3 From 667742a918f1a6c59737163a9cd94e3042b0663d Mon Sep 17 00:00:00 2001 From: FUKAUMI Naoki Date: Mon, 11 Sep 2023 19:01:20 +0900 Subject: configs: rockchip: rk3308: use CONFIG_DEFAULT_FDT_FILE all rk3308 boards should use their own dtb file. also, change fdt_addr_r to avoid following error: "ERROR: Did not find a cmdline Flattened Device Tree" it happens on Radxa ROCK Pi S (256MB/512MB) with kernel built from Radxa BSP. Signed-off-by: FUKAUMI Naoki --- include/configs/rk3308_common.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/rk3308_common.h b/include/configs/rk3308_common.h index 7d55fcd975c..a413af1bd4a 100644 --- a/include/configs/rk3308_common.h +++ b/include/configs/rk3308_common.h @@ -16,11 +16,12 @@ #define ENV_MEM_LAYOUT_SETTINGS \ "scriptaddr=0x00500000\0" \ "pxefile_addr_r=0x00600000\0" \ - "fdt_addr_r=0x02800000\0" \ + "fdt_addr_r=0x03e00000\0" \ "kernel_addr_r=0x00680000\0" \ "ramdisk_addr_r=0x04000000\0" #define CFG_EXTRA_ENV_SETTINGS \ + "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ ENV_MEM_LAYOUT_SETTINGS \ "partitions=" PARTS_DEFAULT \ ROCKCHIP_DEVICE_SETTINGS \ -- cgit v1.2.3 From 992f297e35309a57b18e1eba0b038cfc3e745b68 Mon Sep 17 00:00:00 2001 From: FUKAUMI Naoki Date: Mon, 11 Sep 2023 19:01:21 +0900 Subject: configs: rockchip: rk3308: enable CONFIG_OF_LIBFDT_OVERLAY enable CONFIG_OF_LIBFDT_OVERLAY and use it on Radxa ROCK Pi S. Signed-off-by: FUKAUMI Naoki --- include/configs/rk3308_common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/configs/rk3308_common.h b/include/configs/rk3308_common.h index a413af1bd4a..861154fbeb0 100644 --- a/include/configs/rk3308_common.h +++ b/include/configs/rk3308_common.h @@ -17,6 +17,7 @@ "scriptaddr=0x00500000\0" \ "pxefile_addr_r=0x00600000\0" \ "fdt_addr_r=0x03e00000\0" \ + "fdtoverlay_addr_r=0x03f00000\0" \ "kernel_addr_r=0x00680000\0" \ "ramdisk_addr_r=0x04000000\0" -- cgit v1.2.3