[PATCH v1 6/6] ARM: BCM5301X: Add DT for Meraki MR32

Christian Lamparter chunkeey at gmail.com
Tue Aug 18 15:19:53 EDT 2020


Hi Scott,

On 2020-08-18 20:19, Scott Branden wrote:
> On 2020-08-18 9:39 a.m., Christian Lamparter wrote:
>> This patch adds support for Cisco Meraki MR32.
[...]
>> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
>> index e6a1cac0bfc7..b0756d62772b 100644
>> --- a/arch/arm/boot/dts/Makefile
>> +++ b/arch/arm/boot/dts/Makefile
>> @@ -126,6 +126,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
>>   	bcm47094-luxul-xwr-3100.dtb \
>>   	bcm47094-luxul-xwr-3150-v1.dtb \
>>   	bcm47094-netgear-r8500.dtb \
>> +	bcm53016-meraki-mr32.dtb \
>>   	bcm47094-phicomm-k3.dtb \
> alpha order would be here.

Yes. That's true. I should have posted this patch sooner ;).

>>   	bcm94708.dtb \ >>   	bcm94709.dtb \
>> diff --git a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
>> new file mode 100644
>> index 000000000000..816fe8cd492d
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
>> @@ -0,0 +1,191 @@
 >> [...]
>> +
>> +&nandcs {
>> +	nand-ecc-algo = "hw";
>> +
>> +	partitions {
>> +		/*
>> +		 * The partition autodetection does not work for this devi
>> +		 * It will only detect the "nvram" partition with an incorrect size.
>> +		 *	[    1.721667] 1 bcm47xxpart partitions found on MTD device brcmnand.0
>> +		 *	[    1.727962] Creating 1 MTD partitions on "brcmnand.0":
>> +		 *	[    1.733117] 0x000000400000-0x000008000000 : "nvram"
>> +		 */
>> +
> If autodetection doesn't work..
> the partition info should be passed in via the bootloader rather than the DT?

No, Meraki embedded the partition table in the now "old-way" in their 
Device-Tree file too :).

Thanks to Chris Blake's GPL inquiry, I can just provide a link to the 
nand-node (with the partition child nodes) of the original 
"espresso.dts" [0]. (The espresso.dts file is licensed GPL2 - see 
boilerplate.)

|	nand {
|		#address-cells = <1>;
|		#size-cells = <1>;
|		compatible = "iproc,nand-iproc";
|
|		partition at 0 {
|			label = "U-boot";
|			reg = <0x00000000 0x100000>;
|		};
|
|		partition at 1 {
|			label = "bootkernel1";
|			reg = <0x100000 0x300000>;
|		};
|		partition at 2 {
|			label = "senao_nvram";
|			reg = <0x400000 0x100000>;
|		};
|		[...]

>> +		compatible = "fixed-partitions";
>> +		#address-cells = <0x1>;
>> +		#size-cells = <0x1>;
>> +
>> +		partition0 at 0 {
>> +			label = "u-boot";
>> +			reg = <0x0 0x100000>;
>> +			read-only;
>> +		};
>> +
>> +		partition1 at 100000 {
>> +			label = "bootkernel1";
>> +			reg = <0x100000 0x300000>;
>> +			read-only;
>> +		};
>> +
>> +		partition2 at 400000 {
>> +			label = "nvram";
>> +			reg = <0x400000 0x100000>;
>> +			read-only;
>> +		};
>> +
>> +		partition3 at 500000 {
>> +			label = "bootkernel2";
>> +			reg = <0x500000 0x300000>;
>> +			read-only;
>> +		};
>> +
>> +		partition4 at 800000 {
>> +			label = "ubi";
>> +			reg = <0x800000 0x7780000>;
>> +		};
>> +	};
>> +};

Thank you for the fast review. I'll stick around and post v2 when
everyone had a good look.

Cheers,
Christian


[0] 
<https://github.com/riptidewave93/meraki-linux/blob/r24-linux-3.4-20170427/arch/arm/boot/dts/espresso.dts#L99>



More information about the linux-arm-kernel mailing list