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 9E414C433FE for ; Mon, 14 Mar 2022 21:32:37 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D7BA583BBE; Mon, 14 Mar 2022 22:32:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="AY/zVajj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C68B083B9E; Mon, 14 Mar 2022 22:32:16 +0100 (CET) Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1076783994 for ; Mon, 14 Mar 2022 22:32:11 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=alpernebiyasak@gmail.com Received: by mail-wr1-x431.google.com with SMTP id p9so26054910wra.12 for ; Mon, 14 Mar 2022 14:32:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:from:subject:to:cc :references:content-language:in-reply-to:content-transfer-encoding; bh=bkaSTQWmwGIz3wS11V6XhUnhezdvf13AMNzfDZ/XSJ0=; b=AY/zVajjatcw8KcITq+TtUtf+P+BBhRs28d44Dk6dLv9kDAkKPTDhLXkJtAggUTEhQ j7W+KTVDGQ6R4Yydp1sWwY3K1k1Iyxllc6VVbXXeJCrh0pVIiTKmzH8TWp5SjhwiQuX/ Na3U0hyae1QPnKPJEQyMP+qB3xZLZ5PPphZ69bdRE4xLbe5U8blRVkC0D7gzvEKLDj1r fYDdJbDmVc5cihy9CTjBUZvGn3SECFPAlzR/HojCPGfTxBrk0gwS1JMP75KaTwXolJkL +kp8u4rZx9eiwMAYlz1CJO0hweXXzUfCB/RcmuqBJBJH9q37NxrPpofyunDjFNkiNVd8 prtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:from :subject:to:cc:references:content-language:in-reply-to :content-transfer-encoding; bh=bkaSTQWmwGIz3wS11V6XhUnhezdvf13AMNzfDZ/XSJ0=; b=cpT8ASE0Mvgvm5yAwdlDCuXyCmnyfG3JJb1RnOQx61Zh5rpTDQPgEUhjJGeq0FFldj rmaUojZe8sbN/5OCapHZycrQ0RqaVhRky2hs4g5jADF6uWawUrfX3UpLYeEL8xQ83jU/ Rms4DhOQMJuR1JOZiqxLiOaOfn00lEHIZPIcCmai6UwICnHgobtBW2Z0K61raiY8+4f+ XIowAU7bBb76jt4C4vGhMSciFMWH0Hc7o+R4lEtcoI0eRR1YhLy7Rk0Fa7mdVN6RUFoJ z494mKVWQPSpId06ay+Da/zw1BmfY6C3Jf2rHY4porAtbYWG54OKx2C8uLw6hywwndnX K+sQ== X-Gm-Message-State: AOAM530wJxWdaDOnketzfOOEK2MjOlm2eS3O3zEXzdcad4gmpu4wg/g+ dO5YrgCMMmGctgK+EW8zBSI= X-Google-Smtp-Source: ABdhPJzw3gY39fTvbh5Xv6Yv8iZDS5vRlMxxLAzFFDrnYBS3G1XCS9kkSqv3bvkRifgnM/v7tuLOrQ== X-Received: by 2002:a05:6000:1786:b0:1f0:4c5f:63ba with SMTP id e6-20020a056000178600b001f04c5f63bamr17683177wrg.377.1647293530694; Mon, 14 Mar 2022 14:32:10 -0700 (PDT) Received: from [192.168.0.74] ([178.233.26.119]) by smtp.gmail.com with ESMTPSA id z5-20020a05600c0a0500b0037bb8df81a2sm741251wmp.13.2022.03.14.14.32.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Mar 2022 14:32:10 -0700 (PDT) Message-ID: <809f7b24-3a84-d285-8a5f-37d28aa76773@gmail.com> Date: Tue, 15 Mar 2022 00:29:58 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 From: Alper Nebi Yasak Subject: Re: [PATCH v3 1/4] rockchip: gru: Set up SoC IO domain registers To: Jagan Teki Cc: u-boot@lists.denx.de, "Marty E . Plummer" , Simon Glass , Christian Hewitt , Andre Przywara , Peter Robinson , Kever Yang , Heiko Schocher , Johan Jonker , Tim Harvey , Alexandre Vicenzi , Fabio Estevam , Neil Armstrong , Philipp Tomsich , Artem Lapkin References: <20211224134347.41812-1-alpernebiyasak@gmail.com> <20211224134347.41812-2-alpernebiyasak@gmail.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 11/03/2022 22:49, Jagan Teki wrote: > On Fri, Dec 24, 2021 at 7:14 PM Alper Nebi Yasak > wrote: >> >> The RK3399 SoC needs to know the voltage value provided by some >> regulators, which is done by setting relevant register bits. Configure >> these the way other RK3399 boards do, but with the same values as are >> set in the equivalent code in coreboot. >> >> Signed-off-by: Alper Nebi Yasak >> Reviewed-by: Kever Yang >> --- >> There is a driver for this on Rockchip's repo, I managed to forward-port >> it and get it working. If that's more desirable than doing it per-board >> like this I can send that upstream (but I'd prefer to do it after this). >> >> [...] > > This looks like a board hack code for me, which is difficult to > maintain in the long run. Better go with UCLASS_POWER_DOMAIN, I > believe it would be a straightforward implementation. Yeah, it's a board hack that several other boards also do. I've got a driver working for this as mentioned above, but that adds a new UCLASS_IO_DOMAIN instead of using UCLASS_POWER_DOMAIN like you suggest. I had been tired of carrying these patches, so wanted to get any working version merged before attempting to upstream the driver and remove the hacky parts from all boards at once. I'm not sure how long would that take, and I didn't want this to be blocked by that. I've got to work on binman things for a while, so I might not be able to get to that and your other suggestions soon enough.