H3芯片外接nand flash芯片,在调试uboot的时候,读写nfc寄存器的值都为0,其它控制器不是,这是什么问题??
void board_nand_init(void)
{
printf("+++ board_nand_init +++\n");
nand_pinmux_setup();
nand_clock_setup();
struct sunxi_nfc_reg
{
uint32_t ndfc_ctl;
uint32_t ndfc_st;
uint32_t ndfc_int;
uint32_t ndfc_timing_ctl;
uint32_t ndfc_timing_cfg;
uint32_t ndfc_addr_low;
uint32_t ndfc_addr_high;
uint32_t ndfc_block_num;
uint32_t ndfc_cnt;
uint32_t ndfc_rcmd_set;
uint32_t ndfc_wcmd_set;
};
struct sunxi_gpio_reg *const pio = (struct sunxi_gpio_reg *)SUNXI_PIO_BASE;
printf("address: %p \n", &pio->gpio_bank[2].cfg[0]);
printf("value: 0x%x \n", readl(&pio->gpio_bank[2].cfg[0]));
struct sunxi_nfc_reg *const nfc = (struct sunxi_nfc_reg *)0x01C03000;
printf("ndfc->ndfc_wcmd_set: %p \n", &nfc->ndfc_wcmd_set);
printf("ndfc_wcmd_set: 0x%x \n", readl(&nfc->ndfc_wcmd_set));
#ifndef CONFIG_SPL_BUILD
sunxi_nand_init();
#endif
}
U-Boot SPL 2017.03 (May 17 2019 - 15:12:56)
DRAM: 512 MiB
Trying to boot from MMC1
U-Boot 2017.03 (May 17 2019 - 15:12:56 +0800) Allwinner Technology
CPU: Allwinner H3 (SUN8I 1680)
Model: Xunlong Orange Pi One
DRAM: 512 MiB
+++ initr_nand +++
NAND: +++ nand_init +++
+++ board_nand_init +++
address: 01c20848
value: 0x22222222
ndfc->ndfc_wcmd_set: 01c03028
ndfc_wcmd_set: 0x0
+++ sunxi_nand_init +++
+++ regs: 01c03000 +++
sunxi nfc reset successful!
chip: 0x0
ccm->nand0_clk_cfg: 01c20080
ccm->nand0_clk_cfg: 0x8102000a
ccm->sd0_clk_cfg: 01c20088
ccm->sd0_clk_cfg: 0x8140030b
ccm->pll6_cfg: 01c20028
ccm->pll6_cfg: 0x90041811
NFC_REG_TIMING_CTL: 0x0
NFC_REG_CTL: 0x0
NFC_REG_CTL: 0x0
离线
没错的,在uboot中都是这样子用的。
readl(&nfc->ndfc_wcmd_set)
离线
sid 寄存器中有特定的数据??
离线
The address: 01c14200
sid_reg->sid_key0: 0x2904620
sid_reg->sid_key1: 0x4910318
sid_reg->sid_key2: 0x78170713
sid_reg->sid_key3: 0x60000078
数据手册上没有相应的值,wiki上也没有,这是对的吗?
最近编辑记录 flash (2019-05-17 18:26:21)
离线