J7200 device tree sync from v6.6-rc1 to u-boot
Subsystems (2)
v4 cover J7200 device tree sync from v6.6-rc1 to u-boot
This series tries to sync device tree files from Linux v6.6-rc1 while making changes to the u-boot.dtsi and r5-common-proc-board.dts files in order to remove duplicate nodes and achieve successful boot.
DMA fixes [0] are currently being upstreamed to Linux. They'll be fixed in U-boot post their merge in Linux.
Previous version of patch no longer boots in next branch due to a recent change with how bootph-pre-ram now works [2]. Changes have been in this version to avoid future issues with that.
Boot log is included in [1]
[0]: https://lore.kernel.org/all/[email protected]/
[1]: https://gist.github.com/reidt1/3bc6c5a0230346a5136aa857485b2cdb
[2]: https://lore.kernel.org/u-boot/CAPnjgZ3MgWX8T0A0SofphEr_Xd77pE3hte9DNye1RuBVeB9N8Q@mail.gmail.com/
---
Changes in v4:
- Changed bootph-pre-ram to bootph-all in response to [2]
- Removed serdes.h from series since it has been added already
- Rebased off of "ec6f06bddc configs: Resync with savedefconfig"
- Removed reviewed-by on patch 2 due to changes
- Link to v3: https://lore.kernel.org/u-boot/[email protected]/
Reid Tonking (2):
arm: mach-k3: j7200: Add mcu_timer0 id to the dev list
arm: dts: j7200: dts sync with Linux 6.6-rc1
.../k3-j7200-common-proc-board-u-boot.dtsi | 208 +++---- arch/arm/dts/k3-j7200-common-proc-board.dts | 186 +++--- arch/arm/dts/k3-j7200-main.dtsi | 535 +++++++++++++++++- arch/arm/dts/k3-j7200-mcu-wakeup.dtsi | 286 +++++++++- .../arm/dts/k3-j7200-r5-common-proc-board.dts | 311 +--------- arch/arm/dts/k3-j7200-som-p0.dtsi | 154 +++-- arch/arm/dts/k3-j7200-thermal.dtsi | 47 ++ arch/arm/dts/k3-j7200.dtsi | 30 +- arch/arm/mach-k3/j7200/dev-data.c | 1 + 9 files changed, 1212 insertions(+), 546 deletions(-) create mode 100644 arch/arm/dts/k3-j7200-thermal.dtsi
Signature · 1 line
2.34.1
PATCH v4 1/2 arm: mach-k3: j7200: Add mcu_timer0 id to the dev list
mcu_timer0 is now used as the tick timer in u-boot, so this adds the timer to the soc device list so it can be enabled via the k3 power controller.
--- arch/arm/mach-k3/j7200/dev-data.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-k3/j7200/dev-data.c +1 -0
@@ -46,6 +46,7 @@ static struct ti_lpsc soc_lpsc_list[] = {static struct ti_dev soc_dev_list[] = {PSC_DEV (30 , &soc_lpsc_list[0 ]), +PSC_DEV (35 , &soc_lpsc_list[0 ]),PSC_DEV (61 , &soc_lpsc_list[1 ]),PSC_DEV (90 , &soc_lpsc_list[2 ]),PSC_DEV (8 , &soc_lpsc_list[3 ]),
Signature · 1 line
2.34.1
PATCH v4 2/2 arm: dts: j7200: dts sync with Linux 6.6-rc1
In reply to Reid TonkingSync j7200 dts with Linux 6.6-rc1
- k3-j7200-r5-common-proc-board.dts now inherits from k3-j7200-common-proc-board.dts instead of k3-j7200-som-p0.dtsi. This allows us to trim down the r5 file considerably by using existing properties
- remove pimux nodes from r5 file
- remove duplicate nodes & node properties from r5/u-boot files
- mcu_timer0 now used instead of timer1
mcu_timer0 device id added to dev-data.c file in order to work
- remove cpsw node
This node is no longer required since the compatible is now fixed
- remove dummy_clock_19_2_mhz
This node wasn't being used anyhere, so it was removed
- remove dummy_clock_200mhz
main_sdhci0 & main_sdhci1 no longer need dummy clock for eMMC/SD
- fix secure proxy node
mcu_secproxy changed to used secure_prxy_mcu which is already defined in k3-j7200-mcu-wakeup.dtsi
- removed &mcu_ringacc property override since they're present in v6.6-rc1
--- .../k3-j7200-common-proc-board-u-boot.dtsi | 208 +++---- arch/arm/dts/k3-j7200-common-proc-board.dts | 186 +++--- arch/arm/dts/k3-j7200-main.dtsi | 535 +++++++++++++++++- arch/arm/dts/k3-j7200-mcu-wakeup.dtsi | 286 +++++++++- .../arm/dts/k3-j7200-r5-common-proc-board.dts | 311 +--------- arch/arm/dts/k3-j7200-som-p0.dtsi | 154 +++-- arch/arm/dts/k3-j7200-thermal.dtsi | 47 ++ arch/arm/dts/k3-j7200.dtsi | 30 +- 8 files changed, 1211 insertions(+), 546 deletions(-) create mode 100644 arch/arm/dts/k3-j7200-thermal.dtsi
arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi +109 -99
@@ -1,200 +1,210 @@ // SPDX-License-Identifier: GPL-2.0 /* - * Copyright (C) 2020 Texas Instruments Incorporated - https://www.ti.com/ + * Copyright (C) 2020-2023 Texas Instruments Incorporated - https://www.ti.com/ */ #include "k3-j7200-binman.dtsi" / { chosen { - stdout-path = "serial2:115200n8"; - tick-timer = &timer1; - }; - - aliases { - ethernet0 = &cpsw_port1; - i2c0 = &wkup_i2c0; - i2c1 = &mcu_i2c0; - i2c2 = &mcu_i2c1; - i2c3 = &main_i2c0; + tick-timer = &mcu_timer0; }; }; &cbass_main { - bootph-pre-ram; + bootph-all; }; &main_navss { - bootph-pre-ram; + bootph-all; +}; + +&main_esm { + bootph-all; }; &cbass_mcu_wakeup { - bootph-pre-ram; - - timer1: timer@40400000 { - compatible = "ti,omap5430-timer"; - reg = <0x0 0x40400000 0x0 0x80>; - ti,timer-alwon; - clock-frequency = <250000000>; - bootph-pre-ram; - }; + bootph-all; chipid@43000014 { - bootph-pre-ram; + bootph-all; }; +}; - mcu_navss: bus@28380000 { - bootph-pre-ram; - #address-cells = <2>; - #size-cells = <2>; - - ringacc@2b800000 { - reg = <0x0 0x2b800000 0x0 0x400000>, - <0x0 0x2b000000 0x0 0x400000>, - <0x0 0x28590000 0x0 0x100>, - <0x0 0x2a500000 0x0 0x40000>, - <0x0 0x28440000 0x0 0x40000>; - reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target", "cfg"; - bootph-pre-ram; - }; - - dma-controller@285c0000 { - reg = <0x0 0x285c0000 0x0 0x100>, - <0x0 0x284c0000 0x0 0x4000>, - <0x0 0x2a800000 0x0 0x40000>, - <0x0 0x284a0000 0x0 0x4000>, - <0x0 0x2aa00000 0x0 0x40000>, - <0x0 0x28400000 0x0 0x2000>; - reg-names = "gcfg", "rchan", "rchanrt", "tchan", - "tchanrt", "rflow"; - bootph-pre-ram; - }; - }; +&mcu_navss { + bootph-all; +}; + +&mcu_ringacc { + bootph-all; +}; + +&mcu_udmap { + reg = <0x0 0x285c0000 0x0 0x100>, + <0x0 0x284c0000 0x0 0x4000>, + <0x0 0x2a800000 0x0 0x40000>, + <0x0 0x284a0000 0x0 0x4000>, + <0x0 0x2aa00000 0x0 0x40000>, + <0x0 0x28400000 0x0 0x2000>; + reg-names = "gcfg", "rchan", "rchanrt", "tchan", + "tchanrt", "rflow"; + bootph-all; }; &secure_proxy_main { - bootph-pre-ram; + bootph-all; }; &dmsc { - bootph-pre-ram; + bootph-all; k3_sysreset: sysreset-controller { compatible = "ti,sci-sysreset"; - bootph-pre-ram; + bootph-all; }; }; &k3_pds { - bootph-pre-ram; + bootph-all; }; &k3_clks { - bootph-pre-ram; + bootph-all; }; &k3_reset { - bootph-pre-ram; + bootph-all; }; &wkup_pmx0 { - bootph-pre-ram; + bootph-all; +}; + +&wkup_pmx2 { + bootph-all; }; &main_pmx0 { - bootph-pre-ram; + bootph-all; }; &main_uart0 { - bootph-pre-ram; + bootph-all; +}; + +&main_uart2 { + bootph-all; }; &mcu_uart0 { - bootph-pre-ram; + bootph-all; }; &main_sdhci0 { - bootph-pre-ram; + bootph-all; }; &main_sdhci1 { - bootph-pre-ram; + bootph-all; }; &wkup_i2c0 { - bootph-pre-ram; + bootph-all; }; &main_i2c0 { - bootph-pre-ram; + bootph-all; }; -&main_i2c0_pins_default { - bootph-pre-ram; +&exp1 { + bootph-all; }; &exp2 { - bootph-pre-ram; + bootph-all; }; &mcu_cpsw { - reg = <0x0 0x46000000 0x0 0x200000>, - <0x0 0x40f00200 0x0 0x8>; - reg-names = "cpsw_nuss", "mac_efuse"; - /delete-property/ ranges; - - cpsw-phy-sel@40f04040 { - compatible = "ti,am654-cpsw-phy-sel"; - reg= <0x0 0x40f04040 0x0 0x4>; - reg-names = "gmii-sel"; - }; + bootph-all; }; -&main_usbss0_pins_default { - bootph-pre-ram; +&mcu_uart0 { + bootph-all; }; -&usbss0 { - bootph-pre-ram; - ti,usb2-only; +&wkup_i2c0 { + bootph-all; }; -&usb0 { - dr_mode = "peripheral"; - bootph-pre-ram; +&wkup_uart0 { + bootph-all; }; -&mcu_fss0_hpb0_pins_default { - bootph-pre-ram; +&fss { + bootph-all; }; -&fss { - bootph-pre-ram; +&main_uart0_pins_default { + bootph-all; +}; + +&main_mmc1_pins_default { + bootph-all; +}; + +&main_i2c0_pins_default { + bootph-all; +}; + +&wkup_i2c0_pins_default { + bootph-all; +}; + +&wkup_uart0_pins_default { + bootph-all; +}; + +&wkup_gpio_pins_default { + bootph-all; +}; + +&wkup_gpio0 { + bootph-all; }; &hbmc { - bootph-pre-ram; + bootph-all; flash@0,0 { - bootph-pre-ram; + bootph-all; }; }; &hbmc_mux { - bootph-pre-ram; + bootph-all; +}; + +&usbss0 { + bootph-all; + ti,usb2-only; +}; + +&usb0 { + dr_mode = "peripheral"; + bootph-all; +}; + +&ospi0 { + bootph-all; }; &serdes_ln_ctrl { - u-boot,mux-autoprobe; + bootph-all; }; &usb_serdes_mux { - u-boot,mux-autoprobe; + bootph-all; }; &serdes0 { - bootph-pre-ram; -}; - -&main_r5fss0 { - ti,cluster-mode = <0>; + bootph-all; };
arch/arm/dts/k3-j7200-common-proc-board.dts +115 -71
283 lines not on this page · raw message
arch/arm/dts/k3-j7200-main.dtsi +521 -14
799 lines not on this page · raw message
arch/arm/dts/k3-j7200-mcu-wakeup.dtsi +274 -12
383 lines not on this page · raw message
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +30 -281
356 lines not on this page · raw message
arch/arm/dts/k3-j7200-som-p0.dtsi +104 -50
226 lines not on this page · raw message
arch/arm/dts/k3-j7200-thermal.dtsi new file +47 -0
47 lines not on this page · raw message
arch/arm/dts/k3-j7200.dtsi +11 -19
@@ -7,9 +7,10 @@ #include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/arm-gic.h> -#include <dt-bindings/pinctrl/k3.h> #include <dt-bindings/soc/ti,sci_pm_domain.h> +#include "k3-pinctrl.h" + / { model = "Texas Instruments K3 J7200 SoC"; compatible = "ti,j7200";
@@ -17,21 +18,6 @@ #address-cells = <2>; #size-cells = <2>; - aliases { - serial0 = &wkup_uart0; - serial1 = &mcu_uart0; - serial2 = &main_uart0; - serial3 = &main_uart1; - serial4 = &main_uart2; - serial5 = &main_uart3; - serial6 = &main_uart4; - serial7 = &main_uart5; - serial8 = &main_uart6; - serial9 = &main_uart7; - serial10 = &main_uart8; - serial11 = &main_uart9; - }; - chosen { }; cpus {
@@ -60,7 +46,7 @@ i-cache-sets = <256>; d-cache-size = <0x8000>; d-cache-line-size = <64>; - d-cache-sets = <128>; + d-cache-sets = <256>; next-level-cache = <&L2_0>; };
@@ -74,7 +60,7 @@ i-cache-sets = <256>; d-cache-size = <0x8000>; d-cache-line-size = <64>; - d-cache-sets = <128>; + d-cache-sets = <256>; next-level-cache = <&L2_0>; }; };
@@ -82,15 +68,17 @@ L2_0: l2-cache0 { compatible = "cache"; cache-level = <2>; + cache-unified; cache-size = <0x100000>; cache-line-size = <64>; - cache-sets = <2048>; + cache-sets = <1024>; next-level-cache = <&msmc_l3>; }; msmc_l3: l3-cache0 { compatible = "cache"; cache-level = <3>; + cache-unified; }; firmware {
@@ -124,9 +112,11 @@ #size-cells = <2>; ranges = <0x00 0x00100000 0x00 0x00100000 0x00 0x00020000>, /* ctrl mmr */ <0x00 0x00600000 0x00 0x00600000 0x00 0x00031100>, /* GPIO */ + <0x00 0x00700000 0x00 0x00700000 0x00 0x00001000>, /* ESM */ <0x00 0x00a40000 0x00 0x00a40000 0x00 0x00000800>, /* timesync router */ <0x00 0x01000000 0x00 0x01000000 0x00 0x0d000000>, /* Most peripherals */ <0x00 0x30000000 0x00 0x30000000 0x00 0x0c400000>, /* MAIN NAVSS */ + <0x00 0x6f000000 0x00 0x6f000000 0x00 0x00310000>, /* A72 PERIPHBASE */ <0x00 0x70000000 0x00 0x70000000 0x00 0x00800000>, /* MSMC RAM */ <0x00 0x18000000 0x00 0x18000000 0x00 0x08000000>, /* PCIe1 DAT0 */ <0x41 0x00000000 0x41 0x00000000 0x01 0x00000000>, /* PCIe1 DAT1 */
@@ -165,6 +155,8 @@ <0x07 0x00000000 0x07 0x00000000 0x01 0x00000000>; /* FSS OSPI1 data region 3 */ }; }; + + #include "k3-j7200-thermal.dtsi" }; /* Now include the peripherals for each bus segments */
Signature · 1 line
2.34.1
A message that is not in the archive (sent off-list or not yet received): 20231005113336.tysphzl4dvc65oks@litigate
Re: [PATCH v4 2/2] arm: dts: j7200: dts sync with Linux 6.6-rc1
Quoted 50 lines · Nishanth Menon
Quoted 1 line · Reid Tonking
Sync j7200 dts with Linux 6.6-rc1
[..]
Quoted 47 lines
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +3
-17@@ -1,13 +1,14 @@ // SPDX-License-Identifier: GPL-2.0 /* - * Copyright (C) 2020 Texas Instruments Incorporated - https://www.ti.com/ + * Copyright (C) 2020-2023 Texas Instruments Incorporated - https://www.ti.com/ */ /dts-v1/; -#include "k3-j7200-som-p0.dtsi" +#include "k3-j7200-common-proc-board.dts" #include "k3-j7200-ddr-evm-lp4-2666.dtsi" #include "k3-j721e-ddr.dtsi" +#include "k3-j7200-common-proc-board-u-boot.dtsi" / { aliases {@@ -15,17 +16,6 @@ remoteproc1 = &a72_0; }; - chosen { - stdout-path = &main_uart0; - tick-timer = &timer1; - firmware-loader = &fs_loader0; - }; - - fs_loader0: fs_loader@0 { - bootph-all; - compatible = "u-boot,fs-loader"; - }; - a72_0: a72@0 { compatible = "ti,am654-rproc"; reg = <0x0 0x00a90000 0x0 0x10>;@@ -39,21 +29,17 @@ ti,sci = <&dmsc>; ti,sci-proc-id = <32>; ti,sci-host-id = <10>; - bootph-pre-ram; - }; - - clk_200mhz: dummy_clock_200mhz {
Quoted 9 lines
arch/arm/dts/k3-j7200-r5-common-proc-board.dts line 32
Quoted 5 lines
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +1
-4- compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <200000000>; - bootph-pre-ram; + bootph-all;Here and else where in the r5 file: why switch from pre-ram to bootph-all ? dont we need these prior to ddr initialization?
Due to the change in how booth-pre-ram works [0], bootph-pre-ram alone no longer works. U-boot docs Pre-Relocation Support section says some-ram can be used for u-boot prior to reloc, but not spl. So like Massimo mentioned in the linked discussion, some-ram + pre-ram can work, as well as -all. Outside of affecting the TPL phase, I'm not sure I know of a difference in regards to how it affects pre-ddr.
[0]: https://lore.kernel.org/u-boot/CAPnjgZ3MgWX8T0A0SofphEr_Xd77pE3hte9DNye1RuBVeB9N8Q@mail.gmail.com/
Quoted 6 lines
[...]
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Re: [PATCH v4 2/2] arm: dts: j7200: dts sync with Linux 6.6-rc1
On 09:04-20231005, reidt wrote:
[...]
Quoted 19 lines
Quoted 10 lines
arch/arm/dts/k3-j7200-r5-common-proc-board.dts line 32
Quoted 6 lines
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +1
-5- clk_200mhz: dummy_clock_200mhz { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <200000000>; - bootph-pre-ram; + bootph-all;Here and else where in the r5 file: why switch from pre-ram to bootph-all ? dont we need these prior to ddr initialization?
Due to the change in how booth-pre-ram works [0], bootph-pre-ram alone no longer works. U-boot docs Pre-Relocation Support section says some-ram can be used for u-boot prior to reloc, but not spl. So like Massimo mentioned in the linked discussion, some-ram + pre-ram can work, as well as -all. Outside of affecting the TPL phase, I'm not sure I know of a difference in regards to how it affects pre-ddr.
Quoted 2 lines
[0]: https://lore.kernel.org/u-boot/CAPnjgZ3MgWX8T0A0SofphEr_Xd77pE3hte9DNye1RuBVeB9N8Q@mail.gmail.com/
Also see:
https://github.com/u-boot/u-boot/commit/0cb6515cdab483ce8b30680803cbed0a63044cdc
https://github.com/u-boot/u-boot/commit/7e5b6f1cff846218b824a4d906e2831c15864a53
https://lore.kernel.org/all/[email protected]/
etc..
as a rule of thumb: u-boot.dtsi uses bootph-all; r5-xyz.dts uses booth-pre-ram
Where this failed completely is when A53 started using booth-pre-ram in which case the u-boot stages failed on A53 side.
The rule of thumb I explained works across silicon (bar other issues).
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Re: [PATCH v4 2/2] arm: dts: j7200: dts sync with Linux 6.6-rc1
Quoted 30 lines · Nishanth Menon
On 09:04-20231005, reidt wrote:
[...]Quoted 19 lines
Quoted 10 lines
arch/arm/dts/k3-j7200-r5-common-proc-board.dts line 32
Quoted 6 lines
arch/arm/dts/k3-j7200-r5-common-proc-board.dts +1
-5- clk_200mhz: dummy_clock_200mhz { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <200000000>; - bootph-pre-ram; + bootph-all;Here and else where in the r5 file: why switch from pre-ram to bootph-all ? dont we need these prior to ddr initialization?
Due to the change in how booth-pre-ram works [0], bootph-pre-ram alone no longer works. U-boot docs Pre-Relocation Support section says some-ram can be used for u-boot prior to reloc, but not spl. So like Massimo mentioned in the linked discussion, some-ram + pre-ram can work, as well as -all. Outside of affecting the TPL phase, I'm not sure I know of a difference in regards to how it affects pre-ddr.
Quoted 2 lines
[0]: https://lore.kernel.org/u-boot/CAPnjgZ3MgWX8T0A0SofphEr_Xd77pE3hte9DNye1RuBVeB9N8Q@mail.gmail.com/
Also see:
https://github.com/u-boot/u-boot/commit/0cb6515cdab483ce8b30680803cbed0a63044cdc
https://github.com/u-boot/u-boot/commit/7e5b6f1cff846218b824a4d906e2831c15864a53
https://lore.kernel.org/all/[email protected]/
etc..
Quoted 6 lines
as a rule of thumb:
u-boot.dtsiuses bootph-all;r5-xyz.dtsuses booth-pre-ramWhere this failed completely is when A53 started using booth-pre-ram in which case the u-boot stages failed on A53 side.
The rule of thumb I explained works across silicon (bar other issues).
Ah, good to know! Appreciate the info, I'll have v5 up soon with that change.
Thanks,
Reid
Quoted 4 lines
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D