From mboxrd@z Thu Jan 1 00:00:00 1970 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 C2CBFC433FE for ; Tue, 17 May 2022 13:43:54 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id ECFBD84253; Tue, 17 May 2022 15:43:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.b="cvllt6vT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E9A9E8424D; Tue, 17 May 2022 15:43:49 +0200 (CEST) Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 86ACB8425D for ; Tue, 17 May 2022 15:43:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=prvs=1136db00ec=patrick.delaunay@foss.st.com Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24HAVtWq028145; Tue, 17 May 2022 15:43:46 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=Iok+IbxqgpcN03BUOiB8QdwkUOBeoRzXxjSZmZ2xRkI=; b=cvllt6vTz7ORi7X7leGS4gi6vEQ3/3/yFURFFoxg1PyyssFIyiGAPsHXKTeUAyHQHq+L EK7yIx8/1A082B0S1JKMViP1vMzQKsY/vO0fOs0YMmositVL4gkt/blHTJyBoiZnYVGV cmHCXgfXbP41kufN6MY/secedXgVND7c7u1O2iKMXiFk/0lOSII9DhtA71iIp0Yq3KbS i7fq4+vNzLFt4Wavi9Sj463B75CrkjPDKGYUMO5tRsExh89WY/qsqbH301Z6FPDBRTJj dkhK5jwB5w6LnKRVbjBO53gcJOyg7VX14Q0mOUuotYMs+CHMfbi1AY/vb7XUOiVDnarB Hw== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3g23s1g6gk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 May 2022 15:43:46 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 99DB110002A; Tue, 17 May 2022 15:43:45 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node2.st.com [10.75.127.5]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 8C7E12248A9; Tue, 17 May 2022 15:43:45 +0200 (CEST) Received: from [10.48.0.213] (10.75.127.49) by SFHDAG2NODE2.st.com (10.75.127.5) with Microsoft SMTP Server (TLS) id 15.0.1497.26; Tue, 17 May 2022 15:43:44 +0200 Message-ID: Date: Tue, 17 May 2022 15:43:44 +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: Marek Vasut , CC: Patrice Chotard References: <20220511210933.191998-1-marex@denx.de> <7ee99fd1-b7ae-582d-9f38-91c26619a216@foss.st.com> From: Patrick DELAUNAY In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.75.127.49] X-ClientProxiedBy: SFHDAG2NODE3.st.com (10.75.127.6) To SFHDAG2NODE2.st.com (10.75.127.5) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-17_03,2022-05-17_02,2022-02-23_01 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 Hi, On 5/17/22 14:53, Marek Vasut wrote: > 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. Ok, I check on existing DT and I found only on compatible with "avenger96" string. arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts:15:     compatible = "arrow,stm32mp15xx-avenger96", "st,stm32mp15x"; But you can forget my proposal with of_machine_is_compatible, consider:    prop = ofnode_read_prop(ofnode_root(), "compatible", &len); But it is just minor remark. Do you expect this patch for next pull-request for v2022.07 or for next ? Patrick