
Hi Dave,
On 30/06/20 10:08 am, Dave Gerlach wrote:
Hi,
This patch series introduces UCLASS_SOC to be used for SOC identification and attribute matching based on SoC ID info. This allows drivers to be provided for SoCs to retrieve SoC identifying information and also for matching device attributes for selecting SoC specific data. This is intended to be a counterpart to the soc-device framework in the Linux kernel.
I started with attempts to extend either UCLASS_CPU and UCLASS_BOARD to provide equivalent functionality, but UCLASS_CPU is focused specifically on processing units, of which multiples can exist heterogeneously in a system, and UCLASS_BOARD is focused on indentifying things connected to an SoC dynamically. Rather than try to force this into the existing UCLASS's, a new UCLASS seemed appropriate to provide same services as the soc-device functionality in the kernel.
This is useful for other device drivers that may need different parameters or quirks enabled depending on the specific device variant or revision in use.
Additionally, this introduces a user of UCLASS_SOC, soc_ti_k3, which provides SoC identifying information for K3 SoCs which can be used directly, for print_cpuinfo, and for selecting SoC specific data using soc_device_match.
Series looks good to me. Can you please re post the series addressing comments from Tom and Simon?
Thanks and regards, Lokesh
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: Introduce chipid node configs: am65x_evm: Enable CONFIG_SOC_DEVICE and CONFIG_SOC_DEVICE_TI_K3 configs: j721e_evm: Enable CONFIG_SOC_DEVICE and CONFIG_SOC_DEVICE_TI_K3 arm: mach-k3: Use SOC driver for device identification
arch/arm/dts/k3-am65-wakeup.dtsi | 5 + arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 4 + .../k3-j721e-common-proc-board-u-boot.dtsi | 4 + arch/arm/dts/k3-j721e-mcu-wakeup.dtsi | 5 + arch/arm/mach-k3/common.c | 48 +++---- arch/arm/mach-k3/include/mach/hardware.h | 1 - arch/sandbox/dts/test.dts | 4 + configs/am65x_evm_a53_defconfig | 2 + configs/am65x_evm_r5_defconfig | 2 + configs/am65x_hs_evm_a53_defconfig | 2 + configs/am65x_hs_evm_r5_defconfig | 2 + configs/j721e_evm_a72_defconfig | 2 + configs/j721e_evm_r5_defconfig | 2 + configs/j721e_hs_evm_a72_defconfig | 2 + configs/j721e_hs_evm_r5_defconfig | 2 + configs/sandbox64_defconfig | 1 + configs/sandbox_defconfig | 1 + configs/sandbox_flattree_defconfig | 1 + configs/sandbox_spl_defconfig | 1 + drivers/soc/Kconfig | 16 +++ drivers/soc/Makefile | 3 + drivers/soc/soc-uclass.c | 102 ++++++++++++++ drivers/soc/soc_sandbox.c | 56 ++++++++ drivers/soc/soc_ti_k3.c | 124 ++++++++++++++++ include/dm/uclass-id.h | 1 + include/soc.h | 132 ++++++++++++++++++ test/dm/Makefile | 1 + test/dm/soc.c | 120 ++++++++++++++++ 28 files changed, 616 insertions(+), 30 deletions(-) create mode 100644 drivers/soc/soc-uclass.c create mode 100644 drivers/soc/soc_sandbox.c create mode 100644 drivers/soc/soc_ti_k3.c create mode 100644 include/soc.h create mode 100644 test/dm/soc.c