diff mbox

[U-Boot,12/12] sunxi: add a defconfig for SoPine w/ official baseboard

Message ID 20170426145007.39563-13-icenowy@aosc.io
State Superseded
Delegated to: Jagannadha Sutradharudu Teki
Headers show

Commit Message

Icenowy Zheng April 26, 2017, 2:50 p.m. UTC
The SoPine is a SoM by Pine64, with an Allwinner A64 SoC, a LPDDR3 DRAM
chip, an AXP803 PMIC, a SPI NOR Flash and a MicroSD slot. The card
detect pin of the MicroSD slot is broken, however, it doesn't matter as
the design of SoPine didn't allow hot-swapping the MicroSD card (The
MicroSD slot is at the back of the SoM, and when the SoM is installed on
the baseboard, it's nearly impossible to remove the MicroSD).

The official baseboard of it is a board with nearly the same connectors
with the original Pine64+, with the MicroUSB power jack replaced, and
at the position of MicroSD slot a eMMC module slot is added.

Add support for SoPine with the official baseboard by adding its
defconfig file. It still uses the device tree of Pine64, however, it
will change after a proper device tree of SoPine with baseboard is
accepted by Linux mainline.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
 configs/sopine_baseboard_defconfig | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 configs/sopine_baseboard_defconfig

Comments

Jagan Teki June 2, 2017, 6:32 p.m. UTC | #1
On Wed, Apr 26, 2017 at 8:20 PM, Icenowy Zheng <icenowy@aosc.io> wrote:
> The SoPine is a SoM by Pine64, with an Allwinner A64 SoC, a LPDDR3 DRAM
> chip, an AXP803 PMIC, a SPI NOR Flash and a MicroSD slot. The card
> detect pin of the MicroSD slot is broken, however, it doesn't matter as
> the design of SoPine didn't allow hot-swapping the MicroSD card (The
> MicroSD slot is at the back of the SoM, and when the SoM is installed on
> the baseboard, it's nearly impossible to remove the MicroSD).
>
> The official baseboard of it is a board with nearly the same connectors
> with the original Pine64+, with the MicroUSB power jack replaced, and
> at the position of MicroSD slot a eMMC module slot is added.
>
> Add support for SoPine with the official baseboard by adding its
> defconfig file. It still uses the device tree of Pine64, however, it
> will change after a proper device tree of SoPine with baseboard is
> accepted by Linux mainline.
>
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> ---
>  configs/sopine_baseboard_defconfig | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
>  create mode 100644 configs/sopine_baseboard_defconfig
>
> diff --git a/configs/sopine_baseboard_defconfig

Can't this be simply sopine_defconfig

Please add MAINTAINERS entry as well

thanks!
Andre Przywara June 2, 2017, 11:59 p.m. UTC | #2
Hi,

On 02/06/17 19:32, Jagan Teki wrote:
> On Wed, Apr 26, 2017 at 8:20 PM, Icenowy Zheng <icenowy@aosc.io> wrote:
>> The SoPine is a SoM by Pine64, with an Allwinner A64 SoC, a LPDDR3 DRAM
>> chip, an AXP803 PMIC, a SPI NOR Flash and a MicroSD slot. The card
>> detect pin of the MicroSD slot is broken, however, it doesn't matter as
>> the design of SoPine didn't allow hot-swapping the MicroSD card (The
>> MicroSD slot is at the back of the SoM, and when the SoM is installed on
>> the baseboard, it's nearly impossible to remove the MicroSD).
>>
>> The official baseboard of it is a board with nearly the same connectors
>> with the original Pine64+, with the MicroUSB power jack replaced, and
>> at the position of MicroSD slot a eMMC module slot is added.
>>
>> Add support for SoPine with the official baseboard by adding its
>> defconfig file. It still uses the device tree of Pine64, however, it
>> will change after a proper device tree of SoPine with baseboard is
>> accepted by Linux mainline.
>>
>> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
>> ---
>>  configs/sopine_baseboard_defconfig | 22 ++++++++++++++++++++++
>>  1 file changed, 22 insertions(+)
>>  create mode 100644 configs/sopine_baseboard_defconfig
>>
>> diff --git a/configs/sopine_baseboard_defconfig
> 
> Can't this be simply sopine_defconfig

No, because the SoPine module itself is not complete and the system's DT
may be much different between using different baseboards. So using the
term "baseboard" in there is correct. Question is whether we want to
have a separate sopine.dtsi, which just describes the module, then
(multiple) baseboard .dts files including this sopine.dtsi. But this is
a bit premature until we actually see a second baseboard, at which point
we could still split this up then.

Cheers,
Andre.
Andre Przywara June 3, 2017, 12:08 a.m. UTC | #3
On 03/06/17 00:59, André Przywara wrote:
> Hi,
> 
> On 02/06/17 19:32, Jagan Teki wrote:
>> On Wed, Apr 26, 2017 at 8:20 PM, Icenowy Zheng <icenowy@aosc.io> wrote:
>>> The SoPine is a SoM by Pine64, with an Allwinner A64 SoC, a LPDDR3 DRAM
>>> chip, an AXP803 PMIC, a SPI NOR Flash and a MicroSD slot. The card
>>> detect pin of the MicroSD slot is broken, however, it doesn't matter as
>>> the design of SoPine didn't allow hot-swapping the MicroSD card (The
>>> MicroSD slot is at the back of the SoM, and when the SoM is installed on
>>> the baseboard, it's nearly impossible to remove the MicroSD).
>>>
>>> The official baseboard of it is a board with nearly the same connectors
>>> with the original Pine64+, with the MicroUSB power jack replaced, and
>>> at the position of MicroSD slot a eMMC module slot is added.
>>>
>>> Add support for SoPine with the official baseboard by adding its
>>> defconfig file. It still uses the device tree of Pine64, however, it
>>> will change after a proper device tree of SoPine with baseboard is
>>> accepted by Linux mainline.
>>>
>>> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
>>> ---
>>>  configs/sopine_baseboard_defconfig | 22 ++++++++++++++++++++++
>>>  1 file changed, 22 insertions(+)
>>>  create mode 100644 configs/sopine_baseboard_defconfig
>>>
>>> diff --git a/configs/sopine_baseboard_defconfig
>>
>> Can't this be simply sopine_defconfig
> 
> No, because the SoPine module itself is not complete and the system's DT


> may be much different between using different baseboards. So using the
> term "baseboard" in there is correct. Question is whether we want to
> have a separate sopine.dtsi, which just describes the module, then
> (multiple) baseboard .dts files including this sopine.dtsi. But this is
> a bit premature until we actually see a second baseboard, at which point
> we could still split this up then.

Argh, just saw that I misread defconfig for DT here, sorry. But the
argument still stands: the SoPine module itself has only a bit of
functionality and is not usable on its own, so any board configuration
must be considered as being together with some kind of base board.
For instance the eMMC, HDMI socket and Ethernet PHY is not on the SoPine
module.

Cheers,
Andre.
Andre Przywara June 3, 2017, 1:19 a.m. UTC | #4
Hi,

On 26/04/17 15:50, Icenowy Zheng wrote:
> The SoPine is a SoM by Pine64, with an Allwinner A64 SoC, a LPDDR3 DRAM
> chip, an AXP803 PMIC, a SPI NOR Flash and a MicroSD slot. The card
> detect pin of the MicroSD slot is broken, however, it doesn't matter as
> the design of SoPine didn't allow hot-swapping the MicroSD card (The
> MicroSD slot is at the back of the SoM, and when the SoM is installed on
> the baseboard, it's nearly impossible to remove the MicroSD).
> 
> The official baseboard of it is a board with nearly the same connectors
> with the original Pine64+, with the MicroUSB power jack replaced, and
> at the position of MicroSD slot a eMMC module slot is added.
> 
> Add support for SoPine with the official baseboard by adding its
> defconfig file. It still uses the device tree of Pine64, however, it
> will change after a proper device tree of SoPine with baseboard is
> accepted by Linux mainline.

There is some point in this, but I wonder if we actually need to wait
for Linux. In fact since the SoPine has SPI flash, we don't desperately
need a DT in the Linux source tree, since it could just come with the
device - as in U-Boot's DT passed through to the kernel.

So can we have a separate DT, probably including -pine64.dts and at
least adding the eMMC? Could be copy&paste version of the BPi-M64, for
instance.

One more below ....

> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> ---
>  configs/sopine_baseboard_defconfig | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
>  create mode 100644 configs/sopine_baseboard_defconfig
> 
> diff --git a/configs/sopine_baseboard_defconfig b/configs/sopine_baseboard_defconfig
> new file mode 100644
> index 0000000000..02ffb43d54
> --- /dev/null
> +++ b/configs/sopine_baseboard_defconfig
> @@ -0,0 +1,22 @@
> +CONFIG_ARM=y
> +CONFIG_ARCH_SUNXI=y
> +CONFIG_MACH_SUN50I=y
> +CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
> +CONFIG_SUNXI_DRAM_LPDDR3_STOCK=y
> +CONFIG_DRAM_CLK=552
> +CONFIG_DRAM_ZQ=3881949
> +CONFIG_DRAM_ODT_EN=y
> +CONFIG_MMC0_CD_PIN=""
> +CONFIG_MMC_SUNXI_SLOT_EXTRA=2
> +CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
> +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
> +CONFIG_CONSOLE_MUX=y
> +CONFIG_SPL=y
> +# CONFIG_CMD_IMLS is not set
> +# CONFIG_CMD_FLASH is not set
> +# CONFIG_CMD_FPGA is not set
> +# CONFIG_SPL_DOS_PARTITION is not set
> +# CONFIG_SPL_ISO_PARTITION is not set
> +# CONFIG_SPL_EFI_PARTITION is not set
> +CONFIG_SUN8I_EMAC=y
> +CONFIG_USB_EHCI_HCD=y

Can you add the SPL SPI flash options here? This allows loading U-Boot
from SPI flash and makes this much more useful.

Cheers,
Andre.
Icenowy Zheng June 3, 2017, 3:19 a.m. UTC | #5
在 2017-06-03 09:19,André Przywara 写道:
> Hi,
> 
> On 26/04/17 15:50, Icenowy Zheng wrote:
>> The SoPine is a SoM by Pine64, with an Allwinner A64 SoC, a LPDDR3 
>> DRAM
>> chip, an AXP803 PMIC, a SPI NOR Flash and a MicroSD slot. The card
>> detect pin of the MicroSD slot is broken, however, it doesn't matter 
>> as
>> the design of SoPine didn't allow hot-swapping the MicroSD card (The
>> MicroSD slot is at the back of the SoM, and when the SoM is installed 
>> on
>> the baseboard, it's nearly impossible to remove the MicroSD).
>> 
>> The official baseboard of it is a board with nearly the same 
>> connectors
>> with the original Pine64+, with the MicroUSB power jack replaced, and
>> at the position of MicroSD slot a eMMC module slot is added.
>> 
>> Add support for SoPine with the official baseboard by adding its
>> defconfig file. It still uses the device tree of Pine64, however, it
>> will change after a proper device tree of SoPine with baseboard is
>> accepted by Linux mainline.
> 
> There is some point in this, but I wonder if we actually need to wait
> for Linux. In fact since the SoPine has SPI flash, we don't desperately
> need a DT in the Linux source tree, since it could just come with the
> device - as in U-Boot's DT passed through to the kernel.
> 
> So can we have a separate DT, probably including -pine64.dts and at
> least adding the eMMC? Could be copy&paste version of the BPi-M64, for
> instance.

In fact changing the defconfig is now enough to initialize the MMC2
controller.

See "CONFIG_MMC_SUNXI_SLOT_EXTRA=2" below.

> 
> One more below ....
> 
>> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
>> ---
>>  configs/sopine_baseboard_defconfig | 22 ++++++++++++++++++++++
>>  1 file changed, 22 insertions(+)
>>  create mode 100644 configs/sopine_baseboard_defconfig
>> 
>> diff --git a/configs/sopine_baseboard_defconfig 
>> b/configs/sopine_baseboard_defconfig
>> new file mode 100644
>> index 0000000000..02ffb43d54
>> --- /dev/null
>> +++ b/configs/sopine_baseboard_defconfig
>> @@ -0,0 +1,22 @@
>> +CONFIG_ARM=y
>> +CONFIG_ARCH_SUNXI=y
>> +CONFIG_MACH_SUN50I=y
>> +CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
>> +CONFIG_SUNXI_DRAM_LPDDR3_STOCK=y
>> +CONFIG_DRAM_CLK=552
>> +CONFIG_DRAM_ZQ=3881949
>> +CONFIG_DRAM_ODT_EN=y
>> +CONFIG_MMC0_CD_PIN=""
>> +CONFIG_MMC_SUNXI_SLOT_EXTRA=2
>> +CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
>> +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
>> +CONFIG_CONSOLE_MUX=y
>> +CONFIG_SPL=y
>> +# CONFIG_CMD_IMLS is not set
>> +# CONFIG_CMD_FLASH is not set
>> +# CONFIG_CMD_FPGA is not set
>> +# CONFIG_SPL_DOS_PARTITION is not set
>> +# CONFIG_SPL_ISO_PARTITION is not set
>> +# CONFIG_SPL_EFI_PARTITION is not set
>> +CONFIG_SUN8I_EMAC=y
>> +CONFIG_USB_EHCI_HCD=y
> 
> Can you add the SPL SPI flash options here? This allows loading U-Boot
> from SPI flash and makes this much more useful.

Yes, seems useful...

> 
> Cheers,
> Andre.
diff mbox

Patch

diff --git a/configs/sopine_baseboard_defconfig b/configs/sopine_baseboard_defconfig
new file mode 100644
index 0000000000..02ffb43d54
--- /dev/null
+++ b/configs/sopine_baseboard_defconfig
@@ -0,0 +1,22 @@ 
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN50I=y
+CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
+CONFIG_SUNXI_DRAM_LPDDR3_STOCK=y
+CONFIG_DRAM_CLK=552
+CONFIG_DRAM_ZQ=3881949
+CONFIG_DRAM_ODT_EN=y
+CONFIG_MMC0_CD_PIN=""
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_CONSOLE_MUX=y
+CONFIG_SPL=y
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+# CONFIG_SPL_DOS_PARTITION is not set
+# CONFIG_SPL_ISO_PARTITION is not set
+# CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SUN8I_EMAC=y
+CONFIG_USB_EHCI_HCD=y