Now with i.MX8M feature controller driver support available, have the OCOTP provide feature control on the i.MX8MN to ensure the kernel DT does not attempt accessing the GPU and its power domain if barebox knows them to be unavailable. This is needed because the upstream kernel imx8mm.dtsi only describes the full-featured SoC, which can lead to hangs when instantiating drivers for hardware that's unavailable in a less-featureful variant of the SoC. Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> --- arch/arm/dts/imx8mn.dtsi | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/arch/arm/dts/imx8mn.dtsi b/arch/arm/dts/imx8mn.dtsi index 176125e73bce..c8ea034e9553 100644 --- a/arch/arm/dts/imx8mn.dtsi +++ b/arch/arm/dts/imx8mn.dtsi @@ -1,5 +1,37 @@ // SPDX-License-Identifier: (GPL-2.0+ OR MIT) +#include <dt-bindings/features/imx8m.h> + &pgc_otg1 { barebox,allow-dummy; }; + + +feat: &ocotp { + #feature-cells = <1>; + barebox,feature-controller; +}; + +&A53_1 { + barebox,feature-gates = <&feat IMX8M_FEAT_CPU_DUAL>; +}; + +&A53_2 { + barebox,feature-gates = <&feat IMX8M_FEAT_CPU_QUAD>; +}; + +&A53_3 { + barebox,feature-gates = <&feat IMX8M_FEAT_CPU_QUAD>; +}; + +&gpc { + barebox,feature-gates = <&feat 0>; +}; + +&gpu { + barebox,feature-gates = <&feat IMX8M_FEAT_GPU>; +}; + +&pgc_gpumix { + barebox,feature-gates = <&feat IMX8M_FEAT_GPU>; +}; -- 2.30.2