diff mbox

[U-Boot,1/3] config: am335x_evm: detect Black Wireless using BWA

Message ID 20170330192954.22673-1-robertcnelson@gmail.com
State Accepted
Commit 4015949f1f3fe6af8cb88f3f449f0f8a3bf4778a
Delegated to: Tom Rini
Headers show

Commit Message

Robert Nelson March 30, 2017, 7:29 p.m. UTC
BeagleBone Black Wireless is clone of the BeagleBone Black (BBB) with
the Ethernet replaced by a TI wl1835 wireless module.

This board can be indentified by the BWAx value after A335BNLT (BBB)
in the at24 eeprom:
BWAx [aa 55 33 ee 41 33 33 35  42 4e 4c 54 42 57 41 35  |.U3.A335BNLTBWA5|]

http://beagleboard.org/black-wireless
https://github.com/beagleboard/beaglebone-black-wireless

firmware: https://github.com/beagleboard/beaglebone-black-wireless/tree/master/firmware
wl18xx mac address: /proc/device-tree/ocp/ethernet@4a100000/slave@4a100200/mac-address

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
CC: Tom Rini <trini@konsulko.com>
CC: Jason Kridner <jkridner@beagleboard.org>
CC: Will Newton <willn@resin.io>
---
 board/ti/am335x/board.c      | 7 +++++++
 include/configs/am335x_evm.h | 2 ++
 2 files changed, 9 insertions(+)

Comments

Robert Nelson March 30, 2017, 7:32 p.m. UTC | #1
fyi: these are board only, SPL/device tree will need a bigger resync
on am33xx from kernel.rog

Regards,

On Thu, Mar 30, 2017 at 2:29 PM, Robert Nelson <robertcnelson@gmail.com> wrote:
> BeagleBone Black Wireless is clone of the BeagleBone Black (BBB) with
> the Ethernet replaced by a TI wl1835 wireless module.
>
> This board can be indentified by the BWAx value after A335BNLT (BBB)
> in the at24 eeprom:
> BWAx [aa 55 33 ee 41 33 33 35  42 4e 4c 54 42 57 41 35  |.U3.A335BNLTBWA5|]
>
> http://beagleboard.org/black-wireless
> https://github.com/beagleboard/beaglebone-black-wireless
>
> firmware: https://github.com/beagleboard/beaglebone-black-wireless/tree/master/firmware
> wl18xx mac address: /proc/device-tree/ocp/ethernet@4a100000/slave@4a100200/mac-address
>
> Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
> CC: Tom Rini <trini@konsulko.com>
> CC: Jason Kridner <jkridner@beagleboard.org>
> CC: Will Newton <willn@resin.io>
> ---
>  board/ti/am335x/board.c      | 7 +++++++
>  include/configs/am335x_evm.h | 2 ++
>  2 files changed, 9 insertions(+)
>
> diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
> index 8eaf3e9a5c..304ae34fb7 100644
> --- a/board/ti/am335x/board.c
> +++ b/board/ti/am335x/board.c
> @@ -651,6 +651,13 @@ int board_late_init(void)
>  #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
>         char *name = NULL;
>
> +       if (board_is_bone_lt()) {
> +               /* BeagleBoard.org BeagleBone Black Wireless: */
> +               if (!strncmp(board_ti_get_rev(), "BWA", 3)) {
> +                       name = "BBBW";
> +               }
> +       }
> +
>         if (board_is_bbg1())
>                 name = "BBG1";
>         set_board_info_env(name);
> diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
> index 27126871f7..dcac2f5816 100644
> --- a/include/configs/am335x_evm.h
> +++ b/include/configs/am335x_evm.h
> @@ -138,6 +138,8 @@
>                         "setenv fdtfile am335x-bone.dtb; fi; " \
>                 "if test $board_name = A335BNLT; then " \
>                         "setenv fdtfile am335x-boneblack.dtb; fi; " \
> +               "if test $board_name = BBBW; then " \
> +                       "setenv fdtfile am335x-boneblack-wireless.dtb; fi; " \
>                 "if test $board_name = BBG1; then " \
>                         "setenv fdtfile am335x-bonegreen.dtb; fi; " \
>                 "if test $board_name = A33515BB; then " \
> --
> 2.11.0
>
Tom Rini April 4, 2017, 8 p.m. UTC | #2
On Thu, Mar 30, 2017 at 02:29:52PM -0500, Robert Nelson wrote:

> BeagleBone Black Wireless is clone of the BeagleBone Black (BBB) with
> the Ethernet replaced by a TI wl1835 wireless module.
> 
> This board can be indentified by the BWAx value after A335BNLT (BBB)
> in the at24 eeprom:
> BWAx [aa 55 33 ee 41 33 33 35  42 4e 4c 54 42 57 41 35  |.U3.A335BNLTBWA5|]
> 
> http://beagleboard.org/black-wireless
> https://github.com/beagleboard/beaglebone-black-wireless
> 
> firmware: https://github.com/beagleboard/beaglebone-black-wireless/tree/master/firmware
> wl18xx mac address: /proc/device-tree/ocp/ethernet@4a100000/slave@4a100200/mac-address
> 
> Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
> CC: Tom Rini <trini@konsulko.com>
> CC: Jason Kridner <jkridner@beagleboard.org>
> CC: Will Newton <willn@resin.io>

Reviewed-by: Tom Rini <trini@konsulko.com>
Peter Robinson April 5, 2017, 4:14 p.m. UTC | #3
"On Thu, Mar 30, 2017 at 8:29 PM, Robert Nelson <robertcnelson@gmail.com> wrote:
> BeagleBone Black Wireless is clone of the BeagleBone Black (BBB) with
> the Ethernet replaced by a TI wl1835 wireless module.
>
> This board can be indentified by the BWAx value after A335BNLT (BBB)
> in the at24 eeprom:
> BWAx [aa 55 33 ee 41 33 33 35  42 4e 4c 54 42 57 41 35  |.U3.A335BNLTBWA5|]
>
> http://beagleboard.org/black-wireless
> https://github.com/beagleboard/beaglebone-black-wireless
>
> firmware: https://github.com/beagleboard/beaglebone-black-wireless/tree/master/firmware
> wl18xx mac address: /proc/device-tree/ocp/ethernet@4a100000/slave@4a100200/mac-address
>
> Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
> CC: Tom Rini <trini@konsulko.com>
> CC: Jason Kridner <jkridner@beagleboard.org>
> CC: Will Newton <willn@resin.io>
> ---
>  board/ti/am335x/board.c      | 7 +++++++
>  include/configs/am335x_evm.h | 2 ++

Shouldn't this also update "CONFIG_OF_LIST="am335x-evm am335x-bone
am335x-boneblack am335x-evmsk am335x-bonegreen am335x-icev2"" in
configs/am335x_evm_defconfig ans possibly other am33xx_ configs?

Peter

> diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
> index 8eaf3e9a5c..304ae34fb7 100644
> --- a/board/ti/am335x/board.c
> +++ b/board/ti/am335x/board.c
> @@ -651,6 +651,13 @@ int board_late_init(void)
>  #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
>         char *name = NULL;
>
> +       if (board_is_bone_lt()) {
> +               /* BeagleBoard.org BeagleBone Black Wireless: */
> +               if (!strncmp(board_ti_get_rev(), "BWA", 3)) {
> +                       name = "BBBW";
> +               }
> +       }
> +
>         if (board_is_bbg1())
>                 name = "BBG1";
>         set_board_info_env(name);
> diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
> index 27126871f7..dcac2f5816 100644
> --- a/include/configs/am335x_evm.h
> +++ b/include/configs/am335x_evm.h
> @@ -138,6 +138,8 @@
>                         "setenv fdtfile am335x-bone.dtb; fi; " \
>                 "if test $board_name = A335BNLT; then " \
>                         "setenv fdtfile am335x-boneblack.dtb; fi; " \
> +               "if test $board_name = BBBW; then " \
> +                       "setenv fdtfile am335x-boneblack-wireless.dtb; fi; " \
>                 "if test $board_name = BBG1; then " \
>                         "setenv fdtfile am335x-bonegreen.dtb; fi; " \
>                 "if test $board_name = A33515BB; then " \
> --
> 2.11.0
>
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot
Robert Nelson April 5, 2017, 4:50 p.m. UTC | #4
On Wed, Apr 5, 2017 at 11:14 AM, Peter Robinson <pbrobinson@gmail.com> wrote:
> "On Thu, Mar 30, 2017 at 8:29 PM, Robert Nelson <robertcnelson@gmail.com> wrote:
>> BeagleBone Black Wireless is clone of the BeagleBone Black (BBB) with
>> the Ethernet replaced by a TI wl1835 wireless module.
>>
>> This board can be indentified by the BWAx value after A335BNLT (BBB)
>> in the at24 eeprom:
>> BWAx [aa 55 33 ee 41 33 33 35  42 4e 4c 54 42 57 41 35  |.U3.A335BNLTBWA5|]
>>
>> http://beagleboard.org/black-wireless
>> https://github.com/beagleboard/beaglebone-black-wireless
>>
>> firmware: https://github.com/beagleboard/beaglebone-black-wireless/tree/master/firmware
>> wl18xx mac address: /proc/device-tree/ocp/ethernet@4a100000/slave@4a100200/mac-address
>>
>> Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
>> CC: Tom Rini <trini@konsulko.com>
>> CC: Jason Kridner <jkridner@beagleboard.org>
>> CC: Will Newton <willn@resin.io>
>> ---
>>  board/ti/am335x/board.c      | 7 +++++++
>>  include/configs/am335x_evm.h | 2 ++
>
> Shouldn't this also update "CONFIG_OF_LIST="am335x-evm am335x-bone
> am335x-boneblack am335x-evmsk am335x-bonegreen am335x-icev2"" in
> configs/am335x_evm_defconfig ans possibly other am33xx_ configs?

Hi Peter,

Currently these patches rely on "CONFIG_OF_CONTROL" being disabled
(non-device-tree boot, aka the old boot method), after we resync with
kernel.org's ti/omap device tree changes.  We can go back and enable
device-tree boot for these new devices.

Regards,
Robert Nelson April 5, 2017, 5:15 p.m. UTC | #5
On Wed, Apr 5, 2017 at 11:50 AM, Robert Nelson <robertcnelson@gmail.com> wrote:
> On Wed, Apr 5, 2017 at 11:14 AM, Peter Robinson <pbrobinson@gmail.com> wrote:
>> "On Thu, Mar 30, 2017 at 8:29 PM, Robert Nelson <robertcnelson@gmail.com> wrote:
>>> BeagleBone Black Wireless is clone of the BeagleBone Black (BBB) with
>>> the Ethernet replaced by a TI wl1835 wireless module.
>>>
>>> This board can be indentified by the BWAx value after A335BNLT (BBB)
>>> in the at24 eeprom:
>>> BWAx [aa 55 33 ee 41 33 33 35  42 4e 4c 54 42 57 41 35  |.U3.A335BNLTBWA5|]
>>>
>>> http://beagleboard.org/black-wireless
>>> https://github.com/beagleboard/beaglebone-black-wireless
>>>
>>> firmware: https://github.com/beagleboard/beaglebone-black-wireless/tree/master/firmware
>>> wl18xx mac address: /proc/device-tree/ocp/ethernet@4a100000/slave@4a100200/mac-address
>>>
>>> Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
>>> CC: Tom Rini <trini@konsulko.com>
>>> CC: Jason Kridner <jkridner@beagleboard.org>
>>> CC: Will Newton <willn@resin.io>
>>> ---
>>>  board/ti/am335x/board.c      | 7 +++++++
>>>  include/configs/am335x_evm.h | 2 ++
>>
>> Shouldn't this also update "CONFIG_OF_LIST="am335x-evm am335x-bone
>> am335x-boneblack am335x-evmsk am335x-bonegreen am335x-icev2"" in
>> configs/am335x_evm_defconfig ans possibly other am33xx_ configs?
>
> Hi Peter,
>
> Currently these patches rely on "CONFIG_OF_CONTROL" being disabled
> (non-device-tree boot, aka the old boot method), after we resync with
> kernel.org's ti/omap device tree changes.  We can go back and enable
> device-tree boot for these new devices.

and side note, with CONFIG_OF_CONTROL enabled with these patches,
they'll still just use "am335x-boneblack.dtb" in spl/device-tree boot
mode..  Since they share the black's eeprom base identifier.

Regards,
Tom Rini April 9, 2017, 1:15 a.m. UTC | #6
On Thu, Mar 30, 2017 at 02:29:52PM -0500, robertcnelson@gmail.com wrote:

> BeagleBone Black Wireless is clone of the BeagleBone Black (BBB) with
> the Ethernet replaced by a TI wl1835 wireless module.
> 
> This board can be indentified by the BWAx value after A335BNLT (BBB)
> in the at24 eeprom:
> BWAx [aa 55 33 ee 41 33 33 35  42 4e 4c 54 42 57 41 35  |.U3.A335BNLTBWA5|]
> 
> http://beagleboard.org/black-wireless
> https://github.com/beagleboard/beaglebone-black-wireless
> 
> firmware: https://github.com/beagleboard/beaglebone-black-wireless/tree/master/firmware
> wl18xx mac address: /proc/device-tree/ocp/ethernet@4a100000/slave@4a100200/mac-address
> 
> Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
> CC: Tom Rini <trini@konsulko.com>
> CC: Jason Kridner <jkridner@beagleboard.org>
> CC: Will Newton <willn@resin.io>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index 8eaf3e9a5c..304ae34fb7 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -651,6 +651,13 @@  int board_late_init(void)
 #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
 	char *name = NULL;
 
+	if (board_is_bone_lt()) {
+		/* BeagleBoard.org BeagleBone Black Wireless: */
+		if (!strncmp(board_ti_get_rev(), "BWA", 3)) {
+			name = "BBBW";
+		}
+	}
+
 	if (board_is_bbg1())
 		name = "BBG1";
 	set_board_info_env(name);
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 27126871f7..dcac2f5816 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -138,6 +138,8 @@ 
 			"setenv fdtfile am335x-bone.dtb; fi; " \
 		"if test $board_name = A335BNLT; then " \
 			"setenv fdtfile am335x-boneblack.dtb; fi; " \
+		"if test $board_name = BBBW; then " \
+			"setenv fdtfile am335x-boneblack-wireless.dtb; fi; " \
 		"if test $board_name = BBG1; then " \
 			"setenv fdtfile am335x-bonegreen.dtb; fi; " \
 		"if test $board_name = A33515BB; then " \