From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 14 Aug 2023 18:36:44 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qVaYf-003z4b-5i for lore@lore.pengutronix.de; Mon, 14 Aug 2023 18:36:44 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1qVaYd-0007Lm-Hl; Mon, 14 Aug 2023 18:36:43 +0200 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qVaYc-0007LX-A2; Mon, 14 Aug 2023 18:36:42 +0200 Received: from rsc by pty.hi.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qVaYb-00CQkh-Rb; Mon, 14 Aug 2023 18:36:41 +0200 Date: Mon, 14 Aug 2023 18:36:41 +0200 From: Robert Schwebel To: Roland Hieber Message-ID: References: <20230623124755.2292833-1-rhi@pengutronix.de> <20230623124755.2292833-5-rhi@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230623124755.2292833-5-rhi@pengutronix.de> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain Subject: Re: [DistroKit] [PATCH 04/14] v7a: barebox: include generic bootstate node in device tree X-BeenThere: distrokit@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: distrokit@pengutronix.de Sender: "DistroKit" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: distrokit-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false Applied to next. On Fri, Jun 23, 2023 at 02:47:45PM +0200, Roland Hieber wrote: > Add a device tree fragment via CONFIG_EXTERNAL_DTS_FRAGMENTS in the > barebox config, which is appended to each device tree built by barebox. > Then add definitions for the state variables, which are the same on all > boards; board-specific state backends will be added in the next patches. > > Signed-off-by: Roland Hieber > --- > configs/platform-v7a/barebox-am335x.config | 2 +- > .../platform-v7a/barebox-am335x.config.diff | 2 +- > configs/platform-v7a/barebox-at91.config | 2 +- > configs/platform-v7a/barebox-at91.config.diff | 2 +- > configs/platform-v7a/barebox-mx6.config | 2 +- > configs/platform-v7a/barebox-mx6.config.diff | 2 +- > configs/platform-v7a/barebox-rpi2.config | 2 +- > configs/platform-v7a/barebox-rpi2.config.diff | 2 +- > configs/platform-v7a/barebox-stm32mp.config | 2 +- > .../platform-v7a/barebox-stm32mp.config.diff | 2 +- > configs/platform-v7a/barebox-vexpress.config | 2 +- > .../platform-v7a/barebox-vexpress.config.diff | 2 +- > configs/platform-v7a/barebox.config | 2 +- > configs/platform-v7a/dts/bootstate.dtsi | 50 +++++++++++++++++++ > 14 files changed, 63 insertions(+), 13 deletions(-) > create mode 100644 configs/platform-v7a/dts/bootstate.dtsi > > diff --git a/configs/platform-v7a/barebox-am335x.config b/configs/platform-v7a/barebox-am335x.config > index 3d950403c71a..d91181f4dfe2 100644 > --- a/configs/platform-v7a/barebox-am335x.config > +++ b/configs/platform-v7a/barebox-am335x.config > @@ -215,7 +215,7 @@ CONFIG_STATE=y > CONFIG_RESET_SOURCE=y > # CONFIG_MACHINE_ID is not set > # CONFIG_SYSTEMD_OF_WATCHDOG is not set > -CONFIG_EXTERNAL_DTS_FRAGMENTS="" > +CONFIG_EXTERNAL_DTS_FRAGMENTS="${PTXDIST_PLATFORMCONFIGDIR}/dts/bootstate.dtsi" > > # > # OP-TEE loading > diff --git a/configs/platform-v7a/barebox-am335x.config.diff b/configs/platform-v7a/barebox-am335x.config.diff > index f3f08c161636..d4ef2e860be7 100644 > --- a/configs/platform-v7a/barebox-am335x.config.diff > +++ b/configs/platform-v7a/barebox-am335x.config.diff > @@ -1,4 +1,4 @@ > -cae3c1d7fff409368cf71da28bce089f > +e1ec3277facf26f7ecc5fc49c9c31515 > # CONFIG_32BIT is undefined > # CONFIG_64BIT is undefined > # CONFIG_AM33XX_NET_BOOT is not set > diff --git a/configs/platform-v7a/barebox-at91.config b/configs/platform-v7a/barebox-at91.config > index 754552b3c9df..5dc6ec9dc51d 100644 > --- a/configs/platform-v7a/barebox-at91.config > +++ b/configs/platform-v7a/barebox-at91.config > @@ -226,7 +226,7 @@ CONFIG_STATE=y > CONFIG_RESET_SOURCE=y > # CONFIG_MACHINE_ID is not set > # CONFIG_SYSTEMD_OF_WATCHDOG is not set > -CONFIG_EXTERNAL_DTS_FRAGMENTS="" > +CONFIG_EXTERNAL_DTS_FRAGMENTS="${PTXDIST_PLATFORMCONFIGDIR}/dts/bootstate.dtsi" > > # > # OP-TEE loading > diff --git a/configs/platform-v7a/barebox-at91.config.diff b/configs/platform-v7a/barebox-at91.config.diff > index e7550cca7299..937c41987be2 100644 > --- a/configs/platform-v7a/barebox-at91.config.diff > +++ b/configs/platform-v7a/barebox-at91.config.diff > @@ -1,4 +1,4 @@ > -cae3c1d7fff409368cf71da28bce089f > +e1ec3277facf26f7ecc5fc49c9c31515 > # CONFIG_32BIT is undefined > # CONFIG_64BIT is undefined > CONFIG_ARCH_AT91=y > diff --git a/configs/platform-v7a/barebox-mx6.config b/configs/platform-v7a/barebox-mx6.config > index c2e6cc122c1c..79e41dda076f 100644 > --- a/configs/platform-v7a/barebox-mx6.config > +++ b/configs/platform-v7a/barebox-mx6.config > @@ -289,7 +289,7 @@ CONFIG_STATE=y > CONFIG_RESET_SOURCE=y > # CONFIG_MACHINE_ID is not set > # CONFIG_SYSTEMD_OF_WATCHDOG is not set > -CONFIG_EXTERNAL_DTS_FRAGMENTS="" > +CONFIG_EXTERNAL_DTS_FRAGMENTS="${PTXDIST_PLATFORMCONFIGDIR}/dts/bootstate.dtsi" > > # > # OP-TEE loading > diff --git a/configs/platform-v7a/barebox-mx6.config.diff b/configs/platform-v7a/barebox-mx6.config.diff > index 40a9a4fc7b36..5b99586b9773 100644 > --- a/configs/platform-v7a/barebox-mx6.config.diff > +++ b/configs/platform-v7a/barebox-mx6.config.diff > @@ -1,4 +1,4 @@ > -cae3c1d7fff409368cf71da28bce089f > +e1ec3277facf26f7ecc5fc49c9c31515 > # CONFIG_32BIT is undefined > # CONFIG_64BIT is undefined > # CONFIG_ARCH_BCM283X is not set > diff --git a/configs/platform-v7a/barebox-rpi2.config b/configs/platform-v7a/barebox-rpi2.config > index d562d307fa94..70fba6eeedc2 100644 > --- a/configs/platform-v7a/barebox-rpi2.config > +++ b/configs/platform-v7a/barebox-rpi2.config > @@ -214,7 +214,7 @@ CONFIG_STATE=y > CONFIG_RESET_SOURCE=y > # CONFIG_MACHINE_ID is not set > # CONFIG_SYSTEMD_OF_WATCHDOG is not set > -CONFIG_EXTERNAL_DTS_FRAGMENTS="" > +CONFIG_EXTERNAL_DTS_FRAGMENTS="${PTXDIST_PLATFORMCONFIGDIR}/dts/bootstate.dtsi" > > # > # OP-TEE loading > diff --git a/configs/platform-v7a/barebox-rpi2.config.diff b/configs/platform-v7a/barebox-rpi2.config.diff > index e3a266687572..e6dce16ce7d4 100644 > --- a/configs/platform-v7a/barebox-rpi2.config.diff > +++ b/configs/platform-v7a/barebox-rpi2.config.diff > @@ -1,4 +1,4 @@ > -cae3c1d7fff409368cf71da28bce089f > +e1ec3277facf26f7ecc5fc49c9c31515 > CONFIG_ARM_ASM_UNIFIED=y > # CONFIG_CMD_NVMEM is not set > CONFIG_DRIVER_NET_BCMGENET=y > diff --git a/configs/platform-v7a/barebox-stm32mp.config b/configs/platform-v7a/barebox-stm32mp.config > index 85a40d37ce31..08a21f50c00e 100644 > --- a/configs/platform-v7a/barebox-stm32mp.config > +++ b/configs/platform-v7a/barebox-stm32mp.config > @@ -207,7 +207,7 @@ CONFIG_STATE=y > CONFIG_RESET_SOURCE=y > # CONFIG_MACHINE_ID is not set > # CONFIG_SYSTEMD_OF_WATCHDOG is not set > -CONFIG_EXTERNAL_DTS_FRAGMENTS="" > +CONFIG_EXTERNAL_DTS_FRAGMENTS="${PTXDIST_PLATFORMCONFIGDIR}/dts/bootstate.dtsi" > > # > # OP-TEE loading > diff --git a/configs/platform-v7a/barebox-stm32mp.config.diff b/configs/platform-v7a/barebox-stm32mp.config.diff > index 284be0e5e4ff..e951f3824fd3 100644 > --- a/configs/platform-v7a/barebox-stm32mp.config.diff > +++ b/configs/platform-v7a/barebox-stm32mp.config.diff > @@ -1,4 +1,4 @@ > -cae3c1d7fff409368cf71da28bce089f > +e1ec3277facf26f7ecc5fc49c9c31515 > # CONFIG_32BIT is undefined > # CONFIG_64BIT is undefined > # CONFIG_ARCH_BCM283X is not set > diff --git a/configs/platform-v7a/barebox-vexpress.config b/configs/platform-v7a/barebox-vexpress.config > index b85f6653126c..de35478f9a91 100644 > --- a/configs/platform-v7a/barebox-vexpress.config > +++ b/configs/platform-v7a/barebox-vexpress.config > @@ -192,7 +192,7 @@ CONFIG_STATE=y > CONFIG_RESET_SOURCE=y > # CONFIG_MACHINE_ID is not set > # CONFIG_SYSTEMD_OF_WATCHDOG is not set > -CONFIG_EXTERNAL_DTS_FRAGMENTS="" > +CONFIG_EXTERNAL_DTS_FRAGMENTS="${PTXDIST_PLATFORMCONFIGDIR}/dts/bootstate.dtsi" > > # > # OP-TEE loading > diff --git a/configs/platform-v7a/barebox-vexpress.config.diff b/configs/platform-v7a/barebox-vexpress.config.diff > index d323768fc1c1..f50d7f0f1195 100644 > --- a/configs/platform-v7a/barebox-vexpress.config.diff > +++ b/configs/platform-v7a/barebox-vexpress.config.diff > @@ -1,4 +1,4 @@ > -cae3c1d7fff409368cf71da28bce089f > +e1ec3277facf26f7ecc5fc49c9c31515 > # CONFIG_32BIT is undefined > # CONFIG_64BIT is undefined > CONFIG_AMBA_SP804=y > diff --git a/configs/platform-v7a/barebox.config b/configs/platform-v7a/barebox.config > index e8989d4e4d3a..27a6373837b0 100644 > --- a/configs/platform-v7a/barebox.config > +++ b/configs/platform-v7a/barebox.config > @@ -213,7 +213,7 @@ CONFIG_STATE=y > CONFIG_RESET_SOURCE=y > # CONFIG_MACHINE_ID is not set > # CONFIG_SYSTEMD_OF_WATCHDOG is not set > -CONFIG_EXTERNAL_DTS_FRAGMENTS="" > +CONFIG_EXTERNAL_DTS_FRAGMENTS="${PTXDIST_PLATFORMCONFIGDIR}/dts/bootstate.dtsi" > > # > # OP-TEE loading > diff --git a/configs/platform-v7a/dts/bootstate.dtsi b/configs/platform-v7a/dts/bootstate.dtsi > new file mode 100644 > index 000000000000..d41c888dbd43 > --- /dev/null > +++ b/configs/platform-v7a/dts/bootstate.dtsi > @@ -0,0 +1,50 @@ > +/** Generic bootstate node for all platforms **********************************/ > +/ { > + state: state { > + bootstate: bootstate {}; > + }; > +}; > + > +&bootstate { > + #address-cells = <1>; > + #size-cells = <1>; > + > + system0 { > + #address-cells = <1>; > + #size-cells = <1>; > + > + remaining_attempts@0 { > + reg = <0x0 0x4>; > + type = "uint32"; > + default = <3>; > + }; > + > + priority@4 { > + reg = <0x4 0x4>; > + type = "uint32"; > + default = <20>; > + }; > + }; > + > + system1 { > + #address-cells = <1>; > + #size-cells = <1>; > + > + remaining_attempts@8 { > + reg = <0x8 0x4>; > + type = "uint32"; > + default = <3>; > + }; > + > + priority@c { > + reg = <0xc 0x4>; > + type = "uint32"; > + default = <10>; > + }; > + }; > + > + last_chosen@10 { > + reg = <0x10 0x4>; > + type = "uint32"; > + }; > +}; > -- > 2.39.2 > > > -- Pengutronix e.K. | Dipl.-Ing. Robert Schwebel | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |