Re: [PATCH v5.1 1/2] ARM64: dts: meson-gx: use stable UART bindings with correct gate clock
On 04/12/2017 01:16, Andreas Färber wrote: > 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. I only used UART_A, this explains a lot. > > 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? You need to rebind the devices. > > 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 > Wow I must have been very tired when pushing this Thanks for spotting this. I'll send a fix asap. Neil
Re: [PATCH v5.1 1/2] ARM64: dts: meson-gx: use stable UART bindings with correct gate clock
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)
Re: [PATCH v5.1 1/2] ARM64: dts: meson-gx: use stable UART bindings with correct gate clock
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. Sadly just overwriting the clock-names property via overlay does not fix my issue. Any ideas? > + > &vpu { > compatible = "amlogic,meson-gxbb-vpu", "amlogic,meson-gx-vpu"; > }; > diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi > b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi > index 8d4f316..9e67444 100644 > --- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi > +++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi > @@ -623,6 +623,31 @@ > clocks = <&clkc CLKID_SPI>; > }; > > +&uart_A { > + clocks = <&xtal>, <&clkc CLKID_UART0>, <&xtal>; > + clock-names = "xtal", "core", "baud"; Same issue spotted here and below. > +}; > + > +&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"; > +}; > + > +&uart_C { > + clocks = <&xtal>, <&clkc CLKID_UART2>, <&xtal>; > + clock-names = "xtal", "core", "baud"; > +}; > + > &vpu { > compatible = "amlogic,meson-gxl-vpu", "amlogic,meson-gx-vpu"; > }; Regards, Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)
Re: [PATCH v5.1 1/2] ARM64: dts: meson-gx: use stable UART bindings with correct gate clock
Neil Armstrong writes: > From: Helmut Klein > > This patch switches to the stable UART bindings but also add the correct > gate clock to the non-AO UART nodes for GXBB and GXL SoCs. > > Acked-by: Jerome Brunet > Signed-off-by: Helmut Klein > Signed-off-by: Neil Armstrong Applied to v4.14/dt64, Thanks, Kevin