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 12B8FC433FE for ; Mon, 14 Mar 2022 15:36:26 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B41F083938; Mon, 14 Mar 2022 16:36:24 +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="pX6AK4ys"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3061183B58; Mon, 14 Mar 2022 16:36:22 +0100 (CET) Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) (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 E818C83531 for ; Mon, 14 Mar 2022 16:36:17 +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=jbx6244@gmail.com Received: by mail-ed1-x52e.google.com with SMTP id h13so20488070ede.5 for ; Mon, 14 Mar 2022 08:36:17 -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:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=hBAiq38IE/F2EmfDd9TMUqekwC/hAUKu5RI1mr7fKdI=; b=pX6AK4ysnT39pHg++f4ukq3QxyIuEgTqFmiTvA5BhFXvC+HLQ785ONfTlWgSbuOk5N 6BS9eWH1b4Klo2qWqvnI6mdkjcec/r/s5WDUli2BaGPjSWCl/kbbjUuv9kVG5PvjMNRw +8/x8YKpCjquvR5JThOrL2PM6Cgdjf9/MC8xBuFB/tw3pNLm0vIBBD6DfWj+ux1JAFZS kaodGEVEm6IUaCMmMtExBdde7LIlrftat/mb4DSarNadaSTqH8RLozHg7kDGI6+/y6wJ DHeNruq33n79lzH2ufX+g2SZJbMCojmROvj0sM4lsbGJNPO9NcvP/XdBNC+z/vEo5KST VKig== 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:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=hBAiq38IE/F2EmfDd9TMUqekwC/hAUKu5RI1mr7fKdI=; b=UK10TiDBwUyIaHPcghGQ4wdP2l5mCX6b6LdGkTFnmrQIoofjmA9GHOATDegao4aYcM aqLJwUggotUy/JMFOwxNU5bTMdfDTWwzRQ1MliU5f6cK6ePEWb2EoFFDCWriIswDC/yD uupd0ZNNjt01SjxPcs0h8LNwD5MeJEnneV6/DQUiNBmBaj69G6wLiTN0BEU6eDk2Adgi 6vGkyI6ggmSJ1Z7fVFRMm89jt1M63vdFSn9CW3VxMJz5j5PU1CXfC7PPruq/DVsSzGmX Tw5X+iFF82Yo69ejUabDJcvDO539gaiY3KmIv7u3DdIZ3ZeKAU8+QIoeY7l9CUBohMFY RNow== X-Gm-Message-State: AOAM532dBojId/UKayJpSNoPK2kQvBQE0chsYbnlU/d2lSO+BqffPTf9 KUrflPmnQo/mBiw8KgEhgTI= X-Google-Smtp-Source: ABdhPJzojOWIwTCfk+6GjltBH7MVndgkYDhVkhZKBrJxapYGd8nUavdT0UdlS1I0vMk4Mcr4FAfQtg== X-Received: by 2002:aa7:cb8b:0:b0:410:9aaf:2974 with SMTP id r11-20020aa7cb8b000000b004109aaf2974mr21226447edt.173.1647272177356; Mon, 14 Mar 2022 08:36:17 -0700 (PDT) Received: from [192.168.2.2] (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id l20-20020a1709062a9400b006ce71a88bf5sm6848424eje.183.2022.03.14.08.36.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Mar 2022 08:36:16 -0700 (PDT) Message-ID: Date: Mon, 14 Mar 2022 16:36:15 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v3 1/6] rockchip: move ROCKCHIP_STIMER_BASE to Kconfig Content-Language: en-US To: Kever Yang , Jagan Teki Cc: sjg@chromium.org, philipp.tomsich@vrull.eu, u-boot@lists.denx.de, =?UTF-8?Q?Pawe=c5=82_Jarosz?= , Heiko Stuebner , "open list:ARM/Rockchip SoC support" References: <20211230164825.6489-1-jbx6244@gmail.com> From: Johan Jonker In-Reply-To: Content-Type: text/plain; charset=UTF-8 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 3/12/22 15:39, Kever Yang wrote: > Hi Johan, > > On 2022/3/12 18:01, Johan Jonker wrote: >> On 3/12/22 09:51, Jagan Teki wrote: >>> On Thu, Dec 30, 2021 at 10:18 PM Johan Jonker wrote: >>>> Move ROCKCHIP_STIMER_BASE to Kconfig. >>>> >>>> Signed-off-by: Johan Jonker >>>> --- >>>> >>>> Changed V3: >>>> add ROCKCHIP_STIMER >>>> --- >>>> arch/arm/mach-rockchip/Kconfig | 22 ++++++++++++++++++++++ >>>> arch/arm/mach-rockchip/px30/Kconfig | 3 +++ >>>> arch/arm/mach-rockchip/rk3036/Kconfig | 3 +++ >>>> arch/arm/mach-rockchip/rk3128/Kconfig | 3 +++ >>>> arch/arm/mach-rockchip/rk322x/Kconfig | 3 +++ >>>> arch/arm/mach-rockchip/rk3288/Kconfig | 3 +++ >>>> arch/arm/mach-rockchip/rk3308/Kconfig | 10 ++++++---- >>>> arch/arm/mach-rockchip/rk3328/Kconfig | 3 +++ >>>> arch/arm/mach-rockchip/rk3368/Kconfig | 3 +++ >>>> arch/arm/mach-rockchip/rk3399/Kconfig | 3 +++ >>>> arch/arm/mach-rockchip/rk3568/Kconfig | 3 +++ >>>> include/configs/px30_common.h | 1 - >>>> include/configs/rk3036_common.h | 1 - >>>> include/configs/rk3128_common.h | 1 - >>>> include/configs/rk322x_common.h | 1 - >>>> include/configs/rk3288_common.h | 1 - >>>> include/configs/rk3308_common.h | 1 - >>>> include/configs/rk3328_common.h | 1 - >>>> include/configs/rk3368_common.h | 1 - >>>> include/configs/rk3399_common.h | 1 - >>>> include/configs/rk3568_common.h | 1 - >>>> 21 files changed, 55 insertions(+), 14 deletions(-) >>>> >>>> diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig >>>> index da6871eb..7a624c64 100644 >>>> --- a/arch/arm/mach-rockchip/Kconfig >>>> +++ b/arch/arm/mach-rockchip/Kconfig >>>> @@ -343,6 +343,28 @@ config ROCKCHIP_BOOT_MODE_REG >>>> The Soc will enter to different boot mode(defined in asm/arch-rockchip/boot_mode.h) >>>> according to the value from this register. >>>> >>>> +config ROCKCHIP_STIMER >>>> + bool "Rockchip STIMER support" >>>> + default y >>>> + depends on (ROCKCHIP_PX30|| \ >>>> + ROCKCHIP_RK3036|| \ >>>> + ROCKCHIP_RK3128|| \ >>>> + ROCKCHIP_RK322X|| \ >>>> + ROCKCHIP_RK3288|| \ >>>> + ROCKCHIP_RK3308|| \ >>>> + ROCKCHIP_RK3328|| \ >>>> + ROCKCHIP_RK3368|| \ >>>> + ROCKCHIP_RK3399|| \ >>>> + ROCKCHIP_RK3568) >>> What if we select !(SOC-Which-don't-support-stimer). I believe the >>> condition check here is much simpler. >> The condition would be simpler that's correct, but this patch is made >> with rk3066 in mind and there's no ROCKCHIP_RK3066 available yet. >> The right approach is to only include SoC's that have a specific >> property/functionality linked to there specific config tag. >> U-boot should be generic. And we should not have to fix all dependencies >> all over the place when a SoC doesn't have something. >> >> Please advise how to support other SoC's like rk3066. > Thanks for you hard working on this, would you mind to share what's the > motivation for support rk3066 and MK808 board? > RK3066 is an SoC release at 2012, which has been EOL for a long time, > and MK808 is a product at 2013, almost 10 years ago. One of the advantages of open source is that a manufacturer doesn't dictate where, when and how long a product can be used. It's about freedom of choice. No matter how many obstacles are put in the way. It works in two ways. Rockchip make use of free open source for there products. Users can add there own ideas/support based on manufacturer sources. If that's not your thing then join a group of monopolists for software, but don't sabotage things here. It's part of the game. MK808 was one of the first products with a Rockchip SoC that hobbyists where able to run there own kernel on and still does, so we keep that heritage alive. > > > I'm not object for enable more SoC support on the mainline, and I know > you have spend a lot > of time on this, I have do something like this before, but to be honest > I don't think it's a good idea to add support for > rk3066 on mainline now. If Linux is able to support the full product range then U-boot can do that too. The last 2 years were spent with upgrading and fixing the Linux Device tree. It would be nice if that was synced standard automatically for the Rockchip branch on a regular base. The more you neglect the more outdated it becomes. See rk3288 DT. > > > I merge the patches from Paweł Jarosz many years ago into rockchip local > u-boot and make it work, > I want to make the branch support as much SoCs as possible at that time. > But later I found there is no people to use > it, No wonder, no serious person would concern the Rockchip Linux and U-boot tree a usable option given it's current state. It's official kernel tree hasn't been updated for some while and based on LT versions that are outdated. Current Rockchip activity must be checked elsewhere. Documentation and TRM's must be obtained through other sources. https://github.com/rockchip-linux/ https://github.com/JeffyCN/rockchip_mirrors https://github.com/Caesar-github https://github.com/Poco-Ye/rk-datasheet > and the U-Boot is getting more and more heavy, old SoC support is > the one part people want to clean, > for it always bring in more '#if, #else' or something like this clean up Proper written code isn't a problem. The lack of regular maintenance creates a stock pile and then wait/hope for others to fix. Don't blame that on a new rk3066 SoC. With the addition of rk3066 a number of these spots are identified. More Kconfigs must be moved. Often DT sync from Linux. Common board TPL/SPL file fix. Nothing special. === Also apply subsets of a patch series when ready. That helps to get the flow going. Don't let people have to send them over and over again for years like with rk3066. === Move all Rockchip board maintainers in one central file, so that can be parsed be scripts. Verify that these maintainers are still active. (See rk3288 DT) === Reduce the DM footprint for TPL/SPL. We know for example what TPL/SPL sram driver to use (see dtoc) then "short cut"/"direct link" to select the driver in use without 10k+ of DM bloat ware. It leafs us more room for usbplug related staff for example. > series patches, and more terrible thing is how to > always maintain the source code works on the old hardware. I do make > everything work for a long time at first, > but one day my only rk3066 board is broken, and I'm not able to do it > anymore. The world wide web is your friend to find a replacement. It's not an excuse for a maintainer to not add another rk3066 device to his collection. ;) === As for MK808 it can live out of tree, free of limits. For basic convenience a place inside is preferred, but not necessary. Up to you. Johan > > Thanks, > - Kever >> Johan >> >>> Jagan.