Skip to content

Commit

Permalink
Merge pull request #145 from openwrtdiy/openwrt-23.05
Browse files Browse the repository at this point in the history
Synchronize official source code
  • Loading branch information
openwrtdiy authored Jan 12, 2025
2 parents 4cef5fa + 55af6e1 commit c9bc64c
Show file tree
Hide file tree
Showing 8 changed files with 310 additions and 10 deletions.
1 change: 1 addition & 0 deletions package/boot/uboot-envtools/files/ath79
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ ruckus,zf7372)
ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x40000" "0x10000"
;;
sophos,ap15|\
sophos,ap15c|\
sophos,ap55|\
sophos,ap55c|\
sophos,ap100|\
Expand Down
159 changes: 159 additions & 0 deletions target/linux/ath79/dts/qca9557_sophos_ap15c.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

#include "qca955x.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>

/ {
compatible = "sophos,ap15c", "qca,qca9557";
model = "Sophos AP15C";

aliases {
led-boot = &led_status_green;
led-failsafe = &led_status_yellow;
led-running = &led_status_green;
led-upgrade = &led_status_yellow;
label-mac-device = &eth0;
};

chosen {
bootargs = "console=ttyS0,115200n8";
};

keys {
compatible = "gpio-keys";

reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
};

leds {
compatible = "gpio-leds";

led_status_green: status_green {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
default-state = "on";
};

led_status_yellow: status_yellow {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_YELLOW>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
};
};

&spi {
status = "okay";

flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <25000000>;

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

partition@0 {
label = "u-boot";
reg = <0x000000 0x040000>;
read-only;
};

partition@40000 {
label = "u-boot-env";
reg = <0x040000 0x010000>;
};

partition@50000 {
label = "art";
reg = <0x050000 0x010000>;
read-only;

nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;

cal_art_1000: calibration@1000 {
reg = <0x1000 0x440>;
};
};
};

partition@60000 {
label = "config";
reg = <0x060000 0x010000>;
read-only;

nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;

macaddr_config_201a: macaddr@201a {
reg = <0x201a 0x6>;
};
};
};

partition@70000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x070000 0xf90000>;
};
};
};
};

&mdio0 {
status = "okay";

phy-mask = <0x10>;

phy4: ethernet-phy@4 {
reg = <4>;
eee-broken-100tx;
eee-broken-1000t;
};
};

&eth0 {
status = "okay";

pll-data = <0xa6000000 0xa0000101 0xa0001313>;

nvmem-cells = <&macaddr_config_201a>;
nvmem-cell-names = "mac-address";

phy-mode = "rgmii-id";
phy-handle = <&phy4>;

gmac_config: gmac-config {
device = <&gmac>;

rgmii-enabled = <1>;

rxdv-delay = <3>;
rxd-delay = <3>;
txen-delay = <3>;
txd-delay = <3>;
};
};

&wmac {
status = "okay";

nvmem-cells = <&cal_art_1000>;
nvmem-cell-names = "calibration";
};
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ ath79_setup_interfaces()
ruckus,zf7351|\
siemens,ws-ap3610|\
sophos,ap15|\
sophos,ap15c|\
sophos,ap55|\
sophos,ap55c|\
sophos,ap100|\
Expand Down
8 changes: 8 additions & 0 deletions target/linux/ath79/image/generic.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2746,6 +2746,14 @@ define Device/sophos_ap15
endef
TARGET_DEVICES += sophos_ap15

define Device/sophos_ap15c
SOC := qca9557
DEVICE_VENDOR := Sophos
DEVICE_MODEL := AP15C
IMAGE_SIZE := 15936k
endef
TARGET_DEVICES += sophos_ap15c

define Device/sophos_ap55
SOC := qca9558
DEVICE_VENDOR := Sophos
Expand Down
16 changes: 8 additions & 8 deletions target/linux/bmips/dts/bcm63268.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@

pinctrl_nand: nand-pins {
function = "nand";
group = "nand_grp";
pins = "nand_grp";
};

pinctrl_gpio35_alt: gpio35_alt-pins {
Expand All @@ -254,37 +254,37 @@

pinctrl_dectpd: dectpd-pins {
function = "dectpd";
group = "dectpd_grp";
pins = "dectpd_grp";
};

pinctrl_vdsl_phy_override_0: vdsl_phy_override_0-pins {
function = "vdsl_phy_override_0";
group = "vdsl_phy_override_0_grp";
pins = "vdsl_phy_override_0_grp";
};

pinctrl_vdsl_phy_override_1: vdsl_phy_override_1-pins {
function = "vdsl_phy_override_1";
group = "vdsl_phy_override_1_grp";
pins = "vdsl_phy_override_1_grp";
};

pinctrl_vdsl_phy_override_2: vdsl_phy_override_2-pins {
function = "vdsl_phy_override_2";
group = "vdsl_phy_override_2_grp";
pins = "vdsl_phy_override_2_grp";
};

pinctrl_vdsl_phy_override_3: vdsl_phy_override_3-pins {
function = "vdsl_phy_override_3";
group = "vdsl_phy_override_3_grp";
pins = "vdsl_phy_override_3_grp";
};

pinctrl_dsl_gpio8: dsl_gpio8-pins {
function = "dsl_gpio8";
group = "dsl_gpio8";
pins = "dsl_gpio8";
};

pinctrl_dsl_gpio9: dsl_gpio9-pins {
function = "dsl_gpio9";
group = "dsl_gpio9";
pins = "dsl_gpio9";
};
};
};
Expand Down
2 changes: 1 addition & 1 deletion target/linux/bmips/dts/bcm6362.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@

pinctrl_nand: nand-pins {
function = "nand";
group = "nand_grp";
pins = "nand_grp";
};
};
};
Expand Down
2 changes: 1 addition & 1 deletion target/linux/bmips/dts/bcm6368.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@

pinctrl_uart1: uart1-pins {
function = "uart1";
group = "uart1_grp";
pins = "uart1_grp";
};
};
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
From patchwork Tue Jan 7 20:16:20 2025
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Patchwork-Submitter: Sander Vanheule <[email protected]>
X-Patchwork-Id: 2031059
Return-Path:
<linux-gpio+bounces-14582-incoming=patchwork.ozlabs.org@vger.kernel.org>
X-Original-To: [email protected]
Delivered-To: [email protected]
Authentication-Results: legolas.ozlabs.org;
dkim=pass (2048-bit key;
secure) header.d=svanheule.net [email protected] header.a=rsa-sha256
header.s=mail1707 header.b=YjCvLC2H;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org
(client-ip=2604:1380:4601:e00::3; helo=am.mirrors.kernel.org;
envelope-from=linux-gpio+bounces-14582-incoming=patchwork.ozlabs.org@vger.kernel.org;
receiver=patchwork.ozlabs.org)
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org
[IPv6:2604:1380:4601:e00::3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (secp384r1))
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4YSMxB3WwSz1yPG
for <[email protected]>; Wed, 8 Jan 2025 07:25:18 +1100 (AEDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id A7B811887AD1
for <[email protected]>; Tue, 7 Jan 2025 20:25:19 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C09A21F63FE;
Tue, 7 Jan 2025 20:25:11 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=svanheule.net [email protected]
header.b="YjCvLC2H"
X-Original-To: [email protected]
Received: from polaris.svanheule.net (polaris.svanheule.net [84.16.241.116])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8DD631DF97A
for <[email protected]>; Tue, 7 Jan 2025 20:25:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
arc=none smtp.client-ip=84.16.241.116
ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1736281511; cv=none;
b=Xe/s+ul4S/+nhYxSMqUWJ/GXKP+J7uJo6tFw/w5bTXcmGxkbpCXTLOiTNXAhv8PMhTfsLYSQes6VF8dzDXaJxL4c8SlQsPNfGH/PqecmSvFMbZTz1XbjP9mBUCvX9lxCH8CSRavkuPuYdhss3a56TgaFzi9GifUSHCsHGs7+xk0=
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1736281511; c=relaxed/simple;
bh=31kjLyaoVOzIAs1m+zMi59Ia2jUwYW56Jp1YE6hLflg=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type;
b=q7miNkZBtMq3dcxL5HMjUpP3EFdQ7/xU/WnWIFVl6MK4rszqphqvaziMOK6avsn+UA5pAx2JJV8bDY8LfNhiVWwZtPfxbikjjZFm1HYlCDWmGudasM0b//K3/On625L4iqFWmVmLUdEdhvwIkJKSL4wTfN0OMz27EI272o5ygLg=
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass (p=none dis=none) header.from=svanheule.net;
spf=pass smtp.mailfrom=svanheule.net;
dkim=pass (2048-bit key) header.d=svanheule.net [email protected]
header.b=YjCvLC2H; arc=none smtp.client-ip=84.16.241.116
Authentication-Results: smtp.subspace.kernel.org;
dmarc=pass (p=none dis=none) header.from=svanheule.net
Authentication-Results: smtp.subspace.kernel.org;
spf=pass smtp.mailfrom=svanheule.net
Received: from terra.vega.svanheule.net (unknown [94.110.49.146])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest
SHA256)
(No client certificate requested)
(Authenticated sender: [email protected])
by polaris.svanheule.net (Postfix) with ESMTPSA id 1E18459A0D6;
Tue, 7 Jan 2025 21:17:02 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svanheule.net;
s=mail1707; t=1736281022;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=yNGIiTe7uonx3NZIc6+B7LVjvR8RnIV2zq++EO7NLhg=;
b=YjCvLC2HqArIGWGFkNYmh+oloGi7ZFo7WZGlTbxuHqrQVJ6mLNoLCTCkPkX1EJWEQyNysD
Jj+7tBnAYyCrJ0NuSTD9CPW1+KwKP4wlvWpBUlayCdUJyU4rzjqmlYAI5vJ1UX8FOnvEpn
KeWjgjbeMI6dvIE7ATPFkDvMrDxR9KSEe/1pfzY3E5jh1T8tcnTRMQKTll7hSUBN63dVfJ
U7wnHRLvwx8ESIjrHDKOlsSohmV6lyQTrgEeE2RCM6SpZPNoSpPVjTinF1kPuMHNWHV+Th
6eDOblXxt859JECDowM0NjF87XJqjgph22+A1WUV4iaePO4GIWo9DQ3KhP/Pyg==
From: Sander Vanheule <[email protected]>
To: Michael Walle <[email protected]>,
Linus Walleij <[email protected]>,
Bartosz Golaszewski <[email protected]>,
[email protected],
[email protected]
Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= <[email protected]>,
[email protected], [email protected],
[email protected], Sander Vanheule <[email protected]>
Subject: [PATCH] gpio: regmap: Use generic request/free ops
Date: Tue, 7 Jan 2025 21:16:20 +0100
Message-ID: <[email protected]>
X-Mailer: git-send-email 2.47.1
Precedence: bulk
X-Mailing-List: [email protected]
List-Id: <linux-gpio.vger.kernel.org>
List-Subscribe: <mailto:[email protected]>
List-Unsubscribe: <mailto:[email protected]>
MIME-Version: 1.0

Set the gpiochip request and free ops to the generic implementations.
This way a user can provide a gpio-ranges property defined for a pinmux,
easing muxing of gpio functions. Provided that the pin controller
implementents the pinmux op .gpio_request_enable(), pins will
automatically be muxed to their GPIO function when requested.

Signed-off-by: Sander Vanheule <[email protected]>
Acked-by: Michael Walle <[email protected]>
---
Álvaro has submitted a similar patch today. My implementation's impact
is more limited, but I hadn't gotten around to submitting it yet.

For the original (short) discussion, see:
https://lore.kernel.org/linux-gpio/[email protected]/T/#t

drivers/gpio/gpio-regmap.c | 2 ++
1 file changed, 2 insertions(+)

--- a/drivers/gpio/gpio-regmap.c
+++ b/drivers/gpio/gpio-regmap.c
@@ -263,6 +263,8 @@ struct gpio_regmap *gpio_regmap_register
*/
chip->can_sleep = true;

+ chip->request = gpiochip_generic_request;
+ chip->free = gpiochip_generic_free;
chip->get = gpio_regmap_get;
if (gpio->reg_set_base && gpio->reg_clr_base)
chip->set = gpio_regmap_set_with_clear;

0 comments on commit c9bc64c

Please sign in to comment.