You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/10/20 08:15:15 UTC

[GitHub] [incubator-nuttx] eenurkka opened a new pull request #4709: mpfs: emmcsd: provide proper internal emmc settings

eenurkka opened a new pull request #4709:
URL: https://github.com/apache/incubator-nuttx/pull/4709


   So far the SD-card functionality has been tested with
   the driver. Now, also the internal eMMC has been tested
   working with this patch. This patch applies IOMUX and
   clock settings that have been tested working with the
   internal eMMC in the Polarfire Icicle kit.
   
   Signed-off-by: Eero Nurkkala <ee...@offcode.fi>
   
   ## Summary
   
   ## Impact
   
   ## Testing
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] gustavonihei commented on pull request #4709: mpfs: emmcsd: provide proper internal emmc settings

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on pull request #4709:
URL: https://github.com/apache/incubator-nuttx/pull/4709#issuecomment-947617269


   @eenurkka Thanks for your contribution! You may want to link your email and GitHub accounts, so that GitHub can count your contributions.
   Also, please don't forget to squash the commits.
   ![image](https://user-images.githubusercontent.com/38959758/138092055-742731ed-bb69-4435-aa1a-1623aa367aa2.png)
   In general the PR looks good, but since I am not familiar with the eMMC/SC standard nor the Icicle Polarfire board, so I'll leave the approval to other reviewers.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #4709: mpfs: emmcsd: provide proper internal emmc settings

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on a change in pull request #4709:
URL: https://github.com/apache/incubator-nuttx/pull/4709#discussion_r732705967



##########
File path: arch/risc-v/src/mpfs/mpfs_emmcsd.c
##########
@@ -1404,6 +1459,21 @@ static bool mpfs_device_reset(struct sdio_dev_s *dev)
 
       mpfs_sdcard_init(priv);
     }
+  else
+    {
+      /* For the eMMC, use these default values */
+
+      priv->bus_voltage = MPFS_EMMCSD_1_8V_BUS_VOLTAGE;
+      priv->bus_speed   = MPFS_EMMCSD_MODE_HS200;
+      priv->jumpers_3v3 = false;
+
+      /* Apply proper IOMUX values for the eMMC. This is required especially
+       * if this nuttx works as the system bootloader. Otherwise, it's

Review comment:
       ```suggestion
          * if this NuttX works as the system bootloader. Otherwise, it's
   ```
   nit: Correct NuttX stylization




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #4709: mpfs: emmcsd: provide proper internal emmc settings

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on a change in pull request #4709:
URL: https://github.com/apache/incubator-nuttx/pull/4709#discussion_r732704430



##########
File path: arch/risc-v/src/mpfs/mpfs_emmcsd.c
##########
@@ -1361,6 +1372,44 @@ static void mpfs_sdcard_init(struct mpfs_dev_s *priv)
   putreg32(1, SDIO_REGISTER_ADDRESS);
 }
 
+/****************************************************************************
+ * Name: mpfs_emmc_card_init
+ *
+ * Description:
+ *   Sets the IOMUX values properly for the internal emmc. No need to access
+ *   the SDIO_REGISTER for switching the eMMC/SD because it's zero by
+ *   default.
+ *
+ * Input Parameters:
+ *   priv     - Instance of the eMMCSD private state structure.
+ *
+ * Returned Value:
+ *   None
+ *
+ ****************************************************************************/
+
+static void mpfs_emmc_card_init(struct mpfs_dev_s *priv)
+{
+  putreg32(LIBERO_SETTING_IOMUX1_CR_EMMC, MPFS_SYSREG_IOMUX1);
+  putreg32(LIBERO_SETTING_IOMUX2_CR_EMMC, MPFS_SYSREG_IOMUX2);
+  putreg32(LIBERO_SETTING_IOMUX6_CR_EMMC, MPFS_SYSREG_IOMUX6);
+  putreg32(LIBERO_SETTING_MSSIO_BANK4_CFG_CR_EMMC, MPFS_SYSREG_B4_CFG);
+  putreg32(LIBERO_SETTING_MSSIO_BANK4_IO_CFG_0_1_CR_EMMC,
+           MPFS_SYSREG_B4_0_1);
+  putreg32(LIBERO_SETTING_MSSIO_BANK4_IO_CFG_2_3_CR_EMMC,
+           MPFS_SYSREG_B4_2_3);
+  putreg32(LIBERO_SETTING_MSSIO_BANK4_IO_CFG_4_5_CR_EMMC,
+           MPFS_SYSREG_B4_4_5);
+  putreg32(LIBERO_SETTING_MSSIO_BANK4_IO_CFG_6_7_CR_EMMC,
+           MPFS_SYSREG_B4_6_7);
+  putreg32(LIBERO_SETTING_MSSIO_BANK4_IO_CFG_8_9_CR_EMMC,
+           MPFS_SYSREG_B4_8_9);
+  putreg32(LIBERO_SETTING_MSSIO_BANK4_IO_CFG_10_11_CR_EMMC,
+           MPFS_SYSREG_B4_10_11);
+  putreg32(LIBERO_SETTING_MSSIO_BANK4_IO_CFG_12_13_CR_EMMC,
+          MPFS_SYSREG_4_12_13);

Review comment:
       ```suggestion
              MPFS_SYSREG_4_12_13);
   ```
   nit: alignment




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #4709: mpfs: emmcsd: provide proper internal emmc settings

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #4709:
URL: https://github.com/apache/incubator-nuttx/pull/4709


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #4709: mpfs: emmcsd: provide proper internal emmc settings

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on a change in pull request #4709:
URL: https://github.com/apache/incubator-nuttx/pull/4709#discussion_r732704120



##########
File path: arch/risc-v/src/mpfs/mpfs_emmcsd.c
##########
@@ -1361,6 +1372,44 @@ static void mpfs_sdcard_init(struct mpfs_dev_s *priv)
   putreg32(1, SDIO_REGISTER_ADDRESS);
 }
 
+/****************************************************************************
+ * Name: mpfs_emmc_card_init
+ *
+ * Description:
+ *   Sets the IOMUX values properly for the internal emmc. No need to access

Review comment:
       ```suggestion
    *   Sets the IOMUX values properly for the internal eMMC. No need to access
   ```
   nit: Just for consistency.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org