From 5253ed194c7edd6cd548fc22e333be2f4ccc57ec Mon Sep 17 00:00:00 2001 From: Ray Jui Date: Tue, 5 May 2015 11:13:22 -0700 Subject: [PATCH 1/2] ARM: dts: enable clock support for Broadcom Cygnus Replace current device tree dummy clocks with real clock support for Broadcom Cygnus SoC Signed-off-by: Ray Jui Reviewed-by: Scott Branden Signed-off-by: Florian Fainelli --- arch/arm/boot/dts/bcm-cygnus-clock.dtsi | 91 +++++++++++++++++-------- 1 file changed, 62 insertions(+), 29 deletions(-) diff --git a/arch/arm/boot/dts/bcm-cygnus-clock.dtsi b/arch/arm/boot/dts/bcm-cygnus-clock.dtsi index 60d8389fdb6c..32bcd45ef22b 100644 --- a/arch/arm/boot/dts/bcm-cygnus-clock.dtsi +++ b/arch/arm/boot/dts/bcm-cygnus-clock.dtsi @@ -36,56 +36,89 @@ clocks { ranges; osc: oscillator { + #clock-cells = <0>; compatible = "fixed-clock"; - #clock-cells = <1>; clock-frequency = <25000000>; }; + /* Cygnus ARM PLL */ + armpll: armpll { + #clock-cells = <0>; + compatible = "brcm,cygnus-armpll"; + clocks = <&osc>; + reg = <0x19000000 0x1000>; + }; + + /* peripheral clock for system timer */ + periph_clk: arm_periph_clk { + #clock-cells = <0>; + compatible = "fixed-factor-clock"; + clocks = <&armpll>; + clock-div = <2>; + clock-mult = <1>; + }; + + /* APB bus clock */ apb_clk: apb_clk { - compatible = "fixed-clock"; #clock-cells = <0>; - clock-frequency = <1000000000>; + compatible = "fixed-factor-clock"; + clocks = <&armpll>; + clock-div = <4>; + clock-mult = <1>; }; - periph_clk: periph_clk { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <500000000>; + genpll: genpll { + #clock-cells = <1>; + compatible = "brcm,cygnus-genpll"; + reg = <0x0301d000 0x2c>, <0x0301c020 0x4>; + clocks = <&osc>; + clock-output-names = "genpll", "axi21", "250mhz", "ihost_sys", + "enet_sw", "audio_125", "can"; }; - sdio_clk: lcpll_ch2 { - compatible = "fixed-clock"; + /* always 1/2 of the axi21 clock */ + axi41_clk: axi41_clk { #clock-cells = <0>; - clock-frequency = <200000000>; + compatible = "fixed-factor-clock"; + clocks = <&genpll 1>; + clock-div = <2>; + clock-mult = <1>; }; + /* always 1/4 of the axi21 clock */ axi81_clk: axi81_clk { - compatible = "fixed-clock"; #clock-cells = <0>; - clock-frequency = <100000000>; + compatible = "fixed-factor-clock"; + clocks = <&genpll 1>; + clock-div = <4>; + clock-mult = <1>; }; - keypad_clk: keypad_clk { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <31806>; + lcpll0: lcpll0 { + #clock-cells = <1>; + compatible = "brcm,cygnus-lcpll0"; + reg = <0x0301d02c 0x1c>, <0x0301c020 0x4>; + clocks = <&osc>; + clock-output-names = "lcpll0", "pcie_phy", "ddr_phy", "sdio", + "usb_phy", "smart_card", "ch5"; }; - adc_clk: adc_clk { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <1562500>; + mipipll: mipipll { + #clock-cells = <1>; + compatible = "brcm,cygnus-mipipll"; + reg = <0x180a9800 0x2c>, <0x0301c020 0x4>, <0x180aa024 0x4>; + clocks = <&osc>; + clock-output-names = "mipipll", "ch0_unused", "ch1_lcd", + "ch2_v3d", "ch3_unused", "ch4_unused", + "ch5_unused"; }; - pwm_clk: pwm_clk { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <1000000>; - }; + asiu_clks: asiu_clks { + #clock-cells = <1>; + compatible = "brcm,cygnus-asiu-clk"; + reg = <0x0301d048 0xc>, <0x180aa024 0x4>; - lcd_clk: mipipll_ch1 { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <100000000>; + clocks = <&osc>; + clock-output-names = "keypad", "adc/touch", "pwm"; }; }; From 0dfc7f687917a93175d469a2dc1254fd2f77fb63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Mon, 29 Jun 2015 07:22:16 +0200 Subject: [PATCH 2/2] ARM: BCM5301X: Enable UART0 on tested devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are two possible UARTs so we have (both of) them disabled by default. Override uart0 status on devices that were verified to use it. In case of Netgear R6250 also drop an old (and invalid) overwrite. It doesn't have uart1 connected. Signed-off-by: Rafał Miłecki Acked-by: Hauke Mehrtens Signed-off-by: Florian Fainelli --- arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts | 4 ++++ arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts | 4 ++++ arch/arm/boot/dts/bcm4708-netgear-r6250.dts | 14 ++++---------- arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 4 ++++ arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts | 4 ++++ 5 files changed, 20 insertions(+), 10 deletions(-) diff --git a/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts index 24f0ab59bf1b..42dcdfb769b2 100644 --- a/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts +++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts @@ -135,3 +135,7 @@ eject { }; }; }; + +&uart0 { + status = "okay"; +}; diff --git a/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts b/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts index f03939311717..f18e80e0b61d 100644 --- a/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts +++ b/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts @@ -55,3 +55,7 @@ restart { }; }; }; + +&uart0 { + status = "okay"; +}; diff --git a/arch/arm/boot/dts/bcm4708-netgear-r6250.dts b/arch/arm/boot/dts/bcm4708-netgear-r6250.dts index 326ce8f4e49c..64b8d10ccff8 100644 --- a/arch/arm/boot/dts/bcm4708-netgear-r6250.dts +++ b/arch/arm/boot/dts/bcm4708-netgear-r6250.dts @@ -24,16 +24,6 @@ memory { reg = <0x00000000 0x08000000>; }; - chipcommonA { - uart0: serial@0300 { - status = "okay"; - }; - - uart1: serial@0400 { - status = "okay"; - }; - }; - leds { compatible = "gpio-leds"; @@ -92,3 +82,7 @@ restart { }; }; }; + +&uart0 { + status = "okay"; +}; diff --git a/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts b/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts index d6a033b97c70..64a5e8ab65e0 100644 --- a/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts +++ b/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts @@ -118,3 +118,7 @@ restart { }; }; }; + +&uart0 { + status = "okay"; +}; diff --git a/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts b/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts index bb0cb0bfafaf..38f0c00d1aca 100644 --- a/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts +++ b/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts @@ -122,3 +122,7 @@ eject { }; }; }; + +&uart0 { + status = "okay"; +};