嵌入式爱好者

104x11C4复用为GPIO

2021-2-26 14:17| 发布者: xhh| 查看: 979| 评论: 0

类目: 知识库  >  LS1012A/LS1043A/LS1046A系列产品     文档编号: 474

此方式为直接读写寄存器,举例说明,客户可根据自己的需求自行读写寄存器
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
index ab87507c78be..fcfd79276be9 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts
@@ -119,7 +119,7 @@
 };
 
 &i2c3 {
- status = "okay";
+ status = "disabled";
 };
 
 &duart0 {
diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
index 06797b34b1a4..c62a4adfe255 100644
--- a/drivers/mmc/host/sdhci-of-esdhc.c
+++ b/drivers/mmc/host/sdhci-of-esdhc.c
@@ -844,6 +844,8 @@ static int sdhci_esdhc_probe(struct platform_device *pdev)
  struct sdhci_pltfm_host *pltfm_host;
  struct sdhci_esdhc *esdhc;
  int ret;
+ u32 value;
+ void __iomem *CFG_RCWPMUXCR0;
 
  np = pdev->dev.of_node;
 
@@ -862,6 +864,15 @@ static int sdhci_esdhc_probe(struct platform_device *pdev)
  host->mmc_host_ops.execute_tuning = esdhc_execute_tuning;
  host->tuning_delay = 1;
 
+ CFG_RCWPMUXCR0=ioremap(0x157040C, 0x04);
+ value = ioread32be(CFG_RCWPMUXCR0);
+ printk("CFG_RCWPMUXCR0 is %x ----------1111\n",value);
+ value |= 0x11;
+ iowrite32be(0x11, CFG_RCWPMUXCR0);
+ value = ioread32be(CFG_RCWPMUXCR0);
+ printk("CFG_RCWPMUXCR0 is %x ----------2222\n",value);
+ iounmap(CFG_RCWPMUXCR0);
+
  esdhc_init(pdev, host);
 
  sdhci_get_of_property(pdev);


已解决

未解决

只是看看

QQ|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )

GMT+8, 2024-11-22 23:04

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

返回顶部