From patchwork Thu Nov 22 09:07:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 10693695 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D8D7D5A4 for ; Thu, 22 Nov 2018 09:08:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD2A02C2F1 for ; Thu, 22 Nov 2018 09:08:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BDF562C302; Thu, 22 Nov 2018 09:08:00 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 10F692C2F1 for ; Thu, 22 Nov 2018 09:08:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=hV+pBzldySlmsF/NTeIcmfgvDxHgkwfZPIc8/WWTWBo=; b=DF3OR4TxDj7MSu aIdCXiLlvBHs866a/v9kZ/hqzz5ld7BPb7K30a7K7kL4aCsOOryQYaFjAH3dXhpqv8lBETMZMVMsp e7RGTu73esPE2dTFyyDRzNpIYOdh8vy9P50WvmIzFtxTXcEMyRLSA8Zje/jWegBu/nWjRhoBFZBP2 gvXZWcRfe9Wynn8ikOECYpMwc7BstmSzX7BSJXhYOenakdPc+3W3+b/kRFisb8+WhTaiO1IMCBz1z wAxINcf7A0osC6IpPuMUxcPVOICPWQfQ9PPunIpFp/N4C5DSmImsEGZIWOzEwJ2hOmtZRPtVE33yP cu4TiefMOY9zXkMjeKOQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gPkxr-0007zM-H6; Thu, 22 Nov 2018 09:07:59 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gPkxo-0007x8-Fn for linux-amlogic@lists.infradead.org; Thu, 22 Nov 2018 09:07:58 +0000 Received: by mail-wm1-x341.google.com with SMTP id j207so1007975wmj.1 for ; Thu, 22 Nov 2018 01:07:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=k4hD8MD1LBy6NAXGdkJfyqq9dl/FzTk3cWgPzXv/cQc=; b=jiADCaHKgP4MDrZc3X7PXku2Go/bw2o697+LlOx9EwoDh2DpIXX9nN666u9Kvr0pbn HJcFl6lP6fqVJXD9+5ZhrzooxGw2jQycrCAumCv6AvsLtUYg8PAa2vD3fsiPSk5y5NbE xTf83hTzjSigM8wakMPCElsMzGNRjUynG7UDPE8GJUSZ47WLrE3W4aJMhB1Le01xtUNM FYgbDG0Q0O2M9CZ2Wbmd08GPepO6C45JWwqRRz89Vv+LqTnKRf1PSX/vsrSWMV40V68S Hkx0JPpJZHbIjMasyi8zAqS+IBpAMCOkqpPMFS9qjWOey9OH1oRr2tYotnK8lqEm8uLc shBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=k4hD8MD1LBy6NAXGdkJfyqq9dl/FzTk3cWgPzXv/cQc=; b=XY/0QnTJh5vtr2QMyOhInLlHTgmjLd91yULA3vK1L5ENvG2asfcBOjq45CGvPTGWC/ zXTQ9B0/a+eV+tTB8KoZVoGFAbkC2RZWmsPoT/7VSNGJZbjYBDye4Rs3n8RwwOrKgfMA BGTgwF1Ie1cYLEx9PQiHFdN+A63+kCcwMGHS7U6eEiH2ZsjG+bSqnKUXVH7w4/l5YIAE sc+K7r2tFhHIZJqsSAaH8Z/EbyfJzZG2dST8cqARin3T1n8U6ecWqgKvKMx9MxygzFHy DdPvuc9dp+pgSXjU3BKekD2QqixgtsDu+iaw3FcytzBM6OyximUYtxXsDDAzTDXubn4u EVgg== X-Gm-Message-State: AA+aEWY5EwxDC43gtatL7mSrAicUDJ4jvX9x9KzTjS6Vnq1YpOQPoMUj krwGiKmYWDZuoklU4qsPgp2oa6GcP3IaqA== X-Google-Smtp-Source: AFSGD/UAONyH2DZt4rKL9AudK0CJDcsBRKWvZfRjaLLeZtmmza6A0A5zwGglJYh5nObqxi6N3P2EEQ== X-Received: by 2002:a1c:2807:: with SMTP id o7-v6mr8512869wmo.138.1542877664517; Thu, 22 Nov 2018 01:07:44 -0800 (PST) Received: from bender.baylibre.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id y9sm13856434wrq.55.2018.11.22.01.07.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 22 Nov 2018 01:07:43 -0800 (PST) From: Neil Armstrong To: u-boot@lists.denx.de Subject: [PATCH u-boot v2 00/19] Amlogic Meson cleanup for AXG SoC support Date: Thu, 22 Nov 2018 10:07:21 +0100 Message-Id: <20181122090740.29739-1-narmstrong@baylibre.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181122_010756_526949_4D1D56A4 X-CRM114-Status: GOOD ( 15.77 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, trini@konsulko.com, Neil Armstrong Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patchset will refactor the Amlogic Meson SoC support in order to easily add support for the Amlogic AXg SoC family, and later the G12x SoCs. In order : - Cleanup the mach-meson configs - Move board support to reference design common boards - Move board Kconfig into mach-meson - Add AXG pinctrl & clock support - Add AXG device tree and mach-meson support - Add support for S400 reference design - Do a final factorization of the code - Add USB boot support in U-boot At the end of the patches, the board code is lighter and we maintain only the reference designs, where each board will differ in the defconfig. It will be simpler to add custom board support for future boards with more changes against the reference designs. The complete AXG support depends on the : - mmc: meson-gx: Add AXG compatible - net: designware: add meson meson axg compatible patches submitted to the U-Boot mailing list. Changes since v1: - Fixed AXG pinctrl request and AO pin count - Fixed tabs/spaces issues on s400 README Jerome Brunet (12): ARM: meson: clean-up platform selection configs: meson: remove unnecessary MESON_FDTFILE_SETTING board: amlogic: remove p212 derivatives board: amlogic: factorise gxbb boards ARM: rework amlogic configuration configs: meson: change default load addresses pinctrl: meson: rework gx pmx function pinctrl: meson: select generic pinctrl pinctrl: meson: add axg support clk: meson: silence debug print ARM: meson: rework soc arch file to prepare for new SoC ARM: meson: factorize common code out amlogic's boards Neil Armstrong (7): board: amlogic: move khadas-vim2 as q200 ref board clk: meson: add static to meson_gates table ARM: meson: Add support for AXG family ARM: dts: Sync Amlogic Meson AXG DT from Linux 4.20-rc1 clk: Add clock driver for AXG board: amlogic: add support for S400 board ARM: meson: Add boot device discovery arch/arm/dts/Makefile | 3 +- arch/arm/dts/meson-axg-s400.dts | 554 ++++++ arch/arm/dts/meson-axg.dtsi | 1589 +++++++++++++++++ arch/arm/include/asm/arch-meson/axg.h | 52 + arch/arm/include/asm/arch-meson/boot.h | 20 + arch/arm/include/asm/arch-meson/clock-axg.h | 104 ++ .../asm/arch-meson/{clock.h => clock-gx.h} | 4 +- arch/arm/include/asm/arch-meson/eth.h | 6 +- arch/arm/include/asm/arch-meson/gx.h | 1 + arch/arm/include/asm/arch-meson/mem.h | 3 +- arch/arm/mach-meson/Kconfig | 132 +- arch/arm/mach-meson/Makefile | 4 +- arch/arm/mach-meson/board-axg.c | 118 ++ arch/arm/mach-meson/board-common.c | 117 ++ arch/arm/mach-meson/{board.c => board-gx.c} | 106 +- arch/arm/mach-meson/eth.c | 53 - arch/arm/mach-meson/sm.c | 1 - board/amlogic/khadas-vim/Kconfig | 12 - board/amlogic/khadas-vim/MAINTAINERS | 6 - board/amlogic/khadas-vim/khadas-vim.c | 57 - board/amlogic/khadas-vim2/Kconfig | 12 - board/amlogic/libretech-cc/Kconfig | 12 - board/amlogic/libretech-cc/MAINTAINERS | 6 - board/amlogic/libretech-cc/Makefile | 6 - board/amlogic/libretech-cc/libretech-cc.c | 57 - board/amlogic/nanopi-k2/Kconfig | 12 - board/amlogic/nanopi-k2/MAINTAINERS | 6 - board/amlogic/nanopi-k2/Makefile | 7 - board/amlogic/nanopi-k2/nanopi-k2.c | 55 - board/amlogic/odroid-c2/Kconfig | 12 - board/amlogic/odroid-c2/MAINTAINERS | 1 + .../README => odroid-c2/README.nanopi-k2} | 0 .../odroid-c2/{README => README.odroid-c2} | 0 board/amlogic/odroid-c2/odroid-c2.c | 16 +- board/amlogic/p212/Kconfig | 12 - .../README => p212/README.khadas-vim} | 0 .../README => p212/README.libretech-cc} | 0 board/amlogic/p212/{README => README.p212} | 0 board/amlogic/p212/p212.c | 16 +- .../amlogic/{khadas-vim2 => q200}/MAINTAINERS | 6 +- board/amlogic/{khadas-vim => q200}/Makefile | 2 +- .../README => q200/README.khadas-vim2} | 0 board/amlogic/q200/README.q200 | 102 ++ .../khadas-vim2.c => q200/q200.c} | 14 +- board/amlogic/s400/MAINTAINERS | 6 + board/amlogic/{khadas-vim2 => s400}/Makefile | 2 +- board/amlogic/s400/README | 110 ++ board/amlogic/s400/s400.c | 21 + configs/khadas-vim2_defconfig | 1 - configs/khadas-vim_defconfig | 1 - configs/libretech-cc_defconfig | 1 - configs/nanopi-k2_defconfig | 2 - configs/odroid-c2_defconfig | 1 - configs/p212_defconfig | 1 - configs/s400_defconfig | 38 + drivers/clk/Makefile | 2 +- drivers/clk/clk_meson.c | 6 +- drivers/clk/clk_meson_axg.c | 316 ++++ drivers/pinctrl/meson/Kconfig | 18 +- drivers/pinctrl/meson/Makefile | 3 + drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c | 125 ++ drivers/pinctrl/meson/pinctrl-meson-axg.c | 979 ++++++++++ drivers/pinctrl/meson/pinctrl-meson-axg.h | 66 + drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c | 97 + drivers/pinctrl/meson/pinctrl-meson-gx.h | 48 + drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 6 +- drivers/pinctrl/meson/pinctrl-meson-gxl.c | 6 +- drivers/pinctrl/meson/pinctrl-meson.c | 109 +- drivers/pinctrl/meson/pinctrl-meson.h | 37 +- include/configs/khadas-vim.h | 16 - include/configs/khadas-vim2.h | 18 - include/configs/libretech-cc.h | 16 - .../configs/{meson-gx-common.h => meson64.h} | 49 +- include/configs/nanopi-k2.h | 16 - include/configs/odroid-c2.h | 16 - include/configs/p212.h | 18 - include/dt-bindings/clock/axg-aoclkc.h | 26 + include/dt-bindings/clock/axg-audio-clkc.h | 94 + include/dt-bindings/clock/axg-clkc.h | 76 + include/dt-bindings/gpio/meson-axg-gpio.h | 116 ++ .../reset/amlogic,meson-axg-audio-arb.h | 17 + .../reset/amlogic,meson-axg-reset.h | 124 ++ include/dt-bindings/reset/axg-aoclkc.h | 20 + 83 files changed, 5166 insertions(+), 754 deletions(-) create mode 100644 arch/arm/dts/meson-axg-s400.dts create mode 100644 arch/arm/dts/meson-axg.dtsi create mode 100644 arch/arm/include/asm/arch-meson/axg.h create mode 100644 arch/arm/include/asm/arch-meson/boot.h create mode 100644 arch/arm/include/asm/arch-meson/clock-axg.h rename arch/arm/include/asm/arch-meson/{clock.h => clock-gx.h} (98%) create mode 100644 arch/arm/mach-meson/board-axg.c create mode 100644 arch/arm/mach-meson/board-common.c rename arch/arm/mach-meson/{board.c => board-gx.c} (59%) delete mode 100644 arch/arm/mach-meson/eth.c delete mode 100644 board/amlogic/khadas-vim/Kconfig delete mode 100644 board/amlogic/khadas-vim/MAINTAINERS delete mode 100644 board/amlogic/khadas-vim/khadas-vim.c delete mode 100644 board/amlogic/khadas-vim2/Kconfig delete mode 100644 board/amlogic/libretech-cc/Kconfig delete mode 100644 board/amlogic/libretech-cc/MAINTAINERS delete mode 100644 board/amlogic/libretech-cc/Makefile delete mode 100644 board/amlogic/libretech-cc/libretech-cc.c delete mode 100644 board/amlogic/nanopi-k2/Kconfig delete mode 100644 board/amlogic/nanopi-k2/MAINTAINERS delete mode 100644 board/amlogic/nanopi-k2/Makefile delete mode 100644 board/amlogic/nanopi-k2/nanopi-k2.c delete mode 100644 board/amlogic/odroid-c2/Kconfig rename board/amlogic/{nanopi-k2/README => odroid-c2/README.nanopi-k2} (100%) rename board/amlogic/odroid-c2/{README => README.odroid-c2} (100%) delete mode 100644 board/amlogic/p212/Kconfig rename board/amlogic/{khadas-vim/README => p212/README.khadas-vim} (100%) rename board/amlogic/{libretech-cc/README => p212/README.libretech-cc} (100%) rename board/amlogic/p212/{README => README.p212} (100%) rename board/amlogic/{khadas-vim2 => q200}/MAINTAINERS (54%) rename board/amlogic/{khadas-vim => q200}/Makefile (85%) rename board/amlogic/{khadas-vim2/README => q200/README.khadas-vim2} (100%) create mode 100644 board/amlogic/q200/README.q200 rename board/amlogic/{khadas-vim2/khadas-vim2.c => q200/q200.c} (85%) create mode 100644 board/amlogic/s400/MAINTAINERS rename board/amlogic/{khadas-vim2 => s400}/Makefile (84%) create mode 100644 board/amlogic/s400/README create mode 100644 board/amlogic/s400/s400.c create mode 100644 configs/s400_defconfig create mode 100644 drivers/clk/clk_meson_axg.c create mode 100644 drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c create mode 100644 drivers/pinctrl/meson/pinctrl-meson-axg.c create mode 100644 drivers/pinctrl/meson/pinctrl-meson-axg.h create mode 100644 drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c create mode 100644 drivers/pinctrl/meson/pinctrl-meson-gx.h delete mode 100644 include/configs/khadas-vim.h delete mode 100644 include/configs/khadas-vim2.h delete mode 100644 include/configs/libretech-cc.h rename include/configs/{meson-gx-common.h => meson64.h} (51%) delete mode 100644 include/configs/nanopi-k2.h delete mode 100644 include/configs/odroid-c2.h delete mode 100644 include/configs/p212.h create mode 100644 include/dt-bindings/clock/axg-aoclkc.h create mode 100644 include/dt-bindings/clock/axg-audio-clkc.h create mode 100644 include/dt-bindings/clock/axg-clkc.h create mode 100644 include/dt-bindings/gpio/meson-axg-gpio.h create mode 100644 include/dt-bindings/reset/amlogic,meson-axg-audio-arb.h create mode 100644 include/dt-bindings/reset/amlogic,meson-axg-reset.h create mode 100644 include/dt-bindings/reset/axg-aoclkc.h