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 寄存器中有特定的数据??
离线
sid 寄存器中有特定的数据??
http://linux-sunxi.org/SID_Register_Guide
Info
SID Base address: 0x01c23800
For Allwinner A83T and H3 the SID address space starts at 0x01c14000, and the e-fuses are at offset 0x200 - so the address to use for these SoCs is 0x01c14200.
SID Registers
Register Name Offset Size Description Note
SID_KEY0 0x00 4 B Key0 [0:31]
SID_KEY1 0x04 4 B Key1 [32:63]
SID_KEY2 0x08 4 B Key2 [64:95]
SID_KEY3 0x0c 4 B Key3 [96:127]
SID_WRITE_DATA 0x40 4 B Data [0:31] NOT VERIFIED
SID_WRITE_CTRL 0x44 4 B SID Program Control register
离线
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)
离线
The address: 01c14200
sid_reg->sid_key0: 0x2904620
sid_reg->sid_key1: 0x4910318
sid_reg->sid_key2: 0x78170713
sid_reg->sid_key3: 0x60000078数据手册上没有相应的值,wiki上也没有,这是对的吗?
据说这个组合起来近似认为是芯片的唯一Id,
如果每次读到数据都相同, 说明代码没有问题
离线
调试过了没,有源码吗?一起调?
离线
大佬们有f1c100s的可以从nand启动的uboot吗
离线