Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752844AbdLDAQo (ORCPT ); Sun, 3 Dec 2017 19:16:44 -0500 Received: from mx2.suse.de ([195.135.220.15]:37802 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752162AbdLDAQn (ORCPT ); Sun, 3 Dec 2017 19:16:43 -0500 Subject: Re: [PATCH v5.1 1/2] ARM64: dts: meson-gx: use stable UART bindings with correct gate clock From: =?UTF-8?Q?Andreas_F=c3=a4rber?= To: Neil Armstrong , khilman@baylibre.com, Helmut Klein Cc: Martin Blumenstingl , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org References: <1498056132-18508-1-git-send-email-narmstrong@baylibre.com> <1498056132-18508-2-git-send-email-narmstrong@baylibre.com> <4e0d1db1-6382-a4b7-d112-3e45e0c1af2d@suse.de> Organization: SUSE Linux GmbH Message-ID: <61a59a32-a812-cc88-79f9-02c13f1901d7@suse.de> Date: Mon, 4 Dec 2017 01:16:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <4e0d1db1-6382-a4b7-d112-3e45e0c1af2d@suse.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2201 Lines: 68 Am 03.12.2017 um 15:15 schrieb Andreas Färber: > Hi, > > Am 21.06.2017 um 16:42 schrieb Neil Armstrong: >> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi >> index 17d3efd..ea53cc2 100644 >> --- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi >> +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi >> @@ -682,6 +682,31 @@ >> clocks = <&clkc CLKID_SPI>; >> }; >> >> +&uart_A { >> + clocks = <&xtal>, <&clkc CLKID_UART0>, <&xtal>; >> + clock-names = "xtal", "pclk", "baud"; >> +}; >> + >> +&uart_AO { >> + clocks = <&xtal>, <&clkc CLKID_CLK81>, <&xtal>; >> + clock-names = "xtal", "pclk", "baud"; >> +}; >> + >> +&uart_AO_B { >> + clocks = <&xtal>, <&clkc CLKID_CLK81>, <&xtal>; >> + clock-names = "xtal", "pclk", "baud"; >> +}; >> + >> +&uart_B { >> + clocks = <&xtal>, <&clkc CLKID_UART1>, <&xtal>; >> + clock-names = "xtal", "core", "baud"; > > Looking at the meson_uart driver, it only looks for a "pclk" clock, > never for "core", and the only unnamed clock used should be the first. > > There is no bindings documentation for "core", so I assume this was an > oversight and should be "pclk" everywhere? > >> +}; >> + >> +&uart_C { >> + clocks = <&xtal>, <&clkc CLKID_UART2>, <&xtal>; >> + clock-names = "xtal", "core", "baud"; >> +}; > > The issue I'm facing is that uart_C on NanoPi K2 is not working in > 4.14.1. To my surprise it appears to be probing okay though. In 4.14 the serial driver checks for the legacy compatible and if present (even alongside the new compatible) always takes the legacy code path, using only the first clock, thus not tripping over "core" and not enabling the "pclk" if supplied. This was changed for v4.15-rc1, so we should start seeing errors for missing "pclk" clocks. > Sadly just overwriting the clock-names property via overlay does not fix > my issue. Any ideas? For reference here's my latest overlay, overriding compatible, too: https://github.com/afaerber/dt-overlays/blob/master/meson-gxbb-nanopi-k2%2Barpi600%2Bnucleo-lrwan1.dts Regards, Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)