[OpenWrt-Devel] [PATCH RFC 0/3] ramips: fix SDXC for HiWiFi HC5661A

Chuanhong Guo gch981213 at gmail.com
Sun Jul 14 12:34:25 EDT 2019


Since mt76x8 ver1 eco2, SDXC pins can be switched to the
following pinmap:
sd_d1  -> PAD_I2S_SDI
sd_d0  -> PAD_I2S_WS
sd_cmd -> PAD_I2S_CLK
sd_d3  -> PAD_I2C_SCLK
sd_d2  -> PAD_I2C_SD
sd_clk -> PAD_GPIO0
sd_wp  -> PAD_TXD1
sd_cd  -> PAD_RXD1

To use this pinmap, one would need to set ESD_MODE bit (bit 15)
to 1 in GPIO1_MODE and switch other used pads into GPIO mode.

HC5661A is a router which used this pinmap so that all 5 ethernet
ports and SDXC interface can be used simutaneously.

I think this patchset is kind of hacky so I decided to send it here
for review/suggestions.

Chuanhong Guo (3):
  ramips: mtk-mmc: mt76x8: check ESD_MODE before applying AGPIO_CFG
  ramips: mt76x8: pinctrl: add a hack for ESD_MODE bit in GPIO1_MODE
  ramips: enable sdxc driver for hc5661a

 .../ramips/dts/mt7628an_hiwifi_hc5661a.dts    | 17 ++++++
 .../files-4.14/drivers/mmc/host/mtk-mmc/sd.c  | 12 ++--
 target/linux/ramips/image/mt76x8.mk           |  1 +
 .../500-hack-mt76x8-pinctrl-esdmode.patch     | 55 +++++++++++++++++++
 4 files changed, 77 insertions(+), 8 deletions(-)
 create mode 100644 target/linux/ramips/patches-4.14/500-hack-mt76x8-pinctrl-esdmode.patch

-- 
2.21.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list