Upgrade the SDHCI Cadence controller from SD4HC to SD6HC for Agilex5 platform to support the newer controller version with enhanced features. Key changes: - Remove combophy0 node and associated references as SD6HC doesn't require separate PHY configuration node - Upgrade MMC controller compatible from "cdns,sd4hc" to "cdns,sd6hc" - Add Agilex5-specific compatible string "altr,agilex5-sd6hc" for platform-specific optimizations Hardware configuration updates: - Add voltage regulator support: * sd_emmc_power: Fixed 3.3V regulator for card power supply * sd_io_1v8_reg: GPIO-controlled regulator for 1.8V/3.3V I/O switching - Configure proper reset control with named resets including combophy reset - Add GPIO control via portb pin 3 for voltage switching SD card operation: - Configure for SD card specific operation (no-mmc, cap-sd-highspeed) - Set maximum frequency to 200MHz - Configure timing parameters for SD modes: * Default Speed (DS) and UHS-I SDR12 mode timing: * High Speed and UHS-I SDR25 mode timing: - Add PHY timing delays for optimal signal integrity Signed-off-by: Tanmay Kathpalia <tanmay.kathpalia@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
197 lines
3.5 KiB
Plaintext
197 lines
3.5 KiB
Plaintext
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* U-Boot additions
|
|
*
|
|
* Copyright (C) 2024 Intel Corporation <www.intel.com>
|
|
* Copyright (C) 2025 Altera Corporation <www.altera.com>
|
|
*/
|
|
|
|
#include "socfpga_agilex5-u-boot.dtsi"
|
|
|
|
/{
|
|
aliases {
|
|
spi0 = &qspi;
|
|
freeze_br0 = &freeze_controller;
|
|
};
|
|
|
|
soc {
|
|
freeze_controller: freeze_controller@0x20000450 {
|
|
compatible = "altr,freeze-bridge-controller";
|
|
reg = <0x20000450 0x00000010>;
|
|
status = "disabled";
|
|
};
|
|
};
|
|
|
|
/*
|
|
* Both Memory base address and size default info is retrieved from HW setting.
|
|
* Reconfiguration / Overwrite these info can be done with examples below.
|
|
*
|
|
* When LPDDR ECC is enabled, the last 1/8 of the memory region must
|
|
* be reserved for the Inline ECC buffer.
|
|
*
|
|
* Example for memory size with 2GB:
|
|
* memory {
|
|
* reg = <0x0 0x80000000 0x0 0x80000000>;
|
|
* };
|
|
*
|
|
* Example for memory size with 8GB:
|
|
* memory {
|
|
* reg = <0x0 0x80000000 0x0 0x80000000>,
|
|
* <0x8 0x80000000 0x1 0x80000000>;
|
|
* };
|
|
*
|
|
* Example for memory size with 32GB:
|
|
* memory {
|
|
* reg = <0x0 0x80000000 0x0 0x80000000>,
|
|
* <0x8 0x80000000 0x7 0x80000000>;
|
|
* };
|
|
*
|
|
* Example for memory size with 512GB:
|
|
* memory {
|
|
* reg = <0x0 0x80000000 0x0 0x80000000>,
|
|
* <0x8 0x80000000 0x7 0x80000000>,
|
|
* <0x88 0x00000000 0x78 0x00000000>;
|
|
* };
|
|
*
|
|
* Example for memory size with 2GB with LPDDR Inline ECC ON:
|
|
* memory {
|
|
* reg = <0x0 0x80000000 0x0 0x70000000>;
|
|
* };
|
|
*
|
|
* Example for memory size with 8GB with LPDDR Inline ECC ON:
|
|
* memory {
|
|
* reg = <0x0 0x80000000 0x0 0x80000000>,
|
|
* <0x8 0x80000000 0x1 0x40000000>;
|
|
* };
|
|
*/
|
|
|
|
chosen {
|
|
stdout-path = "serial0:115200n8";
|
|
u-boot,spl-boot-order = &mmc,&flash0,&nand,"/memory";
|
|
};
|
|
};
|
|
|
|
&flash0 {
|
|
compatible = "jedec,spi-nor";
|
|
spi-tx-bus-width = <4>;
|
|
spi-rx-bus-width = <4>;
|
|
bootph-all;
|
|
/delete-property/ cdns,read-delay;
|
|
};
|
|
|
|
&flash1 {
|
|
bootph-all;
|
|
};
|
|
|
|
&i3c0 {
|
|
bootph-all;
|
|
};
|
|
|
|
&i3c1 {
|
|
bootph-all;
|
|
};
|
|
|
|
&gpio1 {
|
|
portb: gpio-controller@0 {
|
|
bootph-all;
|
|
};
|
|
};
|
|
|
|
&sd_emmc_power {
|
|
bootph-all;
|
|
};
|
|
|
|
&sd_io_1v8_reg {
|
|
gpios = <&portb 3 GPIO_ACTIVE_HIGH>;
|
|
bootph-all;
|
|
};
|
|
|
|
&mmc {
|
|
status = "okay";
|
|
|
|
no-mmc;
|
|
no-1-8-v;
|
|
disable-wp;
|
|
cap-sd-highspeed;
|
|
vmmc-supply = <&sd_emmc_power>;
|
|
vqmmc-supply = <&sd_io_1v8_reg>;
|
|
max-frequency = <200000000>;
|
|
|
|
/* SD card default speed (DS) and UHS-I SDR12 mode timing configuration */
|
|
cdns,phy-dqs-timing-delay-sd-ds = <0x00780000>;
|
|
cdns,phy-gate-lpbk_ctrl-delay-sd-ds = <0x81a40040>;
|
|
cdns,phy-dll-slave-ctrl-sd-ds = <0x00a000fe>;
|
|
cdns,phy-dq-timing-delay-sd-ds = <0x28000001>;
|
|
|
|
/* SD card high speed and UHS-I SDR25 mode timing configuration */
|
|
cdns,phy-dqs-timing-delay-sd-hs = <0x780001>;
|
|
cdns,phy-gate-lpbk_ctrl-delay-sd-hs = <0x81a40040>;
|
|
cdns,phy-dq-timing-delay-sd-hs = <0x10000001>;
|
|
cdns,ctrl-hrs16-slave-ctrl-sd-hs = <0x101>;
|
|
cdns,ctrl-hrs07-timing-delay-sd-hs = <0xA0001>;
|
|
|
|
bootph-all;
|
|
};
|
|
|
|
&qspi {
|
|
status = "okay";
|
|
};
|
|
|
|
&nand {
|
|
bootph-all;
|
|
};
|
|
|
|
&timer0 {
|
|
bootph-all;
|
|
};
|
|
|
|
&timer1 {
|
|
bootph-all;
|
|
};
|
|
|
|
&timer2 {
|
|
bootph-all;
|
|
};
|
|
|
|
&timer3 {
|
|
bootph-all;
|
|
};
|
|
|
|
&watchdog0 {
|
|
bootph-all;
|
|
};
|
|
|
|
&gmac0 {
|
|
status = "okay";
|
|
phy-mode = "rgmii";
|
|
phy-handle = <&emac0_phy0>;
|
|
|
|
max-frame-size = <9000>;
|
|
|
|
mdio0 {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
compatible = "snps,dwxgmac-mdio";
|
|
emac0_phy0: ethernet-phy@0 {
|
|
reg = <0>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&gmac2 {
|
|
status = "okay";
|
|
phy-mode = "rgmii";
|
|
phy-handle = <&emac2_phy0>;
|
|
|
|
max-frame-size = <9000>;
|
|
|
|
mdio0 {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
compatible = "snps,dwxgmac-mdio";
|
|
emac2_phy0: ethernet-phy@0 {
|
|
reg = <0>;
|
|
};
|
|
};
|
|
};
|