Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 017DBC433F5 for ; Tue, 17 May 2022 12:53:16 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 117488419A; Tue, 17 May 2022 14:53:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1652791990; bh=xhQpG9oGFqf7ZdpNU0k5NttuK7uR3wMFQ/jQp0rsSzk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=PYSQHSh1JRKCnmGknvTRejhmeR5wWQQpy4klUDrjC2Hk3Y6XDjZhuwJHkjIGXmdtd EFWpI9aRmBx0CTTM0p5DSu7ZDQA4Mf1dbsIboheIH9nwNJNgv8WuA01/GqGH2LOO/X TkS5F/conPiOc2eNLAw3NiwbOmIHxSG6xgVwcO9YIn+RnU3wjFuvSP3lq4bi7LFohx QOI2g8uPKiLDs0JuC582sMaWt8jGST7QFMQtP5wzFlYHd+yn2c0DTlsVi/8EXgsiMs tiu5kRpfaPjUlpoQbD0egwN1G9k9gdMCPlOEsM9LfymjBLngEdIcA1F2RvTOj060uS TaDsM5dzLW8Dw== Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id D5B5783AD1; Tue, 17 May 2022 14:53:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1652791988; bh=xhQpG9oGFqf7ZdpNU0k5NttuK7uR3wMFQ/jQp0rsSzk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=K0+uyuQ4Y5rS8KPhXz9aa/E4J7+hpS2isxYxSHo+EJdKFCnIpVdnSxgvUFzaSyRdM Bjft7ZeS6PBJBVNCuMM/P+tXMNJ2Vos0FTw3lBM0ShW9ZzuesnNvcjXCwY+yTTKfAV RHaSS5P5f6lG4sRrhHyGZi9Ipi0m1wIBcIV2pWEiuVdrg92mBl5bAHZfBjnIuEFIaS GIEVjqacY3N95POSZ488q07mfcROxjm4FJ06szlSu1aK6WwipCuSbuhCuzf2uOlUeW hS8Dr8kokCJpc6M3bgDkDgxYGAOlxOeKAOPBlnkB7yKRl4Q78zjSqdvfmRqg+Sx6WC QYtVAPjjS4gow== Message-ID: Date: Tue, 17 May 2022 14:53:07 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH] ARM: dts: stm32: Configure Buck3 voltage per PMIC NVM on Avenger96 Content-Language: en-US To: Patrick DELAUNAY , u-boot@lists.denx.de Cc: Patrice Chotard References: <20220511210933.191998-1-marex@denx.de> <7ee99fd1-b7ae-582d-9f38-91c26619a216@foss.st.com> From: Marek Vasut In-Reply-To: <7ee99fd1-b7ae-582d-9f38-91c26619a216@foss.st.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean On 5/17/22 14:39, Patrick DELAUNAY wrote: Hi, [...] >> +static int board_get_regulator_buck3_nvm_uv_av96(int *uv) >> +{ >> +    const void *fdt = gd->fdt_blob; >> +    struct udevice *dev; >> +    u8 bucks_vout = 0; >> +    const char *prop; >> +    int len, ret; >> + >> +    /* Check whether this is Avenger96 board. */ >> +    prop = fdt_getprop(fdt, 0, "compatible", &len); > > > This API is not compatible with CONFIG_OF_LIVE > > consider replacement with ofnode_read_prop or with > of_machine_is_compatible, for example > > if (!of_machine_is_compatible(prop, "arrow,stm32mp15xx-avenger96")) >     return -EINVAL; I explicitly don't want to use of_machine_is_compatible, I need to search for the avenger96 substring in the machine compatible, since the stm32mp15xx can be anything (15{1,3,7}{a,d}) and it might not even have the arrow prefix.