All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2] Add Beaglebone Enhanced support
@ 2018-07-18  8:13 Koen Kooi
  2018-07-19 12:52 ` Tom Rini
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Koen Kooi @ 2018-07-18  8:13 UTC (permalink / raw)
  To: u-boot

The "Beaglebone Enhanced" by Sancloud is based on the Beaglebone Black,
but with the following differences:

 * Gigabit capable PHY
 * Extra USB hub, optional i2c control
 * lps3331ap barometer connected over i2c
 * MPU6050 6 axis MEMS accelerometer/gyro connected over i2c
 * 1GiB DDR3 RAM
 * RTL8723 Wifi/Bluetooth connected over USB

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>

---

Changes in v2:
- Moved 'Beaglebone LT pinmux' comment down a bit

 board/ti/am335x/board.c      | 6 ++++--
 board/ti/am335x/board.h      | 8 +++++++-
 board/ti/am335x/mux.c        | 7 +++++++
 include/configs/am335x_evm.h | 2 ++
 4 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index 147ff0b..a359d20 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -725,6 +725,8 @@ int board_late_init(void)
 
 	if (board_is_bbg1())
 		name = "BBG1";
+	if (board_is_bben())
+		name = "BBEN";
 	set_board_info_env(name);
 
 	/*
@@ -870,7 +872,7 @@ int board_eth_init(bd_t *bis)
 	(defined(CONFIG_SPL_ETH_SUPPORT) && defined(CONFIG_SPL_BUILD))
 
 #ifdef CONFIG_DRIVER_TI_CPSW
-	if (board_is_bone() || board_is_bone_lt() ||
+	if (board_is_bone() || board_is_bone_lt() || board_is_bben() ||
 	    board_is_idk()) {
 		writel(MII_MODE_ENABLE, &cdev->miisel);
 		cpsw_slaves[0].phy_if = cpsw_slaves[1].phy_if =
@@ -906,7 +908,7 @@ int board_eth_init(bd_t *bis)
 #define AR8051_DEBUG_RGMII_CLK_DLY_REG	0x5
 #define AR8051_RGMII_TX_CLK_DLY		0x100
 
-	if (board_is_evm_sk() || board_is_gp_evm()) {
+	if (board_is_evm_sk() || board_is_gp_evm() || board_is_bben()) {
 		const char *devname;
 		devname = miiphy_get_current_dev();
 
diff --git a/board/ti/am335x/board.h b/board/ti/am335x/board.h
index 652b10b..48df914 100644
--- a/board/ti/am335x/board.h
+++ b/board/ti/am335x/board.h
@@ -43,9 +43,15 @@ static inline int board_is_bbg1(void)
 	return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "BBG1", 4);
 }
 
+static inline int board_is_bben(void)
+{
+	return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "SE", 2);
+}
+
 static inline int board_is_beaglebonex(void)
 {
-	return board_is_pb() || board_is_bone() || board_is_bone_lt() || board_is_bbg1();
+	return board_is_pb() || board_is_bone() || board_is_bone_lt() ||
+	       board_is_bbg1() || board_is_bben();
 }
 
 static inline int board_is_evm_sk(void)
diff --git a/board/ti/am335x/mux.c b/board/ti/am335x/mux.c
index aa18760..41333f9 100644
--- a/board/ti/am335x/mux.c
+++ b/board/ti/am335x/mux.c
@@ -380,6 +380,13 @@ void enable_board_pin_mux(void)
 		configure_module_pin_mux(rgmii1_pin_mux);
 		configure_module_pin_mux(mmc0_pin_mux_sk_evm);
 	} else if (board_is_bone_lt()) {
+		if (board_is_bben()) {
+			/* SanCloud Beaglebone LT Enhanced pinmux */
+			configure_module_pin_mux(rgmii1_pin_mux);
+		} else {
+			/* Beaglebone LT pinmux */
+			configure_module_pin_mux(mii1_pin_mux);
+		}
 		/* Beaglebone LT pinmux */
 		configure_module_pin_mux(mii1_pin_mux);
 		configure_module_pin_mux(mmc0_pin_mux);
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index ff87adc..f1aa653 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -153,6 +153,8 @@
 			"setenv fdtfile am335x-bonegreen-wireless.dtb; fi; " \
 		"if test $board_name = BBBL; then " \
 			"setenv fdtfile am335x-boneblue.dtb; fi; " \
+		"if test $board_name = BBEN; then " \
+			"setenv fdtfile am335x-sancloud-bbe.dtb; fi; " \
 		"if test $board_name = A33515BB; then " \
 			"setenv fdtfile am335x-evm.dtb; fi; " \
 		"if test $board_name = A335X_SK; then " \
-- 
2.0.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v2] Add Beaglebone Enhanced support
  2018-07-18  8:13 [U-Boot] [PATCH v2] Add Beaglebone Enhanced support Koen Kooi
@ 2018-07-19 12:52 ` Tom Rini
  2018-07-19 12:55 ` Marek Vasut
  2018-08-04 23:39 ` [U-Boot] [U-Boot,v2] " Tom Rini
  2 siblings, 0 replies; 9+ messages in thread
From: Tom Rini @ 2018-07-19 12:52 UTC (permalink / raw)
  To: u-boot

On Wed, Jul 18, 2018 at 10:13:59AM +0200, Koen Kooi wrote:

> The "Beaglebone Enhanced" by Sancloud is based on the Beaglebone Black,
> but with the following differences:
> 
>  * Gigabit capable PHY
>  * Extra USB hub, optional i2c control
>  * lps3331ap barometer connected over i2c
>  * MPU6050 6 axis MEMS accelerometer/gyro connected over i2c
>  * 1GiB DDR3 RAM
>  * RTL8723 Wifi/Bluetooth connected over USB
> 
> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
> 

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180719/15553327/attachment.sig>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v2] Add Beaglebone Enhanced support
  2018-07-18  8:13 [U-Boot] [PATCH v2] Add Beaglebone Enhanced support Koen Kooi
  2018-07-19 12:52 ` Tom Rini
@ 2018-07-19 12:55 ` Marek Vasut
  2018-07-19 12:56   ` Koen Kooi
  2018-07-19 13:02   ` Tom Rini
  2018-08-04 23:39 ` [U-Boot] [U-Boot,v2] " Tom Rini
  2 siblings, 2 replies; 9+ messages in thread
From: Marek Vasut @ 2018-07-19 12:55 UTC (permalink / raw)
  To: u-boot

On 07/18/2018 10:13 AM, Koen Kooi wrote:
> The "Beaglebone Enhanced" by Sancloud is based on the Beaglebone Black,
> but with the following differences:
> 
>  * Gigabit capable PHY
>  * Extra USB hub, optional i2c control
>  * lps3331ap barometer connected over i2c
>  * MPU6050 6 axis MEMS accelerometer/gyro connected over i2c
>  * 1GiB DDR3 RAM
>  * RTL8723 Wifi/Bluetooth connected over USB
> 
> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
> 
> ---
> 
[...]

> diff --git a/board/ti/am335x/board.h b/board/ti/am335x/board.h
> index 652b10b..48df914 100644
> --- a/board/ti/am335x/board.h
> +++ b/board/ti/am335x/board.h
> @@ -43,9 +43,15 @@ static inline int board_is_bbg1(void)
>  	return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "BBG1", 4);
>  }
>  
> +static inline int board_is_bben(void)

Should be just static int ... the compiler can decide.

> +{
> +	return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "SE", 2);
> +}
[...]

-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v2] Add Beaglebone Enhanced support
  2018-07-19 12:55 ` Marek Vasut
@ 2018-07-19 12:56   ` Koen Kooi
  2018-07-19 13:02   ` Tom Rini
  1 sibling, 0 replies; 9+ messages in thread
From: Koen Kooi @ 2018-07-19 12:56 UTC (permalink / raw)
  To: u-boot



> Op 19 jul. 2018, om 14:55 heeft Marek Vasut <marex@denx.de> het volgende geschreven:
> 
> On 07/18/2018 10:13 AM, Koen Kooi wrote:
>> The "Beaglebone Enhanced" by Sancloud is based on the Beaglebone Black,
>> but with the following differences:
>> 
>> * Gigabit capable PHY
>> * Extra USB hub, optional i2c control
>> * lps3331ap barometer connected over i2c
>> * MPU6050 6 axis MEMS accelerometer/gyro connected over i2c
>> * 1GiB DDR3 RAM
>> * RTL8723 Wifi/Bluetooth connected over USB
>> 
>> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
>> 
>> ---
>> 
> [...]
> 
>> diff --git a/board/ti/am335x/board.h b/board/ti/am335x/board.h
>> index 652b10b..48df914 100644
>> --- a/board/ti/am335x/board.h
>> +++ b/board/ti/am335x/board.h
>> @@ -43,9 +43,15 @@ static inline int board_is_bbg1(void)
>> 	return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "BBG1", 4);
>> }
>> 
>> +static inline int board_is_bben(void)
> 
> Should be just static int ... the compiler can decide.

I have a seperate patch for that, but I haven’t taken the time to compile both versions and look at size differences.

regards,

Koen


> 
>> +{
>> +	return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "SE", 2);
>> +}
> [...]
> 
> -- 
> Best regards,
> Marek Vasut

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v2] Add Beaglebone Enhanced support
  2018-07-19 12:55 ` Marek Vasut
  2018-07-19 12:56   ` Koen Kooi
@ 2018-07-19 13:02   ` Tom Rini
  2018-07-19 13:03     ` Koen Kooi
  2018-07-19 13:07     ` Marek Vasut
  1 sibling, 2 replies; 9+ messages in thread
From: Tom Rini @ 2018-07-19 13:02 UTC (permalink / raw)
  To: u-boot

On Thu, Jul 19, 2018 at 02:55:37PM +0200, Marek Vasut wrote:
> On 07/18/2018 10:13 AM, Koen Kooi wrote:
> > The "Beaglebone Enhanced" by Sancloud is based on the Beaglebone Black,
> > but with the following differences:
> > 
> >  * Gigabit capable PHY
> >  * Extra USB hub, optional i2c control
> >  * lps3331ap barometer connected over i2c
> >  * MPU6050 6 axis MEMS accelerometer/gyro connected over i2c
> >  * 1GiB DDR3 RAM
> >  * RTL8723 Wifi/Bluetooth connected over USB
> > 
> > Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
> > 
> > ---
> > 
> [...]
> 
> > diff --git a/board/ti/am335x/board.h b/board/ti/am335x/board.h
> > index 652b10b..48df914 100644
> > --- a/board/ti/am335x/board.h
> > +++ b/board/ti/am335x/board.h
> > @@ -43,9 +43,15 @@ static inline int board_is_bbg1(void)
> >  	return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "BBG1", 4);
> >  }
> >  
> > +static inline int board_is_bben(void)
> 
> Should be just static int ... the compiler can decide.

No, it should be inline like all of the others in the file are.  And
then yes, if someone wants to do a size comparison with or without
inlining on all of those functions, sure.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180719/0716e668/attachment.sig>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v2] Add Beaglebone Enhanced support
  2018-07-19 13:02   ` Tom Rini
@ 2018-07-19 13:03     ` Koen Kooi
  2018-07-19 13:07     ` Marek Vasut
  1 sibling, 0 replies; 9+ messages in thread
From: Koen Kooi @ 2018-07-19 13:03 UTC (permalink / raw)
  To: u-boot



> Op 19 jul. 2018, om 15:02 heeft Tom Rini <trini@konsulko.com> het volgende geschreven:
> 
> On Thu, Jul 19, 2018 at 02:55:37PM +0200, Marek Vasut wrote:
>> On 07/18/2018 10:13 AM, Koen Kooi wrote:
>>> The "Beaglebone Enhanced" by Sancloud is based on the Beaglebone Black,
>>> but with the following differences:
>>> 
>>> * Gigabit capable PHY
>>> * Extra USB hub, optional i2c control
>>> * lps3331ap barometer connected over i2c
>>> * MPU6050 6 axis MEMS accelerometer/gyro connected over i2c
>>> * 1GiB DDR3 RAM
>>> * RTL8723 Wifi/Bluetooth connected over USB
>>> 
>>> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
>>> 
>>> ---
>>> 
>> [...]
>> 
>>> diff --git a/board/ti/am335x/board.h b/board/ti/am335x/board.h
>>> index 652b10b..48df914 100644
>>> --- a/board/ti/am335x/board.h
>>> +++ b/board/ti/am335x/board.h
>>> @@ -43,9 +43,15 @@ static inline int board_is_bbg1(void)
>>> 	return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "BBG1", 4);
>>> }
>>> 
>>> +static inline int board_is_bben(void)
>> 
>> Should be just static int ... the compiler can decide.
> 
> No, it should be inline like all of the others in the file are.  And
> then yes, if someone wants to do a size comparison with or without
> inlining on all of those functions, sure.

I wasn’t clear in my reply, I have a seperate patch that converts all of them :)

regards,

Koen

> 
> -- 
> Tom

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v2] Add Beaglebone Enhanced support
  2018-07-19 13:02   ` Tom Rini
  2018-07-19 13:03     ` Koen Kooi
@ 2018-07-19 13:07     ` Marek Vasut
  2018-07-19 13:15       ` Tom Rini
  1 sibling, 1 reply; 9+ messages in thread
From: Marek Vasut @ 2018-07-19 13:07 UTC (permalink / raw)
  To: u-boot

On 07/19/2018 03:02 PM, Tom Rini wrote:
> On Thu, Jul 19, 2018 at 02:55:37PM +0200, Marek Vasut wrote:
>> On 07/18/2018 10:13 AM, Koen Kooi wrote:
>>> The "Beaglebone Enhanced" by Sancloud is based on the Beaglebone Black,
>>> but with the following differences:
>>>
>>>  * Gigabit capable PHY
>>>  * Extra USB hub, optional i2c control
>>>  * lps3331ap barometer connected over i2c
>>>  * MPU6050 6 axis MEMS accelerometer/gyro connected over i2c
>>>  * 1GiB DDR3 RAM
>>>  * RTL8723 Wifi/Bluetooth connected over USB
>>>
>>> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
>>>
>>> ---
>>>
>> [...]
>>
>>> diff --git a/board/ti/am335x/board.h b/board/ti/am335x/board.h
>>> index 652b10b..48df914 100644
>>> --- a/board/ti/am335x/board.h
>>> +++ b/board/ti/am335x/board.h
>>> @@ -43,9 +43,15 @@ static inline int board_is_bbg1(void)
>>>  	return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "BBG1", 4);
>>>  }
>>>  
>>> +static inline int board_is_bben(void)
>>
>> Should be just static int ... the compiler can decide.
> 
> No, it should be inline like all of the others in the file are.  And
> then yes, if someone wants to do a size comparison with or without
> inlining on all of those functions, sure.

Can you explain why it should be static inline ?
Last time this discussion came up in Linux kernel ML (decisions from
which we seem to apply, cfr the SPDX C++ comments and DTC), static
inline was frowned upon with the argument that the compiler can decide.

-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH v2] Add Beaglebone Enhanced support
  2018-07-19 13:07     ` Marek Vasut
@ 2018-07-19 13:15       ` Tom Rini
  0 siblings, 0 replies; 9+ messages in thread
From: Tom Rini @ 2018-07-19 13:15 UTC (permalink / raw)
  To: u-boot

On Thu, Jul 19, 2018 at 03:07:55PM +0200, Marek Vasut wrote:
> On 07/19/2018 03:02 PM, Tom Rini wrote:
> > On Thu, Jul 19, 2018 at 02:55:37PM +0200, Marek Vasut wrote:
> >> On 07/18/2018 10:13 AM, Koen Kooi wrote:
> >>> The "Beaglebone Enhanced" by Sancloud is based on the Beaglebone Black,
> >>> but with the following differences:
> >>>
> >>>  * Gigabit capable PHY
> >>>  * Extra USB hub, optional i2c control
> >>>  * lps3331ap barometer connected over i2c
> >>>  * MPU6050 6 axis MEMS accelerometer/gyro connected over i2c
> >>>  * 1GiB DDR3 RAM
> >>>  * RTL8723 Wifi/Bluetooth connected over USB
> >>>
> >>> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
> >>>
> >>> ---
> >>>
> >> [...]
> >>
> >>> diff --git a/board/ti/am335x/board.h b/board/ti/am335x/board.h
> >>> index 652b10b..48df914 100644
> >>> --- a/board/ti/am335x/board.h
> >>> +++ b/board/ti/am335x/board.h
> >>> @@ -43,9 +43,15 @@ static inline int board_is_bbg1(void)
> >>>  	return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "BBG1", 4);
> >>>  }
> >>>  
> >>> +static inline int board_is_bben(void)
> >>
> >> Should be just static int ... the compiler can decide.
> > 
> > No, it should be inline like all of the others in the file are.  And
> > then yes, if someone wants to do a size comparison with or without
> > inlining on all of those functions, sure.
> 
> Can you explain why it should be static inline ?
> Last time this discussion came up in Linux kernel ML (decisions from
> which we seem to apply, cfr the SPDX C++ comments and DTC), static
> inline was frowned upon with the argument that the compiler can decide.

Ah, alright.  So yeah, as people want to convert areas, that's fine.
But no, just like how we also stay consistent within a file on other
things, or fix those inconsistencies then add more stuff, no, we
shouldn't have this be inconsistent.  Fixing it in either order is fine
with me.  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180719/c67d550a/attachment.sig>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [U-Boot,v2] Add Beaglebone Enhanced support
  2018-07-18  8:13 [U-Boot] [PATCH v2] Add Beaglebone Enhanced support Koen Kooi
  2018-07-19 12:52 ` Tom Rini
  2018-07-19 12:55 ` Marek Vasut
@ 2018-08-04 23:39 ` Tom Rini
  2 siblings, 0 replies; 9+ messages in thread
From: Tom Rini @ 2018-08-04 23:39 UTC (permalink / raw)
  To: u-boot

On Wed, Jul 18, 2018 at 10:13:59AM +0200, Koen Kooi wrote:

> The "Beaglebone Enhanced" by Sancloud is based on the Beaglebone Black,
> but with the following differences:
> 
>  * Gigabit capable PHY
>  * Extra USB hub, optional i2c control
>  * lps3331ap barometer connected over i2c
>  * MPU6050 6 axis MEMS accelerometer/gyro connected over i2c
>  * 1GiB DDR3 RAM
>  * RTL8723 Wifi/Bluetooth connected over USB
> 
> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180804/05302d46/attachment.sig>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-08-04 23:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-18  8:13 [U-Boot] [PATCH v2] Add Beaglebone Enhanced support Koen Kooi
2018-07-19 12:52 ` Tom Rini
2018-07-19 12:55 ` Marek Vasut
2018-07-19 12:56   ` Koen Kooi
2018-07-19 13:02   ` Tom Rini
2018-07-19 13:03     ` Koen Kooi
2018-07-19 13:07     ` Marek Vasut
2018-07-19 13:15       ` Tom Rini
2018-08-04 23:39 ` [U-Boot] [U-Boot,v2] " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.