From: Lokesh Vutla Date: Thu, 12 Jul 2018 11:15:35 +0530 Subject: [U-Boot] [RFC] arm: dts: am33xx: Sync DTS with Linux 4.16.11 In-Reply-To: <5828ba50-51c5-2e4c-b8c7-2d77f2caee92@ltec.ch> References: <5828ba50-51c5-2e4c-b8c7-2d77f2caee92@ltec.ch> Message-ID: <01cbc94a-393b-0d21-717a-a6a884f38ed3@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Felix, On Wednesday 11 July 2018 06:59 PM, Felix Brack wrote: > Hi Lokesh, many thanks for the feedback! > > On 10.07.2018 08:42, Lokesh Vutla wrote: >> Hi Felix, >> >> On Thursday 24 May 2018 02:32 PM, Felix Brack wrote: >>> Hello, >>> >>> I am working on a patch to synchronize the DTS files of the am33xx SoC >>> with those from Linux 4.16.11 (current stable). >>> >>> After some tiny modifications to the boards am335x-pdu001, am335x-evm, >>> am335x-rut, am437x-gp-evm and am43x-epos-evm buildman passes without any >>> warnings on the 46 am33xx based boards. This is required but not >>> sufficient at all. >>> >>> As I'm the maintainer of the am335x-pdu001 board I will use it to >>> illustrate a sample problem. >>> The am335x-pdu001 board uses the ns16550 driver which reads the property >>> from the DT. This property is required and must be set to a >>> value of 2, otherwise it would default to 0. >>> The am33xx.dtsi file currently used by U-Boot sets this property >>> correctly for all 6 uarts. The am33xx.dtsi file from Linux 4.16.11 >>> however does not define this property anymore. >>> For the am335x-pdu001 board the fix is trivial: just add the property >>> to the board and U-Boot specific am335xx-pdu001-u-boot.dtsi >>> file. >>> But this has a major drawback: only the am335x-pdu001 board gets fixed. >>> What about other boards requiring the property? >> >> I agree this is a problem. Also not all kernel drivers need this >> property as there are separate driver files for some of the compatibles. >> And few drivers has this property hard-coded. >> >>> The first idea that would probably come into mind is to put the property >>> into the SoC specific am33xx-u-boot.dtsi file. But this file >>> is ignored if a board specific file already exists. Hence this can not >>> be done. >> >> One solution I can think of is add a Kconfig entry >> CONFIG_SYS_NS16550_REG_SHIFT. A default value of 0 can be assigned for >> this and can be updated in as necessary. >> >> So when doing dev_read_u32_default for reg-shift, >> CONFIG_SYS_NS16550_REG_SHIFT can be passed as default instead of 0. This >> way no DTS files needs to be updated. >> > This sounds like a very good solution for the property. I'm > thinking about sending in a patch ... That would be great. Thanks and regards, Lokesh