[PATCH 01/17] arm: mach-k3: Add basic support for AM642 SoC definition

2021-04-23 Thread Dave Gerlach
peripherals. * Centralized System Controller for Security, Power, and Resource Management (DMSC). See AM64X Technical Reference Manual (SPRUIM2, Nov 2020) for further details: https://www.ti.com/lit/pdf/spruim2 Signed-off-by: Dave Gerlach --- arch/arm/mach-k3/Kconfig | 14 ++ arch/arm

[PATCH 03/17] arm: mach-k3: am642: Unlock all applicable control MMR registers

2021-04-23 Thread Dave Gerlach
To access various control MMR functionality the registers need to be unlocked. Do that for all control MMR regions in the MAIN domain. Signed-off-by: Dave Gerlach --- arch/arm/mach-k3/am642_init.c | 16 arch/arm/mach-k3/include/mach/am64_hardware.h | 10

[PATCH 08/17] armv8: mach-k3: am642: Add custom MMU support

2021-04-23 Thread Dave Gerlach
between the SoC families. Signed-off-by: Keerthy Signed-off-by: Dave Gerlach --- arch/arm/mach-k3/arm64-mmu.c | 41 1 file changed, 41 insertions(+) diff --git a/arch/arm/mach-k3/arm64-mmu.c b/arch/arm/mach-k3/arm64-mmu.c index a0da3df59388..94242e1e5cc3 100644

[PATCH 06/17] arm: mach-k3: am642: Use mmc start and stop callbacks

2021-04-23 Thread Dave Gerlach
To avoid any glitches on MMC clock line, make use of pm per and post callbacks when loading sysfw. Signed-off-by: Dave Gerlach --- arch/arm/mach-k3/am642_init.c | 34 +- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-k3/am642_init.c b

[PATCH 13/17] arm: dts: ti: Add Support for AM642 SoC

2021-04-23 Thread Dave Gerlach
MAIN domain peripherals under cbass_main and a set of MCU domain peripherals under cbass_mcu. Signed-off-by: Dave Gerlach --- arch/arm/dts/k3-am64-main.dtsi | 405 + arch/arm/dts/k3-am64-mcu.dtsi | 76 +++ arch/arm/dts/k3-am64.dtsi | 103 + arch

[PATCH 00/17] arm: mach-k3: Initial Support for Texas Instruments AM642 Platform

2021-04-23 Thread Dave Gerlach
Hi, This series adds initial support for the latest new SoC, AM642, from Texas Instruments. Additional detail can be found in the patch descriptions, also see AM64X Technical Reference Manual (SPRUIM2, Revised Jan 2021) for further details: https://www.ti.com/lit/pdf/spruim2 Regards, Dave Dave

[PATCH 07/17] arm: mach-k3: am642: Shut down R5 core after ATF startup on A53

2021-04-23 Thread Dave Gerlach
release_resources_for_core_shutdown(). This allows these Main R5F cores to be further controlled from the A53 to run regular applications. Signed-off-by: Suman Anna Signed-off-by: Dave Gerlach --- arch/arm/mach-k3/am642_init.c | 51 +++ 1 file changed, 51 insertions(+) diff --git

[PATCH 05/17] arm: mach-k3: am642: Load SYSFW binary and config from boot media

2021-04-23 Thread Dave Gerlach
. While at it also initialize the MAIN_UART1 pinmux as it is used by SYSFW to print diagnostic messages. Signed-off-by: Dave Gerlach --- arch/arm/mach-k3/am642_init.c | 37 +++ 1 file changed, 37 insertions(+) diff --git a/arch/arm/mach-k3/am642_init.c b/arch/arm/mach

[PATCH 09/17] mmc: sdhci_am654: Add Support for TI's AM642 SoC

2021-04-23 Thread Dave Gerlach
Add support for the controller present on the AM642 SoC. There are instances: sdhci0: 8bit bus width, max 400 MBps sdhci1: 4bit bus width, max 100 MBps Signed-off-by: Dave Gerlach --- drivers/mmc/am654_sdhci.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/mmc

[PATCH 02/17] arm: mach-k3: am642: Add support for boot device detection

2021-04-23 Thread Dave Gerlach
, ROM stores a value at a particular address. Add support for reading this information and determining the boot media correctly. Signed-off-by: Keerthy Signed-off-by: Dave Gerlach --- arch/arm/mach-k3/am642_init.c | 98 +++ arch/arm/mach-k3/include/mach

[PATCH 11/17] board: ti: am64x: Add board support for am64x evm

2021-04-23 Thread Dave Gerlach
Add board specific initialization for am64x based boards. Signed-off-by: Dave Gerlach --- arch/arm/mach-k3/Kconfig| 1 + board/ti/am64x/Kconfig | 53 ++ board/ti/am64x/Makefile | 8 +++ board/ti/am64x/evm.c| 48 + include/configs

[PATCH 04/17] arm: mach-k3: am642: Store boot info from ROM

2021-04-23 Thread Dave Gerlach
: Dave Gerlach --- arch/arm/mach-k3/am642_init.c | 21 +++ arch/arm/mach-k3/include/mach/am64_hardware.h | 2 ++ 2 files changed, 23 insertions(+) diff --git a/arch/arm/mach-k3/am642_init.c b/arch/arm/mach-k3/am642_init.c index 5ab2904c5e0c..7ebe5b56cd1f 100644

[PATCH 10/17] mailbox: k3-sec-proxy: Extend valid thread IDs

2021-04-23 Thread Dave Gerlach
ID can mean different things on different SoCs, so the comment is not useful. Signed-off-by: Dave Gerlach --- drivers/mailbox/k3-sec-proxy.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/mailbox/k3-sec-proxy.c b/drivers/mailbox/k3-sec-proxy.c index

[PATCH 14/17] arm: dts: k3-am642: Add initial support for EVM

2021-04-23 Thread Dave Gerlach
The AM642 EValuation Module (EVM) is a board that provides access to various peripherals available on the AM642 SoC, such as PCIe, USB 2.0, CPSW Ethernet, ADC, and more. Add basic support. Signed-off-by: Dave Gerlach --- arch/arm/dts/Makefile | 1 + arch/arm/dts/k3-am642-evm.dts

[PATCH 15/17] arm: dts: k3-am642: Add r5 specific dt support

2021-04-23 Thread Dave Gerlach
Add initial support for dt that runs on r5. Signed-off-by: Dave Gerlach --- arch/arm/dts/Makefile | 3 +- arch/arm/dts/k3-am642-evm-u-boot.dtsi | 58 + arch/arm/dts/k3-am642-r5-evm.dts | 169 ++ 3 files changed, 229 insertions(+), 1

[PATCH 16/17] configs: am64x_evm_r5: Add Initial support

2021-04-23 Thread Dave Gerlach
Add initial R5 defconfig support for AM64x SoCs. Signed-off-by: Dave Gerlach --- configs/am64x_evm_r5_defconfig | 91 ++ 1 file changed, 91 insertions(+) create mode 100644 configs/am64x_evm_r5_defconfig diff --git a/configs/am64x_evm_r5_defconfig b/configs

[PATCH 12/17] dt-bindings: pinctrl: k3: Introduce pinmux definitions for AM64

2021-04-23 Thread Dave Gerlach
Add pinctrl macros for AM64 SoC. These macro definitions are similar to that of previous platforms, but adding new definitions to avoid any naming confusions in the soc dts files. Signed-off-by: Dave Gerlach --- include/dt-bindings/pinctrl/k3.h | 5 - 1 file changed, 4 insertions(+), 1

[PATCH 17/17] configs: am64x_evm_a53: Add Initial support

2021-04-23 Thread Dave Gerlach
Add initial A53 defconfig support for AM64x SoCs. Signed-off-by: Dave Gerlach --- configs/am64x_evm_a53_defconfig | 96 + 1 file changed, 96 insertions(+) create mode 100644 configs/am64x_evm_a53_defconfig diff --git a/configs/am64x_evm_a53_defconfig b/configs

[PATCH 11/15] ram: k3-j721e: Rename to k3-ddrss

2021-05-03 Thread Dave Gerlach
Rename the k3-j721e folder under drivers/ram to k3-ddrss in preparation of introducing additional support for other platforms to the same driver. Signed-off-by: Dave Gerlach --- drivers/ram/Makefile| 2 +- drivers/ram/{k3-j721e => k3-ddrss}/Makef

[PATCH 02/15] ram: k3-j721e: lpddr4_address_slice_0_macros: Fix indentation issues

2021-05-03 Thread Dave Gerlach
Fix the indentation for certain macros to be consistent with the other macros in the file, as the existing indentation does not make sense in many places. Signed-off-by: Dave Gerlach --- .../k3-j721e/lpddr4_address_slice_0_macros.h | 334 +- 1 file changed, 167 insertions

[PATCH 00/15] ram: k3-ddrss: Convert k3-j721e to common driver with k3-am64 support

2021-05-03 Thread Dave Gerlach
these to individual patches to keep sizes down in the larger, later patches that introduce actual functionality. Regards, Dave Dave Gerlach (14): dt-bindings: memory-controller: Add K3 AM64 DDRSS compatible ram: k3-j721e: lpddr4_address_slice_0_macros: Fix indentation issues ram: k3-j721e

[PATCH 01/15] dt-bindings: memory-controller: Add K3 AM64 DDRSS compatible

2021-05-03 Thread Dave Gerlach
Update the k3-ddrss DT binding document to include compatible for k3,am64-ddrss. Signed-off-by: Dave Gerlach --- doc/device-tree-bindings/memory-controller/k3-j721e-ddrss.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/device-tree-bindings/memory-controller/k3

[PATCH 15/15] ram: k3-ddrss: Enable vtt regulator if present

2021-05-03 Thread Dave Gerlach
From: Lokesh Vutla Attempt to get and enable a vtt regulator if one is provided from the dts. If we do not find one, continue as not all platforms have this. Signed-off-by: Nishanth Menon Signed-off-by: Lokesh Vutla Signed-off-by: Dave Gerlach --- drivers/ram/k3-ddrss/k3-ddrss.c | 14

[PATCH 12/15] ram: k3-ddrss: Introduce top-level CONFIG_K3_DDRSS

2021-05-03 Thread Dave Gerlach
Create a new CONFIG_K3_DDRSS option to select the common parts of the k3-ddrss driver. Also introduce a choice that depends on the top level option to select CONFIG_K3_J721E_DDRSS for j721e support, and update corresponding Kconfig as required. Signed-off-by: Dave Gerlach --- board/ti/j721e

[PATCH 10/15] ram: k3-j721e: lpddr4_ctl_regs: Fix checkpatch issue for types

2021-05-03 Thread Dave Gerlach
Use Linux style u32 instead of uint32_t. Signed-off-by: Dave Gerlach --- drivers/ram/k3-j721e/lpddr4_ctl_regs.h | 3028 1 file changed, 1514 insertions(+), 1514 deletions(-) diff --git a/drivers/ram/k3-j721e/lpddr4_ctl_regs.h b/drivers/ram/k3-j721e/lpddr4_ctl_regs.h

[PATCH 4/5] arm: dts: k3-am642-r5-evm: Add GPIO DDR VTT regulator

2021-05-04 Thread Dave Gerlach
From: Nishanth Menon Add DDR VTT regulator. Signed-off-by: Nishanth Menon Signed-off-by: Dave Gerlach --- arch/arm/dts/k3-am642-r5-evm.dts | 28 1 file changed, 28 insertions(+) diff --git a/arch/arm/dts/k3-am642-r5-evm.dts b/arch/arm/dts/k3-am642-r5-evm.dts

[PATCH 3/5] arm: dts: k3-am64-main: Add GPIO nodes

2021-05-04 Thread Dave Gerlach
From: Nishanth Menon Add main domain GPIO nodes. Signed-off-by: Nishanth Menon Signed-off-by: Dave Gerlach --- arch/arm/dts/k3-am64-main.dtsi | 44 ++ 1 file changed, 44 insertions(+) diff --git a/arch/arm/dts/k3-am64-main.dtsi b/arch/arm/dts/k3-am64

[PATCH 5/5] configs: am64x_evm_r5: Enable GPIO regulator

2021-05-04 Thread Dave Gerlach
From: Nishanth Menon Enable GPIO regulator. Signed-off-by: Nishanth Menon Signed-off-by: Dave Gerlach --- configs/am64x_evm_r5_defconfig | 8 1 file changed, 8 insertions(+) diff --git a/configs/am64x_evm_r5_defconfig b/configs/am64x_evm_r5_defconfig index 0fa4ae90b59b

[PATCH 0/5] arm: mach-k3: k3-am64: Add DDR configuration and enable

2021-05-04 Thread Dave Gerlach
, Dave [1] https://patchwork.ozlabs.org/project/uboot/list/?series=240546 [2] https://patchwork.ozlabs.org/project/uboot/list/?series=241946 Dave Gerlach (2): arm: dts: k3-am642: Add ddr node arm: mach-k3: am642: Add support for triggering ddr init from SPL Nishanth Menon (3): arm: dts: k3

[PATCH 2/5] arm: mach-k3: am642: Add support for triggering ddr init from SPL

2021-05-04 Thread Dave Gerlach
In SPL, DDR should be made available by the end of board_init_f() so that apis in board_init_r() can use ddr. Adding support for triggering DDR initialization from board_init_f(). Signed-off-by: Dave Gerlach --- arch/arm/mach-k3/am642_init.c | 6 ++ board/ti/am64x/Kconfig| 3 +++ 2

[PATCH 1/5] arm: dts: k3-am642: Add ddr node

2021-05-04 Thread Dave Gerlach
Introduce ddr node for am642 needed for all ddr configurations. Also, introduce the 1600MTs DDR4 configuration that is supported on the am642-evm. Signed-off-by: Dave Gerlach --- arch/arm/dts/k3-am64-ddr.dtsi | 2205 arch/arm/dts/k3-am64-evm-ddr4-1600MTs.dtsi

[PATCH v2 01/15] dt-bindings: memory-controller: Add K3 AM64 DDRSS compatible

2021-05-11 Thread Dave Gerlach
Update the k3-ddrss DT binding document to include compatible for k3,am64-ddrss. Signed-off-by: Dave Gerlach --- doc/device-tree-bindings/memory-controller/k3-j721e-ddrss.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/device-tree-bindings/memory-controller/k3

[PATCH v2 00/15] ram: k3-ddrss: Convert k3-j721e to common driver with k3-am64 support

2021-05-11 Thread Dave Gerlach
sequence based on comment from Vignesh v1: https://lists.denx.de/pipermail/u-boot/2021-May/448716.html Regards, Dave Dave Gerlach (14): dt-bindings: memory-controller: Add K3 AM64 DDRSS compatible ram: k3-j721e: lpddr4_address_slice_0_macros: Fix indentation issues ram: k3-j721e

[PATCH v2 15/15] ram: k3-ddrss: Enable vtt regulator if present

2021-05-11 Thread Dave Gerlach
From: Lokesh Vutla Attempt to get and enable a vtt regulator if one is provided from the dts. If we do not find one, continue as not all platforms have this. Signed-off-by: Nishanth Menon Signed-off-by: Lokesh Vutla Signed-off-by: Dave Gerlach --- drivers/ram/k3-ddrss/k3-ddrss.c | 14

[PATCH v2 12/15] ram: k3-ddrss: Introduce top-level CONFIG_K3_DDRSS

2021-05-11 Thread Dave Gerlach
Create a new CONFIG_K3_DDRSS option to select the common parts of the k3-ddrss driver. Also introduce a choice that depends on the top level option to select CONFIG_K3_J721E_DDRSS for j721e support, and update corresponding Kconfig as required. Signed-off-by: Dave Gerlach --- board/ti/j721e

[PATCH v2 02/15] ram: k3-j721e: lpddr4_address_slice_0_macros: Fix indentation issues

2021-05-11 Thread Dave Gerlach
Fix the indentation for certain macros to be consistent with the other macros in the file, as the existing indentation does not make sense in many places. Signed-off-by: Dave Gerlach --- .../k3-j721e/lpddr4_address_slice_0_macros.h | 334 +- 1 file changed, 167 insertions

[PATCH v2 11/15] ram: k3-j721e: Rename to k3-ddrss

2021-05-11 Thread Dave Gerlach
Rename the k3-j721e folder under drivers/ram to k3-ddrss in preparation of introducing additional support for other platforms to the same driver. Signed-off-by: Dave Gerlach --- drivers/ram/Makefile| 2 +- drivers/ram/{k3-j721e => k3-ddrss}/Makef

[PATCH v2 10/15] ram: k3-j721e: lpddr4_ctl_regs: Fix checkpatch issue for types

2021-05-11 Thread Dave Gerlach
Use Linux style u32 instead of uint32_t. Signed-off-by: Dave Gerlach --- drivers/ram/k3-j721e/lpddr4_ctl_regs.h | 3028 1 file changed, 1514 insertions(+), 1514 deletions(-) diff --git a/drivers/ram/k3-j721e/lpddr4_ctl_regs.h b/drivers/ram/k3-j721e/lpddr4_ctl_regs.h

[PATCH 3/8] dm: soc: Introduce soc_ti_k3 driver for TI K3 SoCs

2020-06-30 Thread Dave Gerlach
/spruil1a.pdf Signed-off-by: Dave Gerlach --- drivers/soc/Kconfig | 7 +++ drivers/soc/Makefile| 1 + drivers/soc/soc_ti_k3.c | 124 3 files changed, 132 insertions(+) create mode 100644 drivers/soc/soc_ti_k3.c diff --git a/drivers/soc/Kconfig b/drivers

[PATCH 4/8] arm: dts: k3-am65-wakeup: Introduce chipid node

2020-06-30 Thread Dave Gerlach
Introduce a chipid node to provide a UCLASS_SOC driver to identify TI K3 SoCs. Signed-off-by: Dave Gerlach --- arch/arm/dts/k3-am65-wakeup.dtsi | 5 + arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 4 2 files changed, 9 insertions(+) diff --git a/arch/arm/dts/k3-am65

[PATCH 2/8] test: Add tests for SOC uclass

2020-06-30 Thread Dave Gerlach
Add a sandbox SOC driver, and some tests for the SOC uclass. Signed-off-by: Dave Gerlach --- arch/sandbox/dts/test.dts | 4 + configs/sandbox64_defconfig| 1 + configs/sandbox_defconfig | 1 + configs/sandbox_flattree_defconfig | 1 + configs

[PATCH 8/8] arm: mach-k3: Use SOC driver for device identification

2020-06-30 Thread Dave Gerlach
Make use of UCLASS_SOC to find device family and revision for print_cpuinfo. Signed-off-by: Dave Gerlach --- arch/arm/mach-k3/common.c| 48 ++-- arch/arm/mach-k3/include/mach/hardware.h | 1 - 2 files changed, 19 insertions(+), 30 deletions(-) diff --git a

[PATCH 7/8] configs: j721e_evm: Enable CONFIG_SOC_DEVICE and CONFIG_SOC_DEVICE_TI_K3

2020-06-30 Thread Dave Gerlach
Enable CONFIG_SOC_DEVICE and CONFIG_SOC_DEVICE_TI_K3 so the TI K3 SoC driver can be used for SoC detection. Signed-off-by: Dave Gerlach --- configs/j721e_evm_a72_defconfig| 2 ++ configs/j721e_evm_r5_defconfig | 2 ++ configs/j721e_hs_evm_a72_defconfig | 2 ++ configs

[PATCH 5/8] arm: dts: k3-j721e-mcu-wakeup: Introduce chipid node

2020-06-30 Thread Dave Gerlach
Introduce a chipid node to provide a UCLASS_SOC driver to identify TI K3 SoCs. Signed-off-by: Dave Gerlach --- arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi | 4 arch/arm/dts/k3-j721e-mcu-wakeup.dtsi | 5 + 2 files changed, 9 insertions(+) diff --git a/arch/arm/dts

[PATCH 0/8] Introduce UCLASS_SOC

2020-06-30 Thread Dave Gerlach
data using soc_device_match. Regards, Dave Dave Gerlach (8): dm: soc: Introduce UCLASS_SOC for SOC ID and attribute matching test: Add tests for SOC uclass dm: soc: Introduce soc_ti_k3 driver for TI K3 SoCs arm: dts: k3-am65-wakeup: Introduce chipid node arm: dts: k3-j721e-mcu-wakeup: Intr

[PATCH 1/8] dm: soc: Introduce UCLASS_SOC for SOC ID and attribute matching

2020-06-30 Thread Dave Gerlach
drivers that may need different parameters or quirks enabled depending on the specific device variant in use. Signed-off-by: Dave Gerlach --- drivers/soc/Kconfig | 9 +++ drivers/soc/Makefile | 1 + drivers/soc/soc-uclass.c | 102 ++ include/dm/uclass-id.h

[PATCH 6/8] configs: am65x_evm: Enable CONFIG_SOC_DEVICE and CONFIG_SOC_DEVICE_TI_K3

2020-06-30 Thread Dave Gerlach
Enable CONFIG_SOC_DEVICE and CONFIG_SOC_DEVICE_TI_K3 so the TI K3 SoC driver can be used for SoC detection. Signed-off-by: Dave Gerlach --- configs/am65x_evm_a53_defconfig| 2 ++ configs/am65x_evm_r5_defconfig | 2 ++ configs/am65x_hs_evm_a53_defconfig | 2 ++ configs

Re: [PATCH 1/8] dm: soc: Introduce UCLASS_SOC for SOC ID and attribute matching

2020-07-08 Thread Dave Gerlach
Tom, On 6/30/20 7:43 AM, Tom Rini wrote: On Mon, Jun 29, 2020 at 11:38:46PM -0500, Dave Gerlach wrote: Introduce UCLASS_SOC to be used for SOC identification and attribute matching based on the SoC ID info. This allows drivers to be provided for SoCs to retrieve SoC identifying information and

Re: [PATCH 1/8] dm: soc: Introduce UCLASS_SOC for SOC ID and attribute matching

2020-07-08 Thread Dave Gerlach
Simon, On 7/2/20 10:50 PM, Simon Glass wrote: On Mon, 29 Jun 2020 at 22:38, Dave Gerlach wrote: Introduce UCLASS_SOC to be used for SOC identification and attribute matching based on the SoC ID info. This allows drivers to be provided for SoCs to retrieve SoC identifying information and also

[PATCH v2 8/9] configs: j721e_evm: Enable CONFIG_SOC_DEVICE and CONFIG_SOC_DEVICE_TI_K3

2020-07-15 Thread Dave Gerlach
Enable CONFIG_SOC_DEVICE and CONFIG_SOC_DEVICE_TI_K3 so the TI K3 SoC driver can be used for SoC detection. Signed-off-by: Dave Gerlach --- configs/j721e_evm_a72_defconfig| 2 ++ configs/j721e_evm_r5_defconfig | 2 ++ configs/j721e_hs_evm_a72_defconfig | 2 ++ configs

[PATCH v2 4/9] dm: soc: Introduce soc_ti_k3 driver for TI K3 SoCs

2020-07-15 Thread Dave Gerlach
/spruil1a.pdf Signed-off-by: Dave Gerlach --- drivers/soc/Kconfig | 7 +++ drivers/soc/Makefile| 1 + drivers/soc/soc_ti_k3.c | 124 3 files changed, 132 insertions(+) create mode 100644 drivers/soc/soc_ti_k3.c diff --git a/drivers/soc/Kconfig b/drivers

[PATCH v2 5/9] arm: dts: k3-am65-wakeup: Introduce chipid node

2020-07-15 Thread Dave Gerlach
Introduce a chipid node to provide a UCLASS_SOC driver to identify TI K3 SoCs. Signed-off-by: Dave Gerlach --- arch/arm/dts/k3-am65-wakeup.dtsi | 5 + arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 4 2 files changed, 9 insertions(+) diff --git a/arch/arm/dts/k3-am65

[PATCH v2 0/9] Introduce UCLASS_SOC

2020-07-15 Thread Dave Gerlach
soc_device_match. And a change to SOC Revision macro naming in the soc_ti_k3 driver to use SR consistently instead of PG. Regards, Dave [1] https://lists.denx.de/pipermail/u-boot/2020-June/418109.html Dave Gerlach (9): doc: Add new doc for soc ID driver model dm: soc: Introduce UCLASS_SOC for SOC

[PATCH v2 7/9] configs: am65x_evm: Enable CONFIG_SOC_DEVICE and CONFIG_SOC_DEVICE_TI_K3

2020-07-15 Thread Dave Gerlach
Enable CONFIG_SOC_DEVICE and CONFIG_SOC_DEVICE_TI_K3 so the TI K3 SoC driver can be used for SoC detection. Signed-off-by: Dave Gerlach --- configs/am65x_evm_a53_defconfig| 2 ++ configs/am65x_evm_r5_defconfig | 2 ++ configs/am65x_hs_evm_a53_defconfig | 2 ++ configs

[PATCH v2 6/9] arm: dts: k3-j721e-mcu-wakeup: Introduce chipid node

2020-07-15 Thread Dave Gerlach
Introduce a chipid node to provide a UCLASS_SOC driver to identify TI K3 SoCs. Signed-off-by: Dave Gerlach --- arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi | 4 arch/arm/dts/k3-j721e-mcu-wakeup.dtsi | 5 + 2 files changed, 9 insertions(+) diff --git a/arch/arm/dts

[PATCH v2 1/9] doc: Add new doc for soc ID driver model

2020-07-15 Thread Dave Gerlach
Add a new documentation file for UCLASS_SOC and its usage to describe the SoC Device ID framework that allows SoC identification and device data matching. Signed-off-by: Dave Gerlach --- doc/driver-model/index.rst | 1 + doc/driver-model/soc-framework.rst | 68

[PATCH v2 2/9] dm: soc: Introduce UCLASS_SOC for SOC ID and attribute matching

2020-07-15 Thread Dave Gerlach
drivers that may need different parameters or quirks enabled depending on the specific device variant in use. Reviewed-by: Simon Glass Signed-off-by: Dave Gerlach --- drivers/soc/Kconfig | 9 +++ drivers/soc/Makefile | 1 + drivers/soc/soc-uclass.c | 102

[PATCH v2 3/9] test: Add tests for SOC uclass

2020-07-15 Thread Dave Gerlach
Add a sandbox SOC driver, and some tests for the SOC uclass. Reviewed-by: Simon Glass Signed-off-by: Dave Gerlach --- arch/sandbox/dts/test.dts | 4 + configs/sandbox64_defconfig| 1 + configs/sandbox_defconfig | 1 + configs/sandbox_flattree_defconfig | 1

[PATCH v2 9/9] arm: mach-k3: Use SOC driver for device identification

2020-07-15 Thread Dave Gerlach
Make use of UCLASS_SOC to find device family and revision for print_cpuinfo. Signed-off-by: Dave Gerlach --- arch/arm/mach-k3/common.c| 48 ++-- arch/arm/mach-k3/common.h| 6 --- arch/arm/mach-k3/include/mach/hardware.h | 1 - 3 files

Re: [PATCH] ram: k3-ddrss: Allow use of dt provided initial frequency

2022-04-12 Thread Dave Gerlach
Hi, On 4/11/22 07:32, Tom Rini wrote: > On Fri, Apr 08, 2022 at 04:46:50PM -0500, Dave Gerlach wrote: > >> Allow device tree to provide ti,ddr-freq0 to be used as the initial DDR >> frequency that is set for lpddr4 before initialization of the >> controller. Make this

[PATCH] power: domain: ti: Extend use of PTCMD and PTSTAT registers for high PDs

2022-04-01 Thread Dave Gerlach
It is possible for power domain IDs to be great than 31. If this happens, the PTCMD and PTSTAT registers must overflow into adjacent corresponding PTCMD_H and PTSTAT_H registers for each. Update the driver to account for this. Signed-off-by: Dave Gerlach --- drivers/power/domain/ti-power

[PATCH] ram: k3-ddrss: Allow use of dt provided initial frequency

2022-04-08 Thread Dave Gerlach
Allow device tree to provide ti,ddr-freq0 to be used as the initial DDR frequency that is set for lpddr4 before initialization of the controller. Make this optional and continue to use PLL bypass frequency as is done currently if ti,ddr-freq0 is not provided. Signed-off-by: Dave Gerlach

[PATCH] board: ti: am64x: Update MAINTAINERS

2022-06-03 Thread Dave Gerlach
Move maintainership of TI AM64x boards to Vignesh. Signed-off-by: Dave Gerlach --- board/ti/am64x/MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/ti/am64x/MAINTAINERS b/board/ti/am64x/MAINTAINERS index eaca2b865f51..78a21d66af73 100644 --- a/board/ti/am64x

[PATCH 3/5] arm: mach-k3: Add note to auto-generated files

2021-08-10 Thread Dave Gerlach
Add a note to the automatically generated clk-data and dev-data files for j721e and j7200 to indicate that they are in fact auto-generated and should not be hand edited. Signed-off-by: Dave Gerlach --- arch/arm/mach-k3/j7200/clk-data.c | 2 ++ arch/arm/mach-k3/j7200/dev-data.c | 2 ++ arch/arm

[PATCH 0/5] arm: mach-k3: Fixes for j721e/j7200 clock data and drivers

2021-08-10 Thread Dave Gerlach
actually configured for. Clock: Old Frequency -> New Frequency - postdiv2_16fft_main_0_hsdivout6_clk: 6667 -> 2 postdiv2_16fft_main_1_hsdivout5_clk: 32000 -> 96000 postdiv2_16fft_main_1_hsdivout7_clk: 32000 -> 96000 Regards

[PATCH 4/5] clk: ti: k3-pll: Change DIV_CTRL programming to read-modify-write

2021-08-10 Thread Dave Gerlach
only affect the relevant bits for plld and to preserve the other two divider values present in the upper 16 bits, otherwise they will always get set to zero when programming plld. Fixes: 0aa2930ca192 ("clk: add support for TI K3 SoC PLL") Signed-off-by: Dave Gerlach --- drivers/clk/ti/cl

[PATCH 2/5] arm: mach-k3: j7200: Fix clk-data parenting for postdiv PLL clocks

2021-08-10 Thread Dave Gerlach
t;) Signed-off-by: Suman Anna Signed-off-by: Dave Gerlach --- arch/arm/mach-k3/j7200/clk-data.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-k3/j7200/clk-data.c b/arch/arm/mach-k3/j7200/clk-data.c index 93c067079ab6..49145bbfc8cd 100644 --- a/arch/a

[PATCH 1/5] arm: mach-k3: j721e: Fix clk-data parenting for postdiv PLL clocks

2021-08-10 Thread Dave Gerlach
t;) Signed-off-by: Suman Anna Signed-off-by: Dave Gerlach --- arch/arm/mach-k3/j721e/clk-data.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-k3/j721e/clk-data.c b/arch/arm/mach-k3/j721e/clk-data.c index 953ac457130b..ff9262d7bcee 100644 --- a/arch/a

[PATCH 5/5] clk: ti: k3: Update driver to account for divider flags

2021-08-10 Thread Dave Gerlach
data lacks the infrastructure to pass in divider flags. Update the driver and data to account for these divider flags. Signed-off-by: Suman Anna Signed-off-by: Dave Gerlach --- arch/arm/mach-k3/j7200/clk-data.c | 85 --- arch/arm/mach-k3/j721e/clk-data.c | 111

Re: [PATCH 3/5] arm: mach-k3: Add note to auto-generated files

2021-08-16 Thread Dave Gerlach
Hi, On 8/11/21 12:12 AM, Lokesh Vutla wrote: > > > On 11/08/21 1:19 am, Dave Gerlach wrote: >> Add a note to the automatically generated clk-data and dev-data files >> for j721e and j7200 to indicate that they are in fact auto-generated and >> should not be hand

Re: [PATCH] dm: soc: Add SoC id for attribute matching

2020-10-30 Thread Dave Gerlach
Hi, On 10/30/20 9:07 AM, Biju Das wrote: Add SoC identification string for attribute matching. Also changed the comments from "an SOC" to "a SoC". This is not a correct change, "an" should be used if the word that follows starts with a vowel sound, which "SoC" does. "SOC" could be changed t

[PATCH v2 1/5] arm: mach-k3: j721e: Fix clk-data parenting for postdiv PLL clocks

2021-09-07 Thread Dave Gerlach
t;) Signed-off-by: Suman Anna Signed-off-by: Dave Gerlach --- arch/arm/mach-k3/j721e/clk-data.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-k3/j721e/clk-data.c b/arch/arm/mach-k3/j721e/clk-data.c index 953ac457130b..ff9262d7bcee 100644 --- a/arch/a

[PATCH v2 3/5] arm: mach-k3: Add note to auto-generated files

2021-09-07 Thread Dave Gerlach
/ + * This file is auto generated. Please do not hand edit and report any issues + * to Dave Gerlach . + * + * Copyright (C) 2020-2021 Texas Instruments Incorporated - https://www.ti.com/ */ + #include "k3-clk.h" static const char * const gluelogic_hfosc0_clkout_parents[] = { diff --git

[PATCH v2 0/5] arm: mach-k3: Fixes for j721e/j7200 clock data and drivers

2021-09-07 Thread Dave Gerlach
quency - postdiv2_16fft_main_0_hsdivout6_clk: 6667 -> 2 postdiv2_16fft_main_1_hsdivout5_clk: 32000 -> 96000 postdiv2_16fft_main_1_hsdivout7_clk: 32000 -> 96000 Regards, Dave [v1] https://patchwork.ozlabs.org/project/uboot/list/?series=257518

[PATCH v2 4/5] clk: ti: k3-pll: Change DIV_CTRL programming to read-modify-write

2021-09-07 Thread Dave Gerlach
only affect the relevant bits for plld and to preserve the other two divider values present in the upper 16 bits, otherwise they will always get set to zero when programming plld. Fixes: 0aa2930ca192 ("clk: add support for TI K3 SoC PLL") Signed-off-by: Dave Gerlach --- drivers/clk/ti/cl

[PATCH v2 2/5] arm: mach-k3: j7200: Fix clk-data parenting for postdiv PLL clocks

2021-09-07 Thread Dave Gerlach
t;) Signed-off-by: Suman Anna Signed-off-by: Dave Gerlach --- arch/arm/mach-k3/j7200/clk-data.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-k3/j7200/clk-data.c b/arch/arm/mach-k3/j7200/clk-data.c index 93c067079ab6..49145bbfc8cd 100644 --- a/arch/a

[PATCH v2 5/5] clk: ti: k3: Update driver to account for divider flags

2021-09-07 Thread Dave Gerlach
data lacks the infrastructure to pass in divider flags. Update the driver and data to account for these divider flags. Signed-off-by: Suman Anna Signed-off-by: Dave Gerlach --- arch/arm/mach-k3/j7200/clk-data.c | 85 --- arch/arm/mach-k3/j721e/clk-data.c | 111

[PATCH 0/8] ram: k3-ddrss: Enable DDRSS ECC for full DDR Space

2022-03-17 Thread Dave Gerlach
s does NOT actually enable ECC for the any platform due to the multi second boot time increase that comes from the ECC priming that is done as part of ECC init, but it can be enabled by adding the 'ti,ecc-enable` property to the memorycontroller node in k3-am642-r5-evm DT. Regards, Dave

[PATCH 5/8] ram: k3-ddrss: Introduce ECC Functionality for full memory space

2022-03-17 Thread Dave Gerlach
to account from DDR memory that must be reserved for ECC operation. Signed-off-by: Dave Gerlach --- drivers/ram/k3-ddrss/k3-ddrss.c | 133 include/k3-ddrss.h | 16 2 files changed, 149 insertions(+) create mode 100644 include/k3-ddrss.h dif

[PATCH 7/8] arm: dts: k3-am64-ddr: Add ss_cfg reg entry

2022-03-17 Thread Dave Gerlach
Add 'ss_cfg' memory region for memorycontroller node which is required to enable ECC. Signed-off-by: Dave Gerlach --- arch/arm/dts/k3-am64-ddr.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/dts/k3-am64-ddr.dtsi b/arch/arm/dts/k3-am64-ddr.

[PATCH 3/8] dt-bindings: memory-controller: Add information about ECC bindings

2022-03-17 Thread Dave Gerlach
Add DT binding documentation for enabling ECC in the DDR sub system present on AM64 device. Signed-off-by: Dave Gerlach --- .../memory-controller/k3-j721e-ddrss.txt | 8 1 file changed, 8 insertions(+) diff --git a/doc/device-tree-bindings/memory-controller/k3-j721e

[PATCH 2/8] board: ti: am64x: Use fdt functions for ram and bank init

2022-03-17 Thread Dave Gerlach
Use the appropriate fdtdec_setup_mem_size_base and fdtdec_setup_bank_size calls in dram_init and dram_bank_init to pull these values from DT, where they are already available, instead of hardcoding them. Signed-off-by: Dave Gerlach --- board/ti/am64x/evm.c | 19 --- 1 file

[PATCH 6/8] board: ti: am64x: Account for DDR size fixups if ECC is enabled

2022-03-17 Thread Dave Gerlach
Call into k3-ddrss driver to fixup device tree and resize the available amount of DDR if ECC is enabled. A second fixup is required from A53 SPL to take the fixup as done from R5 SPL and apply it to DT passed to A53 U-boot, which in turn passes this to the OS. Signed-off-by: Dave Gerlach

[PATCH 8/8] configs: am64x_evm_r5: Add CONFIG_NR_DRAM_BANKS as done in a53 defconfig

2022-03-17 Thread Dave Gerlach
Add CONFIG_NR_DRAM_BANKS from am64x_evm_a53_defconfig as this is needed to calculate the size of DDR that is available. Signed-off-by: Dave Gerlach --- configs/am64x_evm_r5_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/am64x_evm_r5_defconfig b/configs

[PATCH 4/8] ram: k3-ddrss: Rename ddrss_ss_regs to ddrss_ctl_regs

2022-03-17 Thread Dave Gerlach
The current address being read from dt actually represents the ddrss_ctl memory region, while ddrss_ss region is something else. Introduce ddrss_ctl_regs and use it to free up ddrss_ss_regs for its proper purpose later so that we can avoid confusion. Signed-off-by: Dave Gerlach --- drivers/ram

Re: [PATCH 2/2] ram: k3-ddrss: Fix register definitions

2022-03-22 Thread Dave Gerlach
Hi, On 3/22/22 07:11, Dominic Rath wrote: > The K3 DDRSS used by AM64x and J721e (and probably J7200 in the future) > used to define only two register ranges: one labeled "cfg" that was > internally referenced as "DDRSS wrapper", and the LPDDR4 FSP handshake > registers in the CTRL_MMR register spa

Re: [PATCH 1/2] ram: k3-ddrss: Fix register name and explain its usage

2022-03-22 Thread Dave Gerlach
> The offset 0x20 was correct, but the register name DDRSS_V2A_R1_MAT_REG > was that of the next register at offset 0x24. > > Signed-off-by: Dominic Rath This patch looks good to me. Acked-by: Dave Gerlach > --- > drivers/ram/k3-ddrss/k3-ddrss.c | 6 +++--- > 1 file changed