From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 23 Jun 2023 14:48:09 +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 1qCgCw-000aPC-Aa for lore@lore.pengutronix.de; Fri, 23 Jun 2023 14:48:09 +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 1qCgCs-0006NX-Ts; Fri, 23 Jun 2023 14:48:06 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qCgCm-0006Hs-0P; Fri, 23 Jun 2023 14:48:00 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1qCgCl-009VUX-7Q; Fri, 23 Jun 2023 14:47:59 +0200 Received: from rhi by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qCgCj-009fBa-8I; Fri, 23 Jun 2023 14:47:57 +0200 From: Roland Hieber To: distrokit@pengutronix.de Date: Fri, 23 Jun 2023 14:47:45 +0200 Message-Id: <20230623124755.2292833-5-rhi@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230623124755.2292833-1-rhi@pengutronix.de> References: <20230623124755.2292833-1-rhi@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [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: Roland Hieber 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 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