1da333ae7SMasahiro Yamadaconfig DM 2da333ae7SMasahiro Yamada bool "Enable Driver Model" 3da333ae7SMasahiro Yamada help 4f94a1bedSSimon Glass This config option enables Driver Model. This brings in the core 5f94a1bedSSimon Glass support, including scanning of platform data on start-up. If 6f94a1bedSSimon Glass CONFIG_OF_CONTROL is enabled, the device tree will be scanned also 7f94a1bedSSimon Glass when available. 891a91ff8SSimon Glass 991a91ff8SSimon Glassconfig SPL_DM 1091a91ff8SSimon Glass bool "Enable Driver Model for SPL" 1191a91ff8SSimon Glass depends on DM && SPL 1291a91ff8SSimon Glass help 1391a91ff8SSimon Glass Enable driver model in SPL. You will need to provide a 1491a91ff8SSimon Glass suitable malloc() implementation. If you are not using the 1591a91ff8SSimon Glass full malloc() enabled by CONFIG_SYS_SPL_MALLOC_START, 1691a91ff8SSimon Glass consider using CONFIG_SYS_MALLOC_SIMPLE. In that case you 1791a91ff8SSimon Glass must provide CONFIG_SYS_MALLOC_F_LEN to set the size. 1891a91ff8SSimon Glass In most cases driver model will only allocate a few uclasses 1991a91ff8SSimon Glass and devices in SPL, so 1KB should be enable. See 2091a91ff8SSimon Glass CONFIG_SYS_MALLOC_F_LEN for more details on how to enable it. 2191a91ff8SSimon Glass 2291a91ff8SSimon Glassconfig DM_WARN 2391a91ff8SSimon Glass bool "Enable warnings in driver model" 24d648964fSMasahiro Yamada depends on DM 25d648964fSMasahiro Yamada default y 2691a91ff8SSimon Glass help 2791a91ff8SSimon Glass The dm_warn() function can use up quite a bit of space for its 2891a91ff8SSimon Glass strings. By default this is disabled for SPL builds to save space. 2991a91ff8SSimon Glass This will cause dm_warn() to be compiled out - it will do nothing 3091a91ff8SSimon Glass when called. 3191a91ff8SSimon Glass 3291a91ff8SSimon Glassconfig DM_DEVICE_REMOVE 3391a91ff8SSimon Glass bool "Support device removal" 34d648964fSMasahiro Yamada depends on DM 35d648964fSMasahiro Yamada default y 3691a91ff8SSimon Glass help 3791a91ff8SSimon Glass We can save some code space by dropping support for removing a 3891a91ff8SSimon Glass device. This is not normally required in SPL, so by default this 3991a91ff8SSimon Glass option is disabled for SPL. 4091a91ff8SSimon Glass 41e5c4564eSHans de Goede Note that this may have undesirable results in the USB subsystem as 42e5c4564eSHans de Goede it causes unplugged devices to linger around in the dm-tree, and it 43e5c4564eSHans de Goede causes USB host controllers to not be stopped when booting the OS. 44e5c4564eSHans de Goede 4591a91ff8SSimon Glassconfig DM_STDIO 4691a91ff8SSimon Glass bool "Support stdio registration" 47d648964fSMasahiro Yamada depends on DM 48d648964fSMasahiro Yamada default y 4991a91ff8SSimon Glass help 5091a91ff8SSimon Glass Normally serial drivers register with stdio so that they can be used 5191a91ff8SSimon Glass as normal output devices. In SPL we don't normally use stdio, so 5291a91ff8SSimon Glass we can omit this feature. 5336fa61dcSSimon Glass 5436fa61dcSSimon Glassconfig DM_SEQ_ALIAS 5536fa61dcSSimon Glass bool "Support numbered aliases in device tree" 5636fa61dcSSimon Glass depends on DM 5736fa61dcSSimon Glass default y 5836fa61dcSSimon Glass help 5936fa61dcSSimon Glass Most boards will have a '/aliases' node containing the path to 6036fa61dcSSimon Glass numbered devices (e.g. serial0 = &serial0). This feature can be 6136fa61dcSSimon Glass disabled if it is not required, to save code space in SPL. 62*12dc8e75SSimon Glass 63*12dc8e75SSimon Glassconfig REGMAP 64*12dc8e75SSimon Glass bool "Support register maps" 65*12dc8e75SSimon Glass depends on DM 66*12dc8e75SSimon Glass help 67*12dc8e75SSimon Glass Hardware peripherals tend to have one or more sets of registers 68*12dc8e75SSimon Glass which can be accessed to control the hardware. A register map 69*12dc8e75SSimon Glass models this with a simple read/write interface. It can in principle 70*12dc8e75SSimon Glass support any bus type (I2C, SPI) but so far this only supports 71*12dc8e75SSimon Glass direct memory access. 72*12dc8e75SSimon Glass 73*12dc8e75SSimon Glassconfig SYSCON 74*12dc8e75SSimon Glass bool "Support system controllers" 75*12dc8e75SSimon Glass depends on REGMAP 76*12dc8e75SSimon Glass help 77*12dc8e75SSimon Glass Many SoCs have a number of system controllers which are dealt with 78*12dc8e75SSimon Glass as a group by a single driver. Some common functionality is provided 79*12dc8e75SSimon Glass by this uclass, including accessing registers via regmap and 80*12dc8e75SSimon Glass assigning a unique number to each. 81