linux-at91
linux-at91 copied to clipboard
Declare flash partitions in top level .dts files instead of .dtsi file.
The partition table defined for the qspi flash in the at91-sama5d27_som1.dtsi file conflicted with the partition table I wanted to use. I couldn't figure out how to replace it, so I moved the partition table definition to the top level at91-sama5d27_som1_ek*.dts files.
I tried following the outline given at https://developer.toradex.com/device-tree-customization to overwrite the lower level node definition with my own, but that resulted in a partition table with entries from both.
I would be happy to learn how to do this the "correct" (or, at least, "a better") way, but IMHO, the partition table definition doesn't belong in the SOM .dtsi file, it should be defined in a board board level file. OTOH, I don't like the code replication that resulted from this commit.
IMO, this is the correct thing to do. Could you also submit something similar upstream?
Hi Alexandre, I would be thrilled to submit this upstream, but how? (or to which upstream)?
Looking at master from git:// git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git, I see that neither at91-sama5d27_som1_ek.dts nor at91-sama5d27_som1.dtsi define the qspi interface. Also, the at91-sama5d27_som1_ek_{pda4,pda7,pda7b}.dts files are missing from master.
Is there a specific 4.9 development branch at which I should be looking?
Or (thinking about this more carefully now), would it make more sense for me to rework my patch and remove the
qspi1: spi@f0024000 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_qspi1_default>;
flash@0 {
#address-cells = <1>;
#size-cells = <1>;
... };
stanza all together from at91-sama5d27_som1.dtsi (as is done in master) and put it all in a .inc file that the three _pda.dts files could simply include. I think I like that approach better.
What do you think?
--wpd
move it to the three pda*.dts files. Or, what I would rather do
On Thu, Jan 4, 2018 at 2:34 PM, Alexandre Belloni [email protected] wrote:
IMO, this is the correct thing to do. Could you also submit something similar upstream?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/linux4sam/linux-at91/pull/36#issuecomment-355375525, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZiL8fPX7iMIU_A0izXIEA-lmceSI2rks5tHSZ3gaJpZM4RPKA1 .
Ah yes, I thought the qspi made it upstream. I'll let Nicolas comment further as he is maintaining the linux-at91 tree but I guess you can keep the qspi1 node in at91-sama5d27_som1.dtsi and move the flash layout in a dtsi.
i still think your pull request is fine as is as we already have a lot of duplicated flash layouts across the multiple evaluation kits.