From patchwork Tue Aug 23 05:37:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 9294951 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D6E0B607D0 for ; Tue, 23 Aug 2016 05:40:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C853428A87 for ; Tue, 23 Aug 2016 05:40:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BAA0228A8C; Tue, 23 Aug 2016 05:40:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 13FA128AA4 for ; Tue, 23 Aug 2016 05:40:08 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bc4Pq-0002Yx-ND; Tue, 23 Aug 2016 05:38:26 +0000 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bc4Pk-0002Wf-Vo for linux-arm-kernel@lists.infradead.org; Tue, 23 Aug 2016 05:38:22 +0000 Received: by mail-lf0-x242.google.com with SMTP id f93so7231294lfi.0 for ; Mon, 22 Aug 2016 22:38:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qkfLLg+fD4rM0PTka+595cADXBEuQUMfkUgRWX8hFKE=; b=m4HqrfginUrWCOF4v0rw+B4HWh5CYtKU2zLrdgpdWFUa/W+5UK3FvI7Y0TGayZ1xQR AwEjw8YPJOU0iuVwWUMOuYwLTXWLt1XEvGJxXJWgrJFjbsGSPpSbj8RsfDP9ZXHoFyYn lnlAl/EJmUY6jk+Gmi9zf+Gp0mtR9xCbmtLAtCMVL0M3Pq7gdh7cgIs6nlMIoh2VSiN9 qyvXzCqbGUPz+EwcsS0KUiqvJs/aPIQLtBrLM8h5M2EHpHqTZXP7Z92hpNMabkCb/nqV ItKGdHQX0NCeGpyaKHf8xYk6Ylr6gzEOmr2PvCbyqzQp4G9cNaACaIa25aAg/pb8WYWn kvWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qkfLLg+fD4rM0PTka+595cADXBEuQUMfkUgRWX8hFKE=; b=Jt8maLxiF5Np7V6+ZSE+uOnTIZBFFcTYdtKql3j3+wyuVzs9Os7udN8qjzoFJBE4oQ j7Uavr5gOFgdf2u5NvCU/G9oP4+J7Szni7br+j4dqKM50mgS1MRhfLz/6G+EcWkb/Vdy ZzcLbc99VtVQONjA4tnk8oYXAqMNWUuvIYUQQntH6qIYm/O7T961ZsnkFH3MBodgrKEv zSGuGT/K4+FBKJk7YdEuuz5YYo+chmMh79hKeiI2jZsaIuL/c8dpMLpRY/xwTkkrIo1D Irx6SBCHRyQ9HyfbrNhZoi6nFScyoJ2HcXRIOKpICQsXYpKQQsCdmwREZtbkBHBef6Pu Vo+g== X-Gm-Message-State: AEkoousfK0NgF4jF2UcWeCgaKanap354ME/JmaeAwtL262tKajHTyQ4lGg0i8veWVSIjDA== X-Received: by 10.25.15.194 with SMTP id 63mr171694lfp.126.1471930678481; Mon, 22 Aug 2016 22:37:58 -0700 (PDT) Received: from linux-samsung.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id u186sm388752lff.27.2016.08.22.22.37.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Aug 2016 22:37:57 -0700 (PDT) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Florian Fainelli Subject: [PATCH V2] ARM: BCM5301X: Add basic dts for BCM53573 based Tenda AC9 Date: Tue, 23 Aug 2016 07:37:43 +0200 Message-Id: <20160823053746.14521-1-zajec5@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <1469654305-1700-1-git-send-email-zajec5@gmail.com> References: <1469654305-1700-1-git-send-email-zajec5@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160822_223821_444353_4B5D7275 X-CRM114-Status: GOOD ( 17.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Russell King , open list , Rob Herring , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , "moderated list:ARM PORT" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP BCM53573 seems to be low priced alternative for Northstar chipsts. It uses single core Cortex-A7 and doesn't have SDU or local (TWD) timer. It was also stripped out of independent SPI controller and 2 GMACs. DTS for Tenda AC9 isn't completed yet. It misses e.g. switch entry (we still need some b53 fixes) and probably some clocks. It adds support for basic features however and can be improved later. Signed-off-by: Rafał Miłecki --- V2: Use ARCH_BCM_53573 instead of ARCH_BCM_5301X. --- arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/bcm47189-tenda-ac9.dts | 74 ++++++++++++++++ arch/arm/boot/dts/bcm53573.dtsi | 147 +++++++++++++++++++++++++++++++ 3 files changed, 223 insertions(+) create mode 100644 arch/arm/boot/dts/bcm47189-tenda-ac9.dts create mode 100644 arch/arm/boot/dts/bcm53573.dtsi diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 8e11aae..dd2c49e 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -90,6 +90,8 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ bcm94709.dtb \ bcm953012er.dtb \ bcm953012k.dtb +dtb-$(CONFIG_ARCH_BCM_53573) += \ + bcm47189-tenda-ac9.dtb dtb-$(CONFIG_ARCH_BCM_63XX) += \ bcm963138dvt.dtb dtb-$(CONFIG_ARCH_BCM_CYGNUS) += \ diff --git a/arch/arm/boot/dts/bcm47189-tenda-ac9.dts b/arch/arm/boot/dts/bcm47189-tenda-ac9.dts new file mode 100644 index 0000000..4403ae8 --- /dev/null +++ b/arch/arm/boot/dts/bcm47189-tenda-ac9.dts @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2016 Rafał Miłecki + * + * Licensed under the ISC license. + */ + +/dts-v1/; + +#include "bcm53573.dtsi" + +/ { + compatible = "tenda,ac9", "brcm,bcm47189", "brcm,bcm53573"; + model = "Tenda AC9"; + + chosen { + bootargs = "console=ttyS0,115200 earlycon"; + }; + + memory { + reg = <0x00000000 0x08000000>; + }; + + leds { + compatible = "gpio-leds"; + + usb { + label = "bcm53xx:blue:usb"; + gpios = <&chipcommon 1 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "default-off"; + }; + + wps { + label = "bcm53xx:blue:wps"; + gpios = <&chipcommon 10 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "default-off"; + }; + + 5ghz { + label = "bcm53xx:blue:5ghz"; + gpios = <&chipcommon 11 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "default-off"; + }; + + system { + label = "bcm53xx:blue:system"; + gpios = <&chipcommon 15 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "timer"; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + + rfkill { + label = "WiFi"; + linux,code = ; + gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; + }; + + restart { + label = "Reset"; + linux,code = ; + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>; + }; + + wps { + label = "WPS"; + linux,code = ; + gpios = <&chipcommon 9 GPIO_ACTIVE_LOW>; + }; + }; +}; diff --git a/arch/arm/boot/dts/bcm53573.dtsi b/arch/arm/boot/dts/bcm53573.dtsi new file mode 100644 index 0000000..efa07de --- /dev/null +++ b/arch/arm/boot/dts/bcm53573.dtsi @@ -0,0 +1,147 @@ +/* + * Copyright (C) 2016 Rafał Miłecki + * + * Licensed under the ISC license. + */ + +#include +#include +#include +#include +#include "skeleton.dtsi" + +/ { + interrupt-parent = <&gic>; + + chosen { + stdout-path = &uart0; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a7"; + reg = <0x0>; + }; + }; + + mpcore { + compatible = "simple-bus"; + ranges = <0x00000000 0x18310000 0x00008000>; + #address-cells = <1>; + #size-cells = <1>; + + gic: interrupt-controller@1000 { + compatible = "arm,cortex-a7-gic"; + #interrupt-cells = <3>; + #address-cells = <0>; + interrupt-controller; + reg = <0x1000 0x1000>, + <0x2000 0x0100>; + }; + }; + + clocks { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + alp: oscillator { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <40000000>; + }; + }; + + axi@18000000 { + compatible = "brcm,bus-axi"; + reg = <0x18000000 0x1000>; + ranges = <0x00000000 0x18000000 0x00100000>; + #address-cells = <1>; + #size-cells = <1>; + + #interrupt-cells = <1>; + interrupt-map-mask = <0x000fffff 0xffff>; + interrupt-map = + /* ChipCommon */ + <0x00000000 0 &gic GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>, + + /* IEEE 802.11 0 */ + <0x00001000 0 &gic GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>, + + /* PCIe Controller 0 */ + <0x00002000 0 &gic GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>, + <0x00002000 1 &gic GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>, + <0x00002000 2 &gic GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>, + <0x00002000 3 &gic GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>, + <0x00002000 4 &gic GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>, + <0x00002000 5 &gic GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>, + + /* USB 2.0 Controller */ + <0x00004000 0 &gic GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>, + + /* Ethernet Controller 0 */ + <0x00005000 0 &gic GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>, + + /* IEEE 802.11 1 */ + <0x0000a000 0 &gic GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>, + + /* Ethernet Controller 1 */ + <0x0000b000 0 &gic GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; + + chipcommon: chipcommon@0 { + compatible = "simple-bus"; + reg = <0x00000000 0x1000>; + ranges; + + #address-cells = <1>; + #size-cells = <1>; + + gpio-controller; + #gpio-cells = <2>; + + uart0: serial@0300 { + compatible = "ns16550a"; + reg = <0x0300 0x100>; + interrupt-parent = <&gic>; + interrupts = ; + clocks = <&alp>; + status = "okay"; + }; + }; + + usb2: usb2@4000 { + reg = <0x4000 0x1000>; + ranges; + #address-cells = <1>; + #size-cells = <1>; + + ehci: ehci@4000 { + compatible = "generic-ehci"; + reg = <0x4000 0x1000>; + interrupt-parent = <&gic>; + interrupts = ; + }; + + ohci: ohci@d000 { + #usb-cells = <0>; + + compatible = "generic-ohci"; + reg = <0xd000 0x1000>; + interrupt-parent = <&gic>; + interrupts = ; + }; + }; + + gmac0: ethernet@5000 { + reg = <0x5000 0x1000>; + }; + + gmac1: ethernet@b000 { + reg = <0xb000 0x1000>; + }; + }; +};