[PATCH 3/3] board: mediatek: Add support for UniElec U7623 board

2020-07-12 Thread David Woodhouse
This is an MT7623A-based board, very similar to the Banana Pi R2. http://www.unielecinc.com/q/news/cn/p/product/detail.html?qd_guid=OjXwKCaRlN Signed-off-by: David Woodhouse --- arch/arm/dts/Makefile | 1 + .../arm/dts/mt7623a-unielec-u7623-02-emmc.dts | 211

[PATCH 1/3] board: mediatek: fix mmc_get_boot_dev() for platforms without external SD

2020-07-12 Thread David Woodhouse
On the UniElec U7623 board there is no external SD slot and the preloader doesn't fill in the magic field at 0x81d0 to indicate that it was booted from eMMC. Signed-off-by: David Woodhouse --- board/mediatek/mt7623/mt7623_rfb.c | 7 +++ 1 file changed, 7 insertions(+) diff --

[PATCH 2/3] board: mediatek: Use CONFIG_DEFAULT_FDT_FILE for default environment

2020-07-12 Thread David Woodhouse
Rather than hard-coding it to the Banana Pi R2. Signed-off-by: David Woodhouse --- configs/mt7623n_bpir2_defconfig | 2 +- include/configs/mt7623.h| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/mt7623n_bpir2_defconfig b/configs/mt7623n_bpir2_defconfig

Can't access mmc #0 on mt7623 when booted from external SD

2020-06-16 Thread David Woodhouse
The Banana Pi R2 bootloader will load U-Boot from either the internal eMMC, or the external SD card if the latter is present. If booted from the eMMC (and an SD card is subsequently inserted), both work from U-Boot. Both also work from Linux, whichever device is booted from. If booted from SD, th

Re: Can't access mmc #0 on mt7623 when booted from external SD

2020-06-16 Thread David Woodhouse
On Tue, 2020-06-16 at 18:21 +0200, Michael Nazzareno Trimarchi wrote: > Hi David > > On Tue, Jun 16, 2020 at 6:16 PM David Woodhouse wrote: > > > > The Banana Pi R2 bootloader will load U-Boot from either the internal > > eMMC, or the external SD card if the lat

Re: Can't access mmc #0 on mt7623 when booted from external SD

2020-06-16 Thread David Woodhouse
On Tue, 2020-06-16 at 18:59 +0200, Michael Nazzareno Trimarchi wrote: > On Tue, Jun 16, 2020 at 6:57 PM David Woodhouse wrote: > > > > On Tue, 2020-06-16 at 18:21 +0200, Michael Nazzareno Trimarchi wrote: > > > Hi David > > > > > > On Tue, Jun 16, 202

Re: Can't access mmc #0 on mt7623 when booted from external SD

2020-06-16 Thread David Woodhouse
On Tue, 2020-06-16 at 21:38 +0200, Michael Nazzareno Trimarchi wrote: > Have you already tried to dump the pinmux using the cmd? in both > situation? U-Boot> pinmux status -a --

Re: Can't access mmc #0 on mt7623 when booted from external SD

2020-06-18 Thread David Woodhouse
On Tue, 2020-06-16 at 22:12 +0100, David Woodhouse wrote: > On Tue, 2020-06-16 at 21:38 +0200, Michael Nazzareno Trimarchi wrote: > > Have you already tried to dump the pinmux using the cmd? in both > > situation? > > U-B

Re: Can't access mmc #0 on mt7623 when booted from external SD

2020-06-18 Thread David Woodhouse
On Thu, 2020-06-18 at 16:52 +0100, David Woodhouse wrote: > So... whose bug is that? :) Looks like the pinctrl driver. This *ought* to work (with the caveat that I really ought to make two pinctrl setups and change between them according to the voltage, like the Linux DT and mtk-sd driver

Re: Can't access mmc #0 on mt7623 when booted from external SD

2020-06-18 Thread David Woodhouse
On Thu, 2020-06-18 at 21:34 +0200, Michael Nazzareno Trimarchi wrote: > > Looks like the pinctrl driver. This *ought* to work (with the caveat > > that I really ought to make two pinctrl setups and change between them > > according to the voltage, like the Linux DT and mtk-sd driver do). > > > > -

[PATCH] pinctrl: mediatek: add PUPD/R0/R1 support for MT7623

2020-06-19 Thread David Woodhouse
The pins for the MMC controller weren't being set up correctly because the pinctrl driver only sets the GPIO pullup/pulldown config and doesn't handle the special cases with PUPD/R0/R1 control. Signed-off-by: David Woodhouse --- And now the eMMC on my Banana Pi R2 actually works,

[PATCH] env/fat.c: allow loading from a FAT partition on the MMC boot device

2020-06-19 Thread David Woodhouse
I don't want to have to specify the device; only the partition. This allows me to use the same image on internal eMMC or SD card for Banana Pi R2, and it finds its own environment either way. Signed-off-by: David Woodhouse --- env/Kconfig | 4 env/fat.c

Re: [PATCH 3/3] board: mediatek: Add support for UniElec U7623 board

2020-07-23 Thread David Woodhouse
On Sun, 2020-07-12 at 23:33 +0100, David Woodhouse wrote: > This is an MT7623A-based board, very similar to the Banana Pi R2. > > http://www.unielecinc.com/q/news/cn/p/product/detail.html?qd_guid=OjXwKCaRlN Ping? smime.p7s Description: S/MIME cryptographic signature

Re: [PATCH] pinctrl: mediatek: add PUPD/R0/R1 support for MT7623

2020-07-23 Thread David Woodhouse
On Fri, 2020-06-19 at 12:40 +0100, David Woodhouse wrote: > The pins for the MMC controller weren't being set up correctly because the > pinctrl driver only sets the GPIO pullup/pulldown config and doesn't > handle the special cases with PUPD/R0/R1 control. > > Signe

Re: [PATCH] env/fat.c: allow loading from a FAT partition on the MMC boot device

2020-07-23 Thread David Woodhouse
On Fri, 2020-06-19 at 23:07 +0100, David Woodhouse wrote: > I don't want to have to specify the device; only the partition. > > This allows me to use the same image on internal eMMC or SD card for > Banana Pi R2, and it finds its own environment either way. > > Signed-

[PATCH 1/2] mmc: remove duplicate mmc_get_env_dev() implementations

2020-08-04 Thread David Woodhouse
Since it's so trivial I could just about tolerate this when there were only two copies of it. But now there are about to be three. Signed-off-by: David Woodhouse --- drivers/mmc/mmc.c | 9 + env/fat.c | 9 - env/mmc.c | 9 - 3 files changed, 9 inser

[PATCH 2/2] env/ext4.c: allow loading from an EXT4 partition on the MMC boot device

2020-08-04 Thread David Woodhouse
igned-off-by: David Woodhouse --- env/Kconfig | 4 env/ext4.c | 14 ++ 2 files changed, 18 insertions(+) diff --git a/env/Kconfig b/env/Kconfig index 5d0a8ecea0..ae449ea92c 100644 --- a/env/Kconfig +++ b/env/Kconfig @@ -476,6 +476,10 @@ config ENV_EXT4_DEVICE_AND

Re: [PATCH] Convert CONFIG_SYS_MMC_ENV_DEV et al to Kconfig

2020-08-05 Thread David Woodhouse
On 5 August 2020 13:51:43 BST, Tom Rini wrote: >On Wed, Aug 05, 2020 at 11:07:15AM +0200, Stefan Roese wrote: >> Hi Rasmus, >> >> On 05.08.20 10:47, Rasmus Villemoes wrote: >> > On 24/07/2020 23.14, Tom Rini wrote: >> > > This converts the following to Kconfig: >> > > CONFIG_SYS_MMC_ENV_DE

Re: [PATCH] Convert CONFIG_SYS_MMC_ENV_DEV et al to Kconfig

2020-08-05 Thread David Woodhouse
On 5 August 2020 14:14:58 BST, Tom Rini wrote: >On Wed, Aug 05, 2020 at 02:04:02PM +0100, David Woodhouse wrote: >> >> >> On 5 August 2020 13:51:43 BST, Tom Rini wrote: >> >On Wed, Aug 05, 2020 at 11:07:15AM +0200, Stefan Roese wrote: >> >> Hi Rasm

Re: [PATCH] Convert CONFIG_SYS_MMC_ENV_DEV et al to Kconfig

2020-08-05 Thread David Woodhouse
On 5 August 2020 14:14:58 BST, Tom Rini wrote: >On Wed, Aug 05, 2020 at 02:04:02PM +0100, David Woodhouse wrote: >> >> >> On 5 August 2020 13:51:43 BST, Tom Rini wrote: >> >On Wed, Aug 05, 2020 at 11:07:15AM +0200, Stefan Roese wrote: >> >> Hi Rasm

Re: [PATCH] Convert CONFIG_SYS_MMC_ENV_DEV et al to Kconfig

2020-08-14 Thread David Woodhouse
On Wed, 2020-08-05 at 10:52 -0400, Tom Rini wrote: > > > >> FAT and ext4 don't need to grow their own config symbols because they > > >already *have* them. The only reason they're involved here is because > > >of the case where they explicitly want to *abdicate* responsibility and > > >let platfor