Merge git://git.denx.de/u-boot-spi
This commit is contained in:
@@ -68,46 +68,45 @@
|
||||
&qspi {
|
||||
status = "okay";
|
||||
|
||||
flash0: m25p80@0 {
|
||||
compatible = "s25fl512s","spi-flash";
|
||||
reg = <0>;
|
||||
spi-tx-bus-width = <1>;
|
||||
spi-rx-bus-width = <4>;
|
||||
spi-max-frequency = <96000000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
tshsl-ns = <392>;
|
||||
tsd2d-ns = <392>;
|
||||
tchsh-ns = <100>;
|
||||
tslch-ns = <100>;
|
||||
flash0: m25p80@0 {
|
||||
compatible = "s25fl512s","spi-flash";
|
||||
reg = <0>;
|
||||
spi-tx-bus-width = <1>;
|
||||
spi-rx-bus-width = <4>;
|
||||
spi-max-frequency = <96000000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
cdns,tshsl-ns = <392>;
|
||||
cdns,tsd2d-ns = <392>;
|
||||
cdns,tchsh-ns = <100>;
|
||||
cdns,tslch-ns = <100>;
|
||||
block-size = <18>;
|
||||
|
||||
|
||||
partition@0 {
|
||||
label = "QSPI.u-boot-spl-os";
|
||||
reg = <0x00000000 0x00100000>;
|
||||
};
|
||||
partition@1 {
|
||||
label = "QSPI.u-boot-env";
|
||||
reg = <0x00100000 0x00040000>;
|
||||
};
|
||||
partition@2 {
|
||||
label = "QSPI.skern";
|
||||
reg = <0x00140000 0x0040000>;
|
||||
};
|
||||
partition@3 {
|
||||
label = "QSPI.pmmc-firmware";
|
||||
reg = <0x00180000 0x0040000>;
|
||||
};
|
||||
partition@4 {
|
||||
label = "QSPI.kernel";
|
||||
reg = <0x001C0000 0x0800000>;
|
||||
};
|
||||
partition@5 {
|
||||
label = "QSPI.file-system";
|
||||
reg = <0x009C0000 0x3640000>;
|
||||
};
|
||||
};
|
||||
partition@0 {
|
||||
label = "QSPI.u-boot-spl-os";
|
||||
reg = <0x00000000 0x00100000>;
|
||||
};
|
||||
partition@1 {
|
||||
label = "QSPI.u-boot-env";
|
||||
reg = <0x00100000 0x00040000>;
|
||||
};
|
||||
partition@2 {
|
||||
label = "QSPI.skern";
|
||||
reg = <0x00140000 0x0040000>;
|
||||
};
|
||||
partition@3 {
|
||||
label = "QSPI.pmmc-firmware";
|
||||
reg = <0x00180000 0x0040000>;
|
||||
};
|
||||
partition@4 {
|
||||
label = "QSPI.kernel";
|
||||
reg = <0x001C0000 0x0800000>;
|
||||
};
|
||||
partition@5 {
|
||||
label = "QSPI.file-system";
|
||||
reg = <0x009C0000 0x3640000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
|
||||
@@ -92,8 +92,9 @@
|
||||
<0x24000000 0x4000000>;
|
||||
interrupts = <GIC_SPI 198 IRQ_TYPE_EDGE_RISING>;
|
||||
num-cs = <4>;
|
||||
fifo-depth = <256>;
|
||||
sram-size = <256>;
|
||||
cdns,fifo-depth = <256>;
|
||||
cdns,fifo-width = <4>;
|
||||
cdns,trigger-address = <0x24000000>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
||||
@@ -644,8 +644,9 @@
|
||||
clocks = <&qspi_clk>;
|
||||
ext-decoder = <0>; /* external decoder */
|
||||
num-cs = <4>;
|
||||
fifo-depth = <128>;
|
||||
sram-size = <128>;
|
||||
cdns,fifo-depth = <128>;
|
||||
cdns,fifo-width = <4>;
|
||||
cdns,trigger-address = <0x00000000>;
|
||||
bus-num = <2>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -734,8 +734,8 @@
|
||||
clocks = <&l4_main_clk>;
|
||||
ext-decoder = <0>; /* external decoder */
|
||||
num-chipselect = <4>;
|
||||
fifo-depth = <128>;
|
||||
sram-size = <512>;
|
||||
cdns,fifo-depth = <128>;
|
||||
cdns,fifo-width = <4>;
|
||||
bus-num = <2>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -94,10 +94,9 @@
|
||||
m25p,fast-read;
|
||||
page-size = <256>;
|
||||
block-size = <16>; /* 2^16, 64KB */
|
||||
read-delay = <4>; /* delay value in read data capture register */
|
||||
tshsl-ns = <50>;
|
||||
tsd2d-ns = <50>;
|
||||
tchsh-ns = <4>;
|
||||
tslch-ns = <4>;
|
||||
cdns,tshsl-ns = <50>;
|
||||
cdns,tsd2d-ns = <50>;
|
||||
cdns,tchsh-ns = <4>;
|
||||
cdns,tslch-ns = <4>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -93,11 +93,10 @@
|
||||
m25p,fast-read;
|
||||
page-size = <256>;
|
||||
block-size = <16>; /* 2^16, 64KB */
|
||||
read-delay = <4>; /* delay value in read data capture register */
|
||||
tshsl-ns = <50>;
|
||||
tsd2d-ns = <50>;
|
||||
tchsh-ns = <4>;
|
||||
tslch-ns = <4>;
|
||||
cdns,tshsl-ns = <50>;
|
||||
cdns,tsd2d-ns = <50>;
|
||||
cdns,tchsh-ns = <4>;
|
||||
cdns,tslch-ns = <4>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -104,11 +104,10 @@
|
||||
m25p,fast-read;
|
||||
page-size = <256>;
|
||||
block-size = <16>; /* 2^16, 64KB */
|
||||
read-delay = <4>; /* delay value in read data capture register */
|
||||
tshsl-ns = <50>;
|
||||
tsd2d-ns = <50>;
|
||||
tchsh-ns = <4>;
|
||||
tslch-ns = <4>;
|
||||
cdns,tshsl-ns = <50>;
|
||||
cdns,tsd2d-ns = <50>;
|
||||
cdns,tchsh-ns = <4>;
|
||||
cdns,tslch-ns = <4>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -84,11 +84,10 @@
|
||||
m25p,fast-read;
|
||||
page-size = <256>;
|
||||
block-size = <16>; /* 2^16, 64KB */
|
||||
read-delay = <4>; /* delay value in read data capture register */
|
||||
tshsl-ns = <50>;
|
||||
tsd2d-ns = <50>;
|
||||
tchsh-ns = <4>;
|
||||
tslch-ns = <4>;
|
||||
cdns,tshsl-ns = <50>;
|
||||
cdns,tsd2d-ns = <50>;
|
||||
cdns,tchsh-ns = <4>;
|
||||
cdns,tslch-ns = <4>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -74,11 +74,10 @@
|
||||
m25p,fast-read;
|
||||
page-size = <256>;
|
||||
block-size = <16>; /* 2^16, 64KB */
|
||||
read-delay = <4>; /* delay value in read data capture register */
|
||||
tshsl-ns = <50>;
|
||||
tsd2d-ns = <50>;
|
||||
tchsh-ns = <4>;
|
||||
tslch-ns = <4>;
|
||||
cdns,tshsl-ns = <50>;
|
||||
cdns,tsd2d-ns = <50>;
|
||||
cdns,tchsh-ns = <4>;
|
||||
cdns,tslch-ns = <4>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -92,10 +92,9 @@
|
||||
m25p,fast-read;
|
||||
page-size = <256>;
|
||||
block-size = <16>; /* 2^16, 64KB */
|
||||
read-delay = <4>; /* delay value in read data capture register */
|
||||
tshsl-ns = <50>;
|
||||
tsd2d-ns = <50>;
|
||||
tchsh-ns = <4>;
|
||||
tslch-ns = <4>;
|
||||
cdns,tshsl-ns = <50>;
|
||||
cdns,tsd2d-ns = <50>;
|
||||
cdns,tchsh-ns = <4>;
|
||||
cdns,tslch-ns = <4>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -79,11 +79,10 @@
|
||||
m25p,fast-read;
|
||||
page-size = <256>;
|
||||
block-size = <16>; /* 2^16, 64KB */
|
||||
read-delay = <4>; /* delay value in read data capture register */
|
||||
tshsl-ns = <50>;
|
||||
tsd2d-ns = <50>;
|
||||
tchsh-ns = <4>;
|
||||
tslch-ns = <4>;
|
||||
cdns,tshsl-ns = <50>;
|
||||
cdns,tsd2d-ns = <50>;
|
||||
cdns,tchsh-ns = <4>;
|
||||
cdns,tslch-ns = <4>;
|
||||
};
|
||||
|
||||
flash1: n25q00@1 {
|
||||
@@ -96,11 +95,10 @@
|
||||
m25p,fast-read;
|
||||
page-size = <256>;
|
||||
block-size = <16>; /* 2^16, 64KB */
|
||||
read-delay = <4>; /* delay value in read data capture register */
|
||||
tshsl-ns = <50>;
|
||||
tsd2d-ns = <50>;
|
||||
tchsh-ns = <4>;
|
||||
tslch-ns = <4>;
|
||||
cdns,tshsl-ns = <50>;
|
||||
cdns,tsd2d-ns = <50>;
|
||||
cdns,tchsh-ns = <4>;
|
||||
cdns,tslch-ns = <4>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -32,7 +32,9 @@
|
||||
reg = <0x80203000 0x100>,
|
||||
<0x40000000 0x1000000>;
|
||||
clocks = <3750000>;
|
||||
sram-size = <256>;
|
||||
cdns,fifo-depth = <256>;
|
||||
cdns,fifo-width = <4>;
|
||||
cdns,trigger-address = <0x40000000>;
|
||||
status = "okay";
|
||||
|
||||
flash0: n25q32@0 {
|
||||
@@ -44,10 +46,10 @@
|
||||
m25p,fast-read;
|
||||
page-size = <256>;
|
||||
block-size = <16>; /* 2^16, 64KB */
|
||||
tshsl-ns = <50>;
|
||||
tsd2d-ns = <50>;
|
||||
tchsh-ns = <4>;
|
||||
tslch-ns = <4>;
|
||||
cdns,tshsl-ns = <50>;
|
||||
cdns,tsd2d-ns = <50>;
|
||||
cdns,tchsh-ns = <4>;
|
||||
cdns,tslch-ns = <4>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -57,6 +57,12 @@ struct kwspi_registers {
|
||||
#define KWSPI_TXLSBF (1 << 13)
|
||||
#define KWSPI_RXLSBF (1 << 14)
|
||||
|
||||
/* Timing Parameters 1 Register */
|
||||
#define KW_SPI_TMISO_SAMPLE_OFFSET 6
|
||||
#define KW_SPI_TMISO_SAMPLE_MASK (0x3 << KW_SPI_TMISO_SAMPLE_OFFSET)
|
||||
#define KW_SPI_TMISO_SAMPLE_1 (1 << KW_SPI_TMISO_SAMPLE_OFFSET)
|
||||
#define KW_SPI_TMISO_SAMPLE_2 (2 << KW_SPI_TMISO_SAMPLE_OFFSET)
|
||||
|
||||
#define KWSPI_IRQUNMASK 1 /* unmask SPI interrupt */
|
||||
#define KWSPI_IRQMASK 0 /* mask SPI interrupt */
|
||||
#define KWSPI_SMEMRDIRQ 1 /* SerMem data xfer ready irq */
|
||||
|
||||
@@ -21,10 +21,10 @@ static void reset_read_data_fifos(void)
|
||||
|
||||
/* Reset data FIFOs twice. */
|
||||
setbits_le32(&mmdc0->mpdgctrl0, 1 << 31);
|
||||
wait_for_bit("MMDC", &mmdc0->mpdgctrl0, 1 << 31, 0, 100, 0);
|
||||
wait_for_bit_le32(&mmdc0->mpdgctrl0, 1 << 31, 0, 100, 0);
|
||||
|
||||
setbits_le32(&mmdc0->mpdgctrl0, 1 << 31);
|
||||
wait_for_bit("MMDC", &mmdc0->mpdgctrl0, 1 << 31, 0, 100, 0);
|
||||
wait_for_bit_le32(&mmdc0->mpdgctrl0, 1 << 31, 0, 100, 0);
|
||||
}
|
||||
|
||||
static void precharge_all(const bool cs0_enable, const bool cs1_enable)
|
||||
@@ -39,12 +39,12 @@ static void precharge_all(const bool cs0_enable, const bool cs1_enable)
|
||||
*/
|
||||
if (cs0_enable) { /* CS0 */
|
||||
writel(0x04008050, &mmdc0->mdscr);
|
||||
wait_for_bit("MMDC", &mmdc0->mdscr, 1 << 14, 1, 100, 0);
|
||||
wait_for_bit_le32(&mmdc0->mdscr, 1 << 14, 1, 100, 0);
|
||||
}
|
||||
|
||||
if (cs1_enable) { /* CS1 */
|
||||
writel(0x04008058, &mmdc0->mdscr);
|
||||
wait_for_bit("MMDC", &mmdc0->mdscr, 1 << 14, 1, 100, 0);
|
||||
wait_for_bit_le32(&mmdc0->mdscr, 1 << 14, 1, 100, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ int mmdc_do_write_level_calibration(struct mx6_ddr_sysinfo const *sysinfo)
|
||||
* 7. Upon completion of this process the MMDC de-asserts
|
||||
* the MPWLGCR[HW_WL_EN]
|
||||
*/
|
||||
wait_for_bit("MMDC", &mmdc0->mpwlgcr, 1 << 0, 0, 100, 0);
|
||||
wait_for_bit_le32(&mmdc0->mpwlgcr, 1 << 0, 0, 100, 0);
|
||||
|
||||
/*
|
||||
* 8. check for any errors: check both PHYs for x64 configuration,
|
||||
@@ -278,7 +278,7 @@ int mmdc_do_dqs_calibration(struct mx6_ddr_sysinfo const *sysinfo)
|
||||
writel(0x00008028, &mmdc0->mdscr);
|
||||
|
||||
/* poll to make sure the con_ack bit was asserted */
|
||||
wait_for_bit("MMDC", &mmdc0->mdscr, 1 << 14, 1, 100, 0);
|
||||
wait_for_bit_le32(&mmdc0->mdscr, 1 << 14, 1, 100, 0);
|
||||
|
||||
/*
|
||||
* Check MDMISC register CALIB_PER_CS to see which CS calibration
|
||||
@@ -312,7 +312,7 @@ int mmdc_do_dqs_calibration(struct mx6_ddr_sysinfo const *sysinfo)
|
||||
* this bit until it clears to indicate completion of the write access.
|
||||
*/
|
||||
setbits_le32(&mmdc0->mpswdar0, 1);
|
||||
wait_for_bit("MMDC", &mmdc0->mpswdar0, 1 << 0, 0, 100, 0);
|
||||
wait_for_bit_le32(&mmdc0->mpswdar0, 1 << 0, 0, 100, 0);
|
||||
|
||||
/* Set the RD_DL_ABS# bits to their default values
|
||||
* (will be calibrated later in the read delay-line calibration).
|
||||
@@ -359,7 +359,7 @@ int mmdc_do_dqs_calibration(struct mx6_ddr_sysinfo const *sysinfo)
|
||||
setbits_le32(&mmdc0->mpdgctrl0, 5 << 28);
|
||||
|
||||
/* Poll for completion. MPDGCTRL0[HW_DG_EN] should be 0 */
|
||||
wait_for_bit("MMDC", &mmdc0->mpdgctrl0, 1 << 28, 0, 100, 0);
|
||||
wait_for_bit_le32(&mmdc0->mpdgctrl0, 1 << 28, 0, 100, 0);
|
||||
|
||||
/*
|
||||
* Check to see if any errors were encountered during calibration
|
||||
@@ -423,7 +423,7 @@ int mmdc_do_dqs_calibration(struct mx6_ddr_sysinfo const *sysinfo)
|
||||
* setting MPRDDLHWCTL[HW_RD_DL_EN] = 0. Also, ensure that
|
||||
* no error bits were set.
|
||||
*/
|
||||
wait_for_bit("MMDC", &mmdc0->mprddlhwctl, 1 << 4, 0, 100, 0);
|
||||
wait_for_bit_le32(&mmdc0->mprddlhwctl, 1 << 4, 0, 100, 0);
|
||||
|
||||
/* check both PHYs for x64 configuration, if x32, check only PHY0 */
|
||||
if (readl(&mmdc0->mprddlhwctl) & 0x0000000f)
|
||||
@@ -477,7 +477,7 @@ int mmdc_do_dqs_calibration(struct mx6_ddr_sysinfo const *sysinfo)
|
||||
* by setting MPWRDLHWCTL[HW_WR_DL_EN] = 0.
|
||||
* Also, ensure that no error bits were set.
|
||||
*/
|
||||
wait_for_bit("MMDC", &mmdc0->mpwrdlhwctl, 1 << 4, 0, 100, 0);
|
||||
wait_for_bit_le32(&mmdc0->mpwrdlhwctl, 1 << 4, 0, 100, 0);
|
||||
|
||||
/* Check both PHYs for x64 configuration, if x32, check only PHY0 */
|
||||
if (readl(&mmdc0->mpwrdlhwctl) & 0x0000000f)
|
||||
@@ -526,7 +526,7 @@ int mmdc_do_dqs_calibration(struct mx6_ddr_sysinfo const *sysinfo)
|
||||
writel(0x0, &mmdc0->mdscr); /* CS0 */
|
||||
|
||||
/* Poll to make sure the con_ack bit is clear */
|
||||
wait_for_bit("MMDC", &mmdc0->mdscr, 1 << 14, 0, 100, 0);
|
||||
wait_for_bit_le32(&mmdc0->mdscr, 1 << 14, 0, 100, 0);
|
||||
|
||||
/*
|
||||
* Print out the registers that were updated as a result
|
||||
|
||||
@@ -37,8 +37,8 @@ void cm_wait_for_lock(u32 mask)
|
||||
/* function to poll in the fsm busy bit */
|
||||
int cm_wait_for_fsm(void)
|
||||
{
|
||||
return wait_for_bit(__func__, (const u32 *)&clock_manager_base->stat,
|
||||
CLKMGR_STAT_BUSY, false, 20000, false);
|
||||
return wait_for_bit_le32(&clock_manager_base->stat,
|
||||
CLKMGR_STAT_BUSY, false, 20000, false);
|
||||
}
|
||||
|
||||
int set_cpu_clk_info(void)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <common.h>
|
||||
#include <fdtdec.h>
|
||||
#include <asm/io.h>
|
||||
#include <dm.h>
|
||||
#include <asm/arch/clock_manager.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
@@ -1076,6 +1077,14 @@ unsigned int cm_get_qspi_controller_clk_hz(void)
|
||||
return cm_get_l4_noc_hz(CLKMGR_MAINPLL_NOCDIV_L4MAINCLK_LSB);
|
||||
}
|
||||
|
||||
/* Override weak dw_spi_get_clk implementation in designware_spi.c driver */
|
||||
int dw_spi_get_clk(struct udevice *bus, ulong *rate)
|
||||
{
|
||||
*rate = cm_get_spi_controller_clk_hz();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void cm_print_clock_quick_summary(void)
|
||||
{
|
||||
printf("MPU %10ld kHz\n", cm_get_mpu_clk_hz() / 1000);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/io.h>
|
||||
#include <dm.h>
|
||||
#include <asm/arch/clock_manager.h>
|
||||
#include <wait_bit.h>
|
||||
|
||||
@@ -37,15 +38,13 @@ static int cm_write_with_phase(u32 value, u32 reg_address, u32 mask)
|
||||
int ret;
|
||||
|
||||
/* poll until phase is zero */
|
||||
ret = wait_for_bit(__func__, (const u32 *)reg_address, mask,
|
||||
false, 20000, false);
|
||||
ret = wait_for_bit_le32(reg_address, mask, false, 20000, false);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
writel(value, reg_address);
|
||||
|
||||
return wait_for_bit(__func__, (const u32 *)reg_address, mask,
|
||||
false, 20000, false);
|
||||
return wait_for_bit_le32(reg_address, mask, false, 20000, false);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -509,6 +508,14 @@ unsigned int cm_get_spi_controller_clk_hz(void)
|
||||
return clock;
|
||||
}
|
||||
|
||||
/* Override weak dw_spi_get_clk implementation in designware_spi.c driver */
|
||||
int dw_spi_get_clk(struct udevice *bus, ulong *rate)
|
||||
{
|
||||
*rate = cm_get_spi_controller_clk_hz();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void cm_print_clock_quick_summary(void)
|
||||
{
|
||||
printf("MPU %10ld kHz\n", cm_get_mpu_clk_hz() / 1000);
|
||||
|
||||
@@ -222,8 +222,8 @@ int socfpga_reset_deassert_bridges_handoff(void)
|
||||
clrbits_le32(&reset_manager_base->brgmodrst, mask_rstmgr);
|
||||
|
||||
/* Poll until all idleack to 0, timeout at 1000ms */
|
||||
return wait_for_bit(__func__, &sysmgr_regs->noc_idleack, mask_noc,
|
||||
false, 1000, false);
|
||||
return wait_for_bit_le32(&sysmgr_regs->noc_idleack, mask_noc,
|
||||
false, 1000, false);
|
||||
}
|
||||
|
||||
void socfpga_reset_assert_fpga_connected_peripherals(void)
|
||||
@@ -343,26 +343,26 @@ int socfpga_bridges_reset(void)
|
||||
writel(ALT_SYSMGR_NOC_TMO_EN_SET_MSK, &sysmgr_regs->noc_timeout);
|
||||
|
||||
/* Poll until all idleack to 1 */
|
||||
ret = wait_for_bit(__func__, &sysmgr_regs->noc_idleack,
|
||||
ALT_SYSMGR_NOC_H2F_SET_MSK |
|
||||
ALT_SYSMGR_NOC_LWH2F_SET_MSK |
|
||||
ALT_SYSMGR_NOC_F2H_SET_MSK |
|
||||
ALT_SYSMGR_NOC_F2SDR0_SET_MSK |
|
||||
ALT_SYSMGR_NOC_F2SDR1_SET_MSK |
|
||||
ALT_SYSMGR_NOC_F2SDR2_SET_MSK,
|
||||
true, 10000, false);
|
||||
ret = wait_for_bit_le32(&sysmgr_regs->noc_idleack,
|
||||
ALT_SYSMGR_NOC_H2F_SET_MSK |
|
||||
ALT_SYSMGR_NOC_LWH2F_SET_MSK |
|
||||
ALT_SYSMGR_NOC_F2H_SET_MSK |
|
||||
ALT_SYSMGR_NOC_F2SDR0_SET_MSK |
|
||||
ALT_SYSMGR_NOC_F2SDR1_SET_MSK |
|
||||
ALT_SYSMGR_NOC_F2SDR2_SET_MSK,
|
||||
true, 10000, false);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Poll until all idlestatus to 1 */
|
||||
ret = wait_for_bit(__func__, &sysmgr_regs->noc_idlestatus,
|
||||
ALT_SYSMGR_NOC_H2F_SET_MSK |
|
||||
ALT_SYSMGR_NOC_LWH2F_SET_MSK |
|
||||
ALT_SYSMGR_NOC_F2H_SET_MSK |
|
||||
ALT_SYSMGR_NOC_F2SDR0_SET_MSK |
|
||||
ALT_SYSMGR_NOC_F2SDR1_SET_MSK |
|
||||
ALT_SYSMGR_NOC_F2SDR2_SET_MSK,
|
||||
true, 10000, false);
|
||||
ret = wait_for_bit_le32(&sysmgr_regs->noc_idlestatus,
|
||||
ALT_SYSMGR_NOC_H2F_SET_MSK |
|
||||
ALT_SYSMGR_NOC_LWH2F_SET_MSK |
|
||||
ALT_SYSMGR_NOC_F2H_SET_MSK |
|
||||
ALT_SYSMGR_NOC_F2SDR0_SET_MSK |
|
||||
ALT_SYSMGR_NOC_F2SDR1_SET_MSK |
|
||||
ALT_SYSMGR_NOC_F2SDR2_SET_MSK,
|
||||
true, 10000, false);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
/ {
|
||||
compatible = "brcm,bcm3380";
|
||||
|
||||
aliases {
|
||||
spi0 = &spi;
|
||||
};
|
||||
|
||||
cpus {
|
||||
reg = <0x14e00000 0x4>;
|
||||
#address-cells = <1>;
|
||||
@@ -142,6 +146,19 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
spi: spi@14e02000 {
|
||||
compatible = "brcm,bcm6358-spi";
|
||||
reg = <0x14e02000 0x70c>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
clocks = <&periph_clk0 BCM3380_CLK0_SPI>;
|
||||
resets = <&periph_rst0 BCM3380_RST0_SPI>;
|
||||
spi-max-frequency = <25000000>;
|
||||
num-cs = <6>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
leds: led-controller@14e00f00 {
|
||||
compatible = "brcm,bcm6328-leds";
|
||||
reg = <0x14e00f00 0x1c>;
|
||||
|
||||
@@ -13,6 +13,11 @@
|
||||
/ {
|
||||
compatible = "brcm,bcm63268";
|
||||
|
||||
aliases {
|
||||
spi0 = &lsspi;
|
||||
spi1 = &hsspi;
|
||||
};
|
||||
|
||||
cpus {
|
||||
reg = <0x10000000 0x4>;
|
||||
#address-cells = <1>;
|
||||
@@ -40,6 +45,12 @@
|
||||
#size-cells = <1>;
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
hsspi_pll: hsspi-pll {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <400000000>;
|
||||
};
|
||||
|
||||
periph_osc: periph-osc {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
@@ -136,6 +147,33 @@
|
||||
#power-domain-cells = <1>;
|
||||
};
|
||||
|
||||
lsspi: spi@10000800 {
|
||||
compatible = "brcm,bcm6358-spi";
|
||||
reg = <0x10000800 0x70c>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
clocks = <&periph_clk BCM63268_CLK_SPI>;
|
||||
resets = <&periph_rst BCM63268_RST_SPI>;
|
||||
spi-max-frequency = <20000000>;
|
||||
num-cs = <8>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
hsspi: spi@10001000 {
|
||||
compatible = "brcm,bcm6328-hsspi";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x10001000 0x600>;
|
||||
clocks = <&periph_clk BCM63268_CLK_HSSPI>, <&hsspi_pll>;
|
||||
clock-names = "hsspi", "pll";
|
||||
resets = <&periph_rst BCM63268_RST_SPI>;
|
||||
spi-max-frequency = <50000000>;
|
||||
num-cs = <8>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
leds: led-controller@10001900 {
|
||||
compatible = "brcm,bcm6328-leds";
|
||||
reg = <0x10001900 0x24>;
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
/ {
|
||||
compatible = "brcm,bcm6328";
|
||||
|
||||
aliases {
|
||||
spi0 = &spi;
|
||||
};
|
||||
|
||||
cpus {
|
||||
reg = <0x10000000 0x4>;
|
||||
#address-cells = <1>;
|
||||
@@ -40,6 +44,12 @@
|
||||
#size-cells = <1>;
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
hsspi_pll: hsspi-pll {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <133333333>;
|
||||
};
|
||||
|
||||
periph_osc: periph-osc {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
@@ -123,6 +133,20 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
spi: spi@10001000 {
|
||||
compatible = "brcm,bcm6328-hsspi";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x10001000 0x600>;
|
||||
clocks = <&periph_clk BCM6328_CLK_HSSPI>, <&hsspi_pll>;
|
||||
clock-names = "hsspi", "pll";
|
||||
resets = <&periph_rst BCM6328_RST_SPI>;
|
||||
spi-max-frequency = <33333334>;
|
||||
num-cs = <3>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
periph_pwr: power-controller@10001848 {
|
||||
compatible = "brcm,bcm6328-power-domain";
|
||||
reg = <0x10001848 0x4>;
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
/ {
|
||||
compatible = "brcm,bcm6338";
|
||||
|
||||
aliases {
|
||||
spi0 = &spi;
|
||||
};
|
||||
|
||||
cpus {
|
||||
reg = <0xfffe0000 0x4>;
|
||||
#address-cells = <1>;
|
||||
@@ -109,6 +113,19 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
spi: spi@fffe0c00 {
|
||||
compatible = "brcm,bcm6348-spi";
|
||||
reg = <0xfffe0c00 0xc0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
clocks = <&periph_clk BCM6338_CLK_SPI>;
|
||||
resets = <&periph_rst BCM6338_RST_SPI>;
|
||||
spi-max-frequency = <20000000>;
|
||||
num-cs = <4>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
memory-controller@fffe3100 {
|
||||
compatible = "brcm,bcm6338-mc";
|
||||
reg = <0xfffe3100 0x38>;
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
/ {
|
||||
compatible = "brcm,bcm6348";
|
||||
|
||||
aliases {
|
||||
spi0 = &spi;
|
||||
};
|
||||
|
||||
cpus {
|
||||
reg = <0xfffe0000 0x4>;
|
||||
#address-cells = <1>;
|
||||
@@ -118,6 +122,19 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
spi: spi@fffe0c00 {
|
||||
compatible = "brcm,bcm6348-spi";
|
||||
reg = <0xfffe0c00 0xc0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
clocks = <&periph_clk BCM6348_CLK_SPI>;
|
||||
resets = <&periph_rst BCM6348_RST_SPI>;
|
||||
spi-max-frequency = <20000000>;
|
||||
num-cs = <4>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
memory-controller@fffe2300 {
|
||||
compatible = "brcm,bcm6338-mc";
|
||||
reg = <0xfffe2300 0x38>;
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
/ {
|
||||
compatible = "brcm,bcm6358";
|
||||
|
||||
aliases {
|
||||
spi0 = &spi;
|
||||
};
|
||||
|
||||
cpus {
|
||||
reg = <0xfffe0000 0x4>;
|
||||
#address-cells = <1>;
|
||||
@@ -142,6 +146,19 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
spi: spi@fffe0800 {
|
||||
compatible = "brcm,bcm6358-spi";
|
||||
reg = <0xfffe0800 0x70c>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
clocks = <&periph_clk BCM6358_CLK_SPI>;
|
||||
resets = <&periph_rst BCM6358_RST_SPI>;
|
||||
spi-max-frequency = <20000000>;
|
||||
num-cs = <4>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
memory-controller@fffe1200 {
|
||||
compatible = "brcm,bcm6358-mc";
|
||||
reg = <0xfffe1200 0x4c>;
|
||||
|
||||
@@ -51,6 +51,18 @@
|
||||
};
|
||||
};
|
||||
|
||||
&spi {
|
||||
status = "okay";
|
||||
|
||||
spi-flash@0 {
|
||||
compatible = "spi-flash";
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
spi-max-frequency = <33333334>;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
status = "okay";
|
||||
|
||||
@@ -90,6 +90,18 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi {
|
||||
status = "okay";
|
||||
|
||||
spi-flash@0 {
|
||||
compatible = "spi-flash";
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
spi-max-frequency = <25000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
status = "okay";
|
||||
|
||||
@@ -44,6 +44,18 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi {
|
||||
status = "okay";
|
||||
|
||||
spi-flash@0 {
|
||||
compatible = "spi-flash";
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
spi-max-frequency = <20000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
status = "okay";
|
||||
|
||||
@@ -90,7 +90,7 @@ static void ar934x_srif_pll_cfg(void __iomem *pll_reg_base, const u32 srif_val)
|
||||
setbits_be32(pll_reg_base + 0x8, BIT(30));
|
||||
udelay(5);
|
||||
|
||||
wait_for_bit("clk", pll_reg_base + 0xc, BIT(3), 1, 10, 0);
|
||||
wait_for_bit_le32(pll_reg_base + 0xc, BIT(3), 1, 10, 0);
|
||||
|
||||
clrbits_be32(pll_reg_base + 0x8, BIT(30));
|
||||
udelay(5);
|
||||
|
||||
Reference in New Issue
Block a user