ARCH Tegra improvements
Subsystems (3)
cover ARCH Tegra improvements
- Expand plld2 support for T124 and T210 same as for other generations
- Sync common tegra30 and tegra124 trees with upstream (DSI nodes)
- Mark DC with pre-relocation flag for T124 like other gens have
Svyatoslav Ryhel (5):
ARM: tegra124: clock: implement PLLD2 support
ARM: tegra210: clock: implement PLLD2 support
ARM: tegra30: dts: complete DSI nodes
ARM: tegra124: dts: add missing DSI nodes
ARM: tegra124: dts: mark HOST1X and DC with pre-relocation flag
arch/arm/dts/tegra124-nyan-big-u-boot.dtsi | 7 ---- arch/arm/dts/tegra124-u-boot.dtsi | 13 +++++++ arch/arm/dts/tegra124.dtsi | 39 +++++++++++++++++++ arch/arm/dts/tegra30.dtsi | 21 +++++++++- .../include/asm/arch-tegra124/clock-tables.h | 2 +- .../include/asm/arch-tegra210/clock-tables.h | 2 +- arch/arm/mach-tegra/tegra124/clock.c | 7 ++++ arch/arm/mach-tegra/tegra210/clock.c | 7 ++++ 8 files changed, 88 insertions(+), 10 deletions(-)
Signature · 1 line
2.43.0
PATCH 1/5 ARM: tegra124: clock: implement PLLD2 support
PLLD2 is a simple clock (controlled by 2 registers) and appears starting from T30. Primary use of PLLD2 is as main HDMI clock parent.
--- arch/arm/include/asm/arch-tegra124/clock-tables.h | 2 +- arch/arm/mach-tegra/tegra124/clock.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-)
arch/arm/include/asm/arch-tegra124/clock-tables.h +1 -1
@@ -24,6 +24,7 @@ enum clock_id {CLOCK_ID_XCPU =CLOCK_ID_FIRST_SIMPLE ,CLOCK_ID_EPCI ,CLOCK_ID_SFROM32KHZ , +CLOCK_ID_DISPLAY2 , CLOCK_ID_DP, /* Special for Tegra124 *//* These are the base clocks (inputs to the Tegra SoC) */
@@ -37,7 +38,6 @@ enum clock_id {* These are clock IDs that are used in table clock_source[][] * but will not be assigned as a clock source for any peripheral. */ -CLOCK_ID_DISPLAY2 ,CLOCK_ID_CGENERAL2 ,CLOCK_ID_CGENERAL3 , CLOCK_ID_MEMORY2,
arch/arm/mach-tegra/tegra124/clock.c +7 -0
@@ -598,6 +598,8 @@ struct clk_pll_info tegra_pll_info_table[CLOCK_ID_PLL_COUNT] = { .lock_ena = 9, .lock_det = 11, .kcp_shift = 6, .kcp_mask = 3, .kvco_shift = 0, .kvco_mask = 1 }, /* PLLE */ { .m_shift = 0, .m_mask = 0x0F, .n_shift = 8, .n_mask = 0x3FF, .p_shift = 20, .p_mask = 0x07, .lock_ena = 18, .lock_det = 27, .kcp_shift = 8, .kcp_mask = 0xF, .kvco_shift = 4, .kvco_mask = 0xF }, /* PLLS (RESERVED) */ + { .m_shift = 0, .m_mask = 0x1F, .n_shift = 8, .n_mask = 0x3FF, .p_shift = 20, .p_mask = 0x07, + .lock_ena = 22, .lock_det = 27, .kcp_shift = 8, .kcp_mask = 0xF, .kvco_shift = 4, .kvco_mask = 0xF }, /* PLLD2 */ { .m_shift = 0, .m_mask = 0xFF, .n_shift = 8, .n_mask = 0xFF, .p_shift = 20, .p_mask = 0xF, .lock_ena = 30, .lock_det = 27, .kcp_shift = 25, .kcp_mask = 3, .kvco_shift = 24, .kvco_mask = 1 }, /* PLLDP */ };
@@ -852,6 +854,9 @@ enum clock_id clk_id_to_pll_id(int clk_id)case TEGRA124_CLK_PLL_D :case TEGRA124_CLK_PLL_D_OUT0 :return CLOCK_ID_DISPLAY ; +case TEGRA124_CLK_PLL_D2 : +case TEGRA124_CLK_PLL_D2_OUT0 : +return CLOCK_ID_DISPLAY2 ;case TEGRA124_CLK_PLL_X :return CLOCK_ID_XCPU ;case TEGRA124_CLK_PLL_E :
@@ -1194,6 +1199,8 @@ struct clk_pll_simple *clock_get_simple_pll(enum clock_id clkid)case CLOCK_ID_EPCI :case CLOCK_ID_SFROM32KHZ :return &clkrst->crc_pll_simple[clkid -CLOCK_ID_FIRST_SIMPLE ]; +case CLOCK_ID_DISPLAY2 : +return &clkrst->plld2;case CLOCK_ID_DP :return &clkrst->plldp;default :
Signature · 1 line
2.43.0
PATCH 2/5 ARM: tegra210: clock: implement PLLD2 support
In reply to Svyatoslav RyhelPLLD2 is a simple clock (controlled by 2 registers) and appears starting from T30. Primary use of PLLD2 is as main HDMI clock parent.
--- arch/arm/include/asm/arch-tegra210/clock-tables.h | 2 +- arch/arm/mach-tegra/tegra210/clock.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-)
arch/arm/include/asm/arch-tegra210/clock-tables.h +1 -1
@@ -24,6 +24,7 @@ enum clock_id {CLOCK_ID_XCPU =CLOCK_ID_FIRST_SIMPLE ,CLOCK_ID_EPCI ,CLOCK_ID_SFROM32KHZ , +CLOCK_ID_DISPLAY2 , CLOCK_ID_DP,/* These are the base clocks (inputs to the Tegra SoC) */
@@ -37,7 +38,6 @@ enum clock_id {* These are clock IDs that are used in table clock_source[][] * but will not be assigned as a clock source for any peripheral. */ -CLOCK_ID_DISPLAY2 ,CLOCK_ID_CGENERAL_0 ,CLOCK_ID_CGENERAL_1 , CLOCK_ID_CGENERAL2,
arch/arm/mach-tegra/tegra210/clock.c +7 -0
@@ -668,6 +668,8 @@ struct clk_pll_info tegra_pll_info_table[CLOCK_ID_PLL_COUNT] = { .lock_ena = 9, .lock_det = 11, .kcp_shift = 6, .kcp_mask = 3, .kvco_shift = 0, .kvco_mask = 1 }, /* PLLE */ { .m_shift = 0, .m_mask = 0, .n_shift = 0, .n_mask = 0, .p_shift = 0, .p_mask = 0, .lock_ena = 0, .lock_det = 0, .kcp_shift = 0, .kcp_mask = 0, .kvco_shift = 0, .kvco_mask = 0 }, /* PLLS (gone)*/ + { .m_shift = 0, .m_mask = 0x1F, .n_shift = 8, .n_mask = 0x3FF, .p_shift = 20, .p_mask = 0x07, + .lock_ena = 22, .lock_det = 27, .kcp_shift = 8, .kcp_mask = 0xF, .kvco_shift = 4, .kvco_mask = 0xF }, /* PLLD2 */ { .m_shift = 0, .m_mask = 0xFF, .n_shift = 8, .n_mask = 0xFF, .p_shift = 19, .p_mask = 0x1F, .lock_ena = 30, .lock_det = 27, .kcp_shift = 25, .kcp_mask = 3, .kvco_shift = 24, .kvco_mask = 1 }, /* PLLDP */ };
@@ -939,6 +941,9 @@ enum clock_id clk_id_to_pll_id(int clk_id)case TEGRA210_CLK_PLL_D :case TEGRA210_CLK_PLL_D_OUT0 :return CLOCK_ID_DISPLAY ; +case TEGRA210_CLK_PLL_D2 : +case TEGRA210_CLK_PLL_D2_OUT0 : +return CLOCK_ID_DISPLAY2 ;case TEGRA210_CLK_PLL_X :return CLOCK_ID_XCPU ;case TEGRA210_CLK_PLL_E :
@@ -1276,6 +1281,8 @@ struct clk_pll_simple *clock_get_simple_pll(enum clock_id clkid)case CLOCK_ID_EPCI :case CLOCK_ID_SFROM32KHZ :return &clkrst->crc_pll_simple[clkid -CLOCK_ID_FIRST_SIMPLE ]; +case CLOCK_ID_DISPLAY2 : +return &clkrst->plld2;default :return NULL ; }
Signature · 1 line
2.43.0
PATCH 3/5 ARM: tegra30: dts: complete DSI nodes
In reply to Svyatoslav RyhelSync DSI nodes with Linux tree.
--- arch/arm/dts/tegra30.dtsi | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)
arch/arm/dts/tegra30.dtsi +20 -1
@@ -218,10 +218,29 @@ dsi@54300000 { compatible = "nvidia,tegra30-dsi"; reg = <0x54300000 0x00040000>; - clocks = <&tegra_car TEGRA30_CLK_DSIA>; + clocks = <&tegra_car TEGRA30_CLK_DSIA>, + <&tegra_car TEGRA30_CLK_PLL_D_OUT0>; + clock-names = "dsi", "parent"; resets = <&tegra_car 48>; reset-names = "dsi"; status = "disabled"; + + #address-cells = <1>; + #size-cells = <0>; + }; + + dsi@54400000 { + compatible = "nvidia,tegra30-dsi"; + reg = <0x54400000 0x00040000>; + clocks = <&tegra_car TEGRA30_CLK_DSIB>, + <&tegra_car TEGRA30_CLK_PLL_D_OUT0>; + clock-names = "dsi", "parent"; + resets = <&tegra_car 84>; + reset-names = "dsi"; + status = "disabled"; + + #address-cells = <1>; + #size-cells = <0>; }; };
Signature · 1 line
2.43.0
PATCH 4/5 ARM: tegra124: dts: add missing DSI nodes
In reply to Svyatoslav RyhelBind missing DSI and MIPI calibration devices.
--- arch/arm/dts/tegra124.dtsi | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+)
arch/arm/dts/tegra124.dtsi +39 -0
@@ -136,6 +136,38 @@ status = "disabled"; }; + dsi@54300000 { + compatible = "nvidia,tegra124-dsi"; + reg = <0x54300000 0x00040000>; + clocks = <&tegra_car TEGRA124_CLK_DSIA>, + <&tegra_car TEGRA124_CLK_DSIALP>, + <&tegra_car TEGRA124_CLK_PLL_D_OUT0>; + clock-names = "dsi", "lp", "parent"; + resets = <&tegra_car 48>; + reset-names = "dsi"; + nvidia,mipi-calibrate = <&mipi 0x060>; /* DSIA & DSIB pads */ + status = "disabled"; + + #address-cells = <1>; + #size-cells = <0>; + }; + + dsi@54400000 { + compatible = "nvidia,tegra124-dsi"; + reg = <0x54400000 0x00040000>; + clocks = <&tegra_car TEGRA124_CLK_DSIB>, + <&tegra_car TEGRA124_CLK_DSIBLP>, + <&tegra_car TEGRA124_CLK_PLL_D_OUT0>; + clock-names = "dsi", "lp", "parent"; + resets = <&tegra_car 82>; + reset-names = "dsi"; + nvidia,mipi-calibrate = <&mipi 0x180>; /* DSIC & DSID pads */ + status = "disabled"; + + #address-cells = <1>; + #size-cells = <0>; + }; + sor@54540000 { compatible = "nvidia,tegra124-sor"; reg = <0x54540000 0x00040000>;
@@ -737,6 +769,13 @@ #thermal-sensor-cells = <1>; }; + mipi: mipi@700e3000 { + compatible = "nvidia,tegra124-mipi"; + reg = <0x700e3000 0x100>; + clocks = <&tegra_car TEGRA124_CLK_MIPI_CAL>; + #nvidia,mipi-calibrate-cells = <1>; + }; + dfll: clock@70110000 { compatible = "nvidia,tegra124-dfll"; reg = <0x70110000 0x100>, /* DFLL control */
Signature · 1 line
2.43.0
PATCH 5/5 ARM: tegra124: dts: mark HOST1X and DC with pre-relocation flag
In reply to Svyatoslav RyhelSame as on previous SoC generations this is required for proper video output work.
--- arch/arm/dts/tegra124-nyan-big-u-boot.dtsi | 7 ------- arch/arm/dts/tegra124-u-boot.dtsi | 13 +++++++++++++ 2 files changed, 13 insertions(+), 7 deletions(-)
arch/arm/dts/tegra124-nyan-big-u-boot.dtsi +0 -7
@@ -7,13 +7,6 @@ #include "tegra-u-boot.dtsi" / { - host1x@50000000 { - bootph-all; - dc@54200000 { - bootph-all; - }; - }; - spi@7000d400 { spi-deactivate-delay = <500>; spi-max-frequency = <3000000>;
arch/arm/dts/tegra124-u-boot.dtsi +13 -0
@@ -1,3 +1,16 @@ #include <config.h> #include "tegra-u-boot.dtsi" + +/ { + host1x@50000000 { + bootph-all; + dc@54200000 { + bootph-all; + }; + + dc@54240000 { + bootph-all; + }; + }; +};
Signature · 1 line
2.43.0
Re: [PATCH v1 5/5] ARM: tegra124: dts: mark HOST1X and DC with pre-relocation flag
чт, 12 груд. 2024 р. о 12:13 Svyatoslav Ryhel <[email protected]> пише:
Quoted 50 lines
Same as on previous SoC generations this is required for proper video output work.
Signed-off-by Svyatoslav Ryhel <[email protected]>--- arch/arm/dts/tegra124-nyan-big-u-boot.dtsi | 7 ------- arch/arm/dts/tegra124-u-boot.dtsi | 13 +++++++++++++ 2 files changed, 13 insertions(+), 7 deletions(-)arch/arm/dts/tegra124-nyan-big-u-boot.dtsi +0
-7@@ -7,13 +7,6 @@ #include "tegra-u-boot.dtsi" / { - host1x@50000000 { - bootph-all; - dc@54200000 { - bootph-all; - }; - }; - spi@7000d400 { spi-deactivate-delay = <500>; spi-max-frequency = <3000000>;arch/arm/dts/tegra124-u-boot.dtsi +13
-1@@ -1,3 +1,16 @@ #include <config.h> #include "tegra-u-boot.dtsi" + +/ { + host1x@50000000 { + bootph-all; + dc@54200000 { + bootph-all; + }; + + dc@54240000 { + bootph-all; + }; + }; +}; --
Quoted 2 lines
2.43.0
This commit for some reason breaks u-boot build for nyan-big
https://source.denx.de/u-boot/custodians/u-boot-tegra/-/jobs/1020521
Video device 'dc@54200000' cannot allocate frame buffer memory - ensure the device is set up before relocation
Indicates that bootph-all is missing though it should be present, just moved into tegra124-u-boot.dtsi (this is required for any other tegra124 device which would like to have video output). Isn't tegra124-u-boot.dtsi applied if device specific -u-boot.dtsi is defined? May anyone clarify this?
Re: [PATCH v1 5/5] ARM: tegra124: dts: mark HOST1X and DC with pre-relocation flag
ср, 12 лют. 2025 р. о 13:20 Svyatoslav Ryhel <[email protected]> пише:
Quoted 58 lines
чт, 12 груд. 2024 р. о 12:13 Svyatoslav Ryhel <[email protected]> пише:
Quoted 50 lines
Same as on previous SoC generations this is required for proper video output work.
Signed-off-by Svyatoslav Ryhel <[email protected]>--- arch/arm/dts/tegra124-nyan-big-u-boot.dtsi | 7 ------- arch/arm/dts/tegra124-u-boot.dtsi | 13 +++++++++++++ 2 files changed, 13 insertions(+), 7 deletions(-)arch/arm/dts/tegra124-nyan-big-u-boot.dtsi +0
-7@@ -7,13 +7,6 @@ #include "tegra-u-boot.dtsi" / { - host1x@50000000 { - bootph-all; - dc@54200000 { - bootph-all; - }; - }; - spi@7000d400 { spi-deactivate-delay = <500>; spi-max-frequency = <3000000>;arch/arm/dts/tegra124-u-boot.dtsi +13
-1@@ -1,3 +1,16 @@ #include <config.h> #include "tegra-u-boot.dtsi" + +/ { + host1x@50000000 { + bootph-all; + dc@54200000 { + bootph-all; + }; + + dc@54240000 { + bootph-all; + }; + }; +}; --Quoted 2 lines
2.43.0
This commit for some reason breaks u-boot build for nyan-big
https://source.denx.de/u-boot/custodians/u-boot-tegra/-/jobs/1020521
Quoted 8 lines
Video device 'dc@54200000' cannot allocate frame buffer memory - ensure the device is set up before relocation
Indicates that bootph-all is missing though it should be present, just moved into
tegra124-u-boot.dtsi(this is required for any other tegra124 device which would like to have video output). Isn'ttegra124-u-boot.dtsiapplied if device specific-u-boot.dtsiis defined? May anyone clarify this?
RE-sending
Re: [PATCH v1 5/5] ARM: tegra124: dts: mark HOST1X and DC with pre-relocation flag
Hi Svyatoslav,
Quoted 68 lines · Svyatoslav Ryhel
ср, 12 лют. 2025 р. о 13:20 Svyatoslav Ryhel <[email protected]> пише:
Quoted 66 lines
чт, 12 груд. 2024 р. о 12:13 Svyatoslav Ryhel <[email protected]> пише:
Quoted 50 lines
Same as on previous SoC generations this is required for proper video output work.
Signed-off-by Svyatoslav Ryhel <[email protected]>--- arch/arm/dts/tegra124-nyan-big-u-boot.dtsi | 7 ------- arch/arm/dts/tegra124-u-boot.dtsi | 13 +++++++++++++ 2 files changed, 13 insertions(+), 7 deletions(-)arch/arm/dts/tegra124-nyan-big-u-boot.dtsi +0
-7@@ -7,13 +7,6 @@ #include "tegra-u-boot.dtsi" / { - host1x@50000000 { - bootph-all; - dc@54200000 { - bootph-all; - }; - }; - spi@7000d400 { spi-deactivate-delay = <500>; spi-max-frequency = <3000000>;arch/arm/dts/tegra124-u-boot.dtsi +13
-1@@ -1,3 +1,16 @@ #include <config.h> #include "tegra-u-boot.dtsi" + +/ { + host1x@50000000 { + bootph-all; + dc@54200000 { + bootph-all; + }; + + dc@54240000 { + bootph-all; + }; + }; +}; --Quoted 2 lines
2.43.0
This commit for some reason breaks u-boot build for nyan-big
https://source.denx.de/u-boot/custodians/u-boot-tegra/-/jobs/1020521Video device 'dc@54200000' cannot allocate frame buffer memory - ensure the device is set up before relocation
Indicates that bootph-all is missing though it should be present, just moved into
tegra124-u-boot.dtsi(this is required for any other tegra124 device which would like to have video output). Isn'ttegra124-u-boot.dtsiapplied if device specific-u-boot.dtsiis defined? May anyone clarify this?
Yes it should be. You can examine the final u-boot.dtb to see what results.
In terms of the error, dc@54240000 is disabled for Nyan_big but I'm not sure if that is related. You could add debugging to tegra124_lcd_bind() perhaps?
Regards,
Simon